plainscript-lang 1.0.3-beta → 1.0.3
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 +97 -120
- package/compiler/bundler.js +83 -12
- package/compiler/cli.js +62 -11
- package/compiler/dependency-detector.js +11 -0
- package/compiler/generator.js +280 -15
- package/compiler/lexer.js +2 -0
- package/compiler/parser.js +410 -28
- package/compiler/sourcemap.js +142 -0
- package/compiler/version.js +1 -1
- package/docs/CAPABILITY_GAP_AUDIT.md +17 -15
- package/docs/PLAINSCRIPT-SPEC.md +41 -39
- package/docs/index.html +60 -33
- package/docs/website/script.js +168 -19
- package/docs/website/style.css +187 -41
- package/examples/ai-providers.pln +1 -1
- package/examples/arrays.pln +1 -1
- package/examples/async-errors.pln +1 -1
- package/examples/auth-api.pln +1 -1
- package/examples/auth-sessions.pln +1 -1
- package/examples/basics.pln +1 -1
- package/examples/bots.pln +1 -1
- package/examples/cache-and-jobs.pln +1 -1
- package/examples/cache-schedule.pln +1 -1
- package/examples/collections.pln +1 -1
- package/examples/concurrency.pln +1 -1
- package/examples/conditions.pln +1 -1
- package/examples/database.pln +1 -1
- package/examples/day2.pln +1 -1
- package/examples/day3.pln +1 -1
- package/examples/deployment.pln +1 -1
- package/examples/email-send.pln +1 -1
- package/examples/error-handling.pln +1 -1
- package/examples/expressions.pln +1 -1
- package/examples/file-uploads.pln +1 -1
- package/examples/files-and-config.pln +1 -1
- package/examples/files.pln +1 -1
- package/examples/football-backend/app.pln +1 -1
- package/examples/functions.pln +1 -1
- package/examples/hello.pln +1 -1
- package/examples/http-client.pln +1 -1
- package/examples/http.pln +1 -1
- package/examples/id-verification/app.pln +1 -1
- package/examples/json.pln +1 -1
- package/examples/loops.pln +1 -1
- package/examples/modules/app.pln +1 -1
- package/examples/modules/main.pln +1 -1
- package/examples/modules/math.pln +1 -1
- package/examples/mongo.pln +33 -0
- package/examples/objects.pln +1 -1
- package/examples/ocr.pln +1 -1
- package/examples/packages.pln +1 -1
- package/examples/record-kinds.pln +1 -1
- package/examples/records.pln +1 -1
- package/examples/rest-api-fetch.pln +1 -1
- package/examples/rest-api.pln +1 -1
- package/examples/scheduled-tasks.pln +1 -1
- package/examples/search-and-filter.pln +1 -1
- package/examples/server.pln +1 -1
- package/examples/sessions-and-cookies.pln +1 -1
- package/examples/sqlite.pln +1 -1
- package/examples/start.pln +1 -1
- package/examples/stdlib.pln +1 -1
- package/examples/string-verbs.pln +16 -0
- package/examples/telegram-ai-bot.pln +1 -1
- package/examples/telegram-bot.pln +1 -1
- package/examples/testing.pln +1 -1
- package/examples/web-api.pln +1 -1
- package/examples/web-app.pln +1 -1
- package/examples/websocket-server.pln +1 -1
- package/examples/websocket.pln +1 -1
- package/examples/whatsapp-bot/pairing.pln +1 -1
- package/examples/whatsapp-bot/qr.pln +1 -1
- package/package.json +3 -2
package/docs/website/script.js
CHANGED
|
@@ -1,26 +1,175 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
const prefersReduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5
|
+
|
|
6
|
+
// ── three.js animated background ──────────────────────────────────────
|
|
7
|
+
function mountBackground() {
|
|
8
|
+
const canvas = document.getElementById("bg-canvas");
|
|
9
|
+
if (!canvas || !window.WebGLRenderingContext) return;
|
|
10
|
+
|
|
11
|
+
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
|
|
12
|
+
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
|
|
13
|
+
|
|
14
|
+
const scene = new THREE.Scene();
|
|
15
|
+
const camera = new THREE.PerspectiveCamera(70, 1, 0.1, 100);
|
|
16
|
+
camera.position.z = 16;
|
|
17
|
+
|
|
18
|
+
const group = new THREE.Group();
|
|
19
|
+
scene.add(group);
|
|
20
|
+
|
|
21
|
+
// Distant particle field
|
|
22
|
+
const starCount = prefersReduced ? 0 : 800;
|
|
23
|
+
const positions = new Float32Array(starCount * 3);
|
|
24
|
+
for (let i = 0; i < starCount; i++) {
|
|
25
|
+
positions[i * 3] = (Math.random() - 0.5) * 34;
|
|
26
|
+
positions[i * 3 + 1] = (Math.random() - 0.5) * 22;
|
|
27
|
+
positions[i * 3 + 2] = (Math.random() - 0.5) * 30;
|
|
28
|
+
}
|
|
29
|
+
const starGeo = new THREE.BufferGeometry();
|
|
30
|
+
starGeo.setAttribute("position", new THREE.BufferAttribute(positions, 3));
|
|
31
|
+
const starMat = new THREE.PointsMaterial({
|
|
32
|
+
color: 0x46e6b4,
|
|
33
|
+
size: 0.09,
|
|
34
|
+
transparent: true,
|
|
35
|
+
opacity: 0.55,
|
|
36
|
+
sizeAttenuation: true,
|
|
37
|
+
depthWrite: false,
|
|
38
|
+
});
|
|
39
|
+
const stars = new THREE.Points(starGeo, starMat);
|
|
40
|
+
group.add(stars);
|
|
41
|
+
|
|
42
|
+
// Two soft wireframe rings for structure
|
|
43
|
+
const ringMat = new THREE.MeshBasicMaterial({
|
|
44
|
+
color: 0x46e6b4,
|
|
45
|
+
wireframe: true,
|
|
46
|
+
transparent: true,
|
|
47
|
+
opacity: 0.12,
|
|
48
|
+
});
|
|
49
|
+
for (const [radius, tilt, speed] of [[9.5, 0.4, 0.22], [6.5, -0.25, -0.16]]) {
|
|
50
|
+
const ring = new THREE.Mesh(new THREE.TorusGeometry(radius, 0.05, 8, 96), ringMat);
|
|
51
|
+
ring.rotation.x = tilt;
|
|
52
|
+
ring.rotation.y = 0.6;
|
|
53
|
+
group.add(ring);
|
|
54
|
+
ring.userData.speed = speed;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let mouseX = 0;
|
|
58
|
+
let mouseY = 0;
|
|
59
|
+
window.addEventListener("pointermove", (event) => {
|
|
60
|
+
mouseX = (event.clientX / window.innerWidth) * 2 - 1;
|
|
61
|
+
mouseY = (event.clientY / window.innerHeight) * 2 - 1;
|
|
62
|
+
}, { passive: true });
|
|
63
|
+
|
|
64
|
+
function resize() {
|
|
65
|
+
const width = window.innerWidth;
|
|
66
|
+
const height = window.innerHeight;
|
|
67
|
+
renderer.setSize(width, height);
|
|
68
|
+
camera.aspect = width / height;
|
|
69
|
+
camera.updateProjectionMatrix();
|
|
70
|
+
}
|
|
71
|
+
resize();
|
|
72
|
+
window.addEventListener("resize", resize);
|
|
73
|
+
|
|
74
|
+
const clock = new THREE.Clock();
|
|
75
|
+
function tick() {
|
|
76
|
+
const elapsed = clock.getElapsedTime();
|
|
77
|
+
group.rotation.y = elapsed * 0.06;
|
|
78
|
+
group.children.forEach((child) => {
|
|
79
|
+
if (child.userData.speed) {
|
|
80
|
+
child.rotation.z += child.userData.speed * 0.004;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// Parallax toward the cursor
|
|
84
|
+
const targetY = elapsed * 0.06 + mouseX * 0.15;
|
|
85
|
+
group.rotation.x += (mouseY * 0.12 - group.rotation.x) * 0.04;
|
|
86
|
+
group.rotation.y += (targetY - group.rotation.y) * 0.04;
|
|
87
|
+
camera.position.x += (mouseX * 1.1 - camera.position.x) * 0.03;
|
|
88
|
+
camera.position.y += (mouseY * 0.7 - camera.position.y) * 0.03;
|
|
89
|
+
camera.lookAt(scene.position);
|
|
90
|
+
renderer.render(scene, camera);
|
|
91
|
+
requestAnimationFrame(tick);
|
|
92
|
+
}
|
|
93
|
+
if (!prefersReduced) tick();
|
|
94
|
+
}
|
|
95
|
+
mountBackground();
|
|
96
|
+
|
|
97
|
+
// ── GSAP entrance + scroll reveals ────────────────────────────────────
|
|
98
|
+
const gsapOk = window.gsap && !prefersReduced;
|
|
99
|
+
|
|
100
|
+
if (gsapOk) {
|
|
101
|
+
gsap.registerPlugin(window.ScrollTrigger);
|
|
102
|
+
|
|
103
|
+
// Hero entrance
|
|
104
|
+
gsap.from(".hero-badge", { opacity: 0, y: 18, duration: 0.7, ease: "power2.out" });
|
|
105
|
+
gsap.from(".hero-title", {
|
|
106
|
+
opacity: 0, y: 30, duration: 0.9, ease: "power3.out", delay: 0.1,
|
|
107
|
+
});
|
|
108
|
+
gsap.from(".hero-lead", { opacity: 0, y: 22, duration: 0.8, ease: "power2.out", delay: 0.22 });
|
|
109
|
+
gsap.from(".hero-actions .button", {
|
|
110
|
+
opacity: 0, y: 18, duration: 0.6, ease: "power2.out", delay: 0.32, stagger: 0.08,
|
|
111
|
+
});
|
|
112
|
+
gsap.from(".hero .code-window", { opacity: 0, y: 26, duration: 0.8, ease: "power2.out", delay: 0.44 });
|
|
113
|
+
|
|
114
|
+
// Scroll reveals for cards and blocks
|
|
115
|
+
gsap.utils.toArray("[data-reveal]").forEach((el) => {
|
|
116
|
+
gsap.from(el, {
|
|
117
|
+
opacity: 0,
|
|
118
|
+
y: 28,
|
|
119
|
+
duration: 0.7,
|
|
120
|
+
ease: "power2.out",
|
|
121
|
+
scrollTrigger: { trigger: el, start: "top 88%", once: true },
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// Stagger card grids
|
|
126
|
+
gsap.utils.toArray(".three-column, .feature-grid").forEach((grid) => {
|
|
127
|
+
gsap.from(grid.children, {
|
|
128
|
+
opacity: 0,
|
|
129
|
+
y: 30,
|
|
130
|
+
duration: 0.6,
|
|
131
|
+
ease: "power2.out",
|
|
132
|
+
stagger: 0.08,
|
|
133
|
+
scrollTrigger: { trigger: grid, start: "top 86%", once: true },
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
} else {
|
|
137
|
+
// No-JS / reduced-motion fallback: keep everything visible
|
|
138
|
+
document.querySelectorAll("[data-reveal]").forEach((el) => el.style.opacity = 1);
|
|
139
|
+
document.querySelectorAll(".hero-badge, .hero-title, .hero-lead, .hero .code-window").forEach((el) => {
|
|
140
|
+
el.style.opacity = 1;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Nav blur once scrolled
|
|
145
|
+
const nav = document.getElementById("site-nav");
|
|
146
|
+
const onScroll = () => nav && nav.classList.toggle("is-scrolled", window.scrollY > 10);
|
|
147
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
148
|
+
onScroll();
|
|
149
|
+
|
|
150
|
+
// ── Feature library (search + filter) ─────────────────────────────────
|
|
4
151
|
const examples = [
|
|
5
|
-
{ category: "core", name: "Variables", description: "
|
|
6
|
-
{ category: "core", name: "Conditions", description: "
|
|
7
|
-
{ category: "core", name: "Loops", description: "
|
|
8
|
-
{ category: "core", name: "Functions", description: "
|
|
9
|
-
{ category: "
|
|
10
|
-
{ category: "data", name: "
|
|
11
|
-
{ category: "data", name: "
|
|
12
|
-
{ category: "
|
|
13
|
-
{ category: "
|
|
14
|
-
{ category: "web", name: "
|
|
15
|
-
{ category: "
|
|
16
|
-
{ category: "
|
|
17
|
-
{ category: "runtime", name: "
|
|
18
|
-
{ category: "runtime", name: "
|
|
19
|
-
{ category: "
|
|
20
|
-
{ category: "
|
|
21
|
-
{ category: "integrations", name: "
|
|
22
|
-
{ category: "
|
|
23
|
-
{ category: "
|
|
152
|
+
{ category: "core", name: "Variables", description: "Store and update values.", source: 'remember name as "Ada"\nremember count as 3\ncount becomes count + 1\nshow `Hello, ${name}!`' },
|
|
153
|
+
{ category: "core", name: "Conditions", description: "Compare values in plain words.", source: 'if score is at least 80 and name contains "A"\n show "accepted"\notherwise\n show "review"\ndone' },
|
|
154
|
+
{ category: "core", name: "Loops", description: "Go through lists and ranges.", source: 'for each item in list with "one", "two"\n show item\ndone\n\nfor index i from 0 to 2\n show i\ndone' },
|
|
155
|
+
{ category: "core", name: "Functions", description: "Create reusable functions.", source: 'make add(a, b)\n give a + b\ndone\n\nshow add(2, 3)' },
|
|
156
|
+
{ category: "core", name: "Modules", description: "Share code across files.", source: 'bring circleArea from "./math.pln"\nbring button from "@/components/button.pln"\nexport circleArea and squareArea' },
|
|
157
|
+
{ category: "data", name: "Records", description: "Define the shape of your data.", source: 'define a kind called "Player" with\n name is ""\n goals is 0\ndone\nremember player as create a Player with name "Ada" and goals 4' },
|
|
158
|
+
{ category: "data", name: "JSON", description: "Work with JSON data.", source: 'remember payload as {ok: true, count: 2}\nremember encoded as jsonEncode(payload)\nshow encoded' },
|
|
159
|
+
{ category: "data", name: "Compound Types", description: "Use dictionaries, sets, and tuples.", source: 'remember userMap as dictionary with "name" is "Ada" and "role" is "admin" done\nremember tags as set with "admin", "editor" done\nremember point as tuple with 10, 20, 30 done' },
|
|
160
|
+
{ category: "data", name: "SQLite", description: "Run safe SQL queries.", source: 'database "app.db" using "wasm"\nexecute\n CREATE TABLE items (name TEXT)\ndone\nremember items as query\n SELECT name FROM items\ndone' },
|
|
161
|
+
{ category: "web", name: "Web routes", description: "Build an HTTP app with JSON routes.", source: 'web app\nroute get "/health"\n reply json\n ok is true\n done\ndone\nstart 3000' },
|
|
162
|
+
{ category: "web", name: "HTTP client", description: "Fetch data from a URL.", source: 'remember response as get "https://example.com/data" timeout 5000\nshow response.status' },
|
|
163
|
+
{ category: "web", name: "Auth and sessions", description: "Protect routes and track visitors.", source: 'web app\nenable sessions "session-secret"\nrequire api key from env("API_KEY")\nroute get "/me"\n reply json\n user is user of session of request\n done\ndone' },
|
|
164
|
+
{ category: "runtime", name: "Async errors", description: "Handle errors gracefully.", source: 'try\n remember result as get "https://example.com" timeout 5000\nrecover as error\n show message of error\nfinally\n show "finished"' },
|
|
165
|
+
{ category: "runtime", name: "Concurrency", description: "Run several tasks at once.", source: 'remember results as allOf(list with firstJob(), secondJob())\nremember quick as withTimeout(firstJob(), 1000)\nshow results' },
|
|
166
|
+
{ category: "runtime", name: "WebSockets", description: "Chat and push updates live.", source: 'websocket server on 8080\n when socket connects\n send socket "connected"\n done\n when socket sends message\n broadcast message\n done\ndone' },
|
|
167
|
+
{ category: "runtime", name: "Cache", description: "Keep values ready with a TTL.", source: 'cache env("REDIS_URL")\ncacheSet("status", "ready", 60)\nremember status as cacheGet("status")' },
|
|
168
|
+
{ category: "integrations", name: "Telegram", description: "Build a Telegram bot.", source: 'bot env("TELEGRAM_BOT_TOKEN")\nwhen someone sends "/start"\n reply "Welcome"\ndone\nstart telegram bot' },
|
|
169
|
+
{ category: "integrations", name: "Groq AI", description: "Get AI replies in your code.", source: 'remember answer as chatWith("groq", "llama-3.3-70b-versatile", "Hello")\nshow answer' },
|
|
170
|
+
{ category: "integrations", name: "OCR uploads", description: "Read text from uploaded images.", source: 'web app\naccept uploads limit "5 MB" allow list with "image/png" folder "uploads"\nroute post "/scan"\n remember file as upload("document")\n ocr path of file as text\n reply text\ndone' },
|
|
171
|
+
{ category: "tooling", name: "Native tests", description: "Check that your code works.", source: 'test "addition works"\n check add(2, 3) equals 5\ndone' },
|
|
172
|
+
{ category: "tooling", name: "Source Maps", description: "Debug right in your .pln files.", source: 'plainscript build src/main.pln --sourcemap\n\n// or in code:\n// plainscript run src/main.pln --sourcemap' }
|
|
24
173
|
];
|
|
25
174
|
|
|
26
175
|
const grid = document.getElementById("lib-grid");
|
package/docs/website/style.css
CHANGED
|
@@ -1,70 +1,216 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--panel: #
|
|
6
|
-
--line:
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
2
|
+
--bg: #070c16;
|
|
3
|
+
--bg-elev: #0b1220;
|
|
4
|
+
--panel: rgba(18, 26, 42, .78);
|
|
5
|
+
--panel-solid: #101828;
|
|
6
|
+
--line: rgba(120, 160, 230, .16);
|
|
7
|
+
--line-strong: rgba(120, 160, 230, .3);
|
|
8
|
+
--text: #e6edf7;
|
|
9
|
+
--muted: #8fa0b8;
|
|
10
|
+
--accent: #46e6b4;
|
|
11
|
+
--accent-glow: rgba(70, 230, 180, .35);
|
|
12
|
+
--accent-dim: #1f3d3a;
|
|
13
|
+
--haze: rgba(70, 230, 180, .07);
|
|
10
14
|
--radius: 14px;
|
|
11
|
-
--shadow: 0 18px 45px rgba(20, 44, 74, .1);
|
|
12
15
|
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
13
|
-
color: var(--
|
|
14
|
-
background: var(--
|
|
16
|
+
color: var(--text);
|
|
17
|
+
background: var(--bg);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
* { box-sizing: border-box; }
|
|
18
21
|
html { scroll-behavior: smooth; }
|
|
19
|
-
body { margin: 0; line-height: 1.6; }
|
|
20
|
-
a { color: var(--accent
|
|
21
|
-
|
|
22
|
-
code { font-
|
|
22
|
+
body { margin: 0; line-height: 1.6; overflow-x: hidden; }
|
|
23
|
+
a { color: var(--accent); }
|
|
24
|
+
a:hover { color: #9ff2da; }
|
|
25
|
+
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace; }
|
|
26
|
+
code { font-size: .92em; color: #bfe9ff; }
|
|
27
|
+
|
|
23
28
|
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
|
|
24
|
-
|
|
29
|
+
|
|
30
|
+
/* Full-bleed animated background */
|
|
31
|
+
.bg-scrim, #bg-canvas {
|
|
32
|
+
position: fixed;
|
|
33
|
+
inset: 0;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
.bg-scrim {
|
|
38
|
+
z-index: -2;
|
|
39
|
+
background:
|
|
40
|
+
radial-gradient(1100px 640px at 78% -10%, rgba(70, 230, 180, .14), transparent 62%),
|
|
41
|
+
radial-gradient(900px 560px at 6% 28%, rgba(60, 110, 240, .12), transparent 60%),
|
|
42
|
+
linear-gradient(180deg, #070c16 0%, #0a1120 55%, #070c16 100%);
|
|
43
|
+
}
|
|
44
|
+
#bg-canvas { z-index: -1; opacity: .85; }
|
|
45
|
+
|
|
46
|
+
/* Nav */
|
|
47
|
+
.site-nav {
|
|
48
|
+
position: sticky;
|
|
49
|
+
top: 0;
|
|
50
|
+
z-index: 6;
|
|
51
|
+
border-bottom: 1px solid transparent;
|
|
52
|
+
background: rgba(7, 12, 22, .55);
|
|
53
|
+
backdrop-filter: blur(14px);
|
|
54
|
+
transition: background .3s ease, border-color .3s ease;
|
|
55
|
+
}
|
|
56
|
+
.site-nav.is-scrolled { background: rgba(7, 12, 22, .85); border-color: var(--line); }
|
|
25
57
|
.nav-inner, .nav-logo, .nav-links, .hero-actions, .footer-bottom, .library-toolbar { display: flex; align-items: center; }
|
|
26
58
|
.nav-inner { min-height: 72px; justify-content: space-between; gap: 24px; }
|
|
27
|
-
.nav-logo { gap: 10px; color: var(--
|
|
28
|
-
.nav-logo-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
59
|
+
.nav-logo { gap: 10px; color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
|
|
60
|
+
.nav-logo-mark {
|
|
61
|
+
display: inline-grid;
|
|
62
|
+
place-items: center;
|
|
63
|
+
width: 30px;
|
|
64
|
+
height: 30px;
|
|
65
|
+
border-radius: 8px;
|
|
66
|
+
color: #04140f;
|
|
67
|
+
background: var(--accent);
|
|
68
|
+
font-size: .82rem;
|
|
69
|
+
font-weight: 900;
|
|
70
|
+
box-shadow: 0 0 18px var(--accent-glow);
|
|
71
|
+
}
|
|
72
|
+
.logo-ver { padding: 3px 8px; border-radius: 99px; color: var(--accent); border: 1px solid var(--line-strong); background: var(--accent-dim); font-size: .72rem; font-weight: 600; }
|
|
73
|
+
.nav-links { gap: 22px; }
|
|
74
|
+
.nav-links a { color: var(--muted); font-size: .9rem; text-decoration: none; transition: color .2s; }
|
|
75
|
+
.nav-links a:hover { color: var(--accent); }
|
|
76
|
+
|
|
77
|
+
/* Hero */
|
|
78
|
+
.hero { position: relative; padding: 108px 0 92px; }
|
|
79
|
+
.hero-content { max-width: 840px; position: relative; z-index: 1; }
|
|
80
|
+
.hero-badge, .section-tag { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; }
|
|
81
|
+
.hero-title {
|
|
82
|
+
max-width: 780px;
|
|
83
|
+
margin: 14px 0 16px;
|
|
84
|
+
color: var(--text);
|
|
85
|
+
font-size: clamp(2.7rem, 7vw, 5.6rem);
|
|
86
|
+
line-height: .98;
|
|
87
|
+
letter-spacing: -.055em;
|
|
88
|
+
text-wrap: balance;
|
|
89
|
+
}
|
|
90
|
+
.hero-title > span { display: inline-block; }
|
|
37
91
|
.hero-lead { max-width: 660px; color: var(--muted); font-size: 1.2rem; }
|
|
38
92
|
.hero-actions { gap: 12px; margin: 30px 0; flex-wrap: wrap; }
|
|
39
|
-
.button { display: inline-block; padding: 11px 18px; border-radius: 9px; font-weight: 750; text-decoration: none; }
|
|
40
|
-
.button-primary { color: #
|
|
41
|
-
.button-
|
|
42
|
-
.
|
|
93
|
+
.button { display: inline-block; padding: 11px 18px; border-radius: 9px; font-weight: 750; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
|
|
94
|
+
.button-primary { color: #04140f; background: var(--accent); box-shadow: 0 8px 26px var(--accent-glow); }
|
|
95
|
+
.button-primary:hover { color: #04140f; background: #7bf0cd; transform: translateY(-2px); box-shadow: 0 12px 32px var(--accent-glow); }
|
|
96
|
+
.button-secondary { color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); }
|
|
97
|
+
.button-secondary:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
|
|
98
|
+
|
|
99
|
+
/* Code windows */
|
|
100
|
+
.code-window {
|
|
101
|
+
position: relative;
|
|
102
|
+
overflow: auto;
|
|
103
|
+
margin: 28px 0 0;
|
|
104
|
+
padding: 26px 24px 24px;
|
|
105
|
+
border: 1px solid var(--line-strong);
|
|
106
|
+
border-radius: var(--radius);
|
|
107
|
+
color: #d7f6ea;
|
|
108
|
+
background: linear-gradient(180deg, #0c1524, #0a101d);
|
|
109
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
|
|
110
|
+
}
|
|
111
|
+
.code-window::before {
|
|
112
|
+
content: "";
|
|
113
|
+
display: block;
|
|
114
|
+
width: 46px;
|
|
115
|
+
height: 10px;
|
|
116
|
+
margin: -8px 0 18px;
|
|
117
|
+
border-radius: 99px;
|
|
118
|
+
background: var(--line-strong);
|
|
119
|
+
}
|
|
120
|
+
.code-window code { color: inherit; }
|
|
121
|
+
|
|
43
122
|
.section { padding: 84px 0; }
|
|
44
|
-
.section--alt { background:
|
|
45
|
-
.section-title { max-width: 720px; margin: 8px 0 34px; color: var(--
|
|
123
|
+
.section--alt { background: linear-gradient(180deg, var(--haze), transparent 42%), rgba(12, 19, 33, .55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
|
|
124
|
+
.section-title { max-width: 720px; margin: 8px 0 34px; color: var(--text); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
|
|
46
125
|
.section-lead { color: var(--muted); }
|
|
47
126
|
.three-column, .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
|
|
48
|
-
|
|
49
|
-
|
|
127
|
+
|
|
128
|
+
/* Cards */
|
|
129
|
+
.info-card, .feature-card, .library-card {
|
|
130
|
+
padding: 24px;
|
|
131
|
+
border: 1px solid var(--line);
|
|
132
|
+
border-radius: var(--radius);
|
|
133
|
+
background: var(--panel);
|
|
134
|
+
backdrop-filter: blur(10px);
|
|
135
|
+
transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
|
|
136
|
+
}
|
|
137
|
+
.info-card:hover, .feature-card:hover, .library-card:hover {
|
|
138
|
+
transform: translateY(-4px);
|
|
139
|
+
border-color: var(--line-strong);
|
|
140
|
+
box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
|
|
141
|
+
}
|
|
142
|
+
.info-card h3, .feature-card h3, .library-card h3 { margin: 8px 0 6px; color: var(--text); }
|
|
50
143
|
.info-card p, .feature-card p, .library-card p { margin: 0; color: var(--muted); }
|
|
51
|
-
.card-number { color: var(--accent); font-size: .8rem; font-weight: 850; letter-spacing: .08em; }
|
|
144
|
+
.card-number { color: var(--accent); font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-shadow: 0 0 14px var(--accent-glow); }
|
|
145
|
+
|
|
52
146
|
.capability-list { display: flex; gap: 10px; flex-wrap: wrap; }
|
|
53
|
-
.capability-list span, .library-category {
|
|
147
|
+
.capability-list span, .library-category {
|
|
148
|
+
padding: 8px 12px;
|
|
149
|
+
border-radius: 99px;
|
|
150
|
+
color: var(--accent);
|
|
151
|
+
border: 1px solid var(--line-strong);
|
|
152
|
+
background: var(--accent-dim);
|
|
153
|
+
font-size: .84rem;
|
|
154
|
+
font-weight: 700;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Library */
|
|
54
158
|
.library-toolbar { align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
|
|
55
|
-
.lib-search-input {
|
|
159
|
+
.lib-search-input {
|
|
160
|
+
min-width: 240px;
|
|
161
|
+
padding: 12px 14px;
|
|
162
|
+
border: 1px solid var(--line-strong);
|
|
163
|
+
border-radius: 9px;
|
|
164
|
+
font: inherit;
|
|
165
|
+
color: var(--text);
|
|
166
|
+
background: #0c1524;
|
|
167
|
+
outline: none;
|
|
168
|
+
transition: border-color .2s, box-shadow .2s;
|
|
169
|
+
}
|
|
170
|
+
.lib-search-input::placeholder { color: var(--muted); }
|
|
171
|
+
.lib-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
|
|
56
172
|
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
57
|
-
.lib-filter {
|
|
58
|
-
|
|
173
|
+
.lib-filter {
|
|
174
|
+
padding: 8px 12px;
|
|
175
|
+
border: 1px solid var(--line-strong);
|
|
176
|
+
border-radius: 99px;
|
|
177
|
+
color: var(--muted);
|
|
178
|
+
background: transparent;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
font: inherit;
|
|
181
|
+
font-size: .86rem;
|
|
182
|
+
text-transform: capitalize;
|
|
183
|
+
transition: all .2s;
|
|
184
|
+
}
|
|
185
|
+
.lib-filter.is-active, .lib-filter:hover { color: #04140f; border-color: var(--accent); background: var(--accent); box-shadow: 0 6px 18px var(--accent-glow); }
|
|
59
186
|
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
|
|
60
187
|
.library-card-top { min-height: 102px; }
|
|
61
|
-
.library-card pre {
|
|
188
|
+
.library-card pre {
|
|
189
|
+
overflow: auto;
|
|
190
|
+
margin: 18px -8px -8px;
|
|
191
|
+
padding: 16px;
|
|
192
|
+
border-radius: 9px;
|
|
193
|
+
color: #d7f6ea;
|
|
194
|
+
background: #0a101d;
|
|
195
|
+
border: 1px solid var(--line);
|
|
196
|
+
font-size: .82rem;
|
|
197
|
+
}
|
|
62
198
|
.lib-empty { color: var(--muted); }
|
|
199
|
+
|
|
63
200
|
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
|
|
64
|
-
.site-footer { padding: 28px 0; color:
|
|
201
|
+
.site-footer { padding: 28px 0; color: var(--muted); border-top: 1px solid var(--line); background: rgba(7, 12, 22, .8); }
|
|
65
202
|
.footer-bottom { justify-content: space-between; gap: 16px; }
|
|
66
203
|
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
67
204
|
|
|
205
|
+
::selection { color: #04140f; background: var(--accent); }
|
|
206
|
+
textarea, input { caret-color: var(--accent); }
|
|
207
|
+
|
|
208
|
+
@media (prefers-reduced-motion: reduce) {
|
|
209
|
+
html { scroll-behavior: auto; }
|
|
210
|
+
* { animation: none !important; transition: none !important; }
|
|
211
|
+
.info-card:hover, .feature-card:hover, .library-card:hover { transform: none; }
|
|
212
|
+
}
|
|
213
|
+
|
|
68
214
|
@media (max-width: 760px) {
|
|
69
215
|
.nav-inner { align-items: flex-start; padding: 14px 0; }
|
|
70
216
|
.nav-links { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
|
package/examples/arrays.pln
CHANGED
package/examples/auth-api.pln
CHANGED
package/examples/basics.pln
CHANGED
package/examples/bots.pln
CHANGED
package/examples/collections.pln
CHANGED
package/examples/concurrency.pln
CHANGED
package/examples/conditions.pln
CHANGED
package/examples/database.pln
CHANGED
package/examples/day2.pln
CHANGED
package/examples/day3.pln
CHANGED
package/examples/deployment.pln
CHANGED
package/examples/email-send.pln
CHANGED
package/examples/expressions.pln
CHANGED
package/examples/files.pln
CHANGED