@puckeditor/plugin-pages 0.9.0-canary.53ee4e95 → 0.9.0-canary.552a686b
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 +178 -162
- package/dist/index.js +26 -11
- package/dist/index.mjs +26 -11
- package/package.json +5 -5
package/dist/index.css
CHANGED
|
@@ -438,12 +438,12 @@ p {
|
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css/#css-module-data */
|
|
441
|
-
.
|
|
441
|
+
._ActionModal_10j8y_1 {
|
|
442
442
|
display: block;
|
|
443
443
|
min-width: 356px;
|
|
444
444
|
}
|
|
445
|
-
._ActionModal-
|
|
446
|
-
color: var(--puck-color-grey-02);
|
|
445
|
+
._ActionModal-header_10j8y_6 {
|
|
446
|
+
color: var( --_puck-platform-action-modal-color-text, var(--puck-color-grey-02) );
|
|
447
447
|
display: flex;
|
|
448
448
|
justify-content: center;
|
|
449
449
|
text-align: center;
|
|
@@ -452,27 +452,27 @@ p {
|
|
|
452
452
|
padding: 24px;
|
|
453
453
|
padding-bottom: 16px;
|
|
454
454
|
}
|
|
455
|
-
._ActionModal-
|
|
455
|
+
._ActionModal-body_10j8y_20 {
|
|
456
456
|
display: flex;
|
|
457
457
|
flex-direction: column;
|
|
458
458
|
gap: 16px;
|
|
459
459
|
padding: 24px;
|
|
460
460
|
padding-top: 8px;
|
|
461
461
|
}
|
|
462
|
-
._ActionModal-
|
|
463
|
-
border-top: 1px solid var(--puck-color-grey-09);
|
|
464
|
-
background-color: var(--puck-color-grey-12);
|
|
462
|
+
._ActionModal-footer_10j8y_28 {
|
|
463
|
+
border-top: var( --_puck-platform-action-modal-footer-border-top, 1px solid var(--puck-color-grey-09) );
|
|
464
|
+
background-color: var( --_puck-platform-action-modal-footer-color-bg, var(--puck-color-grey-12) );
|
|
465
465
|
display: flex;
|
|
466
466
|
justify-content: flex-end;
|
|
467
467
|
padding: 16px 24px;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css/#css-module-data */
|
|
471
|
-
._Modal-
|
|
471
|
+
._Modal-background_10jdm_1 {
|
|
472
472
|
align-items: center;
|
|
473
473
|
display: flex;
|
|
474
474
|
justify-content: center;
|
|
475
|
-
background: #00000050;
|
|
475
|
+
background: var(--_puck-platform-modal-color-backdrop, #00000050);
|
|
476
476
|
position: fixed;
|
|
477
477
|
top: 0;
|
|
478
478
|
left: 0;
|
|
@@ -482,14 +482,14 @@ p {
|
|
|
482
482
|
opacity: 0;
|
|
483
483
|
pointer-events: none;
|
|
484
484
|
}
|
|
485
|
-
._Modal--
|
|
485
|
+
._Modal--visible_10jdm_16 > ._Modal-background_10jdm_1 {
|
|
486
486
|
opacity: 1;
|
|
487
|
-
transition: opacity ease 100ms;
|
|
487
|
+
transition: var(--_puck-platform-modal-transition, opacity ease 100ms);
|
|
488
488
|
pointer-events: auto;
|
|
489
489
|
}
|
|
490
|
-
._Modal-
|
|
491
|
-
background: white;
|
|
492
|
-
border-radius: 16px;
|
|
490
|
+
._Modal-modal_10jdm_22 {
|
|
491
|
+
background: var(--_puck-platform-modal-color-bg, white);
|
|
492
|
+
border-radius: var(--_puck-platform-modal-radius, 16px);
|
|
493
493
|
display: block;
|
|
494
494
|
max-height: calc(100vh - 24px);
|
|
495
495
|
margin-inline: 24px;
|
|
@@ -497,148 +497,162 @@ p {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css/#css-module-data */
|
|
500
|
-
.
|
|
500
|
+
._Button_z2rgr_1 {
|
|
501
501
|
appearance: none;
|
|
502
|
-
background: none;
|
|
503
|
-
border: 1px solid transparent;
|
|
504
|
-
border-radius: 8px;
|
|
505
|
-
color: var(--puck-color-white);
|
|
502
|
+
background: var(--_puck-platform-button-color-bg, none);
|
|
503
|
+
border: var(--_puck-platform-button-border, 1px solid transparent);
|
|
504
|
+
border-radius: var(--_puck-platform-button-radius, 8px);
|
|
505
|
+
color: var(--_puck-platform-button-color-text, var(--puck-color-white));
|
|
506
506
|
display: inline-flex;
|
|
507
507
|
align-items: center;
|
|
508
508
|
gap: 8px;
|
|
509
|
-
letter-spacing: 0.05ch;
|
|
510
|
-
font-family: var(--puck-font-family);
|
|
511
|
-
font-size: 14px;
|
|
512
|
-
font-weight: 400;
|
|
509
|
+
letter-spacing: var(--_puck-platform-button-letter-spacing, 0.05ch);
|
|
510
|
+
font-family: var( --_puck-platform-button-font-family, var(--puck-font-family) );
|
|
511
|
+
font-size: var(--_puck-platform-button-font-size, 14px);
|
|
512
|
+
font-weight: var(--_puck-platform-button-font-weight, 400);
|
|
513
513
|
box-sizing: border-box;
|
|
514
|
-
line-height: 1;
|
|
514
|
+
line-height: var(--_puck-platform-button-line-height, 1);
|
|
515
515
|
text-align: center;
|
|
516
516
|
text-decoration: none;
|
|
517
|
-
transition: background-color 50ms ease-in;
|
|
517
|
+
transition: var( --_puck-platform-button-transition, background-color 50ms ease-in );
|
|
518
518
|
cursor: pointer;
|
|
519
519
|
white-space: nowrap;
|
|
520
520
|
margin: 0;
|
|
521
521
|
}
|
|
522
|
-
.
|
|
523
|
-
.
|
|
524
|
-
transition: none;
|
|
522
|
+
._Button_z2rgr_1:hover,
|
|
523
|
+
._Button_z2rgr_1:active {
|
|
524
|
+
transition: var(--_puck-platform-button-transition-interactive, none);
|
|
525
525
|
}
|
|
526
|
-
.
|
|
527
|
-
outline: 2px solid var(--puck-color-azure-05);
|
|
528
|
-
outline-offset: 2px;
|
|
526
|
+
._Button_z2rgr_1:focus-visible {
|
|
527
|
+
outline: var( --_puck-platform-button-focus-outline, 2px solid var(--puck-color-azure-05) );
|
|
528
|
+
outline-offset: var(--_puck-platform-button-focus-outline-offset, 2px);
|
|
529
529
|
}
|
|
530
|
-
._Button--
|
|
531
|
-
font-size: var(--puck-font-size-xxxs);
|
|
530
|
+
._Button--tiny_z2rgr_43 {
|
|
531
|
+
font-size: var( --_puck-platform-button-tiny-font-size, var(--puck-font-size-xxxs) );
|
|
532
532
|
padding: 2px 8px;
|
|
533
533
|
}
|
|
534
|
-
._Button--
|
|
535
|
-
font-size: var(--puck-font-size-xxs);
|
|
534
|
+
._Button--small_z2rgr_51 {
|
|
535
|
+
font-size: var( --_puck-platform-button-small-font-size, var(--puck-font-size-xxs) );
|
|
536
536
|
padding: 4px 8px;
|
|
537
537
|
}
|
|
538
|
-
._Button--
|
|
538
|
+
._Button--medium_z2rgr_59 {
|
|
539
|
+
font-size: var(--_puck-platform-button-medium-font-size, 14px);
|
|
540
|
+
font-weight: var(--_puck-platform-button-medium-font-weight, 400);
|
|
539
541
|
min-height: 34px;
|
|
540
542
|
padding-bottom: 7px;
|
|
541
543
|
padding-left: 15px;
|
|
542
544
|
padding-right: 15px;
|
|
543
545
|
padding-top: 7px;
|
|
544
546
|
}
|
|
545
|
-
._Button--
|
|
547
|
+
._Button--large_z2rgr_69 {
|
|
548
|
+
font-size: var(--_puck-platform-button-large-font-size, 14px);
|
|
549
|
+
font-weight: var(--_puck-platform-button-large-font-weight, 400);
|
|
546
550
|
padding-bottom: 11px;
|
|
547
551
|
padding-left: 19px;
|
|
548
552
|
padding-right: 19px;
|
|
549
553
|
padding-top: 11px;
|
|
550
554
|
}
|
|
551
|
-
._Button--
|
|
552
|
-
background-image:
|
|
553
|
-
linear-gradient(
|
|
554
|
-
210deg,
|
|
555
|
-
var(--puck-color-azure-01) 0%,
|
|
556
|
-
var(--puck-color-azure-03) 30%,
|
|
557
|
-
var(--puck-color-red-05) 130%);
|
|
555
|
+
._Button--brand_z2rgr_78 {
|
|
556
|
+
background-image: var( --_puck-platform-button-brand-background-image, linear-gradient( 210deg, var(--puck-color-azure-01) 0%, var(--puck-color-azure-03) 30%, var(--puck-color-red-05) 130% ) );
|
|
558
557
|
border: none;
|
|
559
558
|
}
|
|
560
559
|
@media (hover: hover) and (pointer: fine) {
|
|
561
|
-
._Button--
|
|
562
|
-
opacity: 0.8;
|
|
560
|
+
._Button--brand_z2rgr_78:hover {
|
|
561
|
+
opacity: var(--_puck-platform-button-brand-opacity-hover, 0.8);
|
|
563
562
|
}
|
|
564
563
|
}
|
|
565
|
-
._Button--
|
|
566
|
-
opacity: 0.8;
|
|
564
|
+
._Button--brand_z2rgr_78:active {
|
|
565
|
+
opacity: var(--_puck-platform-button-brand-opacity-active, 0.8);
|
|
567
566
|
}
|
|
568
|
-
._Button--
|
|
569
|
-
background: var(--puck-color-azure-04);
|
|
567
|
+
._Button--primary_z2rgr_101 {
|
|
568
|
+
background: var( --_puck-platform-button-primary-color-bg, var(--puck-color-azure-04) );
|
|
569
|
+
border: var(--_puck-platform-button-primary-border, 1px solid transparent);
|
|
570
|
+
color: var( --_puck-platform-button-primary-color-text, var(--puck-color-white) );
|
|
570
571
|
}
|
|
571
572
|
@media (hover: hover) and (pointer: fine) {
|
|
572
|
-
._Button--
|
|
573
|
-
background-color: var(--puck-color-azure-03);
|
|
573
|
+
._Button--primary_z2rgr_101:hover {
|
|
574
|
+
background-color: var( --_puck-platform-button-primary-color-bg-hover, var(--puck-color-azure-03) );
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
|
-
._Button--
|
|
577
|
-
background-color: var(--puck-color-azure-02);
|
|
577
|
+
._Button--primary_z2rgr_101:active {
|
|
578
|
+
background-color: var( --_puck-platform-button-primary-color-bg-active, var(--puck-color-azure-02) );
|
|
578
579
|
}
|
|
579
|
-
._Button--
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
._Button--secondary_z2rgr_129 {
|
|
581
|
+
background: var(--_puck-platform-button-secondary-color-bg, none);
|
|
582
|
+
border: var(--_puck-platform-button-secondary-border, 1px solid currentColor);
|
|
583
|
+
color: var(--_puck-platform-button-secondary-color-text, currentColor);
|
|
582
584
|
}
|
|
583
585
|
@media (hover: hover) and (pointer: fine) {
|
|
584
|
-
._Button--
|
|
585
|
-
background-color: var(--puck-color-azure-12);
|
|
586
|
-
border-color: var(--puck-color-azure-12);
|
|
587
|
-
color: var(--puck-color-azure-04);
|
|
586
|
+
._Button--secondary_z2rgr_129:hover {
|
|
587
|
+
background-color: var( --_puck-platform-button-secondary-color-bg-hover, var(--puck-color-azure-12) );
|
|
588
|
+
border-color: var( --_puck-platform-button-secondary-color-border-hover, var(--puck-color-azure-12) );
|
|
589
|
+
color: var( --_puck-platform-button-secondary-color-text-hover, var(--puck-color-azure-04) );
|
|
588
590
|
}
|
|
589
591
|
}
|
|
590
|
-
._Button--
|
|
591
|
-
background-color: var(--puck-color-azure-11);
|
|
592
|
-
color: var(--puck-color-black);
|
|
592
|
+
._Button--secondary_z2rgr_129:active {
|
|
593
|
+
background-color: var( --_puck-platform-button-secondary-color-bg-active, var(--puck-color-azure-11) );
|
|
594
|
+
color: var( --_puck-platform-button-secondary-color-text-active, var(--puck-color-black) );
|
|
593
595
|
}
|
|
594
|
-
._Button--
|
|
595
|
-
background: var(--puck-color-red-04);
|
|
596
|
+
._Button--danger_z2rgr_163 {
|
|
597
|
+
background: var( --_puck-platform-button-danger-color-bg, var(--puck-color-red-04) );
|
|
596
598
|
}
|
|
597
599
|
@media (hover: hover) and (pointer: fine) {
|
|
598
|
-
._Button--
|
|
599
|
-
background-color: var(--puck-color-red-03);
|
|
600
|
+
._Button--danger_z2rgr_163:hover {
|
|
601
|
+
background-color: var( --_puck-platform-button-danger-color-bg-hover, var(--puck-color-red-03) );
|
|
600
602
|
}
|
|
601
603
|
}
|
|
602
|
-
._Button--
|
|
603
|
-
background-color: var(--puck-color-red-02);
|
|
604
|
+
._Button--danger_z2rgr_163:active {
|
|
605
|
+
background-color: var( --_puck-platform-button-danger-color-bg-active, var(--puck-color-red-02) );
|
|
604
606
|
}
|
|
605
|
-
._Button--
|
|
606
|
-
border-radius: 0;
|
|
607
|
+
._Button--flush_z2rgr_186 {
|
|
608
|
+
border-radius: var(--_puck-platform-button-flush-radius, 0);
|
|
607
609
|
}
|
|
608
|
-
._Button--
|
|
610
|
+
._Button--ghost_z2rgr_190 {
|
|
609
611
|
align-items: center;
|
|
610
|
-
background-color: transparent;
|
|
612
|
+
background-color: var(--_puck-platform-button-ghost-color-bg, transparent);
|
|
611
613
|
border: none;
|
|
612
|
-
border-radius: 8px;
|
|
613
|
-
color: var(--puck-color-azure-04);
|
|
614
|
+
border-radius: var(--_puck-platform-button-ghost-radius, 8px);
|
|
615
|
+
color: var( --_puck-platform-button-ghost-color-text, var(--puck-color-azure-04) );
|
|
614
616
|
display: flex;
|
|
615
617
|
}
|
|
616
618
|
@media (hover: hover) and (pointer: fine) {
|
|
617
|
-
._Button--
|
|
618
|
-
background-color: var(--puck-color-grey-11);
|
|
619
|
-
color: var(--puck-color-azure-04);
|
|
619
|
+
._Button--ghost_z2rgr_190:hover {
|
|
620
|
+
background-color: var( --_puck-platform-button-ghost-color-bg-hover, var(--puck-color-grey-11) );
|
|
621
|
+
color: var( --_puck-platform-button-ghost-color-text-hover, var(--puck-color-azure-04) );
|
|
620
622
|
cursor: pointer;
|
|
621
623
|
}
|
|
622
624
|
}
|
|
623
|
-
._Button--
|
|
624
|
-
._Button--
|
|
625
|
-
._Button--
|
|
626
|
-
._Button--
|
|
627
|
-
background-color: var(--puck-color-grey-12);
|
|
628
|
-
border-color: var(--puck-color-grey-08);
|
|
629
|
-
color: var(--puck-color-grey-07);
|
|
625
|
+
._Button--disabled_z2rgr_216,
|
|
626
|
+
._Button--disabled_z2rgr_216:hover,
|
|
627
|
+
._Button--secondary_z2rgr_129._Button--disabled_z2rgr_216,
|
|
628
|
+
._Button--secondary_z2rgr_129._Button--disabled_z2rgr_216:hover {
|
|
629
|
+
background-color: var( --_puck-platform-button-disabled-color-bg, var(--puck-color-grey-12) );
|
|
630
|
+
border-color: var( --_puck-platform-button-disabled-color-border, var(--puck-color-grey-08) );
|
|
631
|
+
color: var( --_puck-platform-button-disabled-color-text, var(--puck-color-grey-07) );
|
|
630
632
|
cursor: not-allowed;
|
|
631
633
|
}
|
|
632
|
-
._Button--
|
|
634
|
+
._Button--secondary_z2rgr_129._Button--disabled_z2rgr_216,
|
|
635
|
+
._Button--secondary_z2rgr_129._Button--disabled_z2rgr_216:hover {
|
|
636
|
+
background-color: var( --_puck-platform-button-secondary-color-bg-disabled, var(--puck-color-grey-12) );
|
|
637
|
+
border-color: var( --_puck-platform-button-secondary-color-border-disabled, var(--puck-color-grey-08) );
|
|
638
|
+
color: var( --_puck-platform-button-secondary-color-text-disabled, var(--puck-color-grey-07) );
|
|
639
|
+
}
|
|
640
|
+
._Button--primary_z2rgr_101._Button--disabled_z2rgr_216,
|
|
641
|
+
._Button--primary_z2rgr_101._Button--disabled_z2rgr_216:hover {
|
|
642
|
+
background-color: var( --_puck-platform-button-primary-color-bg-disabled, var(--puck-color-grey-12) );
|
|
643
|
+
border-color: var( --_puck-platform-button-primary-color-border-disabled, var(--puck-color-grey-08) );
|
|
644
|
+
color: var( --_puck-platform-button-primary-color-text-disabled, var(--puck-color-grey-07) );
|
|
645
|
+
}
|
|
646
|
+
._Button--fullWidth_z2rgr_267 {
|
|
633
647
|
justify-content: center;
|
|
634
648
|
width: 100%;
|
|
635
649
|
}
|
|
636
|
-
._Button-
|
|
650
|
+
._Button-spinner_z2rgr_272 {
|
|
637
651
|
padding-left: 8px;
|
|
638
652
|
}
|
|
639
653
|
|
|
640
654
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css/#css-module-data */
|
|
641
|
-
@keyframes _loader-
|
|
655
|
+
@keyframes _loader-animation_68nru_1 {
|
|
642
656
|
0% {
|
|
643
657
|
transform: rotate(0deg) scale(1);
|
|
644
658
|
}
|
|
@@ -649,89 +663,89 @@ p {
|
|
|
649
663
|
transform: rotate(360deg) scale(1);
|
|
650
664
|
}
|
|
651
665
|
}
|
|
652
|
-
.
|
|
666
|
+
._Loader_68nru_13 {
|
|
653
667
|
background: transparent;
|
|
654
|
-
border-radius: 100
|
|
655
|
-
border: 2px solid currentColor;
|
|
668
|
+
border-radius: var(--_puck-platform-loader-radius, 100%);
|
|
669
|
+
border: var(--_puck-platform-loader-border, 2px solid currentColor);
|
|
656
670
|
border-bottom-color: transparent;
|
|
657
671
|
display: inline-block;
|
|
658
|
-
animation: _loader-
|
|
672
|
+
animation: _loader-animation_68nru_1 var(--_puck-platform-loader-animation-duration, 1s) 0s infinite linear;
|
|
659
673
|
animation-fill-mode: both;
|
|
660
674
|
}
|
|
661
675
|
|
|
662
676
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css/#css-module-data */
|
|
663
|
-
.
|
|
677
|
+
._Heading_l89dy_1 {
|
|
664
678
|
display: block;
|
|
665
|
-
font-family: var(--heading-font-family, var(--puck-font-family));
|
|
666
|
-
font-weight: 700;
|
|
679
|
+
font-family: var( --_puck-platform-heading-font-family, var(--heading-font-family, var(--puck-font-family)) );
|
|
680
|
+
font-weight: var(--_puck-platform-heading-font-weight, 700);
|
|
667
681
|
margin: 0;
|
|
668
682
|
}
|
|
669
|
-
.
|
|
670
|
-
font-weight: 700;
|
|
683
|
+
._Heading_l89dy_1 b {
|
|
684
|
+
font-weight: var(--_puck-platform-heading-bold-font-weight, 700);
|
|
671
685
|
}
|
|
672
|
-
._Heading--
|
|
673
|
-
._Heading--
|
|
674
|
-
font-weight: 500;
|
|
675
|
-
letter-spacing: -
|
|
676
|
-
line-height: 1;
|
|
686
|
+
._Heading--brand_l89dy_15,
|
|
687
|
+
._Heading--brand_l89dy_15 * {
|
|
688
|
+
font-weight: var(--_puck-platform-heading-brand-font-weight, 500);
|
|
689
|
+
letter-spacing: var(--_puck-platform-heading-brand-letter-spacing, -0.07em);
|
|
690
|
+
line-height: var(--_puck-platform-heading-brand-line-height, 1);
|
|
677
691
|
}
|
|
678
|
-
._Heading--
|
|
679
|
-
font-weight: 700;
|
|
692
|
+
._Heading--brand_l89dy_15 b {
|
|
693
|
+
font-weight: var(--_puck-platform-heading-brand-bold-font-weight, 700);
|
|
680
694
|
}
|
|
681
|
-
._Heading--
|
|
682
|
-
font-size: var(--puck-font-size-xxxl);
|
|
695
|
+
._Heading--xxxxl_l89dy_26 {
|
|
696
|
+
font-size: var( --_puck-platform-heading-xxxxl-font-size, var(--puck-font-size-xxxl) );
|
|
683
697
|
}
|
|
684
|
-
._Heading--
|
|
685
|
-
font-size: var(--puck-font-size-xxl);
|
|
698
|
+
._Heading--xxxl_l89dy_33 {
|
|
699
|
+
font-size: var( --_puck-platform-heading-xxxl-font-size, var(--puck-font-size-xxl) );
|
|
686
700
|
}
|
|
687
|
-
._Heading--
|
|
688
|
-
font-size: var(--puck-font-size-xl);
|
|
701
|
+
._Heading--xxl_l89dy_40 {
|
|
702
|
+
font-size: var( --_puck-platform-heading-xxl-font-size, var(--puck-font-size-xl) );
|
|
689
703
|
}
|
|
690
|
-
._Heading--
|
|
691
|
-
font-size: var(--puck-font-size-l);
|
|
704
|
+
._Heading--xl_l89dy_47 {
|
|
705
|
+
font-size: var( --_puck-platform-heading-xl-font-size, var(--puck-font-size-l) );
|
|
692
706
|
}
|
|
693
|
-
._Heading--
|
|
694
|
-
font-size: var(--puck-font-size-m);
|
|
707
|
+
._Heading--l_l89dy_54 {
|
|
708
|
+
font-size: var(--_puck-platform-heading-l-font-size, var(--puck-font-size-m));
|
|
695
709
|
}
|
|
696
|
-
._Heading--
|
|
697
|
-
font-size: var(--puck-font-size-s);
|
|
710
|
+
._Heading--m_l89dy_58 {
|
|
711
|
+
font-size: var(--_puck-platform-heading-m-font-size, var(--puck-font-size-s));
|
|
698
712
|
}
|
|
699
|
-
._Heading--
|
|
700
|
-
font-size: var(--puck-font-size-xs);
|
|
713
|
+
._Heading--s_l89dy_62 {
|
|
714
|
+
font-size: var( --_puck-platform-heading-s-font-size, var(--puck-font-size-xs) );
|
|
701
715
|
}
|
|
702
|
-
._Heading--
|
|
703
|
-
font-size: var(--puck-font-size-xxs);
|
|
716
|
+
._Heading--xs_l89dy_69 {
|
|
717
|
+
font-size: var( --_puck-platform-heading-xs-font-size, var(--puck-font-size-xxs) );
|
|
704
718
|
}
|
|
705
|
-
._Heading--
|
|
706
|
-
font-size: var(--puck-font-size-xxs);
|
|
719
|
+
._Heading--xxs_l89dy_76 {
|
|
720
|
+
font-size: var( --_puck-platform-heading-xxs-font-size, var(--puck-font-size-xxs) );
|
|
707
721
|
}
|
|
708
722
|
@media (min-width: 768px) {
|
|
709
|
-
._Heading--
|
|
710
|
-
font-size: var(--puck-font-size-xxxxl);
|
|
723
|
+
._Heading--xxxxl_l89dy_26 {
|
|
724
|
+
font-size: var( --_puck-platform-heading-xxxxl-font-size-desktop, var(--puck-font-size-xxxxl) );
|
|
711
725
|
}
|
|
712
|
-
._Heading--
|
|
713
|
-
font-size: var(--puck-font-size-xxxl);
|
|
726
|
+
._Heading--xxxl_l89dy_33 {
|
|
727
|
+
font-size: var( --_puck-platform-heading-xxxl-font-size-desktop, var(--puck-font-size-xxxl) );
|
|
714
728
|
}
|
|
715
|
-
._Heading--
|
|
716
|
-
font-size: var(--puck-font-size-xxl);
|
|
729
|
+
._Heading--xxl_l89dy_40 {
|
|
730
|
+
font-size: var( --_puck-platform-heading-xxl-font-size-desktop, var(--puck-font-size-xxl) );
|
|
717
731
|
}
|
|
718
|
-
._Heading--
|
|
719
|
-
font-size: var(--puck-font-size-xl);
|
|
732
|
+
._Heading--xl_l89dy_47 {
|
|
733
|
+
font-size: var( --_puck-platform-heading-xl-font-size-desktop, var(--puck-font-size-xl) );
|
|
720
734
|
}
|
|
721
|
-
._Heading--
|
|
722
|
-
font-size: var(--puck-font-size-l);
|
|
735
|
+
._Heading--l_l89dy_54 {
|
|
736
|
+
font-size: var( --_puck-platform-heading-l-font-size-desktop, var(--puck-font-size-l) );
|
|
723
737
|
}
|
|
724
|
-
._Heading--
|
|
725
|
-
font-size: var(--puck-font-size-m);
|
|
738
|
+
._Heading--m_l89dy_58 {
|
|
739
|
+
font-size: var( --_puck-platform-heading-m-font-size-desktop, var(--puck-font-size-m) );
|
|
726
740
|
}
|
|
727
|
-
._Heading--
|
|
728
|
-
font-size: var(--puck-font-size-s);
|
|
741
|
+
._Heading--s_l89dy_62 {
|
|
742
|
+
font-size: var( --_puck-platform-heading-s-font-size-desktop, var(--puck-font-size-s) );
|
|
729
743
|
}
|
|
730
|
-
._Heading--
|
|
731
|
-
font-size: var(--puck-font-size-xs);
|
|
744
|
+
._Heading--xs_l89dy_69 {
|
|
745
|
+
font-size: var( --_puck-platform-heading-xs-font-size-desktop, var(--puck-font-size-xs) );
|
|
732
746
|
}
|
|
733
|
-
._Heading--
|
|
734
|
-
font-size: var(--puck-font-size-xxs);
|
|
747
|
+
._Heading--xxs_l89dy_76 {
|
|
748
|
+
font-size: var( --_puck-platform-heading-xxs-font-size-desktop, var(--puck-font-size-xxs) );
|
|
735
749
|
}
|
|
736
750
|
}
|
|
737
751
|
|
|
@@ -969,38 +983,40 @@ p {
|
|
|
969
983
|
}
|
|
970
984
|
|
|
971
985
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css/#css-module-data */
|
|
972
|
-
.
|
|
986
|
+
._IconButton_voaix_1 {
|
|
973
987
|
align-items: center;
|
|
974
|
-
background: transparent;
|
|
988
|
+
background: var(--_puck-platform-icon-button-color-bg, transparent);
|
|
975
989
|
border: none;
|
|
976
|
-
border-radius: 4px;
|
|
977
|
-
color: currentColor;
|
|
990
|
+
border-radius: var(--_puck-platform-icon-button-radius, 4px);
|
|
991
|
+
color: var(--_puck-platform-icon-button-color-icon, currentColor);
|
|
978
992
|
display: flex;
|
|
979
|
-
font-family: var(--puck-font-family);
|
|
993
|
+
font-family: var( --_puck-platform-icon-button-font-family, var(--puck-font-family) );
|
|
980
994
|
justify-content: center;
|
|
981
995
|
padding: 4px;
|
|
982
|
-
transition: background-color 50ms ease-in, color 50ms ease-in;
|
|
996
|
+
transition: var( --_puck-platform-icon-button-transition, background-color 50ms ease-in, color 50ms ease-in );
|
|
983
997
|
}
|
|
984
|
-
.
|
|
985
|
-
outline: 2px solid var(--puck-color-azure-05);
|
|
986
|
-
outline-offset: -2px;
|
|
998
|
+
._IconButton_voaix_1:focus-visible {
|
|
999
|
+
outline: var( --_puck-platform-icon-button-focus-outline, 2px solid var(--puck-color-azure-05) );
|
|
1000
|
+
outline-offset: var(--_puck-platform-icon-button-focus-outline-offset, -2px);
|
|
987
1001
|
}
|
|
988
1002
|
@media (hover: hover) and (pointer: fine) {
|
|
989
|
-
.
|
|
990
|
-
background: var(--puck-color-azure-10);
|
|
1003
|
+
._IconButton_voaix_1:hover:not(._IconButton--disabled_voaix_30) {
|
|
1004
|
+
background: var( --_puck-platform-icon-button-color-bg-hover, var(--puck-color-azure-10) );
|
|
1005
|
+
color: var(--_puck-platform-icon-button-color-icon-hover, currentColor);
|
|
991
1006
|
cursor: pointer;
|
|
992
|
-
transition: none;
|
|
1007
|
+
transition: var(--_puck-platform-icon-button-transition-interactive, none);
|
|
993
1008
|
}
|
|
994
|
-
._IconButton--
|
|
995
|
-
background: var(--puck-color-grey-04);
|
|
996
|
-
color: var(--puck-color-azure-10);
|
|
1009
|
+
._IconButton--dark_voaix_40:hover:not(._IconButton--disabled_voaix_30) {
|
|
1010
|
+
background: var( --_puck-platform-icon-button-dark-color-bg-hover, var(--puck-color-grey-04) );
|
|
1011
|
+
color: var( --_puck-platform-icon-button-dark-color-icon-hover, var(--puck-color-azure-10) );
|
|
997
1012
|
}
|
|
998
1013
|
}
|
|
999
|
-
.
|
|
1000
|
-
background: var(--puck-color-azure-11);
|
|
1001
|
-
|
|
1014
|
+
._IconButton_voaix_1:active {
|
|
1015
|
+
background: var( --_puck-platform-icon-button-color-bg-active, var(--puck-color-azure-11) );
|
|
1016
|
+
color: var(--_puck-platform-icon-button-color-icon-active, currentColor);
|
|
1017
|
+
transition: var(--_puck-platform-icon-button-transition-interactive, none);
|
|
1002
1018
|
}
|
|
1003
|
-
._IconButton-
|
|
1019
|
+
._IconButton-title_voaix_61 {
|
|
1004
1020
|
clip: rect(0 0 0 0);
|
|
1005
1021
|
clip-path: inset(100%);
|
|
1006
1022
|
height: 1px;
|
|
@@ -1009,8 +1025,8 @@ p {
|
|
|
1009
1025
|
white-space: nowrap;
|
|
1010
1026
|
width: 1px;
|
|
1011
1027
|
}
|
|
1012
|
-
._IconButton--
|
|
1013
|
-
color: var(--puck-color-grey-07);
|
|
1028
|
+
._IconButton--disabled_voaix_30 {
|
|
1029
|
+
color: var( --_puck-platform-icon-button-color-icon-disabled, var(--puck-color-grey-07) );
|
|
1014
1030
|
}
|
|
1015
1031
|
|
|
1016
1032
|
/* css-module:/home/runner/work/platform/platform/packages/platform-client/components/InfoBar/InfoBar.module.css/#css-module-data */
|
package/dist/index.js
CHANGED
|
@@ -5104,7 +5104,7 @@ init_react_import();
|
|
|
5104
5104
|
|
|
5105
5105
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
|
|
5106
5106
|
init_react_import();
|
|
5107
|
-
var ActionModal_module_default = { "ActionModal": "
|
|
5107
|
+
var ActionModal_module_default = { "ActionModal": "_ActionModal_10j8y_1", "ActionModal-header": "_ActionModal-header_10j8y_6", "ActionModal-body": "_ActionModal-body_10j8y_20", "ActionModal-footer": "_ActionModal-footer_10j8y_28" };
|
|
5108
5108
|
|
|
5109
5109
|
// ../platform-client/lib/index.ts
|
|
5110
5110
|
init_react_import();
|
|
@@ -5148,7 +5148,7 @@ init_react_import();
|
|
|
5148
5148
|
|
|
5149
5149
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css#css-module
|
|
5150
5150
|
init_react_import();
|
|
5151
|
-
var Modal_module_default = { "Modal-background": "_Modal-
|
|
5151
|
+
var Modal_module_default = { "Modal-background": "_Modal-background_10jdm_1", "Modal--visible": "_Modal--visible_10jdm_16", "Modal-modal": "_Modal-modal_10jdm_22" };
|
|
5152
5152
|
|
|
5153
5153
|
// ../platform-client/components/Modal/Modal.tsx
|
|
5154
5154
|
var import_react11 = require("react");
|
|
@@ -5166,20 +5166,21 @@ var import_react10 = require("react");
|
|
|
5166
5166
|
|
|
5167
5167
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css#css-module
|
|
5168
5168
|
init_react_import();
|
|
5169
|
-
var Button_module_default = { "Button": "
|
|
5169
|
+
var Button_module_default = { "Button": "_Button_z2rgr_1", "Button--tiny": "_Button--tiny_z2rgr_43", "Button--small": "_Button--small_z2rgr_51", "Button--medium": "_Button--medium_z2rgr_59", "Button--large": "_Button--large_z2rgr_69", "Button--brand": "_Button--brand_z2rgr_78", "Button--primary": "_Button--primary_z2rgr_101", "Button--secondary": "_Button--secondary_z2rgr_129", "Button--danger": "_Button--danger_z2rgr_163", "Button--flush": "_Button--flush_z2rgr_186", "Button--ghost": "_Button--ghost_z2rgr_190", "Button--disabled": "_Button--disabled_z2rgr_216", "Button--fullWidth": "_Button--fullWidth_z2rgr_267", "Button-spinner": "_Button-spinner_z2rgr_272" };
|
|
5170
5170
|
|
|
5171
5171
|
// ../platform-client/components/Loader/index.tsx
|
|
5172
5172
|
init_react_import();
|
|
5173
5173
|
|
|
5174
5174
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css#css-module
|
|
5175
5175
|
init_react_import();
|
|
5176
|
-
var styles_module_default3 = { "Loader": "
|
|
5176
|
+
var styles_module_default3 = { "Loader": "_Loader_68nru_13", "loader-animation": "_loader-animation_68nru_1" };
|
|
5177
5177
|
|
|
5178
5178
|
// ../platform-client/components/Loader/index.tsx
|
|
5179
5179
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
5180
5180
|
var getClassName = getClassNameFactory2("Loader", styles_module_default3);
|
|
5181
5181
|
var Loader = ({
|
|
5182
5182
|
color,
|
|
5183
|
+
label = "loading",
|
|
5183
5184
|
size: size4 = 16,
|
|
5184
5185
|
...props
|
|
5185
5186
|
}) => {
|
|
@@ -5192,7 +5193,7 @@ var Loader = ({
|
|
|
5192
5193
|
height: size4,
|
|
5193
5194
|
color
|
|
5194
5195
|
},
|
|
5195
|
-
"aria-label":
|
|
5196
|
+
"aria-label": label,
|
|
5196
5197
|
...props
|
|
5197
5198
|
}
|
|
5198
5199
|
);
|
|
@@ -5307,7 +5308,7 @@ init_react_import();
|
|
|
5307
5308
|
|
|
5308
5309
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css#css-module
|
|
5309
5310
|
init_react_import();
|
|
5310
|
-
var Heading_module_default = { "Heading": "
|
|
5311
|
+
var Heading_module_default = { "Heading": "_Heading_l89dy_1", "Heading--brand": "_Heading--brand_l89dy_15", "Heading--xxxxl": "_Heading--xxxxl_l89dy_26", "Heading--xxxl": "_Heading--xxxl_l89dy_33", "Heading--xxl": "_Heading--xxl_l89dy_40", "Heading--xl": "_Heading--xl_l89dy_47", "Heading--l": "_Heading--l_l89dy_54", "Heading--m": "_Heading--m_l89dy_58", "Heading--s": "_Heading--s_l89dy_62", "Heading--xs": "_Heading--xs_l89dy_69", "Heading--xxs": "_Heading--xxs_l89dy_76" };
|
|
5311
5312
|
|
|
5312
5313
|
// ../platform-client/components/Heading/Heading.tsx
|
|
5313
5314
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
@@ -5453,7 +5454,7 @@ var import_react16 = require("react");
|
|
|
5453
5454
|
|
|
5454
5455
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
|
|
5455
5456
|
init_react_import();
|
|
5456
|
-
var IconButton_module_default = { "IconButton": "
|
|
5457
|
+
var IconButton_module_default = { "IconButton": "_IconButton_voaix_1", "IconButton--disabled": "_IconButton--disabled_voaix_30", "IconButton--dark": "_IconButton--dark_voaix_40", "IconButton-title": "_IconButton-title_voaix_61" };
|
|
5457
5458
|
|
|
5458
5459
|
// ../platform-client/components/IconButton/IconButton.tsx
|
|
5459
5460
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
@@ -8664,11 +8665,14 @@ function registerDynamicConfig(config, data) {
|
|
|
8664
8665
|
}
|
|
8665
8666
|
}
|
|
8666
8667
|
var resolvedVersions = /* @__PURE__ */ new WeakMap();
|
|
8667
|
-
var rememberResolvedData = (data, resolved) => resolvedVersions.set(data, resolved);
|
|
8668
|
+
var rememberResolvedData = (data, resolved) => resolvedVersions.set(data, resolvedVersions.get(resolved) ?? resolved);
|
|
8668
8669
|
var isDirty = ({
|
|
8669
8670
|
appState,
|
|
8670
8671
|
history
|
|
8671
|
-
}, version2) => history.histories.length > 1 && !(0, import_fast_equals.deepEqual)(
|
|
8672
|
+
}, version2) => history.histories.length > 1 && !(0, import_fast_equals.deepEqual)(
|
|
8673
|
+
appState.data,
|
|
8674
|
+
version2 && (resolvedVersions.get(version2.data) ?? version2.data)
|
|
8675
|
+
);
|
|
8672
8676
|
var usePageEditorState = () => {
|
|
8673
8677
|
const getPuck = (0, import_core3.useGetPuck)();
|
|
8674
8678
|
return (0, import_react25.useMemo)(() => {
|
|
@@ -8676,9 +8680,9 @@ var usePageEditorState = () => {
|
|
|
8676
8680
|
const { config } = getPuck();
|
|
8677
8681
|
const pageData = { root: {}, content: [], ...data };
|
|
8678
8682
|
registerDynamicConfig(config, pageData);
|
|
8679
|
-
|
|
8683
|
+
let resolvedData = (data && resolvedVersions.get(data)) ?? await (0, import_core3.resolveAllData)(pageData, config);
|
|
8684
|
+
if (isCurrent()) resolvedData = showData(resolvedData);
|
|
8680
8685
|
if (data) rememberResolvedData(data, resolvedData);
|
|
8681
|
-
if (isCurrent()) showData(resolvedData);
|
|
8682
8686
|
};
|
|
8683
8687
|
const showData = (data) => {
|
|
8684
8688
|
const { appState, history, dispatch } = getPuck();
|
|
@@ -8689,6 +8693,17 @@ var usePageEditorState = () => {
|
|
|
8689
8693
|
};
|
|
8690
8694
|
history.setHistories([{ state: nextState }]);
|
|
8691
8695
|
dispatch({ type: "set", state: nextState });
|
|
8696
|
+
const shownData = getPuck().appState.data;
|
|
8697
|
+
setTimeout(() => dropStaleHistory(nextState, shownData), 250);
|
|
8698
|
+
return shownData;
|
|
8699
|
+
};
|
|
8700
|
+
const dropStaleHistory = (shown, shownData) => {
|
|
8701
|
+
const { appState, history } = getPuck();
|
|
8702
|
+
const [first, ...rest] = history.histories;
|
|
8703
|
+
if (first?.state !== shown || !rest.length) return;
|
|
8704
|
+
history.setHistories(
|
|
8705
|
+
(0, import_fast_equals.deepEqual)(appState.data, shownData) ? [{ state: appState }] : [first, { state: appState }]
|
|
8706
|
+
);
|
|
8692
8707
|
};
|
|
8693
8708
|
const unloadPageData = () => {
|
|
8694
8709
|
const { appState, history } = getPuck();
|
package/dist/index.mjs
CHANGED
|
@@ -5099,7 +5099,7 @@ init_react_import();
|
|
|
5099
5099
|
|
|
5100
5100
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
|
|
5101
5101
|
init_react_import();
|
|
5102
|
-
var ActionModal_module_default = { "ActionModal": "
|
|
5102
|
+
var ActionModal_module_default = { "ActionModal": "_ActionModal_10j8y_1", "ActionModal-header": "_ActionModal-header_10j8y_6", "ActionModal-body": "_ActionModal-body_10j8y_20", "ActionModal-footer": "_ActionModal-footer_10j8y_28" };
|
|
5103
5103
|
|
|
5104
5104
|
// ../platform-client/lib/index.ts
|
|
5105
5105
|
init_react_import();
|
|
@@ -5143,7 +5143,7 @@ init_react_import();
|
|
|
5143
5143
|
|
|
5144
5144
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css#css-module
|
|
5145
5145
|
init_react_import();
|
|
5146
|
-
var Modal_module_default = { "Modal-background": "_Modal-
|
|
5146
|
+
var Modal_module_default = { "Modal-background": "_Modal-background_10jdm_1", "Modal--visible": "_Modal--visible_10jdm_16", "Modal-modal": "_Modal-modal_10jdm_22" };
|
|
5147
5147
|
|
|
5148
5148
|
// ../platform-client/components/Modal/Modal.tsx
|
|
5149
5149
|
import { createContext as createContext6, useContext as useContext7 } from "react";
|
|
@@ -5161,20 +5161,21 @@ import { useEffect as useEffect11, useState as useState9 } from "react";
|
|
|
5161
5161
|
|
|
5162
5162
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css#css-module
|
|
5163
5163
|
init_react_import();
|
|
5164
|
-
var Button_module_default = { "Button": "
|
|
5164
|
+
var Button_module_default = { "Button": "_Button_z2rgr_1", "Button--tiny": "_Button--tiny_z2rgr_43", "Button--small": "_Button--small_z2rgr_51", "Button--medium": "_Button--medium_z2rgr_59", "Button--large": "_Button--large_z2rgr_69", "Button--brand": "_Button--brand_z2rgr_78", "Button--primary": "_Button--primary_z2rgr_101", "Button--secondary": "_Button--secondary_z2rgr_129", "Button--danger": "_Button--danger_z2rgr_163", "Button--flush": "_Button--flush_z2rgr_186", "Button--ghost": "_Button--ghost_z2rgr_190", "Button--disabled": "_Button--disabled_z2rgr_216", "Button--fullWidth": "_Button--fullWidth_z2rgr_267", "Button-spinner": "_Button-spinner_z2rgr_272" };
|
|
5165
5165
|
|
|
5166
5166
|
// ../platform-client/components/Loader/index.tsx
|
|
5167
5167
|
init_react_import();
|
|
5168
5168
|
|
|
5169
5169
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css#css-module
|
|
5170
5170
|
init_react_import();
|
|
5171
|
-
var styles_module_default3 = { "Loader": "
|
|
5171
|
+
var styles_module_default3 = { "Loader": "_Loader_68nru_13", "loader-animation": "_loader-animation_68nru_1" };
|
|
5172
5172
|
|
|
5173
5173
|
// ../platform-client/components/Loader/index.tsx
|
|
5174
5174
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
5175
5175
|
var getClassName = getClassNameFactory2("Loader", styles_module_default3);
|
|
5176
5176
|
var Loader = ({
|
|
5177
5177
|
color,
|
|
5178
|
+
label = "loading",
|
|
5178
5179
|
size: size4 = 16,
|
|
5179
5180
|
...props
|
|
5180
5181
|
}) => {
|
|
@@ -5187,7 +5188,7 @@ var Loader = ({
|
|
|
5187
5188
|
height: size4,
|
|
5188
5189
|
color
|
|
5189
5190
|
},
|
|
5190
|
-
"aria-label":
|
|
5191
|
+
"aria-label": label,
|
|
5191
5192
|
...props
|
|
5192
5193
|
}
|
|
5193
5194
|
);
|
|
@@ -5302,7 +5303,7 @@ init_react_import();
|
|
|
5302
5303
|
|
|
5303
5304
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css#css-module
|
|
5304
5305
|
init_react_import();
|
|
5305
|
-
var Heading_module_default = { "Heading": "
|
|
5306
|
+
var Heading_module_default = { "Heading": "_Heading_l89dy_1", "Heading--brand": "_Heading--brand_l89dy_15", "Heading--xxxxl": "_Heading--xxxxl_l89dy_26", "Heading--xxxl": "_Heading--xxxl_l89dy_33", "Heading--xxl": "_Heading--xxl_l89dy_40", "Heading--xl": "_Heading--xl_l89dy_47", "Heading--l": "_Heading--l_l89dy_54", "Heading--m": "_Heading--m_l89dy_58", "Heading--s": "_Heading--s_l89dy_62", "Heading--xs": "_Heading--xs_l89dy_69", "Heading--xxs": "_Heading--xxs_l89dy_76" };
|
|
5306
5307
|
|
|
5307
5308
|
// ../platform-client/components/Heading/Heading.tsx
|
|
5308
5309
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
@@ -5448,7 +5449,7 @@ import { useState as useState13 } from "react";
|
|
|
5448
5449
|
|
|
5449
5450
|
// css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
|
|
5450
5451
|
init_react_import();
|
|
5451
|
-
var IconButton_module_default = { "IconButton": "
|
|
5452
|
+
var IconButton_module_default = { "IconButton": "_IconButton_voaix_1", "IconButton--disabled": "_IconButton--disabled_voaix_30", "IconButton--dark": "_IconButton--dark_voaix_40", "IconButton-title": "_IconButton-title_voaix_61" };
|
|
5452
5453
|
|
|
5453
5454
|
// ../platform-client/components/IconButton/IconButton.tsx
|
|
5454
5455
|
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -8662,11 +8663,14 @@ function registerDynamicConfig(config, data) {
|
|
|
8662
8663
|
}
|
|
8663
8664
|
}
|
|
8664
8665
|
var resolvedVersions = /* @__PURE__ */ new WeakMap();
|
|
8665
|
-
var rememberResolvedData = (data, resolved) => resolvedVersions.set(data, resolved);
|
|
8666
|
+
var rememberResolvedData = (data, resolved) => resolvedVersions.set(data, resolvedVersions.get(resolved) ?? resolved);
|
|
8666
8667
|
var isDirty = ({
|
|
8667
8668
|
appState,
|
|
8668
8669
|
history
|
|
8669
|
-
}, version2) => history.histories.length > 1 && !deepEqual2(
|
|
8670
|
+
}, version2) => history.histories.length > 1 && !deepEqual2(
|
|
8671
|
+
appState.data,
|
|
8672
|
+
version2 && (resolvedVersions.get(version2.data) ?? version2.data)
|
|
8673
|
+
);
|
|
8670
8674
|
var usePageEditorState = () => {
|
|
8671
8675
|
const getPuck = useGetPuck();
|
|
8672
8676
|
return useMemo21(() => {
|
|
@@ -8674,9 +8678,9 @@ var usePageEditorState = () => {
|
|
|
8674
8678
|
const { config } = getPuck();
|
|
8675
8679
|
const pageData = { root: {}, content: [], ...data };
|
|
8676
8680
|
registerDynamicConfig(config, pageData);
|
|
8677
|
-
|
|
8681
|
+
let resolvedData = (data && resolvedVersions.get(data)) ?? await resolveAllData(pageData, config);
|
|
8682
|
+
if (isCurrent()) resolvedData = showData(resolvedData);
|
|
8678
8683
|
if (data) rememberResolvedData(data, resolvedData);
|
|
8679
|
-
if (isCurrent()) showData(resolvedData);
|
|
8680
8684
|
};
|
|
8681
8685
|
const showData = (data) => {
|
|
8682
8686
|
const { appState, history, dispatch } = getPuck();
|
|
@@ -8687,6 +8691,17 @@ var usePageEditorState = () => {
|
|
|
8687
8691
|
};
|
|
8688
8692
|
history.setHistories([{ state: nextState }]);
|
|
8689
8693
|
dispatch({ type: "set", state: nextState });
|
|
8694
|
+
const shownData = getPuck().appState.data;
|
|
8695
|
+
setTimeout(() => dropStaleHistory(nextState, shownData), 250);
|
|
8696
|
+
return shownData;
|
|
8697
|
+
};
|
|
8698
|
+
const dropStaleHistory = (shown, shownData) => {
|
|
8699
|
+
const { appState, history } = getPuck();
|
|
8700
|
+
const [first, ...rest] = history.histories;
|
|
8701
|
+
if (first?.state !== shown || !rest.length) return;
|
|
8702
|
+
history.setHistories(
|
|
8703
|
+
deepEqual2(appState.data, shownData) ? [{ state: appState }] : [first, { state: appState }]
|
|
8704
|
+
);
|
|
8690
8705
|
};
|
|
8691
8706
|
const unloadPageData = () => {
|
|
8692
8707
|
const { appState, history } = getPuck();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-pages",
|
|
3
|
-
"version": "0.9.0-canary.
|
|
3
|
+
"version": "0.9.0-canary.552a686b",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"zustand": "^5.0.8"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@puckeditor/core": "0.24.
|
|
34
|
+
"@puckeditor/core": "0.24.1-canary.2978ed6a",
|
|
35
35
|
"@radix-ui/react-popover": "^1.1.15",
|
|
36
36
|
"@testing-library/dom": "^10.4.1",
|
|
37
37
|
"@testing-library/react": "^16.3.2",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"typescript": "^5.5.4",
|
|
47
47
|
"vite-tsconfig-paths": "^5.1.4",
|
|
48
48
|
"vitest": "^4.1.11",
|
|
49
|
-
"
|
|
50
|
-
"tsup-config": "0.9.0-canary.
|
|
51
|
-
"
|
|
49
|
+
"eslint-config-custom": "0.9.0-canary.552a686b",
|
|
50
|
+
"tsup-config": "0.9.0-canary.552a686b",
|
|
51
|
+
"tsconfig": "0.9.0-canary.552a686b"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@puckeditor/core": "^0",
|