jac-client 0.2.3__py3-none-any.whl → 0.2.8__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/app.jac +494 -347
- jac_client/examples/all-in-one/assets/workers/worker.py +5 -0
- jac_client/examples/all-in-one/button.jac +1 -1
- jac_client/examples/all-in-one/components/CategoryFilter.jac +35 -0
- jac_client/examples/all-in-one/components/Header.jac +13 -0
- jac_client/examples/all-in-one/components/ProfitOverview.jac +50 -0
- jac_client/examples/all-in-one/components/Summary.jac +53 -0
- jac_client/examples/all-in-one/components/TransactionForm.jac +158 -0
- jac_client/examples/all-in-one/components/TransactionItem.jac +55 -0
- jac_client/examples/all-in-one/components/TransactionList.jac +37 -0
- jac_client/examples/all-in-one/components/button.jac +1 -1
- jac_client/examples/all-in-one/components/navigation.jac +132 -0
- jac_client/examples/all-in-one/constants/categories.jac +37 -0
- jac_client/examples/all-in-one/constants/clients.jac +13 -0
- jac_client/examples/all-in-one/context/BudgetContext.jac +28 -0
- jac_client/examples/all-in-one/hooks/useBudget.jac +116 -0
- jac_client/examples/all-in-one/hooks/useLocalStorage.jac +36 -0
- jac_client/examples/all-in-one/pages/BudgetPlanner.cl.jac +70 -0
- jac_client/examples/all-in-one/pages/BudgetPlanner.jac +126 -0
- jac_client/examples/all-in-one/pages/FeaturesTest.cl.jac +552 -0
- jac_client/examples/all-in-one/pages/FeaturesTest.jac +126 -0
- jac_client/examples/all-in-one/pages/LandingPage.jac +101 -0
- jac_client/examples/all-in-one/pages/loginPage.jac +132 -0
- jac_client/examples/all-in-one/pages/nestedDemo.jac +61 -0
- jac_client/examples/all-in-one/pages/notFound.jac +24 -0
- jac_client/examples/all-in-one/pages/signupPage.jac +133 -0
- jac_client/examples/all-in-one/utils/formatters.jac +52 -0
- jac_client/examples/asset-serving/css-with-image/{app.jac → src/app.jac} +4 -4
- jac_client/examples/asset-serving/image-asset/{app.jac → src/app.jac} +4 -4
- jac_client/examples/asset-serving/import-alias/{app.jac → src/app.jac} +5 -5
- jac_client/examples/basic/{app.jac → src/app.jac} +4 -4
- jac_client/examples/basic-auth/src/app.jac +371 -0
- jac_client/examples/basic-auth-with-router/{app.jac → src/app.jac} +28 -28
- jac_client/examples/basic-full-stack/{app.jac → src/app.jac} +166 -127
- jac_client/examples/css-styling/js-styling/{app.jac → src/app.jac} +7 -7
- jac_client/examples/css-styling/material-ui/{app.jac → src/app.jac} +6 -6
- jac_client/examples/css-styling/pure-css/{app.jac → src/app.jac} +7 -7
- jac_client/examples/css-styling/sass-example/{app.jac → src/app.jac} +7 -7
- jac_client/examples/css-styling/styled-components/{app.jac → src/app.jac} +6 -6
- jac_client/examples/css-styling/tailwind-example/{app.jac → src/app.jac} +7 -7
- jac_client/examples/full-stack-with-auth/{app.jac → src/app.jac} +47 -47
- jac_client/examples/little-x/{app.jac → src/app.jac} +27 -32
- jac_client/examples/little-x/src/submit-button.jac +16 -0
- jac_client/examples/nested-folders/nested-advance/{ButtonRoot.jac → src/ButtonRoot.jac} +1 -1
- jac_client/examples/nested-folders/nested-advance/{app.jac → src/app.jac} +1 -1
- jac_client/examples/nested-folders/nested-advance/{level1 → src/level1}/ButtonSecondL.jac +1 -1
- jac_client/examples/nested-folders/nested-advance/{level1 → src/level1}/Card.jac +1 -1
- jac_client/examples/nested-folders/nested-advance/{level1 → src/level1}/level2/ButtonThirdL.jac +1 -1
- jac_client/examples/nested-folders/nested-basic/{app.jac → src/app.jac} +2 -2
- jac_client/examples/nested-folders/nested-basic/{button.jac → src/button.jac} +1 -1
- jac_client/examples/nested-folders/nested-basic/{components → src/components}/button.jac +1 -1
- jac_client/examples/ts-support/src/app.jac +35 -0
- jac_client/examples/with-router/{app.jac → src/app.jac} +15 -15
- jac_client/plugin/cli.jac +504 -0
- jac_client/plugin/client.jac +45 -0
- jac_client/plugin/client_runtime.cl.jac +42 -0
- jac_client/plugin/impl/client.impl.jac +193 -0
- jac_client/plugin/impl/client_runtime.impl.jac +195 -0
- jac_client/plugin/impl/vite_client_bundle.impl.jac +72 -0
- jac_client/plugin/plugin_config.jac +195 -0
- jac_client/plugin/src/__init__.jac +20 -0
- jac_client/plugin/src/asset_processor.jac +33 -0
- jac_client/plugin/src/babel_processor.jac +18 -0
- jac_client/plugin/src/compiler.jac +67 -0
- jac_client/plugin/src/config_loader.jac +32 -0
- jac_client/plugin/src/impl/asset_processor.impl.jac +127 -0
- jac_client/plugin/src/impl/babel_processor.impl.jac +89 -0
- jac_client/plugin/src/impl/compiler.impl.jac +288 -0
- jac_client/plugin/src/impl/config_loader.impl.jac +119 -0
- jac_client/plugin/src/impl/import_processor.impl.jac +33 -0
- jac_client/plugin/src/impl/jac_to_js.impl.jac +41 -0
- jac_client/plugin/src/impl/package_installer.impl.jac +105 -0
- jac_client/plugin/src/impl/vite_bundler.impl.jac +626 -0
- jac_client/plugin/src/import_processor.jac +19 -0
- jac_client/plugin/src/jac_to_js.jac +35 -0
- jac_client/plugin/src/package_installer.jac +26 -0
- jac_client/plugin/src/vite_bundler.jac +44 -0
- jac_client/plugin/vite_client_bundle.jac +31 -0
- jac_client/tests/conftest.py +283 -0
- jac_client/tests/fixtures/basic-app/app.jac +2 -2
- jac_client/tests/fixtures/cl_file/app.cl.jac +2 -2
- jac_client/tests/fixtures/client_app_with_antd/app.jac +1 -1
- jac_client/tests/fixtures/js_import/app.jac +5 -5
- jac_client/tests/fixtures/spawn_test/app.jac +15 -18
- jac_client/tests/fixtures/with-ts/app.jac +35 -0
- jac_client/tests/test_cli.py +811 -0
- jac_client/tests/test_it.py +592 -97
- {jac_client-0.2.3.dist-info → jac_client-0.2.8.dist-info}/METADATA +41 -34
- jac_client-0.2.8.dist-info/RECORD +97 -0
- {jac_client-0.2.3.dist-info → jac_client-0.2.8.dist-info}/WHEEL +2 -1
- jac_client-0.2.8.dist-info/entry_points.txt +4 -0
- jac_client-0.2.8.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/assets/burger.png +0 -0
- 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/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/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/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/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/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/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/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/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/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/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/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/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/package.json +0 -28
- jac_client/examples/full-stack-with-auth/vite.config.js +0 -29
- 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/README.md +0 -77
- 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.js +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/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/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/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,153 +0,0 @@
|
|
|
1
|
-
// Sass Variables
|
|
2
|
-
$primary-gradient-start: #dbeafe;
|
|
3
|
-
$primary-gradient-end: #e0e7ff;
|
|
4
|
-
$white: #ffffff;
|
|
5
|
-
$gray-800: #1f2937;
|
|
6
|
-
$gray-600: #4b5563;
|
|
7
|
-
$gray-500: #6b7280;
|
|
8
|
-
$green-600: #16a34a;
|
|
9
|
-
$red-500: #ef4444;
|
|
10
|
-
$red-600: #dc2626;
|
|
11
|
-
|
|
12
|
-
// Mixins
|
|
13
|
-
@mixin flex-center {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin button-base {
|
|
20
|
-
color: $white;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
padding: 0.75rem 1.5rem;
|
|
23
|
-
border-radius: 0.5rem;
|
|
24
|
-
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
25
|
-
transition: all 0.2s ease;
|
|
26
|
-
font-size: 1.25rem;
|
|
27
|
-
border: none;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
|
|
30
|
-
&:hover {
|
|
31
|
-
transform: scale(1.05);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:active {
|
|
35
|
-
transform: scale(0.95);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin gradient-divider {
|
|
40
|
-
height: 1px;
|
|
41
|
-
background: linear-gradient(to right, transparent, $gray-500, transparent);
|
|
42
|
-
margin-bottom: 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Container
|
|
46
|
-
.container {
|
|
47
|
-
min-height: 100vh;
|
|
48
|
-
background: linear-gradient(to bottom right, $primary-gradient-start, $primary-gradient-end);
|
|
49
|
-
@include flex-center;
|
|
50
|
-
padding: 1rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Card
|
|
54
|
-
.card {
|
|
55
|
-
background-color: $white;
|
|
56
|
-
border-radius: 1rem;
|
|
57
|
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
58
|
-
padding: 2rem;
|
|
59
|
-
max-width: 28rem;
|
|
60
|
-
width: 100%;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Title
|
|
64
|
-
.title {
|
|
65
|
-
font-size: 1.875rem;
|
|
66
|
-
font-weight: bold;
|
|
67
|
-
color: $gray-800;
|
|
68
|
-
text-align: center;
|
|
69
|
-
margin-bottom: 1.5rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Divider
|
|
73
|
-
.divider {
|
|
74
|
-
@include gradient-divider;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Counter Section
|
|
78
|
-
.counterSection {
|
|
79
|
-
text-align: center;
|
|
80
|
-
margin-bottom: 2rem;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.label {
|
|
84
|
-
font-size: 0.875rem;
|
|
85
|
-
font-weight: 600;
|
|
86
|
-
color: $gray-600;
|
|
87
|
-
margin-bottom: 0.5rem;
|
|
88
|
-
text-transform: uppercase;
|
|
89
|
-
letter-spacing: 0.05em;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Count Display with dynamic colors
|
|
93
|
-
.countDisplay {
|
|
94
|
-
font-size: 3.75rem;
|
|
95
|
-
font-weight: bold;
|
|
96
|
-
transition: color 0.3s ease;
|
|
97
|
-
|
|
98
|
-
&.zero {
|
|
99
|
-
color: $gray-800;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&.positive {
|
|
103
|
-
color: $green-600;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.negative {
|
|
107
|
-
color: $red-600;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Button Group
|
|
112
|
-
.buttonGroup {
|
|
113
|
-
@include flex-center;
|
|
114
|
-
gap: 1rem;
|
|
115
|
-
margin-bottom: 1.5rem;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Buttons
|
|
119
|
-
.btn {
|
|
120
|
-
@include button-base;
|
|
121
|
-
|
|
122
|
-
&Decrement {
|
|
123
|
-
background-color: $red-500;
|
|
124
|
-
|
|
125
|
-
&:hover {
|
|
126
|
-
background-color: darken($red-500, 10%);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&Reset {
|
|
131
|
-
background-color: $gray-500;
|
|
132
|
-
|
|
133
|
-
&:hover {
|
|
134
|
-
background-color: darken($gray-500, 10%);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&Increment {
|
|
139
|
-
background-color: $green-600;
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
background-color: darken($green-600, 10%);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Hint
|
|
148
|
-
.hint {
|
|
149
|
-
text-align: center;
|
|
150
|
-
font-size: 0.875rem;
|
|
151
|
-
color: $gray-500;
|
|
152
|
-
font-style: italic;
|
|
153
|
-
}
|
|
@@ -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,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "styled-components",
|
|
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: styled-components",
|
|
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
|
-
"styled-components": "^6.1.13"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
|
|
3
|
-
export const Container = styled.div`
|
|
4
|
-
min-height: 100vh;
|
|
5
|
-
background: linear-gradient(to bottom right, #dbeafe, #e0e7ff);
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
padding: 1rem;
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export const Card = styled.div`
|
|
13
|
-
background-color: #ffffff;
|
|
14
|
-
border-radius: 1rem;
|
|
15
|
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
16
|
-
padding: 2rem;
|
|
17
|
-
max-width: 28rem;
|
|
18
|
-
width: 100%;
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
export const Title = styled.h1`
|
|
22
|
-
font-size: 1.875rem;
|
|
23
|
-
font-weight: bold;
|
|
24
|
-
color: #1f2937;
|
|
25
|
-
text-align: center;
|
|
26
|
-
margin-bottom: 1.5rem;
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
export const Divider = styled.div`
|
|
30
|
-
height: 1px;
|
|
31
|
-
background: linear-gradient(to right, transparent, #d1d5db, transparent);
|
|
32
|
-
margin-bottom: 1.5rem;
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
export const CounterSection = styled.div`
|
|
36
|
-
text-align: center;
|
|
37
|
-
margin-bottom: 2rem;
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
export const Label = styled.div`
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
color: #4b5563;
|
|
44
|
-
margin-bottom: 0.5rem;
|
|
45
|
-
text-transform: uppercase;
|
|
46
|
-
letter-spacing: 0.05em;
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
export const CountDisplay = styled.div`
|
|
50
|
-
font-size: 3.75rem;
|
|
51
|
-
font-weight: bold;
|
|
52
|
-
transition: color 0.3s ease;
|
|
53
|
-
color: ${props => props.count === 0 ? "#1f2937" : (props.count > 0 ? "#16a34a" : "#dc2626")};
|
|
54
|
-
`;
|
|
55
|
-
|
|
56
|
-
export const ButtonGroup = styled.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
align-items: center;
|
|
60
|
-
gap: 1rem;
|
|
61
|
-
margin-bottom: 1.5rem;
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
export const Button = styled.button`
|
|
65
|
-
color: #ffffff;
|
|
66
|
-
font-weight: bold;
|
|
67
|
-
padding: 0.75rem 1.5rem;
|
|
68
|
-
border-radius: 0.5rem;
|
|
69
|
-
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
70
|
-
transition: all 0.2s ease;
|
|
71
|
-
font-size: 1.25rem;
|
|
72
|
-
border: none;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
background-color: ${props => props.bgColor};
|
|
75
|
-
|
|
76
|
-
&:hover {
|
|
77
|
-
transform: scale(1.05);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:active {
|
|
81
|
-
transform: scale(0.95);
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
|
|
85
|
-
export const Hint = styled.div`
|
|
86
|
-
text-align: center;
|
|
87
|
-
font-size: 0.875rem;
|
|
88
|
-
color: #6b7280;
|
|
89
|
-
font-style: italic;
|
|
90
|
-
`;
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tailwind-example",
|
|
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: tailwind-example",
|
|
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
|
-
"@tailwindcss/vite": "^4.1.17",
|
|
25
|
-
"react": "^19.2.0",
|
|
26
|
-
"react-dom": "^19.2.0",
|
|
27
|
-
"react-router-dom": "^6.30.1",
|
|
28
|
-
"tailwindcss": "^4.1.17"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
-
import path from "path";
|
|
5
|
-
import { fileURLToPath } from "url";
|
|
6
|
-
|
|
7
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
root: ".", // base folder
|
|
11
|
-
build: {
|
|
12
|
-
rollupOptions: {
|
|
13
|
-
input: "build/main.js", // your compiled entry file
|
|
14
|
-
output: {
|
|
15
|
-
entryFileNames: "client.[hash].js", // name of the final js file
|
|
16
|
-
assetFileNames: "[name].[ext]",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
outDir: "dist", // final bundled output
|
|
20
|
-
emptyOutDir: true,
|
|
21
|
-
},
|
|
22
|
-
plugins: [ tailwindcss(), ],
|
|
23
|
-
publicDir: false,
|
|
24
|
-
resolve: {
|
|
25
|
-
alias: {
|
|
26
|
-
"@jac-client/utils": path.resolve(__dirname, "src/client_runtime.js"),
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "full-stack-with-auth",
|
|
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: full-stack-with-auth",
|
|
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,29 +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
|
-
minify: false,
|
|
21
|
-
sourcemap: true,
|
|
22
|
-
},
|
|
23
|
-
publicDir: false,
|
|
24
|
-
resolve: {
|
|
25
|
-
alias: {
|
|
26
|
-
"@jac-client/utils": path.resolve(__dirname, "src/client_runtime.js"),
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "littlex-vite-bundler",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Vite bundler for LittleX Jac application",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "vite build"
|
|
8
|
-
},
|
|
9
|
-
"devDependencies": {
|
|
10
|
-
"vite": "^5.0.0"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"antd": "^5.27.6",
|
|
14
|
-
"bootstrap": "^5.3.8",
|
|
15
|
-
"lodash": "^4.17.21",
|
|
16
|
-
"pluralize": "^8.0.0",
|
|
17
|
-
"precise-ui": "^2.1.17",
|
|
18
|
-
"react": "^18.2.0",
|
|
19
|
-
"react-animated-components": "^3.0.1",
|
|
20
|
-
"react-bootstrap": "^2.10.10",
|
|
21
|
-
"react-dom": "^18.2.0"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Nested Folder Levels Example
|
|
2
|
-
|
|
3
|
-
This example demonstrates multiple levels of folder nesting and how relative imports work across different directory levels.
|
|
4
|
-
|
|
5
|
-
## Project Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
nested-advance/
|
|
9
|
-
├── app.jac # Root entry point
|
|
10
|
-
├── ButtonRoot.jac # Root level button
|
|
11
|
-
└── level1/
|
|
12
|
-
├── ButtonSecondL.jac # Second level button
|
|
13
|
-
├── Card.jac # Card component (imports from root and level2)
|
|
14
|
-
└── level2/
|
|
15
|
-
└── ButtonThirdL.jac # Third level button
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Import Patterns Demonstrated
|
|
19
|
-
|
|
20
|
-
### 1. Root Level (`app.jac`)
|
|
21
|
-
```jac
|
|
22
|
-
# Import from root
|
|
23
|
-
cl import from .ButtonRoot { ButtonRoot }
|
|
24
|
-
|
|
25
|
-
# Import from level1
|
|
26
|
-
cl import from .level1.ButtonSecondL { ButtonSecondL }
|
|
27
|
-
|
|
28
|
-
# Import from level1/level2
|
|
29
|
-
cl import from .level1.level2.ButtonThirdL { ButtonThirdL }
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### 2. Second Level (`level1/ButtonSecondL.jac`)
|
|
33
|
-
```jac
|
|
34
|
-
# Import from root (go up one level with ..)
|
|
35
|
-
cl import from ..ButtonRoot { ButtonRoot }
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 3. Card Component (`level1/Card.jac`)
|
|
39
|
-
This demonstrates importing from both above and below:
|
|
40
|
-
```jac
|
|
41
|
-
# Import from root (go up two levels with ..)
|
|
42
|
-
cl import from ..ButtonRoot { ButtonRoot }
|
|
43
|
-
|
|
44
|
-
# Import from level2 (go down one level with .level2)
|
|
45
|
-
cl import from .level2.ButtonThirdL { ButtonThirdL }
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 4. Third Level (`level1/level2/ButtonThirdL.jac`)
|
|
49
|
-
```jac
|
|
50
|
-
# Import from root (go up three levels with ...)
|
|
51
|
-
cl import from ...ButtonRoot { ButtonRoot }
|
|
52
|
-
|
|
53
|
-
# Import from second level (go up one level with ..)
|
|
54
|
-
cl import from ..ButtonSecondL { ButtonSecondL }
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Running the Example
|
|
58
|
-
|
|
59
|
-
Make sure node modules are installed:
|
|
60
|
-
```bash
|
|
61
|
-
npm install
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
To run your Jac code, use the Jac CLI:
|
|
65
|
-
```bash
|
|
66
|
-
jac serve app.jac
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Key Concepts
|
|
70
|
-
|
|
71
|
-
- **Single dot (`.`)** - Current directory
|
|
72
|
-
- **Double dot (`..`)** - Parent directory (one level up)
|
|
73
|
-
- **Triple dot (`...`)** - Two levels up
|
|
74
|
-
- **Multiple dots** - Continue going up the directory tree
|
|
75
|
-
- **Dot notation after dots** - Go down into subdirectories (e.g., `.level2`)
|
|
76
|
-
|
|
77
|
-
This example shows how folder structure is preserved during compilation, ensuring all relative imports work correctly!
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "nested-advance",
|
|
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: nested-advance",
|
|
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
|
-
"antd": "^6.0.0",
|
|
25
|
-
"react": "^19.2.0",
|
|
26
|
-
"react-dom": "^19.2.0",
|
|
27
|
-
"react-router-dom": "^6.30.1"
|
|
28
|
-
}
|
|
29
|
-
}
|