@measured/puck 0.19.0-canary.8d459e4e → 0.19.0-canary.8e1d7223

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/index.css CHANGED
@@ -1092,27 +1092,25 @@ textarea._Input-input_4xor1_26 {
1092
1092
  }
1093
1093
 
1094
1094
  /* css-module:/home/runner/work/puck/puck/packages/core/components/Drawer/styles.module.css/#css-module-data */
1095
- ._Drawer_fkqfo_1 {
1095
+ ._Drawer_pl7z0_1 {
1096
1096
  display: flex;
1097
1097
  flex-direction: column;
1098
1098
  font-family: var(--puck-font-family);
1099
1099
  gap: 12px;
1100
1100
  }
1101
- ._Drawer-draggable_fkqfo_8 {
1101
+ ._Drawer-draggable_pl7z0_8 {
1102
1102
  position: relative;
1103
1103
  }
1104
- ._Drawer-draggableBg_fkqfo_12 {
1104
+ ._Drawer-draggableBg_pl7z0_12 {
1105
1105
  position: absolute;
1106
1106
  top: 0;
1107
1107
  right: 0;
1108
1108
  bottom: 0;
1109
1109
  left: 0;
1110
1110
  pointer-events: none;
1111
+ z-index: -1;
1111
1112
  }
1112
- ._Drawer-draggableFg_fkqfo_21 {
1113
- z-index: 1;
1114
- }
1115
- ._DrawerItem-draggable_fkqfo_25 {
1113
+ ._DrawerItem-draggable_pl7z0_22 {
1116
1114
  background: var(--puck-color-white);
1117
1115
  cursor: grab;
1118
1116
  padding: 12px;
@@ -1124,27 +1122,27 @@ textarea._Input-input_4xor1_26 {
1124
1122
  align-items: center;
1125
1123
  transition: background-color 50ms ease-in, color 50ms ease-in;
1126
1124
  }
1127
- ._DrawerItem--disabled_fkqfo_38 ._DrawerItem-draggable_fkqfo_25 {
1125
+ ._DrawerItem--disabled_pl7z0_35 ._DrawerItem-draggable_pl7z0_22 {
1128
1126
  background: var(--puck-color-grey-11);
1129
1127
  color: var(--puck-color-grey-05);
1130
1128
  cursor: not-allowed;
1131
1129
  }
1132
- ._DrawerItem_fkqfo_25:focus-visible {
1130
+ ._DrawerItem_pl7z0_22:focus-visible {
1133
1131
  outline: 0;
1134
1132
  }
1135
- ._Drawer_fkqfo_1:not(._Drawer--isDraggingFrom_fkqfo_48) ._DrawerItem_fkqfo_25:focus-visible ._DrawerItem-draggable_fkqfo_25 {
1133
+ ._Drawer_pl7z0_1:not(._Drawer--isDraggingFrom_pl7z0_45) ._DrawerItem_pl7z0_22:focus-visible ._DrawerItem-draggable_pl7z0_22 {
1136
1134
  border-radius: 4px;
1137
1135
  outline: 2px solid var(--puck-color-azure-05);
1138
1136
  outline-offset: 2px;
1139
1137
  }
1140
1138
  @media (hover: hover) and (pointer: fine) {
1141
- ._Drawer_fkqfo_1:not(._Drawer--isDraggingFrom_fkqfo_48) ._DrawerItem_fkqfo_25:not(._DrawerItem--disabled_fkqfo_38) ._DrawerItem-draggable_fkqfo_25:hover {
1139
+ ._Drawer_pl7z0_1:not(._Drawer--isDraggingFrom_pl7z0_45) ._DrawerItem_pl7z0_22:not(._DrawerItem--disabled_pl7z0_35) ._DrawerItem-draggable_pl7z0_22:hover {
1142
1140
  background-color: var(--puck-color-azure-12);
1143
1141
  color: var(--puck-color-azure-04);
1144
1142
  transition: none;
1145
1143
  }
1146
1144
  }
1147
- ._DrawerItem-name_fkqfo_66 {
1145
+ ._DrawerItem-name_pl7z0_63 {
1148
1146
  overflow-x: hidden;
1149
1147
  text-overflow: ellipsis;
1150
1148
  white-space: nowrap;
@@ -1236,7 +1234,7 @@ textarea._Input-input_4xor1_26 {
1236
1234
  [data-puck-disabled] {
1237
1235
  cursor: pointer;
1238
1236
  }
1239
- [data-puck-dragging]:not([data-dnd-dragging]) {
1237
+ [data-dnd-placeholder] {
1240
1238
  background: var(--puck-color-azure-06) !important;
1241
1239
  border: none !important;
1242
1240
  color: #00000000 !important;
@@ -1244,9 +1242,9 @@ textarea._Input-input_4xor1_26 {
1244
1242
  outline: none !important;
1245
1243
  transition: none !important;
1246
1244
  }
1247
- [data-puck-dragging]:not([data-dnd-dragging]) *,
1248
- [data-puck-dragging]:not([data-dnd-dragging])::after,
1249
- [data-puck-dragging]:not([data-dnd-dragging])::before {
1245
+ [data-dnd-placeholder] *,
1246
+ [data-dnd-placeholder]::after,
1247
+ [data-dnd-placeholder]::before {
1250
1248
  opacity: 0 !important;
1251
1249
  }
1252
1250
  [data-dnd-dragging][data-puck-component] {
@@ -1256,7 +1254,7 @@ textarea._Input-input_4xor1_26 {
1256
1254
  }
1257
1255
 
1258
1256
  /* css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css/#css-module-data */
1259
- ._DropZone_3dmev_1 {
1257
+ ._DropZone_1i2sv_1 {
1260
1258
  --resize-animation-ms: 150ms;
1261
1259
  position: relative;
1262
1260
  height: 100%;
@@ -1264,47 +1262,47 @@ textarea._Input-input_4xor1_26 {
1264
1262
  outline-offset: -2px;
1265
1263
  width: 100%;
1266
1264
  }
1267
- ._DropZone--hasChildren_3dmev_11 {
1265
+ ._DropZone--hasChildren_1i2sv_11 {
1268
1266
  min-height: 0;
1269
1267
  }
1270
- ._DropZone_3dmev_1:empty {
1268
+ ._DropZone_1i2sv_1:empty {
1271
1269
  min-height: var(--min-empty-height);
1272
1270
  }
1273
- ._DropZone_3dmev_1:not(._DropZone--userIsDragging_3dmev_19) {
1271
+ [data-puck-entry]:not([data-puck-dragging]) ._DropZone_1i2sv_1 {
1274
1272
  transition: min-height var(--resize-animation-ms) ease-in;
1275
1273
  }
1276
- ._DropZone--isAreaSelected_3dmev_23,
1277
- ._DropZone--hoveringOverArea_3dmev_24:not(._DropZone--isRootZone_3dmev_24) {
1274
+ ._DropZone--isAreaSelected_1i2sv_24,
1275
+ ._DropZone--hoveringOverArea_1i2sv_25:not(._DropZone--isRootZone_1i2sv_25) {
1278
1276
  background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
1279
1277
  outline: 2px dashed var(--puck-color-azure-08);
1280
1278
  }
1281
- ._DropZone_3dmev_1:empty {
1279
+ ._DropZone_1i2sv_1:empty {
1282
1280
  background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
1283
1281
  outline: 2px dashed var(--puck-color-azure-08);
1284
1282
  }
1285
- ._DropZone--isDestination_3dmev_34 {
1283
+ ._DropZone--isDestination_1i2sv_35 {
1286
1284
  outline: 2px dashed var(--puck-color-azure-04) !important;
1287
1285
  }
1288
- ._DropZone--isDestination_3dmev_34:not(._DropZone--isRootZone_3dmev_24) {
1286
+ ._DropZone--isDestination_1i2sv_35:not(._DropZone--isRootZone_1i2sv_25) {
1289
1287
  background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent) !important;
1290
1288
  }
1291
- ._DropZone-item_3dmev_46 {
1289
+ ._DropZone-item_1i2sv_47 {
1292
1290
  position: relative;
1293
1291
  }
1294
- ._DropZone-hitbox_3dmev_50 {
1292
+ ._DropZone-hitbox_1i2sv_51 {
1295
1293
  position: absolute;
1296
1294
  bottom: -12px;
1297
1295
  height: 24px;
1298
1296
  width: 100%;
1299
1297
  z-index: 1;
1300
1298
  }
1301
- ._DropZone--isEnabled_3dmev_58._DropZone--userIsDragging_3dmev_19 {
1299
+ [data-puck-dragging] ._DropZone--isEnabled_1i2sv_59 {
1302
1300
  outline: 2px dashed var(--puck-color-azure-06);
1303
1301
  }
1304
- ._DropZone_3dmev_1 > *:not([data-puck-component]) {
1302
+ ._DropZone_1i2sv_1 > *:not([data-puck-component]) {
1305
1303
  opacity: 0;
1306
1304
  }
1307
- body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
1305
+ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1308
1306
  opacity: 0 !important;
1309
1307
  }
1310
1308
 
@@ -1394,60 +1392,16 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
1394
1392
  opacity: 0.8;
1395
1393
  }
1396
1394
 
1397
- /* css-module:/home/runner/work/puck/puck/packages/core/components/MenuBar/styles.module.css/#css-module-data */
1398
- ._MenuBar_8pf8c_1 {
1399
- background-color: var(--puck-color-white);
1400
- border-bottom: 1px solid var(--puck-color-grey-09);
1401
- display: none;
1402
- left: 0;
1403
- margin-top: 1px;
1404
- padding: 8px 16px;
1405
- position: absolute;
1406
- right: 0;
1407
- top: 100%;
1408
- z-index: 2;
1409
- }
1410
- ._MenuBar--menuOpen_8pf8c_14 {
1411
- display: block;
1412
- }
1413
- @media (min-width: 638px) {
1414
- ._MenuBar_8pf8c_1 {
1415
- border: none;
1416
- display: block;
1417
- margin-top: 0;
1418
- overflow-y: visible;
1419
- padding: 0;
1420
- position: static;
1421
- }
1422
- }
1423
- ._MenuBar-inner_8pf8c_29 {
1424
- align-items: center;
1425
- display: flex;
1426
- flex-wrap: wrap;
1427
- gap: 8px 16px;
1428
- justify-content: flex-end;
1429
- }
1430
- @media (min-width: 638px) {
1431
- ._MenuBar-inner_8pf8c_29 {
1432
- display: flex;
1433
- flex-direction: row;
1434
- flex-wrap: nowrap;
1435
- }
1436
- }
1437
- ._MenuBar-history_8pf8c_45 {
1438
- display: flex;
1439
- }
1440
-
1441
1395
  /* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css/#css-module-data */
1442
- ._Puck_11o75_19 {
1396
+ ._Puck_mc1k2_19 {
1443
1397
  --puck-space-px: 16px;
1444
1398
  font-family: var(--puck-font-family);
1445
1399
  }
1446
- ._Puck-portal_11o75_24 {
1400
+ ._Puck-portal_mc1k2_24 {
1447
1401
  position: relative;
1448
1402
  z-index: 2;
1449
1403
  }
1450
- ._PuckLayout-inner_11o75_31 {
1404
+ ._PuckLayout-inner_mc1k2_31 {
1451
1405
  --puck-frame-width: auto;
1452
1406
  --puck-side-bar-width: 0px;
1453
1407
  display: grid;
@@ -1458,107 +1412,54 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
1458
1412
  position: relative;
1459
1413
  z-index: 0;
1460
1414
  }
1461
- ._PuckLayout--mounted_11o75_43 ._PuckLayout-inner_11o75_31 {
1415
+ ._PuckLayout--mounted_mc1k2_43 ._PuckLayout-inner_mc1k2_31 {
1462
1416
  --puck-side-bar-width: 186px;
1463
1417
  }
1464
- ._PuckLayout--leftSideBarVisible_11o75_47 ._PuckLayout-inner_11o75_31 {
1418
+ ._PuckLayout--leftSideBarVisible_mc1k2_47 ._PuckLayout-inner_mc1k2_31 {
1465
1419
  grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) 0;
1466
1420
  }
1467
- ._PuckLayout--rightSideBarVisible_11o75_53 ._PuckLayout-inner_11o75_31 {
1421
+ ._PuckLayout--rightSideBarVisible_mc1k2_53 ._PuckLayout-inner_mc1k2_31 {
1468
1422
  grid-template-columns: 0 var(--puck-frame-width) var(--puck-side-bar-width);
1469
1423
  }
1470
- ._PuckLayout--leftSideBarVisible_11o75_47._PuckLayout--rightSideBarVisible_11o75_53 ._PuckLayout-inner_11o75_31 {
1424
+ ._PuckLayout--leftSideBarVisible_mc1k2_47._PuckLayout--rightSideBarVisible_mc1k2_53 ._PuckLayout-inner_mc1k2_31 {
1471
1425
  grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) var(--puck-side-bar-width);
1472
1426
  }
1473
1427
  @media (min-width: 458px) {
1474
- ._PuckLayout-mounted_11o75_67 ._PuckLayout-inner_11o75_31 {
1428
+ ._PuckLayout-mounted_mc1k2_67 ._PuckLayout-inner_mc1k2_31 {
1475
1429
  --puck-frame-width: minmax(266px, auto);
1476
1430
  }
1477
1431
  }
1478
1432
  @media (min-width: 638px) {
1479
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1433
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1480
1434
  --puck-side-bar-width: minmax(186px, 250px);
1481
1435
  }
1482
1436
  }
1483
1437
  @media (min-width: 766px) {
1484
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1438
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1485
1439
  --puck-frame-width: auto;
1486
1440
  }
1487
1441
  }
1488
1442
  @media (min-width: 990px) {
1489
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1443
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1490
1444
  --puck-side-bar-width: 256px;
1491
1445
  }
1492
1446
  }
1493
1447
  @media (min-width: 1198px) {
1494
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1448
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1495
1449
  --puck-side-bar-width: 274px;
1496
1450
  }
1497
1451
  }
1498
1452
  @media (min-width: 1398px) {
1499
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1453
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1500
1454
  --puck-side-bar-width: 290px;
1501
1455
  }
1502
1456
  }
1503
1457
  @media (min-width: 1598px) {
1504
- ._PuckLayout_11o75_31 ._PuckLayout-inner_11o75_31 {
1458
+ ._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
1505
1459
  --puck-side-bar-width: 320px;
1506
1460
  }
1507
1461
  }
1508
- ._PuckLayout-header_11o75_108 {
1509
- background: var(--puck-color-white);
1510
- border-bottom: 1px solid var(--puck-color-grey-09);
1511
- color: var(--puck-color-black);
1512
- grid-area: header;
1513
- position: relative;
1514
- max-width: 100vw;
1515
- }
1516
- ._PuckLayout-headerInner_11o75_117 {
1517
- align-items: end;
1518
- display: grid;
1519
- gap: var(--puck-space-px);
1520
- grid-template-areas: "left middle right";
1521
- grid-template-columns: 1fr auto 1fr;
1522
- grid-template-rows: auto;
1523
- padding: var(--puck-space-px);
1524
- }
1525
- ._PuckLayout-headerToggle_11o75_127 {
1526
- color: var(--puck-color-grey-05);
1527
- display: flex;
1528
- margin-inline-start: -4px;
1529
- padding-top: 2px;
1530
- }
1531
- ._PuckLayout--rightSideBarVisible_11o75_53 ._PuckLayout-rightSideBarToggle_11o75_134,
1532
- ._PuckLayout--leftSideBarVisible_11o75_47 ._PuckLayout-leftSideBarToggle_11o75_135 {
1533
- color: var(--puck-color-black);
1534
- }
1535
- ._PuckLayout-headerTitle_11o75_139 {
1536
- align-self: center;
1537
- }
1538
- ._PuckLayout-headerPath_11o75_143 {
1539
- font-family: var(--puck-font-family-monospaced);
1540
- font-size: var(--puck-font-size-xxs);
1541
- font-weight: normal;
1542
- word-break: break-all;
1543
- }
1544
- ._PuckLayout-headerTools_11o75_150 {
1545
- display: flex;
1546
- gap: 16px;
1547
- justify-content: flex-end;
1548
- }
1549
- ._PuckLayout-menuButton_11o75_156 {
1550
- color: var(--puck-color-grey-05);
1551
- margin-inline-start: -4px;
1552
- }
1553
- ._PuckLayout--menuOpen_11o75_161 ._PuckLayout-menuButton_11o75_156 {
1554
- color: var(--puck-color-black);
1555
- }
1556
- @media (min-width: 638px) {
1557
- ._PuckLayout-menuButton_11o75_156 {
1558
- display: none;
1559
- }
1560
- }
1561
- ._PuckLayout-leftSideBar_11o75_135 {
1462
+ ._PuckLayout-leftSideBar_mc1k2_108 {
1562
1463
  background: var(--puck-color-grey-12);
1563
1464
  border-inline-end: 1px solid var(--puck-color-grey-09);
1564
1465
  display: flex;
@@ -1566,7 +1467,7 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
1566
1467
  grid-area: left;
1567
1468
  overflow-y: auto;
1568
1469
  }
1569
- ._PuckLayout-rightSideBar_11o75_134 {
1470
+ ._PuckLayout-rightSideBar_mc1k2_117 {
1570
1471
  background: var(--puck-color-white);
1571
1472
  border-inline-start: 1px solid var(--puck-color-grey-09);
1572
1473
  display: flex;
@@ -1886,3 +1787,102 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
1886
1787
  height: 0;
1887
1788
  transition: none;
1888
1789
  }
1790
+
1791
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/MenuBar/styles.module.css/#css-module-data */
1792
+ ._MenuBar_8pf8c_1 {
1793
+ background-color: var(--puck-color-white);
1794
+ border-bottom: 1px solid var(--puck-color-grey-09);
1795
+ display: none;
1796
+ left: 0;
1797
+ margin-top: 1px;
1798
+ padding: 8px 16px;
1799
+ position: absolute;
1800
+ right: 0;
1801
+ top: 100%;
1802
+ z-index: 2;
1803
+ }
1804
+ ._MenuBar--menuOpen_8pf8c_14 {
1805
+ display: block;
1806
+ }
1807
+ @media (min-width: 638px) {
1808
+ ._MenuBar_8pf8c_1 {
1809
+ border: none;
1810
+ display: block;
1811
+ margin-top: 0;
1812
+ overflow-y: visible;
1813
+ padding: 0;
1814
+ position: static;
1815
+ }
1816
+ }
1817
+ ._MenuBar-inner_8pf8c_29 {
1818
+ align-items: center;
1819
+ display: flex;
1820
+ flex-wrap: wrap;
1821
+ gap: 8px 16px;
1822
+ justify-content: flex-end;
1823
+ }
1824
+ @media (min-width: 638px) {
1825
+ ._MenuBar-inner_8pf8c_29 {
1826
+ display: flex;
1827
+ flex-direction: row;
1828
+ flex-wrap: nowrap;
1829
+ }
1830
+ }
1831
+ ._MenuBar-history_8pf8c_45 {
1832
+ display: flex;
1833
+ }
1834
+
1835
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Header/styles.module.css/#css-module-data */
1836
+ ._PuckHeader_15xnq_1 {
1837
+ background: var(--puck-color-white);
1838
+ border-bottom: 1px solid var(--puck-color-grey-09);
1839
+ color: var(--puck-color-black);
1840
+ grid-area: header;
1841
+ position: relative;
1842
+ max-width: 100vw;
1843
+ }
1844
+ ._PuckHeader-inner_15xnq_10 {
1845
+ align-items: end;
1846
+ display: grid;
1847
+ gap: var(--puck-space-px);
1848
+ grid-template-areas: "left middle right";
1849
+ grid-template-columns: 1fr auto 1fr;
1850
+ grid-template-rows: auto;
1851
+ padding: var(--puck-space-px);
1852
+ }
1853
+ ._PuckHeader-toggle_15xnq_20 {
1854
+ color: var(--puck-color-grey-05);
1855
+ display: flex;
1856
+ margin-inline-start: -4px;
1857
+ padding-top: 2px;
1858
+ }
1859
+ ._PuckHeader--rightSideBarVisible_15xnq_27 ._PuckHeader-rightSideBarToggle_15xnq_27,
1860
+ ._PuckHeader--leftSideBarVisible_15xnq_28 ._PuckHeader-leftSideBarToggle_15xnq_28 {
1861
+ color: var(--puck-color-black);
1862
+ }
1863
+ ._PuckHeader-title_15xnq_32 {
1864
+ align-self: center;
1865
+ }
1866
+ ._PuckHeader-path_15xnq_36 {
1867
+ font-family: var(--puck-font-family-monospaced);
1868
+ font-size: var(--puck-font-size-xxs);
1869
+ font-weight: normal;
1870
+ word-break: break-all;
1871
+ }
1872
+ ._PuckHeader-tools_15xnq_43 {
1873
+ display: flex;
1874
+ gap: 16px;
1875
+ justify-content: flex-end;
1876
+ }
1877
+ ._PuckHeader-menuButton_15xnq_49 {
1878
+ color: var(--puck-color-grey-05);
1879
+ margin-inline-start: -4px;
1880
+ }
1881
+ ._PuckHeader--menuOpen_15xnq_54 ._PuckHeader-menuButton_15xnq_49 {
1882
+ color: var(--puck-color-black);
1883
+ }
1884
+ @media (min-width: 638px) {
1885
+ ._PuckHeader-menuButton_15xnq_49 {
1886
+ display: none;
1887
+ }
1888
+ }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as History, P as Permissions, C as ComponentData, a 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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as RootData, m as Content, n as ItemSelector } from './resolve-all-data-DtB0OZRl.mjs';
2
- export { X as Adaptor, Q as ArrayField, v as ArrayState, a8 as AsFieldProps, B as BaseData, G as BaseField, E as ComponentDataMap, $ as CustomField, _ as CustomFieldRender, a5 as DefaultComponentProps, a2 as DefaultRootFieldProps, a4 as DefaultRootProps, a3 as DefaultRootRenderProps, o as Direction, p as DragAxis, Z as ExternalField, Y as ExternalFieldWithAdaptor, aa as ExtractPropsFromConfig, ab as ExtractRootPropsFromConfig, t as FieldRenderFunctions, u as ItemWithId, z as MappedItem, N as NumberField, W as ObjectField, s as OverrideKey, w as PuckComponent, a1 as PuckContext, L as RadioField, x as RootConfig, y as RootDataWithoutProps, K as SelectField, S as Slot, a0 as SlotField, T as TextField, J as TextareaField, q as Viewport, a9 as WithChildren, a6 as WithId, a7 as WithPuckProps, r as overrideKeys, ad as resolveAllData, ac as transformProps } from './resolve-all-data-DtB0OZRl.mjs';
1
+ import { H as History, P as Permissions, C as ComponentData, a 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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-DBd3aQ_5.mjs';
2
+ export { _ as Adaptor, Y as ArrayField, t as ArrayState, ab as AsFieldProps, B as BaseData, K as BaseField, G as ComponentDataMap, z as ComponentDataOptionalId, J as Content, a2 as CustomField, a1 as CustomFieldRender, a8 as DefaultComponentProps, a5 as DefaultRootFieldProps, a7 as DefaultRootProps, a6 as DefaultRootRenderProps, m as Direction, n as DragAxis, a0 as ExternalField, $ as ExternalFieldWithAdaptor, ad as ExtractPropsFromConfig, ae as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, E as MappedItem, N as NumberField, Z as ObjectField, q as OverrideKey, u as PuckComponent, a4 as PuckContext, X as RadioField, v as RootConfig, y as RootData, x as RootDataWithoutProps, Q as SelectField, S as Slot, a3 as SlotField, T as TextField, L as TextareaField, o as Viewport, ac as WithChildren, a9 as WithId, aa as WithPuckProps, W as WithSlotProps, af as migrate, p as overrideKeys, ah as resolveAllData, ag as transformProps, w as walkTree } from './walk-tree-DBd3aQ_5.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -22,6 +22,8 @@ type HistorySlice<D = any> = {
22
22
 
23
23
  type NodeMethods = {
24
24
  sync: () => void;
25
+ hideOverlay: () => void;
26
+ showOverlay: () => void;
25
27
  };
26
28
  type PuckNodeInstance = {
27
29
  id: string;
@@ -60,6 +62,7 @@ type FieldsSlice = {
60
62
  fields: Fields | Partial<Fields>;
61
63
  loading: boolean;
62
64
  lastResolvedData: Partial<ComponentOrRootData>;
65
+ id: string | undefined;
63
66
  };
64
67
 
65
68
  type Status = "LOADING" | "MOUNTED" | "READY";
@@ -226,9 +229,9 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
226
229
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
227
230
  declare namespace Puck {
228
231
  var Components: () => react_jsx_runtime.JSX.Element;
229
- var Fields: ({ wrapFields }: {
232
+ var Fields: react.MemoExoticComponent<({ wrapFields }: {
230
233
  wrapFields?: boolean;
231
- }) => react_jsx_runtime.JSX.Element;
234
+ }) => react_jsx_runtime.JSX.Element>;
232
235
  var Outline: () => react_jsx_runtime.JSX.Element;
233
236
  var Preview: ({ id }: {
234
237
  id?: string;
@@ -246,14 +249,6 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
246
249
  metadata?: Metadata;
247
250
  }): react_jsx_runtime.JSX.Element;
248
251
 
249
- declare function migrate(data: Data, config?: Config): Data;
250
-
251
- type WalkTreeOptions = {
252
- parentId: string;
253
- propName: string;
254
- };
255
- declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
256
-
257
252
  type WithGet<T> = T & {
258
253
  get: () => T;
259
254
  };
@@ -291,5 +286,11 @@ type UsePuckStore<UserConfig extends Config = Config> = WithGet<PuckApi<UserConf
291
286
  */
292
287
  declare function createUsePuck<UserConfig extends Config = Config>(): <T = PuckApi<UserConfig>>(selector: (state: UsePuckStore<UserConfig>) => T) => T;
293
288
  declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<UserConfig>;
289
+ /**
290
+ * Get the latest state without relying on a render
291
+ *
292
+ * @returns PuckApi
293
+ */
294
+ declare function useGetPuck(): () => UsePuckStore<Config>;
294
295
 
295
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Content, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootData, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, migrate, renderContext, usePuck, walkTree };
296
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, renderContext, useGetPuck, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as History, P as Permissions, C as ComponentData, a 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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as RootData, m as Content, n as ItemSelector } from './resolve-all-data-DtB0OZRl.js';
2
- export { X as Adaptor, Q as ArrayField, v as ArrayState, a8 as AsFieldProps, B as BaseData, G as BaseField, E as ComponentDataMap, $ as CustomField, _ as CustomFieldRender, a5 as DefaultComponentProps, a2 as DefaultRootFieldProps, a4 as DefaultRootProps, a3 as DefaultRootRenderProps, o as Direction, p as DragAxis, Z as ExternalField, Y as ExternalFieldWithAdaptor, aa as ExtractPropsFromConfig, ab as ExtractRootPropsFromConfig, t as FieldRenderFunctions, u as ItemWithId, z as MappedItem, N as NumberField, W as ObjectField, s as OverrideKey, w as PuckComponent, a1 as PuckContext, L as RadioField, x as RootConfig, y as RootDataWithoutProps, K as SelectField, S as Slot, a0 as SlotField, T as TextField, J as TextareaField, q as Viewport, a9 as WithChildren, a6 as WithId, a7 as WithPuckProps, r as overrideKeys, ad as resolveAllData, ac as transformProps } from './resolve-all-data-DtB0OZRl.js';
1
+ import { H as History, P as Permissions, C as ComponentData, a 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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-DBd3aQ_5.js';
2
+ export { _ as Adaptor, Y as ArrayField, t as ArrayState, ab as AsFieldProps, B as BaseData, K as BaseField, G as ComponentDataMap, z as ComponentDataOptionalId, J as Content, a2 as CustomField, a1 as CustomFieldRender, a8 as DefaultComponentProps, a5 as DefaultRootFieldProps, a7 as DefaultRootProps, a6 as DefaultRootRenderProps, m as Direction, n as DragAxis, a0 as ExternalField, $ as ExternalFieldWithAdaptor, ad as ExtractPropsFromConfig, ae as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, E as MappedItem, N as NumberField, Z as ObjectField, q as OverrideKey, u as PuckComponent, a4 as PuckContext, X as RadioField, v as RootConfig, y as RootData, x as RootDataWithoutProps, Q as SelectField, S as Slot, a3 as SlotField, T as TextField, L as TextareaField, o as Viewport, ac as WithChildren, a9 as WithId, aa as WithPuckProps, W as WithSlotProps, af as migrate, p as overrideKeys, ah as resolveAllData, ag as transformProps, w as walkTree } from './walk-tree-DBd3aQ_5.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -22,6 +22,8 @@ type HistorySlice<D = any> = {
22
22
 
23
23
  type NodeMethods = {
24
24
  sync: () => void;
25
+ hideOverlay: () => void;
26
+ showOverlay: () => void;
25
27
  };
26
28
  type PuckNodeInstance = {
27
29
  id: string;
@@ -60,6 +62,7 @@ type FieldsSlice = {
60
62
  fields: Fields | Partial<Fields>;
61
63
  loading: boolean;
62
64
  lastResolvedData: Partial<ComponentOrRootData>;
65
+ id: string | undefined;
63
66
  };
64
67
 
65
68
  type Status = "LOADING" | "MOUNTED" | "READY";
@@ -226,9 +229,9 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
226
229
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
227
230
  declare namespace Puck {
228
231
  var Components: () => react_jsx_runtime.JSX.Element;
229
- var Fields: ({ wrapFields }: {
232
+ var Fields: react.MemoExoticComponent<({ wrapFields }: {
230
233
  wrapFields?: boolean;
231
- }) => react_jsx_runtime.JSX.Element;
234
+ }) => react_jsx_runtime.JSX.Element>;
232
235
  var Outline: () => react_jsx_runtime.JSX.Element;
233
236
  var Preview: ({ id }: {
234
237
  id?: string;
@@ -246,14 +249,6 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
246
249
  metadata?: Metadata;
247
250
  }): react_jsx_runtime.JSX.Element;
248
251
 
249
- declare function migrate(data: Data, config?: Config): Data;
250
-
251
- type WalkTreeOptions = {
252
- parentId: string;
253
- propName: string;
254
- };
255
- declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
256
-
257
252
  type WithGet<T> = T & {
258
253
  get: () => T;
259
254
  };
@@ -291,5 +286,11 @@ type UsePuckStore<UserConfig extends Config = Config> = WithGet<PuckApi<UserConf
291
286
  */
292
287
  declare function createUsePuck<UserConfig extends Config = Config>(): <T = PuckApi<UserConfig>>(selector: (state: UsePuckStore<UserConfig>) => T) => T;
293
288
  declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<UserConfig>;
289
+ /**
290
+ * Get the latest state without relying on a render
291
+ *
292
+ * @returns PuckApi
293
+ */
294
+ declare function useGetPuck(): () => UsePuckStore<Config>;
294
295
 
295
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Content, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootData, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, migrate, renderContext, usePuck, walkTree };
296
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, renderContext, useGetPuck, usePuck };