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.
Files changed (4) hide show
  1. package/README.md +223 -23
  2. package/engine.php +287 -31
  3. package/package.json +20 -4
  4. package/thoth.js +367 -115
package/README.md CHANGED
@@ -1,42 +1,242 @@
1
- # THOTH: The Sovereign Intelligence Suite (v10.5.0)
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=D4AF37&logo=npm" alt="NPM Version" />
5
- <img src="https://img.shields.io/badge/Version-10.5.0--Sovereign-D4AF37?style=for-the-badge" alt="Sovereign Version" />
6
- <img src="https://img.shields.io/badge/Built%20In-Egypt%20πŸ‡ͺπŸ‡¬-orange?style=for-the-badge" alt="Egypt" />
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
- **The Binary Wisdom of Web Architecture.** THOTH is a high-performance, sovereign, indentation-based markup language and recursive runtime engine. It eliminates structural noise and redefines web development through pure, bracket-less logic.
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
- ## πŸ›οΈ Architectural Philosophy
65
+ ### 🌐 Smart SPA Routing
66
+ ```text
67
+ Route "/":
68
+ Route "/dashboard":
69
+ ```
14
70
 
15
- THOTH represents a shift from "tag-heavy" markup to **Recursive Indentation Logic**. In version 10.5.0, the engine introduces **Strict File Identification**, requiring all sovereign files to declare their identity with `TYPE THOTH`. This ensures architectural integrity and prevents non-sovereign code execution.
71
+ Zero config. Zero libraries.
16
72
 
17
- - **Official Website:** [thoth-lang.com](https://honeydew-pigeon-679592.hostingersite.com/)
18
- - **Architected by:** [Engineer Abdelfatah Abdelhamed](mailto:abdelfatahabdelhamed.kfs@gmail.com)
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
- ## πŸ’Ž Intelligence Suite Features (v10.5.0)
105
+ ### πŸ” Auth Guards
106
+ ```text
107
+ Header Auth="admin":
108
+ ```
23
109
 
24
- * **πŸ›‘οΈ Strict Identification:** Mandatory `TYPE THOTH` header to ensure file sovereignty.
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
- ## πŸš€ Technical Implementation
114
+ ### 🐞 Smart Tracebacks
115
+ Errors actually help you:
37
116
 
38
- ### Global Installation
39
- Install the THOTH CLI via NPM:
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>