thoth-markup-lang 10.5.0 β 12.0.0
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.
- package/README.md +223 -23
- package/engine.php +287 -31
- package/package.json +20 -4
- package/thoth.js +367 -115
package/README.md
CHANGED
|
@@ -1,42 +1,242 @@
|
|
|
1
|
-
# THOTH: The Sovereign Intelligence Suite
|
|
1
|
+
# π§ THOTH: The Sovereign Intelligence Suite
|
|
2
|
+
### v12.0.0 β Sovereign Cloud Edition
|
|
2
3
|
|
|
3
4
|
<p align="center">
|
|
4
|
-
<img src="https://img.shields.io/npm/v/thoth-markup-lang?style=for-the-badge&color=
|
|
5
|
-
<img src="https://img.shields.io/badge/
|
|
6
|
-
<img src="https://img.shields.io/badge/Built%20In-Egypt%20πͺπ¬-
|
|
5
|
+
<img src="https://img.shields.io/npm/v/thoth-markup-lang?style=for-the-badge&color=06b6d4&logo=npm" />
|
|
6
|
+
<img src="https://img.shields.io/badge/Architecture-Sovereign-f59e0b?style=for-the-badge" />
|
|
7
|
+
<img src="https://img.shields.io/badge/Built%20In-Egypt%20πͺπ¬-020617?style=for-the-badge" />
|
|
7
8
|
</p>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
<p align="center">
|
|
11
|
+
<b>Not a framework. Not a library. This is a new way to think.</b>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## β‘ What is THOTH?
|
|
17
|
+
|
|
18
|
+
THOTH is an **Asynchronous Reactive Web Engine** built to eliminate the chaos of traditional web development.
|
|
19
|
+
|
|
20
|
+
No closing tags.
|
|
21
|
+
No JS dependency for core logic.
|
|
22
|
+
No unnecessary complexity.
|
|
23
|
+
|
|
24
|
+
Just **pure architecture**.
|
|
25
|
+
|
|
26
|
+
> You donβt write code with THOTHβ¦ you *define systems*.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## π§ Why THOTH Exists
|
|
31
|
+
|
|
32
|
+
Modern web development is bloated:
|
|
33
|
+
- Too many frameworks
|
|
34
|
+
- Too much boilerplate
|
|
35
|
+
- Too much mental overhead
|
|
36
|
+
|
|
37
|
+
THOTH flips the table:
|
|
38
|
+
|
|
39
|
+
β Indentation instead of tags
|
|
40
|
+
β Native state instead of external stores
|
|
41
|
+
β Built-in routing instead of config hell
|
|
42
|
+
β Direct API binding without JavaScript
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## π Core Features
|
|
47
|
+
|
|
48
|
+
### βοΈ Sovereign Cloud Engine
|
|
49
|
+
Fetch APIs natively:
|
|
50
|
+
```text
|
|
51
|
+
API users="https://jsonplaceholder.typicode.com/users"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### β‘ Native State System
|
|
57
|
+
```text
|
|
58
|
+
State counter: 0
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Reactive updates β no re-render hacks.
|
|
10
62
|
|
|
11
63
|
---
|
|
12
64
|
|
|
13
|
-
|
|
65
|
+
### π Smart SPA Routing
|
|
66
|
+
```text
|
|
67
|
+
Route "/":
|
|
68
|
+
Route "/dashboard":
|
|
69
|
+
```
|
|
14
70
|
|
|
15
|
-
|
|
71
|
+
Zero config. Zero libraries.
|
|
16
72
|
|
|
17
|
-
|
|
18
|
-
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### π Flex Layout Engine
|
|
76
|
+
```text
|
|
77
|
+
Row gap="20px" align="center":
|
|
78
|
+
Column width="300px":
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Responsive by design.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### π§© Component System
|
|
86
|
+
```text
|
|
87
|
+
Define Card:
|
|
88
|
+
Box:
|
|
89
|
+
Text: @{{title}}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Reusable. Clean. No duplication.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### π Data Binding
|
|
97
|
+
```text
|
|
98
|
+
Text: @{{name}}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Direct binding. No middle layers.
|
|
19
102
|
|
|
20
103
|
---
|
|
21
104
|
|
|
22
|
-
|
|
105
|
+
### π Auth Guards
|
|
106
|
+
```text
|
|
107
|
+
Header Auth="admin":
|
|
108
|
+
```
|
|
23
109
|
|
|
24
|
-
|
|
25
|
-
* **π Zero-Bracket Architecture:** Eliminates opening/closing tags, reducing syntax noise by 70%.
|
|
26
|
-
* **π Recursive Data Binding:** Native integration with JSON flat-file databases using `@{{key}}`.
|
|
27
|
-
* **π Procedural Middleware (Auth Guard):** Secure structural nodes using `Auth="role"` attributes.
|
|
28
|
-
* **π Dev Server & Live Reload:** Integrated HTTP server with automated browser synchronization.
|
|
29
|
-
* **π Advanced Meta SEO Engine:** Automated generation of Meta Tags directly from your data context.
|
|
30
|
-
* **β οΈ Intelligent Error Overlay:** Real-time fault tracking identifying errors by line number.
|
|
31
|
-
* **π¦ Scoped Components:** Modular file management through the `Import:` directive.
|
|
32
|
-
* **π Hybrid Injection:** Native support for scoped `StyleSheet` (CSS) and `Scripting` (JS).
|
|
110
|
+
Security built into structure.
|
|
33
111
|
|
|
34
112
|
---
|
|
35
113
|
|
|
36
|
-
|
|
114
|
+
### π Smart Tracebacks
|
|
115
|
+
Errors actually help you:
|
|
37
116
|
|
|
38
|
-
|
|
39
|
-
|
|
117
|
+
```text
|
|
118
|
+
File "app.thoth", line 12
|
|
119
|
+
APIError: Failed to fetch data
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## π Quick Start
|
|
125
|
+
|
|
126
|
+
### 1. Install
|
|
40
127
|
|
|
41
128
|
```bash
|
|
42
|
-
npm install -g thoth-markup-lang
|
|
129
|
+
npm install -g thoth-markup-lang
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 2. Create App
|
|
135
|
+
|
|
136
|
+
**app.thoth**
|
|
137
|
+
```text
|
|
138
|
+
TYPE THOTH
|
|
139
|
+
|
|
140
|
+
Define UserCard:
|
|
141
|
+
Column width="300px":
|
|
142
|
+
Box class="card":
|
|
143
|
+
Sub: @{{name}}
|
|
144
|
+
Text: "Email: @{{email}}"
|
|
145
|
+
|
|
146
|
+
State active_users: 0
|
|
147
|
+
|
|
148
|
+
API users="https://jsonplaceholder.typicode.com/users"
|
|
149
|
+
|
|
150
|
+
Container:
|
|
151
|
+
Route "/":
|
|
152
|
+
Row gap="20px":
|
|
153
|
+
Repeat Over="users":
|
|
154
|
+
UserCard name="@{{name}}", email="@{{email}}"
|
|
155
|
+
|
|
156
|
+
Row:
|
|
157
|
+
Text: "Users: @{{active_users}}"
|
|
158
|
+
Button action="set:active_users=active_users+1": "Ping"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### 3. Run
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
thoth serve app.thoth
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### 4. Build
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
thoth build app.thoth
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## ποΈ Philosophy
|
|
180
|
+
|
|
181
|
+
THOTH is built on one idea:
|
|
182
|
+
|
|
183
|
+
> **Structure is more important than syntax.**
|
|
184
|
+
|
|
185
|
+
Everything else is noise.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## π₯ What Makes THOTH Different?
|
|
190
|
+
|
|
191
|
+
| Traditional Web | THOTH |
|
|
192
|
+
|------|--------|
|
|
193
|
+
| HTML + CSS + JS | One unified system |
|
|
194
|
+
| Manual state | Native state |
|
|
195
|
+
| React/Vue routing | Built-in routing |
|
|
196
|
+
| API via JS | Native API binding |
|
|
197
|
+
| JSX / Templates | Pure indentation |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## π§ͺ Example Output
|
|
202
|
+
|
|
203
|
+
From this:
|
|
204
|
+
```text
|
|
205
|
+
Text: "Hello World"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
To clean HTML β instantly.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## π‘οΈ Sovereign Rules
|
|
213
|
+
|
|
214
|
+
Every file MUST start with:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
TYPE THOTH
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
No exceptions.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## π Vision
|
|
225
|
+
|
|
226
|
+
THOTH is not trying to compete with frameworks.
|
|
227
|
+
|
|
228
|
+
Itβs trying to **replace the need for them**.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## π Final Word
|
|
233
|
+
|
|
234
|
+
> βSovereignty is not writing codeβ¦
|
|
235
|
+
> it is controlling how code is written.β
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
<p align="center">
|
|
240
|
+
<b>Engineered by Abdelfatah Abdelhamed</b><br>
|
|
241
|
+
<i>Cairo, Egypt πͺπ¬</i>
|
|
242
|
+
</p>
|