shadok-ai 0.8.22 → 0.8.23
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/package.json +1 -1
- package/public/index.html +37 -32
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<title>shadok-ai — cockpit</title>
|
|
12
12
|
<!-- The idle favicon: a resting Shadok. paint() swaps in the pumping / "!" / "?"
|
|
13
13
|
variants once the JS runs; this is only the pre-script icon. -->
|
|
14
|
-
<link rel="icon" id="favicon" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20width%3D%2232%22%20height%3D%2232%22%20rx%3D%227%22%20fill%3D%22%2314161d%22%2F%3E%3Cg%20fill%3D%22%23f0a848%22%3E%3Crect%20x%3D%
|
|
14
|
+
<link rel="icon" id="favicon" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20width%3D%2232%22%20height%3D%2232%22%20rx%3D%227%22%20fill%3D%22%2314161d%22%2F%3E%3Cg%20fill%3D%22%23f0a848%22%3E%3Crect%20x%3D%2212%22%20y%3D%2224%22%20width%3D%221.9%22%20height%3D%227%22%20rx%3D%220.95%22%2F%3E%3Crect%20x%3D%2216.1%22%20y%3D%2224%22%20width%3D%221.9%22%20height%3D%227%22%20rx%3D%220.95%22%2F%3E%3Crect%20x%3D%229.8%22%20y%3D%2229.8%22%20width%3D%224.8%22%20height%3D%221.9%22%20rx%3D%220.95%22%2F%3E%3Crect%20x%3D%2215.4%22%20y%3D%2229.8%22%20width%3D%224.8%22%20height%3D%221.9%22%20rx%3D%220.95%22%2F%3E%3C%2Fg%3E%3Cg%3E%3Cellipse%20cx%3D%227.7%22%20cy%3D%2219.5%22%20rx%3D%222.1%22%20ry%3D%223.5%22%20fill%3D%22%23f0a848%22%20transform%3D%22rotate(-16%207.7%2019.5)%22%2F%3E%3Cellipse%20cx%3D%2222.3%22%20cy%3D%2219.5%22%20rx%3D%222.1%22%20ry%3D%223.5%22%20fill%3D%22%23f0a848%22%20transform%3D%22rotate(16%2022.3%2019.5)%22%2F%3E%3Cellipse%20cx%3D%2215%22%20cy%3D%2219.5%22%20rx%3D%227.8%22%20ry%3D%228.2%22%20fill%3D%22%23f0a848%22%2F%3E%3Crect%20x%3D%2213.4%22%20y%3D%228%22%20width%3D%223.2%22%20height%3D%225%22%20rx%3D%221.6%22%20fill%3D%22%23f0a848%22%2F%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%226.2%22%20r%3D%224.3%22%20fill%3D%22%23f0a848%22%2F%3E%3Cpath%20d%3D%22M13.6%209.8%20L16.4%209.8%20L15%2011.8%20Z%22%20fill%3D%22%23f0a848%22%2F%3E%3Ccircle%20cx%3D%2213.1%22%20cy%3D%226%22%20r%3D%222%22%20fill%3D%22%23fff%22%2F%3E%3Ccircle%20cx%3D%2216.9%22%20cy%3D%226%22%20r%3D%222%22%20fill%3D%22%23fff%22%2F%3E%3Ccircle%20cx%3D%2213.1%22%20cy%3D%226.1%22%20r%3D%221.1%22%20fill%3D%22%2314161d%22%2F%3E%3Ccircle%20cx%3D%2216.9%22%20cy%3D%226.1%22%20r%3D%221.1%22%20fill%3D%22%2314161d%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E">
|
|
15
15
|
<style>
|
|
16
16
|
:root {
|
|
17
17
|
--bg: #14161d;
|
|
@@ -1023,8 +1023,8 @@
|
|
|
1023
1023
|
/* The whole Shadok (body + arm + handle) bobs with translate — no
|
|
1024
1024
|
transform-origin, which is a cross-browser trap on SVG — while the pump rod
|
|
1025
1025
|
and legs stay planted, so the handle strokes up and down the rod. */
|
|
1026
|
-
#thinking .tw-shadok .sh-bob { animation: tw-bob 0.
|
|
1027
|
-
@keyframes tw-bob { 0%, 100% { transform: translateY(-1.
|
|
1026
|
+
#thinking .tw-shadok .sh-bob { animation: tw-bob 0.55s ease-in-out infinite; }
|
|
1027
|
+
@keyframes tw-bob { 0%, 100% { transform: translateY(-1.8px); } 50% { transform: translateY(2.2px); } }
|
|
1028
1028
|
@media (prefers-reduced-motion: reduce) {
|
|
1029
1029
|
#thinking .tw-text { animation: none; color: var(--phosphor); -webkit-text-fill-color: currentColor; }
|
|
1030
1030
|
#thinking .tw-shadok .sh-bob { animation: none; }
|
|
@@ -3165,45 +3165,50 @@
|
|
|
3165
3165
|
const v = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
3166
3166
|
return v || fallback;
|
|
3167
3167
|
}
|
|
3168
|
-
/** The Shadok itself — the cockpit's mascot, which famously PUMPS.
|
|
3169
|
-
*
|
|
3170
|
-
*
|
|
3171
|
-
*
|
|
3172
|
-
*
|
|
3173
|
-
*
|
|
3174
|
-
*
|
|
3175
|
-
*
|
|
3176
|
-
*
|
|
3177
|
-
*
|
|
3168
|
+
/** The Shadok itself — the cockpit's mascot, which famously PUMPS. Drawn
|
|
3169
|
+
* FRONT-ON: a plump round body, a short neck, a round head with two big googly
|
|
3170
|
+
* eyes (their signature — a side profile with a long beak read as a dinosaur),
|
|
3171
|
+
* a tiny beak, two stub wings, two long legs. One drawing serves every use.
|
|
3172
|
+
* `bob` poses one frame of the pump (the favicon animates by re-generating);
|
|
3173
|
+
* `anim` instead tags the bobbing group so CSS drives it (the DOM indicator
|
|
3174
|
+
* only — CSS animation inside a favicon data URI is unreliable). `pump` adds a
|
|
3175
|
+
* FIXED rod on the right the Shadok works with its wing; that steady reference,
|
|
3176
|
+
* with the planted legs, is what makes the bob read at favicon size. `sym`
|
|
3177
|
+
* stamps a bold "!" / "?" over the belly, outlined in the ground colour so the
|
|
3178
|
+
* accent-on-accent "?" still reads (the eyes stay clear above it). Legs (and,
|
|
3179
|
+
* pumping, the rod) stay planted; the body/head/wings bob. The Shadok shifts a
|
|
3180
|
+
* little left when pumping, to seat the rod on its right. Eyes are always
|
|
3181
|
+
* white + dark, never the accent, so they read on any `fill`. */
|
|
3178
3182
|
function shadokInner(fill, { bob = 0, pump = false, anim = false, sym = null, symColor } = {}) {
|
|
3179
3183
|
const base = themeColor("--bg", "#14161d");
|
|
3180
|
-
const
|
|
3184
|
+
const hx = pump ? 13.6 : 15; // body/head centre X
|
|
3185
|
+
const hy = 6.2; // head centre Y
|
|
3181
3186
|
const bobCls = anim ? ' class="sh-bob"' : "";
|
|
3182
3187
|
const bobTf = anim ? "" : ` transform="translate(0 ${bob})"`;
|
|
3183
|
-
// The
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
: `<g transform="rotate(6 ${cx + 4.6} 15.6)"><rect x="${cx + 3.6}" y="15" width="2.1" height="8.4" rx="1.05"/></g>`;
|
|
3189
|
-
const rod = pump ? `<rect x="${cx + 9.6}" y="16.5" width="1.5" height="12.7" rx="0.6" fill="${fill}"/>` : "";
|
|
3188
|
+
// The right wing rests low, or — pumping — angles up to work the rod's handle.
|
|
3189
|
+
const rWing = pump
|
|
3190
|
+
? `<ellipse cx="${hx + 7.6}" cy="17.8" rx="2.1" ry="3.4" fill="${fill}" transform="rotate(28 ${hx + 7.6} 17.8)"/>`
|
|
3191
|
+
: `<ellipse cx="${hx + 7.3}" cy="19.5" rx="2.1" ry="3.5" fill="${fill}" transform="rotate(16 ${hx + 7.3} 19.5)"/>`;
|
|
3192
|
+
const rod = pump ? `<rect x="23.4" y="15.5" width="1.5" height="13.7" rx="0.6" fill="${fill}"/>` : "";
|
|
3190
3193
|
const glyph = sym
|
|
3191
|
-
? `<text x="${
|
|
3194
|
+
? `<text x="${hx}" y="22" font-family="monospace" font-size="15.5" font-weight="800" fill="${symColor || fill}" stroke="${base}" stroke-width="2.6" paint-order="stroke" text-anchor="middle">${sym}</text>`
|
|
3192
3195
|
: "";
|
|
3193
3196
|
return (
|
|
3194
3197
|
rod +
|
|
3195
3198
|
// legs + feet (planted, not part of the bob)
|
|
3196
3199
|
`<g fill="${fill}">` +
|
|
3197
|
-
`<rect x="${
|
|
3198
|
-
`<rect x="${
|
|
3200
|
+
`<rect x="${hx - 3}" y="24" width="1.9" height="7" rx="0.95"/><rect x="${hx + 1.1}" y="24" width="1.9" height="7" rx="0.95"/>` +
|
|
3201
|
+
`<rect x="${hx - 5.2}" y="29.8" width="4.8" height="1.9" rx="0.95"/><rect x="${hx + 0.4}" y="29.8" width="4.8" height="1.9" rx="0.95"/>` +
|
|
3199
3202
|
`</g>` +
|
|
3200
|
-
//
|
|
3201
|
-
`<g${bobCls}
|
|
3202
|
-
`<ellipse cx="${
|
|
3203
|
-
|
|
3204
|
-
`<
|
|
3205
|
-
`<circle cx="${
|
|
3206
|
-
`<
|
|
3203
|
+
// wings + body + neck + head + beak + two eyes — all bob together
|
|
3204
|
+
`<g${bobCls}${bobTf}>` +
|
|
3205
|
+
`<ellipse cx="${hx - 7.3}" cy="19.5" rx="2.1" ry="3.5" fill="${fill}" transform="rotate(-16 ${hx - 7.3} 19.5)"/>${rWing}` +
|
|
3206
|
+
`<ellipse cx="${hx}" cy="19.5" rx="7.8" ry="8.2" fill="${fill}"/>` +
|
|
3207
|
+
`<rect x="${hx - 1.6}" y="8" width="3.2" height="5" rx="1.6" fill="${fill}"/>` +
|
|
3208
|
+
`<circle cx="${hx}" cy="${hy}" r="4.3" fill="${fill}"/>` +
|
|
3209
|
+
`<path d="M${hx - 1.4} ${hy + 3.6} L${hx + 1.4} ${hy + 3.6} L${hx} ${hy + 5.6} Z" fill="${fill}"/>` +
|
|
3210
|
+
`<circle cx="${hx - 1.9}" cy="${hy - 0.2}" r="2" fill="#fff"/><circle cx="${hx + 1.9}" cy="${hy - 0.2}" r="2" fill="#fff"/>` +
|
|
3211
|
+
`<circle cx="${hx - 1.9}" cy="${hy - 0.1}" r="1.1" fill="${base}"/><circle cx="${hx + 1.9}" cy="${hy - 0.1}" r="1.1" fill="${base}"/>` +
|
|
3207
3212
|
`</g>` +
|
|
3208
3213
|
glyph
|
|
3209
3214
|
);
|
|
@@ -3231,7 +3236,7 @@
|
|
|
3231
3236
|
function faviconPumpingSVG(phase) {
|
|
3232
3237
|
const accent = themeColor("--amber", "#f0a848");
|
|
3233
3238
|
const p = (Math.sin((phase / PUMP_FRAMES) * 2 * Math.PI - Math.PI / 2) + 1) / 2; // 0..1..0
|
|
3234
|
-
const bob = +(-2 + p * 4.
|
|
3239
|
+
const bob = +(-2 + p * 4.4).toFixed(2); // -2 (up) .. +2.4 (down): a big, visible stroke
|
|
3235
3240
|
return faviconWrap(shadokInner(accent, { bob, pump: true }));
|
|
3236
3241
|
}
|
|
3237
3242
|
/** What each channel is asking for, as the pure module wants it. */
|