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.
- package/cpa-out/react-codegen-js/eslint.config.js +38 -0
- package/cpa-out/react-codegen-js/package.json +22 -32
- package/cpa-out/react-codegen-js/plasmic.json +16 -10
- package/cpa-out/react-codegen-js/src/App.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/Button.jsx +1 -3
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +47 -96
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +35 -29
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +2 -14
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +24 -24
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +44 -58
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +2 -2
- package/cpa-out/react-codegen-js/src/main.jsx +10 -0
- package/cpa-out/react-codegen-js/vite.config.js +7 -0
- package/cpa-out/react-codegen-ts/eslint.config.js +28 -0
- package/cpa-out/react-codegen-ts/package.json +23 -37
- package/cpa-out/react-codegen-ts/plasmic.json +16 -10
- package/cpa-out/react-codegen-ts/src/App.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/Button.tsx +4 -5
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +84 -62
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +73 -44
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +2 -14
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +62 -38
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +83 -70
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +3 -3
- package/cpa-out/react-codegen-ts/src/main.tsx +10 -0
- package/cpa-out/react-codegen-ts/src/vite-env.d.ts +1 -0
- package/cpa-out/react-codegen-ts/tsconfig.json +4 -23
- package/cpa-out/react-codegen-ts/vite.config.ts +7 -0
- package/dist/gatsby/template.js +2 -1
- package/dist/lib.js +1 -1
- package/dist/nextjs/templates/pages-codegen/app.js +2 -1
- package/dist/react/react.js +36 -11
- package/package.json +2 -2
- package/src/gatsby/template.ts +2 -1
- package/src/lib.ts +1 -1
- package/src/nextjs/templates/pages-codegen/app.ts +2 -1
- package/src/react/react.ts +47 -16
- package/cpa-out/react-codegen-js/src/index.js +0 -17
- package/cpa-out/react-codegen-js/src/reportWebVitals.js +0 -13
- package/cpa-out/react-codegen-js/src/setupTests.js +0 -5
- package/cpa-out/react-codegen-ts/src/index.tsx +0 -19
- package/cpa-out/react-codegen-ts/src/react-app-env.d.ts +0 -1
- package/cpa-out/react-codegen-ts/src/reportWebVitals.ts +0 -15
- package/cpa-out/react-codegen-ts/src/setupTests.ts +0 -5
- package/cpa-out/react-loader-js/package.json +0 -40
- package/cpa-out/react-loader-js/plasmic.json +0 -127
- package/cpa-out/react-loader-js/src/App.jsx +0 -9
- package/cpa-out/react-loader-js/src/components/Button.jsx +0 -13
- package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +0 -26
- package/cpa-out/react-loader-js/src/components/Homepage.jsx +0 -26
- package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +0 -24
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +0 -625
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +0 -166
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +0 -29
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +0 -210
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +0 -161
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +0 -39
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +0 -37
- package/cpa-out/react-loader-js/src/index.js +0 -17
- package/cpa-out/react-loader-js/src/reportWebVitals.js +0 -13
- package/cpa-out/react-loader-js/src/setupTests.js +0 -5
- package/cpa-out/react-loader-ts/package.json +0 -45
- package/cpa-out/react-loader-ts/plasmic.json +0 -127
- package/cpa-out/react-loader-ts/src/App.tsx +0 -9
- package/cpa-out/react-loader-ts/src/components/Button.tsx +0 -36
- package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +0 -45
- package/cpa-out/react-loader-ts/src/components/Homepage.tsx +0 -45
- package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +0 -44
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +0 -725
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +0 -248
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +0 -31
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +0 -294
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +0 -240
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +0 -44
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +0 -41
- package/cpa-out/react-loader-ts/src/index.tsx +0 -19
- package/cpa-out/react-loader-ts/src/react-app-env.d.ts +0 -1
- package/cpa-out/react-loader-ts/src/reportWebVitals.ts +0 -15
- package/cpa-out/react-loader-ts/src/setupTests.ts +0 -5
- package/cpa-out/react-loader-ts/tsconfig.json +0 -26
package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx
CHANGED
|
@@ -9,46 +9,48 @@
|
|
|
9
9
|
// Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
|
|
10
10
|
// Component: 6uuAAE1jiCew
|
|
11
11
|
import * as React from "react";
|
|
12
|
-
import * as p from "@plasmicapp/react-web";
|
|
13
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
14
12
|
import {
|
|
15
|
-
|
|
13
|
+
Stack as Stack__,
|
|
16
14
|
classNames,
|
|
17
15
|
createPlasmicElementProxy,
|
|
18
16
|
deriveRenderOpts,
|
|
19
|
-
ensureGlobalVariants
|
|
17
|
+
ensureGlobalVariants,
|
|
18
|
+
hasVariant
|
|
20
19
|
} from "@plasmicapp/react-web";
|
|
20
|
+
import { useDataEnv } from "@plasmicapp/react-web/lib/host";
|
|
21
21
|
import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
|
|
22
22
|
import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
|
|
23
23
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
24
|
-
import projectcss from "./
|
|
24
|
+
import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
25
25
|
import sty from "./PlasmicHomepage.module.css"; // plasmic-import: 6uuAAE1jiCew/css
|
|
26
26
|
|
|
27
|
+
createPlasmicElementProxy;
|
|
28
|
+
|
|
27
29
|
export const PlasmicHomepage__VariantProps = new Array();
|
|
28
30
|
|
|
29
31
|
export const PlasmicHomepage__ArgProps = new Array();
|
|
30
32
|
|
|
31
|
-
const
|
|
32
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
33
|
-
|
|
34
|
-
const __wrapUserPromise =
|
|
35
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
36
|
-
(async (loc, promise) => {
|
|
37
|
-
return await promise;
|
|
38
|
-
});
|
|
33
|
+
const $$ = {};
|
|
39
34
|
|
|
40
35
|
function PlasmicHomepage__RenderFunc(props) {
|
|
41
36
|
const { variants, overrides, forNode } = props;
|
|
42
|
-
const
|
|
43
|
-
|
|
37
|
+
const args = React.useMemo(
|
|
38
|
+
() =>
|
|
39
|
+
Object.assign(
|
|
40
|
+
{},
|
|
41
|
+
Object.fromEntries(
|
|
42
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
43
|
+
)
|
|
44
|
+
),
|
|
45
|
+
[props.args]
|
|
46
|
+
);
|
|
44
47
|
const $props = {
|
|
45
48
|
...args,
|
|
46
49
|
...variants
|
|
47
50
|
};
|
|
51
|
+
const $ctx = useDataEnv?.() || {};
|
|
48
52
|
const refsRef = React.useRef({});
|
|
49
53
|
const $refs = refsRef.current;
|
|
50
|
-
const currentUser = p.useCurrentUser?.() || {};
|
|
51
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
52
54
|
const globalVariants = ensureGlobalVariants({
|
|
53
55
|
screen: useScreenVariantsscBjPxgdxdzbv()
|
|
54
56
|
});
|
|
@@ -65,10 +67,11 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
65
67
|
projectcss.root_reset,
|
|
66
68
|
projectcss.plasmic_default_styles,
|
|
67
69
|
projectcss.plasmic_mixins,
|
|
70
|
+
projectcss.plasmic_tokens,
|
|
68
71
|
sty.root
|
|
69
72
|
)}
|
|
70
73
|
>
|
|
71
|
-
<
|
|
74
|
+
<Stack__
|
|
72
75
|
as={"section"}
|
|
73
76
|
data-plasmic-name={"section"}
|
|
74
77
|
data-plasmic-override={overrides.section}
|
|
@@ -87,7 +90,6 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
87
90
|
>
|
|
88
91
|
{"create-plasmic-app"}
|
|
89
92
|
</h1>
|
|
90
|
-
|
|
91
93
|
<div
|
|
92
94
|
data-plasmic-name={"text"}
|
|
93
95
|
data-plasmic-override={overrides.text}
|
|
@@ -115,7 +117,7 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
115
117
|
<React.Fragment>
|
|
116
118
|
<React.Fragment>
|
|
117
119
|
{
|
|
118
|
-
"If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template
|
|
120
|
+
"If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template\u2014do this from the list of pages in the top left (the gray + button).\n\nOr press the big blue + button to start dragging items into this page.\n\nIntegrate this project into your codebase\u2014press the "
|
|
119
121
|
}
|
|
120
122
|
</React.Fragment>
|
|
121
123
|
<span
|
|
@@ -132,7 +134,6 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
132
134
|
</React.Fragment>
|
|
133
135
|
)}
|
|
134
136
|
</div>
|
|
135
|
-
|
|
136
137
|
<RandomDynamicPageButton
|
|
137
138
|
data-plasmic-name={"randomDynamicPageButton"}
|
|
138
139
|
data-plasmic-override={overrides.randomDynamicPageButton}
|
|
@@ -141,7 +142,7 @@ function PlasmicHomepage__RenderFunc(props) {
|
|
|
141
142
|
sty.randomDynamicPageButton
|
|
142
143
|
)}
|
|
143
144
|
/>
|
|
144
|
-
</
|
|
145
|
+
</Stack__>
|
|
145
146
|
</div>
|
|
146
147
|
</div>
|
|
147
148
|
</React.Fragment>
|
|
@@ -162,13 +163,12 @@ function makeNodeComponent(nodeName) {
|
|
|
162
163
|
() =>
|
|
163
164
|
deriveRenderOpts(props, {
|
|
164
165
|
name: nodeName,
|
|
165
|
-
descendantNames:
|
|
166
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
166
167
|
internalArgPropNames: PlasmicHomepage__ArgProps,
|
|
167
168
|
internalVariantPropNames: PlasmicHomepage__VariantProps
|
|
168
169
|
}),
|
|
169
170
|
[props, nodeName]
|
|
170
171
|
);
|
|
171
|
-
|
|
172
172
|
return PlasmicHomepage__RenderFunc({
|
|
173
173
|
variants,
|
|
174
174
|
args,
|
|
@@ -9,42 +9,43 @@
|
|
|
9
9
|
// Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
|
|
10
10
|
// Component: Q23H1_1M_P
|
|
11
11
|
import * as React from "react";
|
|
12
|
-
import * as p from "@plasmicapp/react-web";
|
|
13
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
14
12
|
import {
|
|
15
13
|
classNames,
|
|
16
14
|
createPlasmicElementProxy,
|
|
17
15
|
deriveRenderOpts
|
|
18
16
|
} from "@plasmicapp/react-web";
|
|
17
|
+
import { useDataEnv } from "@plasmicapp/react-web/lib/host";
|
|
19
18
|
import Button from "../../Button"; // plasmic-import: TQcvW_pSKi3/component
|
|
20
19
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
21
20
|
import sty from "./PlasmicRandomDynamicPageButton.module.css"; // plasmic-import: Q23H1_1M_P/css
|
|
22
21
|
|
|
22
|
+
createPlasmicElementProxy;
|
|
23
|
+
|
|
23
24
|
export const PlasmicRandomDynamicPageButton__VariantProps = new Array();
|
|
24
25
|
|
|
25
26
|
export const PlasmicRandomDynamicPageButton__ArgProps = new Array();
|
|
26
27
|
|
|
27
|
-
const
|
|
28
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
29
|
-
|
|
30
|
-
const __wrapUserPromise =
|
|
31
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
32
|
-
(async (loc, promise) => {
|
|
33
|
-
return await promise;
|
|
34
|
-
});
|
|
28
|
+
const $$ = {};
|
|
35
29
|
|
|
36
30
|
function PlasmicRandomDynamicPageButton__RenderFunc(props) {
|
|
37
31
|
const { variants, overrides, forNode } = props;
|
|
38
|
-
const
|
|
39
|
-
|
|
32
|
+
const args = React.useMemo(
|
|
33
|
+
() =>
|
|
34
|
+
Object.assign(
|
|
35
|
+
{},
|
|
36
|
+
Object.fromEntries(
|
|
37
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
38
|
+
)
|
|
39
|
+
),
|
|
40
|
+
[props.args]
|
|
41
|
+
);
|
|
40
42
|
const $props = {
|
|
41
43
|
...args,
|
|
42
44
|
...variants
|
|
43
45
|
};
|
|
46
|
+
const $ctx = useDataEnv?.() || {};
|
|
44
47
|
const refsRef = React.useRef({});
|
|
45
48
|
const $refs = refsRef.current;
|
|
46
|
-
const currentUser = p.useCurrentUser?.() || {};
|
|
47
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
48
49
|
return (
|
|
49
50
|
<Button
|
|
50
51
|
data-plasmic-name={"root"}
|
|
@@ -57,57 +58,43 @@ function PlasmicRandomDynamicPageButton__RenderFunc(props) {
|
|
|
57
58
|
$steps["goToDynamicPage"] = true
|
|
58
59
|
? (() => {
|
|
59
60
|
const actionArgs = {
|
|
60
|
-
destination:
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (e instanceof TypeError) {
|
|
74
|
-
return "value";
|
|
75
|
-
}
|
|
76
|
-
throw e;
|
|
77
|
-
}
|
|
78
|
-
})()}`
|
|
79
|
-
)
|
|
61
|
+
destination: `/dynamic/${(() => {
|
|
62
|
+
try {
|
|
63
|
+
return Math.random().toString(36).slice(2);
|
|
64
|
+
} catch (e) {
|
|
65
|
+
if (
|
|
66
|
+
e instanceof TypeError ||
|
|
67
|
+
e?.plasmicType === "PlasmicUndefinedDataError"
|
|
68
|
+
) {
|
|
69
|
+
return "value";
|
|
70
|
+
}
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
})()}`
|
|
80
74
|
};
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
);
|
|
75
|
+
return (({ destination }) => {
|
|
76
|
+
if (
|
|
77
|
+
typeof destination === "string" &&
|
|
78
|
+
destination.startsWith("#")
|
|
79
|
+
) {
|
|
80
|
+
document
|
|
81
|
+
.getElementById(destination.substr(1))
|
|
82
|
+
.scrollIntoView({ behavior: "smooth" });
|
|
83
|
+
} else {
|
|
84
|
+
location.assign(destination);
|
|
85
|
+
}
|
|
86
|
+
})?.apply(null, [actionArgs]);
|
|
94
87
|
})()
|
|
95
88
|
: undefined;
|
|
96
89
|
if (
|
|
90
|
+
$steps["goToDynamicPage"] != null &&
|
|
97
91
|
typeof $steps["goToDynamicPage"] === "object" &&
|
|
98
92
|
typeof $steps["goToDynamicPage"].then === "function"
|
|
99
93
|
) {
|
|
100
|
-
$steps["goToDynamicPage"] = await
|
|
101
|
-
{
|
|
102
|
-
type: "InteractionLoc",
|
|
103
|
-
actionName: "navigation",
|
|
104
|
-
interactionUuid: "9Y3jL0zxjA",
|
|
105
|
-
componentUuid: "Q23H1_1M_P"
|
|
106
|
-
},
|
|
107
|
-
$steps["goToDynamicPage"]
|
|
108
|
-
);
|
|
94
|
+
$steps["goToDynamicPage"] = await $steps["goToDynamicPage"];
|
|
109
95
|
}
|
|
110
96
|
}}
|
|
97
|
+
submitsForm={true}
|
|
111
98
|
>
|
|
112
99
|
{"Random Dynamic Page"}
|
|
113
100
|
</Button>
|
|
@@ -124,13 +111,12 @@ function makeNodeComponent(nodeName) {
|
|
|
124
111
|
() =>
|
|
125
112
|
deriveRenderOpts(props, {
|
|
126
113
|
name: nodeName,
|
|
127
|
-
descendantNames:
|
|
114
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
128
115
|
internalArgPropNames: PlasmicRandomDynamicPageButton__ArgProps,
|
|
129
116
|
internalVariantPropNames: PlasmicRandomDynamicPageButton__VariantProps
|
|
130
117
|
}),
|
|
131
118
|
[props, nodeName]
|
|
132
119
|
);
|
|
133
|
-
|
|
134
120
|
return PlasmicRandomDynamicPageButton__RenderFunc({
|
|
135
121
|
variants,
|
|
136
122
|
args,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { classNames } from "@plasmicapp/react-web";
|
|
7
7
|
|
|
8
|
-
export function
|
|
8
|
+
export function CheckSvgIcon(props) {
|
|
9
9
|
const { className, style, title, ...restProps } = props;
|
|
10
10
|
return (
|
|
11
11
|
<svg
|
|
@@ -35,5 +35,5 @@ export function ChecksvgIcon(props) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export default
|
|
38
|
+
export default CheckSvgIcon;
|
|
39
39
|
/* prettier-ignore-end */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
)
|
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-codegen-ts",
|
|
3
|
-
"version": "0.1.0",
|
|
4
3
|
"private": true,
|
|
5
|
-
"
|
|
6
|
-
|
|
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
|
-
},
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
21
6
|
"scripts": {
|
|
22
|
-
"
|
|
23
|
-
"build": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vite preview"
|
|
26
11
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@plasmicapp/cli": "^0.1.335",
|
|
14
|
+
"@plasmicapp/react-web": "^0.2.366",
|
|
15
|
+
"react": "^19.0.0",
|
|
16
|
+
"react-dom": "^19.0.0"
|
|
32
17
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@eslint/js": "^9.19.0",
|
|
20
|
+
"@types/react": "^19.0.8",
|
|
21
|
+
"@types/react-dom": "^19.0.3",
|
|
22
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
23
|
+
"eslint": "^9.19.0",
|
|
24
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
25
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
26
|
+
"globals": "^15.14.0",
|
|
27
|
+
"typescript": "~5.7.2",
|
|
28
|
+
"typescript-eslint": "^8.22.0",
|
|
29
|
+
"vite": "^6.1.0"
|
|
44
30
|
}
|
|
45
31
|
}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"defaultStyleCssFilePath": "plasmic/plasmic__default_style.css"
|
|
11
11
|
},
|
|
12
12
|
"images": {
|
|
13
|
-
"scheme": "
|
|
14
|
-
"publicDir": "
|
|
13
|
+
"scheme": "inlined",
|
|
14
|
+
"publicDir": "../public",
|
|
15
15
|
"publicUrlPrefix": "/static/"
|
|
16
16
|
},
|
|
17
17
|
"tokens": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"projectApiToken": "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
27
27
|
"projectName": "create-plasmic-app",
|
|
28
28
|
"version": "latest",
|
|
29
|
-
"cssFilePath": "plasmic/create_plasmic_app/
|
|
29
|
+
"cssFilePath": "plasmic/create_plasmic_app/plasmic.module.css",
|
|
30
30
|
"components": [
|
|
31
31
|
{
|
|
32
32
|
"id": "6uuAAE1jiCew",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.module.css",
|
|
41
41
|
"scheme": "blackbox",
|
|
42
|
-
"componentType": "page"
|
|
42
|
+
"componentType": "page",
|
|
43
|
+
"path": "/"
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
"id": "AO44A-w7hh",
|
|
@@ -52,7 +53,8 @@
|
|
|
52
53
|
},
|
|
53
54
|
"cssFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.module.css",
|
|
54
55
|
"scheme": "blackbox",
|
|
55
|
-
"componentType": "page"
|
|
56
|
+
"componentType": "page",
|
|
57
|
+
"path": "/dynamic/[slug]"
|
|
56
58
|
},
|
|
57
59
|
{
|
|
58
60
|
"id": "TQcvW_pSKi3",
|
|
@@ -85,8 +87,8 @@
|
|
|
85
87
|
"icons": [
|
|
86
88
|
{
|
|
87
89
|
"id": "gj-_D7n31Ho",
|
|
88
|
-
"name": "
|
|
89
|
-
"moduleFilePath": "plasmic/create_plasmic_app/icons/
|
|
90
|
+
"name": "CheckSvgIcon",
|
|
91
|
+
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx"
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
94
|
"id": "6PNxx3YMyDQ",
|
|
@@ -97,18 +99,22 @@
|
|
|
97
99
|
"images": [],
|
|
98
100
|
"indirect": false,
|
|
99
101
|
"globalContextsFilePath": "",
|
|
102
|
+
"splitsProviderFilePath": "",
|
|
100
103
|
"codeComponents": [
|
|
101
104
|
{
|
|
102
105
|
"id": "P6aGdYWZ2R",
|
|
103
106
|
"name": "PlasmicHead",
|
|
107
|
+
"displayName": "hostless-plasmic-head",
|
|
104
108
|
"componentImportPath": "@plasmicapp/react-web"
|
|
105
109
|
},
|
|
106
110
|
{
|
|
107
111
|
"id": "8G2A-uTjGa",
|
|
108
112
|
"name": "Fetcher",
|
|
113
|
+
"displayName": "plasmic-data-source-fetcher",
|
|
109
114
|
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
|
|
110
115
|
}
|
|
111
|
-
]
|
|
116
|
+
],
|
|
117
|
+
"customFunctions": []
|
|
112
118
|
}
|
|
113
119
|
],
|
|
114
120
|
"globalVariants": {
|
|
@@ -122,6 +128,6 @@
|
|
|
122
128
|
]
|
|
123
129
|
},
|
|
124
130
|
"wrapPagesWithGlobalContexts": true,
|
|
125
|
-
"cliVersion": "0.1.
|
|
126
|
-
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.
|
|
131
|
+
"cliVersion": "0.1.335",
|
|
132
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.335/dist/plasmic.schema.json"
|
|
127
133
|
}
|
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
PlasmicButton,
|
|
4
4
|
DefaultButtonProps
|
|
5
5
|
} from "./plasmic/create_plasmic_app/PlasmicButton";
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
ButtonRef,
|
|
8
9
|
HtmlAnchorOnlyProps,
|
|
9
10
|
HtmlButtonOnlyProps
|
|
10
11
|
} from "@plasmicapp/react-web";
|
|
11
12
|
|
|
12
|
-
interface ButtonProps extends DefaultButtonProps {
|
|
13
|
+
export interface ButtonProps extends DefaultButtonProps {
|
|
13
14
|
// Feel free to add any additional props that this component should receive
|
|
14
15
|
}
|
|
15
16
|
function Button_(props: ButtonProps, ref: ButtonRef) {
|
|
@@ -17,7 +18,7 @@ function Button_(props: ButtonProps, ref: ButtonRef) {
|
|
|
17
18
|
return <PlasmicButton {...plasmicProps} />;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
type ButtonComponentType = {
|
|
21
|
+
export type ButtonComponentType = {
|
|
21
22
|
(
|
|
22
23
|
props: Omit<ButtonProps, HtmlAnchorOnlyProps> & {
|
|
23
24
|
ref?: React.Ref<HTMLButtonElement>;
|
|
@@ -31,6 +32,4 @@ type ButtonComponentType = {
|
|
|
31
32
|
};
|
|
32
33
|
const Button = React.forwardRef(Button_) as any as ButtonComponentType;
|
|
33
34
|
|
|
34
|
-
export default Object.assign(Button, {
|
|
35
|
-
__plumeType: "button"
|
|
36
|
-
});
|
|
35
|
+
export default Object.assign(Button, { __plumeType: "button" });
|