@plasmicapp/react-web 0.2.225 → 0.2.227
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 +5 -0
- package/dist/index.cjs.js +17 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +17 -4
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/PlasmicLink.d.ts +1 -0
- package/dist/render/ssr.d.ts +1 -0
- package/package.json +4 -4
- package/skinny/dist/index.js +3 -27
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +1 -1
- package/skinny/dist/plume/menu/index.js +1 -1
- package/skinny/dist/plume/menu-button/index.js +1 -1
- package/skinny/dist/plume/select/index.js +1 -1
- package/skinny/dist/plume/switch/index.js +1 -1
- package/skinny/dist/render/PlasmicLink.d.ts +1 -0
- package/skinny/dist/render/ssr.d.ts +1 -0
- package/skinny/dist/{ssr-e2ce462a.js → ssr-3ce4cefe.js} +44 -6
- package/skinny/dist/ssr-3ce4cefe.js.map +1 -0
- package/skinny/dist/ssr-e2ce462a.js.map +0 -1
package/dist/all.d.ts
CHANGED
|
@@ -11192,6 +11192,10 @@ interface CodeComponentMeta<P> {
|
|
|
11192
11192
|
* will always be named by the name of this component.
|
|
11193
11193
|
*/
|
|
11194
11194
|
alwaysAutoName?: boolean;
|
|
11195
|
+
/**
|
|
11196
|
+
* If true, then won't be listed in the insert menu for content creators.
|
|
11197
|
+
*/
|
|
11198
|
+
hideFromContentCreators?: boolean;
|
|
11195
11199
|
refActions?: Record<string, RefActionRegistration<P>>;
|
|
11196
11200
|
}
|
|
11197
11201
|
interface FunctionParam<P> {
|
|
@@ -12047,6 +12051,7 @@ interface PlasmicRootProviderProps extends PlasmicDataSourceContextValue {
|
|
|
12047
12051
|
*/
|
|
12048
12052
|
translator?: PlasmicTranslator;
|
|
12049
12053
|
Head?: React$1.ComponentType<any>;
|
|
12054
|
+
Link?: React$1.ComponentType<any>;
|
|
12050
12055
|
disableLoadingBoundary?: boolean;
|
|
12051
12056
|
suspenseFallback?: React$1.ReactNode;
|
|
12052
12057
|
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -7,9 +7,9 @@ var classNames$1 = require('classnames');
|
|
|
7
7
|
var dataSourcesContext = require('@plasmicapp/data-sources-context');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var get = require('dlv');
|
|
10
|
+
var host = require('@plasmicapp/host');
|
|
10
11
|
var ReactDOM = require('react-dom');
|
|
11
12
|
var ssr = require('@react-aria/ssr');
|
|
12
|
-
var host = require('@plasmicapp/host');
|
|
13
13
|
var focus = require('@react-aria/focus');
|
|
14
14
|
var valtio = require('valtio');
|
|
15
15
|
var clone = require('clone');
|
|
@@ -1399,6 +1399,18 @@ var PLASMIC_IMAGE_LOADER = {
|
|
|
1399
1399
|
};
|
|
1400
1400
|
|
|
1401
1401
|
var PlasmicLink = React__default['default'].forwardRef(function PlasmicLink(props, ref) {
|
|
1402
|
+
var _a;
|
|
1403
|
+
// The usePlasmicLinkMaybe function may be undefined, if host is not up-to-date
|
|
1404
|
+
var Link = (_a = host.usePlasmicLinkMaybe === null || host.usePlasmicLinkMaybe === void 0 ? void 0 : host.usePlasmicLinkMaybe()) !== null && _a !== void 0 ? _a : PlasmicLinkInternal;
|
|
1405
|
+
if (Link === PlasmicLink) {
|
|
1406
|
+
// Just in case, break the cycle
|
|
1407
|
+
return React__default['default'].createElement(PlasmicLinkInternal, __assign({}, props, { ref: ref }));
|
|
1408
|
+
}
|
|
1409
|
+
else {
|
|
1410
|
+
return React__default['default'].createElement(Link, __assign({}, props, { ref: ref }));
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
var PlasmicLinkInternal = React__default['default'].forwardRef(function PlasmicLinkInternal(props, ref) {
|
|
1402
1414
|
// props.href is required for nextjs; if no props.href,
|
|
1403
1415
|
// then we just render the default anchor element
|
|
1404
1416
|
if (props.platform === "nextjs" && props.href) {
|
|
@@ -1643,8 +1655,8 @@ function createUseScreenVariants(isMulti, screenQueries) {
|
|
|
1643
1655
|
|
|
1644
1656
|
var PlasmicRootContext = React__namespace.createContext(undefined);
|
|
1645
1657
|
function PlasmicRootProvider(props) {
|
|
1646
|
-
var _a;
|
|
1647
|
-
var platform = props.platform, children = props.children, userAuthToken = props.userAuthToken, isUserLoading = props.isUserLoading, authRedirectUri = props.authRedirectUri, user = props.user, disableLoadingBoundary = props.disableLoadingBoundary, suspenseFallback = props.suspenseFallback;
|
|
1658
|
+
var _a, _b;
|
|
1659
|
+
var platform = props.platform, children = props.children, userAuthToken = props.userAuthToken, isUserLoading = props.isUserLoading, authRedirectUri = props.authRedirectUri, user = props.user, disableLoadingBoundary = props.disableLoadingBoundary, suspenseFallback = props.suspenseFallback;
|
|
1648
1660
|
var context = React__namespace.useMemo(function () { return ({
|
|
1649
1661
|
platform: platform,
|
|
1650
1662
|
}); }, [platform]);
|
|
@@ -1661,7 +1673,8 @@ function PlasmicRootProvider(props) {
|
|
|
1661
1673
|
React__namespace.createElement(ssr.SSRProvider, null,
|
|
1662
1674
|
React__namespace.createElement(dataSourcesContext.PlasmicDataSourceContextProvider, { value: dataSourceContextValue },
|
|
1663
1675
|
React__namespace.createElement(PlasmicTranslatorContext.Provider, { value: (_a = props.i18n) !== null && _a !== void 0 ? _a : props.translator },
|
|
1664
|
-
React__namespace.createElement(PlasmicHeadContext.Provider, { value: props.Head },
|
|
1676
|
+
React__namespace.createElement(PlasmicHeadContext.Provider, { value: props.Head },
|
|
1677
|
+
React__namespace.createElement(host.PlasmicLinkProvider, { Link: (_b = props.Link) !== null && _b !== void 0 ? _b : PlasmicLinkInternal }, children))))))));
|
|
1665
1678
|
}
|
|
1666
1679
|
var useIsSSR = ssr.useIsSSR;
|
|
1667
1680
|
function useHasPlasmicRoot() {
|