create-plasmic-app 0.0.98 → 0.0.100
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/gatsby-codegen-js/gatsby-browser.jsx +2 -1
- package/cpa-out/gatsby-codegen-js/gatsby-ssr.jsx +2 -1
- package/cpa-out/gatsby-codegen-js/package.json +4 -4
- package/cpa-out/gatsby-codegen-js/plasmic.json +14 -8
- package/cpa-out/gatsby-codegen-js/src/components/Button.jsx +1 -3
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +53 -100
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +36 -30
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +3 -15
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +25 -25
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +45 -59
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +3 -3
- package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/gatsby-codegen-js/src/pages/dynamic/[slug].jsx +5 -4
- package/cpa-out/gatsby-codegen-js/src/pages/index.jsx +5 -4
- package/cpa-out/gatsby-codegen-ts/gatsby-browser.tsx +2 -1
- package/cpa-out/gatsby-codegen-ts/gatsby-ssr.tsx +2 -1
- package/cpa-out/gatsby-codegen-ts/package.json +9 -9
- package/cpa-out/gatsby-codegen-ts/plasmic.json +14 -8
- package/cpa-out/gatsby-codegen-ts/src/components/Button.tsx +4 -5
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +99 -75
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +80 -49
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +3 -15
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +69 -43
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +90 -77
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +4 -4
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/cpa-out/gatsby-codegen-ts/src/pages/dynamic/[slug].tsx +6 -5
- package/cpa-out/gatsby-codegen-ts/src/pages/index.tsx +6 -5
- package/cpa-out/gatsby-loader-js/package.json +3 -3
- package/cpa-out/gatsby-loader-js/src/templates/defaultPlasmicPage.jsx +1 -0
- package/cpa-out/gatsby-loader-ts/package.json +8 -8
- package/cpa-out/gatsby-loader-ts/src/templates/defaultPlasmicPage.tsx +1 -0
- package/cpa-out/nextjs-app-loader-js/package.json +8 -6
- package/cpa-out/nextjs-app-loader-js/plasmic-init.js +10 -1
- package/cpa-out/nextjs-app-loader-ts/package.json +12 -10
- package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +10 -1
- package/cpa-out/nextjs-app-loader-ts/tsconfig.json +2 -9
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/nextjs-pages-codegen-js/package.json +4 -4
- package/cpa-out/nextjs-pages-codegen-js/pages/_app.jsx +2 -1
- package/cpa-out/nextjs-pages-codegen-js/plasmic.json +2 -2
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/package.json +4 -4
- package/cpa-out/nextjs-pages-codegen-ts/pages/_app.tsx +2 -1
- package/cpa-out/nextjs-pages-codegen-ts/pages/dynamic/[slug].tsx +1 -0
- package/cpa-out/nextjs-pages-codegen-ts/pages/index.tsx +1 -0
- package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +2 -2
- package/cpa-out/nextjs-pages-loader-js/package.json +3 -3
- package/cpa-out/nextjs-pages-loader-ts/package.json +3 -3
- package/cpa-out/react-codegen-js/eslint.config.js +1 -6
- package/cpa-out/react-codegen-js/package.json +10 -11
- package/cpa-out/react-codegen-js/plasmic.json +2 -2
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
- package/cpa-out/react-codegen-ts/package.json +11 -11
- package/cpa-out/react-codegen-ts/plasmic.json +2 -2
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
- package/dist/index.js +7 -8
- package/dist/utils/file-utils.d.ts +2 -2
- package/dist/utils/file-utils.js +29 -28
- package/package.json +5 -13
- package/run-cpa.ts +8 -6
- package/src/index.ts +7 -9
- package/src/utils/file-utils.ts +44 -30
- package/.eslintrc.js +0 -15
- package/cpa-out/nextjs-app-loader-js/app/[[...catchall]]/page.jsx +0 -56
- package/cpa-out/nextjs-app-loader-js/app/api/hello/route.js +0 -3
- package/cpa-out/nextjs-app-loader-js/app/layout.js +0 -14
- package/cpa-out/nextjs-app-loader-js/app/plasmic-host/page.jsx +0 -6
- package/cpa-out/nextjs-app-loader-js/plasmic-init-client.jsx +0 -65
- package/cpa-out/nextjs-app-loader-ts/app/[[...catchall]]/page.tsx +0 -59
- package/cpa-out/nextjs-app-loader-ts/app/api/hello/route.ts +0 -3
- package/cpa-out/nextjs-app-loader-ts/app/layout.tsx +0 -18
- package/cpa-out/nextjs-app-loader-ts/app/plasmic-host/page.tsx +0 -6
- package/cpa-out/nextjs-app-loader-ts/plasmic-init-client.tsx +0 -65
|
@@ -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": {
|
|
@@ -125,6 +131,6 @@
|
|
|
125
131
|
"gatsbyConfig": {
|
|
126
132
|
"pagesDir": "../pages"
|
|
127
133
|
},
|
|
128
|
-
"cliVersion": "0.1.
|
|
129
|
-
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.
|
|
134
|
+
"cliVersion": "0.1.337",
|
|
135
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.337/dist/plasmic.schema.json"
|
|
130
136
|
}
|
|
@@ -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" });
|
package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
|
|
6
6
|
/** @jsxRuntime classic */
|
|
@@ -19,35 +19,60 @@ import {
|
|
|
19
19
|
navigate as __gatsbyNavigate
|
|
20
20
|
} from "gatsby";
|
|
21
21
|
|
|
22
|
-
import * as p from "@plasmicapp/react-web";
|
|
23
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
24
|
-
|
|
25
|
-
import * as pp from "@plasmicapp/react-web";
|
|
26
22
|
import {
|
|
27
|
-
|
|
28
|
-
classNames,
|
|
29
|
-
wrapWithClassName,
|
|
30
|
-
createPlasmicElementProxy,
|
|
31
|
-
makeFragment,
|
|
23
|
+
Flex as Flex__,
|
|
32
24
|
MultiChoiceArg,
|
|
25
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
26
|
+
PlasmicIcon as PlasmicIcon__,
|
|
27
|
+
PlasmicImg as PlasmicImg__,
|
|
28
|
+
PlasmicLink as PlasmicLink__,
|
|
29
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
33
30
|
SingleBooleanChoiceArg,
|
|
34
31
|
SingleChoiceArg,
|
|
35
|
-
|
|
36
|
-
omit,
|
|
37
|
-
useTrigger,
|
|
32
|
+
Stack as Stack__,
|
|
38
33
|
StrictProps,
|
|
34
|
+
Trans as Trans__,
|
|
35
|
+
classNames,
|
|
36
|
+
createPlasmicElementProxy,
|
|
39
37
|
deriveRenderOpts,
|
|
40
|
-
ensureGlobalVariants
|
|
38
|
+
ensureGlobalVariants,
|
|
39
|
+
generateOnMutateForSpec,
|
|
40
|
+
generateStateOnChangeProp,
|
|
41
|
+
generateStateOnChangePropForCodeComponents,
|
|
42
|
+
generateStateValueProp,
|
|
43
|
+
get as $stateGet,
|
|
44
|
+
hasVariant,
|
|
45
|
+
initializeCodeComponentStates,
|
|
46
|
+
initializePlasmicStates,
|
|
47
|
+
makeFragment,
|
|
48
|
+
omit,
|
|
49
|
+
pick,
|
|
50
|
+
renderPlasmicSlot,
|
|
51
|
+
set as $stateSet,
|
|
52
|
+
useCurrentUser,
|
|
53
|
+
useDollarState,
|
|
54
|
+
usePlasmicTranslator,
|
|
55
|
+
useTrigger,
|
|
56
|
+
wrapWithClassName
|
|
41
57
|
} from "@plasmicapp/react-web";
|
|
58
|
+
import {
|
|
59
|
+
DataCtxReader as DataCtxReader__,
|
|
60
|
+
useDataEnv,
|
|
61
|
+
useGlobalActions
|
|
62
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
63
|
+
|
|
64
|
+
import * as pp from "@plasmicapp/react-web";
|
|
42
65
|
|
|
43
66
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
44
67
|
|
|
45
|
-
import * as projectcss from "./
|
|
68
|
+
import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
46
69
|
import * as sty from "./PlasmicButton.module.css"; // plasmic-import: TQcvW_pSKi3/css
|
|
47
70
|
|
|
48
|
-
import
|
|
71
|
+
import CheckSvgIcon from "./icons/PlasmicIcon__CheckSvg"; // plasmic-import: gj-_D7n31Ho/icon
|
|
49
72
|
import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
|
|
50
73
|
|
|
74
|
+
createPlasmicElementProxy;
|
|
75
|
+
|
|
51
76
|
export type PlasmicButton__VariantMembers = {
|
|
52
77
|
showStartIcon: "showStartIcon";
|
|
53
78
|
showEndIcon: "showEndIcon";
|
|
@@ -102,27 +127,33 @@ export const PlasmicButton__VariantProps = new Array<VariantPropType>(
|
|
|
102
127
|
);
|
|
103
128
|
|
|
104
129
|
export type PlasmicButton__ArgsType = {
|
|
105
|
-
|
|
130
|
+
link?: string;
|
|
131
|
+
submitsForm?: boolean;
|
|
132
|
+
target?: boolean;
|
|
106
133
|
startIcon?: React.ReactNode;
|
|
134
|
+
children?: React.ReactNode;
|
|
107
135
|
endIcon?: React.ReactNode;
|
|
108
|
-
link?: string;
|
|
109
136
|
};
|
|
110
137
|
type ArgPropType = keyof PlasmicButton__ArgsType;
|
|
111
138
|
export const PlasmicButton__ArgProps = new Array<ArgPropType>(
|
|
112
|
-
"
|
|
139
|
+
"link",
|
|
140
|
+
"submitsForm",
|
|
141
|
+
"target",
|
|
113
142
|
"startIcon",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
143
|
+
"children",
|
|
144
|
+
"endIcon"
|
|
116
145
|
);
|
|
117
146
|
|
|
118
147
|
export type PlasmicButton__OverridesType = {
|
|
119
|
-
root?:
|
|
120
|
-
startIconContainer?:
|
|
121
|
-
contentContainer?:
|
|
122
|
-
endIconContainer?:
|
|
148
|
+
root?: Flex__<"button">;
|
|
149
|
+
startIconContainer?: Flex__<"div">;
|
|
150
|
+
contentContainer?: Flex__<"div">;
|
|
151
|
+
endIconContainer?: Flex__<"div">;
|
|
123
152
|
};
|
|
124
153
|
|
|
125
154
|
export interface DefaultButtonProps extends pp.BaseButtonProps {
|
|
155
|
+
submitsForm?: boolean;
|
|
156
|
+
target?: boolean;
|
|
126
157
|
shape?: SingleChoiceArg<"rounded" | "round" | "sharp">;
|
|
127
158
|
size?: SingleChoiceArg<"compact" | "minimal">;
|
|
128
159
|
color?: SingleChoiceArg<
|
|
@@ -142,13 +173,7 @@ export interface DefaultButtonProps extends pp.BaseButtonProps {
|
|
|
142
173
|
>;
|
|
143
174
|
}
|
|
144
175
|
|
|
145
|
-
const
|
|
146
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
147
|
-
const __wrapUserPromise =
|
|
148
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
149
|
-
(async (loc, promise) => {
|
|
150
|
-
return await promise;
|
|
151
|
-
});
|
|
176
|
+
const $$ = {};
|
|
152
177
|
|
|
153
178
|
function PlasmicButton__RenderFunc(props: {
|
|
154
179
|
variants: PlasmicButton__VariantsArgs;
|
|
@@ -158,72 +183,73 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
158
183
|
}) {
|
|
159
184
|
const { variants, overrides, forNode } = props;
|
|
160
185
|
|
|
161
|
-
const
|
|
162
|
-
|
|
186
|
+
const args = React.useMemo(
|
|
187
|
+
() =>
|
|
188
|
+
Object.assign(
|
|
189
|
+
{},
|
|
190
|
+
Object.fromEntries(
|
|
191
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
192
|
+
)
|
|
193
|
+
),
|
|
194
|
+
[props.args]
|
|
195
|
+
);
|
|
163
196
|
|
|
164
197
|
const $props = {
|
|
165
198
|
...args,
|
|
166
199
|
...variants
|
|
167
200
|
};
|
|
201
|
+
|
|
202
|
+
const $ctx = useDataEnv?.() || {};
|
|
168
203
|
const refsRef = React.useRef({});
|
|
169
204
|
const $refs = refsRef.current;
|
|
170
205
|
|
|
171
|
-
const
|
|
172
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
173
|
-
const stateSpecs = React.useMemo(
|
|
206
|
+
const stateSpecs: Parameters<typeof useDollarState>[0] = React.useMemo(
|
|
174
207
|
() => [
|
|
175
208
|
{
|
|
176
209
|
path: "showStartIcon",
|
|
177
210
|
type: "private",
|
|
178
211
|
variableType: "variant",
|
|
179
|
-
initFunc:
|
|
180
|
-
? ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
|
|
181
|
-
: undefined
|
|
212
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
|
|
182
213
|
},
|
|
183
214
|
{
|
|
184
215
|
path: "showEndIcon",
|
|
185
216
|
type: "private",
|
|
186
217
|
variableType: "variant",
|
|
187
|
-
initFunc:
|
|
188
|
-
? ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
|
|
189
|
-
: undefined
|
|
218
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
|
|
190
219
|
},
|
|
191
220
|
{
|
|
192
221
|
path: "isDisabled",
|
|
193
222
|
type: "private",
|
|
194
223
|
variableType: "variant",
|
|
195
|
-
initFunc:
|
|
196
|
-
? ({ $props, $state, $queries, $ctx }) => $props.isDisabled
|
|
197
|
-
: undefined
|
|
224
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.isDisabled
|
|
198
225
|
},
|
|
199
226
|
{
|
|
200
227
|
path: "shape",
|
|
201
228
|
type: "private",
|
|
202
229
|
variableType: "variant",
|
|
203
|
-
initFunc:
|
|
204
|
-
? ({ $props, $state, $queries, $ctx }) => $props.shape
|
|
205
|
-
: undefined
|
|
230
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.shape
|
|
206
231
|
},
|
|
207
232
|
{
|
|
208
233
|
path: "size",
|
|
209
234
|
type: "private",
|
|
210
235
|
variableType: "variant",
|
|
211
|
-
initFunc:
|
|
212
|
-
? ({ $props, $state, $queries, $ctx }) => $props.size
|
|
213
|
-
: undefined
|
|
236
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.size
|
|
214
237
|
},
|
|
215
238
|
{
|
|
216
239
|
path: "color",
|
|
217
240
|
type: "private",
|
|
218
241
|
variableType: "variant",
|
|
219
|
-
initFunc:
|
|
220
|
-
? ({ $props, $state, $queries, $ctx }) => $props.color
|
|
221
|
-
: undefined
|
|
242
|
+
initFunc: ({ $props, $state, $queries, $ctx }) => $props.color
|
|
222
243
|
}
|
|
223
244
|
],
|
|
224
|
-
[$props, $ctx]
|
|
245
|
+
[$props, $ctx, $refs]
|
|
225
246
|
);
|
|
226
|
-
const $state =
|
|
247
|
+
const $state = useDollarState(stateSpecs, {
|
|
248
|
+
$props,
|
|
249
|
+
$ctx,
|
|
250
|
+
$queries: {},
|
|
251
|
+
$refs
|
|
252
|
+
});
|
|
227
253
|
|
|
228
254
|
const [isRootFocusVisibleWithin, triggerRootFocusVisibleWithinProps] =
|
|
229
255
|
useTrigger("useFocusVisibleWithin", {
|
|
@@ -234,7 +260,7 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
234
260
|
};
|
|
235
261
|
|
|
236
262
|
return (
|
|
237
|
-
<
|
|
263
|
+
<Stack__
|
|
238
264
|
as={"button"}
|
|
239
265
|
data-plasmic-name={"root"}
|
|
240
266
|
data-plasmic-override={overrides.root}
|
|
@@ -247,6 +273,7 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
247
273
|
projectcss.root_reset,
|
|
248
274
|
projectcss.plasmic_default_styles,
|
|
249
275
|
projectcss.plasmic_mixins,
|
|
276
|
+
projectcss.plasmic_tokens,
|
|
250
277
|
sty.root,
|
|
251
278
|
{
|
|
252
279
|
[sty.root___focusVisibleWithin]: triggers.focusVisibleWithin_root,
|
|
@@ -328,9 +355,9 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
328
355
|
)
|
|
329
356
|
})}
|
|
330
357
|
>
|
|
331
|
-
{
|
|
358
|
+
{renderPlasmicSlot({
|
|
332
359
|
defaultContents: (
|
|
333
|
-
<
|
|
360
|
+
<CheckSvgIcon
|
|
334
361
|
className={classNames(projectcss.all, sty.svg__s6Xxe)}
|
|
335
362
|
role={"img"}
|
|
336
363
|
/>
|
|
@@ -397,7 +424,6 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
397
424
|
})}
|
|
398
425
|
</div>
|
|
399
426
|
) : null}
|
|
400
|
-
|
|
401
427
|
<div
|
|
402
428
|
data-plasmic-name={"contentContainer"}
|
|
403
429
|
data-plasmic-override={overrides.contentContainer}
|
|
@@ -421,7 +447,7 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
421
447
|
)
|
|
422
448
|
})}
|
|
423
449
|
>
|
|
424
|
-
{
|
|
450
|
+
{renderPlasmicSlot({
|
|
425
451
|
defaultContents: "Button",
|
|
426
452
|
value: args.children,
|
|
427
453
|
className: classNames(sty.slotTargetChildren, {
|
|
@@ -523,7 +549,6 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
523
549
|
})
|
|
524
550
|
})}
|
|
525
551
|
</div>
|
|
526
|
-
|
|
527
552
|
{(hasVariant($state, "showEndIcon", "showEndIcon") ? true : false) ? (
|
|
528
553
|
<div
|
|
529
554
|
data-plasmic-name={"endIconContainer"}
|
|
@@ -546,7 +571,7 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
546
571
|
)
|
|
547
572
|
})}
|
|
548
573
|
>
|
|
549
|
-
{
|
|
574
|
+
{renderPlasmicSlot({
|
|
550
575
|
defaultContents: (
|
|
551
576
|
<IconIcon
|
|
552
577
|
className={classNames(projectcss.all, sty.svg__liJa)}
|
|
@@ -610,11 +635,11 @@ function PlasmicButton__RenderFunc(props: {
|
|
|
610
635
|
})}
|
|
611
636
|
</div>
|
|
612
637
|
) : null}
|
|
613
|
-
</
|
|
638
|
+
</Stack__>
|
|
614
639
|
) as React.ReactElement | null;
|
|
615
640
|
}
|
|
616
641
|
|
|
617
|
-
function useBehavior<P extends pp.
|
|
642
|
+
function useBehavior<P extends pp.PlumeButtonProps>(
|
|
618
643
|
props: P,
|
|
619
644
|
ref: pp.ButtonRef
|
|
620
645
|
) {
|
|
@@ -635,9 +660,8 @@ function useBehavior<P extends pp.BaseButtonProps>(
|
|
|
635
660
|
},
|
|
636
661
|
ref
|
|
637
662
|
);
|
|
638
|
-
|
|
639
663
|
if (b.plasmicProps.overrides.root.as === "a") {
|
|
640
|
-
b.plasmicProps.overrides.root.as =
|
|
664
|
+
b.plasmicProps.overrides.root.as = PlasmicLink__;
|
|
641
665
|
b.plasmicProps.overrides.root.props.component = Link;
|
|
642
666
|
b.plasmicProps.overrides.root.props.platform = "gatsby";
|
|
643
667
|
}
|
|
@@ -672,15 +696,15 @@ type NodeComponentProps<T extends NodeNameType> =
|
|
|
672
696
|
args?: PlasmicButton__ArgsType;
|
|
673
697
|
overrides?: NodeOverridesType<T>;
|
|
674
698
|
} & Omit<PlasmicButton__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
/* Specify overrides for each element directly as props*/ Omit<
|
|
699
|
+
// Specify args directly as props
|
|
700
|
+
Omit<PlasmicButton__ArgsType, ReservedPropsType> &
|
|
701
|
+
// Specify overrides for each element directly as props
|
|
702
|
+
Omit<
|
|
680
703
|
NodeOverridesType<T>,
|
|
681
704
|
ReservedPropsType | VariantPropType | ArgPropType
|
|
682
705
|
> &
|
|
683
|
-
|
|
706
|
+
// Specify props for the root element
|
|
707
|
+
Omit<
|
|
684
708
|
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
685
709
|
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
686
710
|
>;
|
|
@@ -694,7 +718,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
|
694
718
|
() =>
|
|
695
719
|
deriveRenderOpts(props, {
|
|
696
720
|
name: nodeName,
|
|
697
|
-
descendantNames:
|
|
721
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
698
722
|
internalArgPropNames: PlasmicButton__ArgProps,
|
|
699
723
|
internalVariantPropNames: PlasmicButton__VariantProps
|
|
700
724
|
}),
|
package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* tslint:disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
4
|
/* prettier-ignore-start */
|
|
5
5
|
|
|
6
6
|
/** @jsxRuntime classic */
|
|
@@ -19,32 +19,57 @@ import {
|
|
|
19
19
|
navigate as __gatsbyNavigate
|
|
20
20
|
} from "gatsby";
|
|
21
21
|
|
|
22
|
-
import * as p from "@plasmicapp/react-web";
|
|
23
|
-
import * as ph from "@plasmicapp/react-web/lib/host";
|
|
24
|
-
|
|
25
22
|
import {
|
|
26
|
-
|
|
27
|
-
classNames,
|
|
28
|
-
wrapWithClassName,
|
|
29
|
-
createPlasmicElementProxy,
|
|
30
|
-
makeFragment,
|
|
23
|
+
Flex as Flex__,
|
|
31
24
|
MultiChoiceArg,
|
|
25
|
+
PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
|
|
26
|
+
PlasmicIcon as PlasmicIcon__,
|
|
27
|
+
PlasmicImg as PlasmicImg__,
|
|
28
|
+
PlasmicLink as PlasmicLink__,
|
|
29
|
+
PlasmicPageGuard as PlasmicPageGuard__,
|
|
32
30
|
SingleBooleanChoiceArg,
|
|
33
31
|
SingleChoiceArg,
|
|
34
|
-
|
|
35
|
-
omit,
|
|
36
|
-
useTrigger,
|
|
32
|
+
Stack as Stack__,
|
|
37
33
|
StrictProps,
|
|
34
|
+
Trans as Trans__,
|
|
35
|
+
classNames,
|
|
36
|
+
createPlasmicElementProxy,
|
|
38
37
|
deriveRenderOpts,
|
|
39
|
-
ensureGlobalVariants
|
|
38
|
+
ensureGlobalVariants,
|
|
39
|
+
generateOnMutateForSpec,
|
|
40
|
+
generateStateOnChangeProp,
|
|
41
|
+
generateStateOnChangePropForCodeComponents,
|
|
42
|
+
generateStateValueProp,
|
|
43
|
+
get as $stateGet,
|
|
44
|
+
hasVariant,
|
|
45
|
+
initializeCodeComponentStates,
|
|
46
|
+
initializePlasmicStates,
|
|
47
|
+
makeFragment,
|
|
48
|
+
omit,
|
|
49
|
+
pick,
|
|
50
|
+
renderPlasmicSlot,
|
|
51
|
+
set as $stateSet,
|
|
52
|
+
useCurrentUser,
|
|
53
|
+
useDollarState,
|
|
54
|
+
usePlasmicTranslator,
|
|
55
|
+
useTrigger,
|
|
56
|
+
wrapWithClassName
|
|
40
57
|
} from "@plasmicapp/react-web";
|
|
58
|
+
import {
|
|
59
|
+
DataCtxReader as DataCtxReader__,
|
|
60
|
+
useDataEnv,
|
|
61
|
+
useGlobalActions
|
|
62
|
+
} from "@plasmicapp/react-web/lib/host";
|
|
63
|
+
|
|
41
64
|
import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
|
|
42
65
|
|
|
43
66
|
import "@plasmicapp/react-web/lib/plasmic.css";
|
|
44
67
|
|
|
45
|
-
import * as projectcss from "./
|
|
68
|
+
import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
|
|
46
69
|
import * as sty from "./PlasmicDynamicPage.module.css"; // plasmic-import: AO44A-w7hh/css
|
|
47
70
|
|
|
71
|
+
createPlasmicElementProxy;
|
|
72
|
+
|
|
48
73
|
export type PlasmicDynamicPage__VariantMembers = {};
|
|
49
74
|
export type PlasmicDynamicPage__VariantsArgs = {};
|
|
50
75
|
type VariantPropType = keyof PlasmicDynamicPage__VariantsArgs;
|
|
@@ -55,23 +80,17 @@ type ArgPropType = keyof PlasmicDynamicPage__ArgsType;
|
|
|
55
80
|
export const PlasmicDynamicPage__ArgProps = new Array<ArgPropType>();
|
|
56
81
|
|
|
57
82
|
export type PlasmicDynamicPage__OverridesType = {
|
|
58
|
-
root?:
|
|
59
|
-
section?:
|
|
60
|
-
h1?:
|
|
61
|
-
randomDynamicPageButton?:
|
|
83
|
+
root?: Flex__<"div">;
|
|
84
|
+
section?: Flex__<"section">;
|
|
85
|
+
h1?: Flex__<"h1">;
|
|
86
|
+
randomDynamicPageButton?: Flex__<typeof RandomDynamicPageButton>;
|
|
62
87
|
};
|
|
63
88
|
|
|
64
89
|
export interface DefaultDynamicPageProps {
|
|
65
90
|
className?: string;
|
|
66
91
|
}
|
|
67
92
|
|
|
68
|
-
const
|
|
69
|
-
globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
|
|
70
|
-
const __wrapUserPromise =
|
|
71
|
-
globalThis.__PlasmicWrapUserPromise ??
|
|
72
|
-
(async (loc, promise) => {
|
|
73
|
-
return await promise;
|
|
74
|
-
});
|
|
93
|
+
const $$ = {};
|
|
75
94
|
|
|
76
95
|
export function Head() {
|
|
77
96
|
return <></>;
|
|
@@ -85,19 +104,26 @@ function PlasmicDynamicPage__RenderFunc(props: {
|
|
|
85
104
|
}) {
|
|
86
105
|
const { variants, overrides, forNode } = props;
|
|
87
106
|
|
|
88
|
-
const
|
|
89
|
-
|
|
107
|
+
const args = React.useMemo(
|
|
108
|
+
() =>
|
|
109
|
+
Object.assign(
|
|
110
|
+
{},
|
|
111
|
+
Object.fromEntries(
|
|
112
|
+
Object.entries(props.args).filter(([_, v]) => v !== undefined)
|
|
113
|
+
)
|
|
114
|
+
),
|
|
115
|
+
[props.args]
|
|
116
|
+
);
|
|
90
117
|
|
|
91
118
|
const $props = {
|
|
92
119
|
...args,
|
|
93
120
|
...variants
|
|
94
121
|
};
|
|
122
|
+
|
|
123
|
+
const $ctx = useDataEnv?.() || {};
|
|
95
124
|
const refsRef = React.useRef({});
|
|
96
125
|
const $refs = refsRef.current;
|
|
97
126
|
|
|
98
|
-
const currentUser = p.useCurrentUser?.() || {};
|
|
99
|
-
const [$queries, setDollarQueries] = React.useState({});
|
|
100
|
-
|
|
101
127
|
return (
|
|
102
128
|
<React.Fragment>
|
|
103
129
|
<style>{`
|
|
@@ -117,10 +143,11 @@ function PlasmicDynamicPage__RenderFunc(props: {
|
|
|
117
143
|
projectcss.root_reset,
|
|
118
144
|
projectcss.plasmic_default_styles,
|
|
119
145
|
projectcss.plasmic_mixins,
|
|
146
|
+
projectcss.plasmic_tokens,
|
|
120
147
|
sty.root
|
|
121
148
|
)}
|
|
122
149
|
>
|
|
123
|
-
<
|
|
150
|
+
<Stack__
|
|
124
151
|
as={"section"}
|
|
125
152
|
data-plasmic-name={"section"}
|
|
126
153
|
data-plasmic-override={overrides.section}
|
|
@@ -137,18 +164,22 @@ function PlasmicDynamicPage__RenderFunc(props: {
|
|
|
137
164
|
sty.h1
|
|
138
165
|
)}
|
|
139
166
|
>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
167
|
+
<React.Fragment>
|
|
168
|
+
{(() => {
|
|
169
|
+
try {
|
|
170
|
+
return $ctx.params.slug;
|
|
171
|
+
} catch (e) {
|
|
172
|
+
if (
|
|
173
|
+
e instanceof TypeError ||
|
|
174
|
+
e?.plasmicType === "PlasmicUndefinedDataError"
|
|
175
|
+
) {
|
|
176
|
+
return "Page 1";
|
|
177
|
+
}
|
|
178
|
+
throw e;
|
|
146
179
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
})()}
|
|
180
|
+
})()}
|
|
181
|
+
</React.Fragment>
|
|
150
182
|
</h1>
|
|
151
|
-
|
|
152
183
|
<RandomDynamicPageButton
|
|
153
184
|
data-plasmic-name={"randomDynamicPageButton"}
|
|
154
185
|
data-plasmic-override={overrides.randomDynamicPageButton}
|
|
@@ -157,7 +188,7 @@ function PlasmicDynamicPage__RenderFunc(props: {
|
|
|
157
188
|
sty.randomDynamicPageButton
|
|
158
189
|
)}
|
|
159
190
|
/>
|
|
160
|
-
</
|
|
191
|
+
</Stack__>
|
|
161
192
|
</div>
|
|
162
193
|
</div>
|
|
163
194
|
</React.Fragment>
|
|
@@ -192,15 +223,15 @@ type NodeComponentProps<T extends NodeNameType> =
|
|
|
192
223
|
args?: PlasmicDynamicPage__ArgsType;
|
|
193
224
|
overrides?: NodeOverridesType<T>;
|
|
194
225
|
} & Omit<PlasmicDynamicPage__VariantsArgs, ReservedPropsType> & // Specify variants directly as props
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
/* Specify overrides for each element directly as props*/ Omit<
|
|
226
|
+
// Specify args directly as props
|
|
227
|
+
Omit<PlasmicDynamicPage__ArgsType, ReservedPropsType> &
|
|
228
|
+
// Specify overrides for each element directly as props
|
|
229
|
+
Omit<
|
|
200
230
|
NodeOverridesType<T>,
|
|
201
231
|
ReservedPropsType | VariantPropType | ArgPropType
|
|
202
232
|
> &
|
|
203
|
-
|
|
233
|
+
// Specify props for the root element
|
|
234
|
+
Omit<
|
|
204
235
|
Partial<React.ComponentProps<NodeDefaultElementType[T]>>,
|
|
205
236
|
ReservedPropsType | VariantPropType | ArgPropType | DescendantsType<T>
|
|
206
237
|
>;
|
|
@@ -214,7 +245,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
|
|
|
214
245
|
() =>
|
|
215
246
|
deriveRenderOpts(props, {
|
|
216
247
|
name: nodeName,
|
|
217
|
-
descendantNames:
|
|
248
|
+
descendantNames: PlasmicDescendants[nodeName],
|
|
218
249
|
internalArgPropNames: PlasmicDynamicPage__ArgProps,
|
|
219
250
|
internalVariantPropNames: PlasmicDynamicPage__VariantProps
|
|
220
251
|
}),
|