mewith 0.0.0-stage → 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 (66) hide show
  1. package/LICENSE +24 -0
  2. package/cli/bin/cli.js +9 -0
  3. package/cli/package.json +10 -0
  4. package/cli/src/ask.js +45 -0
  5. package/cli/src/claude.js +88 -0
  6. package/cli/src/clawd.js +120 -0
  7. package/cli/src/codex-notes.js +16 -0
  8. package/cli/src/codex.js +100 -0
  9. package/cli/src/collect.js +174 -0
  10. package/cli/src/git.js +95 -0
  11. package/cli/src/homes.js +140 -0
  12. package/cli/src/jsonl.js +29 -0
  13. package/cli/src/lang.js +34 -0
  14. package/cli/src/main.js +157 -0
  15. package/cli/src/page.html +279 -0
  16. package/cli/src/page.js +165 -0
  17. package/cli/src/pickup.js +99 -0
  18. package/cli/src/repos.js +203 -0
  19. package/cli/src/search.js +52 -0
  20. package/cli/src/shoot.js +339 -0
  21. package/cli/src/slovechki.js +36 -0
  22. package/cli/src/submit.js +325 -0
  23. package/cli/src/terminal.js +108 -0
  24. package/cli/src/texts.js +140 -0
  25. package/cli/src/time.js +18 -0
  26. package/karusel/arcade.js +168 -0
  27. package/karusel/badge.js +139 -0
  28. package/karusel/codex/1.png +0 -0
  29. package/karusel/codex/2.png +0 -0
  30. package/karusel/codex/3.png +0 -0
  31. package/karusel/codex/4.png +0 -0
  32. package/karusel/codex/5.png +0 -0
  33. package/karusel/codex/6.png +0 -0
  34. package/karusel/common.js +261 -0
  35. package/karusel/fonts/OFL-martianmono.txt +93 -0
  36. package/karusel/fonts/OFL-onest.txt +93 -0
  37. package/karusel/fonts/OFL-pixelifysans.txt +93 -0
  38. package/karusel/fonts/OFL-pressstart2p.txt +93 -0
  39. package/karusel/fonts/OFL-shantellsans.txt +93 -0
  40. package/karusel/fonts/OFL-sofiasansextracondensed.txt +93 -0
  41. package/karusel/fonts/fonts.css +25 -0
  42. package/karusel/fonts/martianmono-cyrillic.woff2 +0 -0
  43. package/karusel/fonts/martianmono-latin.woff2 +0 -0
  44. package/karusel/fonts/onest-cyrillic.woff2 +0 -0
  45. package/karusel/fonts/onest-latin.woff2 +0 -0
  46. package/karusel/fonts/pixelifysans-cyrillic.woff2 +0 -0
  47. package/karusel/fonts/pixelifysans-latin.woff2 +0 -0
  48. package/karusel/fonts/pressstart2p-cyrillic.woff2 +0 -0
  49. package/karusel/fonts/pressstart2p-latin.woff2 +0 -0
  50. package/karusel/fonts/shantellsans-cyrillic.woff2 +0 -0
  51. package/karusel/fonts/shantellsans-latin.woff2 +0 -0
  52. package/karusel/fonts/sofiasansextracondensed-cyrillic.woff2 +0 -0
  53. package/karusel/fonts/sofiasansextracondensed-latin.woff2 +0 -0
  54. package/karusel/index.js +33 -0
  55. package/karusel/sheet.js +106 -0
  56. package/karusel/sprites.js +2 -0
  57. package/karusel/teletext.js +110 -0
  58. package/package.json +13 -4
  59. package/shared/config.json +8 -0
  60. package/shared/details.js +54 -0
  61. package/shared/limits.js +167 -0
  62. package/shared/models.js +15 -0
  63. package/shared/season.js +13 -0
  64. package/shared/shoot.js +105 -0
  65. package/shared/sila.js +35 -0
  66. package/README.md +0 -3
@@ -0,0 +1,93 @@
1
+ Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P".
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Shantell Sans Project Authors (https://github.com/arrowtype/shantell-sans)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2019 The Sofia Sans Project Authors (https://github.com/lettersoup/Sofia-Sans)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,25 @@
1
+ /* Шрифты шаблонов. Собирает fetch.mjs, руками не править. Лицензии — OFL-<семейство>.txt рядом. */
2
+ @font-face { font-family:'Martian Mono'; font-style:normal; font-weight:400 700; font-stretch:100%; font-display:block;
3
+ src:url(martianmono-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
4
+ @font-face { font-family:'Martian Mono'; font-style:normal; font-weight:400 700; font-stretch:100%; font-display:block;
5
+ src:url(martianmono-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
6
+ @font-face { font-family:'Onest'; font-style:normal; font-weight:400 600; font-display:block;
7
+ src:url(onest-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
8
+ @font-face { font-family:'Onest'; font-style:normal; font-weight:400 600; font-display:block;
9
+ src:url(onest-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
10
+ @font-face { font-family:'Pixelify Sans'; font-style:normal; font-weight:500 700; font-display:block;
11
+ src:url(pixelifysans-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
12
+ @font-face { font-family:'Pixelify Sans'; font-style:normal; font-weight:500 700; font-display:block;
13
+ src:url(pixelifysans-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
14
+ @font-face { font-family:'Press Start 2P'; font-style:normal; font-weight:400; font-display:block;
15
+ src:url(pressstart2p-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
16
+ @font-face { font-family:'Press Start 2P'; font-style:normal; font-weight:400; font-display:block;
17
+ src:url(pressstart2p-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
18
+ @font-face { font-family:'Shantell Sans'; font-style:normal; font-weight:500 800; font-display:block;
19
+ src:url(shantellsans-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
20
+ @font-face { font-family:'Shantell Sans'; font-style:normal; font-weight:500 800; font-display:block;
21
+ src:url(shantellsans-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
22
+ @font-face { font-family:'Sofia Sans Extra Condensed'; font-style:normal; font-weight:600 900; font-display:block;
23
+ src:url(sofiasansextracondensed-cyrillic.woff2) format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
24
+ @font-face { font-family:'Sofia Sans Extra Condensed'; font-style:normal; font-weight:600 900; font-display:block;
25
+ src:url(sofiasansextracondensed-latin.woff2) format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
Binary file
@@ -0,0 +1,33 @@
1
+ // Шаблоны для Node: те же сценарии, что грузит браузер, плюс то, что им нужно с диска. Отсюда берут кадры проверки,
2
+ // сборка страницы года (cli/src/page.js) и сайт.
3
+ import { readFileSync } from 'node:fs';
4
+ import './common.js';
5
+ import './arcade.js';
6
+ import './badge.js';
7
+ import './teletext.js';
8
+ import './sheet.js';
9
+
10
+ const K = globalThis.KARUSEL;
11
+ const read = (name) => readFileSync(new URL(name, import.meta.url), 'utf8');
12
+ /** Значение из файла вида `window.ИМЯ = {…};` — такие файлы браузер грузит тегом <script>. */
13
+ const assigned = (name) => { const s = read(name); return JSON.parse(s.slice(s.indexOf('{'), s.lastIndexOf('}') + 1)); };
14
+
15
+ /** Шаблоны по порядку показа. */
16
+ export const TEMPLATES = Object.keys(K.TEMPLATES);
17
+ /** Кадры: шесть слайдов карусели и карточка. */
18
+ export const SLIDES = [1, 2, 3, 4, 5, 6], CARD = K.CARD_SLIDE;
19
+ /** Сценарии шаблонов в порядке загрузки в браузере — имена файлов этой папки. */
20
+ export const SCRIPTS = ['common.js', ...TEMPLATES.map((name) => `${name}.js`)];
21
+
22
+ let sprites;
23
+ /** Клодик: шесть ступеней злости и кадры пламени (sprites.js). */
24
+ export const clawd = () => (sprites ??= assigned('sprites.js'));
25
+ /** Вымышленные данные года для показа и проверок. */
26
+ export const exampleData = () => assigned('data.example.js');
27
+
28
+ /** Сцена: { data, template, lang, slide, codex?, command? } → { width, height, duration, at(t) → разметка кадра }. */
29
+ export const scene = (o) => K.scene({ sprites: clawd(), ...o });
30
+ /** Данные года, шаблон, язык, кадр, время → разметка кадра; без t — последний кадр. */
31
+ export const frame = (o) => K.frame({ sprites: clawd(), ...o });
32
+ /** Заголовок по агентам участника, как в шапке кадра: (данные года, язык) → строка. */
33
+ export const title = (data, lang) => K.title(data, lang);
@@ -0,0 +1,106 @@
1
+ // Шаблон «Лист персонажа»: бумажки на листе. Родная анимация — бумажки шлёпаются на лист и «дышат».
2
+ KARUSEL.TEMPLATES.sheet = {
3
+ durs: [0, 6, 6, 6.5, 6, 7, 7],
4
+ css: `
5
+ :root, :host { --o:#FF5E3A; --v:#7B4DFF; --g:#19D3A2; --y:#FFE14D; --k:#111111; --r:#E0203A; }
6
+ html, body { margin:0; background:#000; } * { box-sizing:border-box; }
7
+ #stage { width:1080px; height:1350px; position:relative; overflow:hidden; background:var(--y); color:var(--k); font-family:'Shantell Sans', cursive;
8
+ background-image:radial-gradient(var(--k) 4px, transparent 4.6px), radial-gradient(var(--o) 4px, transparent 4.6px); background-size:52px 52px; background-position:0 0, 26px 26px; }
9
+ .col { position:absolute; left:52px; right:52px; top:48px; bottom:118px; display:flex; flex-direction:column; justify-content:space-between; gap:24px; }
10
+ .p { background:#fff; border:7px solid var(--k); box-shadow:13px 13px 0 var(--k); padding:22px 28px; }
11
+ h1 { margin:0; font:800 84px/1 'Shantell Sans'; }
12
+ .mono { font:400 22px 'Martian Mono', monospace; }
13
+ .n { font:800 78px/1 'Shantell Sans'; white-space:nowrap; }
14
+ .l { font:400 21px 'Martian Mono', monospace; margin-top:4px; }
15
+ .sw { height:120px; border:6px solid var(--k); }
16
+ .g3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
17
+ .note { align-self:flex-end; background:#fff; border:7px solid var(--k); padding:14px 22px; font:800 48px/1.05 'Shantell Sans'; color:var(--r); text-decoration:underline double; }
18
+ .ft { position:absolute; left:52px; right:52px; bottom:40px; background:#fff; border:6px solid var(--k); padding:12px 20px; display:flex; justify-content:space-between; font:700 21px 'Martian Mono', monospace; }
19
+ .ft b { color:var(--r); }
20
+ .x { position:relative; display:inline-block; }
21
+ .x i { position:absolute; left:-8px; right:-8px; top:50%; height:10px; background:var(--r); transform-origin:0 50%; border-radius:5px; }
22
+ `,
23
+ make(k) {
24
+ const { D, SLIDE, N, CARD, ease, seg, cnt, on, blink, vis, typed, fmt, RANKS, RANK, YEAR, WEEKMAX, ALT, unit, chose, MODELS, FAV, TOP_SHARE, place, CMD, trs, rankState, mascots,
25
+ AGENTS, HAS_CLAUDE, TITLE, DAYS_WITH, CAL_DAYS, ANGRIER, ladderPic } = k;
26
+ // бумажка шлёпается на лист и потом чуть «дышит», как нарисованная от руки
27
+ const P = (t, at, rot, html, style = '', cls = 'p') => { const p = ease(seg(t, at, 0.28)), boil = Math.sin(Math.floor(t * 5) * 12.9898 + at * 7 + rot) * 0.35;
28
+ return `<div class="${cls}" style="${vis(t >= at)}; transform:rotate(${rot + boil}deg) scale(${1 + 0.3 * (1 - p)}); ${style}">${html}</div>`; };
29
+ const SW = (t, at, color, n, label) => `<div style="${vis(t >= at)}"><div class="sw" style="background:${color}"></div><div class="n" style="margin-top:8px">${n}</div><div class="l">${label}</div></div>`;
30
+ const title = (t, text, sub) => P(t, 0, -1, `<h1>${text}</h1><div class="mono" style="margin-top:8px">${sub}</div>`);
31
+ const SHEET = 'лист персонажа · вайбкодер · ' + YEAR;
32
+ // «класс» подписывает ранг; место среди участников — следом, а без места остаётся одна подпись
33
+ const pl = place(), klass = pl ? (pl.member ? `класс<br>${pl.member}` : `класс · ${pl.top}<br>${pl.of}`) : 'класс';
34
+ const getYours = `получи свой: npx ${CMD ?? '[команда]'}`;
35
+ // Тёмная бумажка с маскотами есть, только когда есть кого показать; лесенка рангов над ними — из клодиков, а у человека без Claude Code — из маскотов Codex.
36
+ const small = (r) => RANKS.map((n, i) => `<div style="flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; ${vis(i <= r.step)}; opacity:${i === r.step || r.done ? 1 : 0.55}">${ladderPic(i, 3.1, i <= r.step)}<div style="font:700 17px 'Martian Mono'; color:#fff">${n}</div></div>`).join('');
37
+ const stage = (t, at, r, k, pad) => (AGENTS.length ? P(t, at, 1, `<div style="display:flex; align-items:flex-end; gap:4px">${small(r)}</div>
38
+ <div style="display:flex; justify-content:center; padding:${pad}">${mascots(k, r, t)}</div>`, 'background:#15130F; position:relative; overflow:hidden') : '');
39
+ const daysWith = DAYS_WITH ? `дней с ${DAYS_WITH.name}` : null;
40
+ // Заголовок с двумя агентами длиннее: кегль меньше, чтобы он и по-английски занимал две строки, а не три.
41
+ const head = (size) => `<h1 style="font-size:${AGENTS.length > 1 ? Math.round(size * 0.84) : size}px">${TITLE}</h1><div class="mono" style="margin-top:8px">${SHEET}</div>`;
42
+
43
+ function s1(t) { // обложка: вся с первого кадра
44
+ // «масть: коммит-рыжий» — про клодика; у синего маскота Codex остаётся только «вид спереди» (TODO(текст): обрезанная строка)
45
+ return P(t, -1, -1, head(92)) +
46
+ (AGENTS.length ? P(t, -1, 1, `<div style="display:flex; justify-content:center; padding:44px 0 30px">${mascots(12, null, t)}</div><div class="mono" style="color:#fff; text-align:center">${HAS_CLAUDE ? 'вид спереди · масть: коммит-рыжий' : 'вид спереди'}</div>`, 'background:#15130F') : '') +
47
+ P(t, -1, -3, 'НЕ ВОРОВАТЬ!!! (мои коммиты)', '', 'note') +
48
+ `<div style="font:800 44px 'Shantell Sans'; background:#fff; border:6px solid var(--k); padding:6px 20px; align-self:flex-start; ${vis(blink(t, 0.6))}">листай →</div>`;
49
+ }
50
+ function s2(t) {
51
+ const shown = Math.round(53 * seg(t, 2.6, 2.2));
52
+ const bars = D.weeks.map((w, i) => { const h = i < shown ? w[0] / WEEKMAX * 300 : 0, hc = i < shown ? w[1] / WEEKMAX * 300 : 0;
53
+ return `<div style="flex:1; height:300px; display:flex; flex-direction:column; justify-content:flex-end"><div style="height:${h - hc}px; background:var(--g); ${h - hc > 3 ? 'border:2px solid var(--k); border-bottom:0' : ''}"></div><div style="height:${hc}px; background:var(--v); ${hc > 3 ? 'border:2px solid var(--k)' : ''}"></div></div>`; }).join('');
54
+ return title(t, 'Коммиты', 'палитра года · образцы с подписями') +
55
+ P(t, 0.5, 1, `<div class="g3">${SW(t, 0.5, 'var(--o)', fmt(cnt(D.commits, seg(t, 0.5, 1.1))), 'всего за год')}${HAS_CLAUDE ? SW(t, 1.2, 'var(--v)', fmt(cnt(D.commitsClaude, seg(t, 1.2, 1.1))), 'с Claude Code') : ''}${SW(t, 1.9, 'var(--g)', cnt(D.projects, seg(t, 1.9, 0.7)), unit(D.projects, 'proj'))}</div>`) +
56
+ P(t, 2.6, -1, `<div style="display:flex; gap:3px; align-items:flex-end; height:300px; border-bottom:6px solid var(--k)">${bars}</div><div class="mono" style="margin-top:12px; display:flex; justify-content:space-between"><span>по неделям, январь — декабрь</span>${HAS_CLAUDE ? '<span><b style="color:var(--v)">■</b> с Claude Code <b style="color:var(--g)">■</b> без</span>' : ''}</div>`);
57
+ }
58
+ function s3(t) {
59
+ const lit = Math.round(D.cal.length * seg(t, 0.6, 2.6));
60
+ let i = 0, rows = '';
61
+ for (let m = 1; m <= 12; m++) { let cells = '';
62
+ while (i < D.cal.length && D.cal[i][0] === m) { const [, , n, c, cd] = D.cal[i]; cells += `<div style="width:25px; height:25px; border:2px solid var(--k); background:${i >= lit ? '#fff' : (c || cd) ? 'var(--v)' : n ? 'var(--g)' : '#fff'}"></div>`; i++; }
63
+ rows += `<div style="display:flex; gap:3px">${cells}</div>`; }
64
+ return title(t, 'Дни и часы', CAL_DAYS ? `каждая клетка — день · фиолетовая — с ${CAL_DAYS.name}` : 'каждая клетка — день') +
65
+ P(t, 0.5, 1, `<div style="display:flex; flex-direction:column; gap:3px">${rows}</div>`) +
66
+ P(t, 3.2, -1, `<div class="g3">${CAL_DAYS ? `<div style="${vis(on(t, 3.2))}"><div class="n">${cnt(CAL_DAYS.n, seg(t, 3.2, 0.8))}</div><div class="l">дней с ${CAL_DAYS.name}</div></div>` : ''}<div style="${vis(on(t, 3.8))}"><div class="n">${cnt(D.streak, seg(t, 3.8, 0.7))}</div><div class="l">дней подряд</div></div><div style="${vis(on(t, 4.4))}"><div class="n">≈${fmt(cnt(D.hours, seg(t, 4.4, 0.8)))}</div><div class="l">часов работы</div></div></div>`);
67
+ }
68
+ function s4(t) { // модели года; без моделей остаётся бумажка со счётом
69
+ const COL = ['var(--o)', 'var(--v)', 'var(--g)', 'var(--y)', 'var(--k)'];
70
+ const rows = MODELS.map((m, i) => { const a = 0.6 + i * 0.45, p = ease(seg(t, a, 0.8));
71
+ return `<div style="display:grid; grid-template-columns:240px 1fr 120px; gap:16px; align-items:center; ${vis(on(t, a))}"><div style="font:800 46px/1 'Shantell Sans'">${m.name}</div>
72
+ <div style="height:48px; border:5px solid var(--k); background:#fff"><div style="height:100%; width:${m.share / TOP_SHARE * 100 * p}%; background:${COL[i % COL.length]}; border-right:5px solid var(--k)"></div></div><div style="font:800 46px/1 'Shantell Sans'; text-align:right">${Math.round(m.share * p)}%</div></div>`; }).join('');
73
+ return title(t, 'Модели года', 'кто писал с тобой этот год') +
74
+ (FAV ? P(t, 0.5, 1, `<div style="display:flex; flex-direction:column; gap:22px">${rows}</div>`) +
75
+ P(t, 3.6, -3, `${trs('любимая:')} ${typed(FAV.name, seg(t, 3.6, 0.6))}!!!`, '', 'note') : '') +
76
+ P(t, 4.6, 1, `<div class="mono" style="font-size:26px">всего моделей за год: <b style="font:800 44px 'Shantell Sans'">${D.modelCount}</b></div>`);
77
+ }
78
+ function s5(t) {
79
+ const line = (a, verb, n, unit, strike, rot) => P(t, a, rot, `<div class="mono">${verb}</div><div class="n"><span class="x">${fmt(cnt(n, seg(t, a, 0.8)))}<i style="transform:scaleX(${ease(seg(t, strike, 0.3))}) rotate(-2deg)"></i></span> <span style="font-size:56px">${unit}</span></div>`);
80
+ return title(t, 'Вместо этого', `за эти ≈${fmt(D.hours)} часов ты мог бы…`) +
81
+ line(0.6, 'пробежать', ALT.mar, unit(ALT.mar, 'mar'), 3.9, 1) + line(1.5, 'сварить', ALT.bor, unit(ALT.bor, 'bor'), 4.1, -1) + line(2.4, 'выспаться', ALT.sleep, unit(ALT.sleep, 'sleep'), 4.3, 1) +
82
+ P(t, 4.8, -2, `${trs('но ты выбрал:')} ${typed(chose(), seg(t, 4.8, 1.0))}`, 'align-self:stretch; text-decoration:none', 'note');
83
+ }
84
+ function s6(t) {
85
+ const r = rankState(t, 9);
86
+ return title(t, 'Ранг за год', ANGRIER) + stage(t, 0.3, r, 9, '26px 0 8px') +
87
+ P(t, 3.6, -1, `<div style="display:flex; justify-content:space-between; align-items:center"><div style="font:800 110px/1 'Shantell Sans'">${RANK}</div><div style="font:800 34px/1.2 'Shantell Sans'; text-align:right">${klass}</div></div>`, 'background:var(--v); color:#fff') +
88
+ `<div class="mono" style="font-size:26px; background:#fff; border:6px solid var(--k); padding:10px 18px; align-self:flex-start; ${vis(on(t, 4.6) && blink(t, 0.55))}">${getYours}</div>`;
89
+ }
90
+ function card(t) { // одиночная карточка 9:16
91
+ const r = rankState(t, 10, 0.4, 2.2);
92
+ const sw = (color, n, label) => `<div><div class="sw" style="background:${color}; height:86px"></div><div class="n" style="margin-top:8px; font-size:70px">${n}</div><div class="l">${label}</div></div>`;
93
+ // образцы идут по три в ряд; образцов про Claude Code у человека без него нет
94
+ const swatches = [sw('var(--o)', fmt(cnt(D.commits, seg(t, 0.2, 1.0))), 'всего за год'), HAS_CLAUDE && sw('var(--v)', fmt(cnt(D.commitsClaude, seg(t, 0.4, 1.0))), 'с Claude Code'),
95
+ sw('var(--g)', cnt(D.projects, seg(t, 0.6, 0.7)), unit(D.projects, 'proj')), HAS_CLAUDE && sw('var(--y)', cnt(DAYS_WITH.n, seg(t, 0.8, 0.8)), daysWith),
96
+ sw('var(--k)', cnt(D.streak, seg(t, 1.0, 0.7)), 'дней подряд'), sw('#fff', '≈' + fmt(cnt(D.hours, seg(t, 1.2, 0.9))), 'часов работы')].filter(Boolean);
97
+ return P(t, -1, -1, head(88)) + stage(t, -1, r, 10, '30px 0 10px') +
98
+ P(t, -1, -1, `<div style="display:flex; justify-content:space-between; align-items:center"><div style="font:800 116px/1 'Shantell Sans'">${r.done ? RANK : RANKS[r.step]}</div><div style="font:800 34px/1.2 'Shantell Sans'; text-align:right">${klass}</div></div>`, 'background:var(--v); color:#fff') +
99
+ P(t, -1, 1, `<div class="g3">${swatches.slice(0, 3).join('')}</div>${swatches.length > 3 ? `<div class="g3" style="margin-top:18px">${swatches.slice(3).join('')}</div>` : ''}`) +
100
+ P(t, -1, -3, 'НЕ ВОРОВАТЬ!!! (мои коммиты)', '', 'note') +
101
+ `<div class="mono" style="font-size:26px; background:#fff; border:6px solid var(--k); padding:10px 18px; align-self:flex-start">${getYours}</div>`;
102
+ }
103
+ return { slides: [null, s1, s2, s3, s4, s5, s6, card], chrome: (t, inner) =>
104
+ `<div class="col">${inner}</div><div class="ft"><span>неофициальный фан-проект${CARD ? '' : ' · ' + SLIDE + '/' + N}</span><span>powered by <b>jedicoder.store</b></span></div>` };
105
+ },
106
+ };
@@ -0,0 +1,2 @@
1
+ // клодик, шесть ступеней злости и кадры пламени; собирает tools/clawd_zlost.py
2
+ window.SPRITES = {"1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAAfUlEQVR4nO3WwQnAIAyFYdttOoRzOIozdAgH6BhO4Tj2VChCCdJqCP2/m4dAHsGocwAAAICWpbegxFBHNHLZ9qOrp3VUI7MQQNvrAD5l51OeVtdiAtrMBxB37ui9L5HeBfMTIIA2/kLaCGBWiaHe70N7/rruifkJEAAA/u0EaQonsGSefV0AAAAASUVORK5CYII=", "2": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAAfUlEQVR4nO3WwQnAIAyFYdttOoRzOIozdAgH6BhO4Tj2VChCCdJqCP2/m4dAHsGocwAAAICWpbegxFBHNHLZ9qOrp3VUI7MQQBsBtL0O4FN2PuVpdS3zExB37ui9L5HeBfMTIIA2/kLaCGBWiaHe70N7/rruifkJEAAA/u0EuZwnsHLzJ+4AAAAASUVORK5CYII=", "3": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAA3klEQVR4nO3WwQ2CMBQG4KdxAxOPHlyABboBa/TEQB4a1nADFmABDh56MHGDJnhQEkKq9eWVlKb/d4JD4f9pCxABAEDJdqkD+Dwf93E6Pp7OPzPu14/DMw/vO1/aXAGuzRVYLpnQEoKYQuvdhz09Q1Ozb8Jxud5YmTa3B7jKLtB2vTiA9BqiAlpVogBt15NWlSQCHUSjichYR/Qp8W+YqbSxjrTw/lH2gLGO9SS1qt7FI8h+EwffuWu/90NC34XsZwAFUsO/UGookK2hqcf5fliexx73TfYzgAIAAGV7AT19S17r/K3LAAAAAElFTkSuQmCC", "4": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAA/UlEQVR4nO2XOw6DMAyGTdVbVGLowkhnOvUQnILzdOEKPQRTO7djF4ZKcAqkdIoUIaIY7Aas+ptIlMfv2I4DgKIo0THnk5n6XsKOLmdd9jE385227U/uzySmHoWDqC5zQ8iGy1Tf5tFbSNkQwaTpysIAABxuj8Rt/4rxPrbtQ3wOkAy4vj9kAdQ1yB6gCOA4AHTh8MW+K6LKUtRamDmh2LeQPVD3wypzLSyv0bof4HU5osdXWQp503JsLf8Wmv14ilUHsIj3gHgD2H8pQ8k5J9kxsBqQN21QIGbMHFhDCCOM2wPic0C8AYvpysK4NWHc5p7nQ7wH1ABFUZT/5gub4GWkvUcAegAAAABJRU5ErkJggg==", "5": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAABB0lEQVR4nO2VwQqCQBCGR+ksaNCxYwd7CF/Kx+gJepteQahDIEiHDkEGnQM7Kcuww47OaonznXaXWfefnX9cAEVRFEVRFEX5FYEroM7SBgAgOV0Ccz4W+Jx2ThGOKWYKRAkcXm+xAOk3xBWQCPBxAZ2/no9bAwCw3mytnqO8b4rI44h1KGcP5X2sMzQX8ZjD8f7pEy7aa9O5cgVSFcFCrvuELSSPI9ida1as60KtCXBET4WpxZYMuwdapnoHKLDOrgLSW+daoqWP5UywTq8PWVUWUJWFc+yTZb/E/0Bv31NN7KsHXE2Msf5GhzC0KaXM3kKDqbO0Me2E5773Ucy+ApqAoijKsvkCcZqKBkr3C20AAAAASUVORK5CYII=", "6": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAABvklEQVR4nO2YsW7CMBCGL1EnulXtUiGxsqKKZ+jEC/W1OvEKVCgSUxckInUjK50quUuNHPscn+8uaVPlmzDx3fm/O9sBgIl/iKk3ZqhY5W8G14gXCCgWr4XEIQAAVLXYBZVAQA5d2fOfRecKxYoEYHBaQmIjExDL3q4Jn1U1vSoEbKuXXEfWJrDNbQlMbAYlgNLGRQhEIlVJ2aYgtxCaaS97rTm7pu3AG2u1E2sPdAZ3F2rFxURiNnYOUh3MliTAOkxmKRXUF+eNU1XBWp13CrnBf9qI3ALMRMRIbt7Lcm4AAG7fPwp33Bd+HDuOwb4HFs0X11TVl+gi0xAh9XEVkHuM1fc34gVYW+uLA/kCw3p/tl3Bw9PbdUxdiCv6vF/D53MVzEn1vkX8Mnfer9GFxfAXz8HtFn7tHGJZxLBVmm1X7HjufaD+Oj002S9xQ90DVFRaCCD/NJKcPC6qLXQ6HuB0PCQ/a9ISMPQ/Ehq0BPT1w6ZP1Dax1h5IbWJTb4yb6NGfQqO/B9hclnPjVsMfa9vFGH0FJgGj4OXxDu3R2Pfuc8ocjm8ymKPUwvznXKFqIqh0CZNU408xikVOZPANFyBAgbciXpoAAAAASUVORK5CYII=", "6b": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAABx0lEQVR4nO2XsW7CMBCGL6gT3ap2qZBYWVHFM3TKC/W1OvEKqRASUxckLHUjK0yV3KVOHefs3NmXgCu+BRzblzvff5cE4L+hVamHXH91XDqASbKFrSIvHSJYcgCXPmkX4096BgLGO2yV2EEU8/cC4DcAklFEKlqVGqoa3T9WxiYAf9GIEaoLRs1QIEkoJInWLzZn26hqnncE6DXgkYohdg6b963HrtMC4LZK7KSNjYQsYFLndSGri7Qcrepuh7EdxeTksYutD9EbALvDWDenyIoqHx+0DGCnSSjclkOIjdCpUwPpbZ+nxUwDANx/fhX2eCjc+5ixjyYD3NTN6+8Y/8RtNQHEPMwkgki1Ef0upB7vkh0we40tKrZayKeOaX+6XsLTy0czpjpiB33crOD8uu2s6dO+Iflt9LhZoY75cJ1PhZc7D75TxDBZmq6XErce5ntgTNidZ6znAJWWhLQqdey3AbcbcTuPj5aEUj9sDvsdHPa73v+SZFcD7htDdgG4KhErYqkaSCriFKSKkkt2EhLjtJhpW07uWHqfj+wzcAsgC96eH1CN+q7b85Q1MbbJYIb6HHPnYwMVC4JKKLCUbFwVWTh5g8EPsrNAb/sdFroAAAAASUVORK5CYII=", "6c": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAB0ElEQVR4nO2YsWrDMBCGzyZTupV2KQGvmQqm5Bk6+YX6Jn2LQqe8QooxZOoSiKBbvKZTQV2iVJYl63SnuBH4myJbOv0n/SfbAZiwI0Ulx5gnH2OSSxBtgVyB5NsjeYIQcTl2gBSVHMsWIeQAAFnxnmEH9JJoRGRJYTHxNdCIMLGbFt+XQXgRN8JruaH7HBvaxvJPoYGVpoiVopKumDar4xPYtH9iT1ZSAoPqInLNoBLoCAzx9sluzqPWdt1YHB88C6nV9AhVhFoK03+GimRuu8/3rzVurHEgdDzeCICy8Eo77wD7IWU7Zs1EPf7vFTCiXrwPsONyIQEAbj6/Mr19Kcx5VNsFuQaK9oc6lB1LdwuriGMkQYmh1wo5AXE3IwtQqLEqFgX0S5zN+/N1CfdPH+c2Voie9KFewfdz0+vj876C/SpxqFdWYS5M8Vzoe6fhWkUbapfm6zLG1N0duMYPFh/oGlCM9RzAEsVCAOGnEfXkkaKSUY5RG/vdFva7rfc3B/ObINm/VRTJJxCtiGPVwL8VMed1gEPyFiJzXC6kbiezHXuci+R3YEogCV4ebq0edV3X72P6UGKjsQXyCTPvUxONlgSWocQ4u3FVJCFyIoBfynYsS+RhaRoAAAAASUVORK5CYII="};
@@ -0,0 +1,110 @@
1
+ // Шаблон «Телетекст»: страница с номером года. Родная анимация — страница рисуется сверху вниз, часы идут, REVEAL.
2
+ KARUSEL.TEMPLATES.teletext = {
3
+ durs: [0, 6, 6, 6.5, 6, 7, 7],
4
+ css: `
5
+ /* решётка телетекста 40 × 24: клетка 27 × 56,25 px, шрифт моноширинный, знак ровно в клетку */
6
+ html, body { margin:0; background:#000; } * { box-sizing:border-box; }
7
+ #stage { width:1080px; height:1350px; position:relative; overflow:hidden; background:#000; font:400 27px/1 'Press Start 2P', monospace; color:#fff; }
8
+ .t { position:absolute; white-space:pre; transform-origin:0 0; transform:scaleY(1.7); }
9
+ .d { transform:scaleY(3.55); }
10
+ .b { position:absolute; }
11
+ `,
12
+ make(k) {
13
+ const { D, LANG, SLIDE, N, CARD, ease, seg, cnt, on, blink, typed, RANKS, RANK, MONTHS, YEAR, DATE, WEEKMAX, ALT, unit, MODELS, FAV, TOP_SHARE, place, CMD, UP, trs, rankState, mascots,
14
+ HAS_CLAUDE, HAS_CODEX, TITLE, DAYS_WITH, CAL_DAYS, ANGRIER } = k;
15
+ const CW = 27, RH = 56.25, W = '#FFFFFF', Y = '#FFFF00', C = '#00FFFF', G = '#00FF00', M = '#FF00FF', R = '#FF0000', B = '#0000C8';
16
+ const T = (col, row, text0, color = W, dbl = false, text = trs(String(text0))) => `<div class="t${dbl ? ' d' : ''}" style="left:${col * CW}px; top:${row * RH + 5}px; color:${color}">${text}</div>`;
17
+ const TR = (row, text0, color = W, dbl = false, text = trs(String(text0))) => T(40 - text.length - 1, row, text, color, dbl); // прижать вправо
18
+ const BL = (col, row, w, h, color) => `<div class="b" style="left:${col * CW}px; top:${row * RH}px; width:${w * CW}px; height:${h * RH}px; background:${color}"></div>`;
19
+ const rows = (t, list, perSec = 16) => list.filter(([r]) => r <= t * perSec).map(([, h]) => h).join(''); // страница рисуется сверху вниз
20
+ const head = (title, sub) => [[1, BL(0, 1, 40, 4, B)], [1, T(1, 1.35, title, Y, true)], [4, T(1, 4, sub, C)]];
21
+ const PAGE = 'ИТОГИ ГОДА ВАЙБКОДЕРА · СТРАНИЦА ' + YEAR;
22
+ // место среди участников — строка под рангом; места нет — строки нет
23
+ const pl = place(String), placeLine = (row) => (pl ? T(1, row, UP(pl.member ?? `${pl.top} ${pl.of}`), M) : '');
24
+ // команду набирают как написано, поэтому её имя — строчными, хотя страница вся прописная
25
+ const getYours = CMD ? 'ПОЛУЧИ СВОЙ: npx ' + CMD : 'ПОЛУЧИ СВОЙ: NPX [КОМАНДА]';
26
+ // Строки «подпись — число» идут подряд с шагом 1,2 строки решётки: у человека без Claude Code строк про него нет, и дыр от них тоже.
27
+ // Каждая строка — [подпись, число, цвет] или null (строки нет); → [[строка решётки, разметка]].
28
+ const table = (row0, lines) => lines.filter(Boolean).map(([label, val, col], i) => { const r = +(row0 + i * 1.2).toFixed(1); return [r, T(1, r, label) + TR(r, val, col)]; });
29
+ // Маскот, показывающий ранг: под одиноким маскотом Codex стоит строка его чисел, и чтобы она не ушла под плашку ранга, он чуть меньше.
30
+ const RANK_K = HAS_CODEX && !HAS_CLAUDE ? 12.3 : 13.5;
31
+ const daysLine = (who, p) => (who ? ['ДНЕЙ С ' + UP(who.name), cnt(who.n, p), Y] : null);
32
+
33
+ function s1(t) { // обложка: вся с первого кадра
34
+ return BL(0, 1, 40, 4, B) + T(1, 1.35, UP(TITLE), Y, true) + T(1, 4, PAGE, C) +
35
+ `<div class="b" style="left:0; width:1080px; display:flex; justify-content:center; top:${RH * 6.2}px">${mascots(13.5, null, t)}</div>` +
36
+ T(1, 16.6, 'ИТОГИ ' + YEAR, G, true) + T(1, 19, 'КОММИТЫ ДНИ ЧАСЫ МОДЕЛИ РАНГ', W) +
37
+ (blink(t, 0.6) ? T(24, 17.2, 'ЛИСТАЙ ДАЛЬШЕ >', Y) : '');
38
+ }
39
+ function s2(t) {
40
+ const shown = Math.round(53 * seg(t, 2.2, 2.4)), x0 = 6.5 * CW, colW = 13.5, unit = RH / 3;
41
+ const bars = D.weeks.map((w, i) => { if (i >= shown) return '';
42
+ const h = Math.round(w[0] / WEEKMAX * 27) * unit, hc = Math.round(w[1] / WEEKMAX * 27) * unit, base = 19 * RH;
43
+ return `<div class="b" style="left:${x0 + i * colW}px; top:${base - h}px; width:${colW - 2}px; height:${h - hc}px; background:${C}"></div><div class="b" style="left:${x0 + i * colW}px; top:${base - hc}px; width:${colW - 2}px; height:${hc}px; background:${Y}"></div>`; }).join('');
44
+ return rows(t, [...head('КОММИТЫ', 'ВСЁ, ЧТО ТЫ ОТПРАВИЛ В GIT ЗА ГОД'),
45
+ ...table(5.6, [['ВСЕГО ЗА ГОД', cnt(D.commits, seg(t, 0.4, 1.1)), C],
46
+ HAS_CLAUDE ? ['ИЗ НИХ С CLAUDE CODE', cnt(D.commitsClaude, seg(t, 0.9, 1.1)), Y] : null,
47
+ ['ПРОЕКТОВ', cnt(D.projects, seg(t, 1.4, 0.7)), C]]),
48
+ [9.5, T(1, 9.5, 'ПО НЕДЕЛЯМ: ЯНВАРЬ - ДЕКАБРЬ', G)]]) + bars +
49
+ (on(t, 2.2) ? BL(6.5, 19, 26.5, 0.1, W) + (HAS_CLAUDE ? T(1, 19.6, '■', Y) + T(3, 19.6, 'С CLAUDE CODE') + T(20, 19.6, '■', C) + T(22, 19.6, 'БЕЗ НЕГО') : '') : '');
50
+ }
51
+ function s3(t) {
52
+ const lit = Math.round(D.cal.length * seg(t, 0.8, 2.6)), MN = MONTHS;
53
+ let i = 0, cal = '';
54
+ for (let m = 1; m <= 12; m++) { const top = (5.5 + (m - 1) * 0.62) * RH;
55
+ cal += `<div class="t" style="left:${CW}px; top:${top + 2}px; color:${G}; transform:scaleY(1)">${MN[m - 1]}</div>`;
56
+ while (i < D.cal.length && D.cal[i][0] === m) { const [, d, n, c, cd] = D.cal[i];
57
+ cal += `<div class="b" style="left:${(6 + d) * CW}px; top:${top}px; width:${CW - 3}px; height:${RH * 0.62 - 4}px; background:${i >= lit ? '#1C1C1C' : (c || cd) ? Y : n ? C : '#1C1C1C'}"></div>`; i++; } }
58
+ return rows(t, [...head('ДНИ И ЧАСЫ', CAL_DAYS ? 'ЖЁЛТЫЙ - ДЕНЬ С ' + UP(CAL_DAYS.name) : ''), [5, cal],
59
+ ...table(14, [daysLine(CAL_DAYS, seg(t, 3.2, 0.8)),
60
+ ['ДНЕЙ ПОДРЯД', cnt(D.streak, seg(t, 3.7, 0.7)), C],
61
+ ['ЧАСОВ РАБОТЫ', '~' + cnt(D.hours, seg(t, 4.2, 0.8)), C],
62
+ HAS_CLAUDE ? ['ИЗ НИХ С CLAUDE CODE', '~' + cnt(D.hoursClaude, seg(t, 4.7, 0.8)), Y] : null])], 12);
63
+ }
64
+ function s4(t) { // модели года; без моделей остаётся одна строка со счётом
65
+ const list = [...head('МОДЕЛИ ГОДА', 'КТО ПИСАЛ С ТОБОЙ ЭТОТ ГОД')];
66
+ MODELS.forEach((m, i) => { const a = 0.8 + i * 0.45, p = ease(seg(t, a, 0.8)), r = 5.6 + i * 2.1;
67
+ list.push([r, T(1, r, UP(m.name), i ? W : Y) + TR(r, Math.round(m.share * p) + '%', i ? C : Y) + BL(1, r + 0.95, 38, 0.75, '#1C1C1C') + BL(1, r + 0.95, Math.round(38 * m.share / TOP_SHARE * p), 0.75, i ? C : Y)]); });
68
+ if (FAV) list.push([16.4, on(t, 3.6) ? T(1, 16.5, 'ЛЮБИМАЯ:', G) + T(1, 17.4, typed(UP(FAV.name), seg(t, 3.6, 0.6)), M, true) : '']);
69
+ list.push([19.8, on(t, 4.6) ? T(1, 19.8, 'ВСЕГО МОДЕЛЕЙ ЗА ГОД: ' + D.modelCount) : '']);
70
+ return rows(t, list);
71
+ }
72
+ function s5(t) {
73
+ const rev = t >= 4.6;
74
+ return rows(t, [...head('ВМЕСТО ЭТОГО', LANG === 'en' ? `IN ~${D.hours} HOURS YOU COULD HAVE:` : `ЗА ~${D.hours} ЧАСОВ ТЫ МОГ БЫ:`),
75
+ [6, T(1, 6, 'ПРОБЕЖАТЬ') + TR(6, `${cnt(ALT.mar, seg(t, 0.7, 0.8))} ${UP(unit(ALT.mar, 'mar'))}`, C)],
76
+ [7.6, T(1, 7.6, 'СВАРИТЬ') + TR(7.6, `${cnt(ALT.bor, seg(t, 1.5, 0.8))} ${UP(unit(ALT.bor, 'bor'))}`, C)],
77
+ [9.2, T(1, 9.2, 'ВЫСПАТЬСЯ') + TR(9.2, `${cnt(ALT.sleep, seg(t, 2.3, 0.8))} ${UP(unit(ALT.sleep, 'sleep'))}`, C)],
78
+ [11.4, T(1, 11.4, 'А ЧТО ТЫ ВЫБРАЛ?', W)]]) +
79
+ (on(t, 3.2) && !rev ? BL(1, 13, 12, 1.6, R) + (blink(t, 0.35) ? T(2.6, 13.35, 'REVEAL', W) : '') : '') +
80
+ (rev ? BL(0, 12.8, 40, 7, B) + T(1, 13.3, 'НО ТЫ ВЫБРАЛ:', G) + T(1, 14.6, typed(`${D.projects} ${UP(unit(D.projects, 'proj'))}`, seg(t, 4.7, 0.5)), Y, true) + T(1, 17.2, typed(`${D.commits} ${UP(unit(D.commits, 'com'))}`, seg(t, 5.3, 0.6)), Y, true) : '');
81
+ }
82
+ function s6(t) {
83
+ const r = rankState(t, 13.5);
84
+ return rows(t, [...head('РАНГ ЗА ГОД', UP(ANGRIER))], 30) +
85
+ `<div class="b" style="left:0; width:1080px; display:flex; justify-content:center; top:${RH * 5.4}px">${mascots(RANK_K, r, t)}</div>` +
86
+ (r.done ? BL(0, 15.5, 40, 2.7, R) : '') + T(1, 15.9, r.done ? UP(RANK) : UP(RANKS[r.step]) + '...', r.done ? Y : W, true) +
87
+ (r.done ? placeLine(18.6) + (blink(t, 0.55) ? T(1, 19.8, getYours, Y) : '') : '');
88
+ }
89
+ function card(t) { // одиночная карточка 9:16: решётка 40 × 34
90
+ const r = rankState(t, 13.5, 0.4, 2.2);
91
+ return BL(0, 1, 40, 4, B) + T(1, 1.35, UP(TITLE), Y, true) + T(1, 4, PAGE, C) +
92
+ `<div class="b" style="left:0; width:1080px; display:flex; justify-content:center; top:${RH * 5.5}px">${mascots(RANK_K, r, t)}</div>` +
93
+ (r.done ? BL(0, 15.6, 40, 2.7, R) : '') + T(1, 16, r.done ? UP(RANK) : UP(RANKS[r.step]) + '...', r.done ? Y : W, true) + placeLine(18.7) +
94
+ table(20.3, [['ВСЕГО ЗА ГОД', cnt(D.commits, seg(t, 0.2, 1.0)), C],
95
+ HAS_CLAUDE ? ['ИЗ НИХ С CLAUDE CODE', cnt(D.commitsClaude, seg(t, 0.4, 1.0)), Y] : null,
96
+ ['ПРОЕКТОВ', cnt(D.projects, seg(t, 0.6, 0.7)), C],
97
+ HAS_CLAUDE ? daysLine(DAYS_WITH, seg(t, 0.8, 0.8)) : null, // дни и сессии Codex стоят под его маскотом
98
+ ['ДНЕЙ ПОДРЯД', cnt(D.streak, seg(t, 1.0, 0.7)), C],
99
+ ['ЧАСОВ РАБОТЫ', '~' + cnt(D.hours, seg(t, 1.2, 0.9)), C],
100
+ FAV ? ['ЛЮБИМАЯ МОДЕЛЬ', UP(FAV.name), M] : null]).map(([, h]) => h).join('') + T(1, 29.3, getYours, Y);
101
+ }
102
+ const KEYS = [['КОММИТЫ', R, 2], ['ДНИ', G, 3], ['МОДЕЛИ', Y, 4], ['РАНГ', C, 6]].map(([k, c, n]) => [trs(k), c, n]);
103
+ return { slides: [null, s1, s2, s3, s4, s5, s6, card], chrome: (t, inner) => {
104
+ const K0 = CARD ? 31 : 21, sec = String(12 + Math.floor(t)).padStart(2, '0'), pg = t < 0.35 && SLIDE > 1 && !CARD ? YEAR - 26 + Math.floor(t * 74) : YEAR;
105
+ return T(1, 0, 'P' + pg) + T(8, 0, 'МОЙ ГОД', Y) + T(18, 0, CARD ? '1/1' : `${SLIDE}/${N}`, G) + T(24, 0, `${DATE} 21:04:${sec}`) + inner +
106
+ KEYS.map(([k, col, s], i) => BL(i * 10, K0, 10, 1, col) + `<div class="t" style="left:${i * 10 * CW + (270 - k.length * 27) / 2}px; top:${K0 * RH + 6}px; color:#000">${k}</div>` + (s === SLIDE ? BL(i * 10, K0 - 0.18, 10, 0.18, W) : '')).join('') +
107
+ T(1, K0 + 1.1, 'НЕОФИЦИАЛЬНЫЙ ФАН-ПРОЕКТ') + T(1, K0 + 2.05, 'POWERED BY', W) + T(12, K0 + 2.05, 'JEDICODER.STORE', G);
108
+ } };
109
+ },
110
+ };