free-framework 4.7.1 → 4.8.1
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/compiler/generator.js
CHANGED
|
@@ -207,12 +207,12 @@ if (server.namedMiddlewares['auth']) server.namedMiddlewares['AuthGuard'] = serv
|
|
|
207
207
|
" <meta name=\"csrf-token\" content=\"${res.context.csrfToken || ''}\">\n" +
|
|
208
208
|
" <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n" +
|
|
209
209
|
" <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n" +
|
|
210
|
-
" <link href=\"https://fonts.googleapis.com/css2?family=
|
|
210
|
+
" <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap\" rel=\"stylesheet\">\n" +
|
|
211
211
|
" <link rel=\"stylesheet\" href=\"/css/app.css\">\n" +
|
|
212
212
|
" <style>\n" +
|
|
213
|
-
" :root { --primary:#
|
|
214
|
-
" body { margin:0; font-family:'
|
|
215
|
-
"
|
|
213
|
+
" :root { --primary:#fff; --bg:#000; --border:#222; }\n" +
|
|
214
|
+
" body { margin:0; font-family:'Inter', system-ui, sans-serif; background:var(--bg); color:#fff; -webkit-font-smoothing:antialiased; }\n" +
|
|
215
|
+
" ${scopedCSS}\n" +
|
|
216
216
|
" </style>\n" +
|
|
217
217
|
" <script src=\"/free-runtime.js\" defer></script>\n" +
|
|
218
218
|
"</head>\n" +
|
package/compiler/parser.js
CHANGED
|
@@ -317,7 +317,7 @@ function parseTag(token, tokens, filename, source) {
|
|
|
317
317
|
attrs[attrName] = attrVal;
|
|
318
318
|
}
|
|
319
319
|
children.push({ type: 'tag', name: 'a', attributes: attrs, content: txt });
|
|
320
|
-
} else if (next.type === 'IDENTIFIER') {
|
|
320
|
+
} else if (next.type === 'IDENTIFIER' || next.type === 'KEYWORD') {
|
|
321
321
|
children.push(parseTag(next, tokens, filename, source));
|
|
322
322
|
}
|
|
323
323
|
}
|
package/package.json
CHANGED
|
@@ -3,84 +3,59 @@
|
|
|
3
3
|
@tailwind utilities;
|
|
4
4
|
|
|
5
5
|
:root {
|
|
6
|
-
--primary: #
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
6
|
+
--primary: #fff;
|
|
7
|
+
--secondary: #888;
|
|
8
|
+
--bg: #000;
|
|
9
|
+
--surface: #0a0a0a;
|
|
10
|
+
--border: #222;
|
|
11
|
+
--text-main: #fff;
|
|
12
|
+
--text-muted: #888;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
body {
|
|
15
|
-
@apply bg-black text-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
radial-gradient(circle at 80% 80%, rgba(0, 189, 255, 0.05) 0%, transparent 40%);
|
|
16
|
+
@apply bg-black text-white selection:bg-white selection:text-black;
|
|
17
|
+
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
18
|
+
-webkit-font-smoothing: antialiased;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
@apply
|
|
23
|
-
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
|
|
21
|
+
.container-pro {
|
|
22
|
+
@apply max-w-5xl mx-auto px-6;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
.
|
|
27
|
-
@apply
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.nav-link::after {
|
|
31
|
-
content: '';
|
|
32
|
-
@apply absolute bottom-0 left-0 w-0 h-0.5 bg-primary transition-all duration-300;
|
|
25
|
+
.btn-pro {
|
|
26
|
+
@apply px-6 py-2 rounded-md font-medium transition-all duration-200 flex items-center gap-2;
|
|
27
|
+
background: var(--primary);
|
|
28
|
+
color: #000;
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
.
|
|
36
|
-
@apply
|
|
31
|
+
.btn-pro:hover {
|
|
32
|
+
@apply opacity-90 scale-[0.98];
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
.btn-
|
|
40
|
-
@apply px-
|
|
41
|
-
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
|
42
|
-
color: #000;
|
|
43
|
-
box-shadow: 0 0 20px var(--primary-glow);
|
|
35
|
+
.btn-outline {
|
|
36
|
+
@apply px-6 py-2 rounded-md border border-border font-medium text-white transition-all hover:bg-white/5;
|
|
44
37
|
}
|
|
45
38
|
|
|
46
|
-
.
|
|
47
|
-
@apply
|
|
48
|
-
box-shadow: 0 0 40px var(--primary-glow);
|
|
39
|
+
.card-pro {
|
|
40
|
+
@apply p-8 rounded-xl border border-border bg-surface transition-all hover:border-white/20;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
|
-
.hero-
|
|
52
|
-
@apply text-
|
|
53
|
-
background: linear-gradient(180deg, #fff 0%, #888 100%);
|
|
54
|
-
-webkit-background-clip: text;
|
|
55
|
-
-webkit-text-fill-color: transparent;
|
|
43
|
+
.hero-title {
|
|
44
|
+
@apply text-5xl md:text-7xl font-bold tracking-tight text-white mb-6;
|
|
56
45
|
}
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
transform: translateY(0px);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
50% {
|
|
64
|
-
transform: translateY(-20px);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
100% {
|
|
68
|
-
transform: translateY(0px);
|
|
69
|
-
}
|
|
47
|
+
.nav-link {
|
|
48
|
+
@apply text-sm text-text-muted transition-colors hover:text-white;
|
|
70
49
|
}
|
|
71
50
|
|
|
72
|
-
.
|
|
73
|
-
|
|
51
|
+
.badge-pro {
|
|
52
|
+
@apply px-2 py-0.5 rounded border border-border text-[10px] font-bold tracking-widest uppercase text-text-muted;
|
|
74
53
|
}
|
|
75
54
|
|
|
76
|
-
|
|
77
|
-
@apply
|
|
55
|
+
pre {
|
|
56
|
+
@apply bg-black border border-border rounded-lg p-6 font-mono text-sm overflow-x-auto text-white/80;
|
|
78
57
|
}
|
|
79
58
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
84
|
-
* You can write custom CSS here or use Tailwind's utility classes directly
|
|
85
|
-
* in your .free components.
|
|
86
|
-
*/
|
|
59
|
+
code {
|
|
60
|
+
@apply font-mono;
|
|
61
|
+
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
component Header {
|
|
2
|
-
header class="fixed top-0 left-0 w-full z-50
|
|
3
|
-
nav class="
|
|
2
|
+
header class="fixed top-0 left-0 w-full z-50 bg-black border-b border-border h-16 flex items-center" {
|
|
3
|
+
nav class="container-pro w-full flex items-center justify-between" {
|
|
4
4
|
div class="flex items-center gap-8" {
|
|
5
|
-
a href="/" class="
|
|
6
|
-
|
|
7
|
-
span class="text-black font-black text-xl" { text "F" }
|
|
8
|
-
}
|
|
9
|
-
span class="text-2xl font-black tracking-tighter text-white" { text "FREE ULTRA" }
|
|
5
|
+
a href="/" class="text-white font-bold tracking-tight text-lg" {
|
|
6
|
+
text "FREE ULTRA"
|
|
10
7
|
}
|
|
11
8
|
|
|
12
|
-
div class="hidden md:flex
|
|
9
|
+
div class="hidden md:flex gap-6" {
|
|
13
10
|
a href="/" class="nav-link font-medium" { text "Home" }
|
|
14
11
|
a href="/dashboard" class="nav-link font-medium" { text "Dashboard" }
|
|
15
12
|
a href="/docs" class="nav-link font-medium" { text "Documentation" }
|
|
@@ -17,10 +14,10 @@ component Header {
|
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
div class="flex items-center gap-4" {
|
|
20
|
-
span class="
|
|
21
|
-
text "v4.
|
|
17
|
+
span class="badge-pro" {
|
|
18
|
+
text "v4.8.0-STABLE"
|
|
22
19
|
}
|
|
23
|
-
a href="/login" class="
|
|
20
|
+
a href="/login" class="text-sm font-medium text-white hover:opacity-80 transition-opacity" {
|
|
24
21
|
text "Sign In"
|
|
25
22
|
}
|
|
26
23
|
}
|
|
@@ -1,73 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* resources/views/home.free
|
|
3
|
-
*
|
|
4
|
-
* The default landing page component.
|
|
5
|
-
* Features modern Tailwind styling and demonstrates basic reactive state.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
component Home {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Hero Section
|
|
15
|
-
section class="relative max-w-7xl mx-auto flex flex-col items-center text-center py-20 md:py-32" {
|
|
16
|
-
div class="absolute -top-20 w-72 h-72 bg-primary/20 rounded-full blur-[120px] -z-10 animate-pulse" { }
|
|
17
|
-
div class="absolute top-40 -right-20 w-96 h-96 bg-secondary/10 rounded-full blur-[150px] -z-10" { }
|
|
18
|
-
|
|
19
|
-
h1 class="hero-text mb-8" {
|
|
20
|
-
text "Build Faster."
|
|
2
|
+
main class="pt-32 pb-20 overflow-hidden" {
|
|
3
|
+
// Hero
|
|
4
|
+
section class="container-pro text-center pt-20 pb-20" {
|
|
5
|
+
h1 class="hero-title" {
|
|
6
|
+
text "The Node.js Engine"
|
|
21
7
|
br { }
|
|
22
|
-
span class="text-
|
|
8
|
+
span class="text-text-muted" { text "for Enterprise." }
|
|
23
9
|
}
|
|
24
10
|
|
|
25
|
-
p class="text-xl
|
|
26
|
-
text "
|
|
11
|
+
p class="text-xl text-text-muted max-w-2xl mx-auto mb-10 leading-relaxed" {
|
|
12
|
+
text "High-performance islands architecture, built-in ORM, and blazing fast SSR. Zero configuration, infinite possibilities."
|
|
27
13
|
}
|
|
28
14
|
|
|
29
|
-
div class="flex flex-wrap justify-center gap-
|
|
30
|
-
a href="/docs" class="btn-
|
|
31
|
-
|
|
32
|
-
svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" {
|
|
33
|
-
path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="Arrow-right" { }
|
|
34
|
-
}
|
|
15
|
+
div class="flex flex-wrap justify-center gap-4" {
|
|
16
|
+
a href="/docs" class="btn-pro" {
|
|
17
|
+
text "Get Started"
|
|
35
18
|
}
|
|
36
|
-
a href="https://github.com/dev-omartolba" class="
|
|
37
|
-
text "
|
|
19
|
+
a href="https://github.com/dev-omartolba" class="btn-outline" {
|
|
20
|
+
text "Github"
|
|
38
21
|
}
|
|
39
22
|
}
|
|
40
23
|
|
|
41
|
-
div class="mt-20 w-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
div class="w-3 h-3 rounded-full bg-red-500/50" { }
|
|
45
|
-
div class="w-3 h-3 rounded-full bg-yellow-500/50" { }
|
|
46
|
-
div class="w-3 h-3 rounded-full bg-green-500/50" { }
|
|
47
|
-
}
|
|
48
|
-
pre class="p-8 text-left text-primary font-mono text-lg" {
|
|
49
|
-
code { text "npx free-framework new my-app" }
|
|
50
|
-
}
|
|
24
|
+
div class="mt-20 max-w-3xl mx-auto" {
|
|
25
|
+
pre {
|
|
26
|
+
code { text "npx free-framework new my-app" }
|
|
51
27
|
}
|
|
52
28
|
}
|
|
53
29
|
}
|
|
54
30
|
|
|
55
|
-
// Features
|
|
56
|
-
section class="
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
h3 class="text-2xl font-bold mb-4 text-primary" { text "HyperExpress Core" }
|
|
62
|
-
p class="text-gray-400" { text "Built on top of uWebSockets.js, providing the fastest HTTP/WebSocket performance in the Node.js ecosystem." }
|
|
31
|
+
// Features
|
|
32
|
+
section class="container-pro pt-20" {
|
|
33
|
+
div class="grid md:grid-cols-3 gap-6" {
|
|
34
|
+
div class="card-pro" {
|
|
35
|
+
h3 class="text-lg font-bold mb-2" { text "Speed" }
|
|
36
|
+
p class="text-sm text-text-muted" { text "Powered by HyperExpress and uWebSockets for extreme performance." }
|
|
63
37
|
}
|
|
64
|
-
div class="
|
|
65
|
-
h3 class="text-
|
|
66
|
-
p class="text-
|
|
38
|
+
div class="card-pro" {
|
|
39
|
+
h3 class="text-lg font-bold mb-2" { text "Islands" }
|
|
40
|
+
p class="text-sm text-text-muted" { text "Hydrate only what you need. Ships zero JS by default." }
|
|
67
41
|
}
|
|
68
|
-
div class="
|
|
69
|
-
h3 class="text-
|
|
70
|
-
p class="text-
|
|
42
|
+
div class="card-pro" {
|
|
43
|
+
h3 class="text-lg font-bold mb-2" { text "Enterprise" }
|
|
44
|
+
p class="text-sm text-text-muted" { text "Built-in auth, migrations, and pro-grade security patterns." }
|
|
71
45
|
}
|
|
72
46
|
}
|
|
73
47
|
}
|