create-plasmic-app 0.0.137 → 0.0.139
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-loader-js/plasmic-init.js +5 -4
- package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +5 -4
- package/cpa-out/nextjs-pages-loader-js/plasmic-init.js +6 -1
- package/cpa-out/nextjs-pages-loader-ts/plasmic-init.ts +6 -1
- package/cpa-out/react-codegen-js/package.json +1 -1
- package/cpa-out/react-codegen-js/src/App.jsx +4 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +1 -0
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -0
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +7 -2
- package/cpa-out/react-codegen-ts/package.json +1 -1
- package/cpa-out/react-codegen-ts/src/App.tsx +4 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +1 -0
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -2
- package/dist/nextjs/templates/app-loader/plasmic-init.js +5 -4
- package/dist/nextjs/templates/pages-loader/plasmic-init.js +6 -1
- package/dist/utils/file-utils.js +4 -1
- package/package.json +2 -2
- package/src/nextjs/templates/app-loader/plasmic-init.ts +5 -4
- package/src/nextjs/templates/pages-loader/plasmic-init.ts +6 -1
- package/src/utils/file-utils.ts +6 -1
- /package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.jsx → PlasmicIcon__CheckSvg.jsx} +0 -0
- /package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.tsx → PlasmicIcon__CheckSvg.tsx} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
|
|
2
|
-
import * as NextNavigation from "next/navigation";
|
|
3
2
|
|
|
4
3
|
export const PLASMIC = initPlasmicLoader({
|
|
5
4
|
projects: [
|
|
@@ -8,13 +7,15 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
8
7
|
token: "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
9
8
|
},
|
|
10
9
|
],
|
|
10
|
+
platformOptions: {
|
|
11
|
+
nextjs: {
|
|
12
|
+
appDir: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
11
15
|
|
|
12
16
|
// By default Plasmic will use the last published version of your project.
|
|
13
17
|
// For development, you can set preview to true, which will use the unpublished
|
|
14
18
|
// project, allowing you to see your designs without publishing. Please
|
|
15
19
|
// only use this for development, as this is significantly slower.
|
|
16
20
|
preview: false,
|
|
17
|
-
|
|
18
|
-
// Needed for Next.js app router support.
|
|
19
|
-
nextNavigation: NextNavigation,
|
|
20
21
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
|
|
2
|
-
import * as NextNavigation from "next/navigation";
|
|
3
2
|
|
|
4
3
|
export const PLASMIC = initPlasmicLoader({
|
|
5
4
|
projects: [
|
|
@@ -8,13 +7,15 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
8
7
|
token: "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
9
8
|
},
|
|
10
9
|
],
|
|
10
|
+
platformOptions: {
|
|
11
|
+
nextjs: {
|
|
12
|
+
appDir: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
11
15
|
|
|
12
16
|
// By default Plasmic will use the last published version of your project.
|
|
13
17
|
// For development, you can set preview to true, which will use the unpublished
|
|
14
18
|
// project, allowing you to see your designs without publishing. Please
|
|
15
19
|
// only use this for development, as this is significantly slower.
|
|
16
20
|
preview: false,
|
|
17
|
-
|
|
18
|
-
// Needed for Next.js app router support.
|
|
19
|
-
nextNavigation: NextNavigation,
|
|
20
21
|
});
|
|
@@ -7,7 +7,12 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
7
7
|
token: "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
8
8
|
},
|
|
9
9
|
],
|
|
10
|
-
|
|
10
|
+
platformOptions: {
|
|
11
|
+
nextjs: {
|
|
12
|
+
appDir: false,
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
11
16
|
// By default Plasmic will use the last published version of your project.
|
|
12
17
|
// For development, you can set preview to true, which will use the unpublished
|
|
13
18
|
// project, allowing you to see your designs without publishing. Please
|
|
@@ -7,7 +7,12 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
7
7
|
token: "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
8
8
|
},
|
|
9
9
|
],
|
|
10
|
-
|
|
10
|
+
platformOptions: {
|
|
11
|
+
nextjs: {
|
|
12
|
+
appDir: false,
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
11
16
|
// By default Plasmic will use the last published version of your project.
|
|
12
17
|
// For development, you can set preview to true, which will use the unpublished
|
|
13
18
|
// project, allowing you to see your designs without publishing. Please
|
package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx
CHANGED
|
@@ -104,6 +104,7 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
104
104
|
className={classNames(
|
|
105
105
|
projectcss.all,
|
|
106
106
|
projectcss.h1,
|
|
107
|
+
projectcss.h1__47tFX,
|
|
107
108
|
projectcss.__wab_text,
|
|
108
109
|
sty.h1
|
|
109
110
|
)}
|
|
@@ -127,7 +128,9 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
127
128
|
}
|
|
128
129
|
</React.Fragment>
|
|
129
130
|
<span
|
|
130
|
-
className={
|
|
131
|
+
className={
|
|
132
|
+
"plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
|
|
133
|
+
}
|
|
131
134
|
style={{ fontWeight: 700 }}
|
|
132
135
|
>
|
|
133
136
|
{"Therefore, please avoid changing this project."}
|
|
@@ -141,7 +144,9 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
141
144
|
}
|
|
142
145
|
</React.Fragment>
|
|
143
146
|
<span
|
|
144
|
-
className={
|
|
147
|
+
className={
|
|
148
|
+
"plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
|
|
149
|
+
}
|
|
145
150
|
style={{ fontWeight: 700 }}
|
|
146
151
|
>
|
|
147
152
|
{"Code"}
|
package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx
CHANGED
|
@@ -181,6 +181,7 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
181
181
|
className={classNames(
|
|
182
182
|
projectcss.all,
|
|
183
183
|
projectcss.h1,
|
|
184
|
+
projectcss.h1__47tFX,
|
|
184
185
|
projectcss.__wab_text,
|
|
185
186
|
sty.h1
|
|
186
187
|
)}
|
|
@@ -204,7 +205,9 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
204
205
|
}
|
|
205
206
|
</React.Fragment>
|
|
206
207
|
<span
|
|
207
|
-
className={
|
|
208
|
+
className={
|
|
209
|
+
"plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
|
|
210
|
+
}
|
|
208
211
|
style={{ fontWeight: 700 }}
|
|
209
212
|
>
|
|
210
213
|
{"Therefore, please avoid changing this project."}
|
|
@@ -218,7 +221,9 @@ function PlasmicHomepage__RenderFunc(props: {
|
|
|
218
221
|
}
|
|
219
222
|
</React.Fragment>
|
|
220
223
|
<span
|
|
221
|
-
className={
|
|
224
|
+
className={
|
|
225
|
+
"plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
|
|
226
|
+
}
|
|
222
227
|
style={{ fontWeight: 700 }}
|
|
223
228
|
>
|
|
224
229
|
{"Code"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makePlasmicInit_app_loader = void 0;
|
|
4
4
|
function makePlasmicInit_app_loader(projectId, projectApiToken) {
|
|
5
5
|
return `import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
|
|
6
|
-
import * as NextNavigation from "next/navigation";
|
|
7
6
|
|
|
8
7
|
export const PLASMIC = initPlasmicLoader({
|
|
9
8
|
projects: [
|
|
@@ -12,15 +11,17 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
12
11
|
token: "${projectApiToken}",
|
|
13
12
|
},
|
|
14
13
|
],
|
|
14
|
+
platformOptions: {
|
|
15
|
+
nextjs: {
|
|
16
|
+
appDir: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
15
19
|
|
|
16
20
|
// By default Plasmic will use the last published version of your project.
|
|
17
21
|
// For development, you can set preview to true, which will use the unpublished
|
|
18
22
|
// project, allowing you to see your designs without publishing. Please
|
|
19
23
|
// only use this for development, as this is significantly slower.
|
|
20
24
|
preview: false,
|
|
21
|
-
|
|
22
|
-
// Needed for Next.js app router support.
|
|
23
|
-
nextNavigation: NextNavigation,
|
|
24
25
|
});
|
|
25
26
|
`;
|
|
26
27
|
}
|
|
@@ -11,7 +11,12 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
11
11
|
token: "${projectApiToken}",
|
|
12
12
|
},
|
|
13
13
|
],
|
|
14
|
-
|
|
14
|
+
platformOptions: {
|
|
15
|
+
nextjs: {
|
|
16
|
+
appDir: false,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
15
20
|
// By default Plasmic will use the last published version of your project.
|
|
16
21
|
// For development, you can set preview to true, which will use the unpublished
|
|
17
22
|
// project, allowing you to see your designs without publishing. Please
|
package/dist/utils/file-utils.js
CHANGED
|
@@ -115,11 +115,14 @@ function generateHomePage(componentAbsPath, indexAbsPath, globalContextsAbsPath)
|
|
|
115
115
|
: content;
|
|
116
116
|
};
|
|
117
117
|
const appjsContents = `
|
|
118
|
+
import React from "react";
|
|
118
119
|
import ${componentName} from './${stripExtension(componentRelativePath)}';
|
|
119
120
|
${globalContextsImport}
|
|
120
121
|
|
|
121
122
|
function App() {
|
|
122
|
-
return (
|
|
123
|
+
return (
|
|
124
|
+
${maybeWrapInGlobalContexts(`<React.Suspense><${componentName} /></React.Suspense>`)}
|
|
125
|
+
);
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
export default App;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-plasmic-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.139",
|
|
4
4
|
"description": "Create Plasmic-powered React apps",
|
|
5
5
|
"main": "./dist/lib.js",
|
|
6
6
|
"types": "./dist/lib.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"validate-npm-package-name": "^3.0.0",
|
|
48
48
|
"yargs": "^16.2.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "addf9e93ce8076ad8080722bbcab32d93cd2a44a"
|
|
51
51
|
}
|
|
@@ -3,7 +3,6 @@ export function makePlasmicInit_app_loader(
|
|
|
3
3
|
projectApiToken: string
|
|
4
4
|
): string {
|
|
5
5
|
return `import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
|
|
6
|
-
import * as NextNavigation from "next/navigation";
|
|
7
6
|
|
|
8
7
|
export const PLASMIC = initPlasmicLoader({
|
|
9
8
|
projects: [
|
|
@@ -12,15 +11,17 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
12
11
|
token: "${projectApiToken}",
|
|
13
12
|
},
|
|
14
13
|
],
|
|
14
|
+
platformOptions: {
|
|
15
|
+
nextjs: {
|
|
16
|
+
appDir: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
15
19
|
|
|
16
20
|
// By default Plasmic will use the last published version of your project.
|
|
17
21
|
// For development, you can set preview to true, which will use the unpublished
|
|
18
22
|
// project, allowing you to see your designs without publishing. Please
|
|
19
23
|
// only use this for development, as this is significantly slower.
|
|
20
24
|
preview: false,
|
|
21
|
-
|
|
22
|
-
// Needed for Next.js app router support.
|
|
23
|
-
nextNavigation: NextNavigation,
|
|
24
25
|
});
|
|
25
26
|
`;
|
|
26
27
|
}
|
|
@@ -11,7 +11,12 @@ export const PLASMIC = initPlasmicLoader({
|
|
|
11
11
|
token: "${projectApiToken}",
|
|
12
12
|
},
|
|
13
13
|
],
|
|
14
|
-
|
|
14
|
+
platformOptions: {
|
|
15
|
+
nextjs: {
|
|
16
|
+
appDir: false,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
15
20
|
// By default Plasmic will use the last published version of your project.
|
|
16
21
|
// For development, you can set preview to true, which will use the unpublished
|
|
17
22
|
// project, allowing you to see your designs without publishing. Please
|
package/src/utils/file-utils.ts
CHANGED
|
@@ -106,11 +106,16 @@ export function generateHomePage(
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
const appjsContents = `
|
|
109
|
+
import React from "react";
|
|
109
110
|
import ${componentName} from './${stripExtension(componentRelativePath)}';
|
|
110
111
|
${globalContextsImport}
|
|
111
112
|
|
|
112
113
|
function App() {
|
|
113
|
-
return (
|
|
114
|
+
return (
|
|
115
|
+
${maybeWrapInGlobalContexts(
|
|
116
|
+
`<React.Suspense><${componentName} /></React.Suspense>`
|
|
117
|
+
)}
|
|
118
|
+
);
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
export default App;
|
|
File without changes
|