@slycode/slycode 0.1.19 → 0.2.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 (89) hide show
  1. package/dist/web/.next/BUILD_ID +1 -1
  2. package/dist/web/.next/build-manifest.json +2 -2
  3. package/dist/web/.next/server/app/_global-error.html +2 -2
  4. package/dist/web/.next/server/app/_global-error.rsc +1 -1
  5. package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  8. package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  9. package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/dist/web/.next/server/app/_not-found.html +1 -1
  11. package/dist/web/.next/server/app/_not-found.rsc +1 -1
  12. package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  14. package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  15. package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  17. package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
  19. package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  20. package/dist/web/.next/server/chunks/[root-of-the-server]__46b023d4._.js +1 -1
  21. package/dist/web/.next/server/chunks/[root-of-the-server]__4c7995bf._.js +1 -1
  22. package/dist/web/.next/server/chunks/[root-of-the-server]__4d0d3464._.js +1 -1
  23. package/dist/web/.next/server/chunks/[root-of-the-server]__543058c2._.js +3 -3
  24. package/dist/web/.next/server/chunks/[root-of-the-server]__6d330d40._.js +1 -1
  25. package/dist/web/.next/server/chunks/[root-of-the-server]__884d73e4._.js +1 -1
  26. package/dist/web/.next/server/chunks/[root-of-the-server]__949bb248._.js +1 -1
  27. package/dist/web/.next/server/chunks/[root-of-the-server]__949d814c._.js +1 -1
  28. package/dist/web/.next/server/chunks/[root-of-the-server]__aa814a86._.js +1 -1
  29. package/dist/web/.next/server/chunks/[root-of-the-server]__ad64e04f._.js +2 -2
  30. package/dist/web/.next/server/chunks/[root-of-the-server]__baa99257._.js +1 -1
  31. package/dist/web/.next/server/chunks/[root-of-the-server]__bbb4b3ac._.js +1 -1
  32. package/dist/web/.next/server/chunks/[root-of-the-server]__bf286c26._.js +1 -1
  33. package/dist/web/.next/server/chunks/[root-of-the-server]__ce429522._.js +1 -1
  34. package/dist/web/.next/server/chunks/[root-of-the-server]__d38c7a96._.js +1 -1
  35. package/dist/web/.next/server/chunks/[root-of-the-server]__e9b0e744._.js +1 -1
  36. package/dist/web/.next/server/chunks/[root-of-the-server]__f1fe18e6._.js +2 -2
  37. package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__677b7660._.js +1 -1
  38. package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__79c0188d._.js +1 -1
  39. package/dist/web/.next/server/chunks/ssr/src_lib_registry_ts_2fc87c9c._.js +1 -1
  40. package/dist/web/.next/server/pages/404.html +1 -1
  41. package/dist/web/.next/server/pages/500.html +2 -2
  42. package/dist/web/.next/static/chunks/7660448872d80e27.js +4 -0
  43. package/dist/web/.next/static/chunks/{49ff6bc5c5e30161.js → b694f741bb34ac84.js} +1 -1
  44. package/dist/web/src/components/ClaudeTerminalPanel.tsx +4 -0
  45. package/dist/web/src/lib/store-scanner.ts +70 -10
  46. package/dist/web/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/templates/kanban-seed.json +1 -1
  49. package/dist/store/.backups/actions/onboard.md +0 -33
  50. package/dist/store/.backups/actions/review.md +0 -37
  51. package/dist/store/.backups/actions/show-card.md +0 -20
  52. package/dist/store/.backups/checkpoint/SKILL.md +0 -43
  53. package/dist/store/.backups/context-priming/SKILL.md +0 -153
  54. package/dist/store/.backups/context-priming/references/area-index.md +0 -101
  55. package/dist/store/.backups/context-priming/references/areas/claude-actions.md +0 -120
  56. package/dist/store/.backups/context-priming/references/areas/messaging.md +0 -177
  57. package/dist/store/.backups/context-priming/references/areas/scripts-deployment.md +0 -138
  58. package/dist/store/.backups/context-priming/references/areas/skills.md +0 -135
  59. package/dist/store/.backups/context-priming/references/areas/terminal-bridge.md +0 -232
  60. package/dist/store/.backups/context-priming/references/areas/web-frontend.md +0 -252
  61. package/dist/store/.backups/context-priming/references/maintenance.md +0 -128
  62. package/dist/store/.ignored-updates.json +0 -37
  63. package/dist/store/actions/analyse-implementation.md +0 -72
  64. package/dist/store/actions/archive.md +0 -36
  65. package/dist/store/actions/clear.md +0 -13
  66. package/dist/store/actions/complete.md +0 -34
  67. package/dist/store/actions/continue.md +0 -20
  68. package/dist/store/agents/doc-updater.md +0 -619
  69. package/dist/store/mcp/context7.json +0 -8
  70. package/dist/store/skills/claude-code-docs-maintainer/SKILL.md +0 -168
  71. package/dist/store/skills/create-command/SKILL.md +0 -92
  72. package/dist/store/skills/doc-discovery/SKILL.md +0 -18
  73. package/dist/store/skills/doc-update/SKILL.md +0 -15
  74. package/dist/store/skills/dummy/SKILL.md +0 -22
  75. package/dist/store/skills/interactive-explainer/SKILL.md +0 -557
  76. package/dist/store/skills/interactive-explainer/assets/base_template.html +0 -780
  77. package/dist/store/skills/interactive-explainer/references/design_patterns.md +0 -486
  78. package/dist/store/skills/interactive-explainer/references/visualization_libraries.md +0 -512
  79. package/dist/store/skills/problem_summary/SKILL.md +0 -11
  80. package/dist/store/skills/reference-fetch/SKILL.md +0 -206
  81. package/dist/store/skills/skill-creator/LICENSE.txt +0 -202
  82. package/dist/store/skills/skill-creator/SKILL.md +0 -246
  83. package/dist/store/skills/skill-creator/scripts/init_skill.py +0 -303
  84. package/dist/store/skills/skill-creator/scripts/package_skill.py +0 -110
  85. package/dist/store/skills/skill-creator/scripts/quick_validate.py +0 -65
  86. package/dist/web/.next/static/chunks/600359dcf0f0daac.js +0 -4
  87. /package/dist/web/.next/static/{ilZDkIBsZqGYxOIGxgcnT → BbBq5FNe-sYRKe8Pc24UW}/_buildManifest.js +0 -0
  88. /package/dist/web/.next/static/{ilZDkIBsZqGYxOIGxgcnT → BbBq5FNe-sYRKe8Pc24UW}/_clientMiddlewareManifest.json +0 -0
  89. /package/dist/web/.next/static/{ilZDkIBsZqGYxOIGxgcnT → BbBq5FNe-sYRKe8Pc24UW}/_ssgManifest.js +0 -0
@@ -1,780 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>{{TITLE}} - Interactive Explainer</title>
7
-
8
- <!-- Core Libraries -->
9
- <script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
10
- <script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
11
- <script src="https://d3js.org/d3.v7.min.js"></script>
12
- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
13
- <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
14
-
15
- <!-- Code Highlighting -->
16
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">
17
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
18
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script>
19
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js"></script>
20
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
21
-
22
- <!-- Icons -->
23
- <script src="https://unpkg.com/lucide@latest"></script>
24
-
25
- <style>
26
- /* ========== CSS Variables ========== */
27
- :root {
28
- --primary: #00d4ff;
29
- --primary-dim: #00a3c7;
30
- --secondary: #ff6b6b;
31
- --accent: #4ecdc4;
32
- --warning: #f7dc6f;
33
- --success: #2ecc71;
34
- --background: #0a0a0f;
35
- --surface: #1a1a2e;
36
- --surface-light: #252542;
37
- --text: #e0e0e0;
38
- --text-dim: #888888;
39
- --border: #333355;
40
- --glow: rgba(0, 212, 255, 0.3);
41
-
42
- --font-main: 'Segoe UI', system-ui, sans-serif;
43
- --font-mono: 'Fira Code', 'Consolas', monospace;
44
-
45
- --transition: 0.3s ease;
46
- --radius: 8px;
47
- --radius-lg: 12px;
48
- }
49
-
50
- /* ========== Reset & Base ========== */
51
- *, *::before, *::after {
52
- box-sizing: border-box;
53
- margin: 0;
54
- padding: 0;
55
- }
56
-
57
- html {
58
- scroll-behavior: smooth;
59
- }
60
-
61
- body {
62
- font-family: var(--font-main);
63
- background: var(--background);
64
- color: var(--text);
65
- line-height: 1.6;
66
- min-height: 100vh;
67
- }
68
-
69
- /* ========== Layout ========== */
70
- .app-container {
71
- display: flex;
72
- flex-direction: column;
73
- min-height: 100vh;
74
- }
75
-
76
- /* ========== Navigation ========== */
77
- .nav-header {
78
- position: sticky;
79
- top: 0;
80
- z-index: 100;
81
- background: linear-gradient(180deg, var(--surface) 0%, rgba(26, 26, 46, 0.95) 100%);
82
- border-bottom: 1px solid var(--border);
83
- backdrop-filter: blur(10px);
84
- }
85
-
86
- .nav-content {
87
- display: flex;
88
- align-items: center;
89
- justify-content: space-between;
90
- padding: 1rem 2rem;
91
- max-width: 1400px;
92
- margin: 0 auto;
93
- }
94
-
95
- .nav-title {
96
- font-size: 1.25rem;
97
- font-weight: 600;
98
- color: var(--primary);
99
- display: flex;
100
- align-items: center;
101
- gap: 0.5rem;
102
- }
103
-
104
- .nav-sections {
105
- display: flex;
106
- gap: 0.5rem;
107
- }
108
-
109
- .nav-btn {
110
- padding: 0.5rem 1rem;
111
- background: transparent;
112
- border: 1px solid transparent;
113
- color: var(--text-dim);
114
- border-radius: var(--radius);
115
- cursor: pointer;
116
- transition: var(--transition);
117
- font-size: 0.875rem;
118
- }
119
-
120
- .nav-btn:hover {
121
- color: var(--text);
122
- background: var(--surface-light);
123
- }
124
-
125
- .nav-btn.active {
126
- color: var(--primary);
127
- border-color: var(--primary);
128
- background: rgba(0, 212, 255, 0.1);
129
- }
130
-
131
- .nav-controls {
132
- display: flex;
133
- align-items: center;
134
- gap: 1rem;
135
- }
136
-
137
- .btn-nav {
138
- display: flex;
139
- align-items: center;
140
- gap: 0.5rem;
141
- padding: 0.5rem 1rem;
142
- background: var(--surface-light);
143
- border: 1px solid var(--border);
144
- color: var(--text);
145
- border-radius: var(--radius);
146
- cursor: pointer;
147
- transition: var(--transition);
148
- }
149
-
150
- .btn-nav:hover:not(:disabled) {
151
- background: var(--primary);
152
- color: var(--background);
153
- border-color: var(--primary);
154
- }
155
-
156
- .btn-nav:disabled {
157
- opacity: 0.3;
158
- cursor: not-allowed;
159
- }
160
-
161
- .section-counter {
162
- color: var(--text-dim);
163
- font-size: 0.875rem;
164
- min-width: 60px;
165
- text-align: center;
166
- }
167
-
168
- /* ========== Main Content ========== */
169
- .main-content {
170
- flex: 1;
171
- padding: 2rem;
172
- max-width: 1400px;
173
- margin: 0 auto;
174
- width: 100%;
175
- }
176
-
177
- /* ========== Sections ========== */
178
- .section {
179
- display: none;
180
- animation: fadeIn 0.5s ease;
181
- }
182
-
183
- .section.active {
184
- display: block;
185
- }
186
-
187
- @keyframes fadeIn {
188
- from { opacity: 0; transform: translateY(20px); }
189
- to { opacity: 1; transform: translateY(0); }
190
- }
191
-
192
- .section-header {
193
- margin-bottom: 2rem;
194
- }
195
-
196
- .section-title {
197
- font-size: 2rem;
198
- font-weight: 700;
199
- color: var(--text);
200
- margin-bottom: 0.5rem;
201
- }
202
-
203
- .section-subtitle {
204
- font-size: 1.125rem;
205
- color: var(--text-dim);
206
- }
207
-
208
- /* ========== Visualization Containers ========== */
209
- .viz-container {
210
- background: var(--surface);
211
- border: 1px solid var(--border);
212
- border-radius: var(--radius-lg);
213
- padding: 1.5rem;
214
- margin-bottom: 2rem;
215
- }
216
-
217
- .viz-full {
218
- height: 500px;
219
- position: relative;
220
- }
221
-
222
- .viz-split {
223
- display: grid;
224
- grid-template-columns: 1fr 1fr;
225
- gap: 1.5rem;
226
- }
227
-
228
- .viz-with-sidebar {
229
- display: grid;
230
- grid-template-columns: 1fr 300px;
231
- gap: 1.5rem;
232
- }
233
-
234
- /* ========== Cards ========== */
235
- .card {
236
- background: var(--surface);
237
- border: 1px solid var(--border);
238
- border-radius: var(--radius);
239
- padding: 1.5rem;
240
- transition: var(--transition);
241
- }
242
-
243
- .card:hover {
244
- border-color: var(--primary);
245
- box-shadow: 0 0 20px var(--glow);
246
- }
247
-
248
- .card-title {
249
- font-size: 1.125rem;
250
- font-weight: 600;
251
- margin-bottom: 0.5rem;
252
- display: flex;
253
- align-items: center;
254
- gap: 0.5rem;
255
- }
256
-
257
- .card-title i {
258
- color: var(--primary);
259
- }
260
-
261
- .card-content {
262
- color: var(--text-dim);
263
- font-size: 0.9375rem;
264
- }
265
-
266
- /* ========== Grid Layouts ========== */
267
- .grid-2 {
268
- display: grid;
269
- grid-template-columns: repeat(2, 1fr);
270
- gap: 1.5rem;
271
- }
272
-
273
- .grid-3 {
274
- display: grid;
275
- grid-template-columns: repeat(3, 1fr);
276
- gap: 1.5rem;
277
- }
278
-
279
- .grid-4 {
280
- display: grid;
281
- grid-template-columns: repeat(4, 1fr);
282
- gap: 1rem;
283
- }
284
-
285
- /* ========== Code Blocks ========== */
286
- .code-block {
287
- background: #1e1e1e;
288
- border-radius: var(--radius);
289
- overflow: hidden;
290
- margin: 1rem 0;
291
- }
292
-
293
- .code-header {
294
- display: flex;
295
- justify-content: space-between;
296
- align-items: center;
297
- padding: 0.5rem 1rem;
298
- background: #2d2d2d;
299
- border-bottom: 1px solid #404040;
300
- }
301
-
302
- .code-filename {
303
- font-family: var(--font-mono);
304
- font-size: 0.8125rem;
305
- color: var(--text-dim);
306
- }
307
-
308
- .code-copy {
309
- background: transparent;
310
- border: none;
311
- color: var(--text-dim);
312
- cursor: pointer;
313
- padding: 0.25rem 0.5rem;
314
- border-radius: 4px;
315
- transition: var(--transition);
316
- }
317
-
318
- .code-copy:hover {
319
- color: var(--primary);
320
- background: rgba(0, 212, 255, 0.1);
321
- }
322
-
323
- .code-block pre {
324
- margin: 0;
325
- padding: 1rem;
326
- overflow-x: auto;
327
- }
328
-
329
- .code-block code {
330
- font-family: var(--font-mono);
331
- font-size: 0.875rem;
332
- }
333
-
334
- /* ========== Tables ========== */
335
- .data-table {
336
- width: 100%;
337
- border-collapse: collapse;
338
- margin: 1rem 0;
339
- }
340
-
341
- .data-table th,
342
- .data-table td {
343
- padding: 0.75rem 1rem;
344
- text-align: left;
345
- border-bottom: 1px solid var(--border);
346
- }
347
-
348
- .data-table th {
349
- background: var(--surface-light);
350
- font-weight: 600;
351
- color: var(--primary);
352
- }
353
-
354
- .data-table tr:hover td {
355
- background: rgba(0, 212, 255, 0.05);
356
- }
357
-
358
- /* ========== Badges & Tags ========== */
359
- .badge {
360
- display: inline-flex;
361
- align-items: center;
362
- padding: 0.25rem 0.75rem;
363
- border-radius: 100px;
364
- font-size: 0.75rem;
365
- font-weight: 500;
366
- }
367
-
368
- .badge-primary {
369
- background: rgba(0, 212, 255, 0.2);
370
- color: var(--primary);
371
- }
372
-
373
- .badge-secondary {
374
- background: rgba(255, 107, 107, 0.2);
375
- color: var(--secondary);
376
- }
377
-
378
- .badge-accent {
379
- background: rgba(78, 205, 196, 0.2);
380
- color: var(--accent);
381
- }
382
-
383
- /* ========== Lists ========== */
384
- .feature-list {
385
- list-style: none;
386
- }
387
-
388
- .feature-list li {
389
- padding: 0.75rem 0;
390
- border-bottom: 1px solid var(--border);
391
- display: flex;
392
- align-items: flex-start;
393
- gap: 0.75rem;
394
- }
395
-
396
- .feature-list li:last-child {
397
- border-bottom: none;
398
- }
399
-
400
- .feature-list i {
401
- color: var(--accent);
402
- margin-top: 0.25rem;
403
- }
404
-
405
- /* ========== Detail Panel (Sidebar) ========== */
406
- .detail-panel {
407
- position: fixed;
408
- right: -400px;
409
- top: 0;
410
- width: 400px;
411
- height: 100vh;
412
- background: var(--surface);
413
- border-left: 1px solid var(--border);
414
- transition: right 0.3s ease;
415
- z-index: 200;
416
- overflow-y: auto;
417
- }
418
-
419
- .detail-panel.open {
420
- right: 0;
421
- }
422
-
423
- .panel-header {
424
- display: flex;
425
- justify-content: space-between;
426
- align-items: center;
427
- padding: 1.5rem;
428
- border-bottom: 1px solid var(--border);
429
- position: sticky;
430
- top: 0;
431
- background: var(--surface);
432
- }
433
-
434
- .panel-title {
435
- font-size: 1.25rem;
436
- font-weight: 600;
437
- }
438
-
439
- .panel-close {
440
- background: transparent;
441
- border: none;
442
- color: var(--text-dim);
443
- font-size: 1.5rem;
444
- cursor: pointer;
445
- padding: 0.25rem;
446
- line-height: 1;
447
- }
448
-
449
- .panel-close:hover {
450
- color: var(--secondary);
451
- }
452
-
453
- .panel-content {
454
- padding: 1.5rem;
455
- }
456
-
457
- /* ========== Mermaid Diagrams ========== */
458
- .mermaid {
459
- background: transparent;
460
- }
461
-
462
- /* Container for scaled mermaid diagrams */
463
- .mermaid-container {
464
- display: flex;
465
- justify-content: center;
466
- align-items: center;
467
- padding: 4rem 2rem;
468
- min-height: 250px;
469
- }
470
-
471
- .mermaid-container .mermaid {
472
- transform: scale(2.5);
473
- transform-origin: center center;
474
- }
475
-
476
- /* Make arrows/edges more visible */
477
- .mermaid-container .mermaid .flowchart-link {
478
- stroke-width: 3px !important;
479
- }
480
-
481
- .mermaid-container .mermaid path.path {
482
- stroke-width: 3px !important;
483
- }
484
-
485
- /* ========== vis.js Network ========== */
486
- .network-container {
487
- width: 100%;
488
- height: 100%;
489
- background: var(--background);
490
- border-radius: var(--radius);
491
- }
492
-
493
- /* ========== Progress Indicator ========== */
494
- .progress-bar {
495
- height: 4px;
496
- background: var(--surface-light);
497
- border-radius: 2px;
498
- overflow: hidden;
499
- margin-top: 0.5rem;
500
- }
501
-
502
- .progress-fill {
503
- height: 100%;
504
- background: linear-gradient(90deg, var(--primary), var(--accent));
505
- transition: width 0.3s ease;
506
- }
507
-
508
- /* ========== Tooltips ========== */
509
- .tooltip {
510
- position: absolute;
511
- background: var(--surface);
512
- border: 1px solid var(--border);
513
- border-radius: var(--radius);
514
- padding: 0.75rem 1rem;
515
- font-size: 0.875rem;
516
- max-width: 300px;
517
- z-index: 1000;
518
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
519
- pointer-events: none;
520
- }
521
-
522
- /* ========== Animations ========== */
523
- .pulse {
524
- animation: pulse 2s infinite;
525
- }
526
-
527
- @keyframes pulse {
528
- 0%, 100% { opacity: 1; }
529
- 50% { opacity: 0.5; }
530
- }
531
-
532
- .glow {
533
- box-shadow: 0 0 20px var(--glow);
534
- }
535
-
536
- /* ========== Responsive ========== */
537
- @media (max-width: 1024px) {
538
- .viz-with-sidebar {
539
- grid-template-columns: 1fr;
540
- }
541
-
542
- .grid-3 {
543
- grid-template-columns: repeat(2, 1fr);
544
- }
545
-
546
- .grid-4 {
547
- grid-template-columns: repeat(2, 1fr);
548
- }
549
- }
550
-
551
- @media (max-width: 768px) {
552
- .nav-content {
553
- flex-direction: column;
554
- gap: 1rem;
555
- }
556
-
557
- .nav-sections {
558
- flex-wrap: wrap;
559
- justify-content: center;
560
- }
561
-
562
- .grid-2, .grid-3, .grid-4 {
563
- grid-template-columns: 1fr;
564
- }
565
-
566
- .viz-full {
567
- height: 350px;
568
- }
569
-
570
- .viz-split {
571
- grid-template-columns: 1fr;
572
- }
573
-
574
- .detail-panel {
575
- width: 100%;
576
- right: -100%;
577
- }
578
- }
579
-
580
- /* ========== Print Styles ========== */
581
- @media print {
582
- .nav-header, .nav-controls {
583
- display: none;
584
- }
585
-
586
- .section {
587
- display: block !important;
588
- page-break-inside: avoid;
589
- }
590
- }
591
- </style>
592
- </head>
593
- <body>
594
- <div class="app-container">
595
- <!-- Navigation Header -->
596
- <header class="nav-header">
597
- <div class="nav-content">
598
- <div class="nav-title">
599
- <i data-lucide="book-open"></i>
600
- <span>{{TITLE}}</span>
601
- </div>
602
-
603
- <nav class="nav-sections" id="navSections">
604
- <!-- Populated by JavaScript -->
605
- </nav>
606
-
607
- <div class="nav-controls">
608
- <button class="btn-nav" id="btnPrev" disabled>
609
- <i data-lucide="chevron-left"></i>
610
- Previous
611
- </button>
612
- <span class="section-counter" id="sectionCounter">1 / 1</span>
613
- <button class="btn-nav" id="btnNext">
614
- Next
615
- <i data-lucide="chevron-right"></i>
616
- </button>
617
- </div>
618
- </div>
619
- <div class="progress-bar">
620
- <div class="progress-fill" id="progressFill" style="width: 0%"></div>
621
- </div>
622
- </header>
623
-
624
- <!-- Main Content Area -->
625
- <main class="main-content">
626
- <!-- SECTIONS GO HERE -->
627
- {{SECTIONS}}
628
- </main>
629
-
630
- <!-- Detail Panel (Sidebar) -->
631
- <aside class="detail-panel" id="detailPanel">
632
- <div class="panel-header">
633
- <h3 class="panel-title" id="panelTitle">Details</h3>
634
- <button class="panel-close" id="panelClose">&times;</button>
635
- </div>
636
- <div class="panel-content" id="panelContent">
637
- <!-- Dynamic content -->
638
- </div>
639
- </aside>
640
- </div>
641
-
642
- <script>
643
- // ========== Initialize Libraries ==========
644
- // IMPORTANT: startOnLoad must be false because sections are hidden (display:none)
645
- // Mermaid cannot render into hidden elements - we manually trigger rendering
646
- mermaid.initialize({
647
- startOnLoad: false,
648
- theme: 'dark',
649
- themeVariables: {
650
- primaryColor: '#00d4ff',
651
- primaryTextColor: '#e0e0e0',
652
- primaryBorderColor: '#333355',
653
- lineColor: '#888888',
654
- secondaryColor: '#1a1a2e',
655
- tertiaryColor: '#252542'
656
- }
657
- });
658
-
659
- lucide.createIcons();
660
-
661
- // ========== Section Navigation ==========
662
- const sections = document.querySelectorAll('.section');
663
- const navSections = document.getElementById('navSections');
664
- const btnPrev = document.getElementById('btnPrev');
665
- const btnNext = document.getElementById('btnNext');
666
- const sectionCounter = document.getElementById('sectionCounter');
667
- const progressFill = document.getElementById('progressFill');
668
-
669
- let currentSection = 0;
670
-
671
- // Build navigation buttons
672
- sections.forEach((section, index) => {
673
- const title = section.dataset.title || `Section ${index + 1}`;
674
- const btn = document.createElement('button');
675
- btn.className = 'nav-btn' + (index === 0 ? ' active' : '');
676
- btn.textContent = title;
677
- btn.dataset.section = index;
678
- btn.addEventListener('click', () => goToSection(index));
679
- navSections.appendChild(btn);
680
- });
681
-
682
- function goToSection(index) {
683
- if (index < 0 || index >= sections.length) return;
684
-
685
- // Update sections
686
- sections.forEach((s, i) => s.classList.toggle('active', i === index));
687
-
688
- // Update nav buttons
689
- document.querySelectorAll('.nav-btn').forEach((btn, i) => {
690
- btn.classList.toggle('active', i === index);
691
- });
692
-
693
- // Update controls
694
- currentSection = index;
695
- btnPrev.disabled = index === 0;
696
- btnNext.disabled = index === sections.length - 1;
697
- sectionCounter.textContent = `${index + 1} / ${sections.length}`;
698
- progressFill.style.width = `${((index + 1) / sections.length) * 100}%`;
699
-
700
- // Scroll to top
701
- window.scrollTo({ top: 0, behavior: 'smooth' });
702
-
703
- // Re-render mermaid diagrams in the newly visible section
704
- // Mermaid can't render into hidden elements, so we render when section becomes visible
705
- const activeSection = sections[index];
706
- const mermaidDivs = activeSection.querySelectorAll('.mermaid');
707
- mermaidDivs.forEach(el => {
708
- if (el.querySelector('svg')) return; // Already rendered
709
- const code = el.textContent;
710
- el.innerHTML = code;
711
- mermaid.run({ nodes: [el] });
712
- });
713
- }
714
-
715
- btnPrev.addEventListener('click', () => goToSection(currentSection - 1));
716
- btnNext.addEventListener('click', () => goToSection(currentSection + 1));
717
-
718
- // Keyboard navigation
719
- document.addEventListener('keydown', (e) => {
720
- if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {
721
- goToSection(currentSection + 1);
722
- } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {
723
- goToSection(currentSection - 1);
724
- }
725
- });
726
-
727
- // ========== Detail Panel ==========
728
- const detailPanel = document.getElementById('detailPanel');
729
- const panelTitle = document.getElementById('panelTitle');
730
- const panelContent = document.getElementById('panelContent');
731
- const panelClose = document.getElementById('panelClose');
732
-
733
- function showDetail(title, content) {
734
- panelTitle.textContent = title;
735
- panelContent.innerHTML = content;
736
- detailPanel.classList.add('open');
737
- lucide.createIcons();
738
- }
739
-
740
- function hideDetail() {
741
- detailPanel.classList.remove('open');
742
- }
743
-
744
- panelClose.addEventListener('click', hideDetail);
745
-
746
- // Close panel on escape
747
- document.addEventListener('keydown', (e) => {
748
- if (e.key === 'Escape') hideDetail();
749
- });
750
-
751
- // Close panel on click outside
752
- document.addEventListener('click', (e) => {
753
- if (detailPanel.classList.contains('open') &&
754
- !detailPanel.contains(e.target) &&
755
- !e.target.closest('[data-detail]')) {
756
- hideDetail();
757
- }
758
- });
759
-
760
- // ========== Code Copy Functionality ==========
761
- document.querySelectorAll('.code-copy').forEach(btn => {
762
- btn.addEventListener('click', () => {
763
- const code = btn.closest('.code-block').querySelector('code').textContent;
764
- navigator.clipboard.writeText(code).then(() => {
765
- const originalText = btn.textContent;
766
- btn.textContent = 'Copied!';
767
- setTimeout(() => btn.textContent = originalText, 2000);
768
- });
769
- });
770
- });
771
-
772
- // ========== Initialize First Section ==========
773
- goToSection(0);
774
-
775
- // ========== Custom Initialization (for specific visualizations) ==========
776
- // Add your visualization initialization code here
777
- // Example: initNetwork(), initChart(), etc.
778
- </script>
779
- </body>
780
- </html>