create-plasmic-app 0.0.95 → 0.0.97

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 (80) hide show
  1. package/cpa-out/react-codegen-js/eslint.config.js +38 -0
  2. package/cpa-out/react-codegen-js/package.json +22 -32
  3. package/cpa-out/react-codegen-js/plasmic.json +16 -10
  4. package/cpa-out/react-codegen-js/src/App.jsx +1 -1
  5. package/cpa-out/react-codegen-js/src/components/Button.jsx +1 -3
  6. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +47 -96
  7. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +35 -29
  8. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +2 -14
  9. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +24 -24
  10. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +44 -58
  11. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +2 -2
  12. package/cpa-out/react-codegen-js/src/main.jsx +10 -0
  13. package/cpa-out/react-codegen-js/vite.config.js +7 -0
  14. package/cpa-out/react-codegen-ts/eslint.config.js +28 -0
  15. package/cpa-out/react-codegen-ts/package.json +23 -37
  16. package/cpa-out/react-codegen-ts/plasmic.json +16 -10
  17. package/cpa-out/react-codegen-ts/src/App.tsx +1 -1
  18. package/cpa-out/react-codegen-ts/src/components/Button.tsx +4 -5
  19. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +84 -62
  20. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +73 -44
  21. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +2 -14
  22. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +62 -38
  23. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +83 -70
  24. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +3 -3
  25. package/cpa-out/react-codegen-ts/src/main.tsx +10 -0
  26. package/cpa-out/react-codegen-ts/src/vite-env.d.ts +1 -0
  27. package/cpa-out/react-codegen-ts/tsconfig.json +4 -23
  28. package/cpa-out/react-codegen-ts/vite.config.ts +7 -0
  29. package/dist/gatsby/template.js +2 -1
  30. package/dist/lib.js +1 -1
  31. package/dist/nextjs/templates/pages-codegen/app.js +2 -1
  32. package/dist/react/react.js +36 -11
  33. package/package.json +2 -2
  34. package/src/gatsby/template.ts +2 -1
  35. package/src/lib.ts +1 -1
  36. package/src/nextjs/templates/pages-codegen/app.ts +2 -1
  37. package/src/react/react.ts +47 -16
  38. package/cpa-out/react-codegen-js/src/index.js +0 -17
  39. package/cpa-out/react-codegen-js/src/reportWebVitals.js +0 -13
  40. package/cpa-out/react-codegen-js/src/setupTests.js +0 -5
  41. package/cpa-out/react-codegen-ts/src/index.tsx +0 -19
  42. package/cpa-out/react-codegen-ts/src/react-app-env.d.ts +0 -1
  43. package/cpa-out/react-codegen-ts/src/reportWebVitals.ts +0 -15
  44. package/cpa-out/react-codegen-ts/src/setupTests.ts +0 -5
  45. package/cpa-out/react-loader-js/package.json +0 -40
  46. package/cpa-out/react-loader-js/plasmic.json +0 -127
  47. package/cpa-out/react-loader-js/src/App.jsx +0 -9
  48. package/cpa-out/react-loader-js/src/components/Button.jsx +0 -13
  49. package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +0 -26
  50. package/cpa-out/react-loader-js/src/components/Homepage.jsx +0 -26
  51. package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +0 -24
  52. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +0 -625
  53. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +0 -166
  54. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +0 -29
  55. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +0 -210
  56. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +0 -161
  57. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +0 -39
  58. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +0 -37
  59. package/cpa-out/react-loader-js/src/index.js +0 -17
  60. package/cpa-out/react-loader-js/src/reportWebVitals.js +0 -13
  61. package/cpa-out/react-loader-js/src/setupTests.js +0 -5
  62. package/cpa-out/react-loader-ts/package.json +0 -45
  63. package/cpa-out/react-loader-ts/plasmic.json +0 -127
  64. package/cpa-out/react-loader-ts/src/App.tsx +0 -9
  65. package/cpa-out/react-loader-ts/src/components/Button.tsx +0 -36
  66. package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +0 -45
  67. package/cpa-out/react-loader-ts/src/components/Homepage.tsx +0 -45
  68. package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +0 -44
  69. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +0 -725
  70. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +0 -248
  71. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +0 -31
  72. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +0 -294
  73. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +0 -240
  74. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +0 -44
  75. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +0 -41
  76. package/cpa-out/react-loader-ts/src/index.tsx +0 -19
  77. package/cpa-out/react-loader-ts/src/react-app-env.d.ts +0 -1
  78. package/cpa-out/react-loader-ts/src/reportWebVitals.ts +0 -15
  79. package/cpa-out/react-loader-ts/src/setupTests.ts +0 -5
  80. package/cpa-out/react-loader-ts/tsconfig.json +0 -26
@@ -1,45 +0,0 @@
1
- {
2
- "name": "react-loader-ts",
3
- "version": "0.1.0",
4
- "private": true,
5
- "dependencies": {
6
- "@plasmicapp/cli": "^0.1.231",
7
- "@plasmicapp/react-web": "^0.2.174",
8
- "@testing-library/jest-dom": "^5.14.1",
9
- "@testing-library/react": "^13.0.0",
10
- "@testing-library/user-event": "^13.2.1",
11
- "@types/jest": "^27.0.1",
12
- "@types/node": "^16.7.13",
13
- "@types/react": "^18.0.0",
14
- "@types/react-dom": "^18.0.0",
15
- "react": "^18.2.0",
16
- "react-dom": "^18.2.0",
17
- "react-scripts": "5.0.1",
18
- "typescript": "^4.4.2",
19
- "web-vitals": "^2.1.0"
20
- },
21
- "scripts": {
22
- "start": "react-scripts start",
23
- "build": "react-scripts build",
24
- "test": "react-scripts test",
25
- "eject": "react-scripts eject"
26
- },
27
- "eslintConfig": {
28
- "extends": [
29
- "react-app",
30
- "react-app/jest"
31
- ]
32
- },
33
- "browserslist": {
34
- "production": [
35
- ">0.2%",
36
- "not dead",
37
- "not op_mini all"
38
- ],
39
- "development": [
40
- "last 1 chrome version",
41
- "last 1 firefox version",
42
- "last 1 safari version"
43
- ]
44
- }
45
- }
@@ -1,127 +0,0 @@
1
- {
2
- "platform": "react",
3
- "code": {
4
- "lang": "ts",
5
- "scheme": "blackbox",
6
- "reactRuntime": "classic"
7
- },
8
- "style": {
9
- "scheme": "css-modules",
10
- "defaultStyleCssFilePath": "plasmic/plasmic__default_style.css"
11
- },
12
- "images": {
13
- "scheme": "files",
14
- "publicDir": "../../public",
15
- "publicUrlPrefix": "/static/"
16
- },
17
- "tokens": {
18
- "scheme": "theo",
19
- "tokensFilePath": "plasmic-tokens.theo.json"
20
- },
21
- "srcDir": "src/components",
22
- "defaultPlasmicDir": "./plasmic",
23
- "projects": [
24
- {
25
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
26
- "projectApiToken": "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
27
- "projectName": "create-plasmic-app",
28
- "version": "latest",
29
- "cssFilePath": "plasmic/create_plasmic_app/plasmic_create_plasmic_app.module.css",
30
- "components": [
31
- {
32
- "id": "6uuAAE1jiCew",
33
- "name": "Homepage",
34
- "type": "managed",
35
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
36
- "renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.tsx",
37
- "importSpec": {
38
- "modulePath": "Homepage.tsx"
39
- },
40
- "cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.module.css",
41
- "scheme": "blackbox",
42
- "componentType": "page"
43
- },
44
- {
45
- "id": "AO44A-w7hh",
46
- "name": "DynamicPage",
47
- "type": "managed",
48
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
49
- "renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.tsx",
50
- "importSpec": {
51
- "modulePath": "DynamicPage.tsx"
52
- },
53
- "cssFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.module.css",
54
- "scheme": "blackbox",
55
- "componentType": "page"
56
- },
57
- {
58
- "id": "TQcvW_pSKi3",
59
- "name": "Button",
60
- "type": "managed",
61
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
62
- "renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicButton.tsx",
63
- "importSpec": {
64
- "modulePath": "Button.tsx"
65
- },
66
- "cssFilePath": "plasmic/create_plasmic_app/PlasmicButton.module.css",
67
- "scheme": "blackbox",
68
- "componentType": "component",
69
- "plumeType": "button"
70
- },
71
- {
72
- "id": "Q23H1_1M_P",
73
- "name": "RandomDynamicPageButton",
74
- "type": "managed",
75
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
76
- "renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx",
77
- "importSpec": {
78
- "modulePath": "RandomDynamicPageButton.tsx"
79
- },
80
- "cssFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css",
81
- "scheme": "blackbox",
82
- "componentType": "component"
83
- }
84
- ],
85
- "icons": [
86
- {
87
- "id": "gj-_D7n31Ho",
88
- "name": "ChecksvgIcon",
89
- "moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx"
90
- },
91
- {
92
- "id": "6PNxx3YMyDQ",
93
- "name": "IconIcon",
94
- "moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx"
95
- }
96
- ],
97
- "images": [],
98
- "indirect": false,
99
- "globalContextsFilePath": "",
100
- "codeComponents": [
101
- {
102
- "id": "P6aGdYWZ2R",
103
- "name": "PlasmicHead",
104
- "componentImportPath": "@plasmicapp/react-web"
105
- },
106
- {
107
- "id": "8G2A-uTjGa",
108
- "name": "Fetcher",
109
- "componentImportPath": "@plasmicapp/react-web/lib/data-sources"
110
- }
111
- ]
112
- }
113
- ],
114
- "globalVariants": {
115
- "variantGroups": [
116
- {
117
- "id": "SCBjPXGDXDZBV",
118
- "name": "Screen",
119
- "projectId": "47tFXWjN2C4NyHFGGpaYQ3",
120
- "contextFilePath": "plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx"
121
- }
122
- ]
123
- },
124
- "wrapPagesWithGlobalContexts": true,
125
- "cliVersion": "0.1.231",
126
- "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.231/dist/plasmic.schema.json"
127
- }
@@ -1,9 +0,0 @@
1
-
2
- import Homepage from './components/Homepage';
3
-
4
- function App() {
5
- return (<Homepage />);
6
- }
7
-
8
- export default App;
9
-
@@ -1,36 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- PlasmicButton,
4
- DefaultButtonProps
5
- } from "./plasmic/create_plasmic_app/PlasmicButton";
6
- import {
7
- ButtonRef,
8
- HtmlAnchorOnlyProps,
9
- HtmlButtonOnlyProps
10
- } from "@plasmicapp/react-web";
11
-
12
- interface ButtonProps extends DefaultButtonProps {
13
- // Feel free to add any additional props that this component should receive
14
- }
15
- function Button_(props: ButtonProps, ref: ButtonRef) {
16
- const { plasmicProps } = PlasmicButton.useBehavior<ButtonProps>(props, ref);
17
- return <PlasmicButton {...plasmicProps} />;
18
- }
19
-
20
- type ButtonComponentType = {
21
- (
22
- props: Omit<ButtonProps, HtmlAnchorOnlyProps> & {
23
- ref?: React.Ref<HTMLButtonElement>;
24
- }
25
- ): React.ReactElement;
26
- (
27
- props: Omit<ButtonProps, HtmlButtonOnlyProps> & {
28
- ref?: React.Ref<HTMLAnchorElement>;
29
- }
30
- ): React.ReactElement;
31
- };
32
- const Button = React.forwardRef(Button_) as any as ButtonComponentType;
33
-
34
- export default Object.assign(Button, {
35
- __plumeType: "button"
36
- });
@@ -1,45 +0,0 @@
1
- // This is a skeleton starter React component generated by Plasmic.
2
- // This file is owned by you, feel free to edit as you see fit.
3
- import * as React from "react";
4
- import {
5
- PlasmicDynamicPage,
6
- DefaultDynamicPageProps
7
- } from "./plasmic/create_plasmic_app/PlasmicDynamicPage";
8
- import { HTMLElementRefOf } from "@plasmicapp/react-web";
9
-
10
- // Your component props start with props for variants and slots you defined
11
- // in Plasmic, but you can add more here, like event handlers that you can
12
- // attach to named nodes in your component.
13
- //
14
- // If you don't want to expose certain variants or slots as a prop, you can use
15
- // Omit to hide them:
16
- //
17
- // interface DynamicPageProps extends Omit<DefaultDynamicPageProps, "hideProps1"|"hideProp2"> {
18
- // // etc.
19
- // }
20
- //
21
- // You can also stop extending from DefaultDynamicPageProps altogether and have
22
- // total control over the props for your component.
23
- export interface DynamicPageProps extends DefaultDynamicPageProps {}
24
-
25
- function DynamicPage_(props: DynamicPageProps, ref: HTMLElementRefOf<"div">) {
26
- // Use PlasmicDynamicPage to render this component as it was
27
- // designed in Plasmic, by activating the appropriate variants,
28
- // attaching the appropriate event handlers, etc. You
29
- // can also install whatever React hooks you need here to manage state or
30
- // fetch data.
31
- //
32
- // Props you can pass into PlasmicDynamicPage are:
33
- // 1. Variants you want to activate,
34
- // 2. Contents for slots you want to fill,
35
- // 3. Overrides for any named node in the component to attach behavior and data,
36
- // 4. Props to set on the root node.
37
- //
38
- // By default, we are just piping all DynamicPageProps here, but feel free
39
- // to do whatever works for you.
40
-
41
- return <PlasmicDynamicPage root={{ ref }} {...props} />;
42
- }
43
-
44
- const DynamicPage = React.forwardRef(DynamicPage_);
45
- export default DynamicPage;
@@ -1,45 +0,0 @@
1
- // This is a skeleton starter React component generated by Plasmic.
2
- // This file is owned by you, feel free to edit as you see fit.
3
- import * as React from "react";
4
- import {
5
- PlasmicHomepage,
6
- DefaultHomepageProps
7
- } from "./plasmic/create_plasmic_app/PlasmicHomepage";
8
- import { HTMLElementRefOf } from "@plasmicapp/react-web";
9
-
10
- // Your component props start with props for variants and slots you defined
11
- // in Plasmic, but you can add more here, like event handlers that you can
12
- // attach to named nodes in your component.
13
- //
14
- // If you don't want to expose certain variants or slots as a prop, you can use
15
- // Omit to hide them:
16
- //
17
- // interface HomepageProps extends Omit<DefaultHomepageProps, "hideProps1"|"hideProp2"> {
18
- // // etc.
19
- // }
20
- //
21
- // You can also stop extending from DefaultHomepageProps altogether and have
22
- // total control over the props for your component.
23
- export interface HomepageProps extends DefaultHomepageProps {}
24
-
25
- function Homepage_(props: HomepageProps, ref: HTMLElementRefOf<"div">) {
26
- // Use PlasmicHomepage to render this component as it was
27
- // designed in Plasmic, by activating the appropriate variants,
28
- // attaching the appropriate event handlers, etc. You
29
- // can also install whatever React hooks you need here to manage state or
30
- // fetch data.
31
- //
32
- // Props you can pass into PlasmicHomepage are:
33
- // 1. Variants you want to activate,
34
- // 2. Contents for slots you want to fill,
35
- // 3. Overrides for any named node in the component to attach behavior and data,
36
- // 4. Props to set on the root node.
37
- //
38
- // By default, we are just piping all HomepageProps here, but feel free
39
- // to do whatever works for you.
40
-
41
- return <PlasmicHomepage root={{ ref }} {...props} />;
42
- }
43
-
44
- const Homepage = React.forwardRef(Homepage_);
45
- export default Homepage;
@@ -1,44 +0,0 @@
1
- // This is a skeleton starter React component generated by Plasmic.
2
- // This file is owned by you, feel free to edit as you see fit.
3
- import * as React from "react";
4
- import {
5
- PlasmicRandomDynamicPageButton,
6
- DefaultRandomDynamicPageButtonProps
7
- } from "./plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton";
8
-
9
- // Your component props start with props for variants and slots you defined
10
- // in Plasmic, but you can add more here, like event handlers that you can
11
- // attach to named nodes in your component.
12
- //
13
- // If you don't want to expose certain variants or slots as a prop, you can use
14
- // Omit to hide them:
15
- //
16
- // interface RandomDynamicPageButtonProps extends Omit<DefaultRandomDynamicPageButtonProps, "hideProps1"|"hideProp2"> {
17
- // // etc.
18
- // }
19
- //
20
- // You can also stop extending from DefaultRandomDynamicPageButtonProps altogether and have
21
- // total control over the props for your component.
22
- export interface RandomDynamicPageButtonProps
23
- extends DefaultRandomDynamicPageButtonProps {}
24
-
25
- function RandomDynamicPageButton(props: RandomDynamicPageButtonProps) {
26
- // Use PlasmicRandomDynamicPageButton to render this component as it was
27
- // designed in Plasmic, by activating the appropriate variants,
28
- // attaching the appropriate event handlers, etc. You
29
- // can also install whatever React hooks you need here to manage state or
30
- // fetch data.
31
- //
32
- // Props you can pass into PlasmicRandomDynamicPageButton are:
33
- // 1. Variants you want to activate,
34
- // 2. Contents for slots you want to fill,
35
- // 3. Overrides for any named node in the component to attach behavior and data,
36
- // 4. Props to set on the root node.
37
- //
38
- // By default, we are just piping all RandomDynamicPageButtonProps here, but feel free
39
- // to do whatever works for you.
40
-
41
- return <PlasmicRandomDynamicPageButton {...props} />;
42
- }
43
-
44
- export default RandomDynamicPageButton;