-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2311 lines (2096 loc) · 97.1 KB
/
Copy pathindex.html
File metadata and controls
2311 lines (2096 loc) · 97.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" class="dark scroll-smooth">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mastors — Intent-Based Styling Framework</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Robotto:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=Fira+Code:wght@400;500&display=swap"
rel="stylesheet" />
<!-- Tailwind CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- FontAwesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
<!-- Prism -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-bash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-jsx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-css.min.js"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
display: ['Robotto', 'sans-serif'],
body: ['DM Sans', 'sans-serif'],
mono: ['Fira Code', 'monospace'],
},
colors: {
ink: { 950: '#070910', 900: '#0b0d14', 800: '#111320', 750: '#141727', 700: '#161929', 600: '#1d2133', 500: '#252840', 400: '#2e3350', 300: '#3d4166', 200: '#4a5080', 100: '#636899' },
brand: { 400: '#818cf8', 500: '#6366f1', 600: '#4f46e5', 700: '#4338ca' },
},
animation: {
'fade-in': 'fadeIn 0.4s ease forwards',
'slide-up': 'slideUp 0.4s ease forwards',
}
}
}
}
</script>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
:root {
--brand: #6366f1;
--brand-glow: rgba(99, 102, 241, 0.35);
--surface: #111320;
--surface-raised: #1d2133;
--border: #2e3350;
--text: #e2e8f0;
--muted: #64748b;
--sidebar-w: 260px;
}
/* ── Scrollbar ── */
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #2e3350;
border-radius: 9px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--brand);
}
body {
font-family: 'DM Sans', sans-serif;
background: #0b0d14;
color: #e2e8f0;
-webkit-font-smoothing: antialiased;
}
/* ── Grid bg ── */
.grid-bg {
background-image:
linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
background-size: 48px 48px;
}
/* ── Noise overlay ── */
.noise::after {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
pointer-events: none;
}
/* ── Hero glow ── */
.hero-glow {
background: radial-gradient(ellipse 700px 400px at 50% -80px, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
}
/* ── Prism overrides ── */
pre[class*="language-"] {
background: #070910 !important;
margin: 0 !important;
padding: 1.25rem 1.5rem !important;
border-radius: 0 0 10px 10px !important;
font-size: 0.8rem !important;
line-height: 1.75 !important;
font-family: 'Fira Code', monospace !important;
border: 1px solid #2e3350;
border-top: none;
overflow-x: auto !important;
-webkit-overflow-scrolling: touch;
}
@media (max-width: 639px) {
pre[class*="language-"] {
padding: 1rem !important;
font-size: 0.72rem !important;
}
}
code[class*="language-"] {
font-family: 'Fira Code', monospace !important;
font-size: 0.8rem !important;
}
:not(pre)>code {
background: rgba(99, 102, 241, 0.12);
border: 1px solid rgba(99, 102, 241, 0.25);
border-radius: 4px;
padding: 1px 7px;
font-family: 'Fira Code', monospace;
font-size: 0.78rem;
color: #a5b4fc;
}
/* ── Code block wrapper ── */
.code-block {
border-radius: 10px;
overflow: hidden;
border: 1px solid #2e3350;
margin: 1.25rem 0;
}
.code-block-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 14px;
background: #1d2133;
border-bottom: 1px solid #2e3350;
font-family: 'Fira Code', monospace;
font-size: 0.7rem;
color: #64748b;
}
.code-block-header .lang-badge {
display: flex;
align-items: center;
gap: 6px;
color: #818cf8;
}
.code-block pre {
border-radius: 0 !important;
border: none !important;
}
/* ── Copy btn ── */
.copy-btn {
cursor: pointer;
padding: 3px 10px;
border-radius: 5px;
font-size: 0.65rem;
font-weight: 600;
font-family: 'DM Sans', sans-serif;
background: rgba(99, 102, 241, 0.12);
color: #818cf8;
border: 1px solid rgba(99, 102, 241, 0.25);
transition: all 0.12s;
}
.copy-btn:hover {
background: rgba(99, 102, 241, 0.25);
}
/* ── Sidebar nav ── */
.sidebar-link {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
border-radius: 6px;
font-size: 0.78rem;
color: #64748b;
text-decoration: none;
transition: all 0.12s;
white-space: nowrap;
cursor: pointer;
}
.sidebar-link:hover {
background: #1d2133;
color: #e2e8f0;
}
.sidebar-link.active {
background: rgba(99, 102, 241, 0.15);
color: #818cf8;
border-left: 2px solid #6366f1;
padding-left: 10px;
}
.sidebar-section-label {
font-size: 0.62rem;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #3d4166;
padding: 10px 12px 4px;
}
/* ── Content sections ── */
.doc-section {
padding: 4rem 0;
border-bottom: 1px solid #1d2133;
}
.doc-section:last-child {
border-bottom: none;
}
@media (max-width: 639px) {
.doc-section {
padding: 2.5rem 0;
}
}
.section-label {
font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #6366f1;
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 8px;
}
.section-label::before {
content: '';
display: block;
width: 20px;
height: 1px;
background: #6366f1;
}
h2.doc-h2 {
font-family: 'Robotto', sans-serif;
font-size: 1.75rem;
font-weight: 700;
color: #f1f5f9;
margin-bottom: 1rem;
letter-spacing: -0.02em;
}
@media (max-width: 639px) {
h2.doc-h2 {
font-size: 1.4rem;
}
}
h3.doc-h3 {
font-family: 'Robotto', sans-serif;
font-size: 1.1rem;
font-weight: 600;
color: #e2e8f0;
margin: 2rem 0 0.75rem;
letter-spacing: -0.01em;
}
p.doc-p {
font-size: 0.925rem;
line-height: 1.75;
color: #94a3b8;
margin-bottom: 1rem;
}
/* ── Feature card ── */
.feature-card {
background: #111320;
border: 1px solid #1d2133;
border-radius: 12px;
padding: 1.25rem 1.5rem;
transition: border-color 0.15s;
}
.feature-card:hover {
border-color: rgba(99, 102, 241, 0.4);
}
/* ── Intent chip ── */
.intent-chip {
display: inline-flex;
align-items: center;
gap: 5px;
background: rgba(99, 102, 241, 0.1);
border: 1px solid rgba(99, 102, 241, 0.25);
border-radius: 5px;
padding: 2px 10px;
font-family: 'Fira Code', monospace;
font-size: 0.72rem;
color: #a5b4fc;
white-space: nowrap;
}
.intent-chip.green {
background: rgba(34, 197, 94, 0.1);
border-color: rgba(34, 197, 94, 0.25);
color: #86efac;
}
.intent-chip.yellow {
background: rgba(234, 179, 8, 0.1);
border-color: rgba(234, 179, 8, 0.25);
color: #fde047;
}
.intent-chip.red {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.25);
color: #fca5a5;
}
/* ── Table ── */
.doc-table {
width: 100%;
border-collapse: collapse;
font-size: 0.83rem;
}
.doc-table th {
background: #1d2133;
color: #64748b;
font-weight: 600;
font-size: 0.68rem;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 8px 14px;
text-align: left;
border-bottom: 1px solid #2e3350;
white-space: nowrap;
}
.doc-table td {
padding: 9px 14px;
border-bottom: 1px solid #161929;
color: #94a3b8;
vertical-align: top;
}
.doc-table tr:last-child td {
border-bottom: none;
}
.doc-table tr:hover td {
background: rgba(255, 255, 255, 0.015);
}
.doc-table-wrap {
border: 1px solid #2e3350;
border-radius: 10px;
overflow-x: auto;
overflow-y: hidden;
margin: 1.25rem 0;
-webkit-overflow-scrolling: touch;
}
@media (max-width: 639px) {
.doc-table th,
.doc-table td {
padding: 7px 10px;
font-size: 0.75rem;
}
.doc-table {
font-size: 0.75rem;
}
}
/* ── Badge ── */
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 1px 8px;
border-radius: 4px;
font-size: 0.65rem;
font-weight: 700;
}
.badge-purple {
background: rgba(99, 102, 241, 0.15);
color: #818cf8;
border: 1px solid rgba(99, 102, 241, 0.3);
}
.badge-green {
background: rgba(34, 197, 94, 0.12);
color: #86efac;
border: 1px solid rgba(34, 197, 94, 0.3);
}
.badge-yellow {
background: rgba(234, 179, 8, 0.12);
color: #fde047;
border: 1px solid rgba(234, 179, 8, 0.3);
}
.badge-blue {
background: rgba(59, 130, 246, 0.12);
color: #93c5fd;
border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-red {
background: rgba(239, 68, 68, 0.12);
color: #fca5a5;
border: 1px solid rgba(239, 68, 68, 0.3);
}
/* ── Layer step ── */
.layer-step {
display: flex;
gap: 1rem;
padding: 1rem 0;
border-bottom: 1px solid #161929;
}
.layer-step:last-child {
border-bottom: none;
}
.layer-num {
flex-shrink: 0;
width: 28px;
height: 28px;
border-radius: 8px;
background: rgba(99, 102, 241, 0.12);
border: 1px solid rgba(99, 102, 241, 0.3);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Fira Code', monospace;
font-size: 0.7rem;
font-weight: 700;
color: #818cf8;
margin-top: 2px;
}
/* ── Animations ── */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse-ring {
0%,
100% {
opacity: .6
}
50% {
opacity: 1
}
}
/* ── Sidebar mobile ── */
#sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 40;
}
#sidebar-overlay.open {
display: block;
}
@media (max-width: 1023px) {
#main-sidebar {
position: fixed;
top: 0;
left: 0;
height: 100dvh;
transform: translateX(-100%);
transition: transform 0.22s ease;
z-index: 50;
width: 260px;
}
#main-sidebar.open {
transform: translateX(0);
}
}
@media (min-width: 1024px) {
#sidebar-toggle {
display: none !important;
}
}
/* ── Sticky sidebar ── */
@media (min-width: 1024px) {
#main-sidebar {
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
}
}
/* ── Playground CTA pulse ── */
.cta-pulse {
animation: pulse-ring 2s ease-in-out infinite;
}
/* ── Roadmap ── */
.roadmap-row {
display: flex;
gap: 1rem;
padding: 1rem 1.25rem;
border-bottom: 1px solid #161929;
align-items: flex-start;
}
.roadmap-row:last-child {
border-bottom: none;
}
@media (max-width: 639px) {
.roadmap-row {
padding: 0.875rem 1rem;
gap: 0.75rem;
}
}
.roadmap-dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
margin-top: 5px;
}
.roadmap-dot.done {
background: #22c55e;
box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}
.roadmap-dot.active {
background: #6366f1;
box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}
.roadmap-dot.soon {
background: #3d4166;
}
.roadmap-dot.future {
background: #252840;
}
/* ── Token swatch ── */
.token-row {
display: flex;
align-items: center;
gap: 10px;
padding: 7px 0;
border-bottom: 1px solid #161929;
font-size: 0.78rem;
}
.token-row:last-child {
border-bottom: none;
}
.token-swatch {
width: 20px;
height: 20px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
}
.token-name {
font-family: 'Fira Code', monospace;
color: #a5b4fc;
font-size: 0.73rem;
flex: 1;
}
.token-value {
font-family: 'Fira Code', monospace;
color: #64748b;
font-size: 0.7rem;
}
/* active section highlight */
.section-anchor {
scroll-margin-top: 5rem;
}
</style>
</head>
<body class="min-h-screen">
<!-- Overlay for mobile sidebar -->
<div id="sidebar-overlay" onclick="toggleSidebar(false)"></div>
<!-- ═══════════════════════════════════════════════════════════
TOP NAV
════════════════════════════════════════════════════════════ -->
<header id="topnav"
class="fixed top-0 inset-x-0 z-30 h-14 flex items-center gap-0 md:gap-4 px-4 md:px-6 border-b border-ink-600"
style="background: rgba(11,13,20,0.92); backdrop-filter: blur(12px);">
<!-- Mobile: sidebar toggle -->
<button id="sidebar-toggle" onclick="toggleSidebar(true)"
class="lg:hidden text-slate-400 hover:text-white p-1.5 rounded-md hover:bg-ink-600 transition-colors">
<i class="fa-solid fa-bars text-sm"></i>
</button>
<!-- Logo -->
<a href="#intro" class="flex items-center gap-2.5 no-underline">
<span class="text-brand-500 text-lg leading-none font-bold">◆</span>
<span class="font-display font-bold text-[1.05rem] tracking-tight text-white">Mastors</span>
<span
class="text-[0.55rem] font-bold bg-brand-600 text-white px-1.5 py-0.5 rounded uppercase tracking-widest hidden sm:inline">v0.1</span>
</a>
<div class="flex-1"></div>
<!-- Nav links -->
<nav class="hidden md:flex items-center gap-5">
<a href="#quick-start" class="text-slate-400 hover:text-slate-200 text-xs transition-colors font-body">Quick
Start</a>
<a href="#vocabulary"
class="text-slate-400 hover:text-slate-200 text-xs transition-colors font-body">Vocabulary</a>
<a href="#adapters" class="text-slate-400 hover:text-slate-200 text-xs transition-colors font-body">Adapters</a>
<a href="#tokens" class="text-slate-400 hover:text-slate-200 text-xs transition-colors font-body">Tokens</a>
<a href="#roadmap" class="text-slate-400 hover:text-slate-200 text-xs transition-colors font-body">Roadmap</a>
</nav>
<!-- GitHub -->
<a href="#"
class="hidden sm:flex items-center gap-1.5 text-slate-400 hover:text-slate-200 text-xs transition-colors">
<i class="fa-brands fa-github text-sm"></i>
<span class="hidden md:inline">GitHub</span>
</a>
<!-- Playground CTA -->
<a href="./playground/"
class="flex items-center gap-2 px-3.5 py-1.5 rounded-lg text-white text-xs font-semibold transition-all"
style="background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 0 16px rgba(99,102,241,0.3);"
onmouseover="this.style.boxShadow='0 0 24px rgba(99,102,241,0.5)'"
onmouseout="this.style.boxShadow='0 0 16px rgba(99,102,241,0.3)'">
<i class="fa-solid fa-play text-[0.6rem] cta-pulse"></i>
<span>Playground</span>
</a>
</header>
<!-- ═══════════════════════════════════════════════════════════
LAYOUT WRAPPER
════════════════════════════════════════════════════════════ -->
<div class="pt-14 flex min-h-screen">
<!-- ── LEFT SIDEBAR ─────────────────────────────────────── -->
<aside id="main-sidebar"
class="w-[260px] flex-shrink-0 flex flex-col bg-ink-800 border-r border-ink-600 overflow-y-auto overflow-x-hidden">
<div class="py-4 px-2">
<!-- GETTING STARTED -->
<div class="sidebar-section-label">Getting Started</div>
<a class="sidebar-link" href="#intro" onclick="closeSidebarMobile()"><i
class="fa-solid fa-house-chimney w-4 text-center opacity-50"></i>Introduction</a>
<a class="sidebar-link" href="#installation" onclick="closeSidebarMobile()"><i
class="fa-solid fa-download w-4 text-center opacity-50"></i>Installation</a>
<a class="sidebar-link" href="#quick-start" onclick="closeSidebarMobile()"><i
class="fa-solid fa-bolt w-4 text-center opacity-50"></i>Quick Start</a>
<a class="sidebar-link" href="#architecture" onclick="closeSidebarMobile()"><i
class="fa-solid fa-layer-group w-4 text-center opacity-50"></i>Architecture</a>
<!-- CORE CONCEPTS -->
<div class="sidebar-section-label mt-2">Core API</div>
<a class="sidebar-link" href="#intent-api" onclick="closeSidebarMobile()"><i
class="fa-solid fa-code w-4 text-center opacity-50"></i>Intent API</a>
<a class="sidebar-link" href="#resolver" onclick="closeSidebarMobile()"><i
class="fa-solid fa-gears w-4 text-center opacity-50"></i>Semantic Resolver</a>
<a class="sidebar-link" href="#vocabulary" onclick="closeSidebarMobile()"><i
class="fa-solid fa-book w-4 text-center opacity-50"></i>Vocabulary</a>
<!-- VOCABULARY -->
<div class="sidebar-section-label mt-2">Vocabulary</div>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-cards" onclick="closeSidebarMobile()">Cards</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-buttons" onclick="closeSidebarMobile()">Buttons</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-typography"
onclick="closeSidebarMobile()">Typography</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-alerts" onclick="closeSidebarMobile()">Alerts</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-nav" onclick="closeSidebarMobile()">Navigation</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-forms" onclick="closeSidebarMobile()">Forms</a>
<a class="sidebar-link pl-8 text-[0.73rem]" href="#vocab-layout" onclick="closeSidebarMobile()">Layout</a>
<!-- FRAMEWORK -->
<div class="sidebar-section-label mt-2">Integrations</div>
<a class="sidebar-link" href="#adapters" onclick="closeSidebarMobile()"><i
class="fa-brands fa-react w-4 text-center opacity-50"></i>Framework Adapters</a>
<a class="sidebar-link" href="#build-plugins" onclick="closeSidebarMobile()"><i
class="fa-solid fa-plug w-4 text-center opacity-50"></i>Build Plugins</a>
<a class="sidebar-link" href="#configuration" onclick="closeSidebarMobile()"><i
class="fa-solid fa-sliders w-4 text-center opacity-50"></i>Configuration</a>
<!-- REFERENCE -->
<div class="sidebar-section-label mt-2">Reference</div>
<a class="sidebar-link" href="#tokens" onclick="closeSidebarMobile()"><i
class="fa-solid fa-coins w-4 text-center opacity-50"></i>Design Tokens</a>
<a class="sidebar-link" href="#accessibility" onclick="closeSidebarMobile()"><i
class="fa-solid fa-universal-access w-4 text-center opacity-50"></i>Accessibility</a>
<a class="sidebar-link" href="#packages" onclick="closeSidebarMobile()"><i
class="fa-solid fa-cube w-4 text-center opacity-50"></i>Packages</a>
<a class="sidebar-link" href="#roadmap" onclick="closeSidebarMobile()"><i
class="fa-solid fa-map w-4 text-center opacity-50"></i>Roadmap</a>
<!-- Playground pill -->
<div class="mt-4 mx-2 p-3 rounded-xl"
style="background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);">
<div class="text-[0.62rem] font-bold uppercase tracking-widest text-brand-400 mb-1.5">
<i class="fa-solid fa-play mr-1"></i>Interactive
</div>
<p class="text-[0.72rem] text-slate-500 mb-2.5 leading-relaxed">Explore every intent live in the Mastors
Playground.</p>
<a href="./playground/"
class="block text-center py-1.5 rounded-lg text-white text-[0.72rem] font-semibold transition-all"
style="background: #6366f1">
Open Playground →
</a>
</div>
</div>
</aside>
<!-- ── MAIN CONTENT ──────────────────────────────────────── -->
<main class="flex-1 min-w-0 overflow-x-hidden">
<!-- ══════════════════════════════════════════════════════
HERO
═══════════════════════════════════════════════════════ -->
<section class="relative overflow-hidden grid-bg noise min-h-[520px] flex items-center" id="intro">
<div class="hero-glow absolute inset-0 pointer-events-none"></div>
<div class="relative z-10 md:max-w-3xl max-w-full mx-auto px-6 py-20 text-center">
<!-- Logo mark -->
<div class="inline-flex items-center gap-2 mb-6 px-3 py-1.5 rounded-full"
style="background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);">
<span class="text-brand-500 text-sm font-bold">◆</span>
<span class="text-brand-400 text-xs font-bold font-mono tracking-widest uppercase">Mastors v0.1</span>
<span class="badge badge-green text-[0.55rem]">Stable</span>
</div>
<h1
class="font-display font-extrabold text-4xl sm:text-5xl md:text-6xl leading-tight tracking-tight text-white mb-5">
Style is the<br>
<span
style="background: linear-gradient(90deg, #818cf8, #6366f1, #4f46e5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;">expression
of intent.</span>
</h1>
<p class="text-slate-400 text-base sm:text-lg leading-relaxed max-w-xl mx-auto mb-8 font-body">
Mastors is an <strong class="text-slate-300">Intent-Based Styling Framework</strong> — declare <em>what</em>
a UI element <em>is</em> and Mastors resolves <em>how it looks</em>: accessible, responsive, theme-aware,
and zero-runtime.
</p>
<!-- Install command -->
<div class="flex items-center gap-3 px-4 py-2.5 rounded-xl mb-8 font-mono text-sm w-full overflow-x-auto"
style="background: #070910; border: 1px solid #2e3350; margin-left: auto; margin-right: auto;">
<span class="text-brand-400 flex-shrink-0">$</span>
<span class="text-slate-300 whitespace-nowrap">pnpm add @mastors/api @mastors/core @mastors/schemas</span>
<button
onclick="copyText('pnpm add @mastors/api @mastors/core @mastors/schemas @mastors/tokens @mastors/types')"
class="copy-btn flex-shrink-0 ml-auto">
<i class="fa-solid fa-copy mr-1"></i>Copy
</button>
</div>
<div class="flex flex-wrap items-center justify-center gap-3">
<a href="#quick-start"
class="flex items-center gap-2 px-5 py-2.5 rounded-lg text-white font-semibold text-sm transition-all"
style="background: #6366f1; box-shadow: 0 4px 20px rgba(99,102,241,0.35);"
onmouseover="this.style.boxShadow='0 4px 28px rgba(99,102,241,0.5)'"
onmouseout="this.style.boxShadow='0 4px 20px rgba(99,102,241,0.35)'">
<i class="fa-solid fa-bolt text-xs"></i> Get Started
</a>
<a href="./playground/"
class="flex items-center gap-2 px-5 py-2.5 rounded-lg text-slate-300 font-semibold text-sm transition-all"
style="background: #1d2133; border: 1px solid #2e3350;"
onmouseover="this.style.borderColor='rgba(99,102,241,0.5)'" onmouseout="this.style.borderColor='#2e3350'">
<i class="fa-solid fa-play text-xs text-brand-400"></i> Open Playground
</a>
</div>
</div>
</section>
<!-- Feature strip -->
<div class="grid grid-cols-2 md:grid-cols-4 border-b border-ink-600">
<div class="flex items-center gap-3 px-4 sm:px-5 py-4 border-r border-ink-600">
<i class="fa-solid fa-bolt text-brand-400 text-lg flex-shrink-0"></i>
<div>
<div class="text-xs font-bold text-slate-200">Zero-Runtime</div>
<div class="text-[0.68rem] text-slate-500">CSS compiled at build time</div>
</div>
</div>
<div class="flex items-center gap-3 px-4 sm:px-5 py-4 md:border-r border-ink-600">
<i class="fa-solid fa-universal-access text-green-400 text-lg flex-shrink-0"></i>
<div>
<div class="text-xs font-bold text-slate-200">WCAG 2.2</div>
<div class="text-[0.68rem] text-slate-500">Auto a11y enforcement</div>
</div>
</div>
<div class="flex items-center gap-3 px-4 sm:px-5 py-4 border-r border-ink-600 border-t md:border-t-0">
<i class="fa-solid fa-palette text-blue-400 text-lg flex-shrink-0"></i>
<div>
<div class="text-xs font-bold text-slate-200">Token-Native</div>
<div class="text-[0.68rem] text-slate-500">Design token–driven</div>
</div>
</div>
<div class="flex items-center gap-3 px-4 sm:px-5 py-4 border-t md:border-t-0">
<i class="fa-solid fa-cubes text-yellow-400 text-lg flex-shrink-0"></i>
<div>
<div class="text-xs font-bold text-slate-200">Framework Agnostic</div>
<div class="text-[0.68rem] text-slate-500">React, Vue, Svelte</div>
</div>
</div>
</div>
<div class="max-w-4xl mx-auto px-4 sm:px-6">
<!-- ════════════════════════════════════════════════════
INSTALLATION
═══════════════════════════════════════════════════════ -->
<section class="doc-section section-anchor" id="installation">
<div class="section-label">01</div>
<h2 class="doc-h2">Installation</h2>
<p class="doc-p">Mastors is a pnpm workspace monorepo. Install the packages you need.</p>
<h3 class="doc-h3">Full install</h3>
<div class="code-block">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-solid fa-terminal text-[0.65rem]"></i> bash</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-bash">pnpm add @mastors/api @mastors/core @mastors/compiler \
@mastors/schemas @mastors/tokens @mastors/types @mastors/utils</code></pre>
</div>
<h3 class="doc-h3">Minimal install (API + core only)</h3>
<div class="code-block">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-solid fa-terminal text-[0.65rem]"></i> bash</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-bash">pnpm add @mastors/api @mastors/core @mastors/schemas @mastors/tokens @mastors/types</code></pre>
</div>
<h3 class="doc-h3">Framework adapters</h3>
<div class="code-block">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-brands fa-react text-[0.65rem]"></i> bash</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-bash"># React
pnpm add @mastors/adapter-react
# Vue 3
pnpm add @mastors/adapter-vue
# Svelte
pnpm add @mastors/adapter-svelte</code></pre>
</div>
<h3 class="doc-h3">Build plugins</h3>
<div class="code-block">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-solid fa-plug text-[0.65rem]"></i> bash</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-bash">pnpm add -D @mastors/plugin-vite # Vite
pnpm add -D @mastors/plugin-webpack # webpack</code></pre>
</div>
</section>
<!-- ════════════════════════════════════════════════════
QUICK START
═══════════════════════════════════════════════════════ -->
<section class="doc-section section-anchor" id="quick-start">
<div class="section-label">02</div>
<h2 class="doc-h2">Quick Start</h2>
<p class="doc-p">Get from zero to a fully-styled, accessible component in five steps.</p>
<!-- Step 1 -->
<div class="layer-step">
<div class="layer-num">1</div>
<div class="flex-1">
<div class="font-semibold text-slate-200 text-sm mb-0.5">Create <code>mastors.config.ts</code></div>
<p class="doc-p text-xs mb-0">Define your schema and custom vocabulary at the project root.</p>
</div>
</div>
<div class="code-block mt-3">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-solid fa-gear text-[0.65rem]"></i> mastors.config.ts</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-typescript">import { defineSchema } from "@mastors/schemas";
export default defineSchema({
tokens: "./tokens/global.json", // optional — uses built-in tokens by default
vocabulary: {
// Extend the built-in vocabulary with project-specific intents
"card.promo.featured": {
spacing: { x: "token.space.6", y: "token.space.5" },
shadow: "token.shadow.elevated",
radius: "token.radius.xl",
color: {
background: "token.color.primary.50",
border: "token.color.primary.200",
},
a11y: { role: "article", contrast: "AA" },
},
},
});</code></pre>
</div>
<!-- Step 2 -->
<div class="layer-step">
<div class="layer-num">2</div>
<div class="flex-1">
<div class="font-semibold text-slate-200 text-sm mb-0.5">Add the Vite plugin</div>
</div>
</div>
<div class="code-block mt-3">
<div class="code-block-header">
<span class="lang-badge"><i class="fa-solid fa-file text-[0.65rem]"></i> vite.config.ts</span>
<button class="copy-btn" onclick="copyBlock(this)"><i class="fa-solid fa-copy mr-1"></i>Copy</button>
</div>
<pre><code class="language-typescript">import { defineConfig } from "vite";
import { mastorsPlugin } from "@mastors/plugin-vite";
import schema from "./mastors.config";
export default defineConfig({
plugins: [
mastorsPlugin({
config: { schema, a11yMode: "warn" },