create-plasmic-app 0.0.146 → 0.0.148

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 (43) hide show
  1. package/cpa-out/.gitignore +1 -0
  2. package/cpa-out/gatsby-codegen-js/package.json +1 -1
  3. package/cpa-out/gatsby-codegen-ts/package.json +1 -1
  4. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  5. package/cpa-out/gatsby-loader-js/package.json +1 -1
  6. package/cpa-out/gatsby-loader-ts/package.json +1 -1
  7. package/cpa-out/nextjs-app-codegen-js/app/plasmic-host/page.jsx +2 -0
  8. package/cpa-out/nextjs-app-codegen-js/next.config.mjs +7 -0
  9. package/cpa-out/nextjs-app-codegen-js/package.json +7 -7
  10. package/cpa-out/nextjs-app-codegen-ts/app/plasmic-host/page.tsx +2 -0
  11. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  12. package/cpa-out/nextjs-app-codegen-ts/next.config.ts +8 -0
  13. package/cpa-out/nextjs-app-codegen-ts/package.json +9 -9
  14. package/cpa-out/nextjs-app-codegen-ts/tsconfig.json +10 -2
  15. package/cpa-out/nextjs-app-loader-js/app/layout.js +8 -11
  16. package/cpa-out/nextjs-app-loader-js/next.config.mjs +6 -0
  17. package/cpa-out/nextjs-app-loader-js/package.json +7 -7
  18. package/cpa-out/nextjs-app-loader-ts/app/layout.tsx +8 -11
  19. package/cpa-out/nextjs-app-loader-ts/next.config.ts +7 -0
  20. package/cpa-out/nextjs-app-loader-ts/package.json +9 -9
  21. package/cpa-out/nextjs-app-loader-ts/tsconfig.json +10 -2
  22. package/cpa-out/nextjs-pages-codegen-js/next.config.mjs +7 -0
  23. package/cpa-out/nextjs-pages-codegen-js/package.json +7 -7
  24. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  25. package/cpa-out/nextjs-pages-codegen-ts/next.config.ts +8 -0
  26. package/cpa-out/nextjs-pages-codegen-ts/package.json +9 -9
  27. package/cpa-out/nextjs-pages-codegen-ts/tsconfig.json +10 -2
  28. package/cpa-out/nextjs-pages-loader-js/next.config.mjs +7 -0
  29. package/cpa-out/nextjs-pages-loader-js/package.json +7 -7
  30. package/cpa-out/nextjs-pages-loader-ts/next.config.ts +8 -0
  31. package/cpa-out/nextjs-pages-loader-ts/package.json +9 -9
  32. package/cpa-out/nextjs-pages-loader-ts/tsconfig.json +10 -2
  33. package/cpa-out/react-codegen-js/package.json +1 -1
  34. package/cpa-out/react-codegen-ts/package.json +1 -1
  35. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  36. package/cpa-out/tanstack-codegen-ts/package.json +2 -2
  37. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  38. package/dist/nextjs/nextjs.js +17 -18
  39. package/dist/nextjs/templates/app-codegen/plasmic-host.d.ts +1 -0
  40. package/dist/nextjs/templates/app-codegen/plasmic-host.js +10 -0
  41. package/package.json +2 -2
  42. package/src/nextjs/nextjs.ts +13 -12
  43. package/src/nextjs/templates/app-codegen/plasmic-host.ts +7 -0
@@ -13,6 +13,7 @@
13
13
  !**/*.jsx
14
14
  !**/*.ts
15
15
  !**/*.tsx
16
+ !**/next.config.mjs
16
17
 
17
18
  # for tanstack start
18
19
  .tanstack/
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@plasmicapp/cli": "^0.1.361",
18
- "@plasmicapp/react-web": "^1.0.6",
18
+ "@plasmicapp/react-web": "^1.0.8",
19
19
  "gatsby": "^5.14.6",
20
20
  "gatsby-plugin-react-helmet": "^6.16.0",
21
21
  "react": "^18.2.0",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@plasmicapp/cli": "^0.1.361",
19
- "@plasmicapp/react-web": "^1.0.6",
19
+ "@plasmicapp/react-web": "^1.0.8",
20
20
  "gatsby": "^5.14.6",
21
21
  "gatsby-plugin-react-helmet": "^6.16.0",
22
22
  "react": "^18.2.0",
@@ -248,6 +248,7 @@ function PlasmicButton__RenderFunc(props: {
248
248
  ],
249
249
  [$props, $ctx, $refs]
250
250
  );
251
+
251
252
  const $state = useDollarState(stateSpecs, {
252
253
  $props,
253
254
  $ctx,
@@ -14,7 +14,7 @@
14
14
  "clean": "gatsby clean"
15
15
  },
16
16
  "dependencies": {
17
- "@plasmicapp/loader-gatsby": "^2.0.3",
17
+ "@plasmicapp/loader-gatsby": "^2.0.5",
18
18
  "gatsby": "^5.14.6",
19
19
  "gatsby-plugin-react-helmet": "^6.16.0",
20
20
  "react": "^18.2.0",
@@ -15,7 +15,7 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "@plasmicapp/loader-gatsby": "^2.0.3",
18
+ "@plasmicapp/loader-gatsby": "^2.0.5",
19
19
  "gatsby": "^5.14.6",
20
20
  "gatsby-plugin-react-helmet": "^6.16.0",
21
21
  "react": "^18.2.0",
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
  import { PlasmicCanvasHost, registerComponent } from '@plasmicapp/react-web/lib/host';
3
5
 
@@ -0,0 +1,7 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ trailingSlash: true,
4
+ reactStrictMode: true,
5
+ };
6
+
7
+ export default nextConfig;
@@ -6,17 +6,17 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
12
  "@plasmicapp/cli": "^0.1.361",
13
- "@plasmicapp/react-web": "^1.0.6",
14
- "next": "14.2.35",
15
- "react": "^18",
16
- "react-dom": "^18"
13
+ "@plasmicapp/react-web": "^1.0.8",
14
+ "next": "16.2.6",
15
+ "react": "19.2.4",
16
+ "react-dom": "19.2.4"
17
17
  },
18
18
  "devDependencies": {
19
- "eslint": "^8",
20
- "eslint-config-next": "14.2.35"
19
+ "eslint": "^9",
20
+ "eslint-config-next": "16.2.6"
21
21
  }
22
22
  }
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
  import { PlasmicCanvasHost, registerComponent } from '@plasmicapp/react-web/lib/host';
3
5
 
@@ -257,6 +257,7 @@ function PlasmicButton__RenderFunc(props: {
257
257
  ],
258
258
  [$props, $ctx, $refs]
259
259
  );
260
+
260
261
  const $state = useDollarState(stateSpecs, {
261
262
  $props,
262
263
  $ctx,
@@ -0,0 +1,8 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ trailingSlash: true,
5
+ reactStrictMode: true,
6
+ };
7
+
8
+ export default nextConfig;
@@ -6,21 +6,21 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
12
  "@plasmicapp/cli": "^0.1.361",
13
- "@plasmicapp/react-web": "^1.0.6",
14
- "next": "14.2.35",
15
- "react": "^18",
16
- "react-dom": "^18"
13
+ "@plasmicapp/react-web": "^1.0.8",
14
+ "next": "16.2.6",
15
+ "react": "19.2.4",
16
+ "react-dom": "19.2.4"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^20",
20
- "@types/react": "^18",
21
- "@types/react-dom": "^18",
22
- "eslint": "^8",
23
- "eslint-config-next": "14.2.35",
20
+ "@types/react": "^19",
21
+ "@types/react-dom": "^19",
22
+ "eslint": "^9",
23
+ "eslint-config-next": "16.2.6",
24
24
  "typescript": "^5"
25
25
  }
26
26
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "target": "ES2017",
3
4
  "lib": ["dom", "dom.iterable", "esnext"],
4
5
  "allowJs": true,
5
6
  "skipLibCheck": true,
@@ -10,7 +11,7 @@
10
11
  "moduleResolution": "bundler",
11
12
  "resolveJsonModule": true,
12
13
  "isolatedModules": true,
13
- "jsx": "preserve",
14
+ "jsx": "react-jsx",
14
15
  "incremental": true,
15
16
  "plugins": [
16
17
  {
@@ -21,6 +22,13 @@
21
22
  "@/*": ["./*"]
22
23
  }
23
24
  },
24
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25
+ "include": [
26
+ "next-env.d.ts",
27
+ "**/*.ts",
28
+ "**/*.tsx",
29
+ ".next/types/**/*.ts",
30
+ ".next/dev/types/**/*.ts",
31
+ "**/*.mts"
32
+ ],
25
33
  "exclude": ["node_modules"]
26
34
  }
@@ -1,15 +1,14 @@
1
- import localFont from "next/font/local";
1
+ import { Geist, Geist_Mono } from "next/font/google";
2
2
  import "./globals.css";
3
3
 
4
- const geistSans = localFont({
5
- src: "./fonts/GeistVF.woff",
4
+ const geistSans = Geist({
6
5
  variable: "--font-geist-sans",
7
- weight: "100 900",
6
+ subsets: ["latin"],
8
7
  });
9
- const geistMono = localFont({
10
- src: "./fonts/GeistMonoVF.woff",
8
+
9
+ const geistMono = Geist_Mono({
11
10
  variable: "--font-geist-mono",
12
- weight: "100 900",
11
+ subsets: ["latin"],
13
12
  });
14
13
 
15
14
  export const metadata = {
@@ -19,10 +18,8 @@ export const metadata = {
19
18
 
20
19
  export default function RootLayout({ children }) {
21
20
  return (
22
- <html lang="en">
23
- <body className={`${geistSans.variable} ${geistMono.variable}`}>
24
- {children}
25
- </body>
21
+ <html lang="en" className={`${geistSans.variable} ${geistMono.variable}`}>
22
+ <body>{children}</body>
26
23
  </html>
27
24
  );
28
25
  }
@@ -0,0 +1,6 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ /* config options here */
4
+ };
5
+
6
+ export default nextConfig;
@@ -6,16 +6,16 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^2.0.3",
13
- "next": "14.2.35",
14
- "react": "^18",
15
- "react-dom": "^18"
12
+ "@plasmicapp/loader-nextjs": "^2.0.4",
13
+ "next": "16.2.6",
14
+ "react": "19.2.4",
15
+ "react-dom": "19.2.4"
16
16
  },
17
17
  "devDependencies": {
18
- "eslint": "^8",
19
- "eslint-config-next": "14.2.35"
18
+ "eslint": "^9",
19
+ "eslint-config-next": "16.2.6"
20
20
  }
21
21
  }
@@ -1,16 +1,15 @@
1
1
  import type { Metadata } from "next";
2
- import localFont from "next/font/local";
2
+ import { Geist, Geist_Mono } from "next/font/google";
3
3
  import "./globals.css";
4
4
 
5
- const geistSans = localFont({
6
- src: "./fonts/GeistVF.woff",
5
+ const geistSans = Geist({
7
6
  variable: "--font-geist-sans",
8
- weight: "100 900",
7
+ subsets: ["latin"],
9
8
  });
10
- const geistMono = localFont({
11
- src: "./fonts/GeistMonoVF.woff",
9
+
10
+ const geistMono = Geist_Mono({
12
11
  variable: "--font-geist-mono",
13
- weight: "100 900",
12
+ subsets: ["latin"],
14
13
  });
15
14
 
16
15
  export const metadata: Metadata = {
@@ -24,10 +23,8 @@ export default function RootLayout({
24
23
  children: React.ReactNode;
25
24
  }>) {
26
25
  return (
27
- <html lang="en">
28
- <body className={`${geistSans.variable} ${geistMono.variable}`}>
29
- {children}
30
- </body>
26
+ <html lang="en" className={`${geistSans.variable} ${geistMono.variable}`}>
27
+ <body>{children}</body>
31
28
  </html>
32
29
  );
33
30
  }
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ /* config options here */
5
+ };
6
+
7
+ export default nextConfig;
@@ -6,20 +6,20 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^2.0.3",
13
- "next": "14.2.35",
14
- "react": "^18",
15
- "react-dom": "^18"
12
+ "@plasmicapp/loader-nextjs": "^2.0.4",
13
+ "next": "16.2.6",
14
+ "react": "19.2.4",
15
+ "react-dom": "19.2.4"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20",
19
- "@types/react": "^18",
20
- "@types/react-dom": "^18",
21
- "eslint": "^8",
22
- "eslint-config-next": "14.2.35",
19
+ "@types/react": "^19",
20
+ "@types/react-dom": "^19",
21
+ "eslint": "^9",
22
+ "eslint-config-next": "16.2.6",
23
23
  "typescript": "^5"
24
24
  }
25
25
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "target": "ES2017",
3
4
  "lib": ["dom", "dom.iterable", "esnext"],
4
5
  "allowJs": true,
5
6
  "skipLibCheck": true,
@@ -10,7 +11,7 @@
10
11
  "moduleResolution": "bundler",
11
12
  "resolveJsonModule": true,
12
13
  "isolatedModules": true,
13
- "jsx": "preserve",
14
+ "jsx": "react-jsx",
14
15
  "incremental": true,
15
16
  "plugins": [
16
17
  {
@@ -21,6 +22,13 @@
21
22
  "@/*": ["./*"]
22
23
  }
23
24
  },
24
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25
+ "include": [
26
+ "next-env.d.ts",
27
+ "**/*.ts",
28
+ "**/*.tsx",
29
+ ".next/types/**/*.ts",
30
+ ".next/dev/types/**/*.ts",
31
+ "**/*.mts"
32
+ ],
25
33
  "exclude": ["node_modules"]
26
34
  }
@@ -0,0 +1,7 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ trailingSlash: true,
4
+ reactStrictMode: true,
5
+ };
6
+
7
+ export default nextConfig;
@@ -6,17 +6,17 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
12
  "@plasmicapp/cli": "^0.1.361",
13
- "@plasmicapp/react-web": "^1.0.6",
14
- "next": "14.2.35",
15
- "react": "^18",
16
- "react-dom": "^18"
13
+ "@plasmicapp/react-web": "^1.0.8",
14
+ "next": "16.2.6",
15
+ "react": "19.2.4",
16
+ "react-dom": "19.2.4"
17
17
  },
18
18
  "devDependencies": {
19
- "eslint": "^8",
20
- "eslint-config-next": "14.2.35"
19
+ "eslint": "^9",
20
+ "eslint-config-next": "16.2.6"
21
21
  }
22
22
  }
@@ -255,6 +255,7 @@ function PlasmicButton__RenderFunc(props: {
255
255
  ],
256
256
  [$props, $ctx, $refs]
257
257
  );
258
+
258
259
  const $state = useDollarState(stateSpecs, {
259
260
  $props,
260
261
  $ctx,
@@ -0,0 +1,8 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ trailingSlash: true,
5
+ reactStrictMode: true,
6
+ };
7
+
8
+ export default nextConfig;
@@ -6,21 +6,21 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
12
  "@plasmicapp/cli": "^0.1.361",
13
- "@plasmicapp/react-web": "^1.0.6",
14
- "next": "14.2.35",
15
- "react": "^18",
16
- "react-dom": "^18"
13
+ "@plasmicapp/react-web": "^1.0.8",
14
+ "next": "16.2.6",
15
+ "react": "19.2.4",
16
+ "react-dom": "19.2.4"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^20",
20
- "@types/react": "^18",
21
- "@types/react-dom": "^18",
22
- "eslint": "^8",
23
- "eslint-config-next": "14.2.35",
20
+ "@types/react": "^19",
21
+ "@types/react-dom": "^19",
22
+ "eslint": "^9",
23
+ "eslint-config-next": "16.2.6",
24
24
  "typescript": "^5"
25
25
  }
26
26
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "target": "ES2017",
3
4
  "lib": ["dom", "dom.iterable", "esnext"],
4
5
  "allowJs": true,
5
6
  "skipLibCheck": true,
@@ -10,12 +11,19 @@
10
11
  "moduleResolution": "bundler",
11
12
  "resolveJsonModule": true,
12
13
  "isolatedModules": true,
13
- "jsx": "preserve",
14
+ "jsx": "react-jsx",
14
15
  "incremental": true,
15
16
  "paths": {
16
17
  "@/*": ["./*"]
17
18
  }
18
19
  },
19
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
20
+ "include": [
21
+ "next-env.d.ts",
22
+ "**/*.ts",
23
+ "**/*.tsx",
24
+ ".next/types/**/*.ts",
25
+ ".next/dev/types/**/*.ts",
26
+ "**/*.mts"
27
+ ],
20
28
  "exclude": ["node_modules"]
21
29
  }
@@ -0,0 +1,7 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ /* config options here */
4
+ reactStrictMode: true,
5
+ };
6
+
7
+ export default nextConfig;
@@ -6,16 +6,16 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^2.0.3",
13
- "next": "14.2.35",
14
- "react": "^18",
15
- "react-dom": "^18"
12
+ "@plasmicapp/loader-nextjs": "^2.0.4",
13
+ "next": "16.2.6",
14
+ "react": "19.2.4",
15
+ "react-dom": "19.2.4"
16
16
  },
17
17
  "devDependencies": {
18
- "eslint": "^8",
19
- "eslint-config-next": "14.2.35"
18
+ "eslint": "^9",
19
+ "eslint-config-next": "16.2.6"
20
20
  }
21
21
  }
@@ -0,0 +1,8 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ /* config options here */
5
+ reactStrictMode: true,
6
+ };
7
+
8
+ export default nextConfig;
@@ -6,20 +6,20 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "eslint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^2.0.3",
13
- "next": "14.2.35",
14
- "react": "^18",
15
- "react-dom": "^18"
12
+ "@plasmicapp/loader-nextjs": "^2.0.4",
13
+ "next": "16.2.6",
14
+ "react": "19.2.4",
15
+ "react-dom": "19.2.4"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20",
19
- "@types/react": "^18",
20
- "@types/react-dom": "^18",
21
- "eslint": "^8",
22
- "eslint-config-next": "14.2.35",
19
+ "@types/react": "^19",
20
+ "@types/react-dom": "^19",
21
+ "eslint": "^9",
22
+ "eslint-config-next": "16.2.6",
23
23
  "typescript": "^5"
24
24
  }
25
25
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "target": "ES2017",
3
4
  "lib": ["dom", "dom.iterable", "esnext"],
4
5
  "allowJs": true,
5
6
  "skipLibCheck": true,
@@ -10,12 +11,19 @@
10
11
  "moduleResolution": "bundler",
11
12
  "resolveJsonModule": true,
12
13
  "isolatedModules": true,
13
- "jsx": "preserve",
14
+ "jsx": "react-jsx",
14
15
  "incremental": true,
15
16
  "paths": {
16
17
  "@/*": ["./*"]
17
18
  }
18
19
  },
19
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
20
+ "include": [
21
+ "next-env.d.ts",
22
+ "**/*.ts",
23
+ "**/*.tsx",
24
+ ".next/types/**/*.ts",
25
+ ".next/dev/types/**/*.ts",
26
+ "**/*.mts"
27
+ ],
20
28
  "exclude": ["node_modules"]
21
29
  }
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@plasmicapp/cli": "^0.1.361",
14
- "@plasmicapp/react-web": "^1.0.6",
14
+ "@plasmicapp/react-web": "^1.0.8",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
17
17
  },
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@plasmicapp/cli": "^0.1.361",
14
- "@plasmicapp/react-web": "^1.0.6",
14
+ "@plasmicapp/react-web": "^1.0.8",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
17
17
  },
@@ -242,6 +242,7 @@ function PlasmicButton__RenderFunc(props: {
242
242
  ],
243
243
  [$props, $ctx, $refs]
244
244
  );
245
+
245
246
  const $state = useDollarState(stateSpecs, {
246
247
  $props,
247
248
  $ctx,
@@ -13,10 +13,10 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@plasmicapp/cli": "^0.1.361",
16
- "@plasmicapp/react-web": "^1.0.6",
16
+ "@plasmicapp/react-web": "^1.0.8",
17
17
  "@tailwindcss/vite": "^4.1.18",
18
18
  "@tanstack/react-devtools": "latest",
19
- "@tanstack/react-query": "^5.100.9",
19
+ "@tanstack/react-query": "^5.100.10",
20
20
  "@tanstack/react-router": "latest",
21
21
  "@tanstack/react-router-devtools": "latest",
22
22
  "@tanstack/router-plugin": "^1.132.0",
@@ -254,6 +254,7 @@ function PlasmicButton__RenderFunc(props: {
254
254
  ],
255
255
  [$props, $ctx, $refs]
256
256
  );
257
+
257
258
  const $state = useDollarState(stateSpecs, {
258
259
  $props,
259
260
  $ctx,
@@ -22,15 +22,16 @@ const file_utils_1 = require("../utils/file-utils");
22
22
  const lang_utils_1 = require("../utils/lang-utils");
23
23
  const npm_utils_1 = require("../utils/npm-utils");
24
24
  const layout_1 = require("./templates/app-codegen/layout");
25
+ const plasmic_host_1 = require("./templates/app-codegen/plasmic-host");
25
26
  const plasmic_init_client_1 = require("./templates/app-codegen/plasmic-init-client");
26
27
  const catchall_page_1 = require("./templates/app-loader/catchall-page");
27
- const plasmic_host_1 = require("./templates/app-loader/plasmic-host");
28
+ const plasmic_host_2 = require("./templates/app-loader/plasmic-host");
28
29
  const plasmic_init_1 = require("./templates/app-loader/plasmic-init");
29
30
  const plasmic_init_client_2 = require("./templates/app-loader/plasmic-init-client");
30
31
  const app_1 = require("./templates/pages-codegen/app");
31
- const plasmic_host_2 = require("./templates/pages-codegen/plasmic-host");
32
+ const plasmic_host_3 = require("./templates/pages-codegen/plasmic-host");
32
33
  const catchall_page_2 = require("./templates/pages-loader/catchall-page");
33
- const plasmic_host_3 = require("./templates/pages-loader/plasmic-host");
34
+ const plasmic_host_4 = require("./templates/pages-loader/plasmic-host");
34
35
  const plasmic_init_2 = require("./templates/pages-loader/plasmic-init");
35
36
  exports.nextjsStrategy = {
36
37
  create: (args) => __awaiter(void 0, void 0, void 0, function* () {
@@ -41,8 +42,8 @@ exports.nextjsStrategy = {
41
42
  ? "--app"
42
43
  : "--no-app";
43
44
  const templateArg = template ? ` --example ${template}` : "";
44
- // TODO: Change to latest when nextjs stops using react@19-rc
45
- const createCommand = `npx create-next-app@14 ${projectPath} ${typescriptArg} ${experimentalAppArg} ${templateArg}` +
45
+ // NOTE: Not using create-next-app@latest to keep major version bumps deliberate
46
+ const createCommand = `npx create-next-app@16 ${projectPath} ${typescriptArg} ${experimentalAppArg} ${templateArg}` +
46
47
  ` --eslint --no-src-dir --import-alias "@/*" --no-tailwind`;
47
48
  // Default Next.js starter already supports Typescript
48
49
  // See where we `touch tsconfig.json` later on
@@ -59,15 +60,14 @@ exports.nextjsStrategy = {
59
60
  }
60
61
  }),
61
62
  overwriteConfig: (args) => __awaiter(void 0, void 0, void 0, function* () {
62
- const { projectPath, scheme } = args;
63
- const nextjsConfigFile = path_1.default.join(projectPath, "next.config.mjs");
63
+ const { projectPath, scheme, jsOrTs } = args;
64
64
  if (scheme === "codegen") {
65
- yield fs_1.promises.writeFile(nextjsConfigFile, `
66
- /** @type {import('next').NextConfig} */
67
- const nextConfig = {
68
- eslint: {
69
- ignoreDuringBuilds: true,
70
- },
65
+ const isTs = jsOrTs === "ts";
66
+ const typePragma = isTs
67
+ ? `import type { NextConfig } from "next";\n\n`
68
+ : `/** @type {import('next').NextConfig} */\n`;
69
+ const typeAnnotation = isTs ? ": NextConfig" : "";
70
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, `next.config.${isTs ? "ts" : "mjs"}`), `${typePragma}const nextConfig${typeAnnotation} = {
71
71
  trailingSlash: true,
72
72
  reactStrictMode: true,
73
73
  };
@@ -101,7 +101,7 @@ function generateFilesAppDir(args) {
101
101
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init-client.${jsOrTs}x`), (0, plasmic_init_client_2.makePlasmicInitClient_app_loader)(jsOrTs));
102
102
  // ./app/plasmic-host/page.tsx
103
103
  yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "plasmic-host"));
104
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_1.makePlasmicHostPage_app_loader)());
104
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_2.makePlasmicHostPage_app_loader)());
105
105
  // ./app/[[...catchall]]/page.tsx
106
106
  yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "[[...catchall]]"));
107
107
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "[[...catchall]]", `page.${jsOrTs}x`), (0, catchall_page_1.makeCatchallPage_app_loader)(jsOrTs));
@@ -115,8 +115,7 @@ function generateFilesAppDir(args) {
115
115
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init-client.${jsOrTs}x`), (0, plasmic_init_client_1.makePlasmicInitClient_app_codegen)(jsOrTs));
116
116
  // ./app/plasmic-host/page.tsx
117
117
  yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "plasmic-host"));
118
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_2.makePlasmicHostPage_pages_codegen)() // plasmic-host page contents are the same as the pages router
119
- );
118
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_1.makePlasmicHostPage_app_codegen)());
120
119
  // This should generate
121
120
  // ./plasmic.json
122
121
  // ./app/page.tsx
@@ -144,7 +143,7 @@ function generateFilesPagesDir(args) {
144
143
  // ./plasmic-init.ts
145
144
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init.${jsOrTs}`), (0, plasmic_init_2.makePlasmicInit_pages_loader)(projectId, (0, lang_utils_1.ensure)(projectApiToken, "Missing projectApiToken")));
146
145
  // ./pages/plasmic-host.tsx
147
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_3.makePlasmicHostPage_pages_loader)());
146
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_4.makePlasmicHostPage_pages_loader)());
148
147
  // ./pages/[[...catchall]].tsx
149
148
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `[[...catchall]].${jsOrTs}x`), (0, catchall_page_2.makeCatchallPage_pages_loader)(jsOrTs));
150
149
  }
@@ -152,7 +151,7 @@ function generateFilesPagesDir(args) {
152
151
  // ./pages/_app.tsx
153
152
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `_app.${jsOrTs}x`), (0, app_1.makeCustomApp_pages_codegen)(jsOrTs));
154
153
  // ./pages/plasmic-host.tsx
155
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_2.makePlasmicHostPage_pages_codegen)());
154
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_3.makePlasmicHostPage_pages_codegen)());
156
155
  // This should generate
157
156
  // ./plasmic.json
158
157
  // ./pages/index.tsx
@@ -0,0 +1 @@
1
+ export declare function makePlasmicHostPage_app_codegen(): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makePlasmicHostPage_app_codegen = void 0;
4
+ const plasmic_host_1 = require("../pages-codegen/plasmic-host");
5
+ function makePlasmicHostPage_app_codegen() {
6
+ return `"use client";
7
+
8
+ ${(0, plasmic_host_1.makePlasmicHostPage_pages_codegen)()}`;
9
+ }
10
+ exports.makePlasmicHostPage_app_codegen = makePlasmicHostPage_app_codegen;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-plasmic-app",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
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": "829025b05d0421d275395c51c54a434cedf8a176"
50
+ "gitHead": "e7fba8eb70bafe6176256ccbbef135a64f53ed35"
51
51
  }
@@ -12,6 +12,7 @@ import { ensure } from "../utils/lang-utils";
12
12
  import { installUpgrade } from "../utils/npm-utils";
13
13
  import { CPAStrategy, GenerateFilesArgs } from "../utils/strategy";
14
14
  import { makeLayout_app_codegen } from "./templates/app-codegen/layout";
15
+ import { makePlasmicHostPage_app_codegen } from "./templates/app-codegen/plasmic-host";
15
16
  import { makePlasmicInitClient_app_codegen } from "./templates/app-codegen/plasmic-init-client";
16
17
  import { makeCatchallPage_app_loader } from "./templates/app-loader/catchall-page";
17
18
  import { makePlasmicHostPage_app_loader } from "./templates/app-loader/plasmic-host";
@@ -31,9 +32,9 @@ export const nextjsStrategy: CPAStrategy = {
31
32
  ? "--app"
32
33
  : "--no-app";
33
34
  const templateArg = template ? ` --example ${template}` : "";
34
- // TODO: Change to latest when nextjs stops using react@19-rc
35
+ // NOTE: Not using create-next-app@latest to keep major version bumps deliberate
35
36
  const createCommand =
36
- `npx create-next-app@14 ${projectPath} ${typescriptArg} ${experimentalAppArg} ${templateArg}` +
37
+ `npx create-next-app@16 ${projectPath} ${typescriptArg} ${experimentalAppArg} ${templateArg}` +
37
38
  ` --eslint --no-src-dir --import-alias "@/*" --no-tailwind`;
38
39
 
39
40
  // Default Next.js starter already supports Typescript
@@ -50,17 +51,17 @@ export const nextjsStrategy: CPAStrategy = {
50
51
  }
51
52
  },
52
53
  overwriteConfig: async (args) => {
53
- const { projectPath, scheme } = args;
54
- const nextjsConfigFile = path.join(projectPath, "next.config.mjs");
54
+ const { projectPath, scheme, jsOrTs } = args;
55
55
  if (scheme === "codegen") {
56
+ const isTs = jsOrTs === "ts";
57
+ const typePragma = isTs
58
+ ? `import type { NextConfig } from "next";\n\n`
59
+ : `/** @type {import('next').NextConfig} */\n`;
60
+ const typeAnnotation = isTs ? ": NextConfig" : "";
61
+
56
62
  await fs.writeFile(
57
- nextjsConfigFile,
58
- `
59
- /** @type {import('next').NextConfig} */
60
- const nextConfig = {
61
- eslint: {
62
- ignoreDuringBuilds: true,
63
- },
63
+ path.join(projectPath, `next.config.${isTs ? "ts" : "mjs"}`),
64
+ `${typePragma}const nextConfig${typeAnnotation} = {
64
65
  trailingSlash: true,
65
66
  reactStrictMode: true,
66
67
  };
@@ -137,7 +138,7 @@ async function generateFilesAppDir(args: GenerateFilesArgs) {
137
138
  await fs.mkdir(path.join(projectPath, "app", "plasmic-host"));
138
139
  await fs.writeFile(
139
140
  path.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`),
140
- makePlasmicHostPage_pages_codegen() // plasmic-host page contents are the same as the pages router
141
+ makePlasmicHostPage_app_codegen()
141
142
  );
142
143
 
143
144
  // This should generate
@@ -0,0 +1,7 @@
1
+ import { makePlasmicHostPage_pages_codegen } from "../pages-codegen/plasmic-host";
2
+
3
+ export function makePlasmicHostPage_app_codegen(): string {
4
+ return `"use client";
5
+
6
+ ${makePlasmicHostPage_pages_codegen()}`;
7
+ }