@plasmicapp/react-web 0.2.394 → 0.2.395

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.
@@ -637,20 +637,18 @@ function getElementTypeName(element) {
637
637
  }
638
638
  }
639
639
 
640
- function renderStack(as, props, hasGap, ref) {
640
+ function renderStack(as, props, ref) {
641
641
  var children = props.children, rest = __rest(props, ["children"]);
642
- var wrappedChildren = wrapFlexContainerChildren(children, hasGap !== null && hasGap !== void 0 ? hasGap : false);
643
- return createElementWithChildren(as, __assign({ ref: ref }, rest), wrappedChildren);
642
+ return createElementWithChildren(as, __assign({ ref: ref }, rest), children);
644
643
  }
645
644
  function FlexStack_(props, outerRef) {
646
- var as = props.as, hasGap = props.hasGap, rest = __rest(props, ["as", "hasGap"]);
647
- return renderStack(as !== null && as !== void 0 ? as : "div", rest, hasGap, outerRef);
645
+ var as = props.as, rest = __rest(props, ["as"]);
646
+ return renderStack(as !== null && as !== void 0 ? as : "div", rest, outerRef);
648
647
  }
649
648
  var FlexStack = React.forwardRef(FlexStack_);
650
649
  var makeStackImpl = function (as) {
651
650
  return React.forwardRef(function (props, ref) {
652
- var hasGap = props.hasGap, rest = __rest(props, ["hasGap"]);
653
- return renderStack(as, rest, hasGap, ref);
651
+ return renderStack(as, props, ref);
654
652
  });
655
653
  };
656
654
  var Stack = Object.assign(FlexStack, {
@@ -695,23 +693,7 @@ function hasVariant(variants, groupName, variant) {
695
693
  return (groupVariants[variant] !== undefined && groupVariants[variant] !== false);
696
694
  }
697
695
  }
698
- function wrapFlexContainerChildren(children, hasGap) {
699
- // We need to always wrap the children, even if there are no gaps, because
700
- // otherwise if we toggle between with and without gap, React reconciliation
701
- // will blow away the children tree and all state if we switch from having
702
- // a wrapper and not.
703
- var className = hasGap ? "__wab_flex-container ρfc" : "__wab_passthrough";
704
- if (!children) {
705
- return null;
706
- }
707
- else if (Array.isArray(children)) {
708
- return React.createElement.apply(React, __spreadArray(["div", { className: className }], __read(children), false));
709
- }
710
- else {
711
- return React.createElement("div", { className: className }, children);
712
- }
713
- }
714
- function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenInFlex) {
696
+ function createPlasmicElement(override, defaultRoot, defaultProps) {
715
697
  if (!override ||
716
698
  (typeof override === "object" && Object.keys(override).length === 0)) {
717
699
  return createElementWithChildren(defaultRoot, defaultProps, defaultProps.children);
@@ -738,10 +720,6 @@ function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenI
738
720
  if (override2.wrapChildren) {
739
721
  children = override2.wrapChildren(ensureNotArray(children));
740
722
  }
741
- if (wrapChildrenInFlex) {
742
- // For legacy, we still support data-plasmic-wrap-flex-children
743
- children = wrapFlexContainerChildren(children, true);
744
- }
745
723
  var result = createElementWithChildren(root, props, children);
746
724
  if (override2.wrap) {
747
725
  result = override2.wrap(result);
@@ -802,15 +780,13 @@ function createPlasmicElementFromJsx(defaultElement, props) {
802
780
  children[_i - 2] = arguments[_i];
803
781
  }
804
782
  var override = props["data-plasmic-override"];
805
- var wrapFlexChild = props["data-plasmic-wrap-flex-child"];
806
783
  var triggerProps = ((_a = props["data-plasmic-trigger-props"]) !== null && _a !== void 0 ? _a : []);
807
784
  delete props["data-plasmic-override"];
808
- delete props["data-plasmic-wrap-flex-child"];
809
785
  delete props["data-plasmic-trigger-props"];
810
786
  return createPlasmicElement(override, defaultElement, mergeProps.apply(void 0, __spreadArray([props,
811
787
  children.length === 0
812
788
  ? {}
813
- : { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false)), wrapFlexChild);
789
+ : { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false)));
814
790
  }
815
791
  function makeFragment() {
816
792
  var children = [];