create-plasmic-app 0.0.67 → 0.0.69

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