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.
Files changed (119) hide show
  1. jac_client/examples/all-in-one/{src/button.jac → button.jac} +4 -3
  2. jac_client/examples/all-in-one/components/CategoryFilter.jac +47 -0
  3. jac_client/examples/all-in-one/components/Header.jac +17 -0
  4. jac_client/examples/all-in-one/components/ProfitOverview.jac +64 -0
  5. jac_client/examples/all-in-one/components/Summary.jac +76 -0
  6. jac_client/examples/all-in-one/components/TransactionForm.jac +188 -0
  7. jac_client/examples/all-in-one/components/TransactionItem.jac +62 -0
  8. jac_client/examples/all-in-one/components/TransactionList.jac +44 -0
  9. jac_client/examples/all-in-one/components/button.jac +8 -0
  10. jac_client/examples/all-in-one/components/navigation.jac +126 -0
  11. jac_client/examples/all-in-one/constants/categories.jac +36 -0
  12. jac_client/examples/all-in-one/constants/clients.jac +12 -0
  13. jac_client/examples/all-in-one/context/BudgetContext.jac +31 -0
  14. jac_client/examples/all-in-one/hooks/useBudget.jac +122 -0
  15. jac_client/examples/all-in-one/hooks/useLocalStorage.jac +37 -0
  16. jac_client/examples/all-in-one/main.jac +542 -0
  17. jac_client/examples/all-in-one/pages/BudgetPlanner.jac +140 -0
  18. jac_client/examples/all-in-one/pages/FeaturesTest.jac +157 -0
  19. jac_client/examples/all-in-one/pages/LandingPage.jac +124 -0
  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 +127 -0
  23. jac_client/examples/all-in-one/pages/nestedDemo.jac +54 -0
  24. jac_client/examples/all-in-one/pages/notFound.jac +18 -0
  25. jac_client/examples/all-in-one/pages/signupPage.jac +127 -0
  26. jac_client/examples/all-in-one/utils/formatters.jac +49 -0
  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 +507 -470
  54. jac_client/plugin/client.jac +30 -12
  55. jac_client/plugin/client_runtime.cl.jac +25 -15
  56. jac_client/plugin/impl/client.impl.jac +126 -26
  57. jac_client/plugin/impl/client_runtime.impl.jac +182 -10
  58. jac_client/plugin/plugin_config.jac +216 -34
  59. jac_client/plugin/src/__init__.jac +0 -2
  60. jac_client/plugin/src/compiler.jac +2 -2
  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 +99 -30
  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 +384 -144
  69. jac_client/plugin/src/package_installer.jac +1 -1
  70. jac_client/plugin/src/targets/desktop/sidecar/main.py +144 -0
  71. jac_client/plugin/src/targets/desktop_target.jac +37 -0
  72. jac_client/plugin/src/targets/impl/desktop_target.impl.jac +2347 -0
  73. jac_client/plugin/src/targets/impl/registry.impl.jac +64 -0
  74. jac_client/plugin/src/targets/impl/web_target.impl.jac +157 -0
  75. jac_client/plugin/src/targets/register.jac +21 -0
  76. jac_client/plugin/src/targets/registry.jac +87 -0
  77. jac_client/plugin/src/targets/web_target.jac +35 -0
  78. jac_client/plugin/src/vite_bundler.jac +15 -1
  79. jac_client/plugin/utils/__init__.jac +3 -0
  80. jac_client/plugin/utils/bun_installer.jac +16 -0
  81. jac_client/plugin/utils/impl/bun_installer.impl.jac +99 -0
  82. jac_client/templates/client.jacpack +72 -0
  83. jac_client/templates/fullstack.jacpack +61 -0
  84. jac_client/tests/conftest.py +110 -52
  85. jac_client/tests/fixtures/spawn_test/app.jac +64 -70
  86. jac_client/tests/fixtures/with-ts/app.jac +28 -28
  87. jac_client/tests/test_cli.py +280 -113
  88. jac_client/tests/test_e2e.py +232 -0
  89. jac_client/tests/test_helpers.py +58 -0
  90. jac_client/tests/test_it.py +325 -154
  91. jac_client/tests/test_it_desktop.py +891 -0
  92. {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/METADATA +20 -11
  93. jac_client-0.2.11.dist-info/RECORD +113 -0
  94. {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/WHEEL +1 -1
  95. jac_client/examples/all-in-one/src/app.jac +0 -841
  96. jac_client/examples/all-in-one/src/components/button.jac +0 -7
  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 -377
  102. jac_client/examples/basic-auth-with-router/src/app.jac +0 -464
  103. jac_client/examples/basic-full-stack/src/app.jac +0 -365
  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 -84
  117. jac_client-0.2.6.dist-info/RECORD +0 -74
  118. {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/entry_points.txt +0 -0
  119. {jac_client-0.2.6.dist-info → jac_client-0.2.11.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,157 @@
1
+ # Features Test Page - Backend Logic
2
+ # This file is intentionally kept empty to demonstrate the separation of concerns
3
+ # where UI logic resides in .cl.jac files and backend walker logic in app.jac
4
+
5
+ # All walker implementations for this feature are in main.jac
6
+ # This demonstrates that you can have separate .jac files for different purposes
7
+ # Features Test - Backend Walkers
8
+ # This file demonstrates walker functionality for testing various JAC features
9
+ import from datetime {
10
+ datetime,
11
+ timedelta
12
+ }
13
+
14
+ # Node definition for storing test data
15
+ node TestData {
16
+ has message: str,
17
+ count: int = 0,
18
+ created_at: str = "";
19
+ }
20
+
21
+ # Walker: Create test data
22
+ walker create_test_data {
23
+ has message: str;
24
+
25
+ can create with `root entry {
26
+ new_data = here ++> TestData(
27
+ message=self.message,
28
+ count=1,
29
+ created_at=datetime.now().strftime("%Y-%m-%d %H:%M:%S")
30
+ );
31
+ report new_data;
32
+ }
33
+ }
34
+
35
+ # Walker: Read all test data
36
+ walker read_test_data {
37
+ can read with `root entry {
38
+ visit [-->(`?TestData)];
39
+ }
40
+
41
+ can report_data with exit {
42
+ report here;
43
+ }
44
+ }
45
+
46
+ # Walker: Update test data
47
+ walker update_test_data {
48
+ has new_message: str;
49
+
50
+ can update with TestData entry {
51
+ here.message = self.new_message;
52
+ here.count = here.count + 1;
53
+ report here;
54
+ }
55
+ }
56
+
57
+ # Walker: Delete test data
58
+ walker delete_test_data {
59
+ can delete with TestData entry {
60
+ del here;
61
+ report {"status": "deleted"};
62
+ }
63
+ }
64
+
65
+ # Walker: String manipulation test
66
+ walker test_string_methods {
67
+ has input_text: str;
68
+
69
+ can process with `root entry {
70
+ result = {
71
+ "original": self.input_text,
72
+ "uppercase": self.input_text.upper(),
73
+ "lowercase": self.input_text.lower(),
74
+ "capitalized": self.input_text.capitalize(),
75
+ "reversed": self.input_text[::-1],
76
+ "length": len(self.input_text),
77
+ "words": self.input_text.split(),
78
+ "trimmed": self.input_text.strip(),
79
+ "replaced": self.input_text.replace("test", "demo")
80
+ };
81
+ report result;
82
+ }
83
+ }
84
+
85
+ # Walker: Array/List operations test
86
+ walker test_list_operations {
87
+ has numbers: list;
88
+
89
+ can process with `root entry {
90
+ result = {
91
+ "original": self.numbers,
92
+ "sorted": sorted(self.numbers),
93
+ "reversed": list(reversed(self.numbers)),
94
+ "sum": sum(self.numbers),
95
+ "max": max(self.numbers) if len(self.numbers) > 0 else 0,
96
+ "min": min(self.numbers) if len(self.numbers) > 0 else 0,
97
+ "length": len(self.numbers),
98
+ "doubled": [x * 2 for x in self.numbers]
99
+ };
100
+ report result;
101
+ }
102
+ }
103
+
104
+ # Walker: Complex data processing
105
+ walker process_complex_data {
106
+ has items: list;
107
+
108
+ can process with `root entry {
109
+ processed = [];
110
+ for item in self.items {
111
+ processed.append(
112
+ {
113
+ "id": item.get("id", 0),
114
+ "name": item.get("name", "").upper(),
115
+ "value": item.get("value", 0) * 2,
116
+ "processed_at": datetime.now().strftime("%H:%M:%S")
117
+ }
118
+ );
119
+ }
120
+
121
+ result = {
122
+ "original_count": len(self.items),
123
+ "processed_count": len(processed),
124
+ "items": processed,
125
+ "total_value": sum([p["value"] for p in processed])
126
+ };
127
+
128
+ report result;
129
+ }
130
+ }
131
+
132
+ # Re-export client components from the standalone client module
133
+ cl {
134
+ import from .features_test_ui {
135
+ FeaturesTest as FeaturesTestUI,
136
+ TestButton as TestButtonUI,
137
+ TestCard as TestCardUI,
138
+ ResultDisplay as ResultDisplayUI
139
+ }
140
+
141
+ def:pub FeaturesTest -> any {
142
+ return
143
+ <FeaturesTestUI />;
144
+ }
145
+ def:pub TestButton(text: str, onClick: any, variant: str) -> any {
146
+ return
147
+ <TestButtonUI text={text} onClick={onClick} variant={variant} />;
148
+ }
149
+ def:pub TestCard(title: str, children: any, color: str) -> any {
150
+ return
151
+ <TestCardUI title={title} children={children} color={color} />;
152
+ }
153
+ def:pub ResultDisplay(data: any, label: str) -> any {
154
+ return
155
+ <ResultDisplayUI data={data} label={label} />;
156
+ }
157
+ }
@@ -0,0 +1,124 @@
1
+ # Landing Page - Ledgerly Brand
2
+ # Professional landing page with hero, features, and CTA sections
3
+ # Demonstrates: routing with Link, dark theme design, responsive layout
4
+ cl import from "@jac/runtime" {
5
+ Link,
6
+ }
7
+
8
+ cl {
9
+ def:pub LandingPage -> any {
10
+ return
11
+ <div className="landing-container">
12
+ <section className="hero-section">
13
+ <h1 className="brand-name">
14
+ Ledgerly
15
+ </h1>
16
+ <p className="tagline">
17
+ Know your real income
18
+ </p>
19
+ <h2 className="headline">
20
+ Track Business & Personal Finances Separately
21
+ </h2>
22
+ <p className="subheadline">
23
+ Built for freelancers who need to see their true incomeafter taxes and business expenses.
24
+ </p>
25
+ <div
26
+ style={{
27
+ "display": "flex",
28
+ "gap": "15px",
29
+ "justifyContent": "center"
30
+ }}
31
+ >
32
+ <Link to="/app">
33
+ <button className="cta-button">
34
+ Let's Plan
35
+ </button>
36
+ </Link>
37
+ <Link to="/features">
38
+ <button
39
+ className="cta-button"
40
+ style={{
41
+ "backgroundColor": "#8b5cf6",
42
+ "border": "2px solid #8b5cf6"
43
+ }}
44
+ >
45
+ Test Features
46
+ </button>
47
+ </Link>
48
+ </div>
49
+ </section>
50
+ <section className="features-section">
51
+ <h2 className="features-title">
52
+ Built for Freelancers
53
+ </h2>
54
+ <div className="features-grid">
55
+ <div className="feature-card">
56
+ <div className="feature-icon">
57
+ 💼
58
+ </div>
59
+ <h3 className="feature-title">
60
+ Business vs Personal
61
+ </h3>
62
+ <p className="feature-description">
63
+ Tag every transaction as business or personal.See your income streams separately and understand where your money really comes from.
64
+ </p>
65
+ </div>
66
+ <div className="feature-card">
67
+ <div className="feature-icon">
68
+ 📊
69
+ </div>
70
+ <h3 className="feature-title">
71
+ Auto Tax Reserve
72
+ </h3>
73
+ <p className="feature-description">
74
+ Automatically calculate 20% tax reserve on business income.Know your true net profit after taxes without surprises.
75
+ </p>
76
+ </div>
77
+ <div className="feature-card">
78
+ <div className="feature-icon">
79
+ 🏷️
80
+ </div>
81
+ <h3 className="feature-title">
82
+ Client Tagging
83
+ </h3>
84
+ <p className="feature-description">
85
+ Tag business income by client name. Track which clientsare generating the most revenue for your business.
86
+ </p>
87
+ </div>
88
+ </div>
89
+ </section>
90
+ <section className="cta-section">
91
+ <h2 className="cta-section-title">
92
+ Ready to know your real income?
93
+ </h2>
94
+ <p className="cta-section-text">
95
+ Start tracking your freelance finances the smart way.
96
+ </p>
97
+ <div
98
+ style={{
99
+ "display": "flex",
100
+ "gap": "15px",
101
+ "justifyContent": "center"
102
+ }}
103
+ >
104
+ <Link to="/app">
105
+ <button className="cta-button">
106
+ Get Started Free
107
+ </button>
108
+ </Link>
109
+ <Link to="/features">
110
+ <button
111
+ className="cta-button"
112
+ style={{
113
+ "backgroundColor": "#8b5cf6",
114
+ "border": "2px solid #8b5cf6"
115
+ }}
116
+ >
117
+ Explore Features
118
+ </button>
119
+ </Link>
120
+ </div>
121
+ </section>
122
+ </div>;
123
+ }
124
+ }
@@ -0,0 +1,65 @@
1
+ # Budget Planner Page
2
+ # Main application page with budget tracking features
3
+
4
+ # Local JAC file imports
5
+ cl import from ..context.BudgetContext { useBudgetContext }
6
+ cl import from ..components.Header { Header }
7
+ cl import from ..components.Summary { Summary }
8
+ cl import from ..components.ProfitOverview { ProfitOverview }
9
+ cl import from ..components.TransactionForm { TransactionForm }
10
+ cl import from ..components.TransactionList { TransactionList }
11
+ cl import from ..components.CategoryFilter { CategoryFilter }
12
+ cl import from ..constants.categories { CATEGORY_COLORS }
13
+
14
+ # cl import from "..components.PieChart.tsx" { PieChart }
15
+ cl def:pub BudgetPlanner -> any {
16
+ [filter, setFilter] = useState("ALL");
17
+ budget = useBudgetContext();
18
+
19
+ # Filter transactions based on selected category
20
+ filtered = budget["transactions"];
21
+ if filter != "ALL" {
22
+ filtered = filtered.filter(
23
+ lambda tx: dict -> bool { return tx["category"] == filter; }
24
+ );
25
+ }
26
+
27
+ # Sort by date (newest first)
28
+ sorted = filtered.slice().sort(
29
+ lambda a: dict , b: dict -> int { return Reflect.construct(Date, [b["date"]]).getTime() - Reflect.construct(
30
+ Date, [a["date"]]
31
+ ).getTime(); }
32
+ );
33
+
34
+ # Prepare chart data with colors
35
+ chartData = budget["expensesByCategory"].map(
36
+ lambda item: dict -> dict { return {
37
+ "name": item["name"],
38
+ "value": item["value"],
39
+ "color": CATEGORY_COLORS[item["name"]]
40
+ }; }
41
+ );
42
+
43
+ return
44
+ <div className="app-container">
45
+ <Header />
46
+ <main className="main-content">
47
+ <div className="left-panel">
48
+ <Summary />
49
+ <ProfitOverview />
50
+ <TransactionForm />
51
+ <CategoryFilter selectedCategory={filter} onSelect={setFilter} />
52
+ <TransactionList
53
+ transactions={sorted}
54
+ onDelete={budget["deleteTransaction"]}
55
+ />
56
+ </div>
57
+ <div className="right-panel"></div>
58
+ </main>
59
+ </div>;
60
+ }
61
+ # <PieChart
62
+ # data={chartData}
63
+ # title="Expense Breakdown"
64
+ # colors={CATEGORY_COLORS}
65
+ # />