@measured/puck 0.21.0-canary.f5820ce9 → 0.21.0-canary.fee2ba98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/Editor-EHVB6NFF.mjs +204 -0
  2. package/dist/Editor-F2LSS6SE.css +403 -0
  3. package/dist/Render-OFE6QLI2.mjs +55 -0
  4. package/dist/Render-QEMDIDQC.css +101 -0
  5. package/dist/{walk-tree-Ctf3FZQI.d.mts → actions-DwdqNb63.d.mts} +265 -75
  6. package/dist/{walk-tree-Ctf3FZQI.d.ts → actions-DwdqNb63.d.ts} +265 -75
  7. package/dist/chunk-2334PLLL.mjs +111 -0
  8. package/dist/chunk-4N3WJM5Y.mjs +33 -0
  9. package/dist/{chunk-AO6Y47WD.mjs → chunk-6AGLD64M.mjs} +4819 -6477
  10. package/dist/chunk-CSSRLPHM.mjs +11 -0
  11. package/dist/chunk-D6RJOV2Z.mjs +1727 -0
  12. package/dist/chunk-M6W7YEVX.mjs +95 -0
  13. package/dist/chunk-NLUHDYVR.mjs +416 -0
  14. package/dist/chunk-NQEE2254.mjs +706 -0
  15. package/dist/chunk-PXYVL42X.mjs +53 -0
  16. package/dist/chunk-QBGM4ELA.mjs +528 -0
  17. package/dist/chunk-QLQZDFXM.mjs +63 -0
  18. package/dist/chunk-T3WX7XJ6.mjs +132 -0
  19. package/dist/chunk-V5I7CVLT.mjs +103 -0
  20. package/dist/chunk-Y2EFNT5P.mjs +108 -0
  21. package/dist/chunk-Y656T6AQ.mjs +419 -0
  22. package/dist/full-2GJTAAZE.css +301 -0
  23. package/dist/full-TVZATY2K.mjs +93 -0
  24. package/dist/index-AfAtzigt.d.ts +117 -0
  25. package/dist/index-jxA1wrW4.d.mts +117 -0
  26. package/dist/index.css +278 -22
  27. package/dist/index.d.mts +99 -113
  28. package/dist/index.d.ts +99 -113
  29. package/dist/index.js +6647 -3315
  30. package/dist/index.mjs +26 -12
  31. package/dist/internal.d.mts +27 -0
  32. package/dist/internal.d.ts +27 -0
  33. package/dist/internal.js +908 -0
  34. package/dist/internal.mjs +13 -0
  35. package/dist/loaded-ICVILKS6.mjs +60 -0
  36. package/dist/loaded-IHAGHNLA.mjs +57 -0
  37. package/dist/loaded-ONU7LATV.mjs +57 -0
  38. package/dist/loaded-RVWBFK7L.css +87 -0
  39. package/dist/no-external.css +425 -165
  40. package/dist/no-external.d.mts +19 -2
  41. package/dist/no-external.d.ts +19 -2
  42. package/dist/no-external.js +6646 -3311
  43. package/dist/no-external.mjs +28 -9
  44. package/dist/rsc.css +101 -0
  45. package/dist/rsc.d.mts +17 -2
  46. package/dist/rsc.d.ts +17 -2
  47. package/dist/rsc.js +417 -30
  48. package/dist/rsc.mjs +18 -9
  49. package/dist/walk-tree-DRy9ca1P.d.ts +29 -0
  50. package/dist/walk-tree-Dppc3XGY.d.mts +29 -0
  51. package/package.json +31 -4
  52. package/dist/chunk-VBJEDLUM.mjs +0 -965
package/dist/index.css CHANGED
@@ -147,7 +147,7 @@
147
147
  /* bundle/index.css */
148
148
 
149
149
  /* css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css/#css-module-data */
150
- ._ActionBar_rvadt_1 {
150
+ ._ActionBar_1nmyk_1 {
151
151
  align-items: center;
152
152
  cursor: default;
153
153
  display: flex;
@@ -163,7 +163,7 @@
163
163
  font-family: var(--puck-font-family);
164
164
  min-height: 26px;
165
165
  }
166
- ._ActionBar-label_rvadt_18 {
166
+ ._ActionBar-label_1nmyk_18 {
167
167
  color: var(--puck-color-grey-08);
168
168
  font-size: var(--puck-font-size-xxxs);
169
169
  font-weight: 500;
@@ -174,13 +174,13 @@
174
174
  text-overflow: ellipsis;
175
175
  white-space: nowrap;
176
176
  }
177
- ._ActionBar-action_rvadt_30 + ._ActionBar-label_rvadt_18 {
177
+ ._ActionBarAction_1nmyk_30 + ._ActionBar-label_1nmyk_18 {
178
178
  padding-inline-start: 0;
179
179
  }
180
- ._ActionBar-label_rvadt_18 + ._ActionBar-action_rvadt_30 {
180
+ ._ActionBar-label_1nmyk_18 + ._ActionBarAction_1nmyk_30 {
181
181
  margin-inline-start: -4px;
182
182
  }
183
- ._ActionBar-group_rvadt_38 {
183
+ ._ActionBar-group_1nmyk_38 {
184
184
  align-items: center;
185
185
  border-inline-start: 0.5px solid var(--puck-color-grey-05);
186
186
  display: flex;
@@ -188,18 +188,18 @@
188
188
  padding-inline-start: 4px;
189
189
  padding-inline-end: 4px;
190
190
  }
191
- ._ActionBar-group_rvadt_38:first-of-type {
191
+ ._ActionBar-group_1nmyk_38:first-of-type {
192
192
  border-inline-start: 0;
193
193
  }
194
- ._ActionBar-group_rvadt_38:empty {
194
+ ._ActionBar-group_1nmyk_38:empty {
195
195
  display: none;
196
196
  }
197
- ._ActionBar-action_rvadt_30 {
197
+ ._ActionBarAction_1nmyk_30 {
198
198
  background: transparent;
199
199
  border: none;
200
200
  color: var(--puck-color-grey-08);
201
201
  cursor: pointer;
202
- padding: 6px 8px;
202
+ padding: 6px;
203
203
  margin-inline-start: 4px;
204
204
  margin-inline-end: 4px;
205
205
  border-radius: 4px;
@@ -209,26 +209,37 @@
209
209
  justify-content: center;
210
210
  transition: color 50ms ease-in;
211
211
  }
212
- ._ActionBar-action_rvadt_30 svg {
212
+ ._ActionBarAction--disabled_1nmyk_71 {
213
+ cursor: auto;
214
+ color: var(--puck-color-grey-06);
215
+ }
216
+ ._ActionBarAction_1nmyk_30 svg {
213
217
  max-width: none !important;
214
218
  }
215
- ._ActionBar-action_rvadt_30:focus-visible {
219
+ ._ActionBarAction_1nmyk_30:focus-visible {
216
220
  outline: 2px solid var(--puck-color-azure-05);
217
221
  outline-offset: -2px;
218
222
  }
219
223
  @media (hover: hover) and (pointer: fine) {
220
- ._ActionBar-action_rvadt_30:hover {
224
+ ._ActionBarAction_1nmyk_30:hover:not(._ActionBarAction--disabled_1nmyk_71) {
221
225
  color: var(--puck-color-azure-06);
222
226
  transition: none;
223
227
  }
224
228
  }
225
- ._ActionBar-action_rvadt_30:active {
229
+ ._ActionBarAction_1nmyk_30:active:not(._ActionBarAction--disabled_1nmyk_71),
230
+ ._ActionBarAction--active_1nmyk_93 {
226
231
  color: var(--puck-color-azure-07);
227
232
  transition: none;
228
233
  }
229
- ._ActionBar-group_rvadt_38 * {
234
+ ._ActionBar-group_1nmyk_38 * {
230
235
  margin: 0;
231
236
  }
237
+ ._ActionBar-separator_1nmyk_102 {
238
+ background: var(--puck-color-grey-05);
239
+ margin-inline: 4px;
240
+ width: 0.5px;
241
+ height: 100%;
242
+ }
232
243
 
233
244
  /* css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/styles.module.css/#css-module-data */
234
245
  ._InputWrapper_bsxfo_1 + ._InputWrapper_bsxfo_1 {
@@ -545,7 +556,7 @@ textarea._Input-input_bsxfo_26 {
545
556
  }
546
557
 
547
558
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
548
- ._IconButton_swpni_1 {
559
+ ._IconButton_ffob9_1 {
549
560
  align-items: center;
550
561
  background: transparent;
551
562
  border: none;
@@ -557,23 +568,26 @@ textarea._Input-input_bsxfo_26 {
557
568
  padding: 4px;
558
569
  transition: background-color 50ms ease-in, color 50ms ease-in;
559
570
  }
560
- ._IconButton_swpni_1:focus-visible {
571
+ ._IconButton--active_ffob9_14 {
572
+ color: var(--puck-color-azure-04);
573
+ }
574
+ ._IconButton_ffob9_1:focus-visible {
561
575
  outline: 2px solid var(--puck-color-azure-05);
562
576
  outline-offset: -2px;
563
577
  }
564
578
  @media (hover: hover) and (pointer: fine) {
565
- ._IconButton_swpni_1:hover:not(._IconButton--disabled_swpni_20) {
566
- background: var(--puck-color-azure-12);
579
+ ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
580
+ background: var(--puck-color-grey-10);
567
581
  color: var(--puck-color-azure-04);
568
582
  cursor: pointer;
569
583
  transition: none;
570
584
  }
571
585
  }
572
- ._IconButton_swpni_1:active {
586
+ ._IconButton_ffob9_1:active {
573
587
  background: var(--puck-color-azure-11);
574
588
  transition: none;
575
589
  }
576
- ._IconButton-title_swpni_33 {
590
+ ._IconButton-title_ffob9_37 {
577
591
  clip: rect(0 0 0 0);
578
592
  clip-path: inset(100%);
579
593
  height: 1px;
@@ -582,7 +596,7 @@ textarea._Input-input_bsxfo_26 {
582
596
  white-space: nowrap;
583
597
  width: 1px;
584
598
  }
585
- ._IconButton--disabled_swpni_20 {
599
+ ._IconButton--disabled_ffob9_24 {
586
600
  color: var(--puck-color-grey-07);
587
601
  }
588
602
 
@@ -1084,6 +1098,248 @@ textarea._Input-input_bsxfo_26 {
1084
1098
  padding-inline-start: 8px;
1085
1099
  }
1086
1100
 
1101
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/styles.module.css/#css-module-data */
1102
+ ._RichTextMenu_k97eh_1 {
1103
+ display: flex;
1104
+ flex-direction: row;
1105
+ flex-wrap: nowrap;
1106
+ }
1107
+ ._RichTextMenu--form_k97eh_7 {
1108
+ border-top-left-radius: 4px;
1109
+ border-top-right-radius: 4px;
1110
+ padding: 6px 6px;
1111
+ background-color: var(--puck-color-grey-12);
1112
+ position: relative;
1113
+ scrollbar-width: none;
1114
+ overflow-x: auto;
1115
+ }
1116
+ ._RichTextMenu-group_k97eh_17 {
1117
+ display: flex;
1118
+ align-items: space-between;
1119
+ flex-direction: row;
1120
+ flex-wrap: nowrap;
1121
+ padding-inline: 6px;
1122
+ gap: 2px;
1123
+ position: relative;
1124
+ }
1125
+ ._RichTextMenu-group_k97eh_17:first-of-type {
1126
+ padding-left: 0;
1127
+ }
1128
+ ._RichTextMenu-group_k97eh_17:last-of-type {
1129
+ padding-right: 0;
1130
+ }
1131
+ ._RichTextMenu--inline_k97eh_35 ._RichTextMenu-group_k97eh_17 {
1132
+ color: var(--puck-color-grey-08);
1133
+ gap: 0px;
1134
+ flex-wrap: nowrap;
1135
+ }
1136
+ ._RichTextMenu-group_k97eh_17 + ._RichTextMenu-group_k97eh_17 {
1137
+ border-left: 1px solid var(--puck-color-grey-10);
1138
+ }
1139
+ ._RichTextMenu--inline_k97eh_35 ._RichTextMenu-group_k97eh_17 + ._RichTextMenu-group_k97eh_17 {
1140
+ border-left: 0.5px solid var(--puck-color-grey-05);
1141
+ }
1142
+
1143
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/components/Control/styles.module.css/#css-module-data */
1144
+ ._Control_1aveu_1 .lucide {
1145
+ height: 18px;
1146
+ width: 18px;
1147
+ }
1148
+ ._Control--inline_1aveu_6 .lucide {
1149
+ height: 16px;
1150
+ width: 16px;
1151
+ }
1152
+
1153
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/Select/styles.module.css/#css-module-data */
1154
+ ._Select_xjbef_1 {
1155
+ position: relative;
1156
+ z-index: 1;
1157
+ }
1158
+ ._Select-button_xjbef_6 {
1159
+ align-items: center;
1160
+ background: transparent;
1161
+ border: none;
1162
+ border-radius: 4px;
1163
+ display: flex;
1164
+ justify-content: center;
1165
+ gap: 0px;
1166
+ height: 100%;
1167
+ padding: 4px;
1168
+ padding-right: 2px;
1169
+ }
1170
+ ._Select--hasOptions_xjbef_19 ._Select-button_xjbef_6 {
1171
+ color: currentColor;
1172
+ }
1173
+ ._Select--hasOptions_xjbef_19:not(._Select--disabled_xjbef_23) ._Select-button_xjbef_6 {
1174
+ cursor: pointer;
1175
+ }
1176
+ ._Select-buttonIcon_xjbef_27 {
1177
+ align-items: center;
1178
+ display: flex;
1179
+ justify-content: center;
1180
+ }
1181
+ ._Select--standalone_xjbef_33 ._Select-buttonIcon_xjbef_27 .lucide {
1182
+ height: 18px;
1183
+ width: 18px;
1184
+ }
1185
+ ._Select--actionBar_xjbef_38 ._Select-buttonIcon_xjbef_27 .lucide {
1186
+ height: 16px;
1187
+ width: 16px;
1188
+ }
1189
+ ._Select--hasOptions_xjbef_19:not(._Select--disabled_xjbef_23) ._Select-button_xjbef_6:hover,
1190
+ ._Select--hasValue_xjbef_44 ._Select-button_xjbef_6 {
1191
+ background: var(--puck-color-grey-10);
1192
+ color: var(--puck-color-azure-04);
1193
+ }
1194
+ ._Select--disabled_xjbef_23 ._Select-button_xjbef_6 {
1195
+ color: var(--puck-color-grey-07);
1196
+ }
1197
+ ._Select--actionBar_xjbef_38 {
1198
+ &._Select--hasOptions_xjbef_19 ._Select-button_xjbef_6:hover,
1199
+ &._Select--hasValue_xjbef_44 ._Select-button_xjbef_6 {
1200
+ background: none;
1201
+ color: var(--puck-color-azure-07);
1202
+ }
1203
+ }
1204
+ ._Select-items_xjbef_61 {
1205
+ background: white;
1206
+ border: 1px solid var(--puck-color-grey-09);
1207
+ border-radius: 8px;
1208
+ margin: 10px 8px;
1209
+ margin-left: 0;
1210
+ padding: 4px;
1211
+ z-index: 2;
1212
+ list-style: none;
1213
+ }
1214
+ ._SelectItem_xjbef_72 {
1215
+ background: transparent;
1216
+ border-radius: 4px;
1217
+ border: none;
1218
+ color: var(--puck-color-grey-04);
1219
+ cursor: pointer;
1220
+ display: flex;
1221
+ gap: 8px;
1222
+ align-items: center;
1223
+ font-size: var(--puck-font-size-xxs);
1224
+ margin: 0;
1225
+ padding: 8px 12px;
1226
+ width: 100%;
1227
+ }
1228
+ ._SelectItem--isSelected_xjbef_87 {
1229
+ background: var(--puck-color-azure-11);
1230
+ color: var(--puck-color-azure-04);
1231
+ font-weight: 500;
1232
+ }
1233
+ ._SelectItem--isSelected_xjbef_87 ._SelectItem-icon_xjbef_93 {
1234
+ color: var(--puck-color-azure-04);
1235
+ }
1236
+ ._SelectItem_xjbef_72:hover {
1237
+ background: var(--puck-color-azure-11);
1238
+ color: var(--puck-color-azure-04);
1239
+ }
1240
+
1241
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
1242
+ ._RichTextEditor_1elol_1 .ProseMirror {
1243
+ white-space: pre-wrap;
1244
+ word-wrap: break-word;
1245
+ cursor: text;
1246
+ outline: none;
1247
+ position: relative;
1248
+ }
1249
+ ._RichTextEditor_1elol_1 .rich-text * {
1250
+ white-space: pre-wrap;
1251
+ user-select: auto;
1252
+ -webkit-user-select: auto;
1253
+ }
1254
+ ._RichTextEditor_1elol_1 .rich-text blockquote {
1255
+ margin: 1em 0;
1256
+ padding: 0 1em;
1257
+ border-left: 4px solid var(--puck-color-grey-09);
1258
+ }
1259
+ ._RichTextEditor_1elol_1 .rich-text code {
1260
+ background-color: var(--puck-color-grey-11);
1261
+ padding: 4px 8px;
1262
+ border-radius: 4px;
1263
+ }
1264
+ ._RichTextEditor_1elol_1 .rich-text p:empty::before {
1265
+ content: "\a0";
1266
+ }
1267
+ ._RichTextEditor_1elol_1 .rich-text pre code {
1268
+ display: block;
1269
+ padding: 8px 12px;
1270
+ }
1271
+ ._RichTextEditor_1elol_1 .rich-text > *:first-child,
1272
+ ._RichTextEditor_1elol_1 .ProseMirror > *:first-child,
1273
+ ._RichTextEditor_1elol_1 .rich-text * p:first-of-type {
1274
+ margin-top: 0;
1275
+ }
1276
+ ._RichTextEditor_1elol_1 .rich-text > *:last-child,
1277
+ ._RichTextEditor_1elol_1 .ProseMirror > *:last-child,
1278
+ ._RichTextEditor_1elol_1 .rich-text * p:last-of-type {
1279
+ margin-bottom: 0;
1280
+ }
1281
+ ._RichTextEditor--editor_1elol_50 {
1282
+ background: var(--puck-color-white);
1283
+ border-width: 1px;
1284
+ border-style: solid;
1285
+ border-color: var(--puck-color-grey-09);
1286
+ border-radius: 4px;
1287
+ box-sizing: border-box;
1288
+ display: flex;
1289
+ flex-direction: column;
1290
+ font-family: inherit;
1291
+ font-size: var(--puck-font-size-xxs);
1292
+ resize: vertical;
1293
+ transition: border-color 50ms ease-in;
1294
+ width: 100%;
1295
+ max-width: 100%;
1296
+ min-height: 128px;
1297
+ }
1298
+ ._RichTextEditor--editor_1elol_50 .rich-text {
1299
+ flex-grow: 1;
1300
+ }
1301
+ ._RichTextEditor--editor_1elol_50 .rich-text:not(:has(.ProseMirror)),
1302
+ ._RichTextEditor--editor_1elol_50 .rich-text .ProseMirror {
1303
+ height: 100%;
1304
+ padding: 12px 15px;
1305
+ }
1306
+ ._RichTextEditor--editor_1elol_50 .rich-text ul,
1307
+ ._RichTextEditor--editor_1elol_50 .rich-text ol {
1308
+ padding-left: 24px;
1309
+ }
1310
+ ._RichTextEditor--editor_1elol_50 .rich-text li {
1311
+ line-height: 1.5;
1312
+ }
1313
+ ._RichTextEditor--editor_1elol_50 .rich-text p {
1314
+ margin-block: 12px;
1315
+ }
1316
+ ._RichTextEditor--editor_1elol_50 .rich-text ul {
1317
+ list-style: disc;
1318
+ }
1319
+ ._RichTextEditor--editor_1elol_50 .rich-text ol {
1320
+ list-style: decimal;
1321
+ }
1322
+ ._RichTextEditor--editor_1elol_50:focus-within {
1323
+ border-color: var(--puck-color-grey-05);
1324
+ outline: 2px solid var(--puck-color-azure-05);
1325
+ transition: none;
1326
+ }
1327
+ ._RichTextEditor--editor_1elol_50._RichTextEditor--disabled_1elol_106 {
1328
+ background: var(--puck-color-grey-11);
1329
+ }
1330
+ ._RichTextEditor_1elol_1:not(:focus-within):not(._RichTextEditor--isActive_1elol_110) .ProseMirror ::selection {
1331
+ background-color: transparent;
1332
+ }
1333
+ ._RichTextEditor-menu_1elol_116 {
1334
+ border-bottom: 1px solid var(--puck-color-grey-10);
1335
+ position: sticky;
1336
+ top: 0;
1337
+ z-index: 1;
1338
+ }
1339
+ ._RichTextEditor--disabled_1elol_106 ._RichTextEditor-menu_1elol_116 {
1340
+ border-bottom: 1px solid var(--puck-color-grey-09);
1341
+ }
1342
+
1087
1343
  /* css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/fields/ObjectField/styles.module.css/#css-module-data */
1088
1344
  ._ObjectField_1ua3y_5 {
1089
1345
  display: flex;
@@ -1326,7 +1582,7 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1326
1582
  outline-offset: 2px;
1327
1583
  }
1328
1584
  [data-puck-overlay-portal]:focus-within {
1329
- outline: 2px var(--puck-color-azure-07) solid;
1585
+ outline: 2px var(--puck-color-azure-07) dashed;
1330
1586
  outline-offset: 2px;
1331
1587
  }
1332
1588
 
package/dist/index.d.mts CHANGED
@@ -1,122 +1,37 @@
1
- import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-Ctf3FZQI.mjs';
2
- export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, t as ItemSelector, c as ComponentData } from './actions-DwdqNb63.mjs';
2
+ export { af as Adaptor, A as AppState, ad as ArrayField, L as ArrayState, aq as AsFieldProps, $ as BaseData, a7 as BaseField, ah as CacheOpts, m as ComponentConfig, T as ComponentConfigExtensions, _ as ComponentConfigParams, a3 as ComponentDataMap, a1 as ComponentDataOptionalId, a5 as ComponentMetadata, Z as ConfigParams, b as Content, ak as CustomField, aj as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ao as DefaultRootProps, an as DefaultRootRenderProps, w as Direction, x as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, Y as ExtractConfigParams, as as ExtractField, a6 as FieldMetadata, J as FieldRenderFunctions, B as FieldTransformFn, z as FieldTransformFnParams, F as Fields, H as History, K as ItemWithId, a2 as MappedItem, a9 as NumberField, ae as ObjectField, G as OverrideKey, Q as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, i as ResolveDataTrigger, v as RichText, o as RichtextField, X as RootConfig, R as RootData, h as RootDataWithProps, a0 as RootDataWithoutProps, ab as SelectField, S as Slot, N as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, y as Viewport, ar as WithChildren, W as WithId, ap as WithPuckProps, u as WithSlotProps, E as overrideKeys } from './actions-DwdqNb63.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dppc3XGY.mjs';
3
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
  import * as react from 'react';
5
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
6
-
7
- type HistorySlice<D = any> = {
8
- index: number;
9
- hasPast: () => boolean;
10
- hasFuture: () => boolean;
11
- histories: History<D>[];
12
- record: (data: D) => void;
13
- back: VoidFunction;
14
- forward: VoidFunction;
15
- currentHistory: () => History;
16
- nextHistory: () => History<D> | null;
17
- prevHistory: () => History<D> | null;
18
- setHistories: (histories: History[]) => void;
19
- setHistoryIndex: (index: number) => void;
20
- initialAppState: D;
21
- };
22
-
23
- type NodeMethods = {
24
- sync: () => void;
25
- hideOverlay: () => void;
26
- showOverlay: () => void;
27
- };
28
- type PuckNodeInstance = {
29
- id: string;
30
- methods: NodeMethods;
31
- element: HTMLElement | null;
32
- };
33
- type NodesSlice = {
34
- nodes: Record<string, PuckNodeInstance | undefined>;
35
- registerNode: (id: string, node: Partial<PuckNodeInstance>) => void;
36
- unregisterNode: (id: string, node?: Partial<PuckNodeInstance>) => void;
37
- };
38
-
39
- type PermissionsArgs<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
40
- item?: G["UserComponentData"] | null;
41
- type?: keyof G["UserProps"];
42
- root?: boolean;
43
- };
44
- type GetPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>) => Permissions;
45
- type ResolvePermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
46
- type RefreshPermissions<UserConfig extends Config = Config> = (params?: PermissionsArgs<UserConfig>, force?: boolean) => void;
47
- type Cache = Record<string, {
48
- lastPermissions: Partial<Permissions>;
49
- lastData: ComponentData | null;
50
- }>;
51
- type PermissionsSlice = {
52
- cache: Cache;
53
- globalPermissions: Permissions;
54
- resolvedPermissions: Record<string, Partial<Permissions> | undefined>;
55
- getPermissions: GetPermissions<Config>;
56
- resolvePermissions: ResolvePermissions<Config>;
57
- refreshPermissions: RefreshPermissions<Config>;
58
- };
59
-
60
- type ComponentOrRootData = Omit<ComponentData<any>, "type">;
61
- type FieldsSlice = {
62
- fields: Fields | Partial<Fields>;
63
- loading: boolean;
64
- lastResolvedData: Partial<ComponentOrRootData>;
65
- id: string | undefined;
66
- };
67
-
68
- type Status = "LOADING" | "MOUNTED" | "READY";
69
- type ZoomConfig = {
70
- autoZoom: number;
71
- rootHeight: number;
72
- zoom: number;
73
- };
74
- type ComponentState = Record<string, {
75
- loadingCount: number;
76
- }>;
77
- type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
78
- state: G["UserAppState"];
79
- dispatch: (action: PuckAction) => void;
80
- config: UserConfig;
81
- componentState: ComponentState;
82
- setComponentState: (componentState: ComponentState) => void;
83
- setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void;
84
- unsetComponentLoading: (id: string) => void;
85
- pendingLoadTimeouts: Record<string, NodeJS.Timeout>;
86
- resolveComponentData: <T extends ComponentData | RootDataWithProps>(componentData: T, trigger: ResolveDataTrigger) => Promise<{
87
- node: T;
88
- didChange: boolean;
89
- }>;
90
- resolveAndCommitData: () => void;
91
- plugins: Plugin[];
92
- overrides: Partial<Overrides>;
93
- viewports: Viewports;
94
- zoomConfig: ZoomConfig;
95
- setZoomConfig: (zoomConfig: ZoomConfig) => void;
96
- status: Status;
97
- setStatus: (status: Status) => void;
98
- iframe: IframeConfig;
99
- selectedItem?: G["UserData"]["content"][0] | null;
100
- setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
101
- getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
102
- onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
103
- metadata: Metadata;
104
- fields: FieldsSlice;
105
- history: HistorySlice;
106
- nodes: NodesSlice;
107
- permissions: PermissionsSlice;
108
- fieldTransforms: FieldTransforms;
109
- };
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-jxA1wrW4.mjs';
8
+ import '@tiptap/react';
9
+ import '@tiptap/extension-blockquote';
10
+ import '@tiptap/extension-bold';
11
+ import '@tiptap/extension-code';
12
+ import '@tiptap/extension-code-block';
13
+ import '@tiptap/extension-hard-break';
14
+ import '@tiptap/extension-heading';
15
+ import '@tiptap/extension-horizontal-rule';
16
+ import '@tiptap/extension-italic';
17
+ import '@tiptap/extension-link';
18
+ import '@tiptap/extension-list';
19
+ import '@tiptap/extension-paragraph';
20
+ import '@tiptap/extension-strike';
21
+ import '@tiptap/extension-text-align';
22
+ import '@tiptap/extension-underline';
110
23
 
111
24
  declare const ActionBar: {
112
25
  ({ label, children, }: {
113
26
  label?: string;
114
27
  children?: ReactNode;
115
28
  }): react_jsx_runtime.JSX.Element;
116
- Action: ({ children, label, onClick, }: {
29
+ Action: ({ children, label, onClick, active, disabled, }: {
117
30
  children: ReactNode;
118
31
  label?: string;
119
32
  onClick: (e: SyntheticEvent) => void;
33
+ active?: boolean;
34
+ disabled?: boolean;
120
35
  }) => react_jsx_runtime.JSX.Element;
121
36
  Label: ({ label }: {
122
37
  label: string;
@@ -124,11 +39,14 @@ declare const ActionBar: {
124
39
  Group: ({ children }: {
125
40
  children: ReactNode;
126
41
  }) => react_jsx_runtime.JSX.Element;
42
+ Separator: () => react_jsx_runtime.JSX.Element;
127
43
  };
128
- declare const Action: ({ children, label, onClick, }: {
44
+ declare const Action: ({ children, label, onClick, active, disabled, }: {
129
45
  children: ReactNode;
130
46
  label?: string;
131
47
  onClick: (e: SyntheticEvent) => void;
48
+ active?: boolean;
49
+ disabled?: boolean;
132
50
  }) => react_jsx_runtime.JSX.Element;
133
51
  declare const Group: ({ children }: {
134
52
  children: ReactNode;
@@ -136,6 +54,7 @@ declare const Group: ({ children }: {
136
54
  declare const Label: ({ label }: {
137
55
  label: string;
138
56
  }) => react_jsx_runtime.JSX.Element;
57
+ declare const Separator: () => react_jsx_runtime.JSX.Element;
139
58
 
140
59
  declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
141
60
  children?: ReactNode;
@@ -145,8 +64,11 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
145
64
  readOnly?: boolean;
146
65
  className?: string;
147
66
  }) => react_jsx_runtime.JSX.Element;
67
+
148
68
  type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
149
- declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType>): react_jsx_runtime.JSX.Element | null;
69
+ declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<FieldType, ValueType> & {
70
+ value: any;
71
+ }): react_jsx_runtime.JSX.Element | null;
150
72
 
151
73
  declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: {
152
74
  children: ReactNode;
@@ -182,13 +104,13 @@ declare const Drawer: {
182
104
  }) => react_jsx_runtime.JSX.Element;
183
105
  };
184
106
 
185
- declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
107
+ declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
186
108
 
187
- declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
109
+ declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, }: {
110
+ active?: boolean;
188
111
  children: ReactNode;
189
112
  href?: string;
190
113
  onClick?: (e: SyntheticEvent) => void | Promise<void>;
191
- variant?: "primary" | "secondary";
192
114
  type?: "button" | "submit" | "reset";
193
115
  disabled?: boolean;
194
116
  tabIndex?: number;
@@ -251,6 +173,69 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
251
173
  metadata?: Metadata;
252
174
  }): react_jsx_runtime.JSX.Element;
253
175
 
176
+ declare function AlignLeft(): react_jsx_runtime.JSX.Element;
177
+
178
+ declare function AlignCenter(): react_jsx_runtime.JSX.Element;
179
+
180
+ declare function AlignRight(): react_jsx_runtime.JSX.Element;
181
+
182
+ declare function AlignJustify(): react_jsx_runtime.JSX.Element;
183
+
184
+ declare function Bold(): react_jsx_runtime.JSX.Element;
185
+
186
+ declare function Italic(): react_jsx_runtime.JSX.Element;
187
+
188
+ declare function Underline(): react_jsx_runtime.JSX.Element;
189
+
190
+ declare function Strikethrough(): react_jsx_runtime.JSX.Element;
191
+
192
+ declare function InlineCode(): react_jsx_runtime.JSX.Element;
193
+
194
+ declare function BulletList(): react_jsx_runtime.JSX.Element;
195
+
196
+ declare function OrderedList(): react_jsx_runtime.JSX.Element;
197
+
198
+ declare function CodeBlock(): react_jsx_runtime.JSX.Element;
199
+
200
+ declare function Blockquote(): react_jsx_runtime.JSX.Element;
201
+
202
+ declare function HorizontalRule(): react_jsx_runtime.JSX.Element;
203
+
204
+ declare function Control({ icon, disabled, active, onClick, title, }: {
205
+ icon: ReactNode;
206
+ disabled?: boolean;
207
+ active?: boolean;
208
+ onClick: (e: SyntheticEvent) => any;
209
+ title: string;
210
+ }): react_jsx_runtime.JSX.Element;
211
+
212
+ declare const RichTextMenu: {
213
+ ({ children }: {
214
+ children: ReactNode;
215
+ }): react_jsx_runtime.JSX.Element;
216
+ Group: ({ children }: {
217
+ children: ReactNode;
218
+ }) => react_jsx_runtime.JSX.Element;
219
+ Control: typeof Control;
220
+ AlignCenter: typeof AlignCenter;
221
+ AlignJustify: typeof AlignJustify;
222
+ AlignLeft: typeof AlignLeft;
223
+ AlignRight: typeof AlignRight;
224
+ AlignSelect: () => react_jsx_runtime.JSX.Element;
225
+ Blockquote: typeof Blockquote;
226
+ Bold: typeof Bold;
227
+ BulletList: typeof BulletList;
228
+ CodeBlock: typeof CodeBlock;
229
+ HeadingSelect: () => react_jsx_runtime.JSX.Element;
230
+ HorizontalRule: typeof HorizontalRule;
231
+ InlineCode: typeof InlineCode;
232
+ Italic: typeof Italic;
233
+ ListSelect: () => react_jsx_runtime.JSX.Element;
234
+ OrderedList: typeof OrderedList;
235
+ Strikethrough: typeof Strikethrough;
236
+ Underline: typeof Underline;
237
+ };
238
+
254
239
  declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
255
240
  disableDrag?: boolean;
256
241
  disableDragOnFocus?: boolean;
@@ -271,6 +256,7 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
271
256
  getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
272
257
  getItemById: (id: string) => G["UserComponentData"] | undefined;
273
258
  getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
259
+ getParentById: (id: string) => ComponentData | undefined;
274
260
  history: {
275
261
  back: HistorySlice["back"];
276
262
  forward: HistorySlice["forward"];
@@ -302,4 +288,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
302
288
  */
303
289
  declare function useGetPuck(): () => UsePuckStore<Config>;
304
290
 
305
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
291
+ export { Action, ActionBar, AutoField, Button, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };