@makeswift/runtime 0.2.10 → 0.2.13
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/Form.cjs.js +5 -1
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +5 -1
- package/dist/Form.es.js.map +1 -1
- package/dist/index.cjs.js +20 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +21 -2
- package/dist/index.es.js.map +1 -1
- package/dist/react-builder-preview.es.js +1 -1
- package/dist/react-page.cjs.js +364 -0
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +363 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/index.d.ts.map +1 -1
- package/dist/types/src/next/api-handler.d.ts +4 -1
- package/dist/types/src/next/api-handler.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/copy/backgrounds.d.ts +57 -0
- package/dist/types/src/prop-controllers/copy/backgrounds.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/border.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/border.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/element-id.d.ts +3 -0
- package/dist/types/src/prop-controllers/copy/element-id.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/grid.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/grid.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/image.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/image.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/images.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/images.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/link.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/link.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/navigation-links.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/navigation-links.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/responsive-color.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/responsive-color.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/rich-text.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/rich-text.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/shadows.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/shadows.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/table-form-fields.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/table-form-fields.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy/table.d.ts +4 -0
- package/dist/types/src/prop-controllers/copy/table.d.ts.map +1 -0
- package/dist/types/src/prop-controllers/copy.d.ts +5 -0
- package/dist/types/src/prop-controllers/copy.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/index.d.ts +1 -0
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/state/react-page.d.ts +51 -0
- package/dist/types/src/state/react-page.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/react-page.es.js
CHANGED
|
@@ -468,6 +468,329 @@ function getPageIds(descriptor, prop) {
|
|
|
468
468
|
return [];
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
+
function copy$d(value, context) {
|
|
472
|
+
if (value == null)
|
|
473
|
+
return value;
|
|
474
|
+
return value.map((override) => __spreadProps(__spreadValues({}, override), {
|
|
475
|
+
value: override.value.map((backgroundItem) => {
|
|
476
|
+
var _a, _b;
|
|
477
|
+
switch (backgroundItem.type) {
|
|
478
|
+
case "color":
|
|
479
|
+
return __spreadProps(__spreadValues({}, backgroundItem), {
|
|
480
|
+
payload: backgroundItem.payload === null ? null : __spreadProps(__spreadValues({}, backgroundItem.payload), {
|
|
481
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(backgroundItem.payload.swatchId)) != null ? _a : backgroundItem.payload.swatchId
|
|
482
|
+
})
|
|
483
|
+
});
|
|
484
|
+
case "gradient":
|
|
485
|
+
return __spreadProps(__spreadValues({}, backgroundItem), {
|
|
486
|
+
payload: __spreadProps(__spreadValues({}, backgroundItem.payload), {
|
|
487
|
+
stops: backgroundItem.payload.stops.map((stop) => {
|
|
488
|
+
var _a2;
|
|
489
|
+
return __spreadProps(__spreadValues({}, stop), {
|
|
490
|
+
color: stop.color == null ? null : __spreadProps(__spreadValues({}, stop.color), {
|
|
491
|
+
swatchId: (_a2 = context.replacementContext.swatchIds.get(stop.color.swatchId)) != null ? _a2 : stop.color.swatchId
|
|
492
|
+
})
|
|
493
|
+
});
|
|
494
|
+
})
|
|
495
|
+
})
|
|
496
|
+
});
|
|
497
|
+
case "image":
|
|
498
|
+
return __spreadProps(__spreadValues({}, backgroundItem), {
|
|
499
|
+
payload: __spreadProps(__spreadValues({}, backgroundItem.payload), {
|
|
500
|
+
imageId: (_b = context.replacementContext.fileIds.get(backgroundItem.payload.imageId)) != null ? _b : backgroundItem.payload.imageId
|
|
501
|
+
})
|
|
502
|
+
});
|
|
503
|
+
default:
|
|
504
|
+
return backgroundItem;
|
|
505
|
+
}
|
|
506
|
+
})
|
|
507
|
+
}));
|
|
508
|
+
}
|
|
509
|
+
function copy$c(value, context) {
|
|
510
|
+
return __spreadProps(__spreadValues({}, value), {
|
|
511
|
+
elements: value.elements.map((element) => context.copyElement(element))
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
function copy$b(value, context) {
|
|
515
|
+
var _a, _b;
|
|
516
|
+
if (value == null)
|
|
517
|
+
return value;
|
|
518
|
+
switch (value.type) {
|
|
519
|
+
case "OPEN_PAGE": {
|
|
520
|
+
const pageId = value.payload.pageId;
|
|
521
|
+
if (pageId == null)
|
|
522
|
+
return value;
|
|
523
|
+
return __spreadProps(__spreadValues({}, value), {
|
|
524
|
+
payload: __spreadProps(__spreadValues({}, value.payload), {
|
|
525
|
+
pageId: (_a = context.replacementContext.pageIds.get(pageId)) != null ? _a : pageId
|
|
526
|
+
})
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
case "SCROLL_TO_ELEMENT": {
|
|
530
|
+
const elementIdConfig = value.payload.elementIdConfig;
|
|
531
|
+
if (elementIdConfig == null)
|
|
532
|
+
return value;
|
|
533
|
+
return __spreadProps(__spreadValues({}, value), {
|
|
534
|
+
payload: __spreadProps(__spreadValues({}, value.payload), {
|
|
535
|
+
elementIdConfig: __spreadProps(__spreadValues({}, elementIdConfig), {
|
|
536
|
+
elementKey: (_b = context.replacementContext.elementKeys.get(elementIdConfig.elementKey)) != null ? _b : elementIdConfig.elementKey
|
|
537
|
+
})
|
|
538
|
+
})
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
default:
|
|
542
|
+
return value;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function copy$a(value, context) {
|
|
546
|
+
if (value == null)
|
|
547
|
+
return value;
|
|
548
|
+
return value.map(copyNavigationLinksPanelItem);
|
|
549
|
+
function copyNavigationLinksPanelItem(item) {
|
|
550
|
+
switch (item.type) {
|
|
551
|
+
case "button":
|
|
552
|
+
case "dropdown": {
|
|
553
|
+
const { color, link } = item.payload;
|
|
554
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
555
|
+
payload: __spreadProps(__spreadValues({}, item.payload), {
|
|
556
|
+
link: link != null ? copy$b(link, context) : void 0,
|
|
557
|
+
color: color != null ? color.map((override) => {
|
|
558
|
+
var _a;
|
|
559
|
+
return __spreadProps(__spreadValues({}, override), {
|
|
560
|
+
value: __spreadProps(__spreadValues({}, override.value), {
|
|
561
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(override.value.swatchId)) != null ? _a : override.value.swatchId
|
|
562
|
+
})
|
|
563
|
+
});
|
|
564
|
+
}) : void 0
|
|
565
|
+
})
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
default:
|
|
569
|
+
return item;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function copy$9(value, context) {
|
|
574
|
+
if (value == null)
|
|
575
|
+
return value;
|
|
576
|
+
return value.map((override) => __spreadProps(__spreadValues({}, override), { value: override.value.map(copyShadowItem) }));
|
|
577
|
+
function copyShadowItem(item) {
|
|
578
|
+
var _a;
|
|
579
|
+
const { color } = item.payload;
|
|
580
|
+
if (color == null)
|
|
581
|
+
return item;
|
|
582
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
583
|
+
payload: __spreadProps(__spreadValues({}, item.payload), {
|
|
584
|
+
color: __spreadProps(__spreadValues({}, color), {
|
|
585
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(color.swatchId)) != null ? _a : color.swatchId
|
|
586
|
+
})
|
|
587
|
+
})
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function copy$8(value, context) {
|
|
592
|
+
var _a;
|
|
593
|
+
if (value == null)
|
|
594
|
+
return value;
|
|
595
|
+
return (_a = context.replacementContext.fileIds.get(value)) != null ? _a : value;
|
|
596
|
+
}
|
|
597
|
+
function copy$7(value, context) {
|
|
598
|
+
if (value == null)
|
|
599
|
+
return value;
|
|
600
|
+
return value.map(copyImagesPanelItem);
|
|
601
|
+
function copyImagesPanelItem(imagesPanelItem) {
|
|
602
|
+
var _a;
|
|
603
|
+
const { file } = imagesPanelItem.props;
|
|
604
|
+
if (file == null)
|
|
605
|
+
return imagesPanelItem;
|
|
606
|
+
return __spreadProps(__spreadValues({}, imagesPanelItem), {
|
|
607
|
+
props: __spreadProps(__spreadValues({}, imagesPanelItem.props), {
|
|
608
|
+
file: (_a = context.replacementContext.fileIds.get(file)) != null ? _a : file
|
|
609
|
+
})
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
function copy$6(value, context) {
|
|
614
|
+
if (value == null)
|
|
615
|
+
return value;
|
|
616
|
+
return value.map((override) => __spreadProps(__spreadValues({}, override), { value: copyColorValue(override.value) }));
|
|
617
|
+
function copyColorValue(colorValue) {
|
|
618
|
+
var _a;
|
|
619
|
+
return __spreadProps(__spreadValues({}, colorValue), {
|
|
620
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(colorValue.swatchId)) != null ? _a : colorValue.swatchId
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function copy$5(value, context) {
|
|
625
|
+
if (value == null)
|
|
626
|
+
return value;
|
|
627
|
+
return __spreadProps(__spreadValues({}, value), { fields: value.fields.map(copyFormFieldsPanelItem) });
|
|
628
|
+
function copyFormFieldsPanelItem(item) {
|
|
629
|
+
var _a;
|
|
630
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
631
|
+
tableColumnId: (_a = context.replacementContext.tableColumnIds.get(item.tableColumnId)) != null ? _a : item.tableColumnId
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
function copy$4(value, context) {
|
|
636
|
+
var _a;
|
|
637
|
+
if (value == null)
|
|
638
|
+
return value;
|
|
639
|
+
return (_a = context.replacementContext.tableIds.get(value)) != null ? _a : value;
|
|
640
|
+
}
|
|
641
|
+
function copy$3(value, context) {
|
|
642
|
+
if (value == null)
|
|
643
|
+
return value;
|
|
644
|
+
return value.map((override) => __spreadProps(__spreadValues({}, override), { value: copyBorderValue(override.value) }));
|
|
645
|
+
function copyBorderValue({ borderTop, borderRight, borderBottom, borderLeft }) {
|
|
646
|
+
return {
|
|
647
|
+
borderTop: borderTop && copyBorderSide(borderTop),
|
|
648
|
+
borderRight: borderRight && copyBorderSide(borderRight),
|
|
649
|
+
borderBottom: borderBottom && copyBorderSide(borderBottom),
|
|
650
|
+
borderLeft: borderLeft && copyBorderSide(borderLeft)
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
function copyBorderSide(borderSide) {
|
|
654
|
+
var _a;
|
|
655
|
+
const { color } = borderSide;
|
|
656
|
+
if (color == null)
|
|
657
|
+
return borderSide;
|
|
658
|
+
return __spreadProps(__spreadValues({}, borderSide), {
|
|
659
|
+
color: __spreadProps(__spreadValues({}, color), {
|
|
660
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(color.swatchId)) != null ? _a : color.swatchId
|
|
661
|
+
})
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
function copy$2(value, context) {
|
|
666
|
+
if (value == null)
|
|
667
|
+
return value;
|
|
668
|
+
return __spreadProps(__spreadValues({}, value), { document: value.document ? copyNode(value.document) : value.document });
|
|
669
|
+
function copyNode(node) {
|
|
670
|
+
var _a;
|
|
671
|
+
switch (node.object) {
|
|
672
|
+
case "document":
|
|
673
|
+
case "block":
|
|
674
|
+
case "inline":
|
|
675
|
+
return copyInline(node);
|
|
676
|
+
case "text":
|
|
677
|
+
return __spreadProps(__spreadValues({}, node), { marks: (_a = node.marks) == null ? void 0 : _a.map(copyMark) });
|
|
678
|
+
default:
|
|
679
|
+
return node;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
function copyInline(inline) {
|
|
683
|
+
var _a, _b;
|
|
684
|
+
switch (inline.type) {
|
|
685
|
+
case "link":
|
|
686
|
+
return __spreadProps(__spreadValues({}, inline), {
|
|
687
|
+
nodes: (_a = inline.nodes) == null ? void 0 : _a.map(copyNode),
|
|
688
|
+
data: inline.data ? copyLinkData(inline.data) : inline.data
|
|
689
|
+
});
|
|
690
|
+
default:
|
|
691
|
+
return __spreadProps(__spreadValues({}, inline), { nodes: (_b = inline.nodes) == null ? void 0 : _b.map(copyNode) });
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function copyLinkData(data) {
|
|
695
|
+
var _a, _b;
|
|
696
|
+
switch (data.type) {
|
|
697
|
+
case "OPEN_PAGE": {
|
|
698
|
+
const pageId = data.payload.pageId;
|
|
699
|
+
if (pageId == null)
|
|
700
|
+
return data;
|
|
701
|
+
return __spreadProps(__spreadValues({}, data), {
|
|
702
|
+
payload: __spreadProps(__spreadValues({}, data.payload), {
|
|
703
|
+
pageId: (_a = context.replacementContext.pageIds.get(pageId)) != null ? _a : data.payload.pageId
|
|
704
|
+
})
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
case "SCROLL_TO_ELEMENT": {
|
|
708
|
+
const elementIdConfig = data.payload.elementIdConfig;
|
|
709
|
+
if (elementIdConfig == null)
|
|
710
|
+
return data;
|
|
711
|
+
return __spreadProps(__spreadValues({}, data), {
|
|
712
|
+
payload: __spreadProps(__spreadValues({}, data.payload), {
|
|
713
|
+
elementIdConfig: __spreadProps(__spreadValues({}, elementIdConfig), {
|
|
714
|
+
elementKey: (_b = context.replacementContext.elementKeys.get(elementIdConfig.elementKey)) != null ? _b : elementIdConfig.elementKey
|
|
715
|
+
})
|
|
716
|
+
})
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
default:
|
|
720
|
+
return data;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
function copyMark(mark) {
|
|
724
|
+
var _a, _b, _c, _d;
|
|
725
|
+
switch (mark.type) {
|
|
726
|
+
case "typography": {
|
|
727
|
+
const typographyId = (_a = mark.data) == null ? void 0 : _a.value.id;
|
|
728
|
+
return __spreadProps(__spreadValues({}, mark), {
|
|
729
|
+
data: __spreadProps(__spreadValues({}, mark.data), {
|
|
730
|
+
value: __spreadProps(__spreadValues({}, (_b = mark.data) == null ? void 0 : _b.value), {
|
|
731
|
+
id: (_c = context.replacementContext.typographyIds.get(typographyId)) != null ? _c : typographyId,
|
|
732
|
+
style: (_d = mark.data) == null ? void 0 : _d.value.style.map((override) => {
|
|
733
|
+
var _a2, _b2, _c2;
|
|
734
|
+
return __spreadProps(__spreadValues({}, override), {
|
|
735
|
+
value: __spreadProps(__spreadValues({}, override.value), {
|
|
736
|
+
color: override.value.color == null ? override.value.color : __spreadProps(__spreadValues({}, override.value.color), {
|
|
737
|
+
swatchId: (_c2 = context.replacementContext.swatchIds.get((_a2 = override.value.color) == null ? void 0 : _a2.swatchId)) != null ? _c2 : (_b2 = override.value.color) == null ? void 0 : _b2.swatchId
|
|
738
|
+
})
|
|
739
|
+
})
|
|
740
|
+
});
|
|
741
|
+
})
|
|
742
|
+
})
|
|
743
|
+
})
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
default:
|
|
747
|
+
return mark;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
function copy$1(value, context) {
|
|
752
|
+
if (value == null)
|
|
753
|
+
return value;
|
|
754
|
+
if (context.replacementContext.elementHtmlIds.has(value))
|
|
755
|
+
return void 0;
|
|
756
|
+
context.replacementContext.elementHtmlIds.add(value);
|
|
757
|
+
return value;
|
|
758
|
+
}
|
|
759
|
+
function copy(descriptor, value, context) {
|
|
760
|
+
switch (descriptor.type) {
|
|
761
|
+
case "Backgrounds":
|
|
762
|
+
return copy$d(value, context);
|
|
763
|
+
case "Grid":
|
|
764
|
+
return copy$c(value, context);
|
|
765
|
+
case "NavigationLinks":
|
|
766
|
+
return copy$a(value, context);
|
|
767
|
+
case "Link":
|
|
768
|
+
return copy$b(value, context);
|
|
769
|
+
case "Shadows":
|
|
770
|
+
return copy$9(value, context);
|
|
771
|
+
case "Image":
|
|
772
|
+
return copy$8(value, context);
|
|
773
|
+
case "Images":
|
|
774
|
+
return copy$7(value, context);
|
|
775
|
+
case "ResponsiveColor":
|
|
776
|
+
return copy$6(value, context);
|
|
777
|
+
case "TableFormFields":
|
|
778
|
+
return copy$5(value, context);
|
|
779
|
+
case "Table":
|
|
780
|
+
return copy$4(value, context);
|
|
781
|
+
case "Border":
|
|
782
|
+
return copy$3(value, context);
|
|
783
|
+
case "RichText":
|
|
784
|
+
return copy$2(value, context);
|
|
785
|
+
case "ElementID":
|
|
786
|
+
return copy$1(value, context);
|
|
787
|
+
default:
|
|
788
|
+
return value;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
function copyElementReference(value, context) {
|
|
792
|
+
return context.replacementContext.globalElementIds.get(value) || value;
|
|
793
|
+
}
|
|
471
794
|
const reducer = combineReducers({
|
|
472
795
|
documents: reducer$6,
|
|
473
796
|
reactComponents: reducer$5,
|
|
@@ -553,6 +876,45 @@ function getElementId(state, documentKey, elementKey) {
|
|
|
553
876
|
}, null);
|
|
554
877
|
return elementId;
|
|
555
878
|
}
|
|
879
|
+
function createReplacementContext(jsonReplacementContext) {
|
|
880
|
+
const rc = {
|
|
881
|
+
elementHtmlIds: new Set(jsonReplacementContext.elementHtmlIds),
|
|
882
|
+
elementKeys: new Map(jsonReplacementContext.elementKeys && Object.entries(jsonReplacementContext.elementKeys)),
|
|
883
|
+
swatchIds: new Map(jsonReplacementContext.swatchIds && Object.entries(jsonReplacementContext.swatchIds)),
|
|
884
|
+
fileIds: new Map(jsonReplacementContext.fileIds && Object.entries(jsonReplacementContext.fileIds)),
|
|
885
|
+
typographyIds: new Map(jsonReplacementContext.typographyIds && Object.entries(jsonReplacementContext.typographyIds)),
|
|
886
|
+
tableIds: new Map(jsonReplacementContext.tableIds && Object.entries(jsonReplacementContext.tableIds)),
|
|
887
|
+
tableColumnIds: new Map(jsonReplacementContext.tableColumnIds && Object.entries(jsonReplacementContext.tableColumnIds)),
|
|
888
|
+
pageIds: new Map(jsonReplacementContext.pageIds && Object.entries(jsonReplacementContext.pageIds)),
|
|
889
|
+
globalElementIds: new Map(jsonReplacementContext.globalElementIds && Object.entries(jsonReplacementContext.globalElementIds)),
|
|
890
|
+
globalElementData: new Map(jsonReplacementContext.globalElementData && Object.entries(jsonReplacementContext.globalElementData))
|
|
891
|
+
};
|
|
892
|
+
return rc;
|
|
893
|
+
}
|
|
894
|
+
function copyElementTree(state, elementTree, replacementContext) {
|
|
895
|
+
function copyElementTreeNode(state2, replacementContext2) {
|
|
896
|
+
return function(node) {
|
|
897
|
+
const context = {
|
|
898
|
+
replacementContext: replacementContext2,
|
|
899
|
+
copyElement: copyElementTreeNode(state2, replacementContext2)
|
|
900
|
+
};
|
|
901
|
+
if ("props" in node) {
|
|
902
|
+
for (const propKey of Object.keys(node.props)) {
|
|
903
|
+
const descriptors = getComponentPropControllerDescriptors(state2, node.type);
|
|
904
|
+
if (descriptors == null)
|
|
905
|
+
continue;
|
|
906
|
+
const descriptor = descriptors[propKey];
|
|
907
|
+
node.props[propKey] = copy(descriptor, node.props[propKey], context);
|
|
908
|
+
}
|
|
909
|
+
} else if (node.type === "reference") {
|
|
910
|
+
return __spreadProps(__spreadValues({}, node), { value: copyElementReference(node.value, context) });
|
|
911
|
+
}
|
|
912
|
+
return node;
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
const copy$12 = JSON.parse(JSON.stringify(elementTree));
|
|
916
|
+
return copyElementTreeNode(state, replacementContext)(copy$12);
|
|
917
|
+
}
|
|
556
918
|
function getIsInBuilder(state) {
|
|
557
919
|
return state.isInBuilder;
|
|
558
920
|
}
|
|
@@ -562,5 +924,5 @@ function configureStore({
|
|
|
562
924
|
} = {}) {
|
|
563
925
|
return createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$5({ rootElements }) }), applyMiddleware(thunk));
|
|
564
926
|
}
|
|
565
|
-
export {
|
|
927
|
+
export { reducer$1 as A, getComponentsMeta as B, getComponentPropControllerDescriptors$1 as C, getPropController as D, getPropControllersHandle as E, getElement as F, getElementPropControllerDescriptors as G, isPropControllersHandle as H, getElementSwatchIds as a, getFileIds as b, createDocument as c, getTypographyIds as d, getTableIds as e, getPageIds as f, getPropControllerDescriptors as g, getElementChildren as h, isElementReference as i, createDocumentReference as j, createReplacementContext as k, getComponentPropControllerDescriptors as l, getPropControllers as m, configureStore as n, getDocument as o, getElementId as p, getIsInBuilder as q, copyElementTree as r, getReactComponent as s, getInitialState$5 as t, reducer$6 as u, getDocument$1 as v, reducer$5 as w, reducer$4 as x, reducer$3 as y, reducer$2 as z };
|
|
566
928
|
//# sourceMappingURL=react-page.es.js.map
|