create-plasmic-app 0.0.104 → 0.0.106
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/.gitignore +4 -0
- package/cpa-out/react-codegen-js/eslint.config.js +9 -13
- package/cpa-out/react-codegen-js/package.json +12 -12
- package/cpa-out/react-codegen-js/plasmic.json +2 -2
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +8 -0
- package/cpa-out/react-codegen-ts/eslint.config.js +10 -15
- package/cpa-out/react-codegen-ts/package.json +14 -14
- package/cpa-out/react-codegen-ts/plasmic.json +2 -2
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +9 -0
- package/cpa-out/tanstack-codegen-ts/package.json +42 -0
- package/cpa-out/tanstack-codegen-ts/plasmic.json +136 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Button.tsx +35 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Header.tsx +21 -0
- package/cpa-out/tanstack-codegen-ts/src/components/RandomDynamicPageButton.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +870 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +309 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +28 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +351 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +279 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
- package/cpa-out/tanstack-codegen-ts/src/routeTree.gen.ts +95 -0
- package/cpa-out/tanstack-codegen-ts/src/router.tsx +24 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/__root.tsx +37 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/dynamic/$slug/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/plasmic-host.tsx +20 -0
- package/cpa-out/tanstack-codegen-ts/tsconfig.json +28 -0
- package/cpa-out/tanstack-codegen-ts/vite.config.ts +26 -0
- package/dist/tanstack/tanstack.js +1 -1
- package/dist/tanstack/templates/file-router/config.d.ts +1 -1
- package/dist/tanstack/templates/file-router/config.js +27 -27
- package/package.json +2 -2
- package/src/tanstack/tanstack.ts +3 -3
- package/src/tanstack/templates/file-router/config.ts +25 -25
package/cpa-out/.gitignore
CHANGED
|
@@ -2,11 +2,17 @@ import js from '@eslint/js'
|
|
|
2
2
|
import globals from 'globals'
|
|
3
3
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
4
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
5
6
|
|
|
6
|
-
export default [
|
|
7
|
-
|
|
7
|
+
export default defineConfig([
|
|
8
|
+
globalIgnores(['dist']),
|
|
8
9
|
{
|
|
9
10
|
files: ['**/*.{js,jsx}'],
|
|
11
|
+
extends: [
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
reactHooks.configs['recommended-latest'],
|
|
14
|
+
reactRefresh.configs.vite,
|
|
15
|
+
],
|
|
10
16
|
languageOptions: {
|
|
11
17
|
ecmaVersion: 2020,
|
|
12
18
|
globals: globals.browser,
|
|
@@ -16,18 +22,8 @@ export default [
|
|
|
16
22
|
sourceType: 'module',
|
|
17
23
|
},
|
|
18
24
|
},
|
|
19
|
-
plugins: {
|
|
20
|
-
'react-hooks': reactHooks,
|
|
21
|
-
'react-refresh': reactRefresh,
|
|
22
|
-
},
|
|
23
25
|
rules: {
|
|
24
|
-
...js.configs.recommended.rules,
|
|
25
|
-
...reactHooks.configs.recommended.rules,
|
|
26
26
|
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
|
27
|
-
'react-refresh/only-export-components': [
|
|
28
|
-
'warn',
|
|
29
|
-
{ allowConstantExport: true },
|
|
30
|
-
],
|
|
31
27
|
},
|
|
32
28
|
},
|
|
33
|
-
]
|
|
29
|
+
])
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
"preview": "vite preview"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@plasmicapp/cli": "^0.1.
|
|
14
|
-
"@plasmicapp/react-web": "^0.2.
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-dom": "^19.
|
|
13
|
+
"@plasmicapp/cli": "^0.1.338",
|
|
14
|
+
"@plasmicapp/react-web": "^0.2.393",
|
|
15
|
+
"react": "^19.1.0",
|
|
16
|
+
"react-dom": "^19.1.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@eslint/js": "^9.
|
|
20
|
-
"@types/react": "^19.
|
|
21
|
-
"@types/react-dom": "^19.
|
|
22
|
-
"@vitejs/plugin-react": "^4.
|
|
23
|
-
"eslint": "^9.
|
|
19
|
+
"@eslint/js": "^9.29.0",
|
|
20
|
+
"@types/react": "^19.1.8",
|
|
21
|
+
"@types/react-dom": "^19.1.6",
|
|
22
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
23
|
+
"eslint": "^9.29.0",
|
|
24
24
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
25
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
26
|
-
"globals": "^16.
|
|
27
|
-
"vite": "^
|
|
25
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
26
|
+
"globals": "^16.2.0",
|
|
27
|
+
"vite": "^7.0.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -128,6 +128,6 @@
|
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
130
|
"wrapPagesWithGlobalContexts": true,
|
|
131
|
-
"cliVersion": "0.1.
|
|
132
|
-
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.
|
|
131
|
+
"cliVersion": "0.1.338",
|
|
132
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.338/dist/plasmic.schema.json"
|
|
133
133
|
}
|
|
@@ -9,6 +9,14 @@ export const ScreenContext = React.createContext(
|
|
|
9
9
|
"PLEASE_RENDER_INSIDE_PROVIDER"
|
|
10
10
|
);
|
|
11
11
|
|
|
12
|
+
export function ScreenContextProvider(props) {
|
|
13
|
+
return (
|
|
14
|
+
<ScreenContext.Provider value={props.value}>
|
|
15
|
+
{props.children}
|
|
16
|
+
</ScreenContext.Provider>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
export const useScreenVariants = createUseScreenVariants(true, {
|
|
13
21
|
desktopOnly: "(min-width:768px)",
|
|
14
22
|
});
|
|
@@ -3,26 +3,21 @@ import globals from 'globals'
|
|
|
3
3
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
4
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
5
|
import tseslint from 'typescript-eslint'
|
|
6
|
+
import { globalIgnores } from 'eslint/config'
|
|
6
7
|
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
|
|
8
|
+
export default tseslint.config([
|
|
9
|
+
globalIgnores(['dist']),
|
|
9
10
|
{
|
|
10
|
-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
11
|
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
tseslint.configs.recommended,
|
|
15
|
+
reactHooks.configs['recommended-latest'],
|
|
16
|
+
reactRefresh.configs.vite,
|
|
17
|
+
],
|
|
12
18
|
languageOptions: {
|
|
13
19
|
ecmaVersion: 2020,
|
|
14
20
|
globals: globals.browser,
|
|
15
21
|
},
|
|
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
22
|
},
|
|
28
|
-
)
|
|
23
|
+
])
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
"preview": "vite preview"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@plasmicapp/cli": "^0.1.
|
|
14
|
-
"@plasmicapp/react-web": "^0.2.
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-dom": "^19.
|
|
13
|
+
"@plasmicapp/cli": "^0.1.338",
|
|
14
|
+
"@plasmicapp/react-web": "^0.2.393",
|
|
15
|
+
"react": "^19.1.0",
|
|
16
|
+
"react-dom": "^19.1.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@eslint/js": "^9.
|
|
20
|
-
"@types/react": "^19.
|
|
21
|
-
"@types/react-dom": "^19.
|
|
22
|
-
"@vitejs/plugin-react": "^4.
|
|
23
|
-
"eslint": "^9.
|
|
19
|
+
"@eslint/js": "^9.29.0",
|
|
20
|
+
"@types/react": "^19.1.8",
|
|
21
|
+
"@types/react-dom": "^19.1.6",
|
|
22
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
23
|
+
"eslint": "^9.29.0",
|
|
24
24
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
25
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
26
|
-
"globals": "^16.
|
|
27
|
-
"typescript": "~5.
|
|
28
|
-
"typescript-eslint": "^8.
|
|
29
|
-
"vite": "^
|
|
25
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
26
|
+
"globals": "^16.2.0",
|
|
27
|
+
"typescript": "~5.8.3",
|
|
28
|
+
"typescript-eslint": "^8.34.1",
|
|
29
|
+
"vite": "^7.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -128,6 +128,6 @@
|
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
130
|
"wrapPagesWithGlobalContexts": true,
|
|
131
|
-
"cliVersion": "0.1.
|
|
132
|
-
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.
|
|
131
|
+
"cliVersion": "0.1.338",
|
|
132
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.338/dist/plasmic.schema.json"
|
|
133
133
|
}
|
|
@@ -10,6 +10,15 @@ export type ScreenValue = "desktopOnly";
|
|
|
10
10
|
export const ScreenContext = React.createContext<ScreenValue[] | undefined>(
|
|
11
11
|
"PLEASE_RENDER_INSIDE_PROVIDER" as any
|
|
12
12
|
);
|
|
13
|
+
export function ScreenContextProvider(
|
|
14
|
+
props: React.PropsWithChildren<{ value: ScreenValue[] | undefined }>
|
|
15
|
+
) {
|
|
16
|
+
return (
|
|
17
|
+
<ScreenContext.Provider value={props.value}>
|
|
18
|
+
{props.children}
|
|
19
|
+
</ScreenContext.Provider>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
13
22
|
|
|
14
23
|
export const useScreenVariants = createUseScreenVariants(true, {
|
|
15
24
|
desktopOnly: "(min-width:768px)",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tanstack-codegen-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite dev --port 3000",
|
|
7
|
+
"start": "node .output/server/index.mjs",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"serve": "vite preview",
|
|
10
|
+
"test": "vitest run"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@plasmicapp/cli": "^0.1.338",
|
|
14
|
+
"@plasmicapp/react-web": "^0.2.393",
|
|
15
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
16
|
+
"@tanstack/react-router": "^1.121.2",
|
|
17
|
+
"@tanstack/react-router-devtools": "^1.121.2",
|
|
18
|
+
"@tanstack/react-router-with-query": "^1.121.2",
|
|
19
|
+
"@tanstack/react-start": "^1.121.2",
|
|
20
|
+
"@tanstack/router-plugin": "^1.121.2",
|
|
21
|
+
"react": "^19.0.0",
|
|
22
|
+
"react-dom": "^19.0.0",
|
|
23
|
+
"tailwindcss": "^4.0.6",
|
|
24
|
+
"vite": "^6.3.3",
|
|
25
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@testing-library/dom": "^10.4.0",
|
|
29
|
+
"@testing-library/react": "^16.2.0",
|
|
30
|
+
"@types/react": "^19.0.8",
|
|
31
|
+
"@types/react-dom": "^19.0.3",
|
|
32
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
33
|
+
"jsdom": "^26.0.0",
|
|
34
|
+
"typescript": "^5.7.2",
|
|
35
|
+
"vite": "^6.1.0",
|
|
36
|
+
"vitest": "^3.0.5",
|
|
37
|
+
"web-vitals": "^4.2.4"
|
|
38
|
+
},
|
|
39
|
+
"overrides": {
|
|
40
|
+
"@tanstack/react-router": "^1.121.2"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platform": "tanstack",
|
|
3
|
+
"code": {
|
|
4
|
+
"lang": "ts",
|
|
5
|
+
"scheme": "blackbox",
|
|
6
|
+
"reactRuntime": "classic"
|
|
7
|
+
},
|
|
8
|
+
"style": {
|
|
9
|
+
"scheme": "css",
|
|
10
|
+
"defaultStyleCssFilePath": "plasmic/plasmic__default_style.css"
|
|
11
|
+
},
|
|
12
|
+
"images": {
|
|
13
|
+
"scheme": "public-files",
|
|
14
|
+
"publicDir": "../../public",
|
|
15
|
+
"publicUrlPrefix": "/"
|
|
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.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": "../routes/index.tsx"
|
|
39
|
+
},
|
|
40
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.css",
|
|
41
|
+
"scheme": "blackbox",
|
|
42
|
+
"componentType": "page",
|
|
43
|
+
"path": "/"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "AO44A-w7hh",
|
|
47
|
+
"name": "DynamicPage",
|
|
48
|
+
"type": "managed",
|
|
49
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
50
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.tsx",
|
|
51
|
+
"importSpec": {
|
|
52
|
+
"modulePath": "../routes/dynamic/$slug/index.tsx"
|
|
53
|
+
},
|
|
54
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.css",
|
|
55
|
+
"scheme": "blackbox",
|
|
56
|
+
"componentType": "page",
|
|
57
|
+
"path": "/dynamic/[slug]"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "TQcvW_pSKi3",
|
|
61
|
+
"name": "Button",
|
|
62
|
+
"type": "managed",
|
|
63
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
64
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicButton.tsx",
|
|
65
|
+
"importSpec": {
|
|
66
|
+
"modulePath": "Button.tsx"
|
|
67
|
+
},
|
|
68
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicButton.css",
|
|
69
|
+
"scheme": "blackbox",
|
|
70
|
+
"componentType": "component",
|
|
71
|
+
"plumeType": "button"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "Q23H1_1M_P",
|
|
75
|
+
"name": "RandomDynamicPageButton",
|
|
76
|
+
"type": "managed",
|
|
77
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
78
|
+
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx",
|
|
79
|
+
"importSpec": {
|
|
80
|
+
"modulePath": "RandomDynamicPageButton.tsx"
|
|
81
|
+
},
|
|
82
|
+
"cssFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.css",
|
|
83
|
+
"scheme": "blackbox",
|
|
84
|
+
"componentType": "component"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"icons": [
|
|
88
|
+
{
|
|
89
|
+
"id": "gj-_D7n31Ho",
|
|
90
|
+
"name": "CheckSvgIcon",
|
|
91
|
+
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "6PNxx3YMyDQ",
|
|
95
|
+
"name": "IconIcon",
|
|
96
|
+
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"images": [],
|
|
100
|
+
"indirect": false,
|
|
101
|
+
"globalContextsFilePath": "",
|
|
102
|
+
"splitsProviderFilePath": "",
|
|
103
|
+
"codeComponents": [
|
|
104
|
+
{
|
|
105
|
+
"id": "P6aGdYWZ2R",
|
|
106
|
+
"name": "PlasmicHead",
|
|
107
|
+
"displayName": "hostless-plasmic-head",
|
|
108
|
+
"componentImportPath": "@plasmicapp/react-web"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "8G2A-uTjGa",
|
|
112
|
+
"name": "Fetcher",
|
|
113
|
+
"displayName": "plasmic-data-source-fetcher",
|
|
114
|
+
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"customFunctions": []
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"globalVariants": {
|
|
121
|
+
"variantGroups": [
|
|
122
|
+
{
|
|
123
|
+
"id": "SCBjPXGDXDZBV",
|
|
124
|
+
"name": "Screen",
|
|
125
|
+
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
126
|
+
"contextFilePath": "plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"wrapPagesWithGlobalContexts": true,
|
|
131
|
+
"tanstackConfig": {
|
|
132
|
+
"pagesDir": "../routes"
|
|
133
|
+
},
|
|
134
|
+
"cliVersion": "0.1.338",
|
|
135
|
+
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.338/dist/plasmic.schema.json"
|
|
136
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
PlasmicButton,
|
|
4
|
+
DefaultButtonProps
|
|
5
|
+
} from "./plasmic/create_plasmic_app/PlasmicButton";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
ButtonRef,
|
|
9
|
+
HtmlAnchorOnlyProps,
|
|
10
|
+
HtmlButtonOnlyProps
|
|
11
|
+
} from "@plasmicapp/react-web";
|
|
12
|
+
|
|
13
|
+
export interface ButtonProps extends DefaultButtonProps {
|
|
14
|
+
// Feel free to add any additional props that this component should receive
|
|
15
|
+
}
|
|
16
|
+
function Button_(props: ButtonProps, ref: ButtonRef) {
|
|
17
|
+
const { plasmicProps } = PlasmicButton.useBehavior<ButtonProps>(props, ref);
|
|
18
|
+
return <PlasmicButton {...plasmicProps} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ButtonComponentType = {
|
|
22
|
+
(
|
|
23
|
+
props: Omit<ButtonProps, HtmlAnchorOnlyProps> & {
|
|
24
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
25
|
+
}
|
|
26
|
+
): React.ReactElement;
|
|
27
|
+
(
|
|
28
|
+
props: Omit<ButtonProps, HtmlButtonOnlyProps> & {
|
|
29
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
30
|
+
}
|
|
31
|
+
): React.ReactElement;
|
|
32
|
+
};
|
|
33
|
+
const Button = React.forwardRef(Button_) as any as ButtonComponentType;
|
|
34
|
+
|
|
35
|
+
export default Object.assign(Button, { __plumeType: "button" });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Link } from '@tanstack/react-router'
|
|
2
|
+
|
|
3
|
+
export default function Header() {
|
|
4
|
+
return (
|
|
5
|
+
<header className="p-2 flex gap-2 bg-white text-black justify-between">
|
|
6
|
+
<nav className="flex flex-row">
|
|
7
|
+
<div className="px-2 font-bold">
|
|
8
|
+
<Link to="/">Home</Link>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div className="px-2 font-bold">
|
|
12
|
+
<Link to="/demo/start/server-funcs">Start - Server Functions</Link>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div className="px-2 font-bold">
|
|
16
|
+
<Link to="/demo/start/api-request">Start - API Request</Link>
|
|
17
|
+
</div>
|
|
18
|
+
</nav>
|
|
19
|
+
</header>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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;
|