create-plasmic-app 0.0.151 → 0.0.153

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 (153) hide show
  1. package/cpa-out/.gitignore +4 -2
  2. package/cpa-out/gatsby-codegen-js/package.json +2 -2
  3. package/cpa-out/gatsby-codegen-js/plasmic.json +2 -2
  4. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  5. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +61 -26
  6. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  7. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +6 -39
  8. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  9. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  10. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  11. package/cpa-out/gatsby-codegen-js/src/components/plasmic/plasmic__default_style.module.css +363 -0
  12. package/cpa-out/gatsby-codegen-ts/package.json +2 -2
  13. package/cpa-out/gatsby-codegen-ts/plasmic.json +2 -2
  14. package/cpa-out/gatsby-codegen-ts/src/components/RandomDynamicPageButton.tsx +1 -2
  15. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  16. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  17. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +74 -28
  18. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  19. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +6 -40
  20. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  21. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  22. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/plasmic__default_style.module.css +363 -0
  23. package/cpa-out/gatsby-loader-js/package.json +1 -1
  24. package/cpa-out/gatsby-loader-js/src/templates/defaultPlasmicPage.jsx +1 -0
  25. package/cpa-out/gatsby-loader-ts/package.json +1 -1
  26. package/cpa-out/gatsby-loader-ts/src/templates/defaultPlasmicPage.tsx +1 -0
  27. package/cpa-out/nextjs-app-codegen-js/app/dynamic/[slug]/page.jsx +13 -3
  28. package/cpa-out/nextjs-app-codegen-js/app/globals.css +10 -0
  29. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  30. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +62 -27
  31. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  32. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.jsx +103 -2
  33. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +6 -39
  34. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  35. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  36. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  37. package/cpa-out/nextjs-app-codegen-js/components/plasmic/plasmic__default_style.module.css +363 -0
  38. package/cpa-out/nextjs-app-codegen-js/eslint.config.mjs +16 -0
  39. package/cpa-out/nextjs-app-codegen-js/jsconfig.json +7 -0
  40. package/cpa-out/nextjs-app-codegen-js/package.json +4 -4
  41. package/cpa-out/nextjs-app-codegen-js/plasmic.json +2 -2
  42. package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page.tsx +13 -3
  43. package/cpa-out/nextjs-app-codegen-ts/app/globals.css +10 -0
  44. package/cpa-out/nextjs-app-codegen-ts/components/RandomDynamicPageButton.tsx +1 -2
  45. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  46. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  47. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +69 -29
  48. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.tsx +110 -2
  49. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  50. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +6 -40
  51. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  52. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  53. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/plasmic__default_style.module.css +363 -0
  54. package/cpa-out/nextjs-app-codegen-ts/eslint.config.mjs +18 -0
  55. package/cpa-out/nextjs-app-codegen-ts/package.json +4 -4
  56. package/cpa-out/nextjs-app-codegen-ts/plasmic.json +2 -2
  57. package/cpa-out/nextjs-app-loader-js/app/[[...catchall]]/page.jsx +1 -0
  58. package/cpa-out/nextjs-app-loader-js/app/globals.css +10 -0
  59. package/cpa-out/nextjs-app-loader-js/eslint.config.mjs +16 -0
  60. package/cpa-out/nextjs-app-loader-js/jsconfig.json +7 -0
  61. package/cpa-out/nextjs-app-loader-js/package.json +3 -3
  62. package/cpa-out/nextjs-app-loader-ts/app/[[...catchall]]/page.tsx +1 -0
  63. package/cpa-out/nextjs-app-loader-ts/app/globals.css +10 -0
  64. package/cpa-out/nextjs-app-loader-ts/eslint.config.mjs +18 -0
  65. package/cpa-out/nextjs-app-loader-ts/package.json +3 -3
  66. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  67. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +62 -27
  68. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  69. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +6 -39
  70. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  71. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  72. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  73. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/plasmic__default_style.module.css +363 -0
  74. package/cpa-out/nextjs-pages-codegen-js/eslint.config.mjs +16 -0
  75. package/cpa-out/nextjs-pages-codegen-js/jsconfig.json +7 -0
  76. package/cpa-out/nextjs-pages-codegen-js/package.json +4 -4
  77. package/cpa-out/nextjs-pages-codegen-js/pages/dynamic/[slug].jsx +24 -2
  78. package/cpa-out/nextjs-pages-codegen-js/plasmic.json +2 -2
  79. package/cpa-out/nextjs-pages-codegen-js/styles/Home.module.css +141 -0
  80. package/cpa-out/nextjs-pages-codegen-js/styles/globals.css +10 -0
  81. package/cpa-out/nextjs-pages-codegen-ts/components/RandomDynamicPageButton.tsx +1 -2
  82. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  83. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  84. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +75 -29
  85. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  86. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +6 -40
  87. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  88. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  89. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/plasmic__default_style.module.css +363 -0
  90. package/cpa-out/nextjs-pages-codegen-ts/eslint.config.mjs +18 -0
  91. package/cpa-out/nextjs-pages-codegen-ts/package.json +4 -4
  92. package/cpa-out/nextjs-pages-codegen-ts/pages/dynamic/[slug].tsx +25 -2
  93. package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +2 -2
  94. package/cpa-out/nextjs-pages-codegen-ts/styles/Home.module.css +141 -0
  95. package/cpa-out/nextjs-pages-codegen-ts/styles/globals.css +10 -0
  96. package/cpa-out/nextjs-pages-loader-js/eslint.config.mjs +16 -0
  97. package/cpa-out/nextjs-pages-loader-js/jsconfig.json +7 -0
  98. package/cpa-out/nextjs-pages-loader-js/package.json +3 -3
  99. package/cpa-out/nextjs-pages-loader-js/pages/[[...catchall]].jsx +1 -0
  100. package/cpa-out/nextjs-pages-loader-js/styles/Home.module.css +141 -0
  101. package/cpa-out/nextjs-pages-loader-js/styles/globals.css +10 -0
  102. package/cpa-out/nextjs-pages-loader-ts/eslint.config.mjs +18 -0
  103. package/cpa-out/nextjs-pages-loader-ts/package.json +3 -3
  104. package/cpa-out/nextjs-pages-loader-ts/pages/[[...catchall]].tsx +1 -0
  105. package/cpa-out/nextjs-pages-loader-ts/styles/Home.module.css +141 -0
  106. package/cpa-out/nextjs-pages-loader-ts/styles/globals.css +10 -0
  107. package/cpa-out/react-codegen-js/package.json +2 -2
  108. package/cpa-out/react-codegen-js/plasmic.json +2 -2
  109. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  110. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +61 -26
  111. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  112. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +6 -39
  113. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  114. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  115. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  116. package/cpa-out/react-codegen-js/src/components/plasmic/plasmic__default_style.module.css +363 -0
  117. package/cpa-out/react-codegen-js/src/index.css +68 -0
  118. package/cpa-out/react-codegen-ts/package.json +2 -2
  119. package/cpa-out/react-codegen-ts/plasmic.json +2 -2
  120. package/cpa-out/react-codegen-ts/src/components/RandomDynamicPageButton.tsx +1 -2
  121. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.module.css +468 -0
  122. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.module.css +44 -0
  123. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +74 -28
  124. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.module.css +43 -0
  125. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +6 -40
  126. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css +16 -0
  127. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/plasmic.module.css +702 -0
  128. package/cpa-out/react-codegen-ts/src/components/plasmic/plasmic__default_style.module.css +363 -0
  129. package/cpa-out/react-codegen-ts/src/index.css +68 -0
  130. package/cpa-out/tanstack-codegen-ts/package.json +3 -3
  131. package/cpa-out/tanstack-codegen-ts/plasmic.json +2 -2
  132. package/cpa-out/tanstack-codegen-ts/src/components/RandomDynamicPageButton.tsx +1 -2
  133. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.css +495 -0
  134. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.css +44 -0
  135. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +74 -28
  136. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.css +43 -0
  137. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +6 -40
  138. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.css +16 -0
  139. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/plasmic.css +354 -0
  140. package/cpa-out/tanstack-codegen-ts/src/components/plasmic/plasmic__default_style.css +363 -0
  141. package/cpa-out/tanstack-codegen-ts/src/routes/dynamic/$slug/index.tsx +31 -8
  142. package/cpa-out/tanstack-codegen-ts/src/styles.css +17 -0
  143. package/dist/nextjs/nextjs.js +80 -8
  144. package/dist/nextjs/templates/app-codegen/layout.d.ts +2 -2
  145. package/dist/nextjs/templates/app-codegen/layout.js +8 -2
  146. package/dist/nextjs/templates/pages-codegen/app.d.ts +2 -2
  147. package/dist/nextjs/templates/pages-codegen/app.js +8 -2
  148. package/dist/utils/types.d.ts +4 -0
  149. package/package.json +3 -3
  150. package/src/nextjs/nextjs.ts +110 -18
  151. package/src/nextjs/templates/app-codegen/layout.ts +16 -3
  152. package/src/nextjs/templates/pages-codegen/app.ts +16 -3
  153. package/src/utils/types.ts +5 -0
@@ -0,0 +1,363 @@
1
+ :where(.plasmic_default__all) {
2
+ display: block;
3
+ white-space: inherit;
4
+ grid-row: auto;
5
+ grid-column: auto;
6
+ position: relative;
7
+ background: none;
8
+ background-size: 100% 100%;
9
+ background-repeat: no-repeat;
10
+ row-gap: 0px;
11
+ column-gap: 0px;
12
+ box-shadow: none;
13
+ box-sizing: border-box;
14
+ text-decoration-line: none;
15
+ margin: 0;
16
+ border-width: 0px;
17
+ }
18
+ :where(.__wab_expr_html_text *) {
19
+ white-space: inherit;
20
+ grid-row: auto;
21
+ grid-column: auto;
22
+ background: none;
23
+ background-size: 100% 100%;
24
+ background-repeat: no-repeat;
25
+ row-gap: 0px;
26
+ column-gap: 0px;
27
+ box-shadow: none;
28
+ box-sizing: border-box;
29
+ margin: 0;
30
+ border-width: 0px;
31
+ }
32
+
33
+ :where(.plasmic_default__img) {
34
+ display: inline-block;
35
+ }
36
+ :where(.__wab_expr_html_text img) {
37
+ white-space: inherit;
38
+ }
39
+
40
+ :where(.plasmic_default__li) {
41
+ display: list-item;
42
+ }
43
+ :where(.__wab_expr_html_text li) {
44
+ white-space: inherit;
45
+ }
46
+
47
+ :where(.plasmic_default__span) {
48
+ display: inline;
49
+ position: static;
50
+ font-family: inherit;
51
+ line-height: inherit;
52
+ font-size: inherit;
53
+ font-style: inherit;
54
+ font-weight: inherit;
55
+ color: inherit;
56
+ text-transform: inherit;
57
+ }
58
+ :where(.__wab_expr_html_text span) {
59
+ white-space: inherit;
60
+ font-family: inherit;
61
+ line-height: inherit;
62
+ font-size: inherit;
63
+ font-style: inherit;
64
+ font-weight: inherit;
65
+ color: inherit;
66
+ text-transform: inherit;
67
+ }
68
+
69
+ :where(.plasmic_default__input) {
70
+ font-family: inherit;
71
+ line-height: inherit;
72
+ font-size: inherit;
73
+ font-style: inherit;
74
+ font-weight: inherit;
75
+ color: inherit;
76
+ text-transform: inherit;
77
+ background-image: linear-gradient(#ffffff, #ffffff);
78
+ padding: 2px;
79
+ border: 1px solid lightgray;
80
+ }
81
+ :where(.__wab_expr_html_text input) {
82
+ white-space: inherit;
83
+ font-family: inherit;
84
+ line-height: inherit;
85
+ font-size: inherit;
86
+ font-style: inherit;
87
+ font-weight: inherit;
88
+ color: inherit;
89
+ text-transform: inherit;
90
+ background-image: linear-gradient(#ffffff, #ffffff);
91
+ padding: 2px;
92
+ border: 1px solid lightgray;
93
+ }
94
+
95
+ :where(.plasmic_default__textarea) {
96
+ font-family: inherit;
97
+ line-height: inherit;
98
+ font-size: inherit;
99
+ font-style: inherit;
100
+ font-weight: inherit;
101
+ color: inherit;
102
+ text-transform: inherit;
103
+ padding: 2px;
104
+ border: 1px solid lightgray;
105
+ }
106
+ :where(.__wab_expr_html_text textarea) {
107
+ white-space: inherit;
108
+ font-family: inherit;
109
+ line-height: inherit;
110
+ font-size: inherit;
111
+ font-style: inherit;
112
+ font-weight: inherit;
113
+ color: inherit;
114
+ text-transform: inherit;
115
+ padding: 2px;
116
+ border: 1px solid lightgray;
117
+ }
118
+
119
+ :where(.plasmic_default__button) {
120
+ font-family: inherit;
121
+ line-height: inherit;
122
+ font-size: inherit;
123
+ font-style: inherit;
124
+ font-weight: inherit;
125
+ color: inherit;
126
+ text-transform: inherit;
127
+ background-image: none;
128
+ align-items: flex-start;
129
+ text-align: center;
130
+ padding: 2px 6px;
131
+ border: 1px solid lightgray;
132
+ }
133
+ :where(.__wab_expr_html_text button) {
134
+ white-space: inherit;
135
+ font-family: inherit;
136
+ line-height: inherit;
137
+ font-size: inherit;
138
+ font-style: inherit;
139
+ font-weight: inherit;
140
+ color: inherit;
141
+ text-transform: inherit;
142
+ background-image: none;
143
+ align-items: flex-start;
144
+ text-align: center;
145
+ padding: 2px 6px;
146
+ border: 1px solid lightgray;
147
+ }
148
+
149
+ :where(.plasmic_default__code) {
150
+ font-family: inherit;
151
+ line-height: inherit;
152
+ }
153
+ :where(.__wab_expr_html_text code) {
154
+ white-space: inherit;
155
+ font-family: inherit;
156
+ line-height: inherit;
157
+ }
158
+
159
+ :where(.plasmic_default__pre) {
160
+ font-family: inherit;
161
+ line-height: inherit;
162
+ }
163
+ :where(.__wab_expr_html_text pre) {
164
+ white-space: inherit;
165
+ font-family: inherit;
166
+ line-height: inherit;
167
+ }
168
+
169
+ :where(.plasmic_default__p) {
170
+ font-family: inherit;
171
+ line-height: inherit;
172
+ font-size: inherit;
173
+ font-style: inherit;
174
+ font-weight: inherit;
175
+ color: inherit;
176
+ text-transform: inherit;
177
+ }
178
+ :where(.__wab_expr_html_text p) {
179
+ white-space: inherit;
180
+ font-family: inherit;
181
+ line-height: inherit;
182
+ font-size: inherit;
183
+ font-style: inherit;
184
+ font-weight: inherit;
185
+ color: inherit;
186
+ text-transform: inherit;
187
+ }
188
+
189
+ :where(.plasmic_default__i) {
190
+ font-family: inherit;
191
+ line-height: inherit;
192
+ font-size: inherit;
193
+ font-weight: inherit;
194
+ color: inherit;
195
+ text-transform: inherit;
196
+ }
197
+ :where(.__wab_expr_html_text i) {
198
+ white-space: inherit;
199
+ font-family: inherit;
200
+ line-height: inherit;
201
+ font-size: inherit;
202
+ font-weight: inherit;
203
+ color: inherit;
204
+ text-transform: inherit;
205
+ }
206
+
207
+ :where(.plasmic_default__em) {
208
+ font-family: inherit;
209
+ line-height: inherit;
210
+ font-size: inherit;
211
+ font-weight: inherit;
212
+ color: inherit;
213
+ text-transform: inherit;
214
+ }
215
+ :where(.__wab_expr_html_text em) {
216
+ white-space: inherit;
217
+ font-family: inherit;
218
+ line-height: inherit;
219
+ font-size: inherit;
220
+ font-weight: inherit;
221
+ color: inherit;
222
+ text-transform: inherit;
223
+ }
224
+
225
+ :where(.plasmic_default__strong) {
226
+ font-family: inherit;
227
+ line-height: inherit;
228
+ font-size: inherit;
229
+ color: inherit;
230
+ text-transform: inherit;
231
+ }
232
+ :where(.__wab_expr_html_text strong) {
233
+ white-space: inherit;
234
+ font-family: inherit;
235
+ line-height: inherit;
236
+ font-size: inherit;
237
+ color: inherit;
238
+ text-transform: inherit;
239
+ }
240
+
241
+ :where(.plasmic_default__h1) {
242
+ font-size: inherit;
243
+ font-weight: inherit;
244
+ }
245
+ :where(.__wab_expr_html_text h1) {
246
+ white-space: inherit;
247
+ font-size: inherit;
248
+ font-weight: inherit;
249
+ }
250
+
251
+ :where(.plasmic_default__h2) {
252
+ font-size: inherit;
253
+ font-weight: inherit;
254
+ }
255
+ :where(.__wab_expr_html_text h2) {
256
+ white-space: inherit;
257
+ font-size: inherit;
258
+ font-weight: inherit;
259
+ }
260
+
261
+ :where(.plasmic_default__h3) {
262
+ font-size: inherit;
263
+ font-weight: inherit;
264
+ }
265
+ :where(.__wab_expr_html_text h3) {
266
+ white-space: inherit;
267
+ font-size: inherit;
268
+ font-weight: inherit;
269
+ }
270
+
271
+ :where(.plasmic_default__h4) {
272
+ font-size: inherit;
273
+ font-weight: inherit;
274
+ }
275
+ :where(.__wab_expr_html_text h4) {
276
+ white-space: inherit;
277
+ font-size: inherit;
278
+ font-weight: inherit;
279
+ }
280
+
281
+ :where(.plasmic_default__h5) {
282
+ font-size: inherit;
283
+ font-weight: inherit;
284
+ }
285
+ :where(.__wab_expr_html_text h5) {
286
+ white-space: inherit;
287
+ font-size: inherit;
288
+ font-weight: inherit;
289
+ }
290
+
291
+ :where(.plasmic_default__h6) {
292
+ font-size: inherit;
293
+ font-weight: inherit;
294
+ }
295
+ :where(.__wab_expr_html_text h6) {
296
+ white-space: inherit;
297
+ font-size: inherit;
298
+ font-weight: inherit;
299
+ }
300
+
301
+ :where(.plasmic_default__address) {
302
+ font-style: inherit;
303
+ }
304
+ :where(.__wab_expr_html_text address) {
305
+ white-space: inherit;
306
+ font-style: inherit;
307
+ }
308
+
309
+ :where(.plasmic_default__a) {
310
+ color: inherit;
311
+ }
312
+ :where(.__wab_expr_html_text a) {
313
+ white-space: inherit;
314
+ color: inherit;
315
+ }
316
+
317
+ :where(.plasmic_default__ol) {
318
+ list-style-type: none;
319
+ padding: 0;
320
+ }
321
+ :where(.__wab_expr_html_text ol) {
322
+ white-space: inherit;
323
+ list-style-type: none;
324
+ padding: 0;
325
+ }
326
+
327
+ :where(.plasmic_default__ul) {
328
+ list-style-type: none;
329
+ padding: 0;
330
+ }
331
+ :where(.__wab_expr_html_text ul) {
332
+ white-space: inherit;
333
+ list-style-type: none;
334
+ padding: 0;
335
+ }
336
+
337
+ :where(.plasmic_default__select) {
338
+ padding: 2px 6px;
339
+ }
340
+ :where(.__wab_expr_html_text select) {
341
+ white-space: inherit;
342
+ padding: 2px 6px;
343
+ }
344
+
345
+ .plasmic_default__component_wrapper {
346
+ display: grid;
347
+ }
348
+ .plasmic_default__inline {
349
+ display: inline;
350
+ }
351
+ .plasmic_page_wrapper {
352
+ display: flex;
353
+ width: 100%;
354
+ min-height: 100vh;
355
+ align-items: stretch;
356
+ align-self: start;
357
+ }
358
+ .plasmic_page_wrapper > * {
359
+ height: auto !important;
360
+ }
361
+ .__wab_expr_html_text {
362
+ white-space: normal;
363
+ }
@@ -5,15 +5,35 @@ import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-we
5
5
 
6
6
  import {
7
7
  PlasmicDynamicPage,
8
- PlasmicDynamicPage__HeadOptions
8
+ PlasmicDynamicPage__HeadOptions,
9
+ serverQueryTree
9
10
  } from "../../../components/plasmic/create_plasmic_app/PlasmicDynamicPage";
10
11
  import { createFileRoute } from "@tanstack/react-router";
12
+ import { unstable_executePlasmicQueries } from "@plasmicapp/react-web/lib/data-sources";
13
+ import { PlasmicQueryDataProvider } from "@plasmicapp/react-web/lib/query";
11
14
 
12
15
  export const Route = createFileRoute("/dynamic/$slug/")({
13
16
  head: () => ({
14
17
  meta: [...PlasmicDynamicPage__HeadOptions.meta],
15
18
  links: [...PlasmicDynamicPage__HeadOptions.links]
16
19
  }),
20
+ loaderDeps: ({ search }) => ({ search }),
21
+ loader: async ({ params, location, deps }) => {
22
+ const $ctx = {
23
+ pageRoute: "/dynamic/[slug]",
24
+ pagePath: location.pathname,
25
+ params: (params ?? {}) as Record<string, string | string[] | undefined>,
26
+ query: (deps.search ?? {}) as Record<
27
+ string,
28
+ string | string[] | undefined
29
+ >
30
+ };
31
+ const { cache: prefetchedCache } = await unstable_executePlasmicQueries(
32
+ serverQueryTree,
33
+ { $props: {}, $ctx }
34
+ );
35
+ return { prefetchedCache: prefetchedCache as Record<string, any> };
36
+ },
17
37
  component: DynamicPage
18
38
  });
19
39
 
@@ -35,14 +55,17 @@ function DynamicPage() {
35
55
  // TanStack Router __root Route
36
56
  // (https://tanstack.com/router/latest/docs/framework/react/guide/tanstack-start#the-root-of-your-application).
37
57
 
58
+ const { prefetchedCache } = Route.useLoaderData();
38
59
  return (
39
- <PageParamsProvider__
40
- route={Route.fullPath}
41
- params={Route.useParams()}
42
- query={Route.useSearch()}
43
- >
44
- <PlasmicDynamicPage />
45
- </PageParamsProvider__>
60
+ <PlasmicQueryDataProvider prefetchedCache={prefetchedCache}>
61
+ <PageParamsProvider__
62
+ route={Route.fullPath}
63
+ params={Route.useParams()}
64
+ query={Route.useSearch()}
65
+ >
66
+ <PlasmicDynamicPage />
67
+ </PageParamsProvider__>
68
+ </PlasmicQueryDataProvider>
46
69
  );
47
70
  }
48
71
 
@@ -0,0 +1,17 @@
1
+
2
+ @import "tailwindcss";
3
+
4
+ * {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ html,
9
+ body,
10
+ #app {
11
+ min-height: 100%;
12
+ }
13
+
14
+ body {
15
+ margin: 0;
16
+ }
17
+
@@ -61,6 +61,19 @@ exports.nextjsStrategy = {
61
61
  }),
62
62
  overwriteConfig: (args) => __awaiter(void 0, void 0, void 0, function* () {
63
63
  const { projectPath, scheme, jsOrTs } = args;
64
+ // create-next-app's globals.css forces a dark background with `prefers-color-scheme: dark`.
65
+ // It's imported by the /plasmic-host layout/_app and paints the Studio canvas black.
66
+ const globalsCssCandidates = [
67
+ path_1.default.join(projectPath, "app", "globals.css"),
68
+ path_1.default.join(projectPath, "src", "app", "globals.css"),
69
+ path_1.default.join(projectPath, "styles", "globals.css"),
70
+ path_1.default.join(projectPath, "src", "styles", "globals.css"),
71
+ ];
72
+ for (const globalsCssPath of globalsCssCandidates) {
73
+ if ((0, fs_1.existsSync)(globalsCssPath)) {
74
+ yield fs_1.promises.writeFile(globalsCssPath, makeNeutralGlobalsCss());
75
+ }
76
+ }
64
77
  if (scheme === "codegen") {
65
78
  const isTs = jsOrTs === "ts";
66
79
  const typePragma = isTs
@@ -89,6 +102,23 @@ export default nextConfig;`);
89
102
  yield (0, cmd_utils_1.spawnOrFail)(`${npmRunCmd} build`, projectPath);
90
103
  }),
91
104
  };
105
+ /**
106
+ * Canvas-safe globals.css: no body background/color or dark `color-scheme`,
107
+ * since it's loaded by /plasmic-host (for Studio canvas).
108
+ */
109
+ function makeNeutralGlobalsCss() {
110
+ return `* {
111
+ box-sizing: border-box;
112
+ padding: 0;
113
+ margin: 0;
114
+ }
115
+
116
+ a {
117
+ color: inherit;
118
+ text-decoration: none;
119
+ }
120
+ `;
121
+ }
92
122
  function generateFilesAppDir(args) {
93
123
  return __awaiter(this, void 0, void 0, function* () {
94
124
  const { projectPath, scheme, jsOrTs, projectId, projectApiToken } = args;
@@ -107,10 +137,6 @@ function generateFilesAppDir(args) {
107
137
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "[[...catchall]]", `page.${jsOrTs}x`), (0, catchall_page_1.makeCatchallPage_app_loader)(jsOrTs));
108
138
  }
109
139
  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.*"));
112
- // ./app/layout.tsx
113
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", `layout.${jsOrTs}x`), (0, layout_1.makeLayout_app_codegen)(jsOrTs));
114
140
  // ./plasmic-init-client.tsx
115
141
  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
142
  // ./app/plasmic-host/page.tsx
@@ -125,8 +151,20 @@ function generateFilesAppDir(args) {
125
151
  projectApiToken,
126
152
  projectPath,
127
153
  });
128
- // Make an index (/) page if the project didn't have one.
154
+ // Read plasmic.json so we can wire each top-level project's plasmic.css
155
+ // import directly into the root layout template.
129
156
  const config = yield (0, file_utils_1.getPlasmicConfig)(projectPath, "nextjs", scheme);
157
+ const layoutAbsPath = path_1.default.join(projectPath, "app", `layout.${jsOrTs}x`);
158
+ const cssImports = getPlasmicCssImports({
159
+ projectPath,
160
+ rootFileAbsPath: layoutAbsPath,
161
+ config,
162
+ });
163
+ // Replace starter layout. Removes app/layout.js in JS projects before writing layout.jsx.
164
+ (0, file_utils_1.deleteGlob)(path_1.default.join(projectPath, "app", "layout.*"));
165
+ // ./app/layout.tsx
166
+ yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", `layout.${jsOrTs}x`), (0, layout_1.makeLayout_app_codegen)(jsOrTs, cssImports));
167
+ // Make an index (/) page if the project didn't have one.
130
168
  const plasmicFiles = lodash_1.default.map(lodash_1.default.flatMap(config.projects, (p) => p.components), (c) => c.importSpec.modulePath);
131
169
  if (!plasmicFiles.find((f) => f.includes("app/page."))) {
132
170
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", `page.${jsOrTs}x`), (0, file_utils_1.generateWelcomePage)(config, "nextjs"));
@@ -148,8 +186,6 @@ function generateFilesPagesDir(args) {
148
186
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `[[...catchall]].${jsOrTs}x`), (0, catchall_page_2.makeCatchallPage_pages_loader)(jsOrTs));
149
187
  }
150
188
  else {
151
- // ./pages/_app.tsx
152
- yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `_app.${jsOrTs}x`), (0, app_1.makeCustomApp_pages_codegen)(jsOrTs));
153
189
  // ./pages/plasmic-host.tsx
154
190
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_3.makePlasmicHostPage_pages_codegen)());
155
191
  // This should generate
@@ -161,8 +197,18 @@ function generateFilesPagesDir(args) {
161
197
  projectApiToken,
162
198
  projectPath,
163
199
  });
164
- // Make an index page if the project didn't have one.
200
+ // Read plasmic.json so we can wire each top-level project's plasmic.css
201
+ // import directly into the _app template.
165
202
  const config = yield (0, file_utils_1.getPlasmicConfig)(projectPath, "nextjs", scheme);
203
+ const appAbsPath = path_1.default.join(projectPath, "pages", `_app.${jsOrTs}x`);
204
+ const cssImports = getPlasmicCssImports({
205
+ projectPath,
206
+ rootFileAbsPath: appAbsPath,
207
+ config,
208
+ });
209
+ // ./pages/_app.tsx
210
+ yield fs_1.promises.writeFile(appAbsPath, (0, app_1.makeCustomApp_pages_codegen)(jsOrTs, cssImports));
211
+ // Make an index page if the project didn't have one.
166
212
  const plasmicFiles = lodash_1.default.map(lodash_1.default.flatMap(config.projects, (p) => p.components), (c) => c.importSpec.modulePath);
167
213
  if (!plasmicFiles.find((f) => f.includes("/index."))) {
168
214
  yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `index.${jsOrTs}x`), (0, file_utils_1.generateWelcomePage)(config, "nextjs"));
@@ -170,3 +216,29 @@ function generateFilesPagesDir(args) {
170
216
  }
171
217
  });
172
218
  }
219
+ /**
220
+ * Builds the list of `plasmic.css` imports the Next.js root file (Pages Router
221
+ * `_app.{ext}`, App Router `app/layout.{ext}`) needs for every top-level
222
+ * project in `plasmic.json`. Next.js disallows global non-module CSS imports
223
+ * outside of those files.
224
+ *
225
+ * The marker comment in the emitted import (plasmic-import: <id>/projectcss)
226
+ * matches the convention used by @plasmicapp/cli sync, so subsequent syncs
227
+ * can update paths in-place without producing duplicates.
228
+ *
229
+ * @param rootFileAbsPath Absolute path to the Next.js root file (`_app.{ext}`
230
+ * for Pages Router, `app/layout.{ext}` for App Router).
231
+ */
232
+ function getPlasmicCssImports(args) {
233
+ const { projectPath, rootFileAbsPath, config } = args;
234
+ return (config.projects || [])
235
+ .filter((p) => !p.indirect && !!p.cssFilePath)
236
+ .map((p) => {
237
+ const absoluteCssPath = path_1.default.join(projectPath, config.srcDir, p.cssFilePath);
238
+ let relPath = path_1.default.relative(path_1.default.dirname(rootFileAbsPath), absoluteCssPath);
239
+ if (!relPath.startsWith(".")) {
240
+ relPath = `./${relPath}`;
241
+ }
242
+ return { projectId: p.projectId, importPath: relPath };
243
+ });
244
+ }
@@ -1,2 +1,2 @@
1
- import { JsOrTs } from "../../../utils/types";
2
- export declare function makeLayout_app_codegen(jsOrTs: JsOrTs): string;
1
+ import { JsOrTs, PlasmicCssImport } from "../../../utils/types";
2
+ export declare function makeLayout_app_codegen(jsOrTs: JsOrTs, cssImports?: PlasmicCssImport[]): string;
@@ -2,8 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeLayout_app_codegen = void 0;
4
4
  const file_utils_1 = require("../../../utils/file-utils");
5
- function makeLayout_app_codegen(jsOrTs) {
6
- return `import '@/app/globals.css'
5
+ function makeLayout_app_codegen(jsOrTs, cssImports = []) {
6
+ const plasmicCssImportLines = cssImports
7
+ .map((i) => `import "${i.importPath}"; // plasmic-import: ${i.projectId}/projectcss`)
8
+ .join("\n");
9
+ const plasmicCssImportsBlock = plasmicCssImportLines
10
+ ? `${plasmicCssImportLines}\n`
11
+ : "";
12
+ return `${plasmicCssImportsBlock}import '@/app/globals.css'
7
13
  import { ClientPlasmicRootProvider } from "@/plasmic-init-client";
8
14
 
9
15
  export default function RootLayout({
@@ -1,2 +1,2 @@
1
- import { JsOrTs } from "../../../utils/types";
2
- export declare function makeCustomApp_pages_codegen(jsOrTs: JsOrTs): string;
1
+ import { JsOrTs, PlasmicCssImport } from "../../../utils/types";
2
+ export declare function makeCustomApp_pages_codegen(jsOrTs: JsOrTs, cssImports?: PlasmicCssImport[]): string;
@@ -2,8 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeCustomApp_pages_codegen = void 0;
4
4
  const file_utils_1 = require("../../../utils/file-utils");
5
- function makeCustomApp_pages_codegen(jsOrTs) {
6
- return `import '@/styles/globals.css'
5
+ function makeCustomApp_pages_codegen(jsOrTs, cssImports = []) {
6
+ const plasmicCssImportLines = cssImports
7
+ .map((i) => `import "${i.importPath}"; // plasmic-import: ${i.projectId}/projectcss`)
8
+ .join("\n");
9
+ const plasmicCssImportsBlock = plasmicCssImportLines
10
+ ? `${plasmicCssImportLines}\n`
11
+ : "";
12
+ return `${plasmicCssImportsBlock}import '@/styles/globals.css'
7
13
  import { PlasmicRootProvider } from "@plasmicapp/react-web";${(0, file_utils_1.ifTs)(jsOrTs, `
8
14
  import type { AppProps } from "next/app";`)}
9
15
  import Head from "next/head";
@@ -6,4 +6,8 @@ export type PlatformOptions = {
6
6
  };
7
7
  };
8
8
  export type SchemeType = "codegen" | "loader";
9
+ export type PlasmicCssImport = {
10
+ projectId: string;
11
+ importPath: string;
12
+ };
9
13
  export declare function platformTypeToString(s: PlatformType): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-plasmic-app",
3
- "version": "0.0.151",
3
+ "version": "0.0.153",
4
4
  "description": "Create Plasmic-powered React apps",
5
5
  "main": "./dist/lib.js",
6
6
  "types": "./dist/lib.d.ts",
@@ -33,7 +33,7 @@
33
33
  "tsx": "^4.21.0"
34
34
  },
35
35
  "dependencies": {
36
- "@plasmicapp/cli": "0.1.363",
36
+ "@plasmicapp/cli": "0.1.364",
37
37
  "@sentry/node": "^6.2.2",
38
38
  "chalk": "^4.1.0",
39
39
  "execa": "^5.0.0",
@@ -47,5 +47,5 @@
47
47
  "validate-npm-package-name": "^3.0.0",
48
48
  "yargs": "^16.2.0"
49
49
  },
50
- "gitHead": "f9760e92bc673fce71817beaf70d910d4137fbd0"
50
+ "gitHead": "8b7eabd6a238363ef53da368b1091fb251b43de4"
51
51
  }