accelr8 3.7.0 → 3.7.1

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-HY6ULYGH.js";
7
7
  import {
8
8
  DEFAULT_SERVER
9
- } from "./chunk-5BI2REGA.js";
9
+ } from "./chunk-P3CEHEKI.js";
10
10
 
11
11
  // src/radio/app.ts
12
12
  import tk from "terminal-kit";
@@ -139,20 +139,20 @@ var Showrunner = class {
139
139
  const vizHold = opts?.vizHold ?? DEFAULT_VIZ_HOLD;
140
140
  const fade = opts?.fade ?? FADE;
141
141
  this.fade = fade;
142
+ const VIZ_SLOTS = opts?.vizSlots ?? 60;
143
+ const BUMP_EVERY = opts?.bumpEvery ?? 6;
144
+ const VIG_EVERY = opts?.vigEvery ?? 30;
142
145
  const viz = scenes.filter((s) => s.kind === "visualizer");
143
146
  const bumps = scenes.filter((s) => s.kind === "bump");
144
147
  const vig = scenes.filter((s) => s.kind === "vignette");
145
148
  const push = (s) => this.seq.push({ scene: s, hold: Math.max(fade * 2, s.durationMs ?? vizHold) });
146
149
  if (viz.length) {
147
- let bi = 0, vgi = 0, count = 0;
148
- for (let i = 0; i < viz.length; i++) {
149
- push(viz[i]);
150
- count++;
151
- if (count % 2 === 0 && bumps.length) push(bumps[bi++ % bumps.length]);
152
- if (count % 6 === 0 && vig.length) push(vig[vgi++ % vig.length]);
150
+ let vi = 0, bi = 0, vgi = 0;
151
+ for (let n = 1; n <= VIZ_SLOTS; n++) {
152
+ push(viz[vi++ % viz.length]);
153
+ if (vig.length && n % VIG_EVERY === 0) push(vig[vgi++ % vig.length]);
154
+ else if (bumps.length && n % BUMP_EVERY === 0) push(bumps[bi++ % bumps.length]);
153
155
  }
154
- while (bi < bumps.length) push(bumps[bi++]);
155
- while (vgi < vig.length) push(vig[vgi++]);
156
156
  } else {
157
157
  for (const s of scenes) push(s);
158
158
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/protocol.ts
4
- var VERSION = true ? "3.7.0" : "3.7.0";
4
+ var VERSION = true ? "3.7.1" : "3.7.1";
5
5
  var PROTO = 3;
6
6
  var PORT = 8787;
7
7
  var DEFAULT_SERVER = "wss://accelr8-canvas.patonchain.workers.dev";
@@ -32,7 +32,7 @@ import {
32
32
  VERSION,
33
33
  decode,
34
34
  encode
35
- } from "./chunk-5BI2REGA.js";
35
+ } from "./chunk-P3CEHEKI.js";
36
36
 
37
37
  // src/client.ts
38
38
  import tk from "terminal-kit";
@@ -6,7 +6,7 @@ import {
6
6
  LIMITS,
7
7
  PORT,
8
8
  PROTO
9
- } from "./chunk-5BI2REGA.js";
9
+ } from "./chunk-P3CEHEKI.js";
10
10
 
11
11
  // src/server.ts
12
12
  import { WebSocketServer, WebSocket } from "ws";
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_SERVER,
4
4
  PORT,
5
5
  VERSION
6
- } from "./chunks/chunk-5BI2REGA.js";
6
+ } from "./chunks/chunk-P3CEHEKI.js";
7
7
 
8
8
  // src/cli.ts
9
9
  var HELP = `
@@ -53,7 +53,7 @@ async function main() {
53
53
  console.error(`invalid port: ${argVal(args, "--port")}`);
54
54
  process.exit(1);
55
55
  }
56
- const { runServer } = await import("./chunks/server-RZ7GYEFD.js");
56
+ const { runServer } = await import("./chunks/server-NZ5JUOCF.js");
57
57
  runServer(port);
58
58
  return;
59
59
  }
@@ -67,7 +67,7 @@ async function main() {
67
67
  console.error("accelr8 radio needs an interactive terminal (TTY).");
68
68
  process.exit(1);
69
69
  }
70
- const { runRadio } = await import("./chunks/app-LK4ZWGHW.js");
70
+ const { runRadio } = await import("./chunks/app-EOVXVIEE.js");
71
71
  runRadio({
72
72
  name: argVal(args, "--name"),
73
73
  server: argVal(args, "--server"),
@@ -90,7 +90,7 @@ async function main() {
90
90
  const { cachedUpdate, refreshUpdateCache } = await import("./chunks/update-UEPNGB6Y.js");
91
91
  refreshUpdateCache();
92
92
  const update = cachedUpdate(VERSION);
93
- const { runClient } = await import("./chunks/client-DSPPLOJJ.js");
93
+ const { runClient } = await import("./chunks/client-OIVTEENE.js");
94
94
  runClient({
95
95
  name: argVal(args, "--name"),
96
96
  server: argVal(args, "--server"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accelr8",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "description": "Collaborative ascii canvas in your terminal. Real multiplayer, live cursors, mouse-driven TUI.",
5
5
  "type": "module",
6
6
  "license": "ISC",