@measured/puck 0.19.0-canary.5bf4fccf → 0.19.0-canary.61865257
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-COT3ZFIM.mjs → chunk-GL73J54P.mjs} +334 -31
- package/dist/index.css +133 -131
- package/dist/index.d.mts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +950 -1072
- package/dist/index.mjs +865 -1303
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +331 -34
- package/dist/rsc.mjs +3 -1
- package/dist/{walk-tree-CM-cu7GU.d.mts → walk-tree-DOB5QZVq.d.mts} +9 -7
- package/dist/{walk-tree-CM-cu7GU.d.ts → walk-tree-DOB5QZVq.d.ts} +9 -7
- package/package.json +3 -3
package/dist/index.css
CHANGED
@@ -1234,7 +1234,7 @@ textarea._Input-input_4xor1_26 {
|
|
1234
1234
|
[data-puck-disabled] {
|
1235
1235
|
cursor: pointer;
|
1236
1236
|
}
|
1237
|
-
[data-
|
1237
|
+
[data-dnd-placeholder] {
|
1238
1238
|
background: var(--puck-color-azure-06) !important;
|
1239
1239
|
border: none !important;
|
1240
1240
|
color: #00000000 !important;
|
@@ -1242,9 +1242,9 @@ textarea._Input-input_4xor1_26 {
|
|
1242
1242
|
outline: none !important;
|
1243
1243
|
transition: none !important;
|
1244
1244
|
}
|
1245
|
-
[data-
|
1246
|
-
[data-
|
1247
|
-
[data-
|
1245
|
+
[data-dnd-placeholder] *,
|
1246
|
+
[data-dnd-placeholder]::after,
|
1247
|
+
[data-dnd-placeholder]::before {
|
1248
1248
|
opacity: 0 !important;
|
1249
1249
|
}
|
1250
1250
|
[data-dnd-dragging][data-puck-component] {
|
@@ -1254,7 +1254,7 @@ textarea._Input-input_4xor1_26 {
|
|
1254
1254
|
}
|
1255
1255
|
|
1256
1256
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css/#css-module-data */
|
1257
|
-
.
|
1257
|
+
._DropZone_1i2sv_1 {
|
1258
1258
|
--resize-animation-ms: 150ms;
|
1259
1259
|
position: relative;
|
1260
1260
|
height: 100%;
|
@@ -1262,47 +1262,47 @@ textarea._Input-input_4xor1_26 {
|
|
1262
1262
|
outline-offset: -2px;
|
1263
1263
|
width: 100%;
|
1264
1264
|
}
|
1265
|
-
._DropZone--
|
1265
|
+
._DropZone--hasChildren_1i2sv_11 {
|
1266
1266
|
min-height: 0;
|
1267
1267
|
}
|
1268
|
-
.
|
1268
|
+
._DropZone_1i2sv_1:empty {
|
1269
1269
|
min-height: var(--min-empty-height);
|
1270
1270
|
}
|
1271
|
-
|
1271
|
+
[data-puck-entry]:not([data-puck-dragging]) ._DropZone_1i2sv_1 {
|
1272
1272
|
transition: min-height var(--resize-animation-ms) ease-in;
|
1273
1273
|
}
|
1274
|
-
._DropZone--
|
1275
|
-
._DropZone--
|
1274
|
+
._DropZone--isAreaSelected_1i2sv_24,
|
1275
|
+
._DropZone--hoveringOverArea_1i2sv_25:not(._DropZone--isRootZone_1i2sv_25) {
|
1276
1276
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1277
1277
|
outline: 2px dashed var(--puck-color-azure-08);
|
1278
1278
|
}
|
1279
|
-
.
|
1279
|
+
._DropZone_1i2sv_1:empty {
|
1280
1280
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1281
1281
|
outline: 2px dashed var(--puck-color-azure-08);
|
1282
1282
|
}
|
1283
|
-
._DropZone--
|
1283
|
+
._DropZone--isDestination_1i2sv_35 {
|
1284
1284
|
outline: 2px dashed var(--puck-color-azure-04) !important;
|
1285
1285
|
}
|
1286
|
-
._DropZone--
|
1286
|
+
._DropZone--isDestination_1i2sv_35:not(._DropZone--isRootZone_1i2sv_25) {
|
1287
1287
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent) !important;
|
1288
1288
|
}
|
1289
|
-
._DropZone-
|
1289
|
+
._DropZone-item_1i2sv_47 {
|
1290
1290
|
position: relative;
|
1291
1291
|
}
|
1292
|
-
._DropZone-
|
1292
|
+
._DropZone-hitbox_1i2sv_51 {
|
1293
1293
|
position: absolute;
|
1294
1294
|
bottom: -12px;
|
1295
1295
|
height: 24px;
|
1296
1296
|
width: 100%;
|
1297
1297
|
z-index: 1;
|
1298
1298
|
}
|
1299
|
-
._DropZone--
|
1299
|
+
[data-puck-dragging] ._DropZone--isEnabled_1i2sv_59 {
|
1300
1300
|
outline: 2px dashed var(--puck-color-azure-06);
|
1301
1301
|
}
|
1302
|
-
.
|
1302
|
+
._DropZone_1i2sv_1 > *:not([data-puck-component]) {
|
1303
1303
|
opacity: 0;
|
1304
1304
|
}
|
1305
|
-
body:has(._DropZone--
|
1305
|
+
body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
|
1306
1306
|
opacity: 0 !important;
|
1307
1307
|
}
|
1308
1308
|
|
@@ -1392,60 +1392,16 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
|
|
1392
1392
|
opacity: 0.8;
|
1393
1393
|
}
|
1394
1394
|
|
1395
|
-
/* css-module:/home/runner/work/puck/puck/packages/core/components/MenuBar/styles.module.css/#css-module-data */
|
1396
|
-
._MenuBar_8pf8c_1 {
|
1397
|
-
background-color: var(--puck-color-white);
|
1398
|
-
border-bottom: 1px solid var(--puck-color-grey-09);
|
1399
|
-
display: none;
|
1400
|
-
left: 0;
|
1401
|
-
margin-top: 1px;
|
1402
|
-
padding: 8px 16px;
|
1403
|
-
position: absolute;
|
1404
|
-
right: 0;
|
1405
|
-
top: 100%;
|
1406
|
-
z-index: 2;
|
1407
|
-
}
|
1408
|
-
._MenuBar--menuOpen_8pf8c_14 {
|
1409
|
-
display: block;
|
1410
|
-
}
|
1411
|
-
@media (min-width: 638px) {
|
1412
|
-
._MenuBar_8pf8c_1 {
|
1413
|
-
border: none;
|
1414
|
-
display: block;
|
1415
|
-
margin-top: 0;
|
1416
|
-
overflow-y: visible;
|
1417
|
-
padding: 0;
|
1418
|
-
position: static;
|
1419
|
-
}
|
1420
|
-
}
|
1421
|
-
._MenuBar-inner_8pf8c_29 {
|
1422
|
-
align-items: center;
|
1423
|
-
display: flex;
|
1424
|
-
flex-wrap: wrap;
|
1425
|
-
gap: 8px 16px;
|
1426
|
-
justify-content: flex-end;
|
1427
|
-
}
|
1428
|
-
@media (min-width: 638px) {
|
1429
|
-
._MenuBar-inner_8pf8c_29 {
|
1430
|
-
display: flex;
|
1431
|
-
flex-direction: row;
|
1432
|
-
flex-wrap: nowrap;
|
1433
|
-
}
|
1434
|
-
}
|
1435
|
-
._MenuBar-history_8pf8c_45 {
|
1436
|
-
display: flex;
|
1437
|
-
}
|
1438
|
-
|
1439
1395
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css/#css-module-data */
|
1440
|
-
.
|
1396
|
+
._Puck_mc1k2_19 {
|
1441
1397
|
--puck-space-px: 16px;
|
1442
1398
|
font-family: var(--puck-font-family);
|
1443
1399
|
}
|
1444
|
-
._Puck-
|
1400
|
+
._Puck-portal_mc1k2_24 {
|
1445
1401
|
position: relative;
|
1446
1402
|
z-index: 2;
|
1447
1403
|
}
|
1448
|
-
._PuckLayout-
|
1404
|
+
._PuckLayout-inner_mc1k2_31 {
|
1449
1405
|
--puck-frame-width: auto;
|
1450
1406
|
--puck-side-bar-width: 0px;
|
1451
1407
|
display: grid;
|
@@ -1456,107 +1412,54 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
|
|
1456
1412
|
position: relative;
|
1457
1413
|
z-index: 0;
|
1458
1414
|
}
|
1459
|
-
._PuckLayout--
|
1415
|
+
._PuckLayout--mounted_mc1k2_43 ._PuckLayout-inner_mc1k2_31 {
|
1460
1416
|
--puck-side-bar-width: 186px;
|
1461
1417
|
}
|
1462
|
-
._PuckLayout--
|
1418
|
+
._PuckLayout--leftSideBarVisible_mc1k2_47 ._PuckLayout-inner_mc1k2_31 {
|
1463
1419
|
grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) 0;
|
1464
1420
|
}
|
1465
|
-
._PuckLayout--
|
1421
|
+
._PuckLayout--rightSideBarVisible_mc1k2_53 ._PuckLayout-inner_mc1k2_31 {
|
1466
1422
|
grid-template-columns: 0 var(--puck-frame-width) var(--puck-side-bar-width);
|
1467
1423
|
}
|
1468
|
-
._PuckLayout--
|
1424
|
+
._PuckLayout--leftSideBarVisible_mc1k2_47._PuckLayout--rightSideBarVisible_mc1k2_53 ._PuckLayout-inner_mc1k2_31 {
|
1469
1425
|
grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) var(--puck-side-bar-width);
|
1470
1426
|
}
|
1471
1427
|
@media (min-width: 458px) {
|
1472
|
-
._PuckLayout-
|
1428
|
+
._PuckLayout-mounted_mc1k2_67 ._PuckLayout-inner_mc1k2_31 {
|
1473
1429
|
--puck-frame-width: minmax(266px, auto);
|
1474
1430
|
}
|
1475
1431
|
}
|
1476
1432
|
@media (min-width: 638px) {
|
1477
|
-
.
|
1433
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1478
1434
|
--puck-side-bar-width: minmax(186px, 250px);
|
1479
1435
|
}
|
1480
1436
|
}
|
1481
1437
|
@media (min-width: 766px) {
|
1482
|
-
.
|
1438
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1483
1439
|
--puck-frame-width: auto;
|
1484
1440
|
}
|
1485
1441
|
}
|
1486
1442
|
@media (min-width: 990px) {
|
1487
|
-
.
|
1443
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1488
1444
|
--puck-side-bar-width: 256px;
|
1489
1445
|
}
|
1490
1446
|
}
|
1491
1447
|
@media (min-width: 1198px) {
|
1492
|
-
.
|
1448
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1493
1449
|
--puck-side-bar-width: 274px;
|
1494
1450
|
}
|
1495
1451
|
}
|
1496
1452
|
@media (min-width: 1398px) {
|
1497
|
-
.
|
1453
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1498
1454
|
--puck-side-bar-width: 290px;
|
1499
1455
|
}
|
1500
1456
|
}
|
1501
1457
|
@media (min-width: 1598px) {
|
1502
|
-
.
|
1458
|
+
._PuckLayout_mc1k2_31 ._PuckLayout-inner_mc1k2_31 {
|
1503
1459
|
--puck-side-bar-width: 320px;
|
1504
1460
|
}
|
1505
1461
|
}
|
1506
|
-
._PuckLayout-
|
1507
|
-
background: var(--puck-color-white);
|
1508
|
-
border-bottom: 1px solid var(--puck-color-grey-09);
|
1509
|
-
color: var(--puck-color-black);
|
1510
|
-
grid-area: header;
|
1511
|
-
position: relative;
|
1512
|
-
max-width: 100vw;
|
1513
|
-
}
|
1514
|
-
._PuckLayout-headerInner_11o75_117 {
|
1515
|
-
align-items: end;
|
1516
|
-
display: grid;
|
1517
|
-
gap: var(--puck-space-px);
|
1518
|
-
grid-template-areas: "left middle right";
|
1519
|
-
grid-template-columns: 1fr auto 1fr;
|
1520
|
-
grid-template-rows: auto;
|
1521
|
-
padding: var(--puck-space-px);
|
1522
|
-
}
|
1523
|
-
._PuckLayout-headerToggle_11o75_127 {
|
1524
|
-
color: var(--puck-color-grey-05);
|
1525
|
-
display: flex;
|
1526
|
-
margin-inline-start: -4px;
|
1527
|
-
padding-top: 2px;
|
1528
|
-
}
|
1529
|
-
._PuckLayout--rightSideBarVisible_11o75_53 ._PuckLayout-rightSideBarToggle_11o75_134,
|
1530
|
-
._PuckLayout--leftSideBarVisible_11o75_47 ._PuckLayout-leftSideBarToggle_11o75_135 {
|
1531
|
-
color: var(--puck-color-black);
|
1532
|
-
}
|
1533
|
-
._PuckLayout-headerTitle_11o75_139 {
|
1534
|
-
align-self: center;
|
1535
|
-
}
|
1536
|
-
._PuckLayout-headerPath_11o75_143 {
|
1537
|
-
font-family: var(--puck-font-family-monospaced);
|
1538
|
-
font-size: var(--puck-font-size-xxs);
|
1539
|
-
font-weight: normal;
|
1540
|
-
word-break: break-all;
|
1541
|
-
}
|
1542
|
-
._PuckLayout-headerTools_11o75_150 {
|
1543
|
-
display: flex;
|
1544
|
-
gap: 16px;
|
1545
|
-
justify-content: flex-end;
|
1546
|
-
}
|
1547
|
-
._PuckLayout-menuButton_11o75_156 {
|
1548
|
-
color: var(--puck-color-grey-05);
|
1549
|
-
margin-inline-start: -4px;
|
1550
|
-
}
|
1551
|
-
._PuckLayout--menuOpen_11o75_161 ._PuckLayout-menuButton_11o75_156 {
|
1552
|
-
color: var(--puck-color-black);
|
1553
|
-
}
|
1554
|
-
@media (min-width: 638px) {
|
1555
|
-
._PuckLayout-menuButton_11o75_156 {
|
1556
|
-
display: none;
|
1557
|
-
}
|
1558
|
-
}
|
1559
|
-
._PuckLayout-leftSideBar_11o75_135 {
|
1462
|
+
._PuckLayout-leftSideBar_mc1k2_108 {
|
1560
1463
|
background: var(--puck-color-grey-12);
|
1561
1464
|
border-inline-end: 1px solid var(--puck-color-grey-09);
|
1562
1465
|
display: flex;
|
@@ -1564,7 +1467,7 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
|
|
1564
1467
|
grid-area: left;
|
1565
1468
|
overflow-y: auto;
|
1566
1469
|
}
|
1567
|
-
._PuckLayout-
|
1470
|
+
._PuckLayout-rightSideBar_mc1k2_117 {
|
1568
1471
|
background: var(--puck-color-white);
|
1569
1472
|
border-inline-start: 1px solid var(--puck-color-grey-09);
|
1570
1473
|
display: flex;
|
@@ -1884,3 +1787,102 @@ body:has(._DropZone--isAnimating_3dmev_67:empty) [data-puck-overlay] {
|
|
1884
1787
|
height: 0;
|
1885
1788
|
transition: none;
|
1886
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 ItemSelector } from './walk-tree-
|
2
|
-
export {
|
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-DOB5QZVq.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-DOB5QZVq.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;
|
@@ -227,9 +229,9 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
227
229
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
228
230
|
declare namespace Puck {
|
229
231
|
var Components: () => react_jsx_runtime.JSX.Element;
|
230
|
-
var Fields: ({ wrapFields }: {
|
232
|
+
var Fields: react.MemoExoticComponent<({ wrapFields }: {
|
231
233
|
wrapFields?: boolean;
|
232
|
-
}) => react_jsx_runtime.JSX.Element
|
234
|
+
}) => react_jsx_runtime.JSX.Element>;
|
233
235
|
var Outline: () => react_jsx_runtime.JSX.Element;
|
234
236
|
var Preview: ({ id }: {
|
235
237
|
id?: string;
|
@@ -247,8 +249,6 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
|
|
247
249
|
metadata?: Metadata;
|
248
250
|
}): react_jsx_runtime.JSX.Element;
|
249
251
|
|
250
|
-
declare function migrate(data: Data, config?: Config): Data;
|
251
|
-
|
252
252
|
type WithGet<T> = T & {
|
253
253
|
get: () => T;
|
254
254
|
};
|
@@ -286,5 +286,11 @@ type UsePuckStore<UserConfig extends Config = Config> = WithGet<PuckApi<UserConf
|
|
286
286
|
*/
|
287
287
|
declare function createUsePuck<UserConfig extends Config = Config>(): <T = PuckApi<UserConfig>>(selector: (state: UsePuckStore<UserConfig>) => T) => T;
|
288
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>;
|
289
295
|
|
290
|
-
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,
|
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 ItemSelector } from './walk-tree-
|
2
|
-
export {
|
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-DOB5QZVq.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-DOB5QZVq.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;
|
@@ -227,9 +229,9 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
227
229
|
declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
228
230
|
declare namespace Puck {
|
229
231
|
var Components: () => react_jsx_runtime.JSX.Element;
|
230
|
-
var Fields: ({ wrapFields }: {
|
232
|
+
var Fields: react.MemoExoticComponent<({ wrapFields }: {
|
231
233
|
wrapFields?: boolean;
|
232
|
-
}) => react_jsx_runtime.JSX.Element
|
234
|
+
}) => react_jsx_runtime.JSX.Element>;
|
233
235
|
var Outline: () => react_jsx_runtime.JSX.Element;
|
234
236
|
var Preview: ({ id }: {
|
235
237
|
id?: string;
|
@@ -247,8 +249,6 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
|
|
247
249
|
metadata?: Metadata;
|
248
250
|
}): react_jsx_runtime.JSX.Element;
|
249
251
|
|
250
|
-
declare function migrate(data: Data, config?: Config): Data;
|
251
|
-
|
252
252
|
type WithGet<T> = T & {
|
253
253
|
get: () => T;
|
254
254
|
};
|
@@ -286,5 +286,11 @@ type UsePuckStore<UserConfig extends Config = Config> = WithGet<PuckApi<UserConf
|
|
286
286
|
*/
|
287
287
|
declare function createUsePuck<UserConfig extends Config = Config>(): <T = PuckApi<UserConfig>>(selector: (state: UsePuckStore<UserConfig>) => T) => T;
|
288
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>;
|
289
295
|
|
290
|
-
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,
|
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 };
|