jac-client 0.2.3__py3-none-any.whl → 0.2.4__py3-none-any.whl
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.
- jac_client/examples/all-in-one/assets/workers/worker.py +5 -0
- jac_client/tests/conftest.py +281 -0
- jac_client/tests/test_cli.py +755 -0
- jac_client/tests/test_it.py +347 -67
- {jac_client-0.2.3.dist-info → jac_client-0.2.4.dist-info}/METADATA +28 -30
- jac_client-0.2.4.dist-info/RECORD +10 -0
- {jac_client-0.2.3.dist-info → jac_client-0.2.4.dist-info}/WHEEL +2 -1
- jac_client-0.2.4.dist-info/entry_points.txt +4 -0
- jac_client-0.2.4.dist-info/top_level.txt +1 -0
- jac_client/docs/README.md +0 -689
- jac_client/docs/advanced-state.md +0 -1265
- jac_client/docs/asset-serving/intro.md +0 -209
- jac_client/docs/assets/pipe_line-v2.svg +0 -32
- jac_client/docs/assets/pipe_line.png +0 -0
- jac_client/docs/file-system/app.jac.md +0 -121
- jac_client/docs/file-system/backend-frontend.md +0 -217
- jac_client/docs/file-system/intro.md +0 -72
- jac_client/docs/file-system/nested-imports.md +0 -348
- jac_client/docs/guide-example/intro.md +0 -115
- jac_client/docs/guide-example/step-01-setup.md +0 -270
- jac_client/docs/guide-example/step-02-components.md +0 -416
- jac_client/docs/guide-example/step-03-styling.md +0 -478
- jac_client/docs/guide-example/step-04-todo-ui.md +0 -477
- jac_client/docs/guide-example/step-05-local-state.md +0 -530
- jac_client/docs/guide-example/step-06-events.md +0 -749
- jac_client/docs/guide-example/step-07-effects.md +0 -468
- jac_client/docs/guide-example/step-08-walkers.md +0 -534
- jac_client/docs/guide-example/step-09-authentication.md +0 -586
- jac_client/docs/guide-example/step-10-routing.md +0 -539
- jac_client/docs/guide-example/step-11-final.md +0 -963
- jac_client/docs/imports.md +0 -1141
- jac_client/docs/lifecycle-hooks.md +0 -773
- jac_client/docs/routing.md +0 -659
- jac_client/docs/styling/intro.md +0 -249
- jac_client/docs/styling/js-styling.md +0 -367
- jac_client/docs/styling/material-ui.md +0 -341
- jac_client/docs/styling/pure-css.md +0 -299
- jac_client/docs/styling/sass.md +0 -403
- jac_client/docs/styling/styled-components.md +0 -395
- jac_client/docs/styling/tailwind.md +0 -298
- jac_client/examples/all-in-one/.babelrc +0 -9
- jac_client/examples/all-in-one/README.md +0 -16
- jac_client/examples/all-in-one/app.jac +0 -426
- jac_client/examples/all-in-one/assets/burger.png +0 -0
- jac_client/examples/all-in-one/button.jac +0 -7
- jac_client/examples/all-in-one/components/button.jac +0 -7
- jac_client/examples/all-in-one/package.json +0 -29
- jac_client/examples/all-in-one/styles.css +0 -26
- jac_client/examples/all-in-one/vite.config.js +0 -28
- jac_client/examples/asset-serving/css-with-image/.babelrc +0 -9
- jac_client/examples/asset-serving/css-with-image/README.md +0 -91
- jac_client/examples/asset-serving/css-with-image/app.jac +0 -88
- jac_client/examples/asset-serving/css-with-image/assets/burger.png +0 -0
- jac_client/examples/asset-serving/css-with-image/package.json +0 -28
- jac_client/examples/asset-serving/css-with-image/styles.css +0 -26
- jac_client/examples/asset-serving/css-with-image/vite.config.js +0 -28
- jac_client/examples/asset-serving/image-asset/.babelrc +0 -9
- jac_client/examples/asset-serving/image-asset/README.md +0 -119
- jac_client/examples/asset-serving/image-asset/app.jac +0 -55
- jac_client/examples/asset-serving/image-asset/assets/burger.png +0 -0
- jac_client/examples/asset-serving/image-asset/package.json +0 -28
- jac_client/examples/asset-serving/image-asset/styles.css +0 -26
- jac_client/examples/asset-serving/image-asset/vite.config.js +0 -28
- jac_client/examples/asset-serving/import-alias/.babelrc +0 -9
- jac_client/examples/asset-serving/import-alias/README.md +0 -83
- jac_client/examples/asset-serving/import-alias/app.jac +0 -111
- jac_client/examples/asset-serving/import-alias/assets/burger.png +0 -0
- jac_client/examples/asset-serving/import-alias/package.json +0 -28
- jac_client/examples/asset-serving/import-alias/vite.config.js +0 -28
- jac_client/examples/basic/.babelrc +0 -9
- jac_client/examples/basic/README.md +0 -16
- jac_client/examples/basic/app.jac +0 -21
- jac_client/examples/basic/package.json +0 -27
- jac_client/examples/basic/vite.config.js +0 -27
- jac_client/examples/basic-auth/.babelrc +0 -9
- jac_client/examples/basic-auth/README.md +0 -16
- jac_client/examples/basic-auth/app.jac +0 -308
- jac_client/examples/basic-auth/package.json +0 -27
- jac_client/examples/basic-auth/vite.config.js +0 -27
- jac_client/examples/basic-auth-with-router/.babelrc +0 -9
- jac_client/examples/basic-auth-with-router/README.md +0 -60
- jac_client/examples/basic-auth-with-router/app.jac +0 -464
- jac_client/examples/basic-auth-with-router/package.json +0 -28
- jac_client/examples/basic-auth-with-router/vite.config.js +0 -27
- jac_client/examples/basic-full-stack/.babelrc +0 -9
- jac_client/examples/basic-full-stack/README.md +0 -18
- jac_client/examples/basic-full-stack/app.jac +0 -320
- jac_client/examples/basic-full-stack/package.json +0 -28
- jac_client/examples/basic-full-stack/vite.config.js +0 -27
- jac_client/examples/css-styling/js-styling/.babelrc +0 -9
- jac_client/examples/css-styling/js-styling/README.md +0 -183
- jac_client/examples/css-styling/js-styling/app.jac +0 -84
- jac_client/examples/css-styling/js-styling/package.json +0 -28
- jac_client/examples/css-styling/js-styling/styles.js +0 -100
- jac_client/examples/css-styling/js-styling/vite.config.js +0 -27
- jac_client/examples/css-styling/material-ui/.babelrc +0 -9
- jac_client/examples/css-styling/material-ui/README.md +0 -16
- jac_client/examples/css-styling/material-ui/app.jac +0 -122
- jac_client/examples/css-styling/material-ui/package.json +0 -32
- jac_client/examples/css-styling/material-ui/vite.config.js +0 -27
- jac_client/examples/css-styling/pure-css/.babelrc +0 -9
- jac_client/examples/css-styling/pure-css/README.md +0 -16
- jac_client/examples/css-styling/pure-css/app.jac +0 -64
- jac_client/examples/css-styling/pure-css/package.json +0 -28
- jac_client/examples/css-styling/pure-css/styles.css +0 -111
- jac_client/examples/css-styling/pure-css/vite.config.js +0 -27
- jac_client/examples/css-styling/sass-example/.babelrc +0 -9
- jac_client/examples/css-styling/sass-example/README.md +0 -16
- jac_client/examples/css-styling/sass-example/app.jac +0 -64
- jac_client/examples/css-styling/sass-example/package.json +0 -29
- jac_client/examples/css-styling/sass-example/styles.scss +0 -153
- jac_client/examples/css-styling/sass-example/vite.config.js +0 -27
- jac_client/examples/css-styling/styled-components/.babelrc +0 -9
- jac_client/examples/css-styling/styled-components/README.md +0 -16
- jac_client/examples/css-styling/styled-components/app.jac +0 -71
- jac_client/examples/css-styling/styled-components/package.json +0 -29
- jac_client/examples/css-styling/styled-components/styled.js +0 -90
- jac_client/examples/css-styling/styled-components/vite.config.js +0 -27
- jac_client/examples/css-styling/tailwind-example/.babelrc +0 -9
- jac_client/examples/css-styling/tailwind-example/README.md +0 -16
- jac_client/examples/css-styling/tailwind-example/app.jac +0 -63
- jac_client/examples/css-styling/tailwind-example/global.css +0 -1
- jac_client/examples/css-styling/tailwind-example/package.json +0 -30
- jac_client/examples/css-styling/tailwind-example/vite.config.js +0 -29
- jac_client/examples/full-stack-with-auth/.babelrc +0 -9
- jac_client/examples/full-stack-with-auth/README.md +0 -16
- jac_client/examples/full-stack-with-auth/app.jac +0 -722
- jac_client/examples/full-stack-with-auth/package.json +0 -28
- jac_client/examples/full-stack-with-auth/vite.config.js +0 -29
- jac_client/examples/little-x/app.jac +0 -724
- jac_client/examples/little-x/package.json +0 -23
- jac_client/examples/little-x/submit-button.jac +0 -8
- jac_client/examples/nested-folders/nested-advance/.babelrc +0 -9
- jac_client/examples/nested-folders/nested-advance/ButtonRoot.jac +0 -11
- jac_client/examples/nested-folders/nested-advance/README.md +0 -77
- jac_client/examples/nested-folders/nested-advance/app.jac +0 -35
- jac_client/examples/nested-folders/nested-advance/level1/ButtonSecondL.jac +0 -19
- jac_client/examples/nested-folders/nested-advance/level1/Card.jac +0 -43
- jac_client/examples/nested-folders/nested-advance/level1/level2/ButtonThirdL.jac +0 -25
- jac_client/examples/nested-folders/nested-advance/package.json +0 -29
- jac_client/examples/nested-folders/nested-advance/vite.config.js +0 -28
- jac_client/examples/nested-folders/nested-basic/.babelrc +0 -9
- jac_client/examples/nested-folders/nested-basic/README.md +0 -183
- jac_client/examples/nested-folders/nested-basic/app.jac +0 -13
- jac_client/examples/nested-folders/nested-basic/app.js +0 -7
- jac_client/examples/nested-folders/nested-basic/button.jac +0 -7
- jac_client/examples/nested-folders/nested-basic/components/button.jac +0 -7
- jac_client/examples/nested-folders/nested-basic/package.json +0 -28
- jac_client/examples/nested-folders/nested-basic/vite.config.js +0 -27
- jac_client/examples/with-router/.babelrc +0 -9
- jac_client/examples/with-router/README.md +0 -17
- jac_client/examples/with-router/app.jac +0 -323
- jac_client/examples/with-router/package.json +0 -28
- jac_client/examples/with-router/vite.config.js +0 -27
- jac_client/plugin/cli.py +0 -244
- jac_client/plugin/client.py +0 -152
- jac_client/plugin/client_runtime.jac +0 -234
- jac_client/plugin/vite_client_bundle.py +0 -503
- jac_client/tests/fixtures/basic-app/app.jac +0 -23
- jac_client/tests/fixtures/cl_file/app.cl.jac +0 -48
- jac_client/tests/fixtures/cl_file/app.jac +0 -15
- jac_client/tests/fixtures/client_app_with_antd/app.jac +0 -34
- jac_client/tests/fixtures/js_import/app.jac +0 -34
- jac_client/tests/fixtures/js_import/utils.js +0 -21
- jac_client/tests/fixtures/package-lock.json +0 -329
- jac_client/tests/fixtures/package.json +0 -11
- jac_client/tests/fixtures/relative_import/app.jac +0 -11
- jac_client/tests/fixtures/relative_import/button.jac +0 -7
- jac_client/tests/fixtures/spawn_test/app.jac +0 -129
- jac_client/tests/fixtures/test_fragments_spread/app.jac +0 -67
- jac_client/tests/test_asset_examples.py +0 -322
- jac_client/tests/test_cl.py +0 -530
- jac_client/tests/test_create_jac_app.py +0 -131
- jac_client/tests/test_nested_file.py +0 -374
- jac_client-0.2.3.dist-info/RECORD +0 -171
- jac_client-0.2.3.dist-info/entry_points.txt +0 -4
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// Style objects for the counter app
|
|
2
|
-
const countDisplay = {
|
|
3
|
-
fontSize: "3.75rem",
|
|
4
|
-
fontWeight: "bold",
|
|
5
|
-
transition: "color 0.3s ease"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const button = {
|
|
9
|
-
color: "#ffffff",
|
|
10
|
-
fontWeight: "bold",
|
|
11
|
-
padding: "0.75rem 1.5rem",
|
|
12
|
-
borderRadius: "0.5rem",
|
|
13
|
-
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1)",
|
|
14
|
-
transition: "all 0.2s ease",
|
|
15
|
-
fontSize: "1.25rem",
|
|
16
|
-
border: "none",
|
|
17
|
-
cursor: "pointer"
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
container: {
|
|
22
|
-
minHeight: "100vh",
|
|
23
|
-
background: "linear-gradient(to bottom right, #dbeafe, #e0e7ff)",
|
|
24
|
-
display: "flex",
|
|
25
|
-
alignItems: "center",
|
|
26
|
-
justifyContent: "center",
|
|
27
|
-
padding: "1rem"
|
|
28
|
-
},
|
|
29
|
-
card: {
|
|
30
|
-
backgroundColor: "#ffffff",
|
|
31
|
-
borderRadius: "1rem",
|
|
32
|
-
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
33
|
-
padding: "2rem",
|
|
34
|
-
maxWidth: "28rem",
|
|
35
|
-
width: "100%"
|
|
36
|
-
},
|
|
37
|
-
title: {
|
|
38
|
-
fontSize: "1.875rem",
|
|
39
|
-
fontWeight: "bold",
|
|
40
|
-
color: "#1f2937",
|
|
41
|
-
textAlign: "center",
|
|
42
|
-
marginBottom: "1.5rem"
|
|
43
|
-
},
|
|
44
|
-
divider: {
|
|
45
|
-
height: "1px",
|
|
46
|
-
background: "linear-gradient(to right, transparent, #d1d5db, transparent)",
|
|
47
|
-
marginBottom: "1.5rem"
|
|
48
|
-
},
|
|
49
|
-
counterSection: {
|
|
50
|
-
textAlign: "center",
|
|
51
|
-
marginBottom: "2rem"
|
|
52
|
-
},
|
|
53
|
-
label: {
|
|
54
|
-
fontSize: "0.875rem",
|
|
55
|
-
fontWeight: "600",
|
|
56
|
-
color: "#4b5563",
|
|
57
|
-
marginBottom: "0.5rem",
|
|
58
|
-
textTransform: "uppercase",
|
|
59
|
-
letterSpacing: "0.05em"
|
|
60
|
-
},
|
|
61
|
-
countDisplay: countDisplay,
|
|
62
|
-
countDisplayZero: {
|
|
63
|
-
...countDisplay,
|
|
64
|
-
color: "#1f2937"
|
|
65
|
-
},
|
|
66
|
-
countDisplayPositive: {
|
|
67
|
-
...countDisplay,
|
|
68
|
-
color: "#16a34a"
|
|
69
|
-
},
|
|
70
|
-
countDisplayNegative: {
|
|
71
|
-
...countDisplay,
|
|
72
|
-
color: "#dc2626"
|
|
73
|
-
},
|
|
74
|
-
buttonGroup: {
|
|
75
|
-
display: "flex",
|
|
76
|
-
justifyContent: "center",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
gap: "1rem",
|
|
79
|
-
marginBottom: "1.5rem"
|
|
80
|
-
},
|
|
81
|
-
button: button,
|
|
82
|
-
buttonDecrement: {
|
|
83
|
-
...button,
|
|
84
|
-
backgroundColor: "#ef4444"
|
|
85
|
-
},
|
|
86
|
-
buttonReset: {
|
|
87
|
-
...button,
|
|
88
|
-
backgroundColor: "#6b7280"
|
|
89
|
-
},
|
|
90
|
-
buttonIncrement: {
|
|
91
|
-
...button,
|
|
92
|
-
backgroundColor: "#22c55e"
|
|
93
|
-
},
|
|
94
|
-
hint: {
|
|
95
|
-
textAlign: "center",
|
|
96
|
-
fontSize: "0.875rem",
|
|
97
|
-
color: "#6b7280",
|
|
98
|
-
fontStyle: "italic"
|
|
99
|
-
}
|
|
100
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
root: ".", // base folder
|
|
10
|
-
build: {
|
|
11
|
-
rollupOptions: {
|
|
12
|
-
input: "build/main.js", // your compiled entry file
|
|
13
|
-
output: {
|
|
14
|
-
entryFileNames: "client.[hash].js", // name of the final js file
|
|
15
|
-
assetFileNames: "[name].[ext]",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
outDir: "dist", // final bundled output
|
|
19
|
-
emptyOutDir: true,
|
|
20
|
-
},
|
|
21
|
-
publicDir: false,
|
|
22
|
-
resolve: {
|
|
23
|
-
alias: {
|
|
24
|
-
"@jac-client/utils": path.resolve(__dirname, "src/client_runtime.js"),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
cl import from react { useState, useEffect }
|
|
2
|
-
cl import from '@mui/material/Button' { default as Button }
|
|
3
|
-
cl import from '@mui/material/Card' { default as Card }
|
|
4
|
-
cl import from '@mui/material/CardContent' { default as CardContent }
|
|
5
|
-
cl import from '@mui/material/CardActions' { default as CardActions }
|
|
6
|
-
cl import from '@mui/material/Typography' { default as Typography }
|
|
7
|
-
cl import from '@mui/material/IconButton' { default as IconButton }
|
|
8
|
-
cl import from '@mui/material/Box' { default as Box }
|
|
9
|
-
cl import from '@mui/material/Divider' { default as Divider }
|
|
10
|
-
cl import from '@mui/icons-material/Add' { default as AddIcon }
|
|
11
|
-
cl import from '@mui/icons-material/Remove' { default as RemoveIcon }
|
|
12
|
-
cl import from '@mui/icons-material/Refresh' { default as RefreshIcon }
|
|
13
|
-
|
|
14
|
-
cl {
|
|
15
|
-
def app() -> any {
|
|
16
|
-
let [count, setCount] = useState(0);
|
|
17
|
-
|
|
18
|
-
useEffect(lambda -> None{ console.log("Count changed: ", count);} , [count]);
|
|
19
|
-
|
|
20
|
-
let handleIncrement = lambda e: any -> None{ setCount(count + 1);} ;
|
|
21
|
-
|
|
22
|
-
let handleDecrement = lambda e: any -> None{ setCount(count - 1);} ;
|
|
23
|
-
|
|
24
|
-
let handleReset = lambda e: any -> None{ setCount(0);} ;
|
|
25
|
-
|
|
26
|
-
return <Box
|
|
27
|
-
sx={{
|
|
28
|
-
"display": "flex",
|
|
29
|
-
"justifyContent": "center",
|
|
30
|
-
"alignItems": "center",
|
|
31
|
-
"minHeight": "100vh",
|
|
32
|
-
"backgroundColor": "#f5f5f5"
|
|
33
|
-
}}
|
|
34
|
-
>
|
|
35
|
-
<Card
|
|
36
|
-
sx={{"minWidth": 400, "boxShadow": 3}}
|
|
37
|
-
>
|
|
38
|
-
<CardContent>
|
|
39
|
-
<Typography
|
|
40
|
-
variant="h4"
|
|
41
|
-
component="div"
|
|
42
|
-
gutterBottom
|
|
43
|
-
sx={{"textAlign": "center", "color": "primary.main"}}
|
|
44
|
-
>
|
|
45
|
-
Counter Application
|
|
46
|
-
</Typography>
|
|
47
|
-
<Divider
|
|
48
|
-
sx={{"my": 2}}
|
|
49
|
-
/>
|
|
50
|
-
<Box
|
|
51
|
-
sx={{
|
|
52
|
-
"display": "flex",
|
|
53
|
-
"flexDirection": "column",
|
|
54
|
-
"alignItems": "center",
|
|
55
|
-
"py": 3
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<Typography
|
|
59
|
-
variant="h6"
|
|
60
|
-
color="text.secondary"
|
|
61
|
-
gutterBottom
|
|
62
|
-
>
|
|
63
|
-
Current Count
|
|
64
|
-
</Typography>
|
|
65
|
-
<Typography
|
|
66
|
-
variant="h1"
|
|
67
|
-
component="div"
|
|
68
|
-
sx={{
|
|
69
|
-
"fontWeight": "bold",
|
|
70
|
-
"color": "success.main"
|
|
71
|
-
if count > 0
|
|
72
|
-
else "error.main" if count < 0 else "text.primary"
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
{count}
|
|
76
|
-
</Typography>
|
|
77
|
-
</Box>
|
|
78
|
-
</CardContent>
|
|
79
|
-
<Divider />
|
|
80
|
-
<CardActions
|
|
81
|
-
sx={{"display": "flex", "justifyContent": "space-around", "p": 2}}
|
|
82
|
-
>
|
|
83
|
-
<IconButton
|
|
84
|
-
color="error"
|
|
85
|
-
size="large"
|
|
86
|
-
onClick={handleDecrement}
|
|
87
|
-
sx={{"border": "2px solid", "borderColor": "error.main"}}
|
|
88
|
-
>
|
|
89
|
-
<RemoveIcon />
|
|
90
|
-
</IconButton>
|
|
91
|
-
<IconButton
|
|
92
|
-
color="primary"
|
|
93
|
-
size="large"
|
|
94
|
-
onClick={handleReset}
|
|
95
|
-
sx={{"border": "2px solid", "borderColor": "primary.main"}}
|
|
96
|
-
>
|
|
97
|
-
<RefreshIcon />
|
|
98
|
-
</IconButton>
|
|
99
|
-
<IconButton
|
|
100
|
-
color="success"
|
|
101
|
-
size="large"
|
|
102
|
-
onClick={handleIncrement}
|
|
103
|
-
sx={{"border": "2px solid", "borderColor": "success.main"}}
|
|
104
|
-
>
|
|
105
|
-
<AddIcon />
|
|
106
|
-
</IconButton>
|
|
107
|
-
</CardActions>
|
|
108
|
-
<Box
|
|
109
|
-
sx={{"px": 3, "pb": 2}}
|
|
110
|
-
>
|
|
111
|
-
<Typography
|
|
112
|
-
variant="caption"
|
|
113
|
-
color="text.secondary"
|
|
114
|
-
sx={{"display": "block", "textAlign": "center"}}
|
|
115
|
-
>
|
|
116
|
-
Click the buttons to increment, decrement, or reset the counter
|
|
117
|
-
</Typography>
|
|
118
|
-
</Box>
|
|
119
|
-
</Card>
|
|
120
|
-
</Box>;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"main": "index.js",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "npm run compile && vite build",
|
|
7
|
-
"dev": "vite dev",
|
|
8
|
-
"preview": "vite preview",
|
|
9
|
-
"compile": "babel src --out-dir build --extensions \".jsx,.js\" --out-file-extension .js"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [],
|
|
12
|
-
"author": "",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"description": "Jac application: my-test-app",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@babel/cli": "^7.28.3",
|
|
18
|
-
"@babel/core": "^7.28.5",
|
|
19
|
-
"@babel/preset-env": "^7.28.5",
|
|
20
|
-
"@babel/preset-react": "^7.28.5",
|
|
21
|
-
"vite": "^6.4.1"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@emotion/react": "^11.14.0",
|
|
25
|
-
"@emotion/styled": "^11.14.1",
|
|
26
|
-
"@mui/icons-material": "^7.3.5",
|
|
27
|
-
"@mui/material": "^7.3.5",
|
|
28
|
-
"react": "^19.2.0",
|
|
29
|
-
"react-dom": "^19.2.0",
|
|
30
|
-
"react-router-dom": "^6.30.1"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
root: ".", // base folder
|
|
10
|
-
build: {
|
|
11
|
-
rollupOptions: {
|
|
12
|
-
input: "build/main.js", // your compiled entry file
|
|
13
|
-
output: {
|
|
14
|
-
entryFileNames: "client.[hash].js", // name of the final js file
|
|
15
|
-
assetFileNames: "[name].[ext]",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
outDir: "dist", // final bundled output
|
|
19
|
-
emptyOutDir: true,
|
|
20
|
-
},
|
|
21
|
-
publicDir: false,
|
|
22
|
-
resolve: {
|
|
23
|
-
alias: {
|
|
24
|
-
"@jac-client/utils": path.resolve(__dirname, "src/client_runtime.js"),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Pages
|
|
2
|
-
cl import from react { useState, useEffect }
|
|
3
|
-
cl import ".styles.css";
|
|
4
|
-
|
|
5
|
-
cl {
|
|
6
|
-
def app() -> any {
|
|
7
|
-
let [count, setCount] = useState(0);
|
|
8
|
-
|
|
9
|
-
useEffect(lambda -> None{ console.log("Count changed: ", count);} , [count]);
|
|
10
|
-
|
|
11
|
-
let handleIncrement = lambda e: any -> None{ setCount(count + 1);} ;
|
|
12
|
-
|
|
13
|
-
let handleDecrement = lambda e: any -> None{ setCount(count - 1);} ;
|
|
14
|
-
|
|
15
|
-
let handleReset = lambda e: any -> None{ setCount(0);} ;
|
|
16
|
-
|
|
17
|
-
let countClass = "countDisplay " + (
|
|
18
|
-
"positive" if count > 0 else "negative" if count < 0 else "zero"
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
return <div className="container">
|
|
22
|
-
<div className="card">
|
|
23
|
-
<h1 className="title">
|
|
24
|
-
Counter Application
|
|
25
|
-
</h1>
|
|
26
|
-
<div className="divider"></div>
|
|
27
|
-
<div className="counterSection">
|
|
28
|
-
<div className="label">
|
|
29
|
-
Current Count
|
|
30
|
-
</div>
|
|
31
|
-
<div
|
|
32
|
-
className={countClass}
|
|
33
|
-
>
|
|
34
|
-
{count}
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div className="divider"></div>
|
|
38
|
-
<div className="buttonGroup">
|
|
39
|
-
<button
|
|
40
|
-
className="btn btnDecrement"
|
|
41
|
-
onClick={handleDecrement}
|
|
42
|
-
>
|
|
43
|
-
-
|
|
44
|
-
</button>
|
|
45
|
-
<button
|
|
46
|
-
className="btn btnReset"
|
|
47
|
-
onClick={handleReset}
|
|
48
|
-
>
|
|
49
|
-
↻
|
|
50
|
-
</button>
|
|
51
|
-
<button
|
|
52
|
-
className="btn btnIncrement"
|
|
53
|
-
onClick={handleIncrement}
|
|
54
|
-
>
|
|
55
|
-
+
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<div className="hint">
|
|
59
|
-
Click the buttons to increment, decrement, or reset the counter
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"main": "index.js",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "npm run compile && vite build",
|
|
7
|
-
"dev": "vite dev",
|
|
8
|
-
"preview": "vite preview",
|
|
9
|
-
"compile": "babel src --out-dir build --extensions \".jsx,.js\" --out-file-extension .js"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [],
|
|
12
|
-
"author": "",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"description": "Jac application: my-test-app",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"vite": "^6.4.1",
|
|
18
|
-
"@babel/cli": "^7.28.3",
|
|
19
|
-
"@babel/core": "^7.28.5",
|
|
20
|
-
"@babel/preset-env": "^7.28.5",
|
|
21
|
-
"@babel/preset-react": "^7.28.5"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"react": "^19.2.0",
|
|
25
|
-
"react-dom": "^19.2.0",
|
|
26
|
-
"react-router-dom": "^6.30.1"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
min-height: 100vh;
|
|
6
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
7
|
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.card {
|
|
11
|
-
background: white;
|
|
12
|
-
border-radius: 20px;
|
|
13
|
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
14
|
-
padding: 40px;
|
|
15
|
-
min-width: 400px;
|
|
16
|
-
text-align: center;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.title {
|
|
20
|
-
font-size: 2rem;
|
|
21
|
-
color: #667eea;
|
|
22
|
-
margin: 0 0 10px 0;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.divider {
|
|
27
|
-
height: 2px;
|
|
28
|
-
background: linear-gradient(90deg, transparent, #667eea, transparent);
|
|
29
|
-
margin: 20px 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.counterSection {
|
|
33
|
-
padding: 30px 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.label {
|
|
37
|
-
font-size: 1.2rem;
|
|
38
|
-
color: #666;
|
|
39
|
-
margin-bottom: 10px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.countDisplay {
|
|
43
|
-
font-size: 5rem;
|
|
44
|
-
font-weight: bold;
|
|
45
|
-
margin: 20px 0;
|
|
46
|
-
transition: color 0.3s ease;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.positive {
|
|
50
|
-
color: #4caf50;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.negative {
|
|
54
|
-
color: #f44336;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.zero {
|
|
58
|
-
color: #333;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.buttonGroup {
|
|
62
|
-
display: flex;
|
|
63
|
-
justify-content: space-around;
|
|
64
|
-
gap: 15px;
|
|
65
|
-
margin-top: 30px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.btn {
|
|
69
|
-
border: none;
|
|
70
|
-
border-radius: 50%;
|
|
71
|
-
width: 70px;
|
|
72
|
-
height: 70px;
|
|
73
|
-
font-size: 1.5rem;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
transition: all 0.3s ease;
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
font-weight: bold;
|
|
80
|
-
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.btn:hover {
|
|
84
|
-
transform: translateY(-3px);
|
|
85
|
-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.btn:active {
|
|
89
|
-
transform: translateY(0);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.btnDecrement {
|
|
93
|
-
background: linear-gradient(135deg, #f44336, #e91e63);
|
|
94
|
-
color: white;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.btnReset {
|
|
98
|
-
background: linear-gradient(135deg, #2196f3, #00bcd4);
|
|
99
|
-
color: white;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.btnIncrement {
|
|
103
|
-
background: linear-gradient(135deg, #4caf50, #8bc34a);
|
|
104
|
-
color: white;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.hint {
|
|
108
|
-
margin-top: 20px;
|
|
109
|
-
font-size: 0.9rem;
|
|
110
|
-
color: #999;
|
|
111
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
root: ".", // base folder
|
|
10
|
-
build: {
|
|
11
|
-
rollupOptions: {
|
|
12
|
-
input: "build/main.js", // your compiled entry file
|
|
13
|
-
output: {
|
|
14
|
-
entryFileNames: "client.[hash].js", // name of the final js file
|
|
15
|
-
assetFileNames: "[name].[ext]",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
outDir: "dist", // final bundled output
|
|
19
|
-
emptyOutDir: true,
|
|
20
|
-
},
|
|
21
|
-
publicDir: false,
|
|
22
|
-
resolve: {
|
|
23
|
-
alias: {
|
|
24
|
-
"@jac-client/utils": path.resolve(__dirname, "src/client_runtime.js"),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Pages
|
|
2
|
-
cl import from react { useState, useEffect }
|
|
3
|
-
cl import ".styles.scss";
|
|
4
|
-
|
|
5
|
-
cl {
|
|
6
|
-
def app() -> any {
|
|
7
|
-
let [count, setCount] = useState(0);
|
|
8
|
-
|
|
9
|
-
useEffect(lambda -> None{ console.log("Count changed: ", count);} , [count]);
|
|
10
|
-
|
|
11
|
-
let handleIncrement = lambda e: any -> None{ setCount(count + 1);} ;
|
|
12
|
-
|
|
13
|
-
let handleDecrement = lambda e: any -> None{ setCount(count - 1);} ;
|
|
14
|
-
|
|
15
|
-
let handleReset = lambda e: any -> None{ setCount(0);} ;
|
|
16
|
-
|
|
17
|
-
let countClass = "countDisplay " + (
|
|
18
|
-
"positive" if count > 0 else "negative" if count < 0 else "zero"
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
return <div className="container">
|
|
22
|
-
<div className="card">
|
|
23
|
-
<h1 className="title">
|
|
24
|
-
Counter Application
|
|
25
|
-
</h1>
|
|
26
|
-
<div className="divider"></div>
|
|
27
|
-
<div className="counterSection">
|
|
28
|
-
<div className="label">
|
|
29
|
-
Current Count
|
|
30
|
-
</div>
|
|
31
|
-
<div
|
|
32
|
-
className={countClass}
|
|
33
|
-
>
|
|
34
|
-
{count}
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div className="divider"></div>
|
|
38
|
-
<div className="buttonGroup">
|
|
39
|
-
<button
|
|
40
|
-
className="btn btnDecrement"
|
|
41
|
-
onClick={handleDecrement}
|
|
42
|
-
>
|
|
43
|
-
-
|
|
44
|
-
</button>
|
|
45
|
-
<button
|
|
46
|
-
className="btn btnReset"
|
|
47
|
-
onClick={handleReset}
|
|
48
|
-
>
|
|
49
|
-
↻
|
|
50
|
-
</button>
|
|
51
|
-
<button
|
|
52
|
-
className="btn btnIncrement"
|
|
53
|
-
onClick={handleIncrement}
|
|
54
|
-
>
|
|
55
|
-
+
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<div className="hint">
|
|
59
|
-
Click the buttons to increment, decrement, or reset the counter
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>;
|
|
63
|
-
}
|
|
64
|
-
}
|