mewith 0.0.0-stage → 0.1.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.
- package/LICENSE +24 -0
- package/cli/bin/cli.js +9 -0
- package/cli/package.json +10 -0
- package/cli/src/ask.js +45 -0
- package/cli/src/claude.js +88 -0
- package/cli/src/clawd.js +120 -0
- package/cli/src/codex-notes.js +16 -0
- package/cli/src/codex.js +100 -0
- package/cli/src/collect.js +174 -0
- package/cli/src/git.js +95 -0
- package/cli/src/homes.js +140 -0
- package/cli/src/jsonl.js +29 -0
- package/cli/src/lang.js +34 -0
- package/cli/src/main.js +151 -0
- package/cli/src/page.html +274 -0
- package/cli/src/page.js +165 -0
- package/cli/src/pickup.js +99 -0
- package/cli/src/repos.js +203 -0
- package/cli/src/search.js +47 -0
- package/cli/src/shoot.js +399 -0
- package/cli/src/slovechki.js +36 -0
- package/cli/src/submit.js +329 -0
- package/cli/src/terminal.js +108 -0
- package/cli/src/texts.js +138 -0
- package/cli/src/time.js +18 -0
- package/karusel/arcade.js +168 -0
- package/karusel/badge.js +139 -0
- package/karusel/codex/1.png +0 -0
- package/karusel/codex/2.png +0 -0
- package/karusel/codex/3.png +0 -0
- package/karusel/codex/4.png +0 -0
- package/karusel/codex/5.png +0 -0
- package/karusel/codex/6.png +0 -0
- package/karusel/common.js +252 -0
- package/karusel/fonts/OFL-martianmono.txt +93 -0
- package/karusel/fonts/OFL-onest.txt +93 -0
- package/karusel/fonts/OFL-pixelifysans.txt +93 -0
- package/karusel/fonts/OFL-pressstart2p.txt +93 -0
- package/karusel/fonts/OFL-shantellsans.txt +93 -0
- package/karusel/fonts/OFL-sofiasansextracondensed.txt +93 -0
- package/karusel/fonts/fonts.css +25 -0
- package/karusel/fonts/martianmono-cyrillic.woff2 +0 -0
- package/karusel/fonts/martianmono-latin.woff2 +0 -0
- package/karusel/fonts/onest-cyrillic.woff2 +0 -0
- package/karusel/fonts/onest-latin.woff2 +0 -0
- package/karusel/fonts/pixelifysans-cyrillic.woff2 +0 -0
- package/karusel/fonts/pixelifysans-latin.woff2 +0 -0
- package/karusel/fonts/pressstart2p-cyrillic.woff2 +0 -0
- package/karusel/fonts/pressstart2p-latin.woff2 +0 -0
- package/karusel/fonts/shantellsans-cyrillic.woff2 +0 -0
- package/karusel/fonts/shantellsans-latin.woff2 +0 -0
- package/karusel/fonts/sofiasansextracondensed-cyrillic.woff2 +0 -0
- package/karusel/fonts/sofiasansextracondensed-latin.woff2 +0 -0
- package/karusel/index.js +31 -0
- package/karusel/sheet.js +106 -0
- package/karusel/sprites.js +2 -0
- package/karusel/teletext.js +110 -0
- package/package.json +13 -4
- package/shared/config.json +8 -0
- package/shared/models.js +15 -0
- package/shared/season.js +13 -0
- package/shared/sila.js +35 -0
- package/README.md +0 -3
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Шаблон «Экран результатов»: экран аркадного автомата после победы. Родная анимация — счётчики бонусов, вспышки при смене ранга.
|
|
2
|
+
KARUSEL.TEMPLATES.arcade = {
|
|
3
|
+
durs: [0, 6, 6, 6, 6, 7, 7],
|
|
4
|
+
css: `
|
|
5
|
+
:root, :host { --bg:#0B0B1A; --y:#FFD23F; --c:#3BE8FF; --m:#FF4FA3; --w:#FFFFFF; --dim:#3a3a5c; --mute:#8a8ab0; }
|
|
6
|
+
html, body { margin:0; background:#000; }
|
|
7
|
+
* { box-sizing:border-box; }
|
|
8
|
+
#stage { width:1080px; height:1350px; position:relative; overflow:hidden; background:var(--bg); color:var(--w);
|
|
9
|
+
font-family:'Press Start 2P', monospace;
|
|
10
|
+
background-image:repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 3px, transparent 3px 6px); }
|
|
11
|
+
.top, .bot { position:absolute; left:64px; right:64px; display:flex; justify-content:space-between; align-items:center; }
|
|
12
|
+
.top { top:56px; font-size:22px; color:var(--c); }
|
|
13
|
+
.bot { bottom:52px; font:500 27px 'Pixelify Sans', sans-serif; color:var(--mute); }
|
|
14
|
+
.bot b { color:var(--c); font-weight:700; }
|
|
15
|
+
.body { position:absolute; left:64px; right:64px; top:150px; bottom:140px; display:flex; flex-direction:column; justify-content:space-between; }
|
|
16
|
+
h1 { margin:0; font:400 104px/1.12 'Press Start 2P'; color:var(--y); text-shadow:8px 8px 0 var(--m); }
|
|
17
|
+
h2 { margin:0; font:400 54px/1.2 'Press Start 2P'; color:var(--y); text-shadow:5px 5px 0 var(--m); }
|
|
18
|
+
.sub { font:500 40px 'Pixelify Sans'; color:var(--w); }
|
|
19
|
+
.row { display:flex; align-items:baseline; gap:14px; font:500 46px 'Pixelify Sans'; }
|
|
20
|
+
.row i { flex:1; border-bottom:5px dotted var(--dim); transform:translateY(-10px); }
|
|
21
|
+
.row b { font:400 42px 'Press Start 2P'; font-weight:400; }
|
|
22
|
+
.px { image-rendering:pixelated; display:block; }
|
|
23
|
+
.frame { border:6px solid var(--y); padding:28px 32px; }
|
|
24
|
+
.small { font-size:20px; color:var(--c); }
|
|
25
|
+
.hint { position:absolute; right:64px; bottom:140px; font-size:22px; color:var(--y); }
|
|
26
|
+
`,
|
|
27
|
+
make(k) {
|
|
28
|
+
const { D, SLIDE, N, CARD, ease, seg, cnt, on, blink, vis, typed, RANKS, RANK, MONTHS, YEAR, WEEKMAX, ALT, unit, chose, MODELS, FAV, TOP_SHARE, place, CMD, UP, rankState, mascots,
|
|
29
|
+
AGENTS, HAS_CLAUDE, TITLE, DAYS_WITH, CAL_DAYS, ANGRIER } = k;
|
|
30
|
+
const DUR = this.durs, NAMES_UP = RANKS.map(UP);
|
|
31
|
+
const row = (label, value, color, shown) => `<div class="row" style="${vis(shown)}"><span>${label}</span><i></i><b style="color:${color}">${value}</b></div>`;
|
|
32
|
+
// место среди участников — строка под рангом; места нет — строки нет
|
|
33
|
+
const pl = place(String), placeLine = (style) => (pl ? `<div class="small" style="${style}">${UP(pl.member ?? `${pl.top} ${pl.of}`)}</div>` : '');
|
|
34
|
+
const coin = `▶ ВСТАВЬ МОНЕТУ: npx ${CMD ?? '[команда]'}`;
|
|
35
|
+
// маскоты стоят в своей полосе; без агента полосы нет — остальное расходится по кадру само
|
|
36
|
+
const stand = (height, inner) => (AGENTS.length ? `<div style="display:flex; justify-content:center; height:${height}px; align-items:flex-end">${inner}</div>` : '');
|
|
37
|
+
// строка «дни с …»: who — чьи дни (на слайде дней — те, что закрашены в календаре); без агента строки нет
|
|
38
|
+
const daysRow = (who, color, p, shown) => (who ? row('ДНИ С ' + UP(who.name), cnt(who.n, p), color, shown) : '');
|
|
39
|
+
|
|
40
|
+
function s1(t) { // обложка: собрана с первого кадра
|
|
41
|
+
const stars = [[90, 40], [860, 120], [700, 30], [150, 330], [930, 420], [40, 620], [880, 700], [520, 90]];
|
|
42
|
+
return `<div class="body" style="align-items:center; text-align:center; gap:34px; padding-top:30px">
|
|
43
|
+
${stars.map(([x, y], i) => `<div style="position:absolute; left:${x}px; top:${y}px; width:10px; height:10px; background:${i % 2 ? 'var(--c)' : 'var(--y)'}; opacity:${blink(t + i * 0.37, 0.6) ? 1 : 0.25}"></div>`).join('')}
|
|
44
|
+
<div class="small">ИТОГИ ГОДА ВАЙБКОДЕРА · 1P + AI</div>
|
|
45
|
+
<h1>${YEAR}<br><span>ПРОЙДЕН!</span></h1>
|
|
46
|
+
${stand(560, mascots(13, null, t))}
|
|
47
|
+
<div class="sub">коммиты, дни, часы и ранг</div>
|
|
48
|
+
<div style="font-size:26px; color:var(--y); ${vis(blink(t, 0.55))}">ЛИСТАЙ ▶</div>
|
|
49
|
+
</div>`;
|
|
50
|
+
}
|
|
51
|
+
function s2(t) { // коммиты
|
|
52
|
+
const mx = WEEKMAX;
|
|
53
|
+
const shown = Math.round(53 * seg(t, 2.6, 2.4));
|
|
54
|
+
const bars = D.weeks.map((w, i) => {
|
|
55
|
+
const h = i < shown ? Math.round(w[0] / mx * 440) : 0, hc = i < shown ? Math.round(w[1] / mx * 440) : 0;
|
|
56
|
+
return `<div style="flex:1; height:440px; display:flex; flex-direction:column; justify-content:flex-end"><div style="height:${h - hc}px; background:var(--c)"></div><div style="height:${hc}px; background:var(--y)"></div></div>`;
|
|
57
|
+
}).join('');
|
|
58
|
+
return `<div class="body" style="gap:40px">
|
|
59
|
+
<h2><span>БОНУС:</span><br><span>КОММИТЫ</span></h2>
|
|
60
|
+
<div style="display:flex; flex-direction:column; gap:30px">
|
|
61
|
+
${row('ВСЕГО ЗА ГОД', cnt(D.commits, seg(t, 0.3, 1.2)), 'var(--w)', true)}
|
|
62
|
+
${HAS_CLAUDE ? row('С CLAUDE CODE', '×' + cnt(D.commitsClaude, seg(t, 1.1, 1.2)), 'var(--y)', on(t, 1.1)) : ''}
|
|
63
|
+
${row('ПРОЕКТЫ', cnt(D.projects, seg(t, 1.9, 0.8)), 'var(--c)', on(t, 1.9))}
|
|
64
|
+
</div>
|
|
65
|
+
<div style="${vis(on(t, 2.6))}">
|
|
66
|
+
<div class="small" style="margin-bottom:16px">ПО НЕДЕЛЯМ · ЯНВАРЬ — ДЕКАБРЬ</div>
|
|
67
|
+
<div style="display:flex; gap:4px; align-items:flex-end; height:440px; border-bottom:5px solid var(--dim)">${bars}</div>
|
|
68
|
+
${HAS_CLAUDE ? `<div style="display:flex; gap:36px; margin-top:18px; font:500 30px 'Pixelify Sans'"><span style="color:var(--y)">■ с Claude Code</span><span style="color:var(--c)">■ без него</span></div>` : ''}
|
|
69
|
+
</div>
|
|
70
|
+
</div>`;
|
|
71
|
+
}
|
|
72
|
+
function s3(t) { // дни и часы
|
|
73
|
+
const lit = Math.round(D.cal.length * seg(t, 0.4, 2.8));
|
|
74
|
+
const M = MONTHS;
|
|
75
|
+
let i = 0, rows = '';
|
|
76
|
+
for (let m = 1; m <= 12; m++) {
|
|
77
|
+
let cells = '';
|
|
78
|
+
while (i < D.cal.length && D.cal[i][0] === m) {
|
|
79
|
+
const [, , n, c, cd] = D.cal[i];
|
|
80
|
+
const col = i >= lit ? '#1b1b33' : (c || cd) ? 'var(--y)' : n ? 'var(--c)' : '#1b1b33';
|
|
81
|
+
cells += `<div style="width:24px; height:34px; background:${col}"></div>`; i++;
|
|
82
|
+
}
|
|
83
|
+
rows += `<div style="display:flex; gap:4px; align-items:center"><div style="width:76px; font-size:16px; color:var(--mute)">${M[m - 1]}</div>${cells}</div>`;
|
|
84
|
+
}
|
|
85
|
+
return `<div class="body" style="gap:34px">
|
|
86
|
+
<h2><span>БОНУС:</span><br><span>ДНИ И ЧАСЫ</span></h2>
|
|
87
|
+
<div style="display:flex; flex-direction:column; gap:6px">${rows}</div>
|
|
88
|
+
<div style="display:flex; flex-direction:column; gap:26px">
|
|
89
|
+
${daysRow(CAL_DAYS, 'var(--y)', seg(t, 3.2, 0.9), on(t, 3.2))}
|
|
90
|
+
${row('СЕРИЯ ДНЕЙ ПОДРЯД', cnt(D.streak, seg(t, 3.8, 0.7)), 'var(--c)', on(t, 3.8))}
|
|
91
|
+
${row('ЧАСЫ РАБОТЫ', '≈' + cnt(D.hours, seg(t, 4.4, 0.9)), 'var(--w)', on(t, 4.4))}
|
|
92
|
+
</div>
|
|
93
|
+
</div>`;
|
|
94
|
+
}
|
|
95
|
+
function s4(t) { // модели года; без моделей остаётся одна строка со счётом
|
|
96
|
+
const bars = MODELS.map((m, i) => {
|
|
97
|
+
const p = ease(seg(t, 0.5 + i * 0.5, 0.9));
|
|
98
|
+
return `<div style="${vis(on(t, 0.5 + i * 0.5))}"><div style="display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px"><span style="font:400 34px 'Press Start 2P'">${UP(m.name)}</span><b style="font:400 36px 'Press Start 2P'; color:${i ? 'var(--c)' : 'var(--y)'}">${Math.round(m.share * p)}%</b></div>
|
|
99
|
+
<div style="height:34px; background:#1b1b33"><div style="height:34px; width:${m.share / TOP_SHARE * 100 * p}%; background:${i ? 'var(--c)' : 'var(--y)'}"></div></div></div>`;
|
|
100
|
+
}).join('');
|
|
101
|
+
const fav = FAV ? `<div class="small" style="margin-bottom:16px">ЛЮБИМАЯ МОДЕЛЬ</div>
|
|
102
|
+
<div style="font-size:60px; color:var(--m)">${typed(UP(FAV.name), seg(t, 3.6, 0.6))}</div>` : '';
|
|
103
|
+
return `<div class="body" style="gap:38px">
|
|
104
|
+
<h2><span>МОДЕЛИ</span><br><span>ГОДА</span></h2>
|
|
105
|
+
<div style="display:flex; flex-direction:column; gap:26px">${bars}</div>
|
|
106
|
+
<div class="frame" style="margin-top:auto; ${vis(on(t, 3.6))}">
|
|
107
|
+
${fav}
|
|
108
|
+
<div class="sub" style="${FAV ? 'margin-top:16px; ' : ''}${vis(on(t, 4.6))}">всего за год сменилось моделей: <span style="font:400 32px 'Press Start 2P'; color:var(--y)">${D.modelCount}</span></div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>`;
|
|
111
|
+
}
|
|
112
|
+
function s5(t) { // вместо этого
|
|
113
|
+
const mar = ALT.mar, bor = ALT.bor, sleep = ALT.sleep;
|
|
114
|
+
const line = (a, text, big, unit, strike) => `<div style="${vis(on(t, a))}">
|
|
115
|
+
<div class="sub" style="color:var(--mute)">${text}</div>
|
|
116
|
+
<div style="font-size:66px; color:var(--c); margin-top:10px"><span style="position:relative; display:inline-block">${cnt(big, seg(t, a, 0.9))}<span style="position:absolute; left:-8px; right:-8px; top:42%; height:8px; background:var(--m); transform-origin:0 50%; transform:scaleX(${ease(seg(t, strike, 0.35))})"></span></span> <span style="font:500 52px 'Pixelify Sans'; color:var(--w)">${unit}</span></div></div>`;
|
|
117
|
+
return `<div class="body" style="gap:34px">
|
|
118
|
+
<h2><span>ВМЕСТО</span><br><span>ЭТОГО</span></h2>
|
|
119
|
+
<div class="sub">за эти <span style="font:400 32px 'Press Start 2P'; color:var(--y)">≈${D.hours}</span> ч ты мог бы:</div>
|
|
120
|
+
${line(0.6, 'пробежать', mar, unit(mar, 'mar'), 4.2)}
|
|
121
|
+
${line(1.7, 'сварить', bor, unit(bor, 'bor'), 4.4)}
|
|
122
|
+
${line(2.8, 'выспаться', sleep, unit(sleep, 'sleep'), 4.6)}
|
|
123
|
+
<div class="frame" style="margin-top:auto; ${vis(on(t, 5.1))}">
|
|
124
|
+
<div class="small" style="margin-bottom:14px">НО ТЫ ВЫБРАЛ</div>
|
|
125
|
+
<div style="font-size:50px; line-height:1.3; color:var(--y)">${typed(chose(String).toUpperCase(), seg(t, 5.1, 1.0))}</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>`;
|
|
128
|
+
}
|
|
129
|
+
function s6(t) { // ранг: клодик звереет до своего ранга
|
|
130
|
+
const NAMES = NAMES_UP;
|
|
131
|
+
const r = rankState(t, 14), step = r.step, done = r.done;
|
|
132
|
+
return `<div class="body" style="align-items:center; text-align:center; gap:26px">
|
|
133
|
+
<h2>РАНГ ЗА ГОД</h2>
|
|
134
|
+
<div class="sub" style="color:${done ? 'var(--mute)' : 'var(--c)'}">${done ? ANGRIER : NAMES[step] + '…'}</div>
|
|
135
|
+
${stand(600, mascots(14, r, t))}
|
|
136
|
+
<div class="frame" style="width:100%; ${vis(done)}; transform:scale(${done ? 1 + 0.25 * (1 - ease(seg(t, 3.6, 0.35))) : 1})">
|
|
137
|
+
<div style="font-size:88px; color:var(--m); text-shadow:6px 6px 0 var(--y)">${RANK.toUpperCase()}</div>
|
|
138
|
+
${placeLine('margin-top:20px; font-size:24px')}
|
|
139
|
+
</div>
|
|
140
|
+
<div style="font-size:24px; color:var(--y); ${vis(on(t, 4.6) && blink(t, 0.55))}">${coin}</div>
|
|
141
|
+
</div>`;
|
|
142
|
+
}
|
|
143
|
+
function card(t) { // одиночная карточка 9:16
|
|
144
|
+
const r = rankState(t, 13, 0.4, 2.2);
|
|
145
|
+
return `<div class="body" style="gap:20px">
|
|
146
|
+
<div class="small">ИТОГИ ГОДА ВАЙБКОДЕРА · 1P + AI</div>
|
|
147
|
+
<h1 style="font-size:96px">${YEAR}<br><span>ПРОЙДЕН!</span></h1>
|
|
148
|
+
<div style="display:flex; flex-direction:column; gap:22px">
|
|
149
|
+
${row('ВСЕГО ЗА ГОД', cnt(D.commits, seg(t, 0.2, 1.0)), 'var(--w)', true)}
|
|
150
|
+
${HAS_CLAUDE ? row('С CLAUDE CODE', '×' + cnt(D.commitsClaude, seg(t, 0.4, 1.0)), 'var(--y)', true) : ''}
|
|
151
|
+
${HAS_CLAUDE ? daysRow(DAYS_WITH, 'var(--c)', seg(t, 0.6, 0.9), true) : ''}
|
|
152
|
+
${row('СЕРИЯ ДНЕЙ ПОДРЯД', cnt(D.streak, seg(t, 0.8, 0.8)), 'var(--w)', true)}
|
|
153
|
+
${row('ЧАСЫ РАБОТЫ', '≈' + cnt(D.hours, seg(t, 1.0, 0.9)), 'var(--c)', true)}
|
|
154
|
+
${row('ПРОЕКТЫ', cnt(D.projects, seg(t, 1.2, 0.7)), 'var(--w)', true)}
|
|
155
|
+
${FAV ? row('ЛЮБИМАЯ МОДЕЛЬ', `<span style="font-size:32px">${UP(FAV.name)}</span>`, 'var(--m)', true) : ''}
|
|
156
|
+
</div>
|
|
157
|
+
${stand(560, mascots(13, r, t))}
|
|
158
|
+
<div class="frame" style="text-align:center"><div style="font-size:84px; color:var(--m); text-shadow:6px 6px 0 var(--y)">${r.done ? RANK.toUpperCase() : NAMES_UP[r.step]}</div>
|
|
159
|
+
${placeLine('margin-top:18px; font-size:24px')}</div>
|
|
160
|
+
<div style="font-size:24px; color:var(--y); text-align:center">${coin}</div>
|
|
161
|
+
</div>`;
|
|
162
|
+
}
|
|
163
|
+
return { slides: [null, s1, s2, s3, s4, s5, s6, card], chrome: (t, inner) =>
|
|
164
|
+
`<div class="top"><span>${UP(TITLE)}</span><span>${CARD ? YEAR : SLIDE + '/' + N}</span></div>` + inner +
|
|
165
|
+
(SLIDE > 1 && SLIDE < N ? `<div class="hint" style="${vis(t > DUR[SLIDE] - 1.6 && blink(t, 0.4))}">▶</div>` : '') +
|
|
166
|
+
`<div class="bot"><span>неофициальный фан-проект</span><span>powered by <b>jedicoder.store</b></span></div>` };
|
|
167
|
+
},
|
|
168
|
+
};
|
package/karusel/badge.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// Шаблон «Пропуск на сезон»: бейдж на шнурке. Родная анимация — бейдж качается, голограмма бежит.
|
|
2
|
+
KARUSEL.TEMPLATES.badge = {
|
|
3
|
+
durs: [0, 6, 6, 6.5, 6, 7, 7],
|
|
4
|
+
css: `
|
|
5
|
+
:root, :host { --v:#5B2BE0; --o:#FF6B2C; --y:#FFD400; --i:#F4F1EA; --k:#15130F; --g:#4a463e; }
|
|
6
|
+
html, body { margin:0; background:#000; } * { box-sizing:border-box; }
|
|
7
|
+
#stage { width:1080px; height:1350px; position:relative; overflow:hidden; background:var(--k); font-family:Onest, sans-serif; color:var(--i); }
|
|
8
|
+
.strap { position:absolute; top:-80px; width:120px; height:330px; background:var(--o); }
|
|
9
|
+
.clip { position:absolute; top:96px; left:470px; width:140px; height:78px; border-radius:16px; background:#C9C5BA; }
|
|
10
|
+
.badge { position:absolute; left:56px; right:56px; top:138px; bottom:92px; border-radius:46px; background:var(--v); display:flex; flex-direction:column; overflow:hidden; transform-origin:50% -60px; }
|
|
11
|
+
.slot { align-self:center; width:170px; height:28px; border-radius:14px; background:var(--k); margin-top:30px; flex:none; }
|
|
12
|
+
.hd { display:flex; justify-content:space-between; padding:26px 44px 0; font:700 21px 'Martian Mono', monospace; letter-spacing:.05em; flex:none; }
|
|
13
|
+
.vz { padding:10px 40px 26px; display:flex; flex-direction:column; gap:10px; flex:none; height:430px; justify-content:flex-end; position:relative; }
|
|
14
|
+
.big { font:900 250px/0.8 'Sofia Sans Extra Condensed', sans-serif; text-transform:uppercase; letter-spacing:-.01em; white-space:nowrap; }
|
|
15
|
+
.chip { align-self:flex-start; background:var(--y); color:var(--k); font:800 46px/1 'Sofia Sans Extra Condensed', sans-serif; padding:8px 18px; letter-spacing:.03em; text-transform:uppercase; }
|
|
16
|
+
.holo { height:22px; flex:none; background:linear-gradient(90deg,#ff5fa2,#ffd400,#4dffb8,#4db8ff,#b86bff,#ff5fa2,#ffd400,#4dffb8,#4db8ff,#b86bff,#ff5fa2); background-size:200% 100%; }
|
|
17
|
+
.iz { flex:1; background:var(--i); color:var(--k); padding:34px 44px 30px; display:flex; flex-direction:column; justify-content:space-between; gap:20px; }
|
|
18
|
+
.n { font:800 112px/0.86 'Sofia Sans Extra Condensed', sans-serif; white-space:nowrap; }
|
|
19
|
+
.l { font-size:25px; color:var(--g); margin-top:6px; }
|
|
20
|
+
.g3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
|
|
21
|
+
.bar { height:74px; background:repeating-linear-gradient(90deg,var(--k) 0 5px,transparent 5px 9px,var(--k) 9px 11px,transparent 11px 19px,var(--k) 19px 26px,transparent 26px 31px); }
|
|
22
|
+
.mono { font:400 22px 'Martian Mono', monospace; }
|
|
23
|
+
.ft { position:absolute; left:56px; right:56px; bottom:34px; display:flex; justify-content:space-between; font:400 20px 'Martian Mono', monospace; color:#a8a396; }
|
|
24
|
+
.ft b { color:var(--o); }
|
|
25
|
+
.x { position:relative; display:inline-block; }
|
|
26
|
+
.x i { position:absolute; left:-6px; right:-6px; top:48%; height:10px; background:var(--o); transform-origin:0 50%; }
|
|
27
|
+
`,
|
|
28
|
+
make(k) {
|
|
29
|
+
const { D, LANG, SLIDE, N, CARD, ease, seg, cnt, on, blink, vis, typed, fmt, RANKS, RANK, AGENTS, AGENT_NAME, CLAUDE_DAYS, YEAR, OF_YEAR_DAYS, WEEKMAX, ALT, unit, chose,
|
|
30
|
+
MODELS, FAV, TOP_SHARE, place, CMD, UP, LEAP, trs, rankState, mascotOne, mascots, HAS_CLAUDE, HAS_CODEX, TITLE, CAL_DAYS, ANGRIER, CODEX_LINE } = k;
|
|
31
|
+
const st = (n, l) => `<div><div class="n">${n}</div><div class="l">${l}</div></div>`;
|
|
32
|
+
const zone = (v, i) => `<div class="vz">${v}</div><div class="holo" style="background-position:${-(TT * 90) % 1080}px 0"></div><div class="iz">${i}</div>`;
|
|
33
|
+
let TT = 0;
|
|
34
|
+
const TWO = AGENTS.length > 1;
|
|
35
|
+
// Два агента: маскоты на тёмных плитках (синий Codex на фиолетовом бейдже теряется), у каждого своя строка допуска.
|
|
36
|
+
const tile = (a, k, r, t, w, h) => `<div style="width:${w}px; height:${h}px; background:var(--k); border-radius:24px; display:flex; align-items:flex-end; justify-content:center; padding-bottom:${Math.round(h * 0.08)}px; flex:none">${mascotOne(a, k, r, t).pic}</div>`;
|
|
37
|
+
const cells = (lvl, h, fs) => RANKS.map((n, i) => `<div style="flex:1; text-align:center; padding:${h}px 0; font:800 ${fs}px/1 'Sofia Sans Extra Condensed'; text-transform:uppercase; border:3px solid var(--k); ${i < lvl ? 'background:var(--k); color:var(--i)' : ''}">${n}</div>`).join('');
|
|
38
|
+
const agentRow = (a, r, t) => { const m = mascotOne(a, 3.5, r, t);
|
|
39
|
+
return `<div style="display:grid; grid-template-columns:190px 1fr; gap:26px; align-items:center">${tile(a, 3.5, r, t, 190, 176)}
|
|
40
|
+
<div><div style="display:flex; justify-content:space-between; align-items:baseline; gap:12px"><span class="n" style="font-size:84px; text-transform:uppercase">${RANKS[m.lvl - 1]}</span><span class="mono" style="font-size:21px; white-space:nowrap; text-align:right">${AGENT_NAME[a.id]} · сила ${a.sila}${a.id === 'codex' ? `<br>${CODEX_LINE}` : ''}</span></div>
|
|
41
|
+
<div style="display:flex; gap:5px; margin-top:12px">${cells(m.lvl, 9, 26)}</div></div></div>`; };
|
|
42
|
+
// Место среди участников: плашка под рангом и строка слева внизу; места нет — нет ни той, ни другой.
|
|
43
|
+
const pl = place();
|
|
44
|
+
const placeChip = (style = '') => (pl ? `<div class="chip"${style ? ` style="${style}"` : ''}>${pl.member ?? 'Допуск: ' + pl.top}</div>` : '');
|
|
45
|
+
const getYours = `получи свой: npx ${CMD ?? '[команда]'}`;
|
|
46
|
+
const levels = ANGRIER ? `уровни допуска — ${ANGRIER}` : 'уровни допуска';
|
|
47
|
+
// Один агент: маскот стоит в правом верхнем углу. У Codex слева от него, в свободном углу, — его дни и сессии (TODO(текст): подпись «CODEX» над ними).
|
|
48
|
+
const soloNumbers = !TWO && HAS_CODEX ? `<div class="mono" style="position:absolute; left:40px; top:34px; font-size:24px; line-height:1.5">CODEX<br>${UP(CODEX_LINE)}</div>` : '';
|
|
49
|
+
// Картинка Codex выше клодика и в огне занимает весь свой квадрат: при размере клодика она налезает на шапку бейджа
|
|
50
|
+
// и на название ранга, поэтому на слайде ранга она меньше и стоит ниже.
|
|
51
|
+
const solo = (r, t) => (!AGENTS.length ? '' : HAS_CLAUDE ? `<div style="position:absolute; right:36px; top:-16px">${mascotOne(AGENTS[0], 6.5, r, t).pic}</div>`
|
|
52
|
+
: `<div style="position:absolute; right:36px; top:16px">${mascotOne(AGENTS[0], 5.4, r, t).pic}</div>`);
|
|
53
|
+
// Клетки с числами идут по три в ряд; клеток про Claude Code у человека без него нет.
|
|
54
|
+
const grid = (cells) => { const list = cells.filter(Boolean), out = [];
|
|
55
|
+
for (let i = 0; i < list.length; i += 3) out.push(`<div class="g3">${list.slice(i, i + 3).join('')}</div>`);
|
|
56
|
+
return out.join(''); };
|
|
57
|
+
|
|
58
|
+
function s1(t) {
|
|
59
|
+
// SEASON шире, чем СЕЗОН: рядом с двумя плитками маскотов ему нужен кегль меньше, иначе слово уходит под плитку
|
|
60
|
+
return zone(`<div style="position:absolute; right:44px; top:30px">${TWO ? `<div style="display:flex; gap:16px">${AGENTS.map((a) => tile(a, 3.6, null, t, 196, 190)).join('')}</div>` : mascots(6.5, null, t)}</div>
|
|
61
|
+
<div class="mono" style="font-size:24px">ИТОГИ ГОДА ВАЙБКОДЕРА</div><div class="big" style="font-size:${TWO && LANG === 'en' ? 170 : 196}px"><span>Сезон</span><br>${YEAR}</div>`,
|
|
62
|
+
`<div><div class="n" style="font-size:92px">ПРОПУСК ВАЙБКОДЕРА</div><div class="l">коммиты, дни, часы, модели и ранг — на шести слайдах</div></div>
|
|
63
|
+
<div class="chip" style="${vis(blink(t, 0.6))}">Листай →</div><div class="bar"></div>`);
|
|
64
|
+
}
|
|
65
|
+
function s2(t) {
|
|
66
|
+
const shown = Math.round(53 * seg(t, 2.4, 2.4));
|
|
67
|
+
const bars = D.weeks.map((w, i) => { const h = i < shown ? w[0] / WEEKMAX * 190 : 0, hc = i < shown ? w[1] / WEEKMAX * 190 : 0;
|
|
68
|
+
return `<div style="flex:1; height:190px; display:flex; flex-direction:column; justify-content:flex-end"><div style="height:${h - hc}px; background:var(--k)"></div><div style="height:${hc}px; background:var(--v)"></div></div>`; }).join('');
|
|
69
|
+
return zone(`<div class="mono" style="font-size:24px">ЗА ГОД СДЕЛАНО</div><div class="big">${fmt(cnt(D.commits, seg(t, 0.3, 1.3)))}</div><div class="chip">коммитов</div>`,
|
|
70
|
+
`<div class="g3" style="grid-template-columns:1.3fr 1fr">${HAS_CLAUDE ? `<div style="${vis(on(t, 1.2))}">` + st(fmt(cnt(D.commitsClaude, seg(t, 1.2, 1.1))), 'вместе с Claude Code') + '</div>' : ''}${`<div style="${vis(on(t, 1.9))}">` + st(cnt(D.projects, seg(t, 1.9, 0.7)), unit(D.projects, 'proj')) + '</div>'}</div>
|
|
71
|
+
<div style="${vis(on(t, 2.4))}"><div style="display:flex; gap:3px; align-items:flex-end; height:190px; border-bottom:4px solid var(--k)">${bars}</div>
|
|
72
|
+
<div class="mono" style="margin-top:12px; display:flex; gap:28px"><span>по неделям, январь — декабрь</span>${HAS_CLAUDE ? '<span style="color:var(--v)">■ с Claude Code</span>' : ''}</div></div>`);
|
|
73
|
+
}
|
|
74
|
+
function s3(t) {
|
|
75
|
+
const lit = Math.round(D.cal.length * seg(t, 1.0, 2.8));
|
|
76
|
+
let i = 0, rows = '';
|
|
77
|
+
for (let m = 1; m <= 12; m++) { let cells = '';
|
|
78
|
+
while (i < D.cal.length && D.cal[i][0] === m) { const [, , n, c, cd] = D.cal[i]; cells += `<div style="flex:1; height:17px; background:${i >= lit ? '#DDD8CC' : (c || cd) ? 'var(--v)' : n ? 'var(--k)' : '#DDD8CC'}"></div>`; i++; }
|
|
79
|
+
rows += `<div style="display:flex; gap:3px; width:${m === 2 ? (LEAP ? 93.5 : 90.3) : [4, 6, 9, 11].includes(m) ? 96.8 : 100}%">${cells}</div>`; }
|
|
80
|
+
// Главное число — дни, закрашенные в календаре ниже: с Claude Code, с Codex или, у человека с двумя, с любым агентом.
|
|
81
|
+
// Без агента на его месте серия дней подряд.
|
|
82
|
+
// «из 365» — про дни с агентом; у серии такой плашки нет.
|
|
83
|
+
const top = CAL_DAYS ? ['ДНЕЙ С ' + UP(CAL_DAYS.name), CAL_DAYS.n] : ['СЕРИЯ ДНЕЙ ПОДРЯД', D.streak];
|
|
84
|
+
return zone(`<div class="mono" style="font-size:24px">${top[0]}</div><div class="big">${cnt(top[1], seg(t, 0.3, 1.2))}</div>${CAL_DAYS ? `<div class="chip">${OF_YEAR_DAYS}</div>` : ''}`,
|
|
85
|
+
`<div style="display:flex; flex-direction:column; gap:4px">${rows}</div>
|
|
86
|
+
<div class="g3">${CAL_DAYS ? `<div style="${vis(on(t, 3.6))}">${st(cnt(D.streak, seg(t, 3.6, 0.7)), 'дней подряд')}</div>` : ''}<div style="${vis(on(t, 4.2))}">${st('≈' + fmt(cnt(D.hours, seg(t, 4.2, 0.9))), 'часов работы')}</div>${HAS_CLAUDE ? `<div style="${vis(on(t, 4.8))}">${st('≈' + fmt(cnt(D.hoursClaude, seg(t, 4.8, 0.9))), 'из них с Claude Code')}</div>` : ''}</div>`);
|
|
87
|
+
}
|
|
88
|
+
function s4(t) { // модели года; без моделей — один счёт
|
|
89
|
+
const rows = MODELS.map((m, i) => { const p = ease(seg(t, 1.0 + i * 0.45, 0.8));
|
|
90
|
+
return `<div style="display:grid; grid-template-columns:230px 1fr 110px; gap:18px; align-items:center; ${vis(on(t, 1.0 + i * 0.45))}"><div style="font:800 ${m.other ? 42 : 54}px/1 'Sofia Sans Extra Condensed'">${UP(m.name)}</div>
|
|
91
|
+
<div style="height:36px; background:#DDD8CC"><div style="height:36px; width:${m.share / TOP_SHARE * 100 * p}%; background:${i ? 'var(--k)' : 'var(--v)'}"></div></div>
|
|
92
|
+
<div style="font:800 54px/1 'Sofia Sans Extra Condensed'; text-align:right">${Math.round(m.share * p)}%</div></div>`; }).join('');
|
|
93
|
+
const count = `<div class="l" style="font-size:30px; ${vis(on(t, 3.6))}">за год сменилось моделей: <b>${D.modelCount}</b></div>`;
|
|
94
|
+
if (!FAV) return zone(`<div class="mono" style="font-size:24px">МОДЕЛИ ГОДА</div><div class="big">${cnt(D.modelCount, seg(t, 0.2, 0.7))}</div>`, count);
|
|
95
|
+
return zone(`<div class="mono" style="font-size:24px">ЛЮБИМАЯ МОДЕЛЬ</div><div class="big"${FAV.other ? ' style="font-size:160px"' : ''}>${typed(FAV.name, seg(t, 0.2, 0.7))}</div><div class="chip">${FAV.share}% всего текста</div>`,
|
|
96
|
+
`<div style="display:flex; flex-direction:column; gap:18px">${rows}</div>${count}`);
|
|
97
|
+
}
|
|
98
|
+
function s5(t) {
|
|
99
|
+
const line = (a, verb, n, unit, strike) => `<div style="${vis(on(t, a))}"><div class="l" style="margin:0">${verb}</div><div class="n" style="font-size:80px"><span class="x">${fmt(cnt(n, seg(t, a, 0.8)))}<i style="transform:scaleX(${ease(seg(t, strike, 0.3))})"></i></span> <span style="font-size:56px">${unit}</span></div></div>`;
|
|
100
|
+
return zone(`<div class="mono" style="font-size:24px">ЗА ЭТИ ≈${fmt(D.hours)} ЧАСОВ ТЫ МОГ БЫ…</div><div class="big" style="font-size:190px"><span>Вместо</span><br><span>этого</span></div>`,
|
|
101
|
+
`${line(0.5, 'пробежать', ALT.mar, unit(ALT.mar, 'mar'), 3.9)}${line(1.5, 'сварить', ALT.bor, unit(ALT.bor, 'bor'), 4.1)}${line(2.5, 'выспаться', ALT.sleep, unit(ALT.sleep, 'sleep'), 4.3)}
|
|
102
|
+
<div class="chip" style="font-size:44px; white-space:nowrap; ${vis(on(t, 4.8))}">${typed(trs('но ты выбрал:') + ' ' + chose(), seg(t, 4.8, 1.0))}</div>`);
|
|
103
|
+
}
|
|
104
|
+
function s6(t) {
|
|
105
|
+
const r = rankState(t, 6.5);
|
|
106
|
+
const lv = RANKS.map((n, i) => `<div style="flex:1; text-align:center; padding:12px 0; font:800 34px/1 'Sofia Sans Extra Condensed'; text-transform:uppercase; border:3px solid var(--k); ${i <= r.step ? 'background:var(--k); color:var(--i)' : ''}">${n}</div>`).join('');
|
|
107
|
+
const cta = `<div class="mono" style="display:flex; justify-content:space-between; font-size:24px; ${vis(on(t, 4.4))}"><span>${pl && pl.of ? pl.of : ''}</span><span style="${vis(blink(t, 0.55))}">${getYours}</span></div>`;
|
|
108
|
+
// При 250 px бейдж вмещает название до восьми знаков (ИСКАТЕЛЬ — 867 px из 888); YOUNGLING шире (940) — ему 230.
|
|
109
|
+
if (TWO) return zone(`<div class="mono" style="font-size:24px">РАНГ ЗА ГОД</div><div class="big" style="font-size:${r.done ? (RANK.length > 8 ? 230 : 250) : 200}px">${r.done ? RANK : RANKS[r.step]}</div>${placeChip(vis(r.done))}`,
|
|
110
|
+
`<div class="l" style="margin:0">${levels}</div>${AGENTS.map((a) => agentRow(a, r, t)).join('')}${cta}`);
|
|
111
|
+
return zone(`
|
|
112
|
+
${solo(r, t)}${soloNumbers}
|
|
113
|
+
<div class="mono" style="font-size:24px">РАНГ ЗА ГОД</div><div class="big" style="font-size:${r.done ? 196 : 170}px">${r.done ? RANK : RANKS[r.step]}</div>${placeChip(vis(r.done))}`,
|
|
114
|
+
`<div><div class="l" style="margin:0 0 12px">${levels}</div><div style="display:flex; gap:6px">${lv}</div></div>
|
|
115
|
+
<div class="bar"></div>${cta}`);
|
|
116
|
+
}
|
|
117
|
+
function card(t) { // одиночная карточка 9:16
|
|
118
|
+
const r = rankState(t, 7.5, 0.4, 2.2);
|
|
119
|
+
const lv = RANKS.map((n, i) => `<div style="flex:1; text-align:center; padding:12px 0; font:800 34px/1 'Sofia Sans Extra Condensed'; text-transform:uppercase; border:3px solid var(--k); ${i <= r.step ? 'background:var(--k); color:var(--i)' : ''}">${n}</div>`).join('');
|
|
120
|
+
return `<div class="vz" style="height:640px">
|
|
121
|
+
<div style="position:absolute; right:44px; top:10px">${TWO ? `<div style="display:flex; gap:18px">${AGENTS.map((a) => { const m = mascotOne(a, 4.4, r, t); return `<div style="display:flex; flex-direction:column; gap:10px; align-items:center">${tile(a, 4.4, r, t, 236, 232)}<div class="chip" style="font-size:25px; padding:6px 10px; align-self:center; white-space:nowrap">${AGENT_NAME[a.id]} · ${RANKS[m.lvl - 1]}</div>${a.id === 'codex' ? `<div class="mono" style="font-size:18px; white-space:nowrap; width:236px; display:flex; justify-content:center">${CODEX_LINE}</div>` : ''}</div>`; }).join('')}</div>` : AGENTS.length ? mascotOne(AGENTS[0], 7.5, r, t).pic : ''}</div>${soloNumbers}
|
|
122
|
+
<div class="mono" style="font-size:24px">РАНГ ЗА ГОД</div><div class="big" style="font-size:230px">${r.done ? RANK : RANKS[r.step]}</div>${placeChip()}</div>
|
|
123
|
+
<div class="holo" style="background-position:${-(t * 90) % 1080}px 0"></div>
|
|
124
|
+
<div class="iz">${grid([st(fmt(cnt(D.commits, seg(t, 0.2, 1.0))), unit(D.commits, 'com')), HAS_CLAUDE && st(fmt(cnt(D.commitsClaude, seg(t, 0.4, 1.0))), 'вместе с Claude Code'), st(cnt(D.projects, seg(t, 0.6, 0.7)), unit(D.projects, 'proj')),
|
|
125
|
+
HAS_CLAUDE && st(cnt(CLAUDE_DAYS, seg(t, 0.8, 0.8)), 'дней с Claude Code'), st('≈' + fmt(cnt(D.hours, seg(t, 1.0, 0.9))), 'часов работы'), st(cnt(D.streak, seg(t, 1.2, 0.7)), 'дней подряд')])}
|
|
126
|
+
${FAV ? `<div style="display:flex; justify-content:space-between; align-items:baseline; border-top:4px solid var(--k); padding-top:18px"><span class="l" style="font-size:28px; margin:0">ЛЮБИМАЯ МОДЕЛЬ</span><span class="n" style="font-size:84px">${UP(FAV.name)}</span></div>` : ''}
|
|
127
|
+
${TWO ? `<div style="display:flex; flex-direction:column; gap:10px"><div class="l" style="margin:0">${levels}</div>${AGENTS.map((a) => `<div style="display:grid; grid-template-columns:190px 1fr; gap:14px; align-items:center"><span class="mono" style="font-size:20px">${AGENT_NAME[a.id]}</span><div style="display:flex; gap:5px">${cells(Math.min(a.level, r.step + 1), 8, 24)}</div></div>`).join('')}</div>`
|
|
128
|
+
: `<div><div class="l" style="margin:0 0 12px">${levels}</div><div style="display:flex; gap:6px">${lv}</div></div>`}
|
|
129
|
+
<div class="bar"></div><div class="mono" style="display:flex; justify-content:space-between; font-size:24px"><span>${pl && pl.of ? pl.of : ''}</span><span>${getYours}</span></div></div>`;
|
|
130
|
+
}
|
|
131
|
+
const SL = [null, s1, s2, s3, s4, s5, s6, card].map((f) => f && ((t) => { TT = t; return f(t); }));
|
|
132
|
+
return { slides: SL, chrome: (t, inner) => {
|
|
133
|
+
const sw = 2.6 * Math.exp(-1.6 * t) * Math.cos(5 * t);
|
|
134
|
+
return `<div class="strap" style="left:330px; transform:rotate(15deg)"></div><div class="strap" style="right:330px; transform:rotate(-15deg)"></div><div class="clip"></div>
|
|
135
|
+
<div class="badge" style="transform:rotate(${sw}deg)"><div class="slot"></div><div class="hd"><span>${UP(TITLE)}</span><span>СЕЗОН ${YEAR}${CARD ? '' : ' · ' + SLIDE + '/' + N}</span></div>${inner}</div>
|
|
136
|
+
<div class="ft"><span>неофициальный фан-проект</span><span>powered by <b>jedicoder.store</b></span></div>`;
|
|
137
|
+
} };
|
|
138
|
+
},
|
|
139
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|