create-plasmic-app 0.0.143 → 0.0.144

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 (78) hide show
  1. package/cpa-out/gatsby-codegen-js/package.json +2 -2
  2. package/cpa-out/gatsby-codegen-js/plasmic.json +2 -2
  3. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +1 -0
  4. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -0
  5. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +7 -2
  6. package/cpa-out/gatsby-codegen-ts/package.json +2 -2
  7. package/cpa-out/gatsby-codegen-ts/plasmic.json +2 -2
  8. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  9. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +1 -0
  10. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -2
  11. package/cpa-out/gatsby-loader-js/package.json +1 -1
  12. package/cpa-out/gatsby-loader-ts/package.json +1 -1
  13. package/cpa-out/nextjs-app-codegen-js/app/dynamic/[slug]/page.jsx +11 -3
  14. package/cpa-out/nextjs-app-codegen-js/app/layout.jsx +3 -4
  15. package/cpa-out/nextjs-app-codegen-js/app/page.jsx +4 -3
  16. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +1 -0
  17. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -0
  18. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.jsx +1 -1
  19. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +7 -2
  20. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepageServer.jsx +1 -1
  21. package/cpa-out/nextjs-app-codegen-js/package.json +2 -2
  22. package/cpa-out/nextjs-app-codegen-js/plasmic-init-client.jsx +0 -1
  23. package/cpa-out/nextjs-app-codegen-js/plasmic.json +2 -2
  24. package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page.tsx +12 -4
  25. package/cpa-out/nextjs-app-codegen-ts/app/layout.tsx +3 -4
  26. package/cpa-out/nextjs-app-codegen-ts/app/page.tsx +4 -4
  27. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  28. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +1 -0
  29. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.tsx +1 -1
  30. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -2
  31. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepageServer.tsx +1 -1
  32. package/cpa-out/nextjs-app-codegen-ts/package.json +2 -2
  33. package/cpa-out/nextjs-app-codegen-ts/plasmic-init-client.tsx +1 -1
  34. package/cpa-out/nextjs-app-codegen-ts/plasmic.json +2 -2
  35. package/cpa-out/nextjs-app-loader-js/package.json +1 -1
  36. package/cpa-out/nextjs-app-loader-js/plasmic-init.js +5 -0
  37. package/cpa-out/nextjs-app-loader-ts/package.json +1 -1
  38. package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +5 -0
  39. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +1 -0
  40. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -0
  41. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +7 -2
  42. package/cpa-out/nextjs-pages-codegen-js/package.json +2 -2
  43. package/cpa-out/nextjs-pages-codegen-js/plasmic.json +2 -2
  44. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
  45. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +1 -0
  46. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -2
  47. package/cpa-out/nextjs-pages-codegen-ts/package.json +2 -2
  48. package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +2 -2
  49. package/cpa-out/nextjs-pages-loader-js/package.json +1 -1
  50. package/cpa-out/nextjs-pages-loader-ts/package.json +1 -1
  51. package/cpa-out/react-codegen-js/package.json +2 -2
  52. package/cpa-out/react-codegen-js/plasmic.json +2 -2
  53. package/cpa-out/react-codegen-ts/package.json +2 -2
  54. package/cpa-out/react-codegen-ts/plasmic.json +2 -2
  55. package/cpa-out/tanstack-codegen-ts/package.json +7 -8
  56. package/cpa-out/tanstack-codegen-ts/plasmic.json +2 -2
  57. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -5
  58. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +1 -2
  59. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -5
  60. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicStyleTokensProvider.tsx +2 -0
  61. package/cpa-out/tanstack-codegen-ts/src/router.tsx +0 -1
  62. package/cpa-out/tanstack-codegen-ts/tsconfig.json +0 -1
  63. package/cpa-out/tanstack-codegen-ts/vite.config.ts +1 -2
  64. package/dist/nextjs/nextjs.js +2 -0
  65. package/dist/nextjs/templates/app-codegen/plasmic-init-client.js +1 -2
  66. package/dist/tanstack/tanstack.js +11 -1
  67. package/package.json +2 -2
  68. package/src/nextjs/nextjs.ts +3 -0
  69. package/src/nextjs/templates/app-codegen/plasmic-init-client.ts +4 -2
  70. package/src/tanstack/tanstack.ts +11 -1
  71. package/cpa-out/nextjs-app-codegen-js/app/layout.js +0 -28
  72. package/cpa-out/tanstack-codegen-ts/src/components/Footer.tsx +0 -44
  73. package/cpa-out/tanstack-codegen-ts/src/components/Header.tsx +0 -78
  74. package/cpa-out/tanstack-codegen-ts/src/components/ThemeToggle.tsx +0 -81
  75. /package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.jsx → PlasmicIcon__CheckSvg.jsx} +0 -0
  76. /package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.tsx → PlasmicIcon__CheckSvg.tsx} +0 -0
  77. /package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.jsx → PlasmicIcon__CheckSvg.jsx} +0 -0
  78. /package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/{PlasmicIcon__Checksvg.tsx → PlasmicIcon__CheckSvg.tsx} +0 -0
@@ -205,6 +205,7 @@ function PlasmicHomepage__RenderFunc(props: {
205
205
  className={classNames(
206
206
  projectcss.all,
207
207
  projectcss.h1,
208
+ projectcss.h1__47tFX,
208
209
  projectcss.__wab_text,
209
210
  sty.h1
210
211
  )}
@@ -228,7 +229,9 @@ function PlasmicHomepage__RenderFunc(props: {
228
229
  }
229
230
  </React.Fragment>
230
231
  <span
231
- className={"plasmic_default__all plasmic_default__span"}
232
+ className={
233
+ "plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
234
+ }
232
235
  style={{ fontWeight: 700 }}
233
236
  >
234
237
  {"Therefore, please avoid changing this project."}
@@ -242,7 +245,9 @@ function PlasmicHomepage__RenderFunc(props: {
242
245
  }
243
246
  </React.Fragment>
244
247
  <span
245
- className={"plasmic_default__all plasmic_default__span"}
248
+ className={
249
+ "plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
250
+ }
246
251
  style={{ fontWeight: 700 }}
247
252
  >
248
253
  {"Code"}
@@ -9,8 +9,8 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/cli": "^0.1.359",
13
- "@plasmicapp/react-web": "^0.2.425",
12
+ "@plasmicapp/cli": "^0.1.361",
13
+ "@plasmicapp/react-web": "^1.0.6",
14
14
  "next": "14.2.35",
15
15
  "react": "^18",
16
16
  "react-dom": "^18"
@@ -135,6 +135,6 @@
135
135
  "nextjsConfig": {
136
136
  "pagesDir": "../pages"
137
137
  },
138
- "cliVersion": "0.1.359",
139
- "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.359/dist/plasmic.schema.json"
138
+ "cliVersion": "0.1.361",
139
+ "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.361/dist/plasmic.schema.json"
140
140
  }
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^1.0.456",
12
+ "@plasmicapp/loader-nextjs": "^2.0.3",
13
13
  "next": "14.2.35",
14
14
  "react": "^18",
15
15
  "react-dom": "^18"
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "@plasmicapp/loader-nextjs": "^1.0.456",
12
+ "@plasmicapp/loader-nextjs": "^2.0.3",
13
13
  "next": "14.2.35",
14
14
  "react": "^18",
15
15
  "react-dom": "^18"
@@ -10,8 +10,8 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@plasmicapp/cli": "^0.1.359",
14
- "@plasmicapp/react-web": "^1.0.0",
13
+ "@plasmicapp/cli": "^0.1.361",
14
+ "@plasmicapp/react-web": "^1.0.6",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
17
17
  },
@@ -132,6 +132,6 @@
132
132
  },
133
133
  "wrapPagesWithGlobalContexts": true,
134
134
  "preserveJsImportExtensions": false,
135
- "cliVersion": "0.1.359",
136
- "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.359/dist/plasmic.schema.json"
135
+ "cliVersion": "0.1.361",
136
+ "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.361/dist/plasmic.schema.json"
137
137
  }
@@ -10,8 +10,8 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@plasmicapp/cli": "^0.1.359",
14
- "@plasmicapp/react-web": "^1.0.0",
13
+ "@plasmicapp/cli": "^0.1.361",
14
+ "@plasmicapp/react-web": "^1.0.6",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
17
17
  },
@@ -132,6 +132,6 @@
132
132
  },
133
133
  "wrapPagesWithGlobalContexts": true,
134
134
  "preserveJsImportExtensions": false,
135
- "cliVersion": "0.1.359",
136
- "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.359/dist/plasmic.schema.json"
135
+ "cliVersion": "0.1.361",
136
+ "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.361/dist/plasmic.schema.json"
137
137
  }
@@ -12,11 +12,11 @@
12
12
  "test": "vitest run"
13
13
  },
14
14
  "dependencies": {
15
- "@plasmicapp/cli": "^0.1.359",
16
- "@plasmicapp/react-web": "^0.2.425",
15
+ "@plasmicapp/cli": "^0.1.361",
16
+ "@plasmicapp/react-web": "^1.0.6",
17
17
  "@tailwindcss/vite": "^4.1.18",
18
18
  "@tanstack/react-devtools": "latest",
19
- "@tanstack/react-query": "^5.90.21",
19
+ "@tanstack/react-query": "^5.100.9",
20
20
  "@tanstack/react-router": "latest",
21
21
  "@tanstack/react-router-devtools": "latest",
22
22
  "@tanstack/router-plugin": "^1.132.0",
@@ -34,12 +34,11 @@
34
34
  "@types/node": "^22.10.2",
35
35
  "@types/react": "^19.2.0",
36
36
  "@types/react-dom": "^19.2.0",
37
- "@vitejs/plugin-react": "^5.1.4",
37
+ "@vitejs/plugin-react": "^6.0.1",
38
38
  "jsdom": "^28.1.0",
39
- "typescript": "^5.7.2",
40
- "vite": "^7.3.1",
41
- "vite-tsconfig-paths": "^5.1.4",
42
- "vitest": "^3.0.5"
39
+ "typescript": "^6.0.2",
40
+ "vite": "^8.0.0",
41
+ "vitest": "^4.1.5"
43
42
  },
44
43
  "pnpm": {
45
44
  "onlyBuiltDependencies": [
@@ -135,6 +135,6 @@
135
135
  "tanstackConfig": {
136
136
  "pagesDir": "../routes"
137
137
  },
138
- "cliVersion": "0.1.359",
139
- "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.359/dist/plasmic.schema.json"
138
+ "cliVersion": "0.1.361",
139
+ "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.361/dist/plasmic.schema.json"
140
140
  }
@@ -281,6 +281,7 @@ function PlasmicButton__RenderFunc(props: {
281
281
  className={classNames(
282
282
  "plasmic_default__all",
283
283
  "plasmic_default__button",
284
+ "plasmic_default__button__47tFX",
284
285
  "root_reset_47tFXWjN2C4NyHFGGpaYQ3",
285
286
  "plasmic_default_styles",
286
287
  "plasmic_mixins",
@@ -425,7 +426,6 @@ function PlasmicButton__RenderFunc(props: {
425
426
  data-plasmic-override={overrides.startIconContainer}
426
427
  className={classNames(
427
428
  "plasmic_default__all",
428
- "plasmic_default__div",
429
429
  "Button__startIconContainer__men7Z",
430
430
  {
431
431
  Button__startIconContainercolor_blue__men7Z7OS1A: hasVariant(
@@ -449,7 +449,6 @@ function PlasmicButton__RenderFunc(props: {
449
449
  <CheckSvgIcon
450
450
  className={classNames(
451
451
  "plasmic_default__all",
452
- "plasmic_default__svg",
453
452
  "Button__svg__s6Xxe"
454
453
  )}
455
454
  role={"img"}
@@ -519,7 +518,6 @@ function PlasmicButton__RenderFunc(props: {
519
518
  data-plasmic-override={overrides.contentContainer}
520
519
  className={classNames(
521
520
  "plasmic_default__all",
522
- "plasmic_default__div",
523
521
  "Button__contentContainer__sXXwU",
524
522
  {
525
523
  Button__contentContainer___focusVisibleWithin__sXXwUcjR25:
@@ -650,7 +648,6 @@ function PlasmicButton__RenderFunc(props: {
650
648
  data-plasmic-override={overrides.endIconContainer}
651
649
  className={classNames(
652
650
  "plasmic_default__all",
653
- "plasmic_default__div",
654
651
  "Button__endIconContainer___3CzAx",
655
652
  {
656
653
  Button__endIconContainercolor_white___3CzAx5R3VM: hasVariant(
@@ -676,7 +673,6 @@ function PlasmicButton__RenderFunc(props: {
676
673
  <IconIcon
677
674
  className={classNames(
678
675
  "plasmic_default__all",
679
- "plasmic_default__svg",
680
676
  "Button__svg__liJa"
681
677
  )}
682
678
  role={"img"}
@@ -175,7 +175,6 @@ function PlasmicDynamicPage__RenderFunc(props: {
175
175
  data-plasmic-for-node={forNode}
176
176
  className={classNames(
177
177
  "plasmic_default__all",
178
- "plasmic_default__div",
179
178
  "root_reset_47tFXWjN2C4NyHFGGpaYQ3",
180
179
  "plasmic_default_styles",
181
180
  "plasmic_mixins",
@@ -188,7 +187,6 @@ function PlasmicDynamicPage__RenderFunc(props: {
188
187
  data-plasmic-override={overrides.section}
189
188
  className={classNames(
190
189
  "plasmic_default__all",
191
- "plasmic_default__section",
192
190
  "DynamicPage__section__mbqxB"
193
191
  )}
194
192
  >
@@ -198,6 +196,7 @@ function PlasmicDynamicPage__RenderFunc(props: {
198
196
  className={classNames(
199
197
  "plasmic_default__all",
200
198
  "plasmic_default__h1",
199
+ "plasmic_default__h1__47tFX",
201
200
  "__wab_text",
202
201
  "DynamicPage__h1__uyAe1"
203
202
  )}
@@ -179,7 +179,6 @@ function PlasmicHomepage__RenderFunc(props: {
179
179
  data-plasmic-for-node={forNode}
180
180
  className={classNames(
181
181
  "plasmic_default__all",
182
- "plasmic_default__div",
183
182
  "root_reset_47tFXWjN2C4NyHFGGpaYQ3",
184
183
  "plasmic_default_styles",
185
184
  "plasmic_mixins",
@@ -192,7 +191,6 @@ function PlasmicHomepage__RenderFunc(props: {
192
191
  data-plasmic-override={overrides.section}
193
192
  className={classNames(
194
193
  "plasmic_default__all",
195
- "plasmic_default__section",
196
194
  "Homepage__section__pXQ"
197
195
  )}
198
196
  >
@@ -202,6 +200,7 @@ function PlasmicHomepage__RenderFunc(props: {
202
200
  className={classNames(
203
201
  "plasmic_default__all",
204
202
  "plasmic_default__h1",
203
+ "plasmic_default__h1__47tFX",
205
204
  "__wab_text",
206
205
  "Homepage__h1__equfk"
207
206
  )}
@@ -213,7 +212,6 @@ function PlasmicHomepage__RenderFunc(props: {
213
212
  data-plasmic-override={overrides.text}
214
213
  className={classNames(
215
214
  "plasmic_default__all",
216
- "plasmic_default__div",
217
215
  "__wab_text",
218
216
  "Homepage__text__aC4Gm"
219
217
  )}
@@ -226,7 +224,9 @@ function PlasmicHomepage__RenderFunc(props: {
226
224
  }
227
225
  </React.Fragment>
228
226
  <span
229
- className={"plasmic_default__all plasmic_default__span"}
227
+ className={
228
+ "plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
229
+ }
230
230
  style={{ fontWeight: 700 }}
231
231
  >
232
232
  {"Therefore, please avoid changing this project."}
@@ -240,7 +240,9 @@ function PlasmicHomepage__RenderFunc(props: {
240
240
  }
241
241
  </React.Fragment>
242
242
  <span
243
- className={"plasmic_default__all plasmic_default__span"}
243
+ className={
244
+ "plasmic_default__all plasmic_default__span plasmic_default__span__47tFX"
245
+ }
244
246
  style={{ fontWeight: 700 }}
245
247
  >
246
248
  {"Code"}
@@ -9,6 +9,8 @@ import { createUseStyleTokens } from "@plasmicapp/react-web";
9
9
 
10
10
  import { _useGlobalVariants } from "./plasmic"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectModule
11
11
 
12
+ import "./plasmic.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
13
+
12
14
  const data = {
13
15
  base: `${"plasmic_tokens_47tFXWjN2C4NyHFGGpaYQ3"}`,
14
16
  varianted: []
@@ -4,7 +4,6 @@ import { routeTree } from './routeTree.gen'
4
4
  export function getRouter() {
5
5
  const router = createTanStackRouter({
6
6
  routeTree,
7
-
8
7
  scrollRestoration: true,
9
8
  defaultPreload: 'intent',
10
9
  defaultPreloadStaleTime: 0,
@@ -4,7 +4,6 @@
4
4
  "target": "ES2022",
5
5
  "jsx": "react-jsx",
6
6
  "module": "ESNext",
7
- "baseUrl": ".",
8
7
  "paths": {
9
8
  "#/*": ["./src/*"],
10
9
  "@/*": ["./src/*"]
@@ -1,6 +1,5 @@
1
1
  import { defineConfig } from 'vite'
2
2
  import { devtools } from '@tanstack/devtools-vite'
3
- import tsconfigPaths from 'vite-tsconfig-paths'
4
3
 
5
4
  import { tanstackRouter } from '@tanstack/router-plugin/vite'
6
5
 
@@ -17,9 +16,9 @@ const config = defineConfig({
17
16
  "@plasmicapp/react-web",
18
17
  ],
19
18
  },
19
+ resolve: { tsconfigPaths: true },
20
20
  plugins: [
21
21
  devtools(),
22
- tsconfigPaths({ projects: ['./tsconfig.json'] }),
23
22
  tailwindcss(),
24
23
  tanstackRouter({ target: 'react', autoCodeSplitting: true }),
25
24
  viteReact(),
@@ -107,6 +107,8 @@ function generateFilesAppDir(args) {
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));
108
108
  }
109
109
  else {
110
+ // Replace starter layout. Removes app/layout.js in JS projects before writing layout.jsx.
111
+ (0, file_utils_1.deleteGlob)(path_1.default.join(projectPath, "app", "layout.*"));
110
112
  // ./app/layout.tsx
111
113
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", `layout.${jsOrTs}x`), (0, layout_1.makeLayout_app_codegen)(jsOrTs));
112
114
  // ./plasmic-init-client.tsx
@@ -5,8 +5,7 @@ const file_utils_1 = require("../../../utils/file-utils");
5
5
  function makePlasmicInitClient_app_codegen(jsOrTs) {
6
6
  return `"use client";
7
7
 
8
- import * as React from "react";
9
- import { PlasmicRootProvider } from "@plasmicapp/react-web";
8
+ ${(0, file_utils_1.ifTs)(jsOrTs, 'import type * as React from "react";\n')}import { PlasmicRootProvider } from "@plasmicapp/react-web";
10
9
  import Link from "next/link";
11
10
 
12
11
  /**
@@ -38,7 +38,17 @@ exports.tanstackStrategy = {
38
38
  const projectName = path_1.default.basename(fullProjectPath);
39
39
  const parentDir = path_1.default.dirname(fullProjectPath);
40
40
  process.chdir(parentDir);
41
- const createCommand = `npx create-tsrouter-app@latest ${projectName} --template file-router --add-ons start`;
41
+ const createCommand = [
42
+ `npx create-tsrouter-app@latest ${projectName}`,
43
+ "--framework React",
44
+ "--router-only",
45
+ "--no-toolchain",
46
+ "--package-manager yarn",
47
+ "--git",
48
+ "--no-intent",
49
+ "--no-examples",
50
+ "--yes",
51
+ ].join(" ");
42
52
  yield (0, cmd_utils_1.spawnOrFail)(createCommand);
43
53
  // Install peer-dep of @tanstack/react-router-with-query
44
54
  yield (0, npm_utils_1.installUpgrade)("@tanstack/react-query", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-plasmic-app",
3
- "version": "0.0.143",
3
+ "version": "0.0.144",
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": "5f674c9df3345496989eb0d1e09ddd30604757a9"
50
+ "gitHead": "94026327bd519c5a334ca974ef9d6d3d12855f25"
51
51
  }
@@ -118,6 +118,9 @@ async function generateFilesAppDir(args: GenerateFilesArgs) {
118
118
  makeCatchallPage_app_loader(jsOrTs)
119
119
  );
120
120
  } else {
121
+ // Replace starter layout. Removes app/layout.js in JS projects before writing layout.jsx.
122
+ deleteGlob(path.join(projectPath, "app", "layout.*"));
123
+
121
124
  // ./app/layout.tsx
122
125
  await fs.writeFile(
123
126
  path.join(projectPath, "app", `layout.${jsOrTs}x`),
@@ -4,8 +4,10 @@ import { JsOrTs } from "../../../utils/types";
4
4
  export function makePlasmicInitClient_app_codegen(jsOrTs: JsOrTs): string {
5
5
  return `"use client";
6
6
 
7
- import * as React from "react";
8
- import { PlasmicRootProvider } from "@plasmicapp/react-web";
7
+ ${ifTs(
8
+ jsOrTs,
9
+ 'import type * as React from "react";\n'
10
+ )}import { PlasmicRootProvider } from "@plasmicapp/react-web";
9
11
  import Link from "next/link";
10
12
 
11
13
  /**
@@ -29,7 +29,17 @@ export const tanstackStrategy: CPAStrategy = {
29
29
  const parentDir = path.dirname(fullProjectPath);
30
30
  process.chdir(parentDir);
31
31
 
32
- const createCommand = `npx create-tsrouter-app@latest ${projectName} --template file-router --add-ons start`;
32
+ const createCommand = [
33
+ `npx create-tsrouter-app@latest ${projectName}`,
34
+ "--framework React",
35
+ "--router-only",
36
+ "--no-toolchain",
37
+ "--package-manager yarn",
38
+ "--git",
39
+ "--no-intent",
40
+ "--no-examples",
41
+ "--yes",
42
+ ].join(" ");
33
43
 
34
44
  await spawnOrFail(createCommand);
35
45
 
@@ -1,28 +0,0 @@
1
- import localFont from "next/font/local";
2
- import "./globals.css";
3
-
4
- const geistSans = localFont({
5
- src: "./fonts/GeistVF.woff",
6
- variable: "--font-geist-sans",
7
- weight: "100 900",
8
- });
9
- const geistMono = localFont({
10
- src: "./fonts/GeistMonoVF.woff",
11
- variable: "--font-geist-mono",
12
- weight: "100 900",
13
- });
14
-
15
- export const metadata = {
16
- title: "Create Next App",
17
- description: "Generated by create next app",
18
- };
19
-
20
- export default function RootLayout({ children }) {
21
- return (
22
- <html lang="en">
23
- <body className={`${geistSans.variable} ${geistMono.variable}`}>
24
- {children}
25
- </body>
26
- </html>
27
- );
28
- }
@@ -1,44 +0,0 @@
1
- export default function Footer() {
2
- const year = new Date().getFullYear()
3
-
4
- return (
5
- <footer className="mt-20 border-t border-[var(--line)] px-4 pb-14 pt-10 text-[var(--sea-ink-soft)]">
6
- <div className="page-wrap flex flex-col items-center justify-between gap-4 text-center sm:flex-row sm:text-left">
7
- <p className="m-0 text-sm">
8
- &copy; {year} Your name here. All rights reserved.
9
- </p>
10
- <p className="island-kicker m-0">Built with TanStack Start</p>
11
- </div>
12
- <div className="mt-4 flex justify-center gap-4">
13
- <a
14
- href="https://x.com/tan_stack"
15
- target="_blank"
16
- rel="noreferrer"
17
- className="rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)]"
18
- >
19
- <span className="sr-only">Follow TanStack on X</span>
20
- <svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32">
21
- <path
22
- fill="currentColor"
23
- d="M12.6 1h2.2L10 6.48 15.64 15h-4.41L7.78 9.82 3.23 15H1l5.14-5.84L.72 1h4.52l3.12 4.73L12.6 1zm-.77 12.67h1.22L4.57 2.26H3.26l8.57 11.41z"
24
- />
25
- </svg>
26
- </a>
27
- <a
28
- href="https://github.com/TanStack"
29
- target="_blank"
30
- rel="noreferrer"
31
- className="rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)]"
32
- >
33
- <span className="sr-only">Go to TanStack GitHub</span>
34
- <svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32">
35
- <path
36
- fill="currentColor"
37
- d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
38
- />
39
- </svg>
40
- </a>
41
- </div>
42
- </footer>
43
- )
44
- }
@@ -1,78 +0,0 @@
1
- import { Link } from '@tanstack/react-router'
2
- import ThemeToggle from './ThemeToggle'
3
-
4
- export default function Header() {
5
- return (
6
- <header className="sticky top-0 z-50 border-b border-[var(--line)] bg-[var(--header-bg)] px-4 backdrop-blur-lg">
7
- <nav className="page-wrap flex flex-wrap items-center gap-x-3 gap-y-2 py-3 sm:py-4">
8
- <h2 className="m-0 flex-shrink-0 text-base font-semibold tracking-tight">
9
- <Link
10
- to="/"
11
- className="inline-flex items-center gap-2 rounded-full border border-[var(--chip-line)] bg-[var(--chip-bg)] px-3 py-1.5 text-sm text-[var(--sea-ink)] no-underline shadow-[0_8px_24px_rgba(30,90,72,0.08)] sm:px-4 sm:py-2"
12
- >
13
- <span className="h-2 w-2 rounded-full bg-[linear-gradient(90deg,#56c6be,#7ed3bf)]" />
14
- TanStack Start
15
- </Link>
16
- </h2>
17
-
18
- <div className="ml-auto flex items-center gap-1.5 sm:ml-0 sm:gap-2">
19
- <a
20
- href="https://x.com/tan_stack"
21
- target="_blank"
22
- rel="noreferrer"
23
- className="hidden rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)] sm:block"
24
- >
25
- <span className="sr-only">Follow TanStack on X</span>
26
- <svg viewBox="0 0 16 16" aria-hidden="true" width="24" height="24">
27
- <path
28
- fill="currentColor"
29
- d="M12.6 1h2.2L10 6.48 15.64 15h-4.41L7.78 9.82 3.23 15H1l5.14-5.84L.72 1h4.52l3.12 4.73L12.6 1zm-.77 12.67h1.22L4.57 2.26H3.26l8.57 11.41z"
30
- />
31
- </svg>
32
- </a>
33
- <a
34
- href="https://github.com/TanStack"
35
- target="_blank"
36
- rel="noreferrer"
37
- className="hidden rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)] sm:block"
38
- >
39
- <span className="sr-only">Go to TanStack GitHub</span>
40
- <svg viewBox="0 0 16 16" aria-hidden="true" width="24" height="24">
41
- <path
42
- fill="currentColor"
43
- d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
44
- />
45
- </svg>
46
- </a>
47
-
48
- <ThemeToggle />
49
- </div>
50
-
51
- <div className="order-3 flex w-full flex-wrap items-center gap-x-4 gap-y-1 pb-1 text-sm font-semibold sm:order-2 sm:w-auto sm:flex-nowrap sm:pb-0">
52
- <Link
53
- to="/"
54
- className="nav-link"
55
- activeProps={{ className: 'nav-link is-active' }}
56
- >
57
- Home
58
- </Link>
59
- <Link
60
- to="/about"
61
- className="nav-link"
62
- activeProps={{ className: 'nav-link is-active' }}
63
- >
64
- About
65
- </Link>
66
- <a
67
- href="https://tanstack.com/start/latest/docs/framework/react/overview"
68
- className="nav-link"
69
- target="_blank"
70
- rel="noreferrer"
71
- >
72
- Docs
73
- </a>
74
- </div>
75
- </nav>
76
- </header>
77
- )
78
- }