@litfamily/litcodex 1.0.28 → 1.0.29

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 (158) hide show
  1. package/README-Ko-KR.md +10 -10
  2. package/README.md +10 -10
  3. package/dist/cli.js +1 -1
  4. package/dist/config-migration/cli.js +11 -3
  5. package/dist/install/generated-skill-payload-hashes.d.ts +56 -28
  6. package/dist/install/generated-skill-payload-hashes.js +56 -28
  7. package/dist/install/index.js +1 -1
  8. package/dist/install/motion-runtime.d.ts +4 -1
  9. package/dist/install/motion-runtime.js +15 -4
  10. package/dist/install/office-runtime.d.ts +10 -11
  11. package/dist/install/office-runtime.js +8 -3
  12. package/dist/install/skill-catalog.d.ts +1 -1
  13. package/dist/install/skill-catalog.js +1 -0
  14. package/dist/postinstall.js +4 -2
  15. package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
  16. package/marketplace/plugins/litcodex/components/auto-update/dist/auto-update.d.ts +12 -0
  17. package/marketplace/plugins/litcodex/components/auto-update/dist/auto-update.js +31 -2
  18. package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
  19. package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
  20. package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
  21. package/marketplace/plugins/litcodex/components/lit-loop/directive.md +2 -1
  22. package/marketplace/plugins/litcodex/components/lit-loop/directives/deep-interview.md +2 -0
  23. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-brainstorm.md +216 -0
  24. package/marketplace/plugins/litcodex/components/lit-loop/directives/litgoal.md +8 -1
  25. package/marketplace/plugins/litcodex/components/lit-loop/directives/review-work.md +12 -4
  26. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.d.ts +6 -1
  27. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +16 -5
  28. package/marketplace/plugins/litcodex/components/lit-loop/dist/guards.d.ts +3 -1
  29. package/marketplace/plugins/litcodex/components/lit-loop/dist/guards.js +5 -2
  30. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +2 -0
  31. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +26 -8
  32. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.d.ts +2 -0
  33. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.js +2 -0
  34. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.d.ts +1 -1
  35. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.js +9 -1
  36. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +2 -0
  37. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.d.ts +2 -0
  38. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.js +8 -0
  39. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.d.ts +56 -0
  40. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.js +171 -0
  41. package/marketplace/plugins/litcodex/components/lit-loop/dist/route-context.js +5 -2
  42. package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +35 -15
  43. package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-mention-scope.js +2 -0
  44. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.d.ts +2 -2
  45. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.js +15 -5
  46. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +1 -0
  47. package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
  48. package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
  49. package/marketplace/plugins/litcodex/components/rules/dist/model-metadata.d.ts +16 -0
  50. package/marketplace/plugins/litcodex/components/rules/dist/model-metadata.js +37 -1
  51. package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
  52. package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
  53. package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
  54. package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
  55. package/marketplace/plugins/litcodex/skills/browser-drive/scripts/capability-probe.mjs +24 -4
  56. package/marketplace/plugins/litcodex/skills/deep-interview/SKILL.md +3 -1
  57. package/marketplace/plugins/litcodex/skills/lit-brainstorm/SKILL.md +271 -0
  58. package/marketplace/plugins/litcodex/skills/lit-brainstorm/agents/openai.yaml +6 -0
  59. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/doctor.mjs +4 -3
  60. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/export.mjs +6 -5
  61. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/runtime-probes.mjs +25 -0
  62. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_pdf.py +31 -1
  63. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/template.tex +2 -0
  64. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/template.tex +2 -0
  65. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/template.tex +2 -0
  66. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/template.tex +2 -0
  67. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/template.tex +2 -0
  68. package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +8 -1
  69. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +42 -10
  70. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +11 -9
  71. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/agents/openai.yaml +3 -0
  72. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +4 -0
  73. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +38 -0
  74. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-assets.mjs +113 -0
  75. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-capture.mjs +161 -0
  76. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-gate.mjs +327 -0
  77. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-image.mjs +136 -0
  78. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-init.js +43 -0
  79. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-sheet.mjs +69 -0
  80. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-treatment.mjs +102 -0
  81. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-worker.mjs +21 -0
  82. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover.mjs +352 -0
  83. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +19 -1
  84. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/fonts.mjs +11 -0
  85. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +128 -2
  86. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/loop-kit.js +104 -0
  87. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +92 -18
  88. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +2 -0
  89. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +3 -2
  90. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/webp.mjs +140 -0
  91. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/jetbrains-mono/JetBrainsMono-wght-latin.woff2 +0 -0
  92. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/jetbrains-mono/OFL.txt +93 -0
  93. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/card-scenes/expected.json +16 -0
  94. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/card-scenes/index.html +42 -0
  95. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/reset-sweep/expected.json +16 -0
  96. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/reset-sweep/index.html +27 -0
  97. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/still-glow/expected.json +17 -0
  98. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/still-glow/index.html +29 -0
  99. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/title-slam/expected.json +17 -0
  100. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/negatives/title-slam/index.html +44 -0
  101. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +67 -0
  102. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/orbit-loop/index.html +182 -0
  103. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/painted-light/expected.json +95 -0
  104. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/painted-light/index.html +231 -0
  105. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/weight-tide/expected.json +67 -0
  106. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/weight-tide/index.html +103 -0
  107. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/cover.md +389 -0
  108. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +4 -0
  109. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +7 -6
  110. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +3 -1
  111. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +2 -0
  112. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +37 -5
  113. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/runtime.mjs +1 -1
  114. package/marketplace/plugins/litcodex/skills/litgoal/SKILL.md +8 -3
  115. package/marketplace/plugins/litcodex/skills/lsp-setup/scripts/verify-lsp.ts +43 -7
  116. package/marketplace/plugins/litcodex/skills/review-work/SKILL.md +21 -4
  117. package/node_modules/@litcodex/lit-loop/CHANGELOG.md +7 -0
  118. package/node_modules/@litcodex/lit-loop/README.md +6 -0
  119. package/node_modules/@litcodex/lit-loop/directive.md +2 -1
  120. package/node_modules/@litcodex/lit-loop/directives/deep-interview.md +2 -0
  121. package/node_modules/@litcodex/lit-loop/directives/lit-brainstorm.md +216 -0
  122. package/node_modules/@litcodex/lit-loop/directives/litgoal.md +8 -1
  123. package/node_modules/@litcodex/lit-loop/directives/review-work.md +12 -4
  124. package/node_modules/@litcodex/lit-loop/dist/codex-hook.d.ts +6 -1
  125. package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +16 -5
  126. package/node_modules/@litcodex/lit-loop/dist/guards.d.ts +3 -1
  127. package/node_modules/@litcodex/lit-loop/dist/guards.js +5 -2
  128. package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +2 -0
  129. package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +26 -8
  130. package/node_modules/@litcodex/lit-loop/dist/markers.d.ts +2 -0
  131. package/node_modules/@litcodex/lit-loop/dist/markers.js +2 -0
  132. package/node_modules/@litcodex/lit-loop/dist/modes.d.ts +1 -1
  133. package/node_modules/@litcodex/lit-loop/dist/modes.js +9 -1
  134. package/node_modules/@litcodex/lit-loop/dist/motion-route.js +2 -0
  135. package/node_modules/@litcodex/lit-loop/dist/plan-persistence.d.ts +2 -0
  136. package/node_modules/@litcodex/lit-loop/dist/plan-persistence.js +8 -0
  137. package/node_modules/@litcodex/lit-loop/dist/reentry.d.ts +56 -0
  138. package/node_modules/@litcodex/lit-loop/dist/reentry.js +171 -0
  139. package/node_modules/@litcodex/lit-loop/dist/route-context.js +5 -2
  140. package/node_modules/@litcodex/lit-loop/dist/route-heads.js +35 -15
  141. package/node_modules/@litcodex/lit-loop/dist/skill-mention-scope.js +2 -0
  142. package/node_modules/@litcodex/lit-loop/dist/trigger.d.ts +2 -2
  143. package/node_modules/@litcodex/lit-loop/dist/trigger.js +15 -5
  144. package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +1 -0
  145. package/node_modules/@litcodex/lit-loop/package.json +1 -1
  146. package/node_modules/@litcodex/lit-loop/skills/browser-drive/scripts/capability-probe.mjs +24 -4
  147. package/node_modules/@litcodex/lit-loop/skills/deep-interview/SKILL.md +3 -1
  148. package/node_modules/@litcodex/lit-loop/skills/lit-brainstorm/SKILL.md +271 -0
  149. package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +8 -1
  150. package/node_modules/@litcodex/lit-loop/skills/litgoal/SKILL.md +8 -3
  151. package/node_modules/@litcodex/lit-loop/skills/review-work/SKILL.md +21 -4
  152. package/package.json +2 -2
  153. package/readme-assets/badge-version.svg +1 -1
  154. package/readme-assets/cover-motion-still.webp +0 -0
  155. package/readme-assets/cover-motion.webp +0 -0
  156. package/readme-assets/cover.webp +0 -0
  157. package/readme-assets/litfamily-machines.png +0 -0
  158. package/readme-assets/skills/lit-brainstorm.webp +0 -0
@@ -0,0 +1,231 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <!-- Cover recipe: painted base + travelling light (the default). A finished painting is the whole
6
+ picture and this page only relights it. Everything that belongs to one painting sits in the
7
+ PAINTING block; measure those numbers on your own base art (cover/assets/base.png, listed in
8
+ assets.json) and keep the rest. The painting is scaled into the cover, never cropped: a 3:2
9
+ painting on a 2:1 cover is pillarboxed and the wings stay quiet. Any panel can be the lead:
10
+ set PAINTING.lead, give that machine its own glow anchors, and point the base art's checkBox in
11
+ assets.json at the same panel. -->
12
+ <link rel="stylesheet" href="/lit/fonts.css">
13
+ <script src="/lit/loop-kit.js"></script>
14
+ <style>
15
+ html, body { margin: 0; width: 1200px; height: 600px; overflow: hidden; background: #05080d; }
16
+ #painting { position: absolute; left: 150px; top: 0; width: 1536px; height: 1024px; transform: scale(0.5859375); transform-origin: 0 0; }
17
+ #painting > canvas, #painting > svg { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; }
18
+ #wings, #motes { position: absolute; inset: 0; width: 1200px; height: 600px; }
19
+ #motes { mix-blend-mode: screen; }
20
+ #title-mask { display: none; }
21
+ body.mask, body.mask * { background: #000 !important; }
22
+ body.mask canvas, body.mask svg { visibility: hidden; }
23
+ body.mask #title-mask { display: block; visibility: visible; }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <canvas id="wings" width="2400" height="1200"></canvas>
28
+ <div id="painting">
29
+ <canvas id="base" width="1536" height="1024"></canvas>
30
+ <canvas id="title-mask" width="1536" height="1024"></canvas>
31
+ <svg id="dim" viewBox="0 0 1536 1024"><defs><linearGradient id="pool" gradientUnits="userSpaceOnUse" y1="0" y2="0"></linearGradient><clipPath id="pool-clip"></clipPath></defs><rect id="pool-rect" fill="url(#pool)" clip-path="url(#pool-clip)"/></svg>
32
+ <svg id="light" viewBox="0 0 1536 1024" style="mix-blend-mode: screen">
33
+ <defs id="light-defs">
34
+ <filter id="soften" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="5"/></filter>
35
+ <radialGradient id="ember"><stop offset="0" stop-color="#fff0d8" stop-opacity="0.85"/><stop offset="0.3" stop-color="#ff6337" stop-opacity="0.5"/><stop offset="1" stop-color="#ff6337" stop-opacity="0"/></radialGradient>
36
+ <radialGradient id="head"><stop offset="0" stop-color="#fff1e0" stop-opacity="1"/><stop offset="0.4" stop-color="#ffb27a" stop-opacity="0.5"/><stop offset="1" stop-color="#ff7a46" stop-opacity="0"/></radialGradient>
37
+ </defs>
38
+ <g id="bands"></g>
39
+ <g id="glows"></g>
40
+ <g id="orbit" fill="none" stroke-linecap="round"></g>
41
+ <ellipse id="accent" fill="url(#ember)" opacity="0"/>
42
+ </svg>
43
+ <svg viewBox="0 0 1536 1024" style="mix-blend-mode: overlay"><defs><filter id="glint-blur"><feGaussianBlur stdDeviation="6"/></filter></defs><polygon id="glint" fill="#ffffff" opacity="0" filter="url(#glint-blur)"/></svg>
44
+ </div>
45
+ <canvas id="motes" width="2400" height="1200"></canvas>
46
+ <script>
47
+ // ---- PAINTING: one painting's numbers, in its own pixel coordinates ----
48
+ const PAINTING = {
49
+ src: "assets/base.png", width: 1536, height: 1024,
50
+ panels: [[13, 303], [320, 607], [623, 906], [921, 1208], [1224, 1526]], // x ranges of the panels, left to right
51
+ panelTop: 148, panelBottom: 945,
52
+ lead: 0, // index into panels: the machine that stays lit, carries the beat glows and the comet
53
+ title: { box: [455, 32, 635, 88], gain: 1, maskLevel: 60 }, // the painted title; gain > 1 lifts dark letters
54
+ // Glow anchors per panel index, measured on that machine: two eyes and a core. Only the lead's entry
55
+ // glows. A lead with no entry stops the page; [] runs it with no beat glows.
56
+ glows: { 0: [{ cx: 88, cy: 378, rx: 20, ry: 6, kind: "eye" }, { cx: 122, cy: 374, rx: 16, ry: 7, kind: "eye" }, { cx: 85, cy: 686, rx: 32, ry: 32, kind: "core" }] },
57
+ accent: { cx: 902, cy: 987, rx: 60, ry: 22 }, // the accent word of the painted motto
58
+ };
59
+
60
+ // Three speed layers over one rule. Slow: the comet laps the lead frame and motes rise, linear and
61
+ // perpetual. Mid: a window of work light walks the dim panels once per loop, and a scan band runs down
62
+ // each panel twice per loop, offset by the panel's position. Beat: the eyes breathe twice, the core once,
63
+ // one blink, one glint over the title, the accent flares at t = 0 and t = 0.5.
64
+ // Light is drawn as moving EDGES, never as an in-place fade: lossy animated WebP skips a pixel that
65
+ // changes by less than a few levels per frame, so a slow fade goes stale and pops back at the seam.
66
+ const { TAU, clamp, fract, mix, ease, swell, cubicPulse, cdist, rng, makeNoise, loopNoise } = LitLoop;
67
+ const SVG = "http://www.w3.org/2000/svg";
68
+ const byId = (id) => document.getElementById(id);
69
+ const add = (parent, tag, attrs) => {
70
+ const node = document.createElementNS(SVG, tag);
71
+ for (const [k, v] of Object.entries(attrs)) node.setAttribute(k, String(v));
72
+ parent.appendChild(node);
73
+ return node;
74
+ };
75
+ const SCALE = 600 / PAINTING.height;
76
+ const OFFSET_X = (1200 - PAINTING.width * SCALE) / 2;
77
+ const NIGHT = "#02050a";
78
+
79
+ if (!PAINTING.panels[PAINTING.lead]) throw new Error(`PAINTING.lead ${PAINTING.lead} is not a panel index (0 to ${PAINTING.panels.length - 1})`);
80
+ const leadGlows = PAINTING.glows[PAINTING.lead];
81
+ if (!Array.isArray(leadGlows)) throw new Error(`PAINTING.glows has no entry for the lead panel ${PAINTING.lead}: measure that machine's eyes and core, or set glows[${PAINTING.lead}] = [] to run with no beat glows`);
82
+ const [lx0, lx1] = PAINTING.panels[PAINTING.lead];
83
+
84
+ // The dim pool spans the first to the last sleeping panel and is clipped around the lead, so a lead in
85
+ // the middle stays lit and the window still walks every panel as one light. The lit window is a flat
86
+ // span with a 24 px feather on each side: dim 0.68 outside, 0.04 inside.
87
+ const sleeping = PAINTING.panels.filter((_, i) => i !== PAINTING.lead);
88
+ const POOL = { from: sleeping[0][0], to: sleeping[sleeping.length - 1][1], half: 230, feather: 24, dim: 0.68, lit: 0.04 };
89
+ const poolWidth = POOL.to - POOL.from;
90
+ for (const [k, v] of Object.entries({ x: POOL.from, y: PAINTING.panelTop, width: poolWidth, height: PAINTING.panelBottom - PAINTING.panelTop })) byId("pool-rect").setAttribute(k, v);
91
+ byId("pool").setAttribute("x1", POOL.from);
92
+ byId("pool").setAttribute("x2", POOL.to);
93
+ const poolHeight = PAINTING.panelBottom - PAINTING.panelTop;
94
+ if (lx0 > POOL.from) add(byId("pool-clip"), "rect", { x: POOL.from, y: PAINTING.panelTop, width: lx0 - POOL.from, height: poolHeight });
95
+ if (lx1 < POOL.to) add(byId("pool-clip"), "rect", { x: lx1, y: PAINTING.panelTop, width: POOL.to - lx1, height: poolHeight });
96
+ const poolStops = Array.from({ length: 6 }, () => add(byId("pool"), "stop", { "stop-color": NIGHT }));
97
+ const windowCentre = (t) => mix(POOL.from - 330, POOL.to + 330, fract(t + 0.18));
98
+ const litness = (t, x) => 1 - ease.smooth(clamp((Math.abs(x - windowCentre(t)) - POOL.half) / POOL.feather));
99
+
100
+ // Scan bands: a 3 px leading line over a two-step flat afterglow (0.10, 0.05), clipped to the panel.
101
+ // Flat steps change pixels only at their edges, and by more than the encoder's threshold.
102
+ const BAND = 64;
103
+ const AFTERGLOW = [0.1, 0.05];
104
+ const bands = PAINTING.panels.map(([x0, x1], i) => {
105
+ const clip = add(byId("light-defs"), "clipPath", { id: `panel-${i}` });
106
+ add(clip, "rect", { x: x0 + 2, y: PAINTING.panelTop, width: x1 - x0 - 4, height: PAINTING.panelBottom - PAINTING.panelTop });
107
+ const group = add(byId("bands"), "g", { "clip-path": `url(#panel-${i})`, opacity: 0 });
108
+ const steps = AFTERGLOW.map((a) => add(group, "rect", { x: x0 + 2, y: 0, width: x1 - x0 - 4, height: BAND / AFTERGLOW.length, fill: "#ffb27a", opacity: a }));
109
+ const edge = add(group, "rect", { x: x0 + 2, y: 0, width: x1 - x0 - 4, height: 3, fill: "#ffc9a0", opacity: 0.32 });
110
+ return { group, steps, edge };
111
+ });
112
+ const glows = leadGlows.map((g) => add(byId("glows"), "ellipse", { cx: g.cx, cy: g.cy, rx: g.rx + 30, ry: g.ry + 30, fill: "url(#ember)", opacity: 0 }));
113
+ for (const [k, v] of Object.entries(PAINTING.accent)) byId("accent").setAttribute(k, v);
114
+
115
+ // The lead frame as one chamfered path. The comet is a bright dash with a tail of wider, fainter dashes.
116
+ const L = lx0 + 0.5, R = lx1 + 0.5, T = PAINTING.panelTop + 0.5, B = PAINTING.panelBottom + 0.5, C = 10;
117
+ const frame = `M${L} ${T + C}L${L + C} ${T}H${R - C}L${R} ${T + C}V${B - C}L${R - C} ${B}H${L + C}L${L} ${B - C}Z`;
118
+ const tail = Array.from({ length: 6 }, (_, s) => add(byId("orbit"), "path", { d: frame, stroke: "#ff7a46", "stroke-width": 9 - s, opacity: 0.55 * (1 - s / 6), filter: s < 2 ? "url(#soften)" : "" }));
119
+ const streak = add(byId("orbit"), "path", { d: frame, stroke: "#ffd2b0", "stroke-width": 3 });
120
+ const comet = add(byId("orbit"), "circle", { r: 22, fill: "url(#head)" });
121
+ const PERIMETER = streak.getTotalLength();
122
+ const [gx, gy, gw, gh] = PAINTING.title.box;
123
+ byId("glint").setAttribute("points", `0,${gy - 8} 60,${gy - 8} 25,${gy + gh + 8} -35,${gy + gh + 8}`);
124
+
125
+ // Motes: few, mostly over the plain wings; each one over the painting makes the encoder re-send the
126
+ // textured blocks around it.
127
+ const pick = rng(11);
128
+ const noise = makeNoise(5);
129
+ const motes = Array.from({ length: 50 }, (_, i) => ({ x: pick() * 1200, y0: pick() * 600, laps: pick() < 0.3 ? 2 : 1, r: 0.6 + pick() * 1.4, alpha: 0.25 + pick() * 0.45, i }));
130
+ const moteCtx = byId("motes").getContext("2d");
131
+ moteCtx.scale(2, 2);
132
+ const wingCtx = byId("wings").getContext("2d");
133
+ wingCtx.scale(2, 2);
134
+
135
+ function drawWings() {
136
+ wingCtx.clearRect(0, 0, 1200, 600);
137
+ const spill = (x, w, a) => {
138
+ const g = wingCtx.createLinearGradient(x, 0, x + w, 0);
139
+ g.addColorStop(0, `rgba(255,120,70,${a})`);
140
+ g.addColorStop(1, "rgba(255,120,70,0)");
141
+ wingCtx.fillStyle = g;
142
+ wingCtx.fillRect(Math.min(x, x + w), 0, Math.abs(w), 600);
143
+ };
144
+ spill(OFFSET_X, -OFFSET_X, 0.08);
145
+ spill(1200 - OFFSET_X, OFFSET_X, 0.03);
146
+ }
147
+
148
+ window.renderFrame = (t, opts = {}) => {
149
+ document.body.className = opts.mask ? "mask" : "";
150
+ if (opts.mask) return;
151
+ const centre = windowCentre(t);
152
+ const at = (x) => clamp((x - POOL.from) / poolWidth);
153
+ const stops = [[POOL.from, POOL.dim], [centre - POOL.half - POOL.feather, POOL.dim], [centre - POOL.half, POOL.lit], [centre + POOL.half, POOL.lit], [centre + POOL.half + POOL.feather, POOL.dim], [POOL.to, POOL.dim]];
154
+ stops.forEach(([x, a], j) => {
155
+ poolStops[j].setAttribute("offset", String(j === 0 ? 0 : at(x)));
156
+ poolStops[j].setAttribute("stop-opacity", String(a));
157
+ });
158
+ PAINTING.panels.forEach(([x0, x1], i) => {
159
+ const y = mix(PAINTING.panelTop - BAND, PAINTING.panelBottom, fract(t * 2 - i * 0.11));
160
+ bands[i].steps.forEach((step, j) => step.setAttribute("y", String(y + BAND - ((j + 1) * BAND) / AFTERGLOW.length)));
161
+ bands[i].edge.setAttribute("y", String(y + BAND - 3));
162
+ bands[i].group.setAttribute("opacity", String(i === PAINTING.lead ? 0.8 : 0.35 + 0.65 * litness(t, (x0 + x1) / 2)));
163
+ });
164
+ const blink = 1 - cubicPulse(0.62, 0.018, t);
165
+ leadGlows.forEach((g, j) => {
166
+ const breath = g.kind === "eye" ? swell(fract(2 * t - 0.06 * j)) : swell(fract(t - 0.35));
167
+ glows[j].setAttribute("opacity", String(g.kind === "eye" ? (0.55 + 0.45 * breath) * blink : 0.45 + 0.4 * breath));
168
+ });
169
+ const head = fract(t) * PERIMETER;
170
+ const tailLength = 0.16 * PERIMETER;
171
+ tail.forEach((dash, s) => {
172
+ const len = tailLength * (1 - s / 7);
173
+ dash.setAttribute("stroke-dasharray", `${len} ${PERIMETER - len}`);
174
+ dash.setAttribute("stroke-dashoffset", String(-(head - len)));
175
+ });
176
+ streak.setAttribute("stroke-dasharray", `${tailLength * 0.35} ${PERIMETER - tailLength * 0.35}`);
177
+ streak.setAttribute("stroke-dashoffset", String(-(head - tailLength * 0.35)));
178
+ const point = streak.getPointAtLength(head);
179
+ comet.setAttribute("cx", point.x);
180
+ comet.setAttribute("cy", point.y);
181
+ // The glint is one fast skewed sweep in OVERLAY blend: the dark plate stays dark and only the
182
+ // letters brighten. Screen brightens a visible box; colour-dodge turns a coloured letter into a block.
183
+ const sweep = LitLoop.window(t, 0.08, 0.11);
184
+ byId("glint").setAttribute("transform", `translate(${mix(gx - 40, gx + gw + 40, sweep < 0 ? 0 : ease.smooth(sweep))} 0)`);
185
+ byId("glint").setAttribute("opacity", String(sweep < 0 ? 0 : 0.9 * Math.sin(Math.PI * sweep)));
186
+ // Symmetric pulses at t = 0 and t = 0.5, so the reset at frame 0 lands under motion.
187
+ byId("accent").setAttribute("opacity", String(0.18 + 0.5 * Math.max(cubicPulse(0, 0.03, cdist(t, 0)), cubicPulse(0.5, 0.03, t))));
188
+ drawWings();
189
+ moteCtx.clearRect(0, 0, 1200, 600);
190
+ for (const m of motes) {
191
+ const y = 620 - fract(m.y0 / 600 + m.laps * t) * 640;
192
+ const x = m.x + 14 * loopNoise(noise, t, m.i * 1.7, 1.1);
193
+ const over = x >= OFFSET_X && x <= 1200 - OFFSET_X;
194
+ moteCtx.fillStyle = `rgba(255,214,170,${m.alpha * (over ? 0.3 + 0.7 * litness(t, (x - OFFSET_X) / SCALE) : 0.35)})`;
195
+ moteCtx.beginPath();
196
+ moteCtx.arc(x, y, m.r, 0, TAU);
197
+ moteCtx.fill();
198
+ }
199
+ };
200
+
201
+ // The painting is drawn once. Dark painted title letters are lifted in place by a luminance-keyed gain
202
+ // (the plate under them stays put), and the mask canvas shows the same letters white on black for the
203
+ // contrast and cap-height gates.
204
+ const art = new Image();
205
+ art.src = PAINTING.src;
206
+ art.decode().then(() => {
207
+ const base = byId("base").getContext("2d", { willReadFrequently: true });
208
+ base.drawImage(art, 0, 0, PAINTING.width, PAINTING.height);
209
+ const letters = base.getImageData(gx, gy, gw, gh);
210
+ const mask = new ImageData(gw, gh);
211
+ const ramp = (a, b, x) => ease.smooth(clamp((x - a) / (b - a)));
212
+ for (let p = 0; p < gw * gh; p++) {
213
+ const o = p * 4;
214
+ const y = 0.2126 * letters.data[o] + 0.7152 * letters.data[o + 1] + 0.0722 * letters.data[o + 2];
215
+ const gain = 1 + (PAINTING.title.gain - 1) * ramp(8, 30, y);
216
+ for (let c = 0; c < 3; c++) letters.data[o + c] = Math.min(255, Math.round(letters.data[o + c] * gain));
217
+ const on = y > PAINTING.title.maskLevel ? 255 : 0;
218
+ mask.data[o] = mask.data[o + 1] = mask.data[o + 2] = on;
219
+ mask.data[o + 3] = 255;
220
+ }
221
+ base.putImageData(letters, gx, gy);
222
+ const maskCtx = byId("title-mask").getContext("2d");
223
+ maskCtx.fillStyle = "#000";
224
+ maskCtx.fillRect(0, 0, PAINTING.width, PAINTING.height);
225
+ maskCtx.putImageData(mask, gx, gy);
226
+ window.renderFrame(0);
227
+ window.ready = true;
228
+ });
229
+ </script>
230
+ </body>
231
+ </html>
@@ -0,0 +1,67 @@
1
+ {
2
+ "schema": 1,
3
+ "note": "The decoded gate row this recipe reached when it was pinned (npm run qa:cover-recipes re-renders it and fails when median d or the moving share leave +-15 %, seamLocal leaves TARGET or the file passes 2 MiB). Measured 2026-10-20 on headless Chrome's software rung and libwebp 1.6.0.",
4
+ "row": {
5
+ "medianD": 0.008467,
6
+ "movingFrac": 1,
7
+ "longestStillSec": 0.063,
8
+ "spike": 1.16,
9
+ "seamLocal": 1.181,
10
+ "bytes": 1468386
11
+ },
12
+ "settings": {
13
+ "size": [
14
+ 1000,
15
+ 500
16
+ ],
17
+ "fps": 16,
18
+ "frames": 128,
19
+ "encode": {
20
+ "q": 58,
21
+ "edgeQ": 58,
22
+ "edgeFrames": 0,
23
+ "method": 4
24
+ }
25
+ },
26
+ "treatment": {
27
+ "mode": "cover",
28
+ "request": "A README motion cover for LitCodex where the name itself moves.",
29
+ "idea": "A wave of weight rolls through the name and through faint rows of it that drift one word per loop.",
30
+ "recipe": "weight-tide",
31
+ "recipeReason": "The name is the material, so the motion happens inside the letters.",
32
+ "brandWord": "LITCODEX",
33
+ "motto": {
34
+ "text": "KEEP THE WORK LIT.",
35
+ "source": "project",
36
+ "from": "README.md"
37
+ },
38
+ "aspect": "2:1",
39
+ "loopSec": 8,
40
+ "fps": 16,
41
+ "layers": {
42
+ "slow": "Background rows drift one word length per loop, alternate rows opposite ways.",
43
+ "mid": "A weight swell offset by x and y crosses every letter once per loop.",
44
+ "beat": "A caret steps under each letter of the name with an overshoot and returns home."
45
+ },
46
+ "system": {
47
+ "rule": "Letter weight is a gain-shaped swell of the loop phase.",
48
+ "copies": "About 500 background letters and the eight letters of the name.",
49
+ "offset": "0.85 x / W + 0.35 y / H plus a little loop noise per row."
50
+ },
51
+ "title": {
52
+ "box": [
53
+ 0.13,
54
+ 0.32,
55
+ 0.74,
56
+ 0.3
57
+ ],
58
+ "kind": "live"
59
+ },
60
+ "encode": {
61
+ "q": 58,
62
+ "edgeQ": 58,
63
+ "edgeFrames": 0
64
+ },
65
+ "ambition": "The tide reads as one wave through many copies and the name never thins below a readable weight."
66
+ }
67
+ }
@@ -0,0 +1,103 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <!-- Cover recipe: weight tide (type as material). The brand word (NAME) never moves; a wave of weight
6
+ passes through it and through faint rows of it that drift exactly one word length per loop.
7
+ JetBrains Mono has a real wght axis (100-800) and a fixed advance, so nothing reflows while the
8
+ weight moves. Replace NAME and the motto with the project's own. -->
9
+ <link rel="stylesheet" href="/lit/fonts.css">
10
+ <script src="/lit/loop-kit.js"></script>
11
+ <style>
12
+ :root { --ground: #080d14; --ink: #1b2531; --ivory: #f2efdf; --signal: #ff6337; }
13
+ html, body { margin: 0; width: 1200px; height: 600px; overflow: hidden; background: var(--ground); font-family: "JetBrains Mono"; }
14
+ #rows { position: absolute; inset: 0; }
15
+ .row { position: absolute; left: 0; white-space: pre; font-size: 56px; line-height: 1; color: var(--ink); }
16
+ .row span, #name span { display: inline-block; }
17
+ #band { position: absolute; left: 0; right: 0; top: 180px; height: 252px; background: var(--ground); border-top: 2px solid #1f2a37; border-bottom: 2px solid #1f2a37; }
18
+ #name { position: absolute; left: 0; right: 0; top: 196px; text-align: center; font-size: 168px; line-height: 1; color: var(--ivory); white-space: pre; }
19
+ #caret { position: absolute; top: 364px; height: 9px; background: var(--signal); }
20
+ #motto { position: absolute; left: 0; right: 0; top: 400px; text-align: center; font-size: 19px; letter-spacing: 9px; color: #8b8f8f; font-weight: 500; }
21
+ #motto b { color: var(--signal); font-weight: 700; }
22
+ body.mask, body.mask * { color: #000 !important; background: #000 !important; border-color: #000 !important; }
23
+ body.mask #name, body.mask #name span { color: #fff !important; background: transparent !important; }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <div id="rows"></div>
28
+ <div id="band"></div>
29
+ <div id="name"></div>
30
+ <div id="caret"></div>
31
+ <div id="motto">KEEP THE WORK <b>LIT.</b></div>
32
+ <script>
33
+ // One rule: a letter's weight is a swell of the loop phase, offset by where the letter sits on screen.
34
+ // Slow layer: the rows drift one word per loop, alternate rows opposite ways, so letters travel through
35
+ // the tide (something must translate, or the encoder drops the weight change). Mid layer: the tide.
36
+ // Beat layer: a caret that dwells under each letter of the name, steps on with an overshoot and
37
+ // carriage-returns home on the last stop.
38
+ const { clamp, fract, mix, ease, swell, makeNoise, loopNoise, cubicPulse } = LitLoop;
39
+ const NAME = "LITCODEX";
40
+ const SEP = "·";
41
+ const ROW = { height: 64, size: 56, count: 10 };
42
+ const ADVANCE = ROW.size * 0.6;
43
+ const noise = makeNoise(7);
44
+ // The tide's front: a diagonal sweep (0.85 x/W + 0.35 y/H) plus a little loop noise per row.
45
+ const front = (x, y, row) => 0.85 * (x / 1200) + 0.35 * (y / 600) + 0.06 * row;
46
+ const tide = (t, offset) => ease.gain(swell(fract(t - offset)), 2.4);
47
+
48
+ const rows = Array.from({ length: ROW.count }, (_, r) => {
49
+ const el = document.createElement("div");
50
+ el.className = "row";
51
+ el.style.top = `${r * ROW.height - 18}px`;
52
+ const spans = [...(NAME + SEP).repeat(6)].map((ch) => {
53
+ const span = document.createElement("span");
54
+ span.textContent = ch;
55
+ el.appendChild(span);
56
+ return span;
57
+ });
58
+ document.getElementById("rows").appendChild(el);
59
+ return { el, spans, y: r * ROW.height + 10, dir: r % 2 ? 1 : -1, r };
60
+ });
61
+ const nameSpans = [...NAME].map((ch) => {
62
+ const span = document.createElement("span");
63
+ span.textContent = ch;
64
+ document.getElementById("name").appendChild(span);
65
+ return span;
66
+ });
67
+ const NAME_ADVANCE = 168 * 0.6;
68
+ const NAME_LEFT = (1200 - NAME_ADVANCE * NAME.length) / 2;
69
+ const caret = document.getElementById("caret");
70
+
71
+ window.renderFrame = (t, opts = {}) => {
72
+ document.body.className = opts.mask ? "mask" : "";
73
+ const word = (NAME.length + 1) * ADVANCE;
74
+ for (const row of rows) {
75
+ // Exactly one word of travel per loop keeps the drift seamless; loop noise breathes the row.
76
+ const shift = row.dir * word * t - word * 1.5 + 6 * loopNoise(noise, t, row.r * 3.1, 0.9);
77
+ row.el.style.transform = `translateX(${shift}px)`;
78
+ const wobble = 0.05 * loopNoise(noise, t, 40 + row.r, 1.1);
79
+ row.spans.forEach((span, i) => {
80
+ const k = tide(t, front(shift + (i + 0.5) * ADVANCE, row.y, row.r) + wobble);
81
+ span.style.fontVariationSettings = `"wght" ${Math.round(mix(100, 800, k))}`;
82
+ span.style.color = `rgb(${Math.round(mix(22, 46, k))},${Math.round(mix(31, 58, k))},${Math.round(mix(42, 74, k))})`;
83
+ });
84
+ }
85
+ // The name rides the same tide over a narrower range, so it never thins below a readable weight.
86
+ nameSpans.forEach((span, i) => {
87
+ span.style.fontVariationSettings = `"wght" ${Math.round(mix(330, 800, tide(t, front(NAME_LEFT + (i + 0.5) * NAME_ADVANCE, 300, 4.5))))}`;
88
+ });
89
+ const stops = NAME.length + 1;
90
+ const slot = Math.floor(t * stops);
91
+ const within = t * stops - slot;
92
+ const pos = slot < stops - 1 ? slot + ease.outBack(clamp((within - 0.62) / 0.38), 1.4) : NAME.length * (1 - ease.inCubic(clamp(within / 0.45)));
93
+ caret.style.left = `${NAME_LEFT + Math.min(pos, NAME.length) * NAME_ADVANCE + 6}px`;
94
+ caret.style.width = `${NAME_ADVANCE - 12}px`;
95
+ caret.style.opacity = String(1 - 0.75 * (slot === stops - 1 ? 0 : cubicPulse(0.3, 0.12, within)));
96
+ };
97
+ document.fonts.load('400 56px "JetBrains Mono"').then(() => document.fonts.ready).then(() => {
98
+ window.renderFrame(0);
99
+ window.ready = true;
100
+ });
101
+ </script>
102
+ </body>
103
+ </html>