jac-client 0.2.8__py3-none-any.whl → 0.2.11__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.
Files changed (119) hide show
  1. jac_client/examples/all-in-one/button.jac +4 -3
  2. jac_client/examples/all-in-one/components/CategoryFilter.jac +36 -24
  3. jac_client/examples/all-in-one/components/Header.jac +12 -8
  4. jac_client/examples/all-in-one/components/ProfitOverview.jac +49 -35
  5. jac_client/examples/all-in-one/components/Summary.jac +59 -36
  6. jac_client/examples/all-in-one/components/TransactionForm.jac +142 -112
  7. jac_client/examples/all-in-one/components/TransactionItem.jac +37 -30
  8. jac_client/examples/all-in-one/components/TransactionList.jac +33 -26
  9. jac_client/examples/all-in-one/components/button.jac +4 -3
  10. jac_client/examples/all-in-one/components/navigation.jac +111 -117
  11. jac_client/examples/all-in-one/constants/categories.jac +23 -24
  12. jac_client/examples/all-in-one/constants/clients.jac +7 -8
  13. jac_client/examples/all-in-one/context/BudgetContext.jac +9 -6
  14. jac_client/examples/all-in-one/hooks/useBudget.jac +18 -12
  15. jac_client/examples/all-in-one/hooks/useLocalStorage.jac +14 -13
  16. jac_client/examples/all-in-one/main.jac +542 -0
  17. jac_client/examples/all-in-one/pages/BudgetPlanner.jac +26 -12
  18. jac_client/examples/all-in-one/pages/FeaturesTest.jac +43 -12
  19. jac_client/examples/all-in-one/pages/LandingPage.jac +113 -90
  20. jac_client/examples/all-in-one/pages/budget_planner_ui.cl.jac +65 -0
  21. jac_client/examples/all-in-one/pages/features_test_ui.cl.jac +675 -0
  22. jac_client/examples/all-in-one/pages/loginPage.jac +114 -119
  23. jac_client/examples/all-in-one/pages/nestedDemo.jac +44 -51
  24. jac_client/examples/all-in-one/pages/notFound.jac +15 -21
  25. jac_client/examples/all-in-one/pages/signupPage.jac +113 -119
  26. jac_client/examples/all-in-one/utils/formatters.jac +5 -8
  27. jac_client/examples/asset-serving/css-with-image/main.jac +92 -0
  28. jac_client/examples/asset-serving/image-asset/main.jac +56 -0
  29. jac_client/examples/asset-serving/import-alias/main.jac +109 -0
  30. jac_client/examples/basic/main.jac +23 -0
  31. jac_client/examples/basic-auth/main.jac +363 -0
  32. jac_client/examples/basic-auth-with-router/main.jac +451 -0
  33. jac_client/examples/basic-full-stack/main.jac +362 -0
  34. jac_client/examples/css-styling/js-styling/main.jac +63 -0
  35. jac_client/examples/css-styling/material-ui/main.jac +122 -0
  36. jac_client/examples/css-styling/pure-css/main.jac +55 -0
  37. jac_client/examples/css-styling/sass-example/main.jac +55 -0
  38. jac_client/examples/css-styling/styled-components/main.jac +62 -0
  39. jac_client/examples/css-styling/tailwind-example/main.jac +74 -0
  40. jac_client/examples/full-stack-with-auth/main.jac +696 -0
  41. jac_client/examples/little-x/main.jac +681 -0
  42. jac_client/examples/little-x/src/submit-button.jac +15 -14
  43. jac_client/examples/nested-folders/nested-advance/main.jac +26 -0
  44. jac_client/examples/nested-folders/nested-advance/src/ButtonRoot.jac +4 -6
  45. jac_client/examples/nested-folders/nested-advance/src/level1/ButtonSecondL.jac +9 -13
  46. jac_client/examples/nested-folders/nested-advance/src/level1/Card.jac +29 -32
  47. jac_client/examples/nested-folders/nested-advance/src/level1/level2/ButtonThirdL.jac +12 -18
  48. jac_client/examples/nested-folders/nested-basic/{src/app.jac → main.jac} +7 -5
  49. jac_client/examples/nested-folders/nested-basic/src/button.jac +4 -3
  50. jac_client/examples/nested-folders/nested-basic/src/components/button.jac +4 -3
  51. jac_client/examples/ts-support/main.jac +35 -0
  52. jac_client/examples/with-router/main.jac +286 -0
  53. jac_client/plugin/cli.jac +491 -411
  54. jac_client/plugin/client.jac +25 -0
  55. jac_client/plugin/client_runtime.cl.jac +10 -4
  56. jac_client/plugin/impl/client.impl.jac +96 -55
  57. jac_client/plugin/impl/client_runtime.impl.jac +155 -1
  58. jac_client/plugin/plugin_config.jac +211 -29
  59. jac_client/plugin/src/__init__.jac +0 -2
  60. jac_client/plugin/src/compiler.jac +0 -1
  61. jac_client/plugin/src/config_loader.jac +1 -0
  62. jac_client/plugin/src/desktop_config.jac +31 -0
  63. jac_client/plugin/src/impl/compiler.impl.jac +49 -17
  64. jac_client/plugin/src/impl/config_loader.impl.jac +8 -0
  65. jac_client/plugin/src/impl/desktop_config.impl.jac +191 -0
  66. jac_client/plugin/src/impl/jac_to_js.impl.jac +5 -1
  67. jac_client/plugin/src/impl/package_installer.impl.jac +20 -20
  68. jac_client/plugin/src/impl/vite_bundler.impl.jac +191 -64
  69. jac_client/plugin/src/targets/desktop/sidecar/main.py +144 -0
  70. jac_client/plugin/src/targets/desktop_target.jac +37 -0
  71. jac_client/plugin/src/targets/impl/desktop_target.impl.jac +2347 -0
  72. jac_client/plugin/src/targets/impl/registry.impl.jac +64 -0
  73. jac_client/plugin/src/targets/impl/web_target.impl.jac +157 -0
  74. jac_client/plugin/src/targets/register.jac +21 -0
  75. jac_client/plugin/src/targets/registry.jac +87 -0
  76. jac_client/plugin/src/targets/web_target.jac +35 -0
  77. jac_client/plugin/src/vite_bundler.jac +6 -0
  78. jac_client/plugin/utils/__init__.jac +3 -0
  79. jac_client/plugin/utils/bun_installer.jac +16 -0
  80. jac_client/plugin/utils/impl/bun_installer.impl.jac +99 -0
  81. jac_client/templates/client.jacpack +72 -0
  82. jac_client/templates/fullstack.jacpack +61 -0
  83. jac_client/tests/conftest.py +103 -47
  84. jac_client/tests/fixtures/spawn_test/app.jac +49 -52
  85. jac_client/tests/fixtures/with-ts/app.jac +27 -27
  86. jac_client/tests/test_cli.py +182 -71
  87. jac_client/tests/test_e2e.py +232 -0
  88. jac_client/tests/test_helpers.py +58 -0
  89. jac_client/tests/test_it.py +91 -135
  90. jac_client/tests/test_it_desktop.py +891 -0
  91. {jac_client-0.2.8.dist-info → jac_client-0.2.11.dist-info}/METADATA +6 -6
  92. jac_client-0.2.11.dist-info/RECORD +113 -0
  93. {jac_client-0.2.8.dist-info → jac_client-0.2.11.dist-info}/WHEEL +1 -1
  94. jac_client/examples/all-in-one/app.jac +0 -573
  95. jac_client/examples/all-in-one/pages/BudgetPlanner.cl.jac +0 -70
  96. jac_client/examples/all-in-one/pages/FeaturesTest.cl.jac +0 -552
  97. jac_client/examples/asset-serving/css-with-image/src/app.jac +0 -88
  98. jac_client/examples/asset-serving/image-asset/src/app.jac +0 -55
  99. jac_client/examples/asset-serving/import-alias/src/app.jac +0 -111
  100. jac_client/examples/basic/src/app.jac +0 -21
  101. jac_client/examples/basic-auth/src/app.jac +0 -371
  102. jac_client/examples/basic-auth-with-router/src/app.jac +0 -464
  103. jac_client/examples/basic-full-stack/src/app.jac +0 -359
  104. jac_client/examples/css-styling/js-styling/src/app.jac +0 -84
  105. jac_client/examples/css-styling/material-ui/src/app.jac +0 -122
  106. jac_client/examples/css-styling/pure-css/src/app.jac +0 -64
  107. jac_client/examples/css-styling/sass-example/src/app.jac +0 -64
  108. jac_client/examples/css-styling/styled-components/src/app.jac +0 -71
  109. jac_client/examples/css-styling/tailwind-example/src/app.jac +0 -63
  110. jac_client/examples/full-stack-with-auth/src/app.jac +0 -722
  111. jac_client/examples/little-x/src/app.jac +0 -719
  112. jac_client/examples/nested-folders/nested-advance/src/app.jac +0 -35
  113. jac_client/examples/ts-support/src/app.jac +0 -35
  114. jac_client/examples/with-router/src/app.jac +0 -323
  115. jac_client/plugin/src/babel_processor.jac +0 -18
  116. jac_client/plugin/src/impl/babel_processor.impl.jac +0 -89
  117. jac_client-0.2.8.dist-info/RECORD +0 -97
  118. {jac_client-0.2.8.dist-info → jac_client-0.2.11.dist-info}/entry_points.txt +0 -0
  119. {jac_client-0.2.8.dist-info → jac_client-0.2.11.dist-info}/top_level.txt +0 -0
@@ -1,132 +1,127 @@
1
- cl import from "@jac-client/utils" {
2
- Link,
3
- useNavigate,
4
- jacLogin
5
- }
1
+ cl import from "@jac/runtime" { Link, useNavigate, jacLogin }
2
+
6
3
  cl {
7
4
  def:pub LoginPage -> any {
8
- has username: str = "";
9
- has password: str = "";
10
- has error: str = "";
11
- navigate = useNavigate();
5
+ has username: str = "",
6
+ password: str = "",
7
+ error: str = "";
12
8
 
13
- async def handleLogin(e: any) -> None {
14
- e.preventDefault();
15
- error = "";
16
- if not username or not password {
17
- error = "Please fill in all fields";
18
- return;
19
- }
20
- success = await jacLogin(username, password);
21
- if success {
22
- navigate("/");
23
- } else {
24
- error = "Invalid credentials";
25
- }
26
- }
9
+ navigate = useNavigate();
27
10
 
28
- def handleUsernameChange(e: any) -> None {
29
- username = e.target.value;
30
- }
11
+ async def handleLogin(e: any) -> None {
12
+ e.preventDefault();
13
+ error = "";
14
+ if not username or not password {
15
+ error = "Please fill in all fields";
16
+ return;
17
+ }
18
+ success = await jacLogin(username, password);
19
+ if success {
20
+ navigate("/");
21
+ } else {
22
+ error = "Invalid credentials";
23
+ }
24
+ }
31
25
 
32
- def handlePasswordChange(e: any) -> None {
33
- password = e.target.value;
34
- }
26
+ def handleUsernameChange(e: any) -> None {
27
+ username = e.target.value;
28
+ }
35
29
 
36
- errorDisplay = None;
37
- if error {
38
- errorDisplay = <div
39
- style={{"color": "#dc2626", "fontSize": "14px", "marginBottom": "12px"}}
40
- >
41
- {error}
42
- </div>;
43
- }
30
+ def handlePasswordChange(e: any) -> None {
31
+ password = e.target.value;
32
+ }
44
33
 
45
- return <div
46
- style={{
47
- "minHeight": "calc(100vh - 56px)",
48
- "display": "flex",
49
- "alignItems": "center",
50
- "justifyContent": "center",
51
- "background": "#f5f5f5"
52
- }}
53
- >
54
- <div
55
- style={{
56
- "background": "#ffffff",
57
- "padding": "32px",
58
- "borderRadius": "8px",
59
- "width": "300px",
60
- "boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
61
- }}
62
- >
63
- <h2
64
- style={{"marginBottom": "24px", "textAlign": "center"}}
34
+ errorDisplay = None;
35
+ if error {
36
+ errorDisplay = <div
37
+ style={{"color": "#dc2626", "fontSize": "14px", "marginBottom": "12px"}}
65
38
  >
66
- Login
67
- </h2>
68
- <form
69
- onSubmit={handleLogin}
39
+ {error}
40
+ </div>;
41
+ }
42
+
43
+ return
44
+ <div
45
+ style={{
46
+ "minHeight": "calc(100vh - 56px)",
47
+ "display": "flex",
48
+ "alignItems": "center",
49
+ "justifyContent": "center",
50
+ "background": "#f5f5f5"
51
+ }}
70
52
  >
71
- <input
72
- type="text"
73
- value={username}
74
- onChange={handleUsernameChange}
75
- placeholder="Username"
76
- style={{
77
- "width": "100%",
78
- "padding": "10px",
79
- "marginBottom": "12px",
80
- "border": "1px solid #ddd",
81
- "borderRadius": "4px",
82
- "boxSizing": "border-box"
83
- }}
84
- />
85
- <input
86
- type="password"
87
- value={password}
88
- onChange={handlePasswordChange}
89
- placeholder="Password"
90
- style={{
91
- "width": "100%",
92
- "padding": "10px",
93
- "marginBottom": "12px",
94
- "border": "1px solid #ddd",
95
- "borderRadius": "4px",
96
- "boxSizing": "border-box"
97
- }}
98
- />
99
- {errorDisplay}
100
- <button
101
- type="submit"
53
+ <div
102
54
  style={{
103
- "width": "100%",
104
- "padding": "10px",
105
- "background": "#3b82f6",
106
- "color": "#ffffff",
107
- "border": "none",
108
- "borderRadius": "4px",
109
- "cursor": "pointer",
110
- "fontWeight": "600"
55
+ "background": "#ffffff",
56
+ "padding": "32px",
57
+ "borderRadius": "8px",
58
+ "width": "300px",
59
+ "boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
111
60
  }}
112
61
  >
113
- Login
114
- </button>
115
- </form>
116
- <p
117
- style={{
118
- "textAlign": "center",
119
- "marginTop": "16px",
120
- "fontSize": "14px"
121
- }}
122
- >
123
- Need an account?
124
- {" "}
125
- <Link to="/signup">
126
- Sign up
127
- </Link>
128
- </p>
129
- </div>
130
- </div>;
131
- }
62
+ <h2 style={{"marginBottom": "24px", "textAlign": "center"}}>
63
+ Login
64
+ </h2>
65
+ <form onSubmit={handleLogin}>
66
+ <input
67
+ type="text"
68
+ value={username}
69
+ onChange={handleUsernameChange}
70
+ placeholder="Username"
71
+ style={{
72
+ "width": "100%",
73
+ "padding": "10px",
74
+ "marginBottom": "12px",
75
+ "border": "1px solid #ddd",
76
+ "borderRadius": "4px",
77
+ "boxSizing": "border-box"
78
+ }}
79
+ />
80
+ <input
81
+ type="password"
82
+ value={password}
83
+ onChange={handlePasswordChange}
84
+ placeholder="Password"
85
+ style={{
86
+ "width": "100%",
87
+ "padding": "10px",
88
+ "marginBottom": "12px",
89
+ "border": "1px solid #ddd",
90
+ "borderRadius": "4px",
91
+ "boxSizing": "border-box"
92
+ }}
93
+ />
94
+ {errorDisplay}
95
+ <button
96
+ type="submit"
97
+ style={{
98
+ "width": "100%",
99
+ "padding": "10px",
100
+ "background": "#3b82f6",
101
+ "color": "#ffffff",
102
+ "border": "none",
103
+ "borderRadius": "4px",
104
+ "cursor": "pointer",
105
+ "fontWeight": "600"
106
+ }}
107
+ >
108
+ Login
109
+ </button>
110
+ </form>
111
+ <p
112
+ style={{
113
+ "textAlign": "center",
114
+ "marginTop": "16px",
115
+ "fontSize": "14px"
116
+ }}
117
+ >
118
+ Need an account?
119
+ {" "}
120
+ <Link to="/signup">
121
+ Sign up
122
+ </Link>
123
+ </p>
124
+ </div>
125
+ </div>;
126
+ }
132
127
  }
@@ -1,61 +1,54 @@
1
1
  # Nested folder imports (same pattern as nested-basic/)
2
- cl import from ..components.button {
2
+ cl import from ..components.nestedDemo.CustomButton.tsx {
3
3
  CustomButton
4
4
  }
5
5
  cl import from ..button { CustomButtonRoot }
6
- cl import from "@jac-client/utils" {
7
-
8
- Navigate,
9
- jacIsLoggedIn
10
- }
11
-
6
+ cl import from "@jac/runtime" { Navigate, jacIsLoggedIn }
12
7
 
13
8
  cl {
14
9
  def:pub NestedImportsDemo -> any {
15
- # Check if user is logged in, redirect if not
16
- if not jacIsLoggedIn() {
17
- return <Navigate to="/login" />;
18
- }
10
+ # Check if user is logged in, redirect if not
11
+ if not jacIsLoggedIn() {
12
+ return
13
+ <Navigate to="/login" />;
14
+ }
19
15
 
20
- return <div
21
- style={{
22
- "padding": "2rem",
23
- "fontFamily": "system-ui, -apple-system, sans-serif"
24
- }}
25
- >
26
- <h1>
27
- 📁 Nested Folder Imports
28
- </h1>
29
- <p>
30
- This page mirrors the
31
- {" "}
32
- <code>
33
- nested-folders/nested-basic
34
- </code>
35
- {" "}
36
- example by importing components from both
37
- {" "}
38
- <code>
39
- components.button
40
- </code>
41
- {" "}
42
- and
43
- {" "}
44
- <code>
45
- button
46
- </code>
47
- </p>
48
- <p
49
- style={{"marginTop": "0.75rem"}}
50
- >
51
- Both buttons below are rendered via relative imports:
52
- </p>
53
- <div
54
- style={{"display": "flex", "gap": "1rem", "marginTop": "1.5rem"}}
55
- >
56
- <CustomButton />
57
- <CustomButtonRoot />
58
- </div>
59
- </div>;
16
+ return
17
+ <div
18
+ style={{
19
+ "padding": "2rem",
20
+ "fontFamily": "system-ui, -apple-system, sans-serif"
21
+ }}
22
+ >
23
+ <h1>
24
+ 📁 Nested Folder Imports
25
+ </h1>
26
+ <p>
27
+ This page mirrors the
28
+ {" "}
29
+ <code>
30
+ nested-folders/nested-basic
31
+ </code>
32
+ {" "}
33
+ example by importing components from both
34
+ {" "}
35
+ <code>
36
+ components.button
37
+ </code>
38
+ {" "}
39
+ and
40
+ {" "}
41
+ <code>
42
+ button
43
+ </code>
44
+ </p>
45
+ <p style={{"marginTop": "0.75rem"}}>
46
+ Both buttons below are rendered via relative imports:
47
+ </p>
48
+ <div style={{"display": "flex", "gap": "1rem", "marginTop": "1.5rem"}}>
49
+ <CustomButton />
50
+ <CustomButtonRoot />
51
+ </div>
52
+ </div>;
60
53
  }
61
54
  }
@@ -1,24 +1,18 @@
1
- cl import from "@jac-client/utils" {
2
- Link
3
- }
1
+ cl import from "@jac/runtime" { Link }
2
+ cl import "..styles/notFoundPage/NotFoundstyle.css";
4
3
  cl {
5
4
  def:pub NotFound -> any {
6
- return <div
7
- style={{
8
- "padding": "2rem",
9
- "textAlign": "center",
10
- "fontFamily": "system-ui, -apple-system, sans-serif"
11
- }}
12
- >
13
- <h1>
14
- 🔍 404 - Page Not Found
15
- </h1>
16
- <p>
17
- The page you are looking for does not exist.
18
- </p>
19
- <Link to="/">
20
- ← Back to Home
21
- </Link>
22
- </div>;
23
- }
5
+ return
6
+ <div className="not-found-container">
7
+ <h1>
8
+ 🔍 404 - Page Not Found
9
+ </h1>
10
+ <p>
11
+ The page you are looking for does not exist.
12
+ </p>
13
+ <Link to="/">
14
+ ← Back to Home
15
+ </Link>
16
+ </div>;
17
+ }
24
18
  }
@@ -1,133 +1,127 @@
1
- cl import from "@jac-client/utils" {
2
- Link,
3
- useNavigate,
4
- jacSignup
5
- }
1
+ cl import from "@jac/runtime" { Link, useNavigate, jacSignup }
6
2
 
7
3
  cl {
8
4
  def:pub SignupPage -> any {
9
- has username: str = "";
10
- has password: str = "";
11
- has error: str = "";
12
- navigate = useNavigate();
5
+ has username: str = "",
6
+ password: str = "",
7
+ error: str = "";
13
8
 
14
- async def handleSignup(e: any) -> None {
15
- e.preventDefault();
16
- error = "";
17
- if not username or not password {
18
- error = "Please fill in all fields";
19
- return;
20
- }
21
- result = await jacSignup(username, password);
22
- if result["success"] {
23
- navigate("/");
24
- } else {
25
- error = result["error"] if result["error"] else "Signup failed";
26
- }
27
- }
9
+ navigate = useNavigate();
28
10
 
29
- def handleUsernameChange(e: any) -> None {
30
- username = e.target.value;
31
- }
11
+ async def handleSignup(e: any) -> None {
12
+ e.preventDefault();
13
+ error = "";
14
+ if not username or not password {
15
+ error = "Please fill in all fields";
16
+ return;
17
+ }
18
+ result = await jacSignup(username, password);
19
+ if result["success"] {
20
+ navigate("/");
21
+ } else {
22
+ error = result["error"] if result["error"] else "Signup failed";
23
+ }
24
+ }
32
25
 
33
- def handlePasswordChange(e: any) -> None {
34
- password = e.target.value;
35
- }
26
+ def handleUsernameChange(e: any) -> None {
27
+ username = e.target.value;
28
+ }
36
29
 
37
- errorDisplay = None;
38
- if error {
39
- errorDisplay = <div
40
- style={{"color": "#dc2626", "fontSize": "14px", "marginBottom": "12px"}}
41
- >
42
- {error}
43
- </div>;
44
- }
30
+ def handlePasswordChange(e: any) -> None {
31
+ password = e.target.value;
32
+ }
45
33
 
46
- return <div
47
- style={{
48
- "minHeight": "calc(100vh - 56px)",
49
- "display": "flex",
50
- "alignItems": "center",
51
- "justifyContent": "center",
52
- "background": "#f5f5f5"
53
- }}
54
- >
55
- <div
56
- style={{
57
- "background": "#ffffff",
58
- "padding": "32px",
59
- "borderRadius": "8px",
60
- "width": "300px",
61
- "boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
62
- }}
63
- >
64
- <h2
65
- style={{"marginBottom": "24px", "textAlign": "center"}}
34
+ errorDisplay = None;
35
+ if error {
36
+ errorDisplay = <div
37
+ style={{"color": "#dc2626", "fontSize": "14px", "marginBottom": "12px"}}
66
38
  >
67
- Sign Up
68
- </h2>
69
- <form
70
- onSubmit={handleSignup}
39
+ {error}
40
+ </div>;
41
+ }
42
+
43
+ return
44
+ <div
45
+ style={{
46
+ "minHeight": "calc(100vh - 56px)",
47
+ "display": "flex",
48
+ "alignItems": "center",
49
+ "justifyContent": "center",
50
+ "background": "#f5f5f5"
51
+ }}
71
52
  >
72
- <input
73
- type="text"
74
- value={username}
75
- onChange={handleUsernameChange}
76
- placeholder="Username"
77
- style={{
78
- "width": "100%",
79
- "padding": "10px",
80
- "marginBottom": "12px",
81
- "border": "1px solid #ddd",
82
- "borderRadius": "4px",
83
- "boxSizing": "border-box"
84
- }}
85
- />
86
- <input
87
- type="password"
88
- value={password}
89
- onChange={handlePasswordChange}
90
- placeholder="Password"
91
- style={{
92
- "width": "100%",
93
- "padding": "10px",
94
- "marginBottom": "12px",
95
- "border": "1px solid #ddd",
96
- "borderRadius": "4px",
97
- "boxSizing": "border-box"
98
- }}
99
- />
100
- {errorDisplay}
101
- <button
102
- type="submit"
53
+ <div
103
54
  style={{
104
- "width": "100%",
105
- "padding": "10px",
106
- "background": "#3b82f6",
107
- "color": "#ffffff",
108
- "border": "none",
109
- "borderRadius": "4px",
110
- "cursor": "pointer",
111
- "fontWeight": "600"
55
+ "background": "#ffffff",
56
+ "padding": "32px",
57
+ "borderRadius": "8px",
58
+ "width": "300px",
59
+ "boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
112
60
  }}
113
61
  >
114
- Sign Up
115
- </button>
116
- </form>
117
- <p
118
- style={{
119
- "textAlign": "center",
120
- "marginTop": "16px",
121
- "fontSize": "14px"
122
- }}
123
- >
124
- Have an account?
125
- {" "}
126
- <Link to="/login">
127
- Login
128
- </Link>
129
- </p>
130
- </div>
131
- </div>;
132
- }
62
+ <h2 style={{"marginBottom": "24px", "textAlign": "center"}}>
63
+ Sign Up
64
+ </h2>
65
+ <form onSubmit={handleSignup}>
66
+ <input
67
+ type="text"
68
+ value={username}
69
+ onChange={handleUsernameChange}
70
+ placeholder="Username"
71
+ style={{
72
+ "width": "100%",
73
+ "padding": "10px",
74
+ "marginBottom": "12px",
75
+ "border": "1px solid #ddd",
76
+ "borderRadius": "4px",
77
+ "boxSizing": "border-box"
78
+ }}
79
+ />
80
+ <input
81
+ type="password"
82
+ value={password}
83
+ onChange={handlePasswordChange}
84
+ placeholder="Password"
85
+ style={{
86
+ "width": "100%",
87
+ "padding": "10px",
88
+ "marginBottom": "12px",
89
+ "border": "1px solid #ddd",
90
+ "borderRadius": "4px",
91
+ "boxSizing": "border-box"
92
+ }}
93
+ />
94
+ {errorDisplay}
95
+ <button
96
+ type="submit"
97
+ style={{
98
+ "width": "100%",
99
+ "padding": "10px",
100
+ "background": "#3b82f6",
101
+ "color": "#ffffff",
102
+ "border": "none",
103
+ "borderRadius": "4px",
104
+ "cursor": "pointer",
105
+ "fontWeight": "600"
106
+ }}
107
+ >
108
+ Sign Up
109
+ </button>
110
+ </form>
111
+ <p
112
+ style={{
113
+ "textAlign": "center",
114
+ "marginTop": "16px",
115
+ "fontSize": "14px"
116
+ }}
117
+ >
118
+ Have an account?
119
+ {" "}
120
+ <Link to="/login">
121
+ Login
122
+ </Link>
123
+ </p>
124
+ </div>
125
+ </div>;
126
+ }
133
127
  }