@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.
- package/dist/all.d.ts +15 -46
- package/dist/index.cjs.js +7 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +7 -31
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/Stack.d.ts +15 -46
- package/dist/render/elements.d.ts +0 -3
- package/package.json +2 -2
- package/skinny/dist/index.js +7 -31
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/render/Stack.d.ts +15 -46
- package/skinny/dist/render/elements.d.ts +0 -3
package/dist/all.d.ts
CHANGED
|
@@ -12876,53 +12876,22 @@ declare const useIsSSR: typeof useIsSSR$1;
|
|
|
12876
12876
|
|
|
12877
12877
|
declare const Stack: (<T extends keyof JSX.IntrinsicElements = "div">(props: {
|
|
12878
12878
|
as?: T | undefined;
|
|
12879
|
-
hasGap?: boolean | undefined;
|
|
12880
12879
|
} & React$1.ComponentProps<T>) => React$1.ReactElement) & {
|
|
12881
|
-
div: React$1.FC<React$1.
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
h3: React$1.FC<React$1.ClassAttributes<HTMLHeadingElement> & React$1.HTMLAttributes<HTMLHeadingElement> & {
|
|
12897
|
-
hasGap?: boolean | undefined;
|
|
12898
|
-
}>;
|
|
12899
|
-
h4: React$1.FC<React$1.ClassAttributes<HTMLHeadingElement> & React$1.HTMLAttributes<HTMLHeadingElement> & {
|
|
12900
|
-
hasGap?: boolean | undefined;
|
|
12901
|
-
}>;
|
|
12902
|
-
h5: React$1.FC<React$1.ClassAttributes<HTMLHeadingElement> & React$1.HTMLAttributes<HTMLHeadingElement> & {
|
|
12903
|
-
hasGap?: boolean | undefined;
|
|
12904
|
-
}>;
|
|
12905
|
-
h6: React$1.FC<React$1.ClassAttributes<HTMLHeadingElement> & React$1.HTMLAttributes<HTMLHeadingElement> & {
|
|
12906
|
-
hasGap?: boolean | undefined;
|
|
12907
|
-
}>;
|
|
12908
|
-
label: React$1.FC<React$1.ClassAttributes<HTMLLabelElement> & React$1.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
12909
|
-
hasGap?: boolean | undefined;
|
|
12910
|
-
}>;
|
|
12911
|
-
form: React$1.FC<React$1.ClassAttributes<HTMLFormElement> & React$1.FormHTMLAttributes<HTMLFormElement> & {
|
|
12912
|
-
hasGap?: boolean | undefined;
|
|
12913
|
-
}>;
|
|
12914
|
-
section: React$1.FC<React$1.ClassAttributes<HTMLElement> & React$1.HTMLAttributes<HTMLElement> & {
|
|
12915
|
-
hasGap?: boolean | undefined;
|
|
12916
|
-
}>;
|
|
12917
|
-
head: React$1.FC<React$1.ClassAttributes<HTMLHeadElement> & React$1.HTMLAttributes<HTMLHeadElement> & {
|
|
12918
|
-
hasGap?: boolean | undefined;
|
|
12919
|
-
}>;
|
|
12920
|
-
main: React$1.FC<React$1.ClassAttributes<HTMLElement> & React$1.HTMLAttributes<HTMLElement> & {
|
|
12921
|
-
hasGap?: boolean | undefined;
|
|
12922
|
-
}>;
|
|
12923
|
-
nav: React$1.FC<React$1.ClassAttributes<HTMLElement> & React$1.HTMLAttributes<HTMLElement> & {
|
|
12924
|
-
hasGap?: boolean | undefined;
|
|
12925
|
-
}>;
|
|
12880
|
+
div: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
12881
|
+
a: React$1.FC<React$1.DetailedHTMLProps<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>>;
|
|
12882
|
+
button: React$1.FC<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
12883
|
+
h1: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12884
|
+
h2: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12885
|
+
h3: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12886
|
+
h4: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12887
|
+
h5: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12888
|
+
h6: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12889
|
+
label: React$1.FC<React$1.DetailedHTMLProps<React$1.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>>;
|
|
12890
|
+
form: React$1.FC<React$1.DetailedHTMLProps<React$1.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>>;
|
|
12891
|
+
section: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
12892
|
+
head: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
12893
|
+
main: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
12894
|
+
nav: React$1.FC<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
12926
12895
|
};
|
|
12927
12896
|
|
|
12928
12897
|
declare const usePlasmicTranslator: typeof usePlasmicTranslator$1;
|
package/dist/index.cjs.js
CHANGED
|
@@ -656,20 +656,18 @@ function getElementTypeName(element) {
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
|
|
659
|
-
function renderStack(as, props,
|
|
659
|
+
function renderStack(as, props, ref) {
|
|
660
660
|
var children = props.children, rest = __rest(props, ["children"]);
|
|
661
|
-
|
|
662
|
-
return createElementWithChildren(as, __assign({ ref: ref }, rest), wrappedChildren);
|
|
661
|
+
return createElementWithChildren(as, __assign({ ref: ref }, rest), children);
|
|
663
662
|
}
|
|
664
663
|
function FlexStack_(props, outerRef) {
|
|
665
|
-
var as = props.as,
|
|
666
|
-
return renderStack(as !== null && as !== void 0 ? as : "div", rest,
|
|
664
|
+
var as = props.as, rest = __rest(props, ["as"]);
|
|
665
|
+
return renderStack(as !== null && as !== void 0 ? as : "div", rest, outerRef);
|
|
667
666
|
}
|
|
668
667
|
var FlexStack = React__namespace.forwardRef(FlexStack_);
|
|
669
668
|
var makeStackImpl = function (as) {
|
|
670
669
|
return React__namespace.forwardRef(function (props, ref) {
|
|
671
|
-
|
|
672
|
-
return renderStack(as, rest, hasGap, ref);
|
|
670
|
+
return renderStack(as, props, ref);
|
|
673
671
|
});
|
|
674
672
|
};
|
|
675
673
|
var Stack = Object.assign(FlexStack, {
|
|
@@ -714,23 +712,7 @@ function hasVariant(variants, groupName, variant) {
|
|
|
714
712
|
return (groupVariants[variant] !== undefined && groupVariants[variant] !== false);
|
|
715
713
|
}
|
|
716
714
|
}
|
|
717
|
-
function
|
|
718
|
-
// We need to always wrap the children, even if there are no gaps, because
|
|
719
|
-
// otherwise if we toggle between with and without gap, React reconciliation
|
|
720
|
-
// will blow away the children tree and all state if we switch from having
|
|
721
|
-
// a wrapper and not.
|
|
722
|
-
var className = hasGap ? "__wab_flex-container ρfc" : "__wab_passthrough";
|
|
723
|
-
if (!children) {
|
|
724
|
-
return null;
|
|
725
|
-
}
|
|
726
|
-
else if (Array.isArray(children)) {
|
|
727
|
-
return React__namespace.createElement.apply(React__namespace, __spreadArray(["div", { className: className }], __read(children), false));
|
|
728
|
-
}
|
|
729
|
-
else {
|
|
730
|
-
return React__namespace.createElement("div", { className: className }, children);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenInFlex) {
|
|
715
|
+
function createPlasmicElement(override, defaultRoot, defaultProps) {
|
|
734
716
|
if (!override ||
|
|
735
717
|
(typeof override === "object" && Object.keys(override).length === 0)) {
|
|
736
718
|
return createElementWithChildren(defaultRoot, defaultProps, defaultProps.children);
|
|
@@ -757,10 +739,6 @@ function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenI
|
|
|
757
739
|
if (override2.wrapChildren) {
|
|
758
740
|
children = override2.wrapChildren(ensureNotArray(children));
|
|
759
741
|
}
|
|
760
|
-
if (wrapChildrenInFlex) {
|
|
761
|
-
// For legacy, we still support data-plasmic-wrap-flex-children
|
|
762
|
-
children = wrapFlexContainerChildren(children, true);
|
|
763
|
-
}
|
|
764
742
|
var result = createElementWithChildren(root, props, children);
|
|
765
743
|
if (override2.wrap) {
|
|
766
744
|
result = override2.wrap(result);
|
|
@@ -821,15 +799,13 @@ function createPlasmicElementFromJsx(defaultElement, props) {
|
|
|
821
799
|
children[_i - 2] = arguments[_i];
|
|
822
800
|
}
|
|
823
801
|
var override = props["data-plasmic-override"];
|
|
824
|
-
var wrapFlexChild = props["data-plasmic-wrap-flex-child"];
|
|
825
802
|
var triggerProps = ((_a = props["data-plasmic-trigger-props"]) !== null && _a !== void 0 ? _a : []);
|
|
826
803
|
delete props["data-plasmic-override"];
|
|
827
|
-
delete props["data-plasmic-wrap-flex-child"];
|
|
828
804
|
delete props["data-plasmic-trigger-props"];
|
|
829
805
|
return createPlasmicElement(override, defaultElement, mergeProps.apply(void 0, __spreadArray([props,
|
|
830
806
|
children.length === 0
|
|
831
807
|
? {}
|
|
832
|
-
: { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false))
|
|
808
|
+
: { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false)));
|
|
833
809
|
}
|
|
834
810
|
function makeFragment() {
|
|
835
811
|
var children = [];
|