jac-client 0.2.6__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.
- jac_client/examples/all-in-one/{src/button.jac → button.jac} +4 -3
- jac_client/examples/all-in-one/components/CategoryFilter.jac +47 -0
- jac_client/examples/all-in-one/components/Header.jac +17 -0
- jac_client/examples/all-in-one/components/ProfitOverview.jac +64 -0
- jac_client/examples/all-in-one/components/Summary.jac +76 -0
- jac_client/examples/all-in-one/components/TransactionForm.jac +188 -0
- jac_client/examples/all-in-one/components/TransactionItem.jac +62 -0
- jac_client/examples/all-in-one/components/TransactionList.jac +44 -0
- jac_client/examples/all-in-one/components/button.jac +8 -0
- jac_client/examples/all-in-one/components/navigation.jac +126 -0
- jac_client/examples/all-in-one/constants/categories.jac +36 -0
- jac_client/examples/all-in-one/constants/clients.jac +12 -0
- jac_client/examples/all-in-one/context/BudgetContext.jac +31 -0
- jac_client/examples/all-in-one/hooks/useBudget.jac +122 -0
- jac_client/examples/all-in-one/hooks/useLocalStorage.jac +37 -0
- jac_client/examples/all-in-one/main.jac +542 -0
- jac_client/examples/all-in-one/pages/BudgetPlanner.jac +140 -0
- jac_client/examples/all-in-one/pages/FeaturesTest.jac +157 -0
- jac_client/examples/all-in-one/pages/LandingPage.jac +124 -0
- jac_client/examples/all-in-one/pages/budget_planner_ui.cl.jac +65 -0
- jac_client/examples/all-in-one/pages/features_test_ui.cl.jac +675 -0
- jac_client/examples/all-in-one/pages/loginPage.jac +127 -0
- jac_client/examples/all-in-one/pages/nestedDemo.jac +54 -0
- jac_client/examples/all-in-one/pages/notFound.jac +18 -0
- jac_client/examples/all-in-one/pages/signupPage.jac +127 -0
- jac_client/examples/all-in-one/utils/formatters.jac +49 -0
- jac_client/examples/asset-serving/css-with-image/main.jac +92 -0
- jac_client/examples/asset-serving/image-asset/main.jac +56 -0
- jac_client/examples/asset-serving/import-alias/main.jac +109 -0
- jac_client/examples/basic/main.jac +23 -0
- jac_client/examples/basic-auth/main.jac +363 -0
- jac_client/examples/basic-auth-with-router/main.jac +451 -0
- jac_client/examples/basic-full-stack/main.jac +362 -0
- jac_client/examples/css-styling/js-styling/main.jac +63 -0
- jac_client/examples/css-styling/material-ui/main.jac +122 -0
- jac_client/examples/css-styling/pure-css/main.jac +55 -0
- jac_client/examples/css-styling/sass-example/main.jac +55 -0
- jac_client/examples/css-styling/styled-components/main.jac +62 -0
- jac_client/examples/css-styling/tailwind-example/main.jac +74 -0
- jac_client/examples/full-stack-with-auth/main.jac +696 -0
- jac_client/examples/little-x/main.jac +681 -0
- jac_client/examples/little-x/src/submit-button.jac +15 -14
- jac_client/examples/nested-folders/nested-advance/main.jac +26 -0
- jac_client/examples/nested-folders/nested-advance/src/ButtonRoot.jac +4 -6
- jac_client/examples/nested-folders/nested-advance/src/level1/ButtonSecondL.jac +9 -13
- jac_client/examples/nested-folders/nested-advance/src/level1/Card.jac +29 -32
- jac_client/examples/nested-folders/nested-advance/src/level1/level2/ButtonThirdL.jac +12 -18
- jac_client/examples/nested-folders/nested-basic/{src/app.jac → main.jac} +7 -5
- jac_client/examples/nested-folders/nested-basic/src/button.jac +4 -3
- jac_client/examples/nested-folders/nested-basic/src/components/button.jac +4 -3
- jac_client/examples/ts-support/main.jac +35 -0
- jac_client/examples/with-router/main.jac +286 -0
- jac_client/plugin/cli.jac +507 -470
- jac_client/plugin/client.jac +30 -12
- jac_client/plugin/client_runtime.cl.jac +25 -15
- jac_client/plugin/impl/client.impl.jac +126 -26
- jac_client/plugin/impl/client_runtime.impl.jac +182 -10
- jac_client/plugin/plugin_config.jac +216 -34
- jac_client/plugin/src/__init__.jac +0 -2
- jac_client/plugin/src/compiler.jac +2 -2
- jac_client/plugin/src/config_loader.jac +1 -0
- jac_client/plugin/src/desktop_config.jac +31 -0
- jac_client/plugin/src/impl/compiler.impl.jac +99 -30
- jac_client/plugin/src/impl/config_loader.impl.jac +8 -0
- jac_client/plugin/src/impl/desktop_config.impl.jac +191 -0
- jac_client/plugin/src/impl/jac_to_js.impl.jac +5 -1
- jac_client/plugin/src/impl/package_installer.impl.jac +20 -20
- jac_client/plugin/src/impl/vite_bundler.impl.jac +384 -144
- jac_client/plugin/src/package_installer.jac +1 -1
- jac_client/plugin/src/targets/desktop/sidecar/main.py +144 -0
- jac_client/plugin/src/targets/desktop_target.jac +37 -0
- jac_client/plugin/src/targets/impl/desktop_target.impl.jac +2347 -0
- jac_client/plugin/src/targets/impl/registry.impl.jac +64 -0
- jac_client/plugin/src/targets/impl/web_target.impl.jac +157 -0
- jac_client/plugin/src/targets/register.jac +21 -0
- jac_client/plugin/src/targets/registry.jac +87 -0
- jac_client/plugin/src/targets/web_target.jac +35 -0
- jac_client/plugin/src/vite_bundler.jac +15 -1
- jac_client/plugin/utils/__init__.jac +3 -0
- jac_client/plugin/utils/bun_installer.jac +16 -0
- jac_client/plugin/utils/impl/bun_installer.impl.jac +99 -0
- jac_client/templates/client.jacpack +72 -0
- jac_client/templates/fullstack.jacpack +61 -0
- jac_client/tests/conftest.py +110 -52
- jac_client/tests/fixtures/spawn_test/app.jac +64 -70
- jac_client/tests/fixtures/with-ts/app.jac +28 -28
- jac_client/tests/test_cli.py +280 -113
- jac_client/tests/test_e2e.py +232 -0
- jac_client/tests/test_helpers.py +58 -0
- jac_client/tests/test_it.py +325 -154
- jac_client/tests/test_it_desktop.py +891 -0
- {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/METADATA +20 -11
- jac_client-0.2.11.dist-info/RECORD +113 -0
- {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/WHEEL +1 -1
- jac_client/examples/all-in-one/src/app.jac +0 -841
- jac_client/examples/all-in-one/src/components/button.jac +0 -7
- jac_client/examples/asset-serving/css-with-image/src/app.jac +0 -88
- jac_client/examples/asset-serving/image-asset/src/app.jac +0 -55
- jac_client/examples/asset-serving/import-alias/src/app.jac +0 -111
- jac_client/examples/basic/src/app.jac +0 -21
- jac_client/examples/basic-auth/src/app.jac +0 -377
- jac_client/examples/basic-auth-with-router/src/app.jac +0 -464
- jac_client/examples/basic-full-stack/src/app.jac +0 -365
- jac_client/examples/css-styling/js-styling/src/app.jac +0 -84
- jac_client/examples/css-styling/material-ui/src/app.jac +0 -122
- jac_client/examples/css-styling/pure-css/src/app.jac +0 -64
- jac_client/examples/css-styling/sass-example/src/app.jac +0 -64
- jac_client/examples/css-styling/styled-components/src/app.jac +0 -71
- jac_client/examples/css-styling/tailwind-example/src/app.jac +0 -63
- jac_client/examples/full-stack-with-auth/src/app.jac +0 -722
- jac_client/examples/little-x/src/app.jac +0 -719
- jac_client/examples/nested-folders/nested-advance/src/app.jac +0 -35
- jac_client/examples/ts-support/src/app.jac +0 -35
- jac_client/examples/with-router/src/app.jac +0 -323
- jac_client/plugin/src/babel_processor.jac +0 -18
- jac_client/plugin/src/impl/babel_processor.impl.jac +0 -84
- jac_client-0.2.6.dist-info/RECORD +0 -74
- {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/entry_points.txt +0 -0
- {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/top_level.txt +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Nested Folder Levels Example
|
|
2
|
-
cl import from .ButtonRoot { ButtonRoot }
|
|
3
|
-
cl import from .level1.ButtonSecondL { ButtonSecondL }
|
|
4
|
-
cl import from .level1.level2.ButtonThirdL { ButtonThirdL }
|
|
5
|
-
cl import from .level1.Card { Card }
|
|
6
|
-
|
|
7
|
-
cl def:pub app -> any {
|
|
8
|
-
return <div
|
|
9
|
-
style={{padding: "20px"}}
|
|
10
|
-
>
|
|
11
|
-
<h1>
|
|
12
|
-
Nested Folder Levels Demo
|
|
13
|
-
</h1>
|
|
14
|
-
<div
|
|
15
|
-
style={{margin: "10px 0"}}
|
|
16
|
-
>
|
|
17
|
-
<ButtonRoot />
|
|
18
|
-
</div>
|
|
19
|
-
<div
|
|
20
|
-
style={{margin: "10px 0"}}
|
|
21
|
-
>
|
|
22
|
-
<ButtonSecondL />
|
|
23
|
-
</div>
|
|
24
|
-
<div
|
|
25
|
-
style={{margin: "10px 0"}}
|
|
26
|
-
>
|
|
27
|
-
<ButtonThirdL />
|
|
28
|
-
</div>
|
|
29
|
-
<div
|
|
30
|
-
style={{margin: "10px 0"}}
|
|
31
|
-
>
|
|
32
|
-
<Card />
|
|
33
|
-
</div>
|
|
34
|
-
</div>;
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Pages
|
|
3
|
-
cl import from react { useState, useEffect }
|
|
4
|
-
cl import from ".components/Button.tsx" { Button }
|
|
5
|
-
|
|
6
|
-
cl {
|
|
7
|
-
def:pub app -> any {
|
|
8
|
-
[count, setCount] = useState(0);
|
|
9
|
-
useEffect(lambda -> None{ console.log("Count: ", count);} , [count]);
|
|
10
|
-
return <div
|
|
11
|
-
style={{padding: "2rem", fontFamily: "Arial, sans-serif"}}
|
|
12
|
-
>
|
|
13
|
-
<h1>
|
|
14
|
-
Hello, World!
|
|
15
|
-
</h1>
|
|
16
|
-
<p>
|
|
17
|
-
Count: {count}
|
|
18
|
-
</p>
|
|
19
|
-
<div
|
|
20
|
-
style={{display: "flex", gap: "1rem", marginTop: "1rem"}}
|
|
21
|
-
>
|
|
22
|
-
<Button
|
|
23
|
-
label="Increment"
|
|
24
|
-
onClick={lambda -> None{ setCount(count + 1);} }
|
|
25
|
-
variant="primary"
|
|
26
|
-
/>
|
|
27
|
-
<Button
|
|
28
|
-
label="Reset"
|
|
29
|
-
onClick={lambda -> None{ setCount(0);} }
|
|
30
|
-
variant="secondary"
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
</div>;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
# React Router HashRouter Example
|
|
2
|
-
cl import from react { useState, useEffect }
|
|
3
|
-
cl import from "@jac-client/utils" {
|
|
4
|
-
Router,
|
|
5
|
-
Routes,
|
|
6
|
-
Route,
|
|
7
|
-
Link,
|
|
8
|
-
useNavigate,
|
|
9
|
-
useLocation,
|
|
10
|
-
useParams
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
cl {
|
|
14
|
-
# Home Page Component
|
|
15
|
-
def Home -> any {
|
|
16
|
-
location = useLocation();
|
|
17
|
-
navigate = useNavigate();
|
|
18
|
-
|
|
19
|
-
def goToAbout(e: any) -> None {
|
|
20
|
-
navigate("/about");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return <div>
|
|
24
|
-
<h1>
|
|
25
|
-
🏠 Home Page
|
|
26
|
-
</h1>
|
|
27
|
-
<p>
|
|
28
|
-
Welcome to the home page!
|
|
29
|
-
</p>
|
|
30
|
-
<p>
|
|
31
|
-
This example uses React Router's
|
|
32
|
-
<strong>
|
|
33
|
-
HashRouter
|
|
34
|
-
</strong>
|
|
35
|
-
# for client-side routing.
|
|
36
|
-
</p>
|
|
37
|
-
<p>
|
|
38
|
-
Current path:
|
|
39
|
-
<code>
|
|
40
|
-
{location.pathname}
|
|
41
|
-
</code>
|
|
42
|
-
</p>
|
|
43
|
-
<button
|
|
44
|
-
onClick={goToAbout}
|
|
45
|
-
>
|
|
46
|
-
Go to About →
|
|
47
|
-
</button>
|
|
48
|
-
</div>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
# About Page Component
|
|
52
|
-
def About -> any {
|
|
53
|
-
location = useLocation();
|
|
54
|
-
|
|
55
|
-
return <div>
|
|
56
|
-
<h1>
|
|
57
|
-
ℹ️ About Page
|
|
58
|
-
</h1>
|
|
59
|
-
<p>
|
|
60
|
-
This is the about page.
|
|
61
|
-
</p>
|
|
62
|
-
<p>
|
|
63
|
-
Learn more about our application here.
|
|
64
|
-
</p>
|
|
65
|
-
<p>
|
|
66
|
-
Current path:
|
|
67
|
-
<code>
|
|
68
|
-
{location.pathname}
|
|
69
|
-
</code>
|
|
70
|
-
</p>
|
|
71
|
-
<div
|
|
72
|
-
style={{"marginTop": "1rem"}}
|
|
73
|
-
>
|
|
74
|
-
<Link to="/about/team">
|
|
75
|
-
View Team →
|
|
76
|
-
</Link>
|
|
77
|
-
</div>
|
|
78
|
-
</div>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
# Team Page Component (nested route example)
|
|
82
|
-
def Team -> any {
|
|
83
|
-
return <div>
|
|
84
|
-
<h1>
|
|
85
|
-
👥 Our Team
|
|
86
|
-
</h1>
|
|
87
|
-
<p>
|
|
88
|
-
Meet the amazing team behind this project!
|
|
89
|
-
</p>
|
|
90
|
-
<Link to="/about">
|
|
91
|
-
← Back to About
|
|
92
|
-
</Link>
|
|
93
|
-
</div>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
# User Profile Component (with URL parameters)
|
|
97
|
-
def UserProfile -> any {
|
|
98
|
-
params = useParams();
|
|
99
|
-
userId = params.id if params.id else "Unknown";
|
|
100
|
-
|
|
101
|
-
return <div>
|
|
102
|
-
<h1>
|
|
103
|
-
👤 User Profile
|
|
104
|
-
</h1>
|
|
105
|
-
<p>
|
|
106
|
-
Viewing profile for user:
|
|
107
|
-
<strong>
|
|
108
|
-
{userId}
|
|
109
|
-
</strong>
|
|
110
|
-
</p>
|
|
111
|
-
<p>
|
|
112
|
-
This demonstrates URL parameters using
|
|
113
|
-
<code>
|
|
114
|
-
/user/:id
|
|
115
|
-
</code>
|
|
116
|
-
</p>
|
|
117
|
-
<Link to="/">
|
|
118
|
-
← Back to Home
|
|
119
|
-
</Link>
|
|
120
|
-
</div>;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
# Contact Page Component
|
|
124
|
-
def Contact -> any {
|
|
125
|
-
[submitted, setSubmitted] = useState(False);
|
|
126
|
-
|
|
127
|
-
def handleSubmit(e: any) -> None {
|
|
128
|
-
e.preventDefault();
|
|
129
|
-
setSubmitted(True);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
def resetForm(e: any) -> None {
|
|
133
|
-
setSubmitted(False);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if submitted {
|
|
137
|
-
return <div>
|
|
138
|
-
<h1>
|
|
139
|
-
📧 Contact Page
|
|
140
|
-
</h1>
|
|
141
|
-
<div
|
|
142
|
-
style={{"color": "green"}}
|
|
143
|
-
>
|
|
144
|
-
<p>
|
|
145
|
-
✓ Thank you! Your message has been sent.
|
|
146
|
-
</p>
|
|
147
|
-
<button
|
|
148
|
-
onClick={resetForm}
|
|
149
|
-
>
|
|
150
|
-
Send another
|
|
151
|
-
</button>
|
|
152
|
-
</div>
|
|
153
|
-
</div>;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return <div>
|
|
157
|
-
<h1>
|
|
158
|
-
📧 Contact Page
|
|
159
|
-
</h1>
|
|
160
|
-
<p>
|
|
161
|
-
Get in touch with us!
|
|
162
|
-
</p>
|
|
163
|
-
<form
|
|
164
|
-
onSubmit={handleSubmit}
|
|
165
|
-
>
|
|
166
|
-
<input
|
|
167
|
-
type="text"
|
|
168
|
-
placeholder="Your name"
|
|
169
|
-
style={{"margin": "0.5rem 0", "display": "block"}}
|
|
170
|
-
/>
|
|
171
|
-
<input
|
|
172
|
-
type="text"
|
|
173
|
-
placeholder="Your username"
|
|
174
|
-
style={{"margin": "0.5rem 0", "display": "block"}}
|
|
175
|
-
/>
|
|
176
|
-
<textarea
|
|
177
|
-
placeholder="Your message"
|
|
178
|
-
style={{"margin": "0.5rem 0", "display": "block"}}
|
|
179
|
-
></textarea>
|
|
180
|
-
<button type="submit">
|
|
181
|
-
Send Message
|
|
182
|
-
</button>
|
|
183
|
-
</form>
|
|
184
|
-
</div>;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
# 404 Not Found Component
|
|
188
|
-
def NotFound -> any {
|
|
189
|
-
location = useLocation();
|
|
190
|
-
navigate = useNavigate();
|
|
191
|
-
|
|
192
|
-
def goHome(e: any) -> None {
|
|
193
|
-
navigate("/");
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return <div
|
|
197
|
-
style={{"textAlign": "center", "padding": "2rem"}}
|
|
198
|
-
>
|
|
199
|
-
<h1>
|
|
200
|
-
🔍 404 - Page Not Found
|
|
201
|
-
</h1>
|
|
202
|
-
<p>
|
|
203
|
-
The page
|
|
204
|
-
<code>
|
|
205
|
-
{location.pathname}
|
|
206
|
-
</code>
|
|
207
|
-
does not exist.
|
|
208
|
-
</p>
|
|
209
|
-
<button
|
|
210
|
-
onClick={goHome}
|
|
211
|
-
>
|
|
212
|
-
Go Home
|
|
213
|
-
</button>
|
|
214
|
-
</div>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
# Navigation Component with active link styling
|
|
218
|
-
def Navigation -> any {
|
|
219
|
-
location = useLocation();
|
|
220
|
-
|
|
221
|
-
def linkStyle(path: str) -> dict {
|
|
222
|
-
isActive = location.pathname == path;
|
|
223
|
-
return {
|
|
224
|
-
"padding": "0.5rem 1rem",
|
|
225
|
-
"textDecoration": "none",
|
|
226
|
-
"color": "#0066cc" if isActive else "#333",
|
|
227
|
-
"fontWeight": "bold" if isActive else "normal",
|
|
228
|
-
"backgroundColor": "#e3f2fd" if isActive else "transparent",
|
|
229
|
-
"borderRadius": "4px",
|
|
230
|
-
"display": "inline-block"
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return <nav
|
|
235
|
-
style={{
|
|
236
|
-
"padding": "1rem",
|
|
237
|
-
"backgroundColor": "#f5f5f5",
|
|
238
|
-
"marginBottom": "2rem",
|
|
239
|
-
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
|
|
240
|
-
}}
|
|
241
|
-
>
|
|
242
|
-
<div
|
|
243
|
-
style={{
|
|
244
|
-
"maxWidth": "1200px",
|
|
245
|
-
"margin": "0 auto",
|
|
246
|
-
"display": "flex",
|
|
247
|
-
"gap": "1rem",
|
|
248
|
-
"alignItems": "center"
|
|
249
|
-
}}
|
|
250
|
-
>
|
|
251
|
-
<Link
|
|
252
|
-
to="/"
|
|
253
|
-
style={linkStyle("/")}
|
|
254
|
-
>
|
|
255
|
-
Home
|
|
256
|
-
</Link>
|
|
257
|
-
<Link
|
|
258
|
-
to="/about"
|
|
259
|
-
style={linkStyle("/about")}
|
|
260
|
-
>
|
|
261
|
-
About
|
|
262
|
-
</Link>
|
|
263
|
-
<Link
|
|
264
|
-
to="/contact"
|
|
265
|
-
style={linkStyle("/contact")}
|
|
266
|
-
>
|
|
267
|
-
Contact
|
|
268
|
-
</Link>
|
|
269
|
-
<Link
|
|
270
|
-
to="/user/123"
|
|
271
|
-
style={linkStyle("/user/123")}
|
|
272
|
-
>
|
|
273
|
-
Profile Demo
|
|
274
|
-
</Link>
|
|
275
|
-
</div>
|
|
276
|
-
</nav>;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
# Main App Component with React Router HashRouter
|
|
280
|
-
def:pub app -> any {
|
|
281
|
-
return <Router>
|
|
282
|
-
<div
|
|
283
|
-
style={{"fontFamily": "system-ui, -apple-system, sans-serif"}}
|
|
284
|
-
>
|
|
285
|
-
<Navigation />
|
|
286
|
-
<div
|
|
287
|
-
style={{
|
|
288
|
-
"maxWidth": "1200px",
|
|
289
|
-
"margin": "0 auto",
|
|
290
|
-
"padding": "0 1rem"
|
|
291
|
-
}}
|
|
292
|
-
>
|
|
293
|
-
<Routes>
|
|
294
|
-
<Route
|
|
295
|
-
path="/"
|
|
296
|
-
element={<Home />}
|
|
297
|
-
/>
|
|
298
|
-
<Route
|
|
299
|
-
path="/about"
|
|
300
|
-
element={<About />}
|
|
301
|
-
/>
|
|
302
|
-
<Route
|
|
303
|
-
path="/about/team"
|
|
304
|
-
element={<Team />}
|
|
305
|
-
/>
|
|
306
|
-
<Route
|
|
307
|
-
path="/contact"
|
|
308
|
-
element={<Contact />}
|
|
309
|
-
/>
|
|
310
|
-
<Route
|
|
311
|
-
path="/user/:id"
|
|
312
|
-
element={<UserProfile />}
|
|
313
|
-
/>
|
|
314
|
-
<Route
|
|
315
|
-
path="*"
|
|
316
|
-
element={<NotFound />}
|
|
317
|
-
/>
|
|
318
|
-
</Routes>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
</Router>;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"""Babel processing for JavaScript transpilation."""
|
|
2
|
-
import subprocess;
|
|
3
|
-
import from pathlib { Path }
|
|
4
|
-
import from jaclang.runtimelib.client_bundle { ClientBundleError }
|
|
5
|
-
import from .asset_processor { AssetProcessor }
|
|
6
|
-
import from .vite_bundler { ViteBundler }
|
|
7
|
-
|
|
8
|
-
"""Handles Babel compilation of JavaScript files."""
|
|
9
|
-
class BabelProcessor {
|
|
10
|
-
def init(self: BabelProcessor, project_dir: Path);
|
|
11
|
-
def compile(self: BabelProcessor) -> None;
|
|
12
|
-
def copy_assets_after_compile(
|
|
13
|
-
self: BabelProcessor,
|
|
14
|
-
compiled_dir: Path,
|
|
15
|
-
build_dir: Path,
|
|
16
|
-
asset_processor: AssetProcessor
|
|
17
|
-
) -> None;
|
|
18
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"""Copy CSS, assets, and TypeScript files from compiled/ to build/ after Babel compilation."""
|
|
2
|
-
|
|
3
|
-
impl BabelProcessor.copy_assets_after_compile(
|
|
4
|
-
self: BabelProcessor,
|
|
5
|
-
compiled_dir: Path,
|
|
6
|
-
build_dir: Path,
|
|
7
|
-
asset_processor: AssetProcessor
|
|
8
|
-
) -> None {
|
|
9
|
-
asset_processor.copy_assets(compiled_dir, build_dir);
|
|
10
|
-
asset_processor.copy_typescript_files(compiled_dir, build_dir);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
"""Run Babel compilation (npm run compile)."""
|
|
14
|
-
impl BabelProcessor.compile(self: BabelProcessor) -> None {
|
|
15
|
-
bundler = ViteBundler(self.project_dir);
|
|
16
|
-
# Ensure root package.json exists temporarily for npm commands
|
|
17
|
-
bundler._ensure_root_package_json();
|
|
18
|
-
try {
|
|
19
|
-
# Ensure dependencies are installed (check if node_modules exists)
|
|
20
|
-
build_dir = self.project_dir / '.client-build';
|
|
21
|
-
node_modules = build_dir / 'node_modules';
|
|
22
|
-
if not node_modules.exists() {
|
|
23
|
-
# Temporarily copy package.json to .client-build/ for npm install
|
|
24
|
-
build_package_json = build_dir / 'package.json';
|
|
25
|
-
configs_package_json = build_dir / '.jac-client.configs' / 'package.json';
|
|
26
|
-
if configs_package_json.exists() and not build_package_json.exists() {
|
|
27
|
-
import shutil;
|
|
28
|
-
shutil.copy2(configs_package_json, build_package_json);
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
# Install to .client-build/node_modules
|
|
32
|
-
subprocess.run(
|
|
33
|
-
['npm', 'install'],
|
|
34
|
-
cwd=build_dir,
|
|
35
|
-
check=True,
|
|
36
|
-
capture_output=True,
|
|
37
|
-
text=True
|
|
38
|
-
);
|
|
39
|
-
} except subprocess.CalledProcessError as e {
|
|
40
|
-
raise ClientBundleError(
|
|
41
|
-
f'Failed to install npm dependencies: {e.stderr}'
|
|
42
|
-
) from e ;
|
|
43
|
-
} except FileNotFoundError {
|
|
44
|
-
raise ClientBundleError(
|
|
45
|
-
'npm command not found. Ensure Node.js and npm are installed.'
|
|
46
|
-
) from None ;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
# Temporarily copy package.json to .client-build/ for npm run compile
|
|
51
|
-
build_package_json = build_dir / 'package.json';
|
|
52
|
-
configs_package_json = build_dir / '.jac-client.configs' / 'package.json';
|
|
53
|
-
if configs_package_json.exists() and not build_package_json.exists() {
|
|
54
|
-
import shutil;
|
|
55
|
-
shutil.copy2(configs_package_json, build_package_json);
|
|
56
|
-
}
|
|
57
|
-
command = ['npm', 'run', 'compile'];
|
|
58
|
-
subprocess.run(
|
|
59
|
-
command, cwd=build_dir, check=True, capture_output=True, text=True
|
|
60
|
-
);
|
|
61
|
-
} finally {
|
|
62
|
-
# Clean up temporary package.json in .client-build/
|
|
63
|
-
build_package_json = build_dir / 'package.json';
|
|
64
|
-
if build_package_json.exists() {
|
|
65
|
-
build_package_json.unlink();
|
|
66
|
-
}
|
|
67
|
-
# Move package-lock.json to .jac-client.configs/ if it exists
|
|
68
|
-
build_package_lock = build_dir / 'package-lock.json';
|
|
69
|
-
if build_package_lock.exists() {
|
|
70
|
-
configs_package_lock = build_dir / '.jac-client.configs' / 'package-lock.json';
|
|
71
|
-
if configs_package_lock.exists() {
|
|
72
|
-
configs_package_lock.unlink();
|
|
73
|
-
}
|
|
74
|
-
build_package_lock.rename(configs_package_lock);
|
|
75
|
-
}
|
|
76
|
-
# Always clean up root package.json and move package-lock.json
|
|
77
|
-
bundler._cleanup_root_package_files();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
"""Initialize the Babel processor."""
|
|
82
|
-
impl BabelProcessor.init(self: BabelProcessor, project_dir: Path) {
|
|
83
|
-
self.project_dir = project_dir;
|
|
84
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
jac_client/examples/all-in-one/assets/workers/worker.py,sha256=erXICb1WvDKYlReUIzgZf9v0Pey6pmWDbvAm9vtGQmg,131
|
|
2
|
-
jac_client/examples/all-in-one/src/app.jac,sha256=jLUT-1wYcMMoLthAh5x9qM6p5tXyjXst3ys0FMt4PG0,26924
|
|
3
|
-
jac_client/examples/all-in-one/src/button.jac,sha256=YS_Ae3dyNAvnGh8iP_uUg1VyuzaxleEkLFEx4u959tw,126
|
|
4
|
-
jac_client/examples/all-in-one/src/components/button.jac,sha256=AoWR2fUXS2UEAUk1CLoRgI-u9ecA0D_SUPKvQGEORIg,124
|
|
5
|
-
jac_client/examples/asset-serving/css-with-image/src/app.jac,sha256=Fx2wnAmtdfmbB0tyNyczvrrONpMs8lOl94TFsnJLBpc,2830
|
|
6
|
-
jac_client/examples/asset-serving/image-asset/src/app.jac,sha256=UP_UhE9pQn5zYr-wxDzOIRMzsjLZEZv_hSlreFAyyBQ,1665
|
|
7
|
-
jac_client/examples/asset-serving/import-alias/src/app.jac,sha256=zdUcpIBD5OlzxXORG5X1pNvqgI08LeNJx3-B1qg_q78,3524
|
|
8
|
-
jac_client/examples/basic/src/app.jac,sha256=fz7e4TRxKgooBUDoKczXQLqUOjNRYXXw_wcbV0ID_zs,534
|
|
9
|
-
jac_client/examples/basic-auth/src/app.jac,sha256=ebJsTZNB6DFQ079vkN74yxTseiHKhccUFCulpl3HHSc,14294
|
|
10
|
-
jac_client/examples/basic-auth-with-router/src/app.jac,sha256=V5gqPiU-rffgv3y958rhlTlzQx0UnITJm_mcYdpbbdM,15017
|
|
11
|
-
jac_client/examples/basic-full-stack/src/app.jac,sha256=qo_TeN2XQf_IOUR5iyZjbmoWTl0_-AL77y4M6xj_9CM,13240
|
|
12
|
-
jac_client/examples/css-styling/js-styling/src/app.jac,sha256=Gz2aN-PI_NvrwaPE8it3ql6-7ySqUjZt0Trb4XzeCnA,2490
|
|
13
|
-
jac_client/examples/css-styling/material-ui/src/app.jac,sha256=VVR-ET-QiOw4vsBvh9LCRq0RZ4bg1t7waMUApusyzoc,4770
|
|
14
|
-
jac_client/examples/css-styling/pure-css/src/app.jac,sha256=yYhZHLzvwcc4hl8PEArGsxDLkF_lrwszptcD62_HG9c,2074
|
|
15
|
-
jac_client/examples/css-styling/sass-example/src/app.jac,sha256=BdOFoYPzypL6DHIORlB6mAtKz9QOa31-XDWAdkRxfqU,2075
|
|
16
|
-
jac_client/examples/css-styling/styled-components/src/app.jac,sha256=hTinnvJR0vkL4G-0cgueO0LI6PBgS3QWBz-BFLrQe0c,1959
|
|
17
|
-
jac_client/examples/css-styling/tailwind-example/src/app.jac,sha256=ud0eFQB63PmXp6_tXY5vE4wEYZkAJhC0x78hVlWjzm0,3005
|
|
18
|
-
jac_client/examples/full-stack-with-auth/src/app.jac,sha256=X03dTafwWfixTM3lrmGaApYnoFu-CXL4igh-aqe8mPc,22068
|
|
19
|
-
jac_client/examples/little-x/src/app.jac,sha256=_hvNGuDjmIW3ddyNB7xOpA90sowz5XcBeLgMDVMiPq0,19151
|
|
20
|
-
jac_client/examples/little-x/src/submit-button.jac,sha256=zxaD7xRdpH8iDU-8lrNQaoMU_cYr-rC_ZxaVhZqTsmc,370
|
|
21
|
-
jac_client/examples/nested-folders/nested-advance/src/ButtonRoot.jac,sha256=cflz34exdyamxZaoK4zZOpOCZIIGkhOQw3P6iZ9myi4,195
|
|
22
|
-
jac_client/examples/nested-folders/nested-advance/src/app.jac,sha256=XO8_sjUv4KHQ4sXBiLFUPIrgMhrbj0t7SLkAnpmERMM,800
|
|
23
|
-
jac_client/examples/nested-folders/nested-advance/src/level1/ButtonSecondL.jac,sha256=smbct7iMQ_3W17v_5juphv0iw7kojFErgJxXekm7KAE,425
|
|
24
|
-
jac_client/examples/nested-folders/nested-advance/src/level1/Card.jac,sha256=4Ky5cxs8M0pBz7Ju2wTAI3H0z9qaw4LLDk4oYCKimVg,994
|
|
25
|
-
jac_client/examples/nested-folders/nested-advance/src/level1/level2/ButtonThirdL.jac,sha256=Y0PwJDrzp8x64Ks9IhXcsRBgjUnko-Ch10ZmRqIO4CI,603
|
|
26
|
-
jac_client/examples/nested-folders/nested-basic/src/app.jac,sha256=moz3YDZ3S9MFftcBrJHmFKYe6mpj_Hdb2kxcoX2R7GM,270
|
|
27
|
-
jac_client/examples/nested-folders/nested-basic/src/button.jac,sha256=WlV2pcssnGGsO-25hrcyA4PRw5o4Y5UpsUmCfBF-LrE,123
|
|
28
|
-
jac_client/examples/nested-folders/nested-basic/src/components/button.jac,sha256=_ErhjGJud5G32XiFL7p3N8wca-NSknvz2eNUt1fHKkE,119
|
|
29
|
-
jac_client/examples/ts-support/src/app.jac,sha256=wTZiS_228BqhTRsfnl9cgF4XwO2ntpXj1EOcY4iAiXo,1005
|
|
30
|
-
jac_client/examples/with-router/src/app.jac,sha256=ry09e3zdoTT9nu-JRMO8gh_6E7oR0RnE0692qXheKZI,8654
|
|
31
|
-
jac_client/plugin/cli.jac,sha256=9YZb7Gm_7FKt5gXJGEU6VEzOSyg9oVDE1352i-kRUcs,16445
|
|
32
|
-
jac_client/plugin/client.jac,sha256=Q-olwbc68WOdHvA4ODI2gLFkEbOzFWoz8rIWOXZwTGg,1618
|
|
33
|
-
jac_client/plugin/client_runtime.cl.jac,sha256=8jjdmdJr_fQn5Pwe0SI8WFrPN_elAJH-X4LVUwVZlVY,1503
|
|
34
|
-
jac_client/plugin/plugin_config.jac,sha256=rqm-wSlimUiIHgouqoGdCngxu0KVzgs3tzOPv1hYkCY,6538
|
|
35
|
-
jac_client/plugin/vite_client_bundle.jac,sha256=l8EY8O2sdsqhtO8I32Of01dgShRQBfMBNWXyl-y-vtY,1016
|
|
36
|
-
jac_client/plugin/impl/client.impl.jac,sha256=JKkvTn8b30ZGTOBne8pU9oQCaMH3Dw_TzjJagBEywBc,5517
|
|
37
|
-
jac_client/plugin/impl/client_runtime.impl.jac,sha256=zEdckBdvxMluclFctKI6YZ8SG2fS8b121ZFI_quwSaA,4907
|
|
38
|
-
jac_client/plugin/impl/vite_client_bundle.impl.jac,sha256=KXFqXSZaa08Z6CrEqebfdjo7TvdakTNJHVnGOhj4e0s,2620
|
|
39
|
-
jac_client/plugin/src/__init__.jac,sha256=ZyA9pRNofbdVMKKzKwMgWpqNHVF4gCq4fxVykEnU_6c,823
|
|
40
|
-
jac_client/plugin/src/asset_processor.jac,sha256=Qpm1a174PPJl32nH_eDZYR-6vx59V2NEWfj0knUMwXY,961
|
|
41
|
-
jac_client/plugin/src/babel_processor.jac,sha256=e6wgeGA4Wd1vu4di9PRik7M_Hbt6nhwq5pZaHCs5OMQ,612
|
|
42
|
-
jac_client/plugin/src/compiler.jac,sha256=h28nREagFOo_nFQP-DH-9YPWqNzjA852ZIi4k7QJFaU,2295
|
|
43
|
-
jac_client/plugin/src/config_loader.jac,sha256=VZxdsjelhvnW1dcG6yCD5uJH9PCMYR5x_l6fZdAgALs,1240
|
|
44
|
-
jac_client/plugin/src/import_processor.jac,sha256=wYg8bD5qHxpvFyXkQxNpqUIV3ei5aMoevA2bWyq9VG8,589
|
|
45
|
-
jac_client/plugin/src/jac_to_js.jac,sha256=U2_v95tdsbw1oMPGPY0HOhDcAsHg3uQIcGWzLmFdWyc,1115
|
|
46
|
-
jac_client/plugin/src/package_installer.jac,sha256=jOrg5mVEmZm2M-C5qNPfvA6_ePdjI-eTkMrTA45Sk50,848
|
|
47
|
-
jac_client/plugin/src/vite_bundler.jac,sha256=uddB5gQ5GLi-aG1gbGT1AagSbacGkSXjMfuU2V3qpfw,1422
|
|
48
|
-
jac_client/plugin/src/impl/asset_processor.impl.jac,sha256=-ljWYzKLKyAdfJybr8sjJlYSK57KzueeNvTo_WjAFAY,4256
|
|
49
|
-
jac_client/plugin/src/impl/babel_processor.impl.jac,sha256=kF-sf0HWJuckgxQKFfh5Hmg0yczEC4v_hUBwx2cTZ0I,3528
|
|
50
|
-
jac_client/plugin/src/impl/compiler.impl.jac,sha256=sNMAuRizsScvsVW7mEbsg2-dW543bUMmUrz3yYFmTjg,9984
|
|
51
|
-
jac_client/plugin/src/impl/config_loader.impl.jac,sha256=OcWxGho7pJ-VFZgc_PhtxyuawENwDZhMv26nuNpkIMI,4095
|
|
52
|
-
jac_client/plugin/src/impl/import_processor.impl.jac,sha256=BMkkZXlF-6jbC-r3tuFj8PDFvDZrbfzuhnaw8qraWIQ,1214
|
|
53
|
-
jac_client/plugin/src/impl/jac_to_js.impl.jac,sha256=YWu5U4Vx1fUnopln8wNPvAd17PcQTTfCUYALZerlZfo,1547
|
|
54
|
-
jac_client/plugin/src/impl/package_installer.impl.jac,sha256=Jb3sq9zK8HBm_GINz-9ohhhgMgD-omVjCso40UdnCo8,3887
|
|
55
|
-
jac_client/plugin/src/impl/vite_bundler.impl.jac,sha256=ZqWNXS6Zy0VauIy25ix0esBbrjrtCu97u91nSanswsg,20815
|
|
56
|
-
jac_client/tests/__init__.py,sha256=HSr78dvKyvNmP7bLmAssfYItAn4puFwAe1oWnV8l7pA,36
|
|
57
|
-
jac_client/tests/conftest.py,sha256=LOOgGU3td4W-bF6K2-SdAI9V6oXcxkk4BufphBhiIPY,8713
|
|
58
|
-
jac_client/tests/test_cli.py,sha256=2BNkjVfGcP5pseHE5V3yREksxiwjUowRi3IohFQWJxg,25902
|
|
59
|
-
jac_client/tests/test_it.py,sha256=80Mp-dcgL2iDSFAvWgwAM00YgbPfLqsaYUYIgryb164,29114
|
|
60
|
-
jac_client/tests/fixtures/basic-app/app.jac,sha256=sDup4PmtUm93oVOxIz874SSZfMimPv4Qn683iXm43TI,489
|
|
61
|
-
jac_client/tests/fixtures/cl_file/app.cl.jac,sha256=fHJvjKWLhX5uVdZl12mPwcNRgMVFrCz8oY3oMoCWeuM,1157
|
|
62
|
-
jac_client/tests/fixtures/cl_file/app.jac,sha256=GmuOisnyOGfDnQ_-6juBumliLDUt1t9HQtfRpJ8xuqk,277
|
|
63
|
-
jac_client/tests/fixtures/client_app_with_antd/app.jac,sha256=a8cNThrEuaBq6Lv7aa-K8hAzBIDHkiBHwqON1_Gq4D8,575
|
|
64
|
-
jac_client/tests/fixtures/js_import/app.jac,sha256=CAmAJ299KsbJ6BIdGYykBrTDAh-Df_fhOENwNxxAEbw,796
|
|
65
|
-
jac_client/tests/fixtures/relative_import/app.jac,sha256=Su4UVwZeXV32wnKWvrESaLPR30C-kqyKDUrZPyaw5gQ,188
|
|
66
|
-
jac_client/tests/fixtures/relative_import/button.jac,sha256=kCDNaHEcxMEFdezfnecyVc56cnZU_ZnqdBDOB4kCFeE,118
|
|
67
|
-
jac_client/tests/fixtures/spawn_test/app.jac,sha256=DwAgesIOPkmZlNgQ0QmrgwOwL2O1YeiNNI6QKgv3ToI,3971
|
|
68
|
-
jac_client/tests/fixtures/test_fragments_spread/app.jac,sha256=CMzAz4Ydx_5eAV82-io8sJdy8_xy-mR7YOVc7FcozlU,1277
|
|
69
|
-
jac_client/tests/fixtures/with-ts/app.jac,sha256=jCeOXCrUSYp4l8COnl60oIFTORS-qgWbufj6l2-67PU,1004
|
|
70
|
-
jac_client-0.2.6.dist-info/METADATA,sha256=lHbaMlcm4sY4OKRNRRJNgc72RtEhfg_7QHB19LCRBm8,4863
|
|
71
|
-
jac_client-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
72
|
-
jac_client-0.2.6.dist-info/entry_points.txt,sha256=fVrlaJKcSa2DK2hcfR6bNaQDB9mszMpZeEa6pitMdt4,154
|
|
73
|
-
jac_client-0.2.6.dist-info/top_level.txt,sha256=u1VEBfiqwRrZEopKraIh-Ym55qSnDZR3Q5xdw2HinhU,11
|
|
74
|
-
jac_client-0.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|