@mgamadeus/ddd-design-studio 0.5.2 → 0.6.1

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.
@@ -623,6 +623,7 @@ var BoardNodeComponent = ({ id, data }) => {
623
623
  thumbnailVariant,
624
624
  showsLiveHtml: showsLiveHtml && isReady,
625
625
  htmlUrl,
626
+ runsScripts: board.runsScripts === true,
626
627
  title
627
628
  }
628
629
  ),
@@ -643,7 +644,7 @@ var BoardNodeComponent = ({ id, data }) => {
643
644
  src: liveHtmlUrl,
644
645
  onLoad: () => setLoadedFrameUrl(liveHtmlUrl),
645
646
  title: title || "Board",
646
- sandbox: "",
647
+ sandbox: boardSandbox(board),
647
648
  referrerPolicy: "no-referrer",
648
649
  loading: "lazy",
649
650
  width,
@@ -682,6 +683,7 @@ var BoardNodeComponent = ({ id, data }) => {
682
683
  ] });
683
684
  };
684
685
  var BoardNode = memo(BoardNodeComponent);
686
+ var boardSandbox = (board) => board?.runsScripts === true ? "allow-scripts" : "";
685
687
  var ResponsiveBoardFrames = ({
686
688
  board,
687
689
  frameHeightMode,
@@ -689,6 +691,7 @@ var ResponsiveBoardFrames = ({
689
691
  thumbnailVariant,
690
692
  showsLiveHtml,
691
693
  htmlUrl,
694
+ runsScripts,
692
695
  title
693
696
  }) => {
694
697
  let left = 0;
@@ -705,6 +708,7 @@ var ResponsiveBoardFrames = ({
705
708
  thumbnailVariant,
706
709
  showsLiveHtml,
707
710
  htmlUrl,
711
+ runsScripts,
708
712
  title
709
713
  },
710
714
  frame.deviceKey ?? frameLeft
@@ -719,6 +723,7 @@ var ResponsiveBoardFrame = ({
719
723
  thumbnailVariant,
720
724
  showsLiveHtml,
721
725
  htmlUrl,
726
+ runsScripts,
722
727
  title
723
728
  }) => {
724
729
  const texts = useDesignStudioTexts();
@@ -761,7 +766,7 @@ var ResponsiveBoardFrame = ({
761
766
  {
762
767
  src: liveHtmlUrl,
763
768
  title: `${title} \xB7 ${deviceLabel}`,
764
- sandbox: "",
769
+ sandbox: runsScripts ? "allow-scripts" : "",
765
770
  referrerPolicy: "no-referrer",
766
771
  loading: "lazy",
767
772
  width: frameWidth,
@@ -1086,7 +1091,7 @@ var BoardFocusView = ({
1086
1091
  ref: frameRef,
1087
1092
  src: htmlUrl,
1088
1093
  title: board.title ?? board.boardKey ?? "Board",
1089
- sandbox: isResponsive ? "allow-scripts" : "",
1094
+ sandbox: isResponsive ? "allow-scripts" : boardSandbox(board),
1090
1095
  referrerPolicy: "no-referrer",
1091
1096
  width,
1092
1097
  height: contentHeight,