create-plasmic-app 0.0.66 → 0.0.68

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.
Files changed (111) hide show
  1. package/.tool-versions +1 -0
  2. package/cpa-out/gatsby-codegen-js/package.json +2 -2
  3. package/cpa-out/gatsby-codegen-js/plasmic.json +54 -3
  4. package/cpa-out/gatsby-codegen-js/src/components/Button.jsx +13 -0
  5. package/cpa-out/gatsby-codegen-js/src/components/RandomDynamicPageButton.jsx +24 -0
  6. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +631 -0
  7. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +176 -0
  8. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +15 -3
  9. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +162 -0
  10. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +39 -0
  11. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
  12. package/cpa-out/gatsby-codegen-js/src/pages/dynamic/[slug].jsx +39 -0
  13. package/cpa-out/gatsby-codegen-ts/package.json +2 -2
  14. package/cpa-out/gatsby-codegen-ts/plasmic.json +54 -3
  15. package/cpa-out/gatsby-codegen-ts/src/components/Button.tsx +36 -0
  16. package/cpa-out/gatsby-codegen-ts/src/components/RandomDynamicPageButton.tsx +44 -0
  17. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +736 -0
  18. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +262 -0
  19. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -0
  20. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +18 -5
  21. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +246 -0
  22. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +44 -0
  23. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
  24. package/cpa-out/gatsby-codegen-ts/src/pages/dynamic/[slug].tsx +41 -0
  25. package/cpa-out/gatsby-loader-js/package.json +3 -3
  26. package/cpa-out/gatsby-loader-ts/package.json +7 -7
  27. package/cpa-out/nextjs-app-loader-js/package.json +4 -4
  28. package/cpa-out/nextjs-app-loader-ts/package.json +6 -6
  29. package/cpa-out/nextjs-pages-codegen-js/components/Button.jsx +13 -0
  30. package/cpa-out/nextjs-pages-codegen-js/components/RandomDynamicPageButton.jsx +24 -0
  31. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +640 -0
  32. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +184 -0
  33. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +15 -3
  34. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +170 -0
  35. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +39 -0
  36. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
  37. package/cpa-out/nextjs-pages-codegen-js/package.json +2 -2
  38. package/cpa-out/nextjs-pages-codegen-js/pages/dynamic/[slug].jsx +35 -0
  39. package/cpa-out/nextjs-pages-codegen-js/plasmic.json +54 -3
  40. package/cpa-out/nextjs-pages-codegen-ts/components/Button.tsx +36 -0
  41. package/cpa-out/nextjs-pages-codegen-ts/components/RandomDynamicPageButton.tsx +44 -0
  42. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +742 -0
  43. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +264 -0
  44. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -0
  45. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +18 -5
  46. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +252 -0
  47. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +44 -0
  48. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
  49. package/cpa-out/nextjs-pages-codegen-ts/package.json +4 -4
  50. package/cpa-out/nextjs-pages-codegen-ts/pages/dynamic/[slug].tsx +37 -0
  51. package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +54 -3
  52. package/cpa-out/nextjs-pages-loader-js/package.json +4 -4
  53. package/cpa-out/nextjs-pages-loader-ts/package.json +6 -6
  54. package/cpa-out/react-codegen-js/package.json +2 -2
  55. package/cpa-out/react-codegen-js/plasmic.json +54 -3
  56. package/cpa-out/react-codegen-js/src/components/Button.jsx +13 -0
  57. package/cpa-out/react-codegen-js/src/components/DynamicPage.jsx +26 -0
  58. package/cpa-out/react-codegen-js/src/components/RandomDynamicPageButton.jsx +24 -0
  59. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +625 -0
  60. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +166 -0
  61. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +15 -3
  62. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +161 -0
  63. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +39 -0
  64. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
  65. package/cpa-out/react-codegen-ts/package.json +2 -2
  66. package/cpa-out/react-codegen-ts/plasmic.json +54 -3
  67. package/cpa-out/react-codegen-ts/src/components/Button.tsx +36 -0
  68. package/cpa-out/react-codegen-ts/src/components/DynamicPage.tsx +45 -0
  69. package/cpa-out/react-codegen-ts/src/components/RandomDynamicPageButton.tsx +44 -0
  70. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +725 -0
  71. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +248 -0
  72. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -0
  73. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +18 -5
  74. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +240 -0
  75. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +44 -0
  76. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
  77. package/cpa-out/react-loader-js/package.json +2 -3
  78. package/cpa-out/react-loader-js/plasmic.json +54 -3
  79. package/cpa-out/react-loader-js/src/components/Button.jsx +13 -0
  80. package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +26 -0
  81. package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +24 -0
  82. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +625 -0
  83. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +166 -0
  84. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +18 -4
  85. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +161 -0
  86. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +39 -0
  87. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
  88. package/cpa-out/react-loader-ts/package.json +2 -3
  89. package/cpa-out/react-loader-ts/plasmic.json +54 -3
  90. package/cpa-out/react-loader-ts/src/components/Button.tsx +36 -0
  91. package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +45 -0
  92. package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +44 -0
  93. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +725 -0
  94. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +248 -0
  95. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -0
  96. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +21 -7
  97. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +240 -0
  98. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +44 -0
  99. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
  100. package/dist/gatsby/gatsby.js +16 -2
  101. package/dist/nextjs/nextjs.js +11 -7
  102. package/dist/react/react.js +17 -5
  103. package/dist/utils/file-utils.d.ts +15 -9
  104. package/dist/utils/file-utils.js +4 -59
  105. package/package.json +2 -2
  106. package/src/gatsby/gatsby.ts +32 -3
  107. package/src/nextjs/nextjs.ts +19 -5
  108. package/src/react/react.ts +28 -6
  109. package/src/utils/file-utils.ts +5 -88
  110. /package/cpa-out/gatsby-codegen-js/src/pages/{404.js → 404.jsx} +0 -0
  111. /package/cpa-out/gatsby-codegen-ts/src/pages/{404.js → 404.tsx} +0 -0
@@ -0,0 +1,264 @@
1
+ // @ts-nocheck
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /* prettier-ignore-start */
5
+
6
+ /** @jsxRuntime classic */
7
+ /** @jsx createPlasmicElementProxy */
8
+ /** @jsxFrag React.Fragment */
9
+
10
+ // This class is auto-generated by Plasmic; please do not edit!
11
+ // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
12
+ // Component: AO44A-w7hh
13
+
14
+ import * as React from "react";
15
+
16
+ import Head from "next/head";
17
+ import Link, { LinkProps } from "next/link";
18
+ import { useRouter } from "next/router";
19
+
20
+ import * as p from "@plasmicapp/react-web";
21
+ import * as ph from "@plasmicapp/react-web/lib/host";
22
+
23
+ import {
24
+ hasVariant,
25
+ classNames,
26
+ wrapWithClassName,
27
+ createPlasmicElementProxy,
28
+ makeFragment,
29
+ MultiChoiceArg,
30
+ SingleBooleanChoiceArg,
31
+ SingleChoiceArg,
32
+ pick,
33
+ omit,
34
+ useTrigger,
35
+ StrictProps,
36
+ deriveRenderOpts,
37
+ ensureGlobalVariants
38
+ } from "@plasmicapp/react-web";
39
+ import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
40
+
41
+ import "@plasmicapp/react-web/lib/plasmic.css";
42
+
43
+ import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
44
+ import sty from "./PlasmicDynamicPage.module.css"; // plasmic-import: AO44A-w7hh/css
45
+
46
+ export type PlasmicDynamicPage__VariantMembers = {};
47
+ export type PlasmicDynamicPage__VariantsArgs = {};
48
+ type VariantPropType = keyof PlasmicDynamicPage__VariantsArgs;
49
+ export const PlasmicDynamicPage__VariantProps = new Array<VariantPropType>();
50
+
51
+ export type PlasmicDynamicPage__ArgsType = {};
52
+ type ArgPropType = keyof PlasmicDynamicPage__ArgsType;
53
+ export const PlasmicDynamicPage__ArgProps = new Array<ArgPropType>();
54
+
55
+ export type PlasmicDynamicPage__OverridesType = {
56
+ root?: p.Flex<"div">;
57
+ section?: p.Flex<"section">;
58
+ h1?: p.Flex<"h1">;
59
+ randomDynamicPageButton?: p.Flex<typeof RandomDynamicPageButton>;
60
+ };
61
+
62
+ export interface DefaultDynamicPageProps {}
63
+
64
+ const __wrapUserFunction =
65
+ globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
66
+ const __wrapUserPromise =
67
+ globalThis.__PlasmicWrapUserPromise ??
68
+ (async (loc, promise) => {
69
+ return await promise;
70
+ });
71
+
72
+ function useNextRouter() {
73
+ try {
74
+ return useRouter();
75
+ } catch {}
76
+ return undefined;
77
+ }
78
+
79
+ function PlasmicDynamicPage__RenderFunc(props: {
80
+ variants: PlasmicDynamicPage__VariantsArgs;
81
+ args: PlasmicDynamicPage__ArgsType;
82
+ overrides: PlasmicDynamicPage__OverridesType;
83
+ forNode?: string;
84
+ }) {
85
+ const { variants, overrides, forNode } = props;
86
+ const __nextRouter = useNextRouter();
87
+
88
+ const $ctx = ph.useDataEnv?.() || {};
89
+ const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
90
+
91
+ const $props = {
92
+ ...args,
93
+ ...variants
94
+ };
95
+ const refsRef = React.useRef({});
96
+ const $refs = refsRef.current;
97
+
98
+ const currentUser = p.useCurrentUser?.() || {};
99
+ const [$queries, setDollarQueries] = React.useState({});
100
+
101
+ return (
102
+ <React.Fragment>
103
+ <Head></Head>
104
+
105
+ <style>{`
106
+ body {
107
+ margin: 0;
108
+ }
109
+ `}</style>
110
+
111
+ <div className={projectcss.plasmic_page_wrapper}>
112
+ <div
113
+ data-plasmic-name={"root"}
114
+ data-plasmic-override={overrides.root}
115
+ data-plasmic-root={true}
116
+ data-plasmic-for-node={forNode}
117
+ className={classNames(
118
+ projectcss.all,
119
+ projectcss.root_reset,
120
+ projectcss.plasmic_default_styles,
121
+ projectcss.plasmic_mixins,
122
+ sty.root
123
+ )}
124
+ >
125
+ <p.Stack
126
+ as={"section"}
127
+ data-plasmic-name={"section"}
128
+ data-plasmic-override={overrides.section}
129
+ hasGap={true}
130
+ className={classNames(projectcss.all, sty.section)}
131
+ >
132
+ <h1
133
+ data-plasmic-name={"h1"}
134
+ data-plasmic-override={overrides.h1}
135
+ className={classNames(
136
+ projectcss.all,
137
+ projectcss.h1,
138
+ projectcss.__wab_text,
139
+ sty.h1
140
+ )}
141
+ >
142
+ {(() => {
143
+ try {
144
+ return $ctx.params.slug;
145
+ } catch (e) {
146
+ if (e instanceof TypeError) {
147
+ return "Page 1";
148
+ }
149
+ throw e;
150
+ }
151
+ })()}
152
+ </h1>
153
+
154
+ <RandomDynamicPageButton
155
+ data-plasmic-name={"randomDynamicPageButton"}
156
+ data-plasmic-override={overrides.randomDynamicPageButton}
157
+ className={classNames(
158
+ "__wab_instance",
159
+ sty.randomDynamicPageButton
160
+ )}
161
+ />
162
+ </p.Stack>
163
+ </div>
164
+ </div>
165
+ </React.Fragment>
166
+ ) as React.ReactElement | null;
167
+ }
168
+
169
+ const PlasmicDescendants = {
170
+ root: ["root", "section", "h1", "randomDynamicPageButton"],
171
+ section: ["section", "h1", "randomDynamicPageButton"],
172
+ h1: ["h1"],
173
+ randomDynamicPageButton: ["randomDynamicPageButton"]
174
+ } as const;
175
+ type NodeNameType = keyof typeof PlasmicDescendants;
176
+ type DescendantsType<T extends NodeNameType> =
177
+ (typeof PlasmicDescendants)[T][number];
178
+ type NodeDefaultElementType = {
179
+ root: "div";
180
+ section: "section";
181
+ h1: "h1";
182
+ randomDynamicPageButton: typeof RandomDynamicPageButton;
183
+ };
184
+
185
+ type ReservedPropsType = "variants" | "args" | "overrides";
186
+ type NodeOverridesType<T extends NodeNameType> = Pick<
187
+ PlasmicDynamicPage__OverridesType,
188
+ DescendantsType<T>
189
+ >;
190
+ type NodeComponentProps<T extends NodeNameType> =
191
+ // Explicitly specify variants, args, and overrides as objects
192
+ {
193
+ variants?: PlasmicDynamicPage__VariantsArgs;
194
+ args?: PlasmicDynamicPage__ArgsType;
195
+ overrides?: NodeOverridesType<T>;
196
+ } & Omit<PlasmicDynamicPage__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
197
+ /* Specify args directly as props*/ Omit<
198
+ PlasmicDynamicPage__ArgsType,
199
+ ReservedPropsType
200
+ > &
201
+ /* Specify overrides for each element directly as props*/ Omit<
202
+ NodeOverridesType<T>,
203
+ ReservedPropsType | VariantPropType | ArgPropType
204
+ > &
205
+ /* Specify props for the root element*/ Omit<
206
+ Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
207
+ ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
208
+ >;
209
+
210
+ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
211
+ type PropsType = NodeComponentProps<NodeName> & { key?: React.Key };
212
+ const func = function <T extends PropsType>(
213
+ props: T & StrictProps<T, PropsType>
214
+ ) {
215
+ const { variants, args, overrides } = React.useMemo(
216
+ () =>
217
+ deriveRenderOpts(props, {
218
+ name: nodeName,
219
+ descendantNames: [...PlasmicDescendants[nodeName]],
220
+ internalArgPropNames: PlasmicDynamicPage__ArgProps,
221
+ internalVariantPropNames: PlasmicDynamicPage__VariantProps
222
+ }),
223
+ [props, nodeName]
224
+ );
225
+ return PlasmicDynamicPage__RenderFunc({
226
+ variants,
227
+ args,
228
+ overrides,
229
+ forNode: nodeName
230
+ });
231
+ };
232
+ if (nodeName === "root") {
233
+ func.displayName = "PlasmicDynamicPage";
234
+ } else {
235
+ func.displayName = `PlasmicDynamicPage.${nodeName}`;
236
+ }
237
+ return func;
238
+ }
239
+
240
+ export const PlasmicDynamicPage = Object.assign(
241
+ // Top-level PlasmicDynamicPage renders the root element
242
+ makeNodeComponent("root"),
243
+ {
244
+ // Helper components rendering sub-elements
245
+ section: makeNodeComponent("section"),
246
+ h1: makeNodeComponent("h1"),
247
+ randomDynamicPageButton: makeNodeComponent("randomDynamicPageButton"),
248
+
249
+ // Metadata about props expected for PlasmicDynamicPage
250
+ internalVariantProps: PlasmicDynamicPage__VariantProps,
251
+ internalArgProps: PlasmicDynamicPage__ArgProps,
252
+
253
+ // Page metadata
254
+ pageMetadata: {
255
+ title: "",
256
+ description: "",
257
+ ogImageSrc: "",
258
+ canonical: ""
259
+ }
260
+ }
261
+ );
262
+
263
+ export default PlasmicDynamicPage;
264
+ /* prettier-ignore-end */
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /* tslint:disable */
4
4
  /* prettier-ignore-start */
5
+
5
6
  import * as React from "react";
6
7
  import * as p from "@plasmicapp/react-web";
7
8
 
@@ -10,6 +10,7 @@
10
10
  // This class is auto-generated by Plasmic; please do not edit!
11
11
  // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
12
12
  // Component: 6uuAAE1jiCew
13
+
13
14
  import * as React from "react";
14
15
 
15
16
  import Head from "next/head";
@@ -35,6 +36,7 @@ import {
35
36
  deriveRenderOpts,
36
37
  ensureGlobalVariants
37
38
  } from "@plasmicapp/react-web";
39
+ import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
38
40
 
39
41
  import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
40
42
 
@@ -57,6 +59,7 @@ export type PlasmicHomepage__OverridesType = {
57
59
  section?: p.Flex<"section">;
58
60
  h1?: p.Flex<"h1">;
59
61
  text?: p.Flex<"div">;
62
+ randomDynamicPageButton?: p.Flex<typeof RandomDynamicPageButton>;
60
63
  };
61
64
 
62
65
  export interface DefaultHomepageProps {}
@@ -80,7 +83,6 @@ function PlasmicHomepage__RenderFunc(props: {
80
83
  variants: PlasmicHomepage__VariantsArgs;
81
84
  args: PlasmicHomepage__ArgsType;
82
85
  overrides: PlasmicHomepage__OverridesType;
83
-
84
86
  forNode?: string;
85
87
  }) {
86
88
  const { variants, overrides, forNode } = props;
@@ -191,6 +193,15 @@ function PlasmicHomepage__RenderFunc(props: {
191
193
  </React.Fragment>
192
194
  )}
193
195
  </div>
196
+
197
+ <RandomDynamicPageButton
198
+ data-plasmic-name={"randomDynamicPageButton"}
199
+ data-plasmic-override={overrides.randomDynamicPageButton}
200
+ className={classNames(
201
+ "__wab_instance",
202
+ sty.randomDynamicPageButton
203
+ )}
204
+ />
194
205
  </p.Stack>
195
206
  </div>
196
207
  </div>
@@ -199,10 +210,11 @@ function PlasmicHomepage__RenderFunc(props: {
199
210
  }
200
211
 
201
212
  const PlasmicDescendants = {
202
- root: ["root", "section", "h1", "text"],
203
- section: ["section", "h1", "text"],
213
+ root: ["root", "section", "h1", "text", "randomDynamicPageButton"],
214
+ section: ["section", "h1", "text", "randomDynamicPageButton"],
204
215
  h1: ["h1"],
205
- text: ["text"]
216
+ text: ["text"],
217
+ randomDynamicPageButton: ["randomDynamicPageButton"]
206
218
  } as const;
207
219
  type NodeNameType = keyof typeof PlasmicDescendants;
208
220
  type DescendantsType<T extends NodeNameType> =
@@ -212,6 +224,7 @@ type NodeDefaultElementType = {
212
224
  section: "section";
213
225
  h1: "h1";
214
226
  text: "div";
227
+ randomDynamicPageButton: typeof RandomDynamicPageButton;
215
228
  };
216
229
 
217
230
  type ReservedPropsType = "variants" | "args" | "overrides";
@@ -254,7 +267,6 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
254
267
  }),
255
268
  [props, nodeName]
256
269
  );
257
-
258
270
  return PlasmicHomepage__RenderFunc({
259
271
  variants,
260
272
  args,
@@ -278,6 +290,7 @@ export const PlasmicHomepage = Object.assign(
278
290
  section: makeNodeComponent("section"),
279
291
  h1: makeNodeComponent("h1"),
280
292
  text: makeNodeComponent("text"),
293
+ randomDynamicPageButton: makeNodeComponent("randomDynamicPageButton"),
281
294
 
282
295
  // Metadata about props expected for PlasmicHomepage
283
296
  internalVariantProps: PlasmicHomepage__VariantProps,
@@ -0,0 +1,252 @@
1
+ // @ts-nocheck
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /* prettier-ignore-start */
5
+
6
+ /** @jsxRuntime classic */
7
+ /** @jsx createPlasmicElementProxy */
8
+ /** @jsxFrag React.Fragment */
9
+
10
+ // This class is auto-generated by Plasmic; please do not edit!
11
+ // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
12
+ // Component: Q23H1_1M_P
13
+
14
+ import * as React from "react";
15
+
16
+ import Head from "next/head";
17
+ import Link, { LinkProps } from "next/link";
18
+ import { useRouter } from "next/router";
19
+
20
+ import * as p from "@plasmicapp/react-web";
21
+ import * as ph from "@plasmicapp/react-web/lib/host";
22
+
23
+ import {
24
+ hasVariant,
25
+ classNames,
26
+ wrapWithClassName,
27
+ createPlasmicElementProxy,
28
+ makeFragment,
29
+ MultiChoiceArg,
30
+ SingleBooleanChoiceArg,
31
+ SingleChoiceArg,
32
+ pick,
33
+ omit,
34
+ useTrigger,
35
+ StrictProps,
36
+ deriveRenderOpts,
37
+ ensureGlobalVariants
38
+ } from "@plasmicapp/react-web";
39
+ import Button from "../../Button"; // plasmic-import: TQcvW_pSKi3/component
40
+
41
+ import "@plasmicapp/react-web/lib/plasmic.css";
42
+
43
+ import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
44
+ import sty from "./PlasmicRandomDynamicPageButton.module.css"; // plasmic-import: Q23H1_1M_P/css
45
+
46
+ import ChecksvgIcon from "./icons/PlasmicIcon__Checksvg"; // plasmic-import: gj-_D7n31Ho/icon
47
+ import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
48
+
49
+ export type PlasmicRandomDynamicPageButton__VariantMembers = {};
50
+ export type PlasmicRandomDynamicPageButton__VariantsArgs = {};
51
+ type VariantPropType = keyof PlasmicRandomDynamicPageButton__VariantsArgs;
52
+ export const PlasmicRandomDynamicPageButton__VariantProps =
53
+ new Array<VariantPropType>();
54
+
55
+ export type PlasmicRandomDynamicPageButton__ArgsType = {};
56
+ type ArgPropType = keyof PlasmicRandomDynamicPageButton__ArgsType;
57
+ export const PlasmicRandomDynamicPageButton__ArgProps =
58
+ new Array<ArgPropType>();
59
+
60
+ export type PlasmicRandomDynamicPageButton__OverridesType = {
61
+ root?: p.Flex<typeof Button>;
62
+ };
63
+
64
+ export interface DefaultRandomDynamicPageButtonProps {
65
+ className?: string;
66
+ }
67
+
68
+ const __wrapUserFunction =
69
+ globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
70
+ const __wrapUserPromise =
71
+ globalThis.__PlasmicWrapUserPromise ??
72
+ (async (loc, promise) => {
73
+ return await promise;
74
+ });
75
+
76
+ function useNextRouter() {
77
+ try {
78
+ return useRouter();
79
+ } catch {}
80
+ return undefined;
81
+ }
82
+
83
+ function PlasmicRandomDynamicPageButton__RenderFunc(props: {
84
+ variants: PlasmicRandomDynamicPageButton__VariantsArgs;
85
+ args: PlasmicRandomDynamicPageButton__ArgsType;
86
+ overrides: PlasmicRandomDynamicPageButton__OverridesType;
87
+ forNode?: string;
88
+ }) {
89
+ const { variants, overrides, forNode } = props;
90
+ const __nextRouter = useNextRouter();
91
+
92
+ const $ctx = ph.useDataEnv?.() || {};
93
+ const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
94
+
95
+ const $props = {
96
+ ...args,
97
+ ...variants
98
+ };
99
+ const refsRef = React.useRef({});
100
+ const $refs = refsRef.current;
101
+
102
+ const currentUser = p.useCurrentUser?.() || {};
103
+ const [$queries, setDollarQueries] = React.useState({});
104
+
105
+ return (
106
+ <Button
107
+ data-plasmic-name={"root"}
108
+ data-plasmic-override={overrides.root}
109
+ data-plasmic-root={true}
110
+ data-plasmic-for-node={forNode}
111
+ className={classNames("__wab_instance", sty.root)}
112
+ onClick={async event => {
113
+ const $steps = {};
114
+ $steps["goToDynamicPage"] = true
115
+ ? (() => {
116
+ const actionArgs = {
117
+ destination: __wrapUserFunction(
118
+ {
119
+ type: "InteractionArgLoc",
120
+ actionName: "navigation",
121
+ interactionUuid: "9Y3jL0zxjA",
122
+ componentUuid: "Q23H1_1M_P",
123
+ argName: "destination"
124
+ },
125
+ () =>
126
+ `/dynamic/${(() => {
127
+ try {
128
+ return Math.random().toString(36).slice(2);
129
+ } catch (e) {
130
+ if (e instanceof TypeError) {
131
+ return "value";
132
+ }
133
+ throw e;
134
+ }
135
+ })()}`
136
+ )
137
+ };
138
+ return __wrapUserFunction(
139
+ {
140
+ type: "InteractionLoc",
141
+ actionName: "navigation",
142
+ interactionUuid: "9Y3jL0zxjA",
143
+ componentUuid: "Q23H1_1M_P"
144
+ },
145
+ () =>
146
+ (({ destination }) => {
147
+ __nextRouter?.push(destination);
148
+ })?.apply(null, [actionArgs]),
149
+ actionArgs
150
+ );
151
+ })()
152
+ : undefined;
153
+ if (
154
+ typeof $steps["goToDynamicPage"] === "object" &&
155
+ typeof $steps["goToDynamicPage"].then === "function"
156
+ ) {
157
+ $steps["goToDynamicPage"] = await __wrapUserPromise(
158
+ {
159
+ type: "InteractionLoc",
160
+ actionName: "navigation",
161
+ interactionUuid: "9Y3jL0zxjA",
162
+ componentUuid: "Q23H1_1M_P"
163
+ },
164
+ $steps["goToDynamicPage"]
165
+ );
166
+ }
167
+ }}
168
+ >
169
+ {"Random Dynamic Page"}
170
+ </Button>
171
+ ) as React.ReactElement | null;
172
+ }
173
+
174
+ const PlasmicDescendants = {
175
+ root: ["root"]
176
+ } as const;
177
+ type NodeNameType = keyof typeof PlasmicDescendants;
178
+ type DescendantsType<T extends NodeNameType> =
179
+ (typeof PlasmicDescendants)[T][number];
180
+ type NodeDefaultElementType = {
181
+ root: typeof Button;
182
+ };
183
+
184
+ type ReservedPropsType = "variants" | "args" | "overrides";
185
+ type NodeOverridesType<T extends NodeNameType> = Pick<
186
+ PlasmicRandomDynamicPageButton__OverridesType,
187
+ DescendantsType<T>
188
+ >;
189
+ type NodeComponentProps<T extends NodeNameType> =
190
+ // Explicitly specify variants, args, and overrides as objects
191
+ {
192
+ variants?: PlasmicRandomDynamicPageButton__VariantsArgs;
193
+ args?: PlasmicRandomDynamicPageButton__ArgsType;
194
+ overrides?: NodeOverridesType<T>;
195
+ } & Omit<PlasmicRandomDynamicPageButton__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
196
+ /* Specify args directly as props*/ Omit<
197
+ PlasmicRandomDynamicPageButton__ArgsType,
198
+ ReservedPropsType
199
+ > &
200
+ /* Specify overrides for each element directly as props*/ Omit<
201
+ NodeOverridesType<T>,
202
+ ReservedPropsType | VariantPropType | ArgPropType
203
+ > &
204
+ /* Specify props for the root element*/ Omit<
205
+ Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
206
+ ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
207
+ >;
208
+
209
+ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
210
+ type PropsType = NodeComponentProps<NodeName> & { key?: React.Key };
211
+ const func = function <T extends PropsType>(
212
+ props: T & StrictProps<T, PropsType>
213
+ ) {
214
+ const { variants, args, overrides } = React.useMemo(
215
+ () =>
216
+ deriveRenderOpts(props, {
217
+ name: nodeName,
218
+ descendantNames: [...PlasmicDescendants[nodeName]],
219
+ internalArgPropNames: PlasmicRandomDynamicPageButton__ArgProps,
220
+ internalVariantPropNames: PlasmicRandomDynamicPageButton__VariantProps
221
+ }),
222
+ [props, nodeName]
223
+ );
224
+ return PlasmicRandomDynamicPageButton__RenderFunc({
225
+ variants,
226
+ args,
227
+ overrides,
228
+ forNode: nodeName
229
+ });
230
+ };
231
+ if (nodeName === "root") {
232
+ func.displayName = "PlasmicRandomDynamicPageButton";
233
+ } else {
234
+ func.displayName = `PlasmicRandomDynamicPageButton.${nodeName}`;
235
+ }
236
+ return func;
237
+ }
238
+
239
+ export const PlasmicRandomDynamicPageButton = Object.assign(
240
+ // Top-level PlasmicRandomDynamicPageButton renders the root element
241
+ makeNodeComponent("root"),
242
+ {
243
+ // Helper components rendering sub-elements
244
+
245
+ // Metadata about props expected for PlasmicRandomDynamicPageButton
246
+ internalVariantProps: PlasmicRandomDynamicPageButton__VariantProps,
247
+ internalArgProps: PlasmicRandomDynamicPageButton__ArgProps
248
+ }
249
+ );
250
+
251
+ export default PlasmicRandomDynamicPageButton;
252
+ /* prettier-ignore-end */
@@ -0,0 +1,44 @@
1
+ // @ts-nocheck
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /* prettier-ignore-start */
5
+ import React from "react";
6
+ import { classNames } from "@plasmicapp/react-web";
7
+
8
+ export type ChecksvgIconProps = React.ComponentProps<"svg"> & {
9
+ title?: string;
10
+ };
11
+
12
+ export function ChecksvgIcon(props: ChecksvgIconProps) {
13
+ const { className, style, title, ...restProps } = props;
14
+ return (
15
+ <svg
16
+ xmlns={"http://www.w3.org/2000/svg"}
17
+ fill={"none"}
18
+ viewBox={"0 0 24 24"}
19
+ height={"1em"}
20
+ width={"1em"}
21
+ style={{
22
+ fill: "currentcolor",
23
+
24
+ ...(style || {}),
25
+ }}
26
+ className={classNames("plasmic-default__svg", className)}
27
+ {...restProps}
28
+ >
29
+ {title && <title>{title}</title>}
30
+
31
+ <path
32
+ fillRule={"evenodd"}
33
+ clipRule={"evenodd"}
34
+ d={
35
+ "M18.416 5.876a.75.75 0 01.208 1.04L11.42 17.721a1.75 1.75 0 01-2.871.06l-3.156-4.34a.75.75 0 111.214-.882l3.155 4.339a.25.25 0 00.41-.009l7.204-10.805a.75.75 0 011.04-.208z"
36
+ }
37
+ fill={"currentColor"}
38
+ ></path>
39
+ </svg>
40
+ );
41
+ }
42
+
43
+ export default ChecksvgIcon;
44
+ /* prettier-ignore-end */
@@ -0,0 +1,41 @@
1
+ // @ts-nocheck
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /* prettier-ignore-start */
5
+ import React from "react";
6
+ import { classNames } from "@plasmicapp/react-web";
7
+
8
+ export type IconIconProps = React.ComponentProps<"svg"> & {
9
+ title?: string;
10
+ };
11
+
12
+ export function IconIcon(props: IconIconProps) {
13
+ const { className, style, title, ...restProps } = props;
14
+ return (
15
+ <svg
16
+ xmlns={"http://www.w3.org/2000/svg"}
17
+ stroke={"currentColor"}
18
+ fill={"currentColor"}
19
+ strokeWidth={"0"}
20
+ viewBox={"0 0 16 16"}
21
+ height={"1em"}
22
+ width={"1em"}
23
+ className={classNames("plasmic-default__svg", className)}
24
+ style={style}
25
+ {...restProps}
26
+ >
27
+ {title && <title>{title}</title>}
28
+
29
+ <path
30
+ fillRule={"evenodd"}
31
+ d={
32
+ "M1 8a.5.5 0 01.5-.5h11.793l-3.147-3.146a.5.5 0 01.708-.708l4 4a.5.5 0 010 .708l-4 4a.5.5 0 01-.708-.708L13.293 8.5H1.5A.5.5 0 011 8z"
33
+ }
34
+ stroke={"none"}
35
+ ></path>
36
+ </svg>
37
+ );
38
+ }
39
+
40
+ export default IconIcon;
41
+ /* prettier-ignore-end */