@plasmicapp/react-web 0.2.393 → 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 +22 -50
- 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 +4 -4
- 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/render/Stack.d.ts
CHANGED
|
@@ -1,51 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export declare const Stack: (<T extends keyof JSX.IntrinsicElements = "div">(props: {
|
|
3
3
|
as?: T | undefined;
|
|
4
|
-
hasGap?: boolean | undefined;
|
|
5
4
|
} & React.ComponentProps<T>) => React.ReactElement) & {
|
|
6
|
-
div: React.FC<React.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
h3: React.FC<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
22
|
-
hasGap?: boolean | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
h4: React.FC<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
25
|
-
hasGap?: boolean | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
h5: React.FC<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
28
|
-
hasGap?: boolean | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
h6: React.FC<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
31
|
-
hasGap?: boolean | undefined;
|
|
32
|
-
}>;
|
|
33
|
-
label: React.FC<React.ClassAttributes<HTMLLabelElement> & React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
34
|
-
hasGap?: boolean | undefined;
|
|
35
|
-
}>;
|
|
36
|
-
form: React.FC<React.ClassAttributes<HTMLFormElement> & React.FormHTMLAttributes<HTMLFormElement> & {
|
|
37
|
-
hasGap?: boolean | undefined;
|
|
38
|
-
}>;
|
|
39
|
-
section: React.FC<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & {
|
|
40
|
-
hasGap?: boolean | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
head: React.FC<React.ClassAttributes<HTMLHeadElement> & React.HTMLAttributes<HTMLHeadElement> & {
|
|
43
|
-
hasGap?: boolean | undefined;
|
|
44
|
-
}>;
|
|
45
|
-
main: React.FC<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & {
|
|
46
|
-
hasGap?: boolean | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
nav: React.FC<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & {
|
|
49
|
-
hasGap?: boolean | undefined;
|
|
50
|
-
}>;
|
|
5
|
+
div: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
6
|
+
a: React.FC<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>>;
|
|
7
|
+
button: React.FC<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
8
|
+
h1: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
9
|
+
h2: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
10
|
+
h3: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
11
|
+
h4: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
12
|
+
h5: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
13
|
+
h6: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
14
|
+
label: React.FC<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>>;
|
|
15
|
+
form: React.FC<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>>;
|
|
16
|
+
section: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
17
|
+
head: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
18
|
+
main: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
19
|
+
nav: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
51
20
|
};
|
|
@@ -42,9 +42,6 @@ export type Flex<DefaultElementType extends React.ElementType> = (Omit<DefaultOv
|
|
|
42
42
|
render?: never;
|
|
43
43
|
}) | ((props: React.ComponentProps<DefaultElementType>) => React.ReactNode);
|
|
44
44
|
export declare function hasVariant<V extends Variants>(variants: V | undefined, groupName: keyof V, variant: string): any;
|
|
45
|
-
export declare function wrapFlexContainerChildren(children: React.ReactNode, hasGap: boolean): React.DetailedReactHTMLElement<{
|
|
46
|
-
className: string;
|
|
47
|
-
}, HTMLElement> | null;
|
|
48
45
|
export declare function createPlasmicElementProxy<DefaultElementType extends React.ElementType>(defaultElement: DefaultElementType, props: Partial<React.ComponentProps<DefaultElementType>>, ...children: React.ReactNode[]): React.ReactNode;
|
|
49
46
|
export declare function makeFragment(...children: React.ReactNode[]): React.FunctionComponentElement<{
|
|
50
47
|
children?: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/react-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.395",
|
|
4
4
|
"description": "plasmic library for rendering in the presentational style",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@plasmicapp/auth-react": "0.0.22",
|
|
99
|
-
"@plasmicapp/data-sources": "0.1.
|
|
99
|
+
"@plasmicapp/data-sources": "0.1.187",
|
|
100
100
|
"@plasmicapp/data-sources-context": "0.1.21",
|
|
101
|
-
"@plasmicapp/host": "1.0.
|
|
101
|
+
"@plasmicapp/host": "1.0.223",
|
|
102
102
|
"@plasmicapp/loader-splits": "1.0.64",
|
|
103
103
|
"@plasmicapp/nextjs-app-router": "1.0.16",
|
|
104
104
|
"@plasmicapp/prepass": "1.0.19",
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"react": ">=16.8.0",
|
|
156
156
|
"react-dom": ">=16.8.0"
|
|
157
157
|
},
|
|
158
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "ad56671cda3d4734f5ac2f56c805c07b06088935"
|
|
159
159
|
}
|
package/skinny/dist/index.js
CHANGED
|
@@ -146,20 +146,18 @@ function withPlasmicPageGuard(WrappedComponent, options) {
|
|
|
146
146
|
return PageGuard;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
function renderStack(as, props,
|
|
149
|
+
function renderStack(as, props, ref) {
|
|
150
150
|
var children = props.children, rest = __rest(props, ["children"]);
|
|
151
|
-
|
|
152
|
-
return createElementWithChildren(as, __assign({ ref: ref }, rest), wrappedChildren);
|
|
151
|
+
return createElementWithChildren(as, __assign({ ref: ref }, rest), children);
|
|
153
152
|
}
|
|
154
153
|
function FlexStack_(props, outerRef) {
|
|
155
|
-
var as = props.as,
|
|
156
|
-
return renderStack(as !== null && as !== void 0 ? as : "div", rest,
|
|
154
|
+
var as = props.as, rest = __rest(props, ["as"]);
|
|
155
|
+
return renderStack(as !== null && as !== void 0 ? as : "div", rest, outerRef);
|
|
157
156
|
}
|
|
158
157
|
var FlexStack = React.forwardRef(FlexStack_);
|
|
159
158
|
var makeStackImpl = function (as) {
|
|
160
159
|
return React.forwardRef(function (props, ref) {
|
|
161
|
-
|
|
162
|
-
return renderStack(as, rest, hasGap, ref);
|
|
160
|
+
return renderStack(as, props, ref);
|
|
163
161
|
});
|
|
164
162
|
};
|
|
165
163
|
var Stack = Object.assign(FlexStack, {
|
|
@@ -204,23 +202,7 @@ function hasVariant(variants, groupName, variant) {
|
|
|
204
202
|
return (groupVariants[variant] !== undefined && groupVariants[variant] !== false);
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
|
-
function
|
|
208
|
-
// We need to always wrap the children, even if there are no gaps, because
|
|
209
|
-
// otherwise if we toggle between with and without gap, React reconciliation
|
|
210
|
-
// will blow away the children tree and all state if we switch from having
|
|
211
|
-
// a wrapper and not.
|
|
212
|
-
var className = hasGap ? "__wab_flex-container ρfc" : "__wab_passthrough";
|
|
213
|
-
if (!children) {
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
else if (Array.isArray(children)) {
|
|
217
|
-
return React.createElement.apply(React, __spreadArray(["div", { className: className }], __read(children), false));
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
return React.createElement("div", { className: className }, children);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenInFlex) {
|
|
205
|
+
function createPlasmicElement(override, defaultRoot, defaultProps) {
|
|
224
206
|
if (!override ||
|
|
225
207
|
(typeof override === "object" && Object.keys(override).length === 0)) {
|
|
226
208
|
return createElementWithChildren(defaultRoot, defaultProps, defaultProps.children);
|
|
@@ -247,10 +229,6 @@ function createPlasmicElement(override, defaultRoot, defaultProps, wrapChildrenI
|
|
|
247
229
|
if (override2.wrapChildren) {
|
|
248
230
|
children = override2.wrapChildren(ensureNotArray(children));
|
|
249
231
|
}
|
|
250
|
-
if (wrapChildrenInFlex) {
|
|
251
|
-
// For legacy, we still support data-plasmic-wrap-flex-children
|
|
252
|
-
children = wrapFlexContainerChildren(children, true);
|
|
253
|
-
}
|
|
254
232
|
var result = createElementWithChildren(root, props, children);
|
|
255
233
|
if (override2.wrap) {
|
|
256
234
|
result = override2.wrap(result);
|
|
@@ -311,15 +289,13 @@ function createPlasmicElementFromJsx(defaultElement, props) {
|
|
|
311
289
|
children[_i - 2] = arguments[_i];
|
|
312
290
|
}
|
|
313
291
|
var override = props["data-plasmic-override"];
|
|
314
|
-
var wrapFlexChild = props["data-plasmic-wrap-flex-child"];
|
|
315
292
|
var triggerProps = ((_a = props["data-plasmic-trigger-props"]) !== null && _a !== void 0 ? _a : []);
|
|
316
293
|
delete props["data-plasmic-override"];
|
|
317
|
-
delete props["data-plasmic-wrap-flex-child"];
|
|
318
294
|
delete props["data-plasmic-trigger-props"];
|
|
319
295
|
return createPlasmicElement(override, defaultElement, mergeProps.apply(void 0, __spreadArray([props,
|
|
320
296
|
children.length === 0
|
|
321
297
|
? {}
|
|
322
|
-
: { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false))
|
|
298
|
+
: { children: children.length === 1 ? children[0] : children }], __read(triggerProps), false)));
|
|
323
299
|
}
|
|
324
300
|
function makeFragment() {
|
|
325
301
|
var children = [];
|