create-plasmic-app 0.0.98 → 0.0.100
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/cpa-out/gatsby-codegen-js/gatsby-browser.jsx +2 -1
- package/cpa-out/gatsby-codegen-js/gatsby-ssr.jsx +2 -1
- package/cpa-out/gatsby-codegen-js/package.json +4 -4
- package/cpa-out/gatsby-codegen-js/plasmic.json +14 -8
- package/cpa-out/gatsby-codegen-js/src/components/Button.jsx +1 -3
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +53 -100
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +36 -30
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +3 -15
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +25 -25
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +45 -59
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +3 -3
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/gatsby-codegen-js/src/pages/dynamic/[slug].jsx +5 -4
- package/cpa-out/gatsby-codegen-js/src/pages/index.jsx +5 -4
- package/cpa-out/gatsby-codegen-ts/gatsby-browser.tsx +2 -1
- package/cpa-out/gatsby-codegen-ts/gatsby-ssr.tsx +2 -1
- package/cpa-out/gatsby-codegen-ts/package.json +9 -9
- package/cpa-out/gatsby-codegen-ts/plasmic.json +14 -8
- package/cpa-out/gatsby-codegen-ts/src/components/Button.tsx +4 -5
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +99 -75
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +80 -49
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +3 -15
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +69 -43
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +90 -77
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +4 -4
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/cpa-out/gatsby-codegen-ts/src/pages/dynamic/[slug].tsx +6 -5
- package/cpa-out/gatsby-codegen-ts/src/pages/index.tsx +6 -5
- package/cpa-out/gatsby-loader-js/package.json +3 -3
- package/cpa-out/gatsby-loader-js/src/templates/defaultPlasmicPage.jsx +1 -0
- package/cpa-out/gatsby-loader-ts/package.json +8 -8
- package/cpa-out/gatsby-loader-ts/src/templates/defaultPlasmicPage.tsx +1 -0
- package/cpa-out/nextjs-app-loader-js/package.json +8 -6
- package/cpa-out/nextjs-app-loader-js/plasmic-init.js +10 -1
- package/cpa-out/nextjs-app-loader-ts/package.json +12 -10
- package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +10 -1
- package/cpa-out/nextjs-app-loader-ts/tsconfig.json +2 -9
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/package.json +4 -4
- package/cpa-out/nextjs-pages-codegen-js/pages/_app.jsx +2 -1
- package/cpa-out/nextjs-pages-codegen-js/plasmic.json +2 -2
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/package.json +4 -4
- package/cpa-out/nextjs-pages-codegen-ts/pages/_app.tsx +2 -1
- package/cpa-out/nextjs-pages-codegen-ts/pages/dynamic/[slug].tsx +1 -0
- package/cpa-out/nextjs-pages-codegen-ts/pages/index.tsx +1 -0
- package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +2 -2
- package/cpa-out/nextjs-pages-loader-js/package.json +3 -3
- package/cpa-out/nextjs-pages-loader-ts/package.json +3 -3
- package/cpa-out/react-codegen-js/eslint.config.js +1 -6
- package/cpa-out/react-codegen-js/package.json +10 -11
- package/cpa-out/react-codegen-js/plasmic.json +2 -2
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/react-codegen-ts/package.json +11 -11
- package/cpa-out/react-codegen-ts/plasmic.json +2 -2
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/dist/index.js +7 -8
- package/dist/utils/file-utils.d.ts +2 -2
- package/dist/utils/file-utils.js +29 -28
- package/package.json +5 -13
- package/run-cpa.ts +8 -6
- package/src/index.ts +7 -9
- package/src/utils/file-utils.ts +44 -30
- package/.eslintrc.js +0 -15
- package/cpa-out/nextjs-app-loader-js/app/[[...catchall]]/page.jsx +0 -56
- package/cpa-out/nextjs-app-loader-js/app/api/hello/route.js +0 -3
- package/cpa-out/nextjs-app-loader-js/app/layout.js +0 -14
- package/cpa-out/nextjs-app-loader-js/app/plasmic-host/page.jsx +0 -6
- package/cpa-out/nextjs-app-loader-js/plasmic-init-client.jsx +0 -65
- package/cpa-out/nextjs-app-loader-ts/app/[[...catchall]]/page.tsx +0 -59
- package/cpa-out/nextjs-app-loader-ts/app/api/hello/route.ts +0 -3
- package/cpa-out/nextjs-app-loader-ts/app/layout.tsx +0 -18
- package/cpa-out/nextjs-app-loader-ts/app/plasmic-host/page.tsx +0 -6
- package/cpa-out/nextjs-app-loader-ts/plasmic-init-client.tsx +0 -65
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import
|
|
7
|
+
import { createUseScreenVariants } from "@plasmicapp/react-web";
|
|
8
8
|
|
|
9
9
|
export type ScreenValue = "desktopOnly";
|
|
10
10
|
export const ScreenContext = React.createContext<ScreenValue[] | undefined>(
|
|
11
11
|
"PLEASE_RENDER_INSIDE_PROVIDER" as any
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
* @deprecated Plasmic now uses a custom hook for Screen variants, which is
|
|
16
|
-
* automatically included in your components. Please remove this provider
|
|
17
|
-
* from your code.
|
|
18
|
-
*/
|
|
19
|
-
export function ScreenVariantProvider(props: React.PropsWithChildren) {
|
|
20
|
-
console.warn(
|
|
21
|
-
"DEPRECATED: Plasmic now uses a custom hook for Screen variants, which is automatically included in your components. Please remove this provider from your code."
|
|
22
|
-
);
|
|
23
|
-
return props.children;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const useScreenVariants = p.createUseScreenVariants(true, {
|
|
14
|
+
export const useScreenVariants = createUseScreenVariants(true, {
|
|
27
15
|
desktopOnly: "(min-width:768px)",
|
|
28
16
|
});
|
|
29
17
|
|
package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
|
|
6
6
|
/** @jsxRuntime classic */
|
|
@@ -19,34 +19,60 @@ import {
|
|
|
19
19
|
navigate as __gatsbyNavigate
|
|
20
20
|
} from "gatsby";
|
|
21
21
|
|
|
22
|
-
import * as p from "@plasmicapp/react-web";
|
|
23
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
24
|
-
|
|
25
22
|
import {
|
|
26
|
-
|
|
27
|
-
classNames,
|
|
28
|
-
wrapWithClassName,
|
|
29
|
-
createPlasmicElementProxy,
|
|
30
|
-
makeFragment,
|
|
23
|
+
Flex as Flex__,
|
|
31
24
|
MultiChoiceArg,
|
|
25
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
26
|
+
PlasmicIcon as PlasmicIcon__,
|
|
27
|
+
PlasmicImg as PlasmicImg__,
|
|
28
|
+
PlasmicLink as PlasmicLink__,
|
|
29
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
32
30
|
SingleBooleanChoiceArg,
|
|
33
31
|
SingleChoiceArg,
|
|
34
|
-
|
|
35
|
-
omit,
|
|
36
|
-
useTrigger,
|
|
32
|
+
Stack as Stack__,
|
|
37
33
|
StrictProps,
|
|
34
|
+
Trans as Trans__,
|
|
35
|
+
classNames,
|
|
36
|
+
createPlasmicElementProxy,
|
|
38
37
|
deriveRenderOpts,
|
|
39
|
-
ensureGlobalVariants
|
|
38
|
+
ensureGlobalVariants,
|
|
39
|
+
generateOnMutateForSpec,
|
|
40
|
+
generateStateOnChangeProp,
|
|
41
|
+
generateStateOnChangePropForCodeComponents,
|
|
42
|
+
generateStateValueProp,
|
|
43
|
+
get as $stateGet,
|
|
44
|
+
hasVariant,
|
|
45
|
+
initializeCodeComponentStates,
|
|
46
|
+
initializePlasmicStates,
|
|
47
|
+
makeFragment,
|
|
48
|
+
omit,
|
|
49
|
+
pick,
|
|
50
|
+
renderPlasmicSlot,
|
|
51
|
+
set as $stateSet,
|
|
52
|
+
useCurrentUser,
|
|
53
|
+
useDollarState,
|
|
54
|
+
usePlasmicTranslator,
|
|
55
|
+
useTrigger,
|
|
56
|
+
wrapWithClassName
|
|
40
57
|
} from "@plasmicapp/react-web";
|
|
58
|
+
import {
|
|
59
|
+
DataCtxReader as DataCtxReader__,
|
|
60
|
+
useDataEnv,
|
|
61
|
+
useGlobalActions
|
|
62
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
63
|
+
|
|
41
64
|
import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
|
|
65
|
+
import { Fetcher } from "@plasmicapp/react-web/lib/data-sources";
|
|
42
66
|
|
|
43
67
|
import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
|
|
44
68
|
|
|
45
69
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
46
70
|
|
|
47
|
-
import * as projectcss from "./
|
|
71
|
+
import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
48
72
|
import * as sty from "./PlasmicHomepage.module.css"; // plasmic-import: 6uuAAE1jiCew/css
|
|
49
73
|
|
|
74
|
+
createPlasmicElementProxy;
|
|
75
|
+
|
|
50
76
|
export type PlasmicHomepage__VariantMembers = {};
|
|
51
77
|
export type PlasmicHomepage__VariantsArgs = {};
|
|
52
78
|
type VariantPropType = keyof PlasmicHomepage__VariantsArgs;
|
|
@@ -57,24 +83,18 @@ type ArgPropType = keyof PlasmicHomepage__ArgsType;
|
|
|
57
83
|
export const PlasmicHomepage__ArgProps = new Array<ArgPropType>();
|
|
58
84
|
|
|
59
85
|
export type PlasmicHomepage__OverridesType = {
|
|
60
|
-
root?:
|
|
61
|
-
section?:
|
|
62
|
-
h1?:
|
|
63
|
-
text?:
|
|
64
|
-
randomDynamicPageButton?:
|
|
86
|
+
root?: Flex__<"div">;
|
|
87
|
+
section?: Flex__<"section">;
|
|
88
|
+
h1?: Flex__<"h1">;
|
|
89
|
+
text?: Flex__<"div">;
|
|
90
|
+
randomDynamicPageButton?: Flex__<typeof RandomDynamicPageButton>;
|
|
65
91
|
};
|
|
66
92
|
|
|
67
93
|
export interface DefaultHomepageProps {
|
|
68
94
|
className?: string;
|
|
69
95
|
}
|
|
70
96
|
|
|
71
|
-
const
|
|
72
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
73
|
-
const __wrapUserPromise =
|
|
74
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
75
|
-
(async (loc, promise) => {
|
|
76
|
-
return await promise;
|
|
77
|
-
});
|
|
97
|
+
const $$ = {};
|
|
78
98
|
|
|
79
99
|
export function Head() {
|
|
80
100
|
return <></>;
|
|
@@ -88,19 +108,26 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
88
108
|
}) {
|
|
89
109
|
const { variants, overrides, forNode } = props;
|
|
90
110
|
|
|
91
|
-
const
|
|
92
|
-
|
|
111
|
+
const args = React.useMemo(
|
|
112
|
+
() =>
|
|
113
|
+
Object.assign(
|
|
114
|
+
{},
|
|
115
|
+
Object.fromEntries(
|
|
116
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
117
|
+
)
|
|
118
|
+
),
|
|
119
|
+
[props.args]
|
|
120
|
+
);
|
|
93
121
|
|
|
94
122
|
const $props = {
|
|
95
123
|
...args,
|
|
96
124
|
...variants
|
|
97
125
|
};
|
|
126
|
+
|
|
127
|
+
const $ctx = useDataEnv?.() || {};
|
|
98
128
|
const refsRef = React.useRef({});
|
|
99
129
|
const $refs = refsRef.current;
|
|
100
130
|
|
|
101
|
-
const currentUser = p.useCurrentUser?.() || {};
|
|
102
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
103
|
-
|
|
104
131
|
const globalVariants = ensureGlobalVariants({
|
|
105
132
|
screen: useScreenVariantsscBjPxgdxdzbv()
|
|
106
133
|
});
|
|
@@ -124,10 +151,11 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
124
151
|
projectcss.root_reset,
|
|
125
152
|
projectcss.plasmic_default_styles,
|
|
126
153
|
projectcss.plasmic_mixins,
|
|
154
|
+
projectcss.plasmic_tokens,
|
|
127
155
|
sty.root
|
|
128
156
|
)}
|
|
129
157
|
>
|
|
130
|
-
<
|
|
158
|
+
<Stack__
|
|
131
159
|
as={"section"}
|
|
132
160
|
data-plasmic-name={"section"}
|
|
133
161
|
data-plasmic-override={overrides.section}
|
|
@@ -146,7 +174,6 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
146
174
|
>
|
|
147
175
|
{"create-plasmic-app"}
|
|
148
176
|
</h1>
|
|
149
|
-
|
|
150
177
|
<div
|
|
151
178
|
data-plasmic-name={"text"}
|
|
152
179
|
data-plasmic-override={overrides.text}
|
|
@@ -174,7 +201,7 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
174
201
|
<React.Fragment>
|
|
175
202
|
<React.Fragment>
|
|
176
203
|
{
|
|
177
|
-
"If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template
|
|
204
|
+
"If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template\u2014do this from the list of pages in the top left (the gray + button).\n\nOr press the big blue + button to start dragging items into this page.\n\nIntegrate this project into your codebase\u2014press the "
|
|
178
205
|
}
|
|
179
206
|
</React.Fragment>
|
|
180
207
|
<span
|
|
@@ -191,7 +218,6 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
191
218
|
</React.Fragment>
|
|
192
219
|
)}
|
|
193
220
|
</div>
|
|
194
|
-
|
|
195
221
|
<RandomDynamicPageButton
|
|
196
222
|
data-plasmic-name={"randomDynamicPageButton"}
|
|
197
223
|
data-plasmic-override={overrides.randomDynamicPageButton}
|
|
@@ -200,7 +226,7 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
200
226
|
sty.randomDynamicPageButton
|
|
201
227
|
)}
|
|
202
228
|
/>
|
|
203
|
-
</
|
|
229
|
+
</Stack__>
|
|
204
230
|
</div>
|
|
205
231
|
</div>
|
|
206
232
|
</React.Fragment>
|
|
@@ -237,15 +263,15 @@ type NodeComponentProps<T extends NodeNameType> =
|
|
|
237
263
|
args?: PlasmicHomepage__ArgsType;
|
|
238
264
|
overrides?: NodeOverridesType<T>;
|
|
239
265
|
} & Omit<PlasmicHomepage__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
/* Specify overrides for each element directly as props*/ Omit<
|
|
266
|
+
// Specify args directly as props
|
|
267
|
+
Omit<PlasmicHomepage__ArgsType, ReservedPropsType> &
|
|
268
|
+
// Specify overrides for each element directly as props
|
|
269
|
+
Omit<
|
|
245
270
|
NodeOverridesType<T>,
|
|
246
271
|
ReservedPropsType | VariantPropType | ArgPropType
|
|
247
272
|
> &
|
|
248
|
-
|
|
273
|
+
// Specify props for the root element
|
|
274
|
+
Omit<
|
|
249
275
|
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
250
276
|
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
251
277
|
>;
|
|
@@ -259,7 +285,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
|
259
285
|
() =>
|
|
260
286
|
deriveRenderOpts(props, {
|
|
261
287
|
name: nodeName,
|
|
262
|
-
descendantNames:
|
|
288
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
263
289
|
internalArgPropNames: PlasmicHomepage__ArgProps,
|
|
264
290
|
internalVariantPropNames: PlasmicHomepage__VariantProps
|
|
265
291
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
|
|
6
6
|
/** @jsxRuntime classic */
|
|
@@ -19,35 +19,60 @@ import {
|
|
|
19
19
|
navigate as __gatsbyNavigate
|
|
20
20
|
} from "gatsby";
|
|
21
21
|
|
|
22
|
-
import * as p from "@plasmicapp/react-web";
|
|
23
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
24
|
-
|
|
25
22
|
import {
|
|
26
|
-
|
|
27
|
-
classNames,
|
|
28
|
-
wrapWithClassName,
|
|
29
|
-
createPlasmicElementProxy,
|
|
30
|
-
makeFragment,
|
|
23
|
+
Flex as Flex__,
|
|
31
24
|
MultiChoiceArg,
|
|
25
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
26
|
+
PlasmicIcon as PlasmicIcon__,
|
|
27
|
+
PlasmicImg as PlasmicImg__,
|
|
28
|
+
PlasmicLink as PlasmicLink__,
|
|
29
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
32
30
|
SingleBooleanChoiceArg,
|
|
33
31
|
SingleChoiceArg,
|
|
34
|
-
|
|
35
|
-
omit,
|
|
36
|
-
useTrigger,
|
|
32
|
+
Stack as Stack__,
|
|
37
33
|
StrictProps,
|
|
34
|
+
Trans as Trans__,
|
|
35
|
+
classNames,
|
|
36
|
+
createPlasmicElementProxy,
|
|
38
37
|
deriveRenderOpts,
|
|
39
|
-
ensureGlobalVariants
|
|
38
|
+
ensureGlobalVariants,
|
|
39
|
+
generateOnMutateForSpec,
|
|
40
|
+
generateStateOnChangeProp,
|
|
41
|
+
generateStateOnChangePropForCodeComponents,
|
|
42
|
+
generateStateValueProp,
|
|
43
|
+
get as $stateGet,
|
|
44
|
+
hasVariant,
|
|
45
|
+
initializeCodeComponentStates,
|
|
46
|
+
initializePlasmicStates,
|
|
47
|
+
makeFragment,
|
|
48
|
+
omit,
|
|
49
|
+
pick,
|
|
50
|
+
renderPlasmicSlot,
|
|
51
|
+
set as $stateSet,
|
|
52
|
+
useCurrentUser,
|
|
53
|
+
useDollarState,
|
|
54
|
+
usePlasmicTranslator,
|
|
55
|
+
useTrigger,
|
|
56
|
+
wrapWithClassName
|
|
40
57
|
} from "@plasmicapp/react-web";
|
|
58
|
+
import {
|
|
59
|
+
DataCtxReader as DataCtxReader__,
|
|
60
|
+
useDataEnv,
|
|
61
|
+
useGlobalActions
|
|
62
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
63
|
+
|
|
41
64
|
import Button from "../../Button"; // plasmic-import: TQcvW_pSKi3/component
|
|
42
65
|
|
|
43
66
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
44
67
|
|
|
45
|
-
import * as projectcss from "./
|
|
68
|
+
import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
46
69
|
import * as sty from "./PlasmicRandomDynamicPageButton.module.css"; // plasmic-import: Q23H1_1M_P/css
|
|
47
70
|
|
|
48
|
-
import
|
|
71
|
+
import CheckSvgIcon from "./icons/PlasmicIcon__CheckSvg"; // plasmic-import: gj-_D7n31Ho/icon
|
|
49
72
|
import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
|
|
50
73
|
|
|
74
|
+
createPlasmicElementProxy;
|
|
75
|
+
|
|
51
76
|
export type PlasmicRandomDynamicPageButton__VariantMembers = {};
|
|
52
77
|
export type PlasmicRandomDynamicPageButton__VariantsArgs = {};
|
|
53
78
|
type VariantPropType = keyof PlasmicRandomDynamicPageButton__VariantsArgs;
|
|
@@ -60,20 +85,14 @@ export const PlasmicRandomDynamicPageButton__ArgProps =
|
|
|
60
85
|
new Array<ArgPropType>();
|
|
61
86
|
|
|
62
87
|
export type PlasmicRandomDynamicPageButton__OverridesType = {
|
|
63
|
-
root?:
|
|
88
|
+
root?: Flex__<typeof Button>;
|
|
64
89
|
};
|
|
65
90
|
|
|
66
91
|
export interface DefaultRandomDynamicPageButtonProps {
|
|
67
92
|
className?: string;
|
|
68
93
|
}
|
|
69
94
|
|
|
70
|
-
const
|
|
71
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
72
|
-
const __wrapUserPromise =
|
|
73
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
74
|
-
(async (loc, promise) => {
|
|
75
|
-
return await promise;
|
|
76
|
-
});
|
|
95
|
+
const $$ = {};
|
|
77
96
|
|
|
78
97
|
function PlasmicRandomDynamicPageButton__RenderFunc(props: {
|
|
79
98
|
variants: PlasmicRandomDynamicPageButton__VariantsArgs;
|
|
@@ -83,19 +102,26 @@ function PlasmicRandomDynamicPageButton__RenderFunc(props: {
|
|
|
83
102
|
}) {
|
|
84
103
|
const { variants, overrides, forNode } = props;
|
|
85
104
|
|
|
86
|
-
const
|
|
87
|
-
|
|
105
|
+
const args = React.useMemo(
|
|
106
|
+
() =>
|
|
107
|
+
Object.assign(
|
|
108
|
+
{},
|
|
109
|
+
Object.fromEntries(
|
|
110
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
111
|
+
)
|
|
112
|
+
),
|
|
113
|
+
[props.args]
|
|
114
|
+
);
|
|
88
115
|
|
|
89
116
|
const $props = {
|
|
90
117
|
...args,
|
|
91
118
|
...variants
|
|
92
119
|
};
|
|
120
|
+
|
|
121
|
+
const $ctx = useDataEnv?.() || {};
|
|
93
122
|
const refsRef = React.useRef({});
|
|
94
123
|
const $refs = refsRef.current;
|
|
95
124
|
|
|
96
|
-
const currentUser = p.useCurrentUser?.() || {};
|
|
97
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
98
|
-
|
|
99
125
|
return (
|
|
100
126
|
<Button
|
|
101
127
|
data-plasmic-name={"root"}
|
|
@@ -105,60 +131,47 @@ function PlasmicRandomDynamicPageButton__RenderFunc(props: {
|
|
|
105
131
|
className={classNames("__wab_instance", sty.root)}
|
|
106
132
|
onClick={async event => {
|
|
107
133
|
const $steps = {};
|
|
134
|
+
|
|
108
135
|
$steps["goToDynamicPage"] = true
|
|
109
136
|
? (() => {
|
|
110
137
|
const actionArgs = {
|
|
111
|
-
destination:
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (e instanceof TypeError) {
|
|
125
|
-
return "value";
|
|
126
|
-
}
|
|
127
|
-
throw e;
|
|
128
|
-
}
|
|
129
|
-
})()}`
|
|
130
|
-
)
|
|
138
|
+
destination: `/dynamic/${(() => {
|
|
139
|
+
try {
|
|
140
|
+
return Math.random().toString(36).slice(2);
|
|
141
|
+
} catch (e) {
|
|
142
|
+
if (
|
|
143
|
+
e instanceof TypeError ||
|
|
144
|
+
e?.plasmicType === "PlasmicUndefinedDataError"
|
|
145
|
+
) {
|
|
146
|
+
return "value";
|
|
147
|
+
}
|
|
148
|
+
throw e;
|
|
149
|
+
}
|
|
150
|
+
})()}`
|
|
131
151
|
};
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
);
|
|
152
|
+
return (({ destination }) => {
|
|
153
|
+
if (
|
|
154
|
+
typeof destination === "string" &&
|
|
155
|
+
destination.startsWith("#")
|
|
156
|
+
) {
|
|
157
|
+
document
|
|
158
|
+
.getElementById(destination.substr(1))
|
|
159
|
+
.scrollIntoView({ behavior: "smooth" });
|
|
160
|
+
} else {
|
|
161
|
+
__gatsbyNavigate(destination);
|
|
162
|
+
}
|
|
163
|
+
})?.apply(null, [actionArgs]);
|
|
145
164
|
})()
|
|
146
165
|
: undefined;
|
|
147
166
|
if (
|
|
167
|
+
$steps["goToDynamicPage"] != null &&
|
|
148
168
|
typeof $steps["goToDynamicPage"] === "object" &&
|
|
149
169
|
typeof $steps["goToDynamicPage"].then === "function"
|
|
150
170
|
) {
|
|
151
|
-
$steps["goToDynamicPage"] = await
|
|
152
|
-
{
|
|
153
|
-
type: "InteractionLoc",
|
|
154
|
-
actionName: "navigation",
|
|
155
|
-
interactionUuid: "9Y3jL0zxjA",
|
|
156
|
-
componentUuid: "Q23H1_1M_P"
|
|
157
|
-
},
|
|
158
|
-
$steps["goToDynamicPage"]
|
|
159
|
-
);
|
|
171
|
+
$steps["goToDynamicPage"] = await $steps["goToDynamicPage"];
|
|
160
172
|
}
|
|
161
173
|
}}
|
|
174
|
+
submitsForm={true}
|
|
162
175
|
>
|
|
163
176
|
{"Random Dynamic Page"}
|
|
164
177
|
</Button>
|
|
@@ -187,15 +200,15 @@ type NodeComponentProps<T extends NodeNameType> =
|
|
|
187
200
|
args?: PlasmicRandomDynamicPageButton__ArgsType;
|
|
188
201
|
overrides?: NodeOverridesType<T>;
|
|
189
202
|
} & Omit<PlasmicRandomDynamicPageButton__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/* Specify overrides for each element directly as props*/ Omit<
|
|
203
|
+
// Specify args directly as props
|
|
204
|
+
Omit<PlasmicRandomDynamicPageButton__ArgsType, ReservedPropsType> &
|
|
205
|
+
// Specify overrides for each element directly as props
|
|
206
|
+
Omit<
|
|
195
207
|
NodeOverridesType<T>,
|
|
196
208
|
ReservedPropsType | VariantPropType | ArgPropType
|
|
197
209
|
> &
|
|
198
|
-
|
|
210
|
+
// Specify props for the root element
|
|
211
|
+
Omit<
|
|
199
212
|
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
200
213
|
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
201
214
|
>;
|
|
@@ -209,7 +222,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
|
209
222
|
() =>
|
|
210
223
|
deriveRenderOpts(props, {
|
|
211
224
|
name: nodeName,
|
|
212
|
-
descendantNames:
|
|
225
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
213
226
|
internalArgPropNames: PlasmicRandomDynamicPageButton__ArgProps,
|
|
214
227
|
internalVariantPropNames: PlasmicRandomDynamicPageButton__VariantProps
|
|
215
228
|
}),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { classNames } from "@plasmicapp/react-web";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type CheckSvgIconProps = React.ComponentProps<"svg"> & {
|
|
9
9
|
title?: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export function
|
|
12
|
+
export function CheckSvgIcon(props: CheckSvgIconProps) {
|
|
13
13
|
const { className, style, title, ...restProps } = props;
|
|
14
14
|
return (
|
|
15
15
|
<svg
|
|
@@ -40,5 +40,5 @@ export function ChecksvgIcon(props: ChecksvgIconProps) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export default
|
|
43
|
+
export default CheckSvgIcon;
|
|
44
44
|
/* prettier-ignore-end */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// This is a skeleton starter React page generated by Plasmic.
|
|
2
2
|
// This file is owned by you, feel free to edit as you see fit.
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
|
|
5
5
|
|
|
6
|
-
import { ScreenVariantProvider } from "../../components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen";
|
|
7
6
|
import {
|
|
8
7
|
PlasmicDynamicPage,
|
|
9
8
|
Head
|
|
@@ -11,7 +10,7 @@ import {
|
|
|
11
10
|
import type { PageProps } from "gatsby";
|
|
12
11
|
export { Head };
|
|
13
12
|
|
|
14
|
-
function DynamicPage({ location, params }: PageProps) {
|
|
13
|
+
function DynamicPage({ location, path, params }: PageProps) {
|
|
15
14
|
// Use PlasmicDynamicPage to render this component as it was
|
|
16
15
|
// designed in Plasmic, by activating the appropriate variants,
|
|
17
16
|
// attaching the appropriate event handlers, etc. You
|
|
@@ -28,13 +27,15 @@ function DynamicPage({ location, params }: PageProps) {
|
|
|
28
27
|
// variant context providers. These wrappers may be moved to
|
|
29
28
|
// Gatsby "wrapRootElement" function
|
|
30
29
|
// (https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr#wrapRootElement).
|
|
30
|
+
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
32
|
+
<PageParamsProvider__
|
|
33
|
+
route={path}
|
|
33
34
|
params={params}
|
|
34
35
|
query={Object.fromEntries(new URLSearchParams(location.search))}
|
|
35
36
|
>
|
|
36
37
|
<PlasmicDynamicPage />
|
|
37
|
-
</
|
|
38
|
+
</PageParamsProvider__>
|
|
38
39
|
);
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// This is a skeleton starter React page generated by Plasmic.
|
|
2
2
|
// This file is owned by you, feel free to edit as you see fit.
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
|
|
5
5
|
|
|
6
|
-
import { ScreenVariantProvider } from "../components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen";
|
|
7
6
|
import {
|
|
8
7
|
PlasmicHomepage,
|
|
9
8
|
Head
|
|
@@ -11,7 +10,7 @@ import {
|
|
|
11
10
|
import type { PageProps } from "gatsby";
|
|
12
11
|
export { Head };
|
|
13
12
|
|
|
14
|
-
function Homepage({ location, params }: PageProps) {
|
|
13
|
+
function Homepage({ location, path, params }: PageProps) {
|
|
15
14
|
// Use PlasmicHomepage to render this component as it was
|
|
16
15
|
// designed in Plasmic, by activating the appropriate variants,
|
|
17
16
|
// attaching the appropriate event handlers, etc. You
|
|
@@ -28,13 +27,15 @@ function Homepage({ location, params }: PageProps) {
|
|
|
28
27
|
// variant context providers. These wrappers may be moved to
|
|
29
28
|
// Gatsby "wrapRootElement" function
|
|
30
29
|
// (https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr#wrapRootElement).
|
|
30
|
+
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
32
|
+
<PageParamsProvider__
|
|
33
|
+
route={path}
|
|
33
34
|
params={params}
|
|
34
35
|
query={Object.fromEntries(new URLSearchParams(location.search))}
|
|
35
36
|
>
|
|
36
37
|
<PlasmicHomepage />
|
|
37
|
-
</
|
|
38
|
+
</PageParamsProvider__>
|
|
38
39
|
);
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"clean": "gatsby clean"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@plasmicapp/loader-gatsby": "^1.0.
|
|
18
|
-
"gatsby": "^5.
|
|
19
|
-
"gatsby-plugin-react-helmet": "^6.
|
|
17
|
+
"@plasmicapp/loader-gatsby": "^1.0.385",
|
|
18
|
+
"gatsby": "^5.14.1",
|
|
19
|
+
"gatsby-plugin-react-helmet": "^6.14.0",
|
|
20
20
|
"react": "^18.2.0",
|
|
21
21
|
"react-dom": "^18.2.0",
|
|
22
22
|
"react-helmet": "^6.1.0"
|
|
@@ -26,6 +26,7 @@ const PlasmicGatsbyPage = ({ data, location }) => {
|
|
|
26
26
|
<PlasmicRootProvider
|
|
27
27
|
loader={initPlasmicLoaderWithRegistrations(plasmicOptions)}
|
|
28
28
|
prefetchedData={plasmicComponents}
|
|
29
|
+
pageRoute={pageMeta.path}
|
|
29
30
|
pageParams={pageMeta.params}
|
|
30
31
|
pageQuery={Object.fromEntries(new URLSearchParams(location.search))}
|
|
31
32
|
Head={Helmet}
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"typecheck": "tsc --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@plasmicapp/loader-gatsby": "^1.0.
|
|
19
|
-
"gatsby": "^5.
|
|
20
|
-
"gatsby-plugin-react-helmet": "^6.
|
|
18
|
+
"@plasmicapp/loader-gatsby": "^1.0.385",
|
|
19
|
+
"gatsby": "^5.14.1",
|
|
20
|
+
"gatsby-plugin-react-helmet": "^6.14.0",
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-dom": "^18.2.0",
|
|
23
23
|
"react-helmet": "^6.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@types/node": "^
|
|
27
|
-
"@types/react": "^18.
|
|
28
|
-
"@types/react-dom": "^18.
|
|
29
|
-
"@types/react-helmet": "^6.1.
|
|
30
|
-
"typescript": "^
|
|
26
|
+
"@types/node": "^20.11.19",
|
|
27
|
+
"@types/react": "^18.2.55",
|
|
28
|
+
"@types/react-dom": "^18.2.19",
|
|
29
|
+
"@types/react-helmet": "^6.1.11",
|
|
30
|
+
"typescript": "^5.3.3"
|
|
31
31
|
}
|
|
32
32
|
}
|