create-plasmic-app 0.0.133 → 0.0.135
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/nextjs-app-codegen-js/app/dynamic/[slug]/page-client.jsx +7 -0
- package/cpa-out/nextjs-app-codegen-js/app/dynamic/[slug]/page.jsx +45 -0
- package/cpa-out/nextjs-app-codegen-js/app/layout.js +28 -0
- package/cpa-out/nextjs-app-codegen-js/app/layout.jsx +17 -0
- package/cpa-out/nextjs-app-codegen-js/app/page-client.jsx +7 -0
- package/cpa-out/nextjs-app-codegen-js/app/page.jsx +45 -0
- package/cpa-out/nextjs-app-codegen-js/app/plasmic-host/page.jsx +15 -0
- package/cpa-out/nextjs-app-codegen-js/components/Button.jsx +11 -0
- package/cpa-out/nextjs-app-codegen-js/components/RandomDynamicPageButton.jsx +24 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +595 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +216 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.jsx +56 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +26 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +251 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepageServer.jsx +56 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +159 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicStyleTokensProvider.jsx +15 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.jsx +39 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
- package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/plasmic.jsx +11 -0
- package/cpa-out/nextjs-app-codegen-js/package.json +22 -0
- package/cpa-out/nextjs-app-codegen-js/plasmic.json +148 -0
- package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page-client.tsx +11 -0
- package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page.tsx +57 -0
- package/cpa-out/nextjs-app-codegen-ts/app/layout.tsx +19 -0
- package/cpa-out/nextjs-app-codegen-ts/app/page-client.tsx +11 -0
- package/cpa-out/nextjs-app-codegen-ts/app/page.tsx +54 -0
- package/cpa-out/nextjs-app-codegen-ts/app/plasmic-host/page.tsx +15 -0
- package/cpa-out/nextjs-app-codegen-ts/components/Button.tsx +35 -0
- package/cpa-out/nextjs-app-codegen-ts/components/RandomDynamicPageButton.tsx +44 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +776 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +329 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.tsx +77 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +30 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +366 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepageServer.tsx +75 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +274 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicStyleTokensProvider.tsx +19 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx +44 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/plasmic.tsx +14 -0
- package/cpa-out/nextjs-app-codegen-ts/package.json +26 -0
- package/cpa-out/nextjs-app-codegen-ts/plasmic.json +148 -0
- package/cpa-out/nextjs-app-codegen-ts/tsconfig.json +26 -0
- package/cpa-out/nextjs-app-loader-js/app/[[...catchall]]/page.jsx +80 -0
- package/cpa-out/nextjs-app-loader-js/app/layout.js +28 -0
- package/cpa-out/nextjs-app-loader-js/app/plasmic-host/page.jsx +6 -0
- package/cpa-out/nextjs-app-loader-js/plasmic-init-client.jsx +65 -0
- package/cpa-out/nextjs-app-loader-js/plasmic-init.js +5 -10
- package/cpa-out/nextjs-app-loader-ts/app/[[...catchall]]/page.tsx +85 -0
- package/cpa-out/nextjs-app-loader-ts/app/layout.tsx +33 -0
- package/cpa-out/nextjs-app-loader-ts/app/plasmic-host/page.tsx +6 -0
- package/cpa-out/nextjs-app-loader-ts/plasmic-init-client.tsx +65 -0
- package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +5 -10
- package/cpa-out/nextjs-app-loader-ts/tsconfig.json +6 -1
- package/dist/index.js +31 -30
- package/dist/nextjs/nextjs.js +37 -11
- package/dist/nextjs/templates/app-codegen/layout.d.ts +2 -0
- package/dist/nextjs/templates/app-codegen/layout.js +27 -0
- package/dist/nextjs/templates/app-loader/catchall-page.js +63 -38
- package/dist/nextjs/templates/app-loader/plasmic-init-client.js +1 -1
- package/dist/nextjs/templates/app-loader/plasmic-init.js +4 -0
- package/package.json +2 -2
- package/run-cpa.ts +8 -9
- package/src/index.ts +31 -36
- package/src/nextjs/nextjs.ts +67 -28
- package/src/nextjs/templates/app-codegen/layout.ts +28 -0
- package/src/nextjs/templates/app-loader/catchall-page.ts +80 -43
- package/src/nextjs/templates/app-loader/plasmic-init-client.ts +1 -1
- package/src/nextjs/templates/app-loader/plasmic-init.ts +4 -0
- package/cpa-out/nextjs-app-loader-js/pages/[[...catchall]].jsx +0 -68
- package/cpa-out/nextjs-app-loader-js/pages/api/hello.js +0 -5
- package/cpa-out/nextjs-app-loader-js/pages/plasmic-host.jsx +0 -7
- package/cpa-out/nextjs-app-loader-ts/pages/[[...catchall]].tsx +0 -72
- package/cpa-out/nextjs-app-loader-ts/pages/api/hello.ts +0 -13
- package/cpa-out/nextjs-app-loader-ts/pages/plasmic-host.tsx +0 -7
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* prettier-ignore-start */
|
|
5
|
+
/** @jsxRuntime classic */
|
|
6
|
+
/** @jsx createPlasmicElementProxy */
|
|
7
|
+
/** @jsxFrag React.Fragment */
|
|
8
|
+
// This class is auto-generated by Plasmic; please do not edit!
|
|
9
|
+
// Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
|
|
10
|
+
// Component: Q23H1_1M_P
|
|
11
|
+
"use client";
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { useRouter } from "next/navigation";
|
|
14
|
+
import {
|
|
15
|
+
classNames,
|
|
16
|
+
createPlasmicElementProxy,
|
|
17
|
+
deriveRenderOpts
|
|
18
|
+
} from "@plasmicapp/react-web";
|
|
19
|
+
import { useDataEnv } from "@plasmicapp/host";
|
|
20
|
+
import Button from "../../Button"; // plasmic-import: TQcvW_pSKi3/component
|
|
21
|
+
import { _useStyleTokens } from "./PlasmicStyleTokensProvider"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/styleTokensProvider
|
|
22
|
+
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
23
|
+
import sty from "./PlasmicRandomDynamicPageButton.module.css"; // plasmic-import: Q23H1_1M_P/css
|
|
24
|
+
|
|
25
|
+
createPlasmicElementProxy;
|
|
26
|
+
|
|
27
|
+
export const PlasmicRandomDynamicPageButton__VariantProps = new Array();
|
|
28
|
+
|
|
29
|
+
export const PlasmicRandomDynamicPageButton__ArgProps = new Array();
|
|
30
|
+
|
|
31
|
+
const $$ = {};
|
|
32
|
+
|
|
33
|
+
function useNextRouter() {
|
|
34
|
+
try {
|
|
35
|
+
return useRouter();
|
|
36
|
+
} catch {}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function PlasmicRandomDynamicPageButton__RenderFunc(props) {
|
|
41
|
+
const { variants, overrides, forNode } = props;
|
|
42
|
+
const args = React.useMemo(
|
|
43
|
+
() =>
|
|
44
|
+
Object.assign(
|
|
45
|
+
{},
|
|
46
|
+
Object.fromEntries(
|
|
47
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
48
|
+
)
|
|
49
|
+
),
|
|
50
|
+
[props.args]
|
|
51
|
+
);
|
|
52
|
+
const $props = {
|
|
53
|
+
...args,
|
|
54
|
+
...variants
|
|
55
|
+
};
|
|
56
|
+
const __nextRouter = useNextRouter();
|
|
57
|
+
const $ctx = useDataEnv?.() || {};
|
|
58
|
+
const refsRef = React.useRef({});
|
|
59
|
+
const $refs = refsRef.current;
|
|
60
|
+
const styleTokensClassNames = _useStyleTokens();
|
|
61
|
+
return (
|
|
62
|
+
<Button
|
|
63
|
+
data-plasmic-name={"root"}
|
|
64
|
+
data-plasmic-override={overrides.root}
|
|
65
|
+
data-plasmic-root={true}
|
|
66
|
+
data-plasmic-for-node={forNode}
|
|
67
|
+
className={classNames("__wab_instance", sty.root)}
|
|
68
|
+
onClick={async event => {
|
|
69
|
+
const $steps = {};
|
|
70
|
+
$steps["goToDynamicPage"] = true
|
|
71
|
+
? (() => {
|
|
72
|
+
const actionArgs = {
|
|
73
|
+
destination: `/dynamic/${(() => {
|
|
74
|
+
try {
|
|
75
|
+
return Math.random().toString(36).slice(2);
|
|
76
|
+
} catch (e) {
|
|
77
|
+
if (
|
|
78
|
+
e instanceof TypeError ||
|
|
79
|
+
e?.plasmicType === "PlasmicUndefinedDataError"
|
|
80
|
+
) {
|
|
81
|
+
return "value";
|
|
82
|
+
}
|
|
83
|
+
throw e;
|
|
84
|
+
}
|
|
85
|
+
})()}`
|
|
86
|
+
};
|
|
87
|
+
return (({ destination }) => {
|
|
88
|
+
if (
|
|
89
|
+
typeof destination === "string" &&
|
|
90
|
+
destination.startsWith("#")
|
|
91
|
+
) {
|
|
92
|
+
document
|
|
93
|
+
.getElementById(destination.substr(1))
|
|
94
|
+
.scrollIntoView({ behavior: "smooth" });
|
|
95
|
+
} else {
|
|
96
|
+
__nextRouter?.push(destination);
|
|
97
|
+
}
|
|
98
|
+
})?.apply(null, [actionArgs]);
|
|
99
|
+
})()
|
|
100
|
+
: undefined;
|
|
101
|
+
if (
|
|
102
|
+
$steps["goToDynamicPage"] != null &&
|
|
103
|
+
typeof $steps["goToDynamicPage"] === "object" &&
|
|
104
|
+
typeof $steps["goToDynamicPage"].then === "function"
|
|
105
|
+
) {
|
|
106
|
+
$steps["goToDynamicPage"] = await $steps["goToDynamicPage"];
|
|
107
|
+
}
|
|
108
|
+
}}
|
|
109
|
+
submitsForm={true}
|
|
110
|
+
>
|
|
111
|
+
{"Random Dynamic Page"}
|
|
112
|
+
</Button>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const PlasmicDescendants = {
|
|
117
|
+
root: ["root"]
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
function makeNodeComponent(nodeName) {
|
|
121
|
+
const func = function (props) {
|
|
122
|
+
const { variants, args, overrides } = React.useMemo(
|
|
123
|
+
() =>
|
|
124
|
+
deriveRenderOpts(props, {
|
|
125
|
+
name: nodeName,
|
|
126
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
127
|
+
internalArgPropNames: PlasmicRandomDynamicPageButton__ArgProps,
|
|
128
|
+
internalVariantPropNames: PlasmicRandomDynamicPageButton__VariantProps
|
|
129
|
+
}),
|
|
130
|
+
[props, nodeName]
|
|
131
|
+
);
|
|
132
|
+
return PlasmicRandomDynamicPageButton__RenderFunc({
|
|
133
|
+
variants,
|
|
134
|
+
args,
|
|
135
|
+
overrides,
|
|
136
|
+
forNode: nodeName
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
if (nodeName === "root") {
|
|
140
|
+
func.displayName = "PlasmicRandomDynamicPageButton";
|
|
141
|
+
} else {
|
|
142
|
+
func.displayName = `PlasmicRandomDynamicPageButton.${nodeName}`;
|
|
143
|
+
}
|
|
144
|
+
return func;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const PlasmicRandomDynamicPageButton = Object.assign(
|
|
148
|
+
// Top-level PlasmicRandomDynamicPageButton renders the root element
|
|
149
|
+
makeNodeComponent("root"),
|
|
150
|
+
{
|
|
151
|
+
// Helper components rendering sub-elements
|
|
152
|
+
// Metadata about props expected for PlasmicRandomDynamicPageButton
|
|
153
|
+
internalVariantProps: PlasmicRandomDynamicPageButton__VariantProps,
|
|
154
|
+
internalArgProps: PlasmicRandomDynamicPageButton__ArgProps
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
export default PlasmicRandomDynamicPageButton;
|
|
159
|
+
/* prettier-ignore-end */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// This code is auto-generated by Plasmic; please do not edit!
|
|
5
|
+
// Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
|
|
6
|
+
import { createUseStyleTokens } from "@plasmicapp/react-web";
|
|
7
|
+
import { _useGlobalVariants } from "./plasmic"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectModule
|
|
8
|
+
import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
9
|
+
|
|
10
|
+
const data = {
|
|
11
|
+
base: `${projectcss.plasmic_tokens}`,
|
|
12
|
+
varianted: []
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const _useStyleTokens = createUseStyleTokens(data, _useGlobalVariants);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* prettier-ignore-start */
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { classNames } from "@plasmicapp/react-web";
|
|
7
|
+
|
|
8
|
+
export function CheckSvgIcon(props) {
|
|
9
|
+
const { className, style, title, ...restProps } = props;
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
xmlns={"http://www.w3.org/2000/svg"}
|
|
13
|
+
fill={"none"}
|
|
14
|
+
viewBox={"0 0 24 24"}
|
|
15
|
+
height={"1em"}
|
|
16
|
+
width={"1em"}
|
|
17
|
+
style={{
|
|
18
|
+
fill: "currentcolor",
|
|
19
|
+
...(style || {})
|
|
20
|
+
}}
|
|
21
|
+
className={classNames("plasmic-default__svg", className)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
{title && <title>{title}</title>}
|
|
25
|
+
|
|
26
|
+
<path
|
|
27
|
+
fillRule={"evenodd"}
|
|
28
|
+
clipRule={"evenodd"}
|
|
29
|
+
d={
|
|
30
|
+
"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"
|
|
31
|
+
}
|
|
32
|
+
fill={"currentColor"}
|
|
33
|
+
></path>
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default CheckSvgIcon;
|
|
39
|
+
/* prettier-ignore-end */
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/* prettier-ignore-start */
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { classNames } from "@plasmicapp/react-web";
|
|
7
|
+
|
|
8
|
+
export function IconIcon(props) {
|
|
9
|
+
const { className, style, title, ...restProps } = props;
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
xmlns={"http://www.w3.org/2000/svg"}
|
|
13
|
+
stroke={"currentColor"}
|
|
14
|
+
fill={"currentColor"}
|
|
15
|
+
strokeWidth={"0"}
|
|
16
|
+
viewBox={"0 0 16 16"}
|
|
17
|
+
height={"1em"}
|
|
18
|
+
width={"1em"}
|
|
19
|
+
className={classNames("plasmic-default__svg", className)}
|
|
20
|
+
style={style}
|
|
21
|
+
{...restProps}
|
|
22
|
+
>
|
|
23
|
+
{title && <title>{title}</title>}
|
|
24
|
+
|
|
25
|
+
<path
|
|
26
|
+
fillRule={"evenodd"}
|
|
27
|
+
d={
|
|
28
|
+
"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"
|
|
29
|
+
}
|
|
30
|
+
stroke={"none"}
|
|
31
|
+
></path>
|
|
32
|
+
</svg>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default IconIcon;
|
|
37
|
+
/* prettier-ignore-end */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// This code is auto-generated by Plasmic; please do not edit!
|
|
5
|
+
// Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
|
|
6
|
+
import { createUseGlobalVariants } from "@plasmicapp/react-web";
|
|
7
|
+
import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
|
|
8
|
+
|
|
9
|
+
export const _useGlobalVariants = createUseGlobalVariants({
|
|
10
|
+
screen: useScreenVariantsscBjPxgdxdzbv
|
|
11
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nextjs-app-codegen-js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@plasmicapp/cli": "^0.1.359",
|
|
13
|
+
"@plasmicapp/react-web": "^0.2.422",
|
|
14
|
+
"next": "14.2.35",
|
|
15
|
+
"react": "^18",
|
|
16
|
+
"react-dom": "^18"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"eslint": "^8",
|
|
20
|
+
"eslint-config-next": "14.2.35"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platform": "nextjs",
|
|
3
|
+
"code": {
|
|
4
|
+
"lang": "js",
|
|
5
|
+
"scheme": "blackbox",
|
|
6
|
+
"reactRuntime": "classic"
|
|
7
|
+
},
|
|
8
|
+
"style": {
|
|
9
|
+
"scheme": "css-modules",
|
|
10
|
+
"defaultStyleCssFilePath": "plasmic/plasmic__default_style.module.css"
|
|
11
|
+
},
|
|
12
|
+
"images": {
|
|
13
|
+
"scheme": "public-files",
|
|
14
|
+
"publicDir": "../public",
|
|
15
|
+
"publicUrlPrefix": "/"
|
|
16
|
+
},
|
|
17
|
+
"tokens": {
|
|
18
|
+
"scheme": "theo",
|
|
19
|
+
"tokensFilePath": "plasmic-tokens.theo.json"
|
|
20
|
+
},
|
|
21
|
+
"srcDir": "components",
|
|
22
|
+
"defaultPlasmicDir": "./plasmic",
|
|
23
|
+
"projects": [
|
|
24
|
+
{
|
|
25
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
26
|
+
"projectApiToken": "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
27
|
+
"projectName": "create-plasmic-app",
|
|
28
|
+
"version": "latest",
|
|
29
|
+
"cssFilePath": "plasmic/create_plasmic_app/plasmic.module.css",
|
|
30
|
+
"components": [
|
|
31
|
+
{
|
|
32
|
+
"id": "6uuAAE1jiCew",
|
|
33
|
+
"name": "Homepage",
|
|
34
|
+
"type": "managed",
|
|
35
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
36
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.jsx",
|
|
37
|
+
"importSpec": {
|
|
38
|
+
"modulePath": "../app/page.jsx"
|
|
39
|
+
},
|
|
40
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.module.css",
|
|
41
|
+
"scheme": "blackbox",
|
|
42
|
+
"componentType": "page",
|
|
43
|
+
"path": "/",
|
|
44
|
+
"rsc": {
|
|
45
|
+
"serverModulePath": "plasmic/create_plasmic_app/PlasmicHomepageServer.jsx",
|
|
46
|
+
"clientModulePath": "../app/page-client.jsx"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "AO44A-w7hh",
|
|
51
|
+
"name": "DynamicPage",
|
|
52
|
+
"type": "managed",
|
|
53
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
54
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.jsx",
|
|
55
|
+
"importSpec": {
|
|
56
|
+
"modulePath": "../app/dynamic/[slug]/page.jsx"
|
|
57
|
+
},
|
|
58
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.module.css",
|
|
59
|
+
"scheme": "blackbox",
|
|
60
|
+
"componentType": "page",
|
|
61
|
+
"path": "/dynamic/[slug]",
|
|
62
|
+
"rsc": {
|
|
63
|
+
"serverModulePath": "plasmic/create_plasmic_app/PlasmicDynamicPageServer.jsx",
|
|
64
|
+
"clientModulePath": "../app/dynamic/[slug]/page-client.jsx"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "TQcvW_pSKi3",
|
|
69
|
+
"name": "Button",
|
|
70
|
+
"type": "managed",
|
|
71
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
72
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicButton.jsx",
|
|
73
|
+
"importSpec": {
|
|
74
|
+
"modulePath": "Button.jsx"
|
|
75
|
+
},
|
|
76
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicButton.module.css",
|
|
77
|
+
"scheme": "blackbox",
|
|
78
|
+
"componentType": "component",
|
|
79
|
+
"plumeType": "button"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "Q23H1_1M_P",
|
|
83
|
+
"name": "RandomDynamicPageButton",
|
|
84
|
+
"type": "managed",
|
|
85
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
86
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx",
|
|
87
|
+
"importSpec": {
|
|
88
|
+
"modulePath": "RandomDynamicPageButton.jsx"
|
|
89
|
+
},
|
|
90
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css",
|
|
91
|
+
"scheme": "blackbox",
|
|
92
|
+
"componentType": "component"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"icons": [
|
|
96
|
+
{
|
|
97
|
+
"id": "gj-_D7n31Ho",
|
|
98
|
+
"name": "CheckSvgIcon",
|
|
99
|
+
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.jsx"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "6PNxx3YMyDQ",
|
|
103
|
+
"name": "IconIcon",
|
|
104
|
+
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"images": [],
|
|
108
|
+
"indirect": false,
|
|
109
|
+
"globalContextsFilePath": "",
|
|
110
|
+
"splitsProviderFilePath": "",
|
|
111
|
+
"styleTokensProviderFilePath": "plasmic/create_plasmic_app/PlasmicStyleTokensProvider.jsx",
|
|
112
|
+
"dataTokensFilePath": "",
|
|
113
|
+
"projectModuleFilePath": "plasmic/create_plasmic_app/plasmic.jsx",
|
|
114
|
+
"codeComponents": [
|
|
115
|
+
{
|
|
116
|
+
"id": "P6aGdYWZ2R",
|
|
117
|
+
"name": "PlasmicHead",
|
|
118
|
+
"displayName": "hostless-plasmic-head",
|
|
119
|
+
"componentImportPath": "@plasmicapp/react-web"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "8G2A-uTjGa",
|
|
123
|
+
"name": "Fetcher",
|
|
124
|
+
"displayName": "plasmic-data-source-fetcher",
|
|
125
|
+
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"customFunctions": []
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"globalVariants": {
|
|
132
|
+
"variantGroups": [
|
|
133
|
+
{
|
|
134
|
+
"id": "SCBjPXGDXDZBV",
|
|
135
|
+
"name": "Screen",
|
|
136
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
137
|
+
"contextFilePath": "plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"wrapPagesWithGlobalContexts": true,
|
|
142
|
+
"preserveJsImportExtensions": false,
|
|
143
|
+
"nextjsConfig": {
|
|
144
|
+
"pagesDir": "../app"
|
|
145
|
+
},
|
|
146
|
+
"cliVersion": "0.1.359",
|
|
147
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.359/dist/plasmic.schema.json"
|
|
148
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
PlasmicDynamicPage,
|
|
6
|
+
DefaultDynamicPageProps
|
|
7
|
+
} from "../../../components/plasmic/create_plasmic_app/PlasmicDynamicPage"; // plasmic-import: AO44A-w7hh/render
|
|
8
|
+
|
|
9
|
+
export function ClientDynamicPage(props: DefaultDynamicPageProps) {
|
|
10
|
+
return <PlasmicDynamicPage {...props} />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// This is a skeleton starter React page generated by Plasmic.
|
|
2
|
+
// This file is owned by you, feel free to edit as you see fit.
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/host";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
PlasmicDynamicPageServer,
|
|
8
|
+
makeAppRouterPageCtx,
|
|
9
|
+
generateDynamicMetadata,
|
|
10
|
+
DynamicPageServerSkeletonProps
|
|
11
|
+
} from "../../../components/plasmic/create_plasmic_app/PlasmicDynamicPageServer";
|
|
12
|
+
|
|
13
|
+
import type { Metadata, ResolvingMetadata } from "next";
|
|
14
|
+
|
|
15
|
+
export async function generateMetadata(
|
|
16
|
+
{ params, searchParams }: DynamicPageServerSkeletonProps,
|
|
17
|
+
parent: ResolvingMetadata
|
|
18
|
+
): Promise<Metadata> {
|
|
19
|
+
const ctx = await makeAppRouterPageCtx({ params, searchParams });
|
|
20
|
+
const metadata = generateDynamicMetadata({}, ctx);
|
|
21
|
+
|
|
22
|
+
return { ...(await parent), ...metadata } as unknown as Metadata;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function DynamicPage({
|
|
26
|
+
params,
|
|
27
|
+
searchParams
|
|
28
|
+
}: DynamicPageServerSkeletonProps) {
|
|
29
|
+
// Use PlasmicDynamicPage to render this component as it was
|
|
30
|
+
// designed in Plasmic, by activating the appropriate variants,
|
|
31
|
+
// attaching the appropriate event handlers, etc. You
|
|
32
|
+
// can also install whatever React hooks you need here to manage state or
|
|
33
|
+
// fetch data.
|
|
34
|
+
//
|
|
35
|
+
// Props you can pass into PlasmicDynamicPage are:
|
|
36
|
+
// 1. Variants you want to activate,
|
|
37
|
+
// 2. Contents for slots you want to fill,
|
|
38
|
+
// 3. Overrides for any named node in the component to attach behavior and data,
|
|
39
|
+
// 4. Props to set on the root node.
|
|
40
|
+
//
|
|
41
|
+
// By default, PlasmicDynamicPage is wrapped by your project's global
|
|
42
|
+
// variant context providers. These wrappers may be moved to
|
|
43
|
+
// Next.js Custom App component
|
|
44
|
+
// (https://nextjs.org/docs/advanced-features/custom-app).
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<PageParamsProvider__
|
|
48
|
+
route="/dynamic/[slug]"
|
|
49
|
+
params={await params}
|
|
50
|
+
query={await searchParams}
|
|
51
|
+
>
|
|
52
|
+
<PlasmicDynamicPageServer />
|
|
53
|
+
</PageParamsProvider__>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default DynamicPage;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '@/app/globals.css'
|
|
2
|
+
import { PlasmicRootProvider } from "@plasmicapp/react-web";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
|
|
5
|
+
export default function RootLayout({
|
|
6
|
+
children,
|
|
7
|
+
}: Readonly<{
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}>) {
|
|
10
|
+
return (
|
|
11
|
+
<html lang="en">
|
|
12
|
+
<body>
|
|
13
|
+
<PlasmicRootProvider Link={Link}>
|
|
14
|
+
{children}
|
|
15
|
+
</PlasmicRootProvider>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
PlasmicHomepage,
|
|
6
|
+
DefaultHomepageProps
|
|
7
|
+
} from "../components/plasmic/create_plasmic_app/PlasmicHomepage"; // plasmic-import: 6uuAAE1jiCew/render
|
|
8
|
+
|
|
9
|
+
export function ClientHomepage(props: DefaultHomepageProps) {
|
|
10
|
+
return <PlasmicHomepage {...props} />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This is a skeleton starter React page generated by Plasmic.
|
|
2
|
+
// This file is owned by you, feel free to edit as you see fit.
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/host";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
PlasmicHomepageServer,
|
|
8
|
+
makeAppRouterPageCtx,
|
|
9
|
+
generateDynamicMetadata,
|
|
10
|
+
HomepageServerSkeletonProps
|
|
11
|
+
} from "../components/plasmic/create_plasmic_app/PlasmicHomepageServer";
|
|
12
|
+
|
|
13
|
+
import type { Metadata, ResolvingMetadata } from "next";
|
|
14
|
+
|
|
15
|
+
export async function generateMetadata(
|
|
16
|
+
{ params, searchParams }: HomepageServerSkeletonProps,
|
|
17
|
+
parent: ResolvingMetadata
|
|
18
|
+
): Promise<Metadata> {
|
|
19
|
+
const ctx = await makeAppRouterPageCtx({ params, searchParams });
|
|
20
|
+
const metadata = generateDynamicMetadata({}, ctx);
|
|
21
|
+
|
|
22
|
+
return { ...(await parent), ...metadata } as unknown as Metadata;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function Homepage({ params, searchParams }: HomepageServerSkeletonProps) {
|
|
26
|
+
// Use PlasmicHomepage to render this component as it was
|
|
27
|
+
// designed in Plasmic, by activating the appropriate variants,
|
|
28
|
+
// attaching the appropriate event handlers, etc. You
|
|
29
|
+
// can also install whatever React hooks you need here to manage state or
|
|
30
|
+
// fetch data.
|
|
31
|
+
//
|
|
32
|
+
// Props you can pass into PlasmicHomepage are:
|
|
33
|
+
// 1. Variants you want to activate,
|
|
34
|
+
// 2. Contents for slots you want to fill,
|
|
35
|
+
// 3. Overrides for any named node in the component to attach behavior and data,
|
|
36
|
+
// 4. Props to set on the root node.
|
|
37
|
+
//
|
|
38
|
+
// By default, PlasmicHomepage is wrapped by your project's global
|
|
39
|
+
// variant context providers. These wrappers may be moved to
|
|
40
|
+
// Next.js Custom App component
|
|
41
|
+
// (https://nextjs.org/docs/advanced-features/custom-app).
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<PageParamsProvider__
|
|
45
|
+
route="/"
|
|
46
|
+
params={await params}
|
|
47
|
+
query={await searchParams}
|
|
48
|
+
>
|
|
49
|
+
<PlasmicHomepageServer />
|
|
50
|
+
</PageParamsProvider__>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default Homepage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PlasmicCanvasHost, registerComponent } from '@plasmicapp/react-web/lib/host';
|
|
3
|
+
|
|
4
|
+
// You can register any code components that you want to use here; see
|
|
5
|
+
// https://docs.plasmic.app/learn/code-components-ref/
|
|
6
|
+
// And configure your Plasmic project to use the host url pointing at
|
|
7
|
+
// the /plasmic-host page of your nextjs app (for example,
|
|
8
|
+
// http://localhost:3000/plasmic-host). See
|
|
9
|
+
// https://docs.plasmic.app/learn/app-hosting/#set-a-plasmic-project-to-use-your-app-host
|
|
10
|
+
|
|
11
|
+
// registerComponent(...)
|
|
12
|
+
|
|
13
|
+
export default function PlasmicHost() {
|
|
14
|
+
return <PlasmicCanvasHost />;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
PlasmicButton,
|
|
4
|
+
DefaultButtonProps
|
|
5
|
+
} from "./plasmic/create_plasmic_app/PlasmicButton";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
ButtonRef,
|
|
9
|
+
HtmlAnchorOnlyProps,
|
|
10
|
+
HtmlButtonOnlyProps
|
|
11
|
+
} from "@plasmicapp/react-web";
|
|
12
|
+
|
|
13
|
+
export interface ButtonProps extends DefaultButtonProps {
|
|
14
|
+
// Feel free to add any additional props that this component should receive
|
|
15
|
+
}
|
|
16
|
+
function Button_(props: ButtonProps, ref: ButtonRef) {
|
|
17
|
+
const { plasmicProps } = PlasmicButton.useBehavior<ButtonProps>(props, ref);
|
|
18
|
+
return <PlasmicButton {...plasmicProps} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ButtonComponentType = {
|
|
22
|
+
(
|
|
23
|
+
props: Omit<ButtonProps, HtmlAnchorOnlyProps> & {
|
|
24
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
25
|
+
}
|
|
26
|
+
): React.ReactElement;
|
|
27
|
+
(
|
|
28
|
+
props: Omit<ButtonProps, HtmlButtonOnlyProps> & {
|
|
29
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
30
|
+
}
|
|
31
|
+
): React.ReactElement;
|
|
32
|
+
};
|
|
33
|
+
const Button = React.forwardRef(Button_) as any as ButtonComponentType;
|
|
34
|
+
|
|
35
|
+
export default Object.assign(Button, { __plumeType: "button" });
|