create-plasmic-app 0.0.104 → 0.0.105
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/.gitignore +4 -0
- package/cpa-out/tanstack-codegen-ts/package.json +42 -0
- package/cpa-out/tanstack-codegen-ts/plasmic.json +136 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Button.tsx +35 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Header.tsx +21 -0
- package/cpa-out/tanstack-codegen-ts/src/components/RandomDynamicPageButton.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +870 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +309 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +28 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +351 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +279 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
- package/cpa-out/tanstack-codegen-ts/src/routeTree.gen.ts +95 -0
- package/cpa-out/tanstack-codegen-ts/src/router.tsx +24 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/__root.tsx +37 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/dynamic/$slug/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/plasmic-host.tsx +20 -0
- package/cpa-out/tanstack-codegen-ts/tsconfig.json +28 -0
- package/cpa-out/tanstack-codegen-ts/vite.config.ts +26 -0
- package/dist/tanstack/tanstack.js +1 -1
- package/dist/tanstack/templates/file-router/config.d.ts +1 -1
- package/dist/tanstack/templates/file-router/config.js +27 -27
- package/package.json +2 -2
- package/src/tanstack/tanstack.ts +3 -3
- package/src/tanstack/templates/file-router/config.ts +25 -25
package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
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 { useRouter, Link } from "@tanstack/react-router";
|
|
17
|
+
import type { LinkProps } from "@tanstack/react-router";
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
Flex as Flex__,
|
|
21
|
+
MultiChoiceArg,
|
|
22
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
23
|
+
PlasmicIcon as PlasmicIcon__,
|
|
24
|
+
PlasmicImg as PlasmicImg__,
|
|
25
|
+
PlasmicLink as PlasmicLink__,
|
|
26
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
27
|
+
SingleBooleanChoiceArg,
|
|
28
|
+
SingleChoiceArg,
|
|
29
|
+
Stack as Stack__,
|
|
30
|
+
StrictProps,
|
|
31
|
+
Trans as Trans__,
|
|
32
|
+
classNames,
|
|
33
|
+
createPlasmicElementProxy,
|
|
34
|
+
deriveRenderOpts,
|
|
35
|
+
ensureGlobalVariants,
|
|
36
|
+
generateOnMutateForSpec,
|
|
37
|
+
generateStateOnChangeProp,
|
|
38
|
+
generateStateOnChangePropForCodeComponents,
|
|
39
|
+
generateStateValueProp,
|
|
40
|
+
get as $stateGet,
|
|
41
|
+
hasVariant,
|
|
42
|
+
initializeCodeComponentStates,
|
|
43
|
+
initializePlasmicStates,
|
|
44
|
+
makeFragment,
|
|
45
|
+
omit,
|
|
46
|
+
pick,
|
|
47
|
+
renderPlasmicSlot,
|
|
48
|
+
set as $stateSet,
|
|
49
|
+
useCurrentUser,
|
|
50
|
+
useDollarState,
|
|
51
|
+
usePlasmicTranslator,
|
|
52
|
+
useTrigger,
|
|
53
|
+
wrapWithClassName
|
|
54
|
+
} from "@plasmicapp/react-web";
|
|
55
|
+
import {
|
|
56
|
+
DataCtxReader as DataCtxReader__,
|
|
57
|
+
useDataEnv,
|
|
58
|
+
useGlobalActions
|
|
59
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
60
|
+
|
|
61
|
+
import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
|
|
62
|
+
|
|
63
|
+
import globalcss from "@plasmicapp/react-web/lib/plasmic.css?url";
|
|
64
|
+
import defaultcss from "../plasmic__default_style.css?url"; // plasmic-import: global/defaultcss
|
|
65
|
+
|
|
66
|
+
import projectcss from "./plasmic.css?url"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
67
|
+
import sty from "./PlasmicDynamicPage.css?url"; // plasmic-import: AO44A-w7hh/css
|
|
68
|
+
|
|
69
|
+
createPlasmicElementProxy;
|
|
70
|
+
|
|
71
|
+
export type PlasmicDynamicPage__VariantMembers = {};
|
|
72
|
+
export type PlasmicDynamicPage__VariantsArgs = {};
|
|
73
|
+
type VariantPropType = keyof PlasmicDynamicPage__VariantsArgs;
|
|
74
|
+
export const PlasmicDynamicPage__VariantProps = new Array<VariantPropType>();
|
|
75
|
+
|
|
76
|
+
export type PlasmicDynamicPage__ArgsType = {};
|
|
77
|
+
type ArgPropType = keyof PlasmicDynamicPage__ArgsType;
|
|
78
|
+
export const PlasmicDynamicPage__ArgProps = new Array<ArgPropType>();
|
|
79
|
+
|
|
80
|
+
export type PlasmicDynamicPage__OverridesType = {
|
|
81
|
+
root?: Flex__<"div">;
|
|
82
|
+
section?: Flex__<"section">;
|
|
83
|
+
h1?: Flex__<"h1">;
|
|
84
|
+
randomDynamicPageButton?: Flex__<typeof RandomDynamicPageButton>;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export interface DefaultDynamicPageProps {}
|
|
88
|
+
|
|
89
|
+
const $$ = {};
|
|
90
|
+
|
|
91
|
+
function useTanStackRouter() {
|
|
92
|
+
try {
|
|
93
|
+
return useRouter();
|
|
94
|
+
} catch {}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function PlasmicDynamicPage__RenderFunc(props: {
|
|
99
|
+
variants: PlasmicDynamicPage__VariantsArgs;
|
|
100
|
+
args: PlasmicDynamicPage__ArgsType;
|
|
101
|
+
overrides: PlasmicDynamicPage__OverridesType;
|
|
102
|
+
forNode?: string;
|
|
103
|
+
}) {
|
|
104
|
+
const { variants, overrides, forNode } = props;
|
|
105
|
+
|
|
106
|
+
const args = React.useMemo(
|
|
107
|
+
() =>
|
|
108
|
+
Object.assign(
|
|
109
|
+
{},
|
|
110
|
+
Object.fromEntries(
|
|
111
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
112
|
+
)
|
|
113
|
+
),
|
|
114
|
+
[props.args]
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const $props = {
|
|
118
|
+
...args,
|
|
119
|
+
...variants
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const __tanstackRouter = useTanStackRouter();
|
|
123
|
+
const $ctx = useDataEnv?.() || {};
|
|
124
|
+
const refsRef = React.useRef({});
|
|
125
|
+
const $refs = refsRef.current;
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<React.Fragment>
|
|
129
|
+
<style>{`
|
|
130
|
+
body {
|
|
131
|
+
margin: 0;
|
|
132
|
+
}
|
|
133
|
+
`}</style>
|
|
134
|
+
|
|
135
|
+
<div className={"plasmic_page_wrapper"}>
|
|
136
|
+
<div
|
|
137
|
+
data-plasmic-name={"root"}
|
|
138
|
+
data-plasmic-override={overrides.root}
|
|
139
|
+
data-plasmic-root={true}
|
|
140
|
+
data-plasmic-for-node={forNode}
|
|
141
|
+
className={classNames(
|
|
142
|
+
"plasmic_default__all",
|
|
143
|
+
"plasmic_default__div",
|
|
144
|
+
"root_reset_47tFXWjN2C4NyHFGGpaYQ3",
|
|
145
|
+
"plasmic_default_styles",
|
|
146
|
+
"plasmic_mixins",
|
|
147
|
+
"plasmic_tokens",
|
|
148
|
+
"DynamicPage__root__hgzte"
|
|
149
|
+
)}
|
|
150
|
+
>
|
|
151
|
+
<Stack__
|
|
152
|
+
as={"section"}
|
|
153
|
+
data-plasmic-name={"section"}
|
|
154
|
+
data-plasmic-override={overrides.section}
|
|
155
|
+
hasGap={true}
|
|
156
|
+
className={classNames(
|
|
157
|
+
"plasmic_default__all",
|
|
158
|
+
"plasmic_default__section",
|
|
159
|
+
"DynamicPage__section__mbqxB"
|
|
160
|
+
)}
|
|
161
|
+
>
|
|
162
|
+
<h1
|
|
163
|
+
data-plasmic-name={"h1"}
|
|
164
|
+
data-plasmic-override={overrides.h1}
|
|
165
|
+
className={classNames(
|
|
166
|
+
"plasmic_default__all",
|
|
167
|
+
"plasmic_default__h1",
|
|
168
|
+
"__wab_text",
|
|
169
|
+
"DynamicPage__h1__uyAe1"
|
|
170
|
+
)}
|
|
171
|
+
>
|
|
172
|
+
<React.Fragment>
|
|
173
|
+
{(() => {
|
|
174
|
+
try {
|
|
175
|
+
return $ctx.params.slug;
|
|
176
|
+
} catch (e) {
|
|
177
|
+
if (
|
|
178
|
+
e instanceof TypeError ||
|
|
179
|
+
e?.plasmicType === "PlasmicUndefinedDataError"
|
|
180
|
+
) {
|
|
181
|
+
return "Page 1";
|
|
182
|
+
}
|
|
183
|
+
throw e;
|
|
184
|
+
}
|
|
185
|
+
})()}
|
|
186
|
+
</React.Fragment>
|
|
187
|
+
</h1>
|
|
188
|
+
<RandomDynamicPageButton
|
|
189
|
+
data-plasmic-name={"randomDynamicPageButton"}
|
|
190
|
+
data-plasmic-override={overrides.randomDynamicPageButton}
|
|
191
|
+
className={classNames(
|
|
192
|
+
"__wab_instance",
|
|
193
|
+
"DynamicPage__randomDynamicPageButton__kaCiI"
|
|
194
|
+
)}
|
|
195
|
+
/>
|
|
196
|
+
</Stack__>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</React.Fragment>
|
|
200
|
+
) as React.ReactElement | null;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const PlasmicDescendants = {
|
|
204
|
+
root: ["root", "section", "h1", "randomDynamicPageButton"],
|
|
205
|
+
section: ["section", "h1", "randomDynamicPageButton"],
|
|
206
|
+
h1: ["h1"],
|
|
207
|
+
randomDynamicPageButton: ["randomDynamicPageButton"]
|
|
208
|
+
} as const;
|
|
209
|
+
type NodeNameType = keyof typeof PlasmicDescendants;
|
|
210
|
+
type DescendantsType<T extends NodeNameType> =
|
|
211
|
+
(typeof PlasmicDescendants)[T][number];
|
|
212
|
+
type NodeDefaultElementType = {
|
|
213
|
+
root: "div";
|
|
214
|
+
section: "section";
|
|
215
|
+
h1: "h1";
|
|
216
|
+
randomDynamicPageButton: typeof RandomDynamicPageButton;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
type ReservedPropsType = "variants" | "args" | "overrides";
|
|
220
|
+
type NodeOverridesType<T extends NodeNameType> = Pick<
|
|
221
|
+
PlasmicDynamicPage__OverridesType,
|
|
222
|
+
DescendantsType<T>
|
|
223
|
+
>;
|
|
224
|
+
type NodeComponentProps<T extends NodeNameType> =
|
|
225
|
+
// Explicitly specify variants, args, and overrides as objects
|
|
226
|
+
{
|
|
227
|
+
variants?: PlasmicDynamicPage__VariantsArgs;
|
|
228
|
+
args?: PlasmicDynamicPage__ArgsType;
|
|
229
|
+
overrides?: NodeOverridesType<T>;
|
|
230
|
+
} & Omit<PlasmicDynamicPage__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
231
|
+
// Specify args directly as props
|
|
232
|
+
Omit<PlasmicDynamicPage__ArgsType, ReservedPropsType> &
|
|
233
|
+
// Specify overrides for each element directly as props
|
|
234
|
+
Omit<
|
|
235
|
+
NodeOverridesType<T>,
|
|
236
|
+
ReservedPropsType | VariantPropType | ArgPropType
|
|
237
|
+
> &
|
|
238
|
+
// Specify props for the root element
|
|
239
|
+
Omit<
|
|
240
|
+
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
241
|
+
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
242
|
+
>;
|
|
243
|
+
|
|
244
|
+
function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
245
|
+
type PropsType = NodeComponentProps<NodeName> & { key?: React.Key };
|
|
246
|
+
const func = function <T extends PropsType>(
|
|
247
|
+
props: T & StrictProps<T, PropsType>
|
|
248
|
+
) {
|
|
249
|
+
const { variants, args, overrides } = React.useMemo(
|
|
250
|
+
() =>
|
|
251
|
+
deriveRenderOpts(props, {
|
|
252
|
+
name: nodeName,
|
|
253
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
254
|
+
internalArgPropNames: PlasmicDynamicPage__ArgProps,
|
|
255
|
+
internalVariantPropNames: PlasmicDynamicPage__VariantProps
|
|
256
|
+
}),
|
|
257
|
+
[props, nodeName]
|
|
258
|
+
);
|
|
259
|
+
return PlasmicDynamicPage__RenderFunc({
|
|
260
|
+
variants,
|
|
261
|
+
args,
|
|
262
|
+
overrides,
|
|
263
|
+
forNode: nodeName
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
if (nodeName === "root") {
|
|
267
|
+
func.displayName = "PlasmicDynamicPage";
|
|
268
|
+
} else {
|
|
269
|
+
func.displayName = `PlasmicDynamicPage.${nodeName}`;
|
|
270
|
+
}
|
|
271
|
+
return func;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export const PlasmicDynamicPage = Object.assign(
|
|
275
|
+
// Top-level PlasmicDynamicPage renders the root element
|
|
276
|
+
makeNodeComponent("root"),
|
|
277
|
+
{
|
|
278
|
+
// Helper components rendering sub-elements
|
|
279
|
+
section: makeNodeComponent("section"),
|
|
280
|
+
h1: makeNodeComponent("h1"),
|
|
281
|
+
randomDynamicPageButton: makeNodeComponent("randomDynamicPageButton"),
|
|
282
|
+
|
|
283
|
+
// Metadata about props expected for PlasmicDynamicPage
|
|
284
|
+
internalVariantProps: PlasmicDynamicPage__VariantProps,
|
|
285
|
+
internalArgProps: PlasmicDynamicPage__ArgProps,
|
|
286
|
+
|
|
287
|
+
// Page metadata
|
|
288
|
+
pageMetadata: {
|
|
289
|
+
title: "",
|
|
290
|
+
description: "",
|
|
291
|
+
ogImageSrc: "",
|
|
292
|
+
canonical: ""
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
export const PlasmicDynamicPage__HeadOptions = {
|
|
298
|
+
meta: [{ name: "twitter:card", content: "summary" }],
|
|
299
|
+
|
|
300
|
+
links: [
|
|
301
|
+
{ rel: "stylesheet", href: globalcss },
|
|
302
|
+
{ rel: "stylesheet", href: defaultcss },
|
|
303
|
+
{ rel: "stylesheet", href: projectcss },
|
|
304
|
+
{ rel: "stylesheet", href: sty }
|
|
305
|
+
]
|
|
306
|
+
} as Record<"meta" | "links", Array<Record<string, string>>>;
|
|
307
|
+
|
|
308
|
+
export default PlasmicDynamicPage;
|
|
309
|
+
/* prettier-ignore-end */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* prettier-ignore-start */
|
|
5
|
+
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { createUseScreenVariants } from "@plasmicapp/react-web";
|
|
8
|
+
|
|
9
|
+
export type ScreenValue = "desktopOnly";
|
|
10
|
+
export const ScreenContext = React.createContext<ScreenValue[] | undefined>(
|
|
11
|
+
"PLEASE_RENDER_INSIDE_PROVIDER" as any
|
|
12
|
+
);
|
|
13
|
+
export function ScreenContextProvider(
|
|
14
|
+
props: React.PropsWithChildren<{ value: ScreenValue[] | undefined }>
|
|
15
|
+
) {
|
|
16
|
+
return (
|
|
17
|
+
<ScreenContext.Provider value={props.value}>
|
|
18
|
+
{props.children}
|
|
19
|
+
</ScreenContext.Provider>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const useScreenVariants = createUseScreenVariants(true, {
|
|
24
|
+
desktopOnly: "(min-width:768px)",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default ScreenContext;
|
|
28
|
+
/* prettier-ignore-end */
|
package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
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: 6uuAAE1jiCew
|
|
13
|
+
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
|
|
16
|
+
import { useRouter, Link } from "@tanstack/react-router";
|
|
17
|
+
import type { LinkProps } from "@tanstack/react-router";
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
Flex as Flex__,
|
|
21
|
+
MultiChoiceArg,
|
|
22
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
23
|
+
PlasmicIcon as PlasmicIcon__,
|
|
24
|
+
PlasmicImg as PlasmicImg__,
|
|
25
|
+
PlasmicLink as PlasmicLink__,
|
|
26
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
27
|
+
SingleBooleanChoiceArg,
|
|
28
|
+
SingleChoiceArg,
|
|
29
|
+
Stack as Stack__,
|
|
30
|
+
StrictProps,
|
|
31
|
+
Trans as Trans__,
|
|
32
|
+
classNames,
|
|
33
|
+
createPlasmicElementProxy,
|
|
34
|
+
deriveRenderOpts,
|
|
35
|
+
ensureGlobalVariants,
|
|
36
|
+
generateOnMutateForSpec,
|
|
37
|
+
generateStateOnChangeProp,
|
|
38
|
+
generateStateOnChangePropForCodeComponents,
|
|
39
|
+
generateStateValueProp,
|
|
40
|
+
get as $stateGet,
|
|
41
|
+
hasVariant,
|
|
42
|
+
initializeCodeComponentStates,
|
|
43
|
+
initializePlasmicStates,
|
|
44
|
+
makeFragment,
|
|
45
|
+
omit,
|
|
46
|
+
pick,
|
|
47
|
+
renderPlasmicSlot,
|
|
48
|
+
set as $stateSet,
|
|
49
|
+
useCurrentUser,
|
|
50
|
+
useDollarState,
|
|
51
|
+
usePlasmicTranslator,
|
|
52
|
+
useTrigger,
|
|
53
|
+
wrapWithClassName
|
|
54
|
+
} from "@plasmicapp/react-web";
|
|
55
|
+
import {
|
|
56
|
+
DataCtxReader as DataCtxReader__,
|
|
57
|
+
useDataEnv,
|
|
58
|
+
useGlobalActions
|
|
59
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
60
|
+
|
|
61
|
+
import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
|
|
62
|
+
import { Fetcher } from "@plasmicapp/react-web/lib/data-sources";
|
|
63
|
+
|
|
64
|
+
import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
|
|
65
|
+
|
|
66
|
+
import globalcss from "@plasmicapp/react-web/lib/plasmic.css?url";
|
|
67
|
+
import defaultcss from "../plasmic__default_style.css?url"; // plasmic-import: global/defaultcss
|
|
68
|
+
|
|
69
|
+
import projectcss from "./plasmic.css?url"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
70
|
+
import sty from "./PlasmicHomepage.css?url"; // plasmic-import: 6uuAAE1jiCew/css
|
|
71
|
+
|
|
72
|
+
createPlasmicElementProxy;
|
|
73
|
+
|
|
74
|
+
export type PlasmicHomepage__VariantMembers = {};
|
|
75
|
+
export type PlasmicHomepage__VariantsArgs = {};
|
|
76
|
+
type VariantPropType = keyof PlasmicHomepage__VariantsArgs;
|
|
77
|
+
export const PlasmicHomepage__VariantProps = new Array<VariantPropType>();
|
|
78
|
+
|
|
79
|
+
export type PlasmicHomepage__ArgsType = {};
|
|
80
|
+
type ArgPropType = keyof PlasmicHomepage__ArgsType;
|
|
81
|
+
export const PlasmicHomepage__ArgProps = new Array<ArgPropType>();
|
|
82
|
+
|
|
83
|
+
export type PlasmicHomepage__OverridesType = {
|
|
84
|
+
root?: Flex__<"div">;
|
|
85
|
+
section?: Flex__<"section">;
|
|
86
|
+
h1?: Flex__<"h1">;
|
|
87
|
+
text?: Flex__<"div">;
|
|
88
|
+
randomDynamicPageButton?: Flex__<typeof RandomDynamicPageButton>;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export interface DefaultHomepageProps {}
|
|
92
|
+
|
|
93
|
+
const $$ = {};
|
|
94
|
+
|
|
95
|
+
function useTanStackRouter() {
|
|
96
|
+
try {
|
|
97
|
+
return useRouter();
|
|
98
|
+
} catch {}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function PlasmicHomepage__RenderFunc(props: {
|
|
103
|
+
variants: PlasmicHomepage__VariantsArgs;
|
|
104
|
+
args: PlasmicHomepage__ArgsType;
|
|
105
|
+
overrides: PlasmicHomepage__OverridesType;
|
|
106
|
+
forNode?: string;
|
|
107
|
+
}) {
|
|
108
|
+
const { variants, overrides, forNode } = props;
|
|
109
|
+
|
|
110
|
+
const args = React.useMemo(
|
|
111
|
+
() =>
|
|
112
|
+
Object.assign(
|
|
113
|
+
{},
|
|
114
|
+
Object.fromEntries(
|
|
115
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
116
|
+
)
|
|
117
|
+
),
|
|
118
|
+
[props.args]
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const $props = {
|
|
122
|
+
...args,
|
|
123
|
+
...variants
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const __tanstackRouter = useTanStackRouter();
|
|
127
|
+
const $ctx = useDataEnv?.() || {};
|
|
128
|
+
const refsRef = React.useRef({});
|
|
129
|
+
const $refs = refsRef.current;
|
|
130
|
+
|
|
131
|
+
const globalVariants = ensureGlobalVariants({
|
|
132
|
+
screen: useScreenVariantsscBjPxgdxdzbv()
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<React.Fragment>
|
|
137
|
+
<style>{`
|
|
138
|
+
body {
|
|
139
|
+
margin: 0;
|
|
140
|
+
}
|
|
141
|
+
`}</style>
|
|
142
|
+
|
|
143
|
+
<div className={"plasmic_page_wrapper"}>
|
|
144
|
+
<div
|
|
145
|
+
data-plasmic-name={"root"}
|
|
146
|
+
data-plasmic-override={overrides.root}
|
|
147
|
+
data-plasmic-root={true}
|
|
148
|
+
data-plasmic-for-node={forNode}
|
|
149
|
+
className={classNames(
|
|
150
|
+
"plasmic_default__all",
|
|
151
|
+
"plasmic_default__div",
|
|
152
|
+
"root_reset_47tFXWjN2C4NyHFGGpaYQ3",
|
|
153
|
+
"plasmic_default_styles",
|
|
154
|
+
"plasmic_mixins",
|
|
155
|
+
"plasmic_tokens",
|
|
156
|
+
"Homepage__root__qtZIr"
|
|
157
|
+
)}
|
|
158
|
+
>
|
|
159
|
+
<Stack__
|
|
160
|
+
as={"section"}
|
|
161
|
+
data-plasmic-name={"section"}
|
|
162
|
+
data-plasmic-override={overrides.section}
|
|
163
|
+
hasGap={true}
|
|
164
|
+
className={classNames(
|
|
165
|
+
"plasmic_default__all",
|
|
166
|
+
"plasmic_default__section",
|
|
167
|
+
"Homepage__section__pXQ"
|
|
168
|
+
)}
|
|
169
|
+
>
|
|
170
|
+
<h1
|
|
171
|
+
data-plasmic-name={"h1"}
|
|
172
|
+
data-plasmic-override={overrides.h1}
|
|
173
|
+
className={classNames(
|
|
174
|
+
"plasmic_default__all",
|
|
175
|
+
"plasmic_default__h1",
|
|
176
|
+
"__wab_text",
|
|
177
|
+
"Homepage__h1__equfk"
|
|
178
|
+
)}
|
|
179
|
+
>
|
|
180
|
+
{"create-plasmic-app"}
|
|
181
|
+
</h1>
|
|
182
|
+
<div
|
|
183
|
+
data-plasmic-name={"text"}
|
|
184
|
+
data-plasmic-override={overrides.text}
|
|
185
|
+
className={classNames(
|
|
186
|
+
"plasmic_default__all",
|
|
187
|
+
"plasmic_default__div",
|
|
188
|
+
"__wab_text",
|
|
189
|
+
"Homepage__text__aC4Gm"
|
|
190
|
+
)}
|
|
191
|
+
>
|
|
192
|
+
{hasVariant(globalVariants, "screen", "desktopOnly") ? (
|
|
193
|
+
<React.Fragment>
|
|
194
|
+
<React.Fragment>
|
|
195
|
+
{
|
|
196
|
+
"This project is used by run-cpa.ts in the create-plasmic-app repo.\n\nrun-cpa.ts runs create-plasmic-app for many combinations of args (e.g. nextjs + appDir + loader + typescript) to check for changes in generated files. Any changes to this project will result in lots of changes to the generated files. "
|
|
197
|
+
}
|
|
198
|
+
</React.Fragment>
|
|
199
|
+
<span
|
|
200
|
+
className={"plasmic_default__all plasmic_default__span"}
|
|
201
|
+
style={{ fontWeight: 700 }}
|
|
202
|
+
>
|
|
203
|
+
{"Therefore, please avoid changing this project."}
|
|
204
|
+
</span>
|
|
205
|
+
</React.Fragment>
|
|
206
|
+
) : (
|
|
207
|
+
<React.Fragment>
|
|
208
|
+
<React.Fragment>
|
|
209
|
+
{
|
|
210
|
+
"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 "
|
|
211
|
+
}
|
|
212
|
+
</React.Fragment>
|
|
213
|
+
<span
|
|
214
|
+
className={"plasmic_default__all plasmic_default__span"}
|
|
215
|
+
style={{ fontWeight: 700 }}
|
|
216
|
+
>
|
|
217
|
+
{"Code"}
|
|
218
|
+
</span>
|
|
219
|
+
<React.Fragment>
|
|
220
|
+
{
|
|
221
|
+
" button in the top right and follow the quickstart instructions.\n\nJoin our Slack community (icon in bottom left) for help any time."
|
|
222
|
+
}
|
|
223
|
+
</React.Fragment>
|
|
224
|
+
</React.Fragment>
|
|
225
|
+
)}
|
|
226
|
+
</div>
|
|
227
|
+
<RandomDynamicPageButton
|
|
228
|
+
data-plasmic-name={"randomDynamicPageButton"}
|
|
229
|
+
data-plasmic-override={overrides.randomDynamicPageButton}
|
|
230
|
+
className={classNames(
|
|
231
|
+
"__wab_instance",
|
|
232
|
+
"Homepage__randomDynamicPageButton__y0MM"
|
|
233
|
+
)}
|
|
234
|
+
/>
|
|
235
|
+
</Stack__>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</React.Fragment>
|
|
239
|
+
) as React.ReactElement | null;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const PlasmicDescendants = {
|
|
243
|
+
root: ["root", "section", "h1", "text", "randomDynamicPageButton"],
|
|
244
|
+
section: ["section", "h1", "text", "randomDynamicPageButton"],
|
|
245
|
+
h1: ["h1"],
|
|
246
|
+
text: ["text"],
|
|
247
|
+
randomDynamicPageButton: ["randomDynamicPageButton"]
|
|
248
|
+
} as const;
|
|
249
|
+
type NodeNameType = keyof typeof PlasmicDescendants;
|
|
250
|
+
type DescendantsType<T extends NodeNameType> =
|
|
251
|
+
(typeof PlasmicDescendants)[T][number];
|
|
252
|
+
type NodeDefaultElementType = {
|
|
253
|
+
root: "div";
|
|
254
|
+
section: "section";
|
|
255
|
+
h1: "h1";
|
|
256
|
+
text: "div";
|
|
257
|
+
randomDynamicPageButton: typeof RandomDynamicPageButton;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
type ReservedPropsType = "variants" | "args" | "overrides";
|
|
261
|
+
type NodeOverridesType<T extends NodeNameType> = Pick<
|
|
262
|
+
PlasmicHomepage__OverridesType,
|
|
263
|
+
DescendantsType<T>
|
|
264
|
+
>;
|
|
265
|
+
type NodeComponentProps<T extends NodeNameType> =
|
|
266
|
+
// Explicitly specify variants, args, and overrides as objects
|
|
267
|
+
{
|
|
268
|
+
variants?: PlasmicHomepage__VariantsArgs;
|
|
269
|
+
args?: PlasmicHomepage__ArgsType;
|
|
270
|
+
overrides?: NodeOverridesType<T>;
|
|
271
|
+
} & Omit<PlasmicHomepage__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
272
|
+
// Specify args directly as props
|
|
273
|
+
Omit<PlasmicHomepage__ArgsType, ReservedPropsType> &
|
|
274
|
+
// Specify overrides for each element directly as props
|
|
275
|
+
Omit<
|
|
276
|
+
NodeOverridesType<T>,
|
|
277
|
+
ReservedPropsType | VariantPropType | ArgPropType
|
|
278
|
+
> &
|
|
279
|
+
// Specify props for the root element
|
|
280
|
+
Omit<
|
|
281
|
+
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
282
|
+
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
283
|
+
>;
|
|
284
|
+
|
|
285
|
+
function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
286
|
+
type PropsType = NodeComponentProps<NodeName> & { key?: React.Key };
|
|
287
|
+
const func = function <T extends PropsType>(
|
|
288
|
+
props: T & StrictProps<T, PropsType>
|
|
289
|
+
) {
|
|
290
|
+
const { variants, args, overrides } = React.useMemo(
|
|
291
|
+
() =>
|
|
292
|
+
deriveRenderOpts(props, {
|
|
293
|
+
name: nodeName,
|
|
294
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
295
|
+
internalArgPropNames: PlasmicHomepage__ArgProps,
|
|
296
|
+
internalVariantPropNames: PlasmicHomepage__VariantProps
|
|
297
|
+
}),
|
|
298
|
+
[props, nodeName]
|
|
299
|
+
);
|
|
300
|
+
return PlasmicHomepage__RenderFunc({
|
|
301
|
+
variants,
|
|
302
|
+
args,
|
|
303
|
+
overrides,
|
|
304
|
+
forNode: nodeName
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
if (nodeName === "root") {
|
|
308
|
+
func.displayName = "PlasmicHomepage";
|
|
309
|
+
} else {
|
|
310
|
+
func.displayName = `PlasmicHomepage.${nodeName}`;
|
|
311
|
+
}
|
|
312
|
+
return func;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export const PlasmicHomepage = Object.assign(
|
|
316
|
+
// Top-level PlasmicHomepage renders the root element
|
|
317
|
+
makeNodeComponent("root"),
|
|
318
|
+
{
|
|
319
|
+
// Helper components rendering sub-elements
|
|
320
|
+
section: makeNodeComponent("section"),
|
|
321
|
+
h1: makeNodeComponent("h1"),
|
|
322
|
+
text: makeNodeComponent("text"),
|
|
323
|
+
randomDynamicPageButton: makeNodeComponent("randomDynamicPageButton"),
|
|
324
|
+
|
|
325
|
+
// Metadata about props expected for PlasmicHomepage
|
|
326
|
+
internalVariantProps: PlasmicHomepage__VariantProps,
|
|
327
|
+
internalArgProps: PlasmicHomepage__ArgProps,
|
|
328
|
+
|
|
329
|
+
// Page metadata
|
|
330
|
+
pageMetadata: {
|
|
331
|
+
title: "",
|
|
332
|
+
description: "",
|
|
333
|
+
ogImageSrc: "",
|
|
334
|
+
canonical: ""
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
|
|
339
|
+
export const PlasmicHomepage__HeadOptions = {
|
|
340
|
+
meta: [{ name: "twitter:card", content: "summary" }],
|
|
341
|
+
|
|
342
|
+
links: [
|
|
343
|
+
{ rel: "stylesheet", href: globalcss },
|
|
344
|
+
{ rel: "stylesheet", href: defaultcss },
|
|
345
|
+
{ rel: "stylesheet", href: projectcss },
|
|
346
|
+
{ rel: "stylesheet", href: sty }
|
|
347
|
+
]
|
|
348
|
+
} as Record<"meta" | "links", Array<Record<string, string>>>;
|
|
349
|
+
|
|
350
|
+
export default PlasmicHomepage;
|
|
351
|
+
/* prettier-ignore-end */
|