@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
|
@@ -6,7 +6,7 @@ import { useSelect as useSelect$1, HiddenSelect } from '@react-aria/select';
|
|
|
6
6
|
import { useSelectState } from '@react-stately/select';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { m as mergeProps, d as mergeRefs } from '../../react-utils-5ff031c2.js';
|
|
9
|
-
import {
|
|
9
|
+
import { b as useEnsureSSRProvider } from '../../ssr-3ce4cefe.js';
|
|
10
10
|
import { g as getChildProp, r as renderCollectionNode, b as useDerivedItems, a as renderAsCollectionChild } from '../../collection-utils-2f28e4eb.js';
|
|
11
11
|
import { m as mergeVariantToggles, n as noOutline } from '../../plume-utils-e699cd08.js';
|
|
12
12
|
import { g as getStyleProps } from '../../props-utils-9d74371f.js';
|
|
@@ -4,7 +4,7 @@ import { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
|
4
4
|
import { useToggleState } from '@react-stately/toggle';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { m as mergeProps } from '../../react-utils-5ff031c2.js';
|
|
7
|
-
import {
|
|
7
|
+
import { b as useEnsureSSRProvider } from '../../ssr-3ce4cefe.js';
|
|
8
8
|
import { m as mergeVariantToggles } from '../../plume-utils-e699cd08.js';
|
|
9
9
|
import { g as getStyleProps } from '../../props-utils-9d74371f.js';
|
|
10
10
|
import 'classnames';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const PlasmicLink: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>;
|
|
3
|
+
export declare const PlasmicLinkInternal: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>;
|
|
@@ -15,6 +15,7 @@ export interface PlasmicRootProviderProps extends PlasmicDataSourceContextValue
|
|
|
15
15
|
*/
|
|
16
16
|
translator?: PlasmicTranslator;
|
|
17
17
|
Head?: React.ComponentType<any>;
|
|
18
|
+
Link?: React.ComponentType<any>;
|
|
18
19
|
disableLoadingBoundary?: boolean;
|
|
19
20
|
suspenseFallback?: React.ReactNode;
|
|
20
21
|
}
|
|
@@ -3,7 +3,44 @@ import { SSRProvider, useIsSSR as useIsSSR$1 } from '@react-aria/ssr';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { PlasmicHeadContext } from './render/PlasmicHead/index.js';
|
|
6
|
-
import { DataProvider } from '@plasmicapp/host';
|
|
6
|
+
import { usePlasmicLinkMaybe, DataProvider, PlasmicLinkProvider } from '@plasmicapp/host';
|
|
7
|
+
import { b as __assign, p as pick, d as __spreadArray, e as __read, o as omit } from './common-ed411407.js';
|
|
8
|
+
|
|
9
|
+
var PlasmicLink = React__default.forwardRef(function PlasmicLink(props, ref) {
|
|
10
|
+
var _a;
|
|
11
|
+
// The usePlasmicLinkMaybe function may be undefined, if host is not up-to-date
|
|
12
|
+
var Link = (_a = usePlasmicLinkMaybe === null || usePlasmicLinkMaybe === void 0 ? void 0 : usePlasmicLinkMaybe()) !== null && _a !== void 0 ? _a : PlasmicLinkInternal;
|
|
13
|
+
if (Link === PlasmicLink) {
|
|
14
|
+
// Just in case, break the cycle
|
|
15
|
+
return React__default.createElement(PlasmicLinkInternal, __assign({}, props, { ref: ref }));
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return React__default.createElement(Link, __assign({}, props, { ref: ref }));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var PlasmicLinkInternal = React__default.forwardRef(function PlasmicLinkInternal(props, ref) {
|
|
22
|
+
// props.href is required for nextjs; if no props.href,
|
|
23
|
+
// then we just render the default anchor element
|
|
24
|
+
if (props.platform === "nextjs" && props.href) {
|
|
25
|
+
var nextjsProps = [
|
|
26
|
+
"href",
|
|
27
|
+
"replace",
|
|
28
|
+
"scroll",
|
|
29
|
+
"shallow",
|
|
30
|
+
"passHref",
|
|
31
|
+
"prefetch",
|
|
32
|
+
"locale",
|
|
33
|
+
];
|
|
34
|
+
return React__default.createElement(props.component, __assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(nextjsProps), false))), { legacyBehavior: true }), React__default.createElement("a", __assign({}, omit.apply(void 0, __spreadArray([props, "component", "platform"], __read(nextjsProps), false)), { ref: ref })));
|
|
35
|
+
}
|
|
36
|
+
if (props.platform === "gatsby" && isInternalHref(props.href)) {
|
|
37
|
+
return React__default.createElement(props.component, __assign(__assign({}, omit(props, "component", "platform", "href")), { to: props.href, ref: ref }));
|
|
38
|
+
}
|
|
39
|
+
return React__default.createElement("a", __assign({}, omit(props, "component", "platform"), { ref: ref }));
|
|
40
|
+
});
|
|
41
|
+
function isInternalHref(href) {
|
|
42
|
+
return /^\/(?!\/)/.test(href);
|
|
43
|
+
}
|
|
7
44
|
|
|
8
45
|
var PlasmicTranslatorContext = React__default.createContext(undefined);
|
|
9
46
|
function isIterable(val) {
|
|
@@ -91,8 +128,8 @@ function hasKey(v, key) {
|
|
|
91
128
|
|
|
92
129
|
var PlasmicRootContext = React.createContext(undefined);
|
|
93
130
|
function PlasmicRootProvider(props) {
|
|
94
|
-
var _a;
|
|
95
|
-
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;
|
|
131
|
+
var _a, _b;
|
|
132
|
+
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;
|
|
96
133
|
var context = React.useMemo(function () { return ({
|
|
97
134
|
platform: platform,
|
|
98
135
|
}); }, [platform]);
|
|
@@ -109,7 +146,8 @@ function PlasmicRootProvider(props) {
|
|
|
109
146
|
React.createElement(SSRProvider, null,
|
|
110
147
|
React.createElement(PlasmicDataSourceContextProvider, { value: dataSourceContextValue },
|
|
111
148
|
React.createElement(PlasmicTranslatorContext.Provider, { value: (_a = props.i18n) !== null && _a !== void 0 ? _a : props.translator },
|
|
112
|
-
React.createElement(PlasmicHeadContext.Provider, { value: props.Head },
|
|
149
|
+
React.createElement(PlasmicHeadContext.Provider, { value: props.Head },
|
|
150
|
+
React.createElement(PlasmicLinkProvider, { Link: (_b = props.Link) !== null && _b !== void 0 ? _b : PlasmicLinkInternal }, children))))))));
|
|
113
151
|
}
|
|
114
152
|
var useIsSSR = useIsSSR$1;
|
|
115
153
|
function useHasPlasmicRoot() {
|
|
@@ -131,5 +169,5 @@ function MaybeWrap(props) {
|
|
|
131
169
|
return props.cond ? props.wrapper(props.children) : props.children;
|
|
132
170
|
}
|
|
133
171
|
|
|
134
|
-
export {
|
|
135
|
-
//# sourceMappingURL=ssr-
|
|
172
|
+
export { PlasmicLink as P, Trans as T, PlasmicRootProvider as a, useEnsureSSRProvider as b, genTranslatableString as g, useIsSSR as u };
|
|
173
|
+
//# sourceMappingURL=ssr-3ce4cefe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-3ce4cefe.js","sources":["../../src/render/PlasmicLink.tsx","../../src/render/translation.tsx","../../src/render/ssr.tsx"],"sourcesContent":["import { usePlasmicLinkMaybe } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport { omit, pick } from \"../common\";\n\nexport const PlasmicLink = React.forwardRef(function PlasmicLink(\n props: any,\n ref: React.Ref<any>\n) {\n // The usePlasmicLinkMaybe function may be undefined, if host is not up-to-date\n const Link = usePlasmicLinkMaybe?.() ?? PlasmicLinkInternal;\n if (Link === PlasmicLink) {\n // Just in case, break the cycle\n return <PlasmicLinkInternal {...props} ref={ref} />;\n } else {\n return <Link {...props} ref={ref} />;\n }\n});\n\nexport const PlasmicLinkInternal = React.forwardRef(\n function PlasmicLinkInternal(props: any, ref: React.Ref<any>) {\n // props.href is required for nextjs; if no props.href,\n // then we just render the default anchor element\n if (props.platform === \"nextjs\" && props.href) {\n const nextjsProps = [\n \"href\",\n \"replace\",\n \"scroll\",\n \"shallow\",\n \"passHref\",\n \"prefetch\",\n \"locale\",\n ];\n\n return React.createElement(\n props.component,\n { ...pick(props, ...nextjsProps), legacyBehavior: true },\n <a\n {...omit(props, \"component\", \"platform\", ...nextjsProps)}\n ref={ref}\n />\n );\n }\n\n if (props.platform === \"gatsby\" && isInternalHref(props.href)) {\n return React.createElement(props.component, {\n ...omit(props, \"component\", \"platform\", \"href\"),\n ...{ to: props.href, ref },\n });\n }\n\n return <a {...omit(props, \"component\", \"platform\")} ref={ref} />;\n }\n);\n\nfunction isInternalHref(href: string): boolean {\n return /^\\/(?!\\/)/.test(href);\n}\n","import React from \"react\";\n\nexport type PlasmicTranslator = (\n str: string,\n opts?: {\n components?: {\n [key: string]: React.ReactElement;\n };\n }\n) => React.ReactNode;\n\nexport interface PlasmicI18NContextValue {\n translator?: PlasmicTranslator;\n tagPrefix?: string;\n}\n\nexport const PlasmicTranslatorContext = React.createContext<\n PlasmicI18NContextValue | PlasmicTranslator | undefined\n>(undefined);\n\nexport interface TransProps {\n transKey?: string;\n children?: React.ReactNode;\n}\n\nfunction isIterable(val: any): val is Iterable<any> {\n return val != null && typeof val[Symbol.iterator] === \"function\";\n}\n\nexport function genTranslatableString(\n elt: React.ReactNode,\n opts?: {\n tagPrefix?: string;\n }\n) {\n const components: {\n [key: string]: React.ReactElement;\n } = {};\n let componentsCount = 0;\n\n const getText = (node: React.ReactNode): string => {\n if (!node) {\n return \"\";\n }\n if (\n typeof node === \"number\" ||\n typeof node === \"boolean\" ||\n typeof node === \"string\"\n ) {\n return node.toString();\n }\n if (typeof node !== \"object\") {\n return \"\";\n }\n if (Array.isArray(node) || isIterable(node)) {\n return Array.from(node)\n .map((child) => getText(child))\n .filter((child) => !!child)\n .join(\"\");\n }\n const nodeChildren: React.ReactNode =\n (hasKey(node, \"props\") &&\n hasKey(node.props, \"children\") &&\n (node.props.children as React.ReactNode | undefined)) ||\n (hasKey(node, \"children\") && node.children) ||\n [];\n const contents = `${React.Children.toArray(nodeChildren)\n .map((child) => getText(child))\n .filter((child) => !!child)\n .join(\"\")}`;\n if (React.isValidElement(node) && node.type === React.Fragment) {\n return contents;\n }\n const prefix = opts?.tagPrefix ?? \"\";\n const componentId = `${prefix}${componentsCount + 1}`;\n componentsCount++;\n components[componentId] = React.isValidElement(node)\n ? React.cloneElement(node as any, {\n key: componentId,\n children: undefined,\n })\n : (node as never);\n return `<${componentId}>${contents}</${componentId}>`;\n };\n\n const str = getText(elt);\n return {\n str,\n components,\n componentsCount,\n };\n}\n\nexport function Trans({ transKey, children }: TransProps) {\n const _t = React.useContext(PlasmicTranslatorContext);\n const translator = _t\n ? typeof _t === \"function\"\n ? _t\n : _t.translator\n : undefined;\n if (!translator) {\n warnNoTranslationFunctionAtMostOnce();\n return children;\n }\n\n const { str, components, componentsCount } = genTranslatableString(children, {\n tagPrefix: typeof _t === \"object\" ? _t.tagPrefix : undefined,\n });\n return translator(\n transKey ?? str,\n componentsCount > 0 ? { components } : undefined\n );\n}\n\nlet hasWarned = false;\nfunction warnNoTranslationFunctionAtMostOnce() {\n if (!hasWarned) {\n console.warn(\n \"Using Plasmic Translation but no translation function has been provided\"\n );\n hasWarned = true;\n }\n}\n\nfunction hasKey<K extends string>(v: any, key: K): v is Record<K, any> {\n return typeof v === \"object\" && v !== null && key in v;\n}\n","import {\n PlasmicDataSourceContextProvider,\n PlasmicDataSourceContextValue,\n} from \"@plasmicapp/data-sources-context\";\nimport { SSRProvider, useIsSSR as useAriaIsSSR } from \"@react-aria/ssr\";\nimport * as React from \"react\";\nimport { PlasmicHeadContext } from \"./PlasmicHead\";\nimport {\n PlasmicI18NContextValue,\n PlasmicTranslator,\n PlasmicTranslatorContext,\n} from \"./translation\";\nexport {\n PlasmicDataSourceContextProvider,\n useCurrentUser,\n} from \"@plasmicapp/data-sources-context\";\nimport { DataProvider, PlasmicLinkProvider } from \"@plasmicapp/host\";\nimport { PlasmicLinkInternal } from \"./PlasmicLink\";\n// import { PlasmicLink } from \"./PlasmicLink\";\n\nexport interface PlasmicRootContextValue {\n platform?: \"nextjs\" | \"gatsby\";\n}\n\nconst PlasmicRootContext = React.createContext<\n PlasmicRootContextValue | undefined\n>(undefined);\n\nexport interface PlasmicRootProviderProps\n extends PlasmicDataSourceContextValue {\n platform?: \"nextjs\" | \"gatsby\";\n children?: React.ReactNode;\n i18n?: PlasmicI18NContextValue;\n /**\n * @deprecated use i18n.translator instead\n */\n translator?: PlasmicTranslator;\n Head?: React.ComponentType<any>;\n Link?: React.ComponentType<any>;\n disableLoadingBoundary?: boolean;\n suspenseFallback?: React.ReactNode;\n}\n\nexport function PlasmicRootProvider(props: PlasmicRootProviderProps) {\n const {\n platform,\n children,\n userAuthToken,\n isUserLoading,\n authRedirectUri,\n user,\n disableLoadingBoundary,\n suspenseFallback,\n } = props;\n const context = React.useMemo(\n () => ({\n platform,\n }),\n [platform]\n );\n const dataSourceContextValue = React.useMemo(\n () => ({\n userAuthToken,\n user,\n isUserLoading,\n authRedirectUri,\n }),\n [userAuthToken, isUserLoading, user, authRedirectUri]\n );\n const reactMajorVersion = +React.version.split(\".\")[0];\n\n return (\n <MaybeWrap\n cond={!disableLoadingBoundary && reactMajorVersion >= 18}\n wrapper={(children) => (\n <DataProvider\n name=\"plasmicInternalEnableLoadingBoundary\"\n hidden\n data={true}\n >\n <React.Suspense fallback={suspenseFallback ?? \"Loading...\"}>\n {children}\n </React.Suspense>\n </DataProvider>\n )}\n >\n <PlasmicRootContext.Provider value={context}>\n <SSRProvider>\n <PlasmicDataSourceContextProvider value={dataSourceContextValue}>\n <PlasmicTranslatorContext.Provider\n value={props.i18n ?? props.translator}\n >\n <PlasmicHeadContext.Provider value={props.Head}>\n <PlasmicLinkProvider Link={props.Link ?? PlasmicLinkInternal}>\n {children}\n </PlasmicLinkProvider>\n </PlasmicHeadContext.Provider>\n </PlasmicTranslatorContext.Provider>\n </PlasmicDataSourceContextProvider>\n </SSRProvider>\n </PlasmicRootContext.Provider>\n </MaybeWrap>\n );\n}\n\nexport const useIsSSR = useAriaIsSSR;\n\nexport function useHasPlasmicRoot() {\n return !!React.useContext(PlasmicRootContext);\n}\n\nlet hasWarnedSSR = false;\n/**\n * Warns the user if PlasmicRootProvider is not used\n */\nexport function useEnsureSSRProvider() {\n const hasRoot = useHasPlasmicRoot();\n if (hasRoot || hasWarnedSSR || process.env.NODE_ENV !== \"development\") {\n return;\n }\n\n hasWarnedSSR = true;\n console.warn(\n `Plasmic: To ensure your components work correctly with server-side rendering, please use PlasmicRootProvider at the root of your application. See https://docs.plasmic.app/learn/ssr`\n );\n}\n\nfunction MaybeWrap(props: {\n children: React.ReactElement;\n cond: boolean;\n wrapper: (children: React.ReactElement) => React.ReactElement;\n}) {\n return props.cond ? props.wrapper(props.children) : props.children;\n}\n"],"names":["React","useAriaIsSSR"],"mappings":";;;;;;;;IAIa,WAAW,GAAGA,cAAK,C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AAC,IAAI,mCAAI,mBAAmB,IACzD,QAAQ,CACW,CACM,CACI,CACH,CACvB,CACc,CACpB,EACZ;AACJ,CAAC;IAEY,QAAQ,GAAGC,WAAa;SAErB,iBAAiB;IAC/B,OAAO,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAChD,CAAC;AAED,IAAI,YAAY,GAAG,KAAK,CAAC;AACzB;;;SAGgB,oBAAoB;IAClC,IAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QACrE,OAAO;KACR;IAED,YAAY,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,IAAI,CACV,uLAAuL,CACxL,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAIlB;IACC,OAAO,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;AACrE;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-e2ce462a.js","sources":["../../src/render/translation.tsx","../../src/render/ssr.tsx"],"sourcesContent":["import React from \"react\";\n\nexport type PlasmicTranslator = (\n str: string,\n opts?: {\n components?: {\n [key: string]: React.ReactElement;\n };\n }\n) => React.ReactNode;\n\nexport interface PlasmicI18NContextValue {\n translator?: PlasmicTranslator;\n tagPrefix?: string;\n}\n\nexport const PlasmicTranslatorContext = React.createContext<\n PlasmicI18NContextValue | PlasmicTranslator | undefined\n>(undefined);\n\nexport interface TransProps {\n transKey?: string;\n children?: React.ReactNode;\n}\n\nfunction isIterable(val: any): val is Iterable<any> {\n return val != null && typeof val[Symbol.iterator] === \"function\";\n}\n\nexport function genTranslatableString(\n elt: React.ReactNode,\n opts?: {\n tagPrefix?: string;\n }\n) {\n const components: {\n [key: string]: React.ReactElement;\n } = {};\n let componentsCount = 0;\n\n const getText = (node: React.ReactNode): string => {\n if (!node) {\n return \"\";\n }\n if (\n typeof node === \"number\" ||\n typeof node === \"boolean\" ||\n typeof node === \"string\"\n ) {\n return node.toString();\n }\n if (typeof node !== \"object\") {\n return \"\";\n }\n if (Array.isArray(node) || isIterable(node)) {\n return Array.from(node)\n .map((child) => getText(child))\n .filter((child) => !!child)\n .join(\"\");\n }\n const nodeChildren: React.ReactNode =\n (hasKey(node, \"props\") &&\n hasKey(node.props, \"children\") &&\n (node.props.children as React.ReactNode | undefined)) ||\n (hasKey(node, \"children\") && node.children) ||\n [];\n const contents = `${React.Children.toArray(nodeChildren)\n .map((child) => getText(child))\n .filter((child) => !!child)\n .join(\"\")}`;\n if (React.isValidElement(node) && node.type === React.Fragment) {\n return contents;\n }\n const prefix = opts?.tagPrefix ?? \"\";\n const componentId = `${prefix}${componentsCount + 1}`;\n componentsCount++;\n components[componentId] = React.isValidElement(node)\n ? React.cloneElement(node as any, {\n key: componentId,\n children: undefined,\n })\n : (node as never);\n return `<${componentId}>${contents}</${componentId}>`;\n };\n\n const str = getText(elt);\n return {\n str,\n components,\n componentsCount,\n };\n}\n\nexport function Trans({ transKey, children }: TransProps) {\n const _t = React.useContext(PlasmicTranslatorContext);\n const translator = _t\n ? typeof _t === \"function\"\n ? _t\n : _t.translator\n : undefined;\n if (!translator) {\n warnNoTranslationFunctionAtMostOnce();\n return children;\n }\n\n const { str, components, componentsCount } = genTranslatableString(children, {\n tagPrefix: typeof _t === \"object\" ? _t.tagPrefix : undefined,\n });\n return translator(\n transKey ?? str,\n componentsCount > 0 ? { components } : undefined\n );\n}\n\nlet hasWarned = false;\nfunction warnNoTranslationFunctionAtMostOnce() {\n if (!hasWarned) {\n console.warn(\n \"Using Plasmic Translation but no translation function has been provided\"\n );\n hasWarned = true;\n }\n}\n\nfunction hasKey<K extends string>(v: any, key: K): v is Record<K, any> {\n return typeof v === \"object\" && v !== null && key in v;\n}\n","import {\n PlasmicDataSourceContextProvider,\n PlasmicDataSourceContextValue,\n} from \"@plasmicapp/data-sources-context\";\nimport { SSRProvider, useIsSSR as useAriaIsSSR } from \"@react-aria/ssr\";\nimport * as React from \"react\";\nimport { PlasmicHeadContext } from \"./PlasmicHead\";\nimport {\n PlasmicI18NContextValue,\n PlasmicTranslator,\n PlasmicTranslatorContext,\n} from \"./translation\";\nexport {\n PlasmicDataSourceContextProvider,\n useCurrentUser,\n} from \"@plasmicapp/data-sources-context\";\nimport { DataProvider } from \"@plasmicapp/host\";\n\nexport interface PlasmicRootContextValue {\n platform?: \"nextjs\" | \"gatsby\";\n}\n\nconst PlasmicRootContext = React.createContext<\n PlasmicRootContextValue | undefined\n>(undefined);\n\nexport interface PlasmicRootProviderProps\n extends PlasmicDataSourceContextValue {\n platform?: \"nextjs\" | \"gatsby\";\n children?: React.ReactNode;\n i18n?: PlasmicI18NContextValue;\n /**\n * @deprecated use i18n.translator instead\n */\n translator?: PlasmicTranslator;\n Head?: React.ComponentType<any>;\n disableLoadingBoundary?: boolean;\n suspenseFallback?: React.ReactNode;\n}\n\nexport function PlasmicRootProvider(props: PlasmicRootProviderProps) {\n const {\n platform,\n children,\n userAuthToken,\n isUserLoading,\n authRedirectUri,\n user,\n disableLoadingBoundary,\n suspenseFallback,\n i18n,\n } = props;\n const context = React.useMemo(\n () => ({\n platform,\n }),\n [platform]\n );\n const dataSourceContextValue = React.useMemo(\n () => ({\n userAuthToken,\n user,\n isUserLoading,\n authRedirectUri,\n }),\n [userAuthToken, isUserLoading, user, authRedirectUri]\n );\n const reactMajorVersion = +React.version.split(\".\")[0];\n\n return (\n <MaybeWrap\n cond={!disableLoadingBoundary && reactMajorVersion >= 18}\n wrapper={(children) => (\n <DataProvider\n name=\"plasmicInternalEnableLoadingBoundary\"\n hidden\n data={true}\n >\n <React.Suspense fallback={suspenseFallback ?? \"Loading...\"}>\n {children}\n </React.Suspense>\n </DataProvider>\n )}\n >\n <PlasmicRootContext.Provider value={context}>\n <SSRProvider>\n <PlasmicDataSourceContextProvider value={dataSourceContextValue}>\n <PlasmicTranslatorContext.Provider\n value={props.i18n ?? props.translator}\n >\n <PlasmicHeadContext.Provider value={props.Head}>\n {children}\n </PlasmicHeadContext.Provider>\n </PlasmicTranslatorContext.Provider>\n </PlasmicDataSourceContextProvider>\n </SSRProvider>\n </PlasmicRootContext.Provider>\n </MaybeWrap>\n );\n}\n\nexport const useIsSSR = useAriaIsSSR;\n\nexport function useHasPlasmicRoot() {\n return !!React.useContext(PlasmicRootContext);\n}\n\nlet hasWarnedSSR = false;\n/**\n * Warns the user if PlasmicRootProvider is not used\n */\nexport function useEnsureSSRProvider() {\n const hasRoot = useHasPlasmicRoot();\n if (hasRoot || hasWarnedSSR || process.env.NODE_ENV !== \"development\") {\n return;\n }\n\n hasWarnedSSR = true;\n console.warn(\n `Plasmic: To ensure your components work correctly with server-side rendering, please use PlasmicRootProvider at the root of your application. See https://docs.plasmic.app/learn/ssr`\n );\n}\n\nfunction MaybeWrap(props: {\n children: React.ReactElement;\n cond: boolean;\n wrapper: (children: React.ReactElement) => React.ReactElement;\n}) {\n return props.cond ? props.wrapper(props.children) : props.children;\n}\n"],"names":["React","useAriaIsSSR"],"mappings":";;;;;;;AAgBO,IAAM,wBAAwB,GAAGA,cAAK,CAAC,aAAa,CAEzD,SAAS,CAAC,CAAC;AAOb,SAAS,UAAU,CAAC,GAAQ;IAC1B,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;AACnE,CAAC;SAEe,qBAAqB,CACnC,GAAoB,EACpB,IAEC;IAED,IAAM,UAAU,GAEZ,EAAE,CAAC;IACP,IAAI,eAAe,GAAG,CAAC,CAAC;IAExB,IAAM,OAAO,GAAG,UAAC,IAAqB;;QACpC,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,EAAE,CAAC;SACX;QACD,IACE,OAAO,IAAI,KAAK,QAAQ;YACxB,OAAO,IAAI,KAAK,SAA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