plainscript-lang 1.0.3-beta → 1.0.35

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 (77) hide show
  1. package/README.md +126 -120
  2. package/compiler/bundler.js +83 -12
  3. package/compiler/cli.js +62 -11
  4. package/compiler/dependency-detector.js +17 -2
  5. package/compiler/generator.js +699 -63
  6. package/compiler/lexer.js +2 -0
  7. package/compiler/parser.js +450 -30
  8. package/compiler/sourcemap.js +142 -0
  9. package/compiler/version.js +1 -1
  10. package/docs/CAPABILITY_GAP_AUDIT.md +24 -16
  11. package/docs/PLAINSCRIPT-SPEC.md +175 -41
  12. package/docs/index.html +62 -34
  13. package/docs/logo-pln.jpg +0 -0
  14. package/docs/visualization-example.svg +32 -0
  15. package/docs/website/script.js +297 -19
  16. package/docs/website/style.css +357 -47
  17. package/examples/ai-providers.pln +1 -1
  18. package/examples/arrays.pln +1 -1
  19. package/examples/async-errors.pln +1 -1
  20. package/examples/auth-api.pln +1 -1
  21. package/examples/auth-sessions.pln +1 -1
  22. package/examples/basics.pln +1 -1
  23. package/examples/bots.pln +1 -1
  24. package/examples/cache-and-jobs.pln +1 -1
  25. package/examples/cache-schedule.pln +1 -1
  26. package/examples/collections.pln +1 -1
  27. package/examples/concurrency.pln +1 -1
  28. package/examples/conditions.pln +1 -1
  29. package/examples/database.pln +1 -1
  30. package/examples/day2.pln +1 -1
  31. package/examples/day3.pln +1 -1
  32. package/examples/deployment.pln +1 -1
  33. package/examples/email-send.pln +1 -1
  34. package/examples/error-handling.pln +1 -1
  35. package/examples/expressions.pln +1 -1
  36. package/examples/file-uploads.pln +1 -1
  37. package/examples/files-and-config.pln +1 -1
  38. package/examples/files.pln +1 -1
  39. package/examples/football-backend/app.pln +1 -1
  40. package/examples/functions.pln +1 -1
  41. package/examples/hello.pln +1 -1
  42. package/examples/http-client.pln +1 -1
  43. package/examples/http.pln +1 -1
  44. package/examples/id-verification/app.pln +1 -1
  45. package/examples/json.pln +1 -1
  46. package/examples/loops.pln +1 -1
  47. package/examples/modules/app.pln +1 -1
  48. package/examples/modules/main.pln +1 -1
  49. package/examples/modules/math.pln +1 -1
  50. package/examples/mongo.pln +33 -0
  51. package/examples/objects.pln +1 -1
  52. package/examples/ocr.pln +1 -1
  53. package/examples/packages.pln +1 -1
  54. package/examples/record-kinds.pln +1 -1
  55. package/examples/records.pln +1 -1
  56. package/examples/rest-api-fetch.pln +1 -1
  57. package/examples/rest-api.pln +1 -1
  58. package/examples/scheduled-tasks.pln +1 -1
  59. package/examples/search-and-filter.pln +1 -1
  60. package/examples/server.pln +1 -1
  61. package/examples/sessions-and-cookies.pln +1 -1
  62. package/examples/sqlite.pln +1 -1
  63. package/examples/start.pln +1 -1
  64. package/examples/stdlib.pln +1 -1
  65. package/examples/string-verbs.pln +16 -0
  66. package/examples/telegram-ai-bot.pln +1 -1
  67. package/examples/telegram-bot.pln +1 -1
  68. package/examples/testing.pln +1 -1
  69. package/examples/visualization.pln +12 -0
  70. package/examples/web-api.pln +1 -1
  71. package/examples/web-app.pln +1 -1
  72. package/examples/websocket-server.pln +1 -1
  73. package/examples/websocket.pln +1 -1
  74. package/examples/whatsapp-bot/pairing.pln +24 -2
  75. package/examples/whatsapp-bot/qr.pln +18 -2
  76. package/package.json +4 -2
  77. package/docs/logo.jpg +0 -0
@@ -1,74 +1,384 @@
1
1
  :root {
2
- --ink: #132238;
3
- --muted: #5f7084;
4
- --paper: #f7fafc;
5
- --panel: #ffffff;
6
- --line: #dce5ec;
7
- --accent: #1c8c77;
8
- --accent-dark: #11624f;
9
- --navy: #142c4a;
2
+ --bg: #031004;
3
+ --bg-elev: #061b08;
4
+ --panel: rgba(8, 31, 11, .9);
5
+ --panel-solid: #0a260e;
6
+ --line: rgba(122, 190, 127, .18);
7
+ --line-strong: rgba(153, 213, 157, .36);
8
+ --text: #ebf5eb;
9
+ --muted: #a0b7a2;
10
+ --accent: #32ad3c;
11
+ --accent-bright: #4fc458;
12
+ --accent-glow: rgba(50, 173, 60, .2);
13
+ --accent-dim: #103b16;
14
+ --haze: rgba(50, 173, 60, .07);
10
15
  --radius: 14px;
11
- --shadow: 0 18px 45px rgba(20, 44, 74, .1);
12
16
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
13
- color: var(--ink);
14
- background: var(--paper);
17
+ color: var(--text);
18
+ background: var(--bg);
15
19
  }
16
20
 
17
21
  * { box-sizing: border-box; }
18
- html { scroll-behavior: smooth; }
19
- body { margin: 0; line-height: 1.6; }
20
- a { color: var(--accent-dark); }
21
- code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
22
- code { font-size: .92em; }
22
+ html { scroll-behavior: smooth; overflow-x: hidden; }
23
+ body { margin: 0; line-height: 1.6; overflow-x: hidden; }
24
+ a { color: var(--accent); }
25
+ a:hover { color: #79d77f; }
26
+ code, pre { font-family: "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace; }
27
+ code { font-size: .92em; color: #b6e0ba; }
28
+
23
29
  .container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
24
- .site-nav { position: sticky; top: 0; z-index: 5; background: rgba(247, 250, 252, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
30
+
31
+ /* Full-bleed animated background */
32
+ .bg-scrim, #bg-canvas {
33
+ position: fixed;
34
+ inset: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ }
38
+ .bg-scrim {
39
+ z-index: -2;
40
+ background:
41
+ radial-gradient(900px 520px at 82% -12%, rgba(50, 173, 60, .08), transparent 64%),
42
+ linear-gradient(180deg, #031004 0%, #061b08 55%, #031004 100%);
43
+ }
44
+ #bg-canvas { z-index: -1; opacity: .22; }
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(3, 16, 4, .9);
53
+ backdrop-filter: blur(8px);
54
+ transition: background .3s ease, border-color .3s ease;
55
+ }
56
+ .site-nav.is-scrolled { background: rgba(3, 16, 4, .96); 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(--navy); font-weight: 800; text-decoration: none; }
28
- .nav-logo-image { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
29
- .logo-ver { padding: 3px 8px; border-radius: 99px; color: var(--accent-dark); background: #dff3ec; font-size: .72rem; }
30
- .nav-links { gap: 20px; }
31
- .nav-links a { color: var(--muted); font-size: .9rem; text-decoration: none; }
32
- .nav-links a:hover { color: var(--accent-dark); }
33
- .hero { padding: 96px 0 84px; background: linear-gradient(145deg, #eaf8f3, #f7fafc 60%); }
34
- .hero-content { max-width: 840px; }
35
- .hero-badge, .section-tag { color: var(--accent-dark); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; }
36
- .hero-title { max-width: 780px; margin: 14px 0 16px; color: var(--navy); font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -.055em; }
59
+ .nav-logo { gap: 10px; color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
60
+ .nav-logo-image {
61
+ display: inline-grid;
62
+ place-items: center;
63
+ width: 30px;
64
+ height: 30px;
65
+ border-radius: 8px;
66
+ object-fit: cover;
67
+ box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
68
+ }
69
+ .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; }
70
+ .nav-links { gap: 22px; }
71
+ .nav-links a { color: var(--muted); font-size: .9rem; text-decoration: none; transition: color .2s; }
72
+ .nav-links a:hover { color: var(--accent); }
73
+
74
+ /* Hamburger toggle — hidden on desktop */
75
+ .nav-toggle {
76
+ display: none;
77
+ flex-direction: column;
78
+ justify-content: center;
79
+ gap: 5px;
80
+ width: 44px;
81
+ height: 44px;
82
+ padding: 10px;
83
+ border: none;
84
+ border-radius: 8px;
85
+ background: transparent;
86
+ cursor: pointer;
87
+ -webkit-tap-highlight-color: transparent;
88
+ }
89
+ .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
90
+ .nav-toggle-bar {
91
+ display: block;
92
+ width: 100%;
93
+ height: 2px;
94
+ border-radius: 2px;
95
+ background: var(--text);
96
+ transition: transform .3s ease, opacity .3s ease;
97
+ }
98
+ .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
99
+ .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
100
+ .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
101
+
102
+ /* Hero */
103
+ .hero { position: relative; padding: 108px 0 92px; }
104
+ .hero-content { max-width: 840px; position: relative; z-index: 1; }
105
+ .hero-badge, .section-tag { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; }
106
+ .hero-title {
107
+ max-width: 780px;
108
+ margin: 14px 0 16px;
109
+ color: var(--text);
110
+ font-size: clamp(2.7rem, 7vw, 5.6rem);
111
+ line-height: .98;
112
+ letter-spacing: -.055em;
113
+ text-wrap: balance;
114
+ }
115
+ .hero-title > span { display: inline-block; }
37
116
  .hero-lead { max-width: 660px; color: var(--muted); font-size: 1.2rem; }
38
117
  .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: #fff; background: var(--accent-dark); }
41
- .button-secondary { color: var(--navy); background: #fff; border: 1px solid var(--line); }
42
- .code-window { overflow: auto; margin: 28px 0 0; padding: 24px; border: 1px solid #23415f; border-radius: var(--radius); color: #e8f5ef; background: #10263f; box-shadow: var(--shadow); }
118
+ .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; }
119
+ .button-primary { color: #031004; background: var(--accent); }
120
+ .button-primary:hover { color: #031004; background: var(--accent-bright); transform: translateY(-2px); }
121
+ .button-secondary { color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); }
122
+ .button-secondary:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
123
+ .reference-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; }
124
+ .button-reference {
125
+ color: var(--text);
126
+ border: 1px solid var(--line-strong);
127
+ background: var(--accent-dim);
128
+ }
129
+ .button-reference:hover {
130
+ color: var(--text);
131
+ border-color: var(--accent-bright);
132
+ background: #17551d;
133
+ transform: translateY(-2px);
134
+ }
135
+
136
+ /* Code windows */
137
+ .code-window {
138
+ position: relative;
139
+ width: 100%;
140
+ max-width: 100%;
141
+ min-width: 0;
142
+ overflow: hidden;
143
+ margin: 28px 0 0;
144
+ padding: 26px 24px 24px;
145
+ border: 1px solid var(--line-strong);
146
+ border-radius: var(--radius);
147
+ color: #d6ead7;
148
+ background: #061b08;
149
+ box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
150
+ }
151
+ .code-window::before {
152
+ content: "";
153
+ display: block;
154
+ width: 46px;
155
+ height: 10px;
156
+ margin: -8px 0 18px;
157
+ border-radius: 99px;
158
+ background: var(--line-strong);
159
+ }
160
+ .code-window code { color: inherit; }
161
+ pre code {
162
+ display: block;
163
+ max-width: 100%;
164
+ color: #d6ead7;
165
+ font-size: .86rem;
166
+ font-weight: 500;
167
+ letter-spacing: -.012em;
168
+ line-height: 1.7;
169
+ white-space: pre-wrap;
170
+ overflow-wrap: anywhere;
171
+ word-break: break-word;
172
+ }
173
+ .code-token--keyword { color: #C678DD; font-weight: 500; }
174
+ .code-token--declaration { color: #C678DD; font-weight: 600; font-style: italic; }
175
+ .code-token--comparison,
176
+ .code-token--operator { color: #56B6C2; }
177
+ .code-token--assignment,
178
+ .code-token--web,
179
+ .code-token--error { color: #E06C75; }
180
+ .code-token--string,
181
+ .code-token--template,
182
+ .code-token--test { color: #98C379; }
183
+ .code-token--number,
184
+ .code-token--constant { color: #D19E66; }
185
+ .code-token--comment { color: #5C6370; font-style: italic; }
186
+ .code-token--function { color: #61AFEF; font-weight: 600; }
187
+ .code-token--builtin,
188
+ .code-token--database { color: #E5C07B; }
189
+ .copy-button {
190
+ position: absolute;
191
+ top: 10px;
192
+ right: 10px;
193
+ min-height: 30px;
194
+ padding: 4px 9px;
195
+ border: 1px solid var(--line-strong);
196
+ border-radius: 6px;
197
+ color: var(--muted);
198
+ background: rgba(3, 16, 4, .92);
199
+ cursor: pointer;
200
+ font: inherit;
201
+ font-size: .72rem;
202
+ line-height: 1.2;
203
+ transition: color .2s, border-color .2s, background .2s;
204
+ }
205
+ .copy-button:hover, .copy-button:focus-visible {
206
+ color: var(--accent);
207
+ border-color: var(--accent);
208
+ background: var(--accent-dim);
209
+ }
210
+ .copy-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
211
+ .copy-button.is-copied { color: #04140f; border-color: var(--accent); background: var(--accent); }
212
+
43
213
  .section { padding: 84px 0; }
44
- .section--alt { background: #eef5f6; }
45
- .section-title { max-width: 720px; margin: 8px 0 34px; color: var(--navy); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.035em; }
214
+ .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); }
215
+ .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
216
  .section-lead { color: var(--muted); }
47
217
  .three-column, .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
48
- .info-card, .feature-card, .library-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
49
- .info-card h3, .feature-card h3, .library-card h3 { margin: 8px 0 6px; color: var(--navy); }
218
+
219
+ /* Cards */
220
+ .info-card, .feature-card, .library-card {
221
+ padding: 24px;
222
+ border: 1px solid var(--line);
223
+ border-radius: var(--radius);
224
+ background: var(--panel);
225
+ backdrop-filter: blur(10px);
226
+ transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
227
+ }
228
+ .info-card:hover, .feature-card:hover, .library-card:hover {
229
+ transform: translateY(-4px);
230
+ border-color: var(--line-strong);
231
+ box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
232
+ }
233
+ .info-card h3, .feature-card h3, .library-card h3 { margin: 8px 0 6px; color: var(--text); }
50
234
  .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; }
235
+ .card-number { color: var(--accent-bright); font-size: .8rem; font-weight: 850; letter-spacing: .08em; }
236
+
52
237
  .capability-list { display: flex; gap: 10px; flex-wrap: wrap; }
53
- .capability-list span, .library-category { padding: 8px 12px; border-radius: 99px; color: var(--accent-dark); background: #dff3ec; font-size: .84rem; font-weight: 700; }
238
+ .capability-list span, .library-category {
239
+ padding: 8px 12px;
240
+ border-radius: 99px;
241
+ color: var(--accent);
242
+ border: 1px solid var(--line-strong);
243
+ background: var(--accent-dim);
244
+ font-size: .84rem;
245
+ font-weight: 700;
246
+ }
247
+
248
+ /* Library */
54
249
  .library-toolbar { align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
55
- .lib-search-input { min-width: 240px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
250
+ .lib-search-input {
251
+ min-width: 240px;
252
+ padding: 12px 14px;
253
+ border: 1px solid var(--line-strong);
254
+ border-radius: 9px;
255
+ font: inherit;
256
+ color: var(--text);
257
+ background: #0c1524;
258
+ outline: none;
259
+ transition: border-color .2s, box-shadow .2s;
260
+ }
261
+ .lib-search-input::placeholder { color: var(--muted); }
262
+ .lib-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
56
263
  .lib-filters { display: flex; gap: 8px; flex-wrap: wrap; }
57
- .lib-filter { padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: #fff; cursor: pointer; text-transform: capitalize; }
58
- .lib-filter.is-active, .lib-filter:hover { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }
264
+ .lib-filter {
265
+ padding: 8px 12px;
266
+ border: 1px solid var(--line-strong);
267
+ border-radius: 99px;
268
+ color: var(--muted);
269
+ background: transparent;
270
+ cursor: pointer;
271
+ font: inherit;
272
+ font-size: .86rem;
273
+ text-transform: capitalize;
274
+ transition: all .2s;
275
+ }
276
+ .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
277
  .lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
60
278
  .library-card-top { min-height: 102px; }
61
- .library-card pre { overflow: auto; margin: 18px -8px -8px; padding: 16px; border-radius: 9px; color: #e8f5ef; background: #10263f; font-size: .82rem; }
279
+ .library-card pre {
280
+ position: relative;
281
+ width: 100%;
282
+ max-width: 100%;
283
+ min-width: 0;
284
+ overflow: hidden;
285
+ margin: 18px 0 -8px;
286
+ padding: 44px 16px 16px;
287
+ border-radius: 9px;
288
+ color: #d6ead7;
289
+ background: #061b08;
290
+ border: 1px solid var(--line);
291
+ font-size: .82rem;
292
+ }
62
293
  .lib-empty { color: var(--muted); }
294
+
63
295
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
64
- .site-footer { padding: 28px 0; color: #eaf5f1; background: var(--navy); }
296
+ .site-footer { padding: 28px 0; color: var(--muted); border-top: 1px solid var(--line); background: rgba(7, 12, 22, .8); }
65
297
  .footer-bottom { justify-content: space-between; gap: 16px; }
66
298
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
67
299
 
300
+ ::selection { color: #04140f; background: var(--accent); }
301
+ textarea, input { caret-color: var(--accent); }
302
+
303
+ @media (prefers-reduced-motion: reduce) {
304
+ html { scroll-behavior: auto; }
305
+ * { animation: none !important; transition: none !important; }
306
+ .info-card:hover, .feature-card:hover, .library-card:hover { transform: none; }
307
+ }
308
+
309
+ /* ──────────────────────────────────────────────────────────────────────
310
+ MOBILE LAYOUT (≤ 760px)
311
+ ────────────────────────────────────────────────────────────────────── */
68
312
  @media (max-width: 760px) {
69
- .nav-inner { align-items: flex-start; padding: 14px 0; }
70
- .nav-links { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
71
- .hero { padding: 68px 0 60px; }
72
- .three-column, .feature-grid, .lib-grid, .split { grid-template-columns: 1fr; }
73
- .section { padding: 60px 0; }
313
+
314
+ /* --- Nav: hamburger + collapsible menu --- */
315
+ .nav-toggle { display: flex; }
316
+ .nav-inner { flex-wrap: wrap; padding: 12px 0; }
317
+ .nav-links {
318
+ display: none;
319
+ flex-basis: 100%;
320
+ flex-direction: column;
321
+ gap: 0;
322
+ padding: 8px 0 4px;
323
+ }
324
+ .nav-links.is-open { display: flex; }
325
+ .nav-links a {
326
+ display: flex;
327
+ align-items: center;
328
+ min-height: 44px;
329
+ padding: 6px 0;
330
+ font-size: 1rem;
331
+ color: var(--muted);
332
+ border-bottom: 1px solid var(--line);
333
+ }
334
+ .nav-links a:last-child { border-bottom: none; }
335
+
336
+ /* --- Hero --- */
337
+ .hero { padding: 56px 0 48px; }
338
+ .hero-title { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; }
339
+ .hero-lead { font-size: 1.05rem; line-height: 1.55; }
340
+ .hero-actions { gap: 10px; margin: 22px 0 24px; }
341
+
342
+ /* --- Buttons: touch-friendly --- */
343
+ .button { padding: 12px 20px; font-size: .95rem; min-height: 44px; }
344
+
345
+ /* --- Code windows: full-width, no overflow tricks --- */
346
+ .code-window {
347
+ padding: 18px 14px 16px;
348
+ font-size: .82rem;
349
+ border-radius: 10px;
350
+ }
351
+
352
+ /* --- Sections --- */
353
+ .section { padding: 48px 0; }
354
+ .section-title { font-size: clamp(1.6rem, 6vw, 2.2rem); margin-bottom: 24px; }
355
+
356
+ /* --- Grids: single column --- */
357
+ .three-column,
358
+ .feature-grid,
359
+ .lib-grid,
360
+ .split { grid-template-columns: 1fr; gap: 14px; }
361
+
362
+ /* --- Cards: touch-friendly tap targets --- */
363
+ .info-card,
364
+ .feature-card,
365
+ .library-card { padding: 20px 18px; }
366
+
367
+ /* --- Capability list --- */
368
+ .capability-list span { font-size: .8rem; padding: 7px 10px; }
369
+
370
+ /* --- Library search & filters --- */
371
+ .library-toolbar { flex-direction: column; gap: 12px; }
372
+ .lib-search-input { width: 100%; min-width: 0; font-size: 1rem; }
373
+ .lib-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
374
+ .lib-filter { white-space: nowrap; min-height: 40px; font-size: .84rem; }
375
+
376
+ /* --- Split (reference section) --- */
377
+ .split { gap: 24px; }
378
+
379
+ /* --- Footer --- */
380
+ .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
381
+
382
+ /* --- Canvas background: prevent horizontal scroll --- */
383
+ #bg-canvas { width: 100vw; height: 100vh; pointer-events: none; }
74
384
  }
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: provider-backed AI works in ordinary programs.
1
+ // PlainScript 1.0.35: provider-backed AI works in ordinary programs.
2
2
 
3
3
  remember answer as chatWith("groq", "llama-3.3-70b-versatile", "Explain PlainScript in one sentence")
4
4
  show answer
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: array literals and indexing.
1
+ // PlainScript 1.0.35: array literals and indexing.
2
2
  remember values as [1, 2, 3]
3
3
  show values[0]
4
4
  show length(values)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: asynchronous work and error recovery.
1
+ // PlainScript 1.0.35: asynchronous work and error recovery.
2
2
 
3
3
  make loadProfile(id)
4
4
  wait for sleep(10)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: protected API route.
1
+ // PlainScript 1.0.35: protected API route.
2
2
  web app
3
3
  require api key from env("API_KEY")
4
4
  route get "/private"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: API keys, sessions, cookies, and auth helpers.
1
+ // PlainScript 1.0.35: API keys, sessions, cookies, and auth helpers.
2
2
 
3
3
  web app
4
4
  enable sessions "development-only-session-secret"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: variables, values, and output.
1
+ // PlainScript 1.0.35: variables, values, and output.
2
2
 
3
3
  remember name as "Ada"
4
4
  remember visitCount as 3
package/examples/bots.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: Telegram bot handlers.
1
+ // PlainScript 1.0.35: Telegram bot handlers.
2
2
 
3
3
  bot env("TELEGRAM_BOT_TOKEN")
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: cache and background work.
1
+ // PlainScript 1.0.35: cache and background work.
2
2
  cache env("REDIS_URL")
3
3
  cacheSet("status", "ready", 60)
4
4
  remember status as cacheGet("status")
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: cache values and scheduled work.
1
+ // PlainScript 1.0.35: cache values and scheduled work.
2
2
 
3
3
  cache "redis://localhost:6379"
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: lists, objects, and collection helpers.
1
+ // PlainScript 1.0.35: lists, objects, and collection helpers.
2
2
 
3
3
  remember numbers as list with 4, 7, 2, 9
4
4
  gather each number in numbers giving number * 2
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: parallel operations and timeouts.
1
+ // PlainScript 1.0.35: parallel operations and timeouts.
2
2
 
3
3
  make firstJob()
4
4
  wait for sleep(10)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: conditions and string predicates.
1
+ // PlainScript 1.0.35: conditions and string predicates.
2
2
 
3
3
  remember score as 87
4
4
  remember label as "PlainScript"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: SQLite database.
1
+ // PlainScript 1.0.35: SQLite database.
2
2
  database "app.db" using "wasm"
3
3
  execute
4
4
  CREATE TABLE IF NOT EXISTS notes (body TEXT)
package/examples/day2.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: conditional blocks.
1
+ // PlainScript 1.0.35: conditional blocks.
2
2
  remember age as 21
3
3
  if age is at least 18
4
4
  show "adult"
package/examples/day3.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: functions.
1
+ // PlainScript 1.0.35: functions.
2
2
  make greet(name)
3
3
  give `Hello, ${name}!`
4
4
  done
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: production-shaped web entry point.
1
+ // PlainScript 1.0.35: production-shaped web entry point.
2
2
  web app
3
3
  route get "/health"
4
4
  reply "ok"
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.3-beta: email application placeholder.
1
+ // PlainScript 1.0.35: email application placeholder.
2
2
  remember recipient as "team@example.com"
3
3
  show `mail queued for ${recipient}`
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: recovery and cleanup.
1
+ // PlainScript 1.0.35: recovery and cleanup.
2
2
  try
3
3
  show "work"
4
4
  recover as error
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: expression operators.
1
+ // PlainScript 1.0.35: expression operators.
2
2
  remember sumValue as (2 + 3) * 4
3
3
  if sumValue is 20
4
4
  show "exact"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: upload route.
1
+ // PlainScript 1.0.35: upload route.
2
2
  web app
3
3
  accept uploads limit "5 MB" allow list with "image/png" folder "uploads"
4
4
  route post "/upload"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: files and environment configuration.
1
+ // PlainScript 1.0.35: files and environment configuration.
2
2
  remember filename as env("CONFIG_FILE")
3
3
  if filename is null
4
4
  remember filename as "config.json"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: file and path operations.
1
+ // PlainScript 1.0.35: file and path operations.
2
2
 
3
3
  remember report as readFile("README.md")
4
4
  show length(report)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: a complete authenticated SQLite API.
1
+ // PlainScript 1.0.35: a complete authenticated SQLite API.
2
2
 
3
3
  web app
4
4
  database ":memory:" using "wasm"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: functions, defaults, and returns.
1
+ // PlainScript 1.0.35: functions, defaults, and returns.
2
2
 
3
3
  make greet(name)
4
4
  give `Hello, ${name}!`
@@ -1,2 +1,2 @@
1
- // PlainScript 1.0.3-beta: hello world.
1
+ // PlainScript 1.0.35: hello world.
2
2
  show "Hello, PlainScript!"
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.3-beta: HTTP client request.
1
+ // PlainScript 1.0.35: HTTP client request.
2
2
  remember response as get "https://example.com" timeout 5000
3
3
  show response.status
package/examples/http.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: HTTP client requests.
1
+ // PlainScript 1.0.35: HTTP client requests.
2
2
 
3
3
  remember response as get "https://example.com/api/items" timeout 5000
4
4
  if response.ok is true
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: upload and OCR verification service.
1
+ // PlainScript 1.0.35: upload and OCR verification service.
2
2
 
3
3
  web app
4
4
  accept uploads limit "5 MB" allow list with "image/png", "image/jpeg" folder "uploads"
package/examples/json.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: JSON values and transformations.
1
+ // PlainScript 1.0.35: JSON values and transformations.
2
2
 
3
3
  remember person as record with name "Ada" and role "engineer" done
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: collection and numeric loops.
1
+ // PlainScript 1.0.35: collection and numeric loops.
2
2
 
3
3
  remember colors as list with "red", "green", "blue"
4
4
 
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.3-beta: module entry point.
1
+ // PlainScript 1.0.35: module entry point.
2
2
  import { circleArea } from "./math.pln"
3
3
  show circleArea(2)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.3-beta: named imports.
1
+ // PlainScript 1.0.35: named imports.
2
2
 
3
3
  import { circleArea } from "./math.pln"
4
4
  show circleArea(2)