zx-kit 0.38.1 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/glow.d.ts +104 -0
- package/dist/glow.d.ts.map +1 -0
- package/dist/glow.js +128 -0
- package/dist/glow.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -187,6 +187,7 @@ Zero runtime dependencies, `sideEffects: false`, fully tree-shakeable.
|
|
|
187
187
|
| `lighting` | Dithered cave darkness, one blit per frame | [rendering](docs/rendering.md#lightingts--dithered-cave-darkness) |
|
|
188
188
|
| `audio` | 1-bit beeper: square-wave notes, patterns, stereo pan, volume + built-in auto-hide volume bar | [audio](docs/audio.md#audiots--beeper-audio) |
|
|
189
189
|
| `ay` | AY-3-8912: 3-channel tone, LFSR noise, 16 envelopes, per-channel stereo pan + volume | [audio](docs/audio.md#ayts--ay-3-8912-melodik-audio) |
|
|
190
|
+
| `aydump` | Real ZX-scene tunes: PSG register-dump player, sample-accurate AudioWorklet chip emulator | [audio](docs/audio.md#aydump--real-zx-scene-tunes-psg-register-dumps--experimental-037) |
|
|
190
191
|
| `music` | AY music by note name (`A5`, `C#4`) + looping | [audio](docs/audio.md#musicts--note-name-ay-music) |
|
|
191
192
|
| `collision` | AABB / rect-vs-tile / pixel-precise mask overlap | [collision](docs/collision.md) |
|
|
192
193
|
| `save` | Typed save/load: versioning, migration, slots, throttle, optional tamper signature | [save](docs/save.md) |
|
|
@@ -230,6 +231,8 @@ zx-kit/
|
|
|
230
231
|
│ ├── ay.ts # AY-3-8912: createAY, playAY, AYChannel, AYNote, AYChip,
|
|
231
232
|
│ │ # AYHandle, AYStereoMode (pan / setStereoMode / volume / fade),
|
|
232
233
|
│ │ # AY_VOL, AY_CLOCK, AY_ENVELOPE_SHAPES
|
|
234
|
+
│ ├── aydump.ts # PSG register-dump player: parsePSG, loadPSG, playAYDump,
|
|
235
|
+
│ │ # renderAYDump (AudioWorklet AY/YM chip emulator)
|
|
233
236
|
│ ├── music.ts # noteToFreq, seq, playAYLoop (note-name AY music)
|
|
234
237
|
│ ├── input.ts # initInput, tickMovement, consumeFlag,
|
|
235
238
|
│ │ # consumePause, consumeDebug, consumeAnyKey,
|
|
@@ -248,6 +251,8 @@ zx-kit/
|
|
|
248
251
|
│ ├── camera.ts # scrolling viewport, lerp, deadzone, bounds
|
|
249
252
|
│ ├── scene.ts # stack-based scene manager
|
|
250
253
|
│ ├── save.ts # typed localStorage save/load with migrations
|
|
254
|
+
│ ├── hiscore.ts # high-score table over the save envelope:
|
|
255
|
+
│ │ # createHighScores, insertScore, isHighScore
|
|
251
256
|
│ ├── presentation.ts # blinkVisible, drawBlinkingText, drawTapeStripes, drawMenuOptions
|
|
252
257
|
│ ├── debug.ts # createDebugMonitor, beginFrame/endFrame, drawDebugOverlay
|
|
253
258
|
│ └── i18n.ts # pickLocale runtime locale selection
|
package/dist/glow.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module glow
|
|
3
|
+
*
|
|
4
|
+
* **Optional phosphor GLOW / bloom — opt-in, purely additive.** The additive twin
|
|
5
|
+
* of {@link "lighting" | renderDarkness}: where lighting *subtracts* (dithered
|
|
6
|
+
* darkness), glow *adds* (a soft emissive bloom). A game marks its **light
|
|
7
|
+
* sources** — a torch, the moon, a sonar/radar blip — and their colour bleeds into
|
|
8
|
+
* the neighbours, so overlapping haloes sum into *perceived* extra colours **on the
|
|
9
|
+
* glass only**, while the crisp pixel-art framebuffer keeps its flat palette.
|
|
10
|
+
*
|
|
11
|
+
* **Emissive, not brighter (path B).** Glow is a marker on *sources of light*, not
|
|
12
|
+
* a lighter flat colour — the palette is never diluted. Everything the game does
|
|
13
|
+
* NOT draw into the glow layer stays exactly as before: this module adds new
|
|
14
|
+
* exports only, touches no existing render path, and a game that never calls
|
|
15
|
+
* {@link createGlowLayer} / {@link renderGlow} is byte-for-byte unaffected (it
|
|
16
|
+
* tree-shakes away).
|
|
17
|
+
*
|
|
18
|
+
* **Cheap bloom, no WebGL:** the emissive layer is **downscaled** to a small buffer
|
|
19
|
+
* and **upscaled** back with bilinear smoothing — that scaling IS the blur, for
|
|
20
|
+
* free — then blitted onto the frame with `globalCompositeOperation = 'lighter'`
|
|
21
|
+
* (additive). One offscreen buffer, a couple of `drawImage`s, headless-safe.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const glow = createGlowLayer(256, 192) // once, view-sized
|
|
26
|
+
* // each frame, AFTER drawing the scene, BEFORE scanlines:
|
|
27
|
+
* renderGlow(glow, ctx, (g) => {
|
|
28
|
+
* drawGlowSource(g, { x: torchX, y: torchY, radius: 24, color: C.B_YELLOW, intensity: 0.9 })
|
|
29
|
+
* drawGlowSource(g, { x: moonX, y: moonY, radius: 40, color: C.B_WHITE, intensity: 0.5 })
|
|
30
|
+
* // …or draw sprites/pixels directly for pixel-exact glow
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
import { type SpectrumColor } from './palette.js';
|
|
35
|
+
/** Tunables for a {@link GlowLayer}. All optional; defaults are an eye-tuning start. */
|
|
36
|
+
export interface GlowOptions {
|
|
37
|
+
/** Blur strength: the emissive layer is scaled down by this factor before the
|
|
38
|
+
* bilinear upscale spreads it. Bigger = softer & cheaper. Clamped ≥ 1. Default `4`. */
|
|
39
|
+
downscale?: number;
|
|
40
|
+
/** How many additive blits of the bloom (brightness/saturation of the halo).
|
|
41
|
+
* Clamped ≥ 1. Default `1`. */
|
|
42
|
+
passes?: number;
|
|
43
|
+
/** Global bloom strength, `0..1` — the `globalAlpha` of each additive blit.
|
|
44
|
+
* Clamped to `0..1`. Default `0.5`. */
|
|
45
|
+
alpha?: number;
|
|
46
|
+
}
|
|
47
|
+
/** A view-sized glow layer: one emissive canvas + one downscale buffer. Allocate
|
|
48
|
+
* once, reuse across frames. Both canvases are `null` when headless (no document). */
|
|
49
|
+
export interface GlowLayer {
|
|
50
|
+
readonly width: number;
|
|
51
|
+
readonly height: number;
|
|
52
|
+
readonly downscale: number;
|
|
53
|
+
readonly passes: number;
|
|
54
|
+
readonly alpha: number;
|
|
55
|
+
/** Emissive layer — sources drawn here each frame (transparent elsewhere). `null` headless. */
|
|
56
|
+
readonly source: HTMLCanvasElement | null;
|
|
57
|
+
/** Small downscale buffer (the blur). `null` headless. */
|
|
58
|
+
readonly blur: HTMLCanvasElement | null;
|
|
59
|
+
}
|
|
60
|
+
/** A single light source for {@link drawGlowSource}: a soft coloured blob whose
|
|
61
|
+
* bloom is scaled by `intensity`. Blooms in its **own** `color` — never white-only. */
|
|
62
|
+
export interface GlowSource {
|
|
63
|
+
/** Centre in screen px. */
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
/** Reach in px (the blob's radius). */
|
|
67
|
+
radius: number;
|
|
68
|
+
/** The source's colour — the halo takes this colour. */
|
|
69
|
+
color: SpectrumColor;
|
|
70
|
+
/** Brightness scale `0..1` (default `1`). A dim torch vs a bright radar. */
|
|
71
|
+
intensity?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Downscale-buffer dimensions for a `width`×`height` view at `downscale` — pure,
|
|
75
|
+
* exported for tests. Each axis is floored, never below 1.
|
|
76
|
+
*/
|
|
77
|
+
export declare function glowBufferSize(width: number, height: number, downscale: number): {
|
|
78
|
+
w: number;
|
|
79
|
+
h: number;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Creates a view-sized glow layer. `opts` tune the bloom ({@link GlowOptions}).
|
|
83
|
+
* Allocate once; reuse. Headless (no `document`): both canvases are `null` and
|
|
84
|
+
* {@link renderGlow} becomes a no-op.
|
|
85
|
+
*/
|
|
86
|
+
export declare function createGlowLayer(width: number, height: number, opts?: GlowOptions): GlowLayer;
|
|
87
|
+
/**
|
|
88
|
+
* Draws one {@link GlowSource} — a soft radial blob in the source's own colour,
|
|
89
|
+
* scaled by `intensity` — into the emissive canvas context `g` (the one handed to
|
|
90
|
+
* the {@link renderGlow} callback). The blob fades to transparent at `radius`, so
|
|
91
|
+
* it adds nothing outside its reach when the layer is blitted with `'lighter'`.
|
|
92
|
+
*/
|
|
93
|
+
export declare function drawGlowSource(g: CanvasRenderingContext2D, source: GlowSource): void;
|
|
94
|
+
/**
|
|
95
|
+
* Renders the bloom onto `ctx`, additively. Call each frame AFTER the scene is
|
|
96
|
+
* drawn (and before scanlines / `curveDisplay`). `drawSources` receives the
|
|
97
|
+
* emissive canvas context — draw your light sources into it (via
|
|
98
|
+
* {@link drawGlowSource} or any drawing). Their colour is then blurred (downscale
|
|
99
|
+
* → bilinear upscale) and blitted onto `ctx` with `'lighter'` at the layer's
|
|
100
|
+
* `alpha`, `passes` times. Restores `ctx`'s composite/alpha/smoothing afterwards,
|
|
101
|
+
* so it composes cleanly with the rest of the frame. Headless: a silent no-op.
|
|
102
|
+
*/
|
|
103
|
+
export declare function renderGlow(layer: GlowLayer, ctx: CanvasRenderingContext2D, drawSources: (g: CanvasRenderingContext2D) => void): void;
|
|
104
|
+
//# sourceMappingURL=glow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glow.d.ts","sourceRoot":"","sources":["../src/glow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,wFAAwF;AACxF,MAAM,WAAW,WAAW;IAC1B;4FACwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;oCACgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;4CACwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;uFACuF;AACvF,MAAM,WAAW,SAAS;IACx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@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module glow
|
|
3
|
+
*
|
|
4
|
+
* **Optional phosphor GLOW / bloom — opt-in, purely additive.** The additive twin
|
|
5
|
+
* of {@link "lighting" | renderDarkness}: where lighting *subtracts* (dithered
|
|
6
|
+
* darkness), glow *adds* (a soft emissive bloom). A game marks its **light
|
|
7
|
+
* sources** — a torch, the moon, a sonar/radar blip — and their colour bleeds into
|
|
8
|
+
* the neighbours, so overlapping haloes sum into *perceived* extra colours **on the
|
|
9
|
+
* glass only**, while the crisp pixel-art framebuffer keeps its flat palette.
|
|
10
|
+
*
|
|
11
|
+
* **Emissive, not brighter (path B).** Glow is a marker on *sources of light*, not
|
|
12
|
+
* a lighter flat colour — the palette is never diluted. Everything the game does
|
|
13
|
+
* NOT draw into the glow layer stays exactly as before: this module adds new
|
|
14
|
+
* exports only, touches no existing render path, and a game that never calls
|
|
15
|
+
* {@link createGlowLayer} / {@link renderGlow} is byte-for-byte unaffected (it
|
|
16
|
+
* tree-shakes away).
|
|
17
|
+
*
|
|
18
|
+
* **Cheap bloom, no WebGL:** the emissive layer is **downscaled** to a small buffer
|
|
19
|
+
* and **upscaled** back with bilinear smoothing — that scaling IS the blur, for
|
|
20
|
+
* free — then blitted onto the frame with `globalCompositeOperation = 'lighter'`
|
|
21
|
+
* (additive). One offscreen buffer, a couple of `drawImage`s, headless-safe.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const glow = createGlowLayer(256, 192) // once, view-sized
|
|
26
|
+
* // each frame, AFTER drawing the scene, BEFORE scanlines:
|
|
27
|
+
* renderGlow(glow, ctx, (g) => {
|
|
28
|
+
* drawGlowSource(g, { x: torchX, y: torchY, radius: 24, color: C.B_YELLOW, intensity: 0.9 })
|
|
29
|
+
* drawGlowSource(g, { x: moonX, y: moonY, radius: 40, color: C.B_WHITE, intensity: 0.5 })
|
|
30
|
+
* // …or draw sprites/pixels directly for pixel-exact glow
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
import {} from './palette.js';
|
|
35
|
+
const clampInt1 = (n, dflt) => Number.isFinite(n) && n >= 1 ? Math.floor(n) : dflt;
|
|
36
|
+
const clamp01 = (n, dflt) => Number.isFinite(n) ? (n < 0 ? 0 : n > 1 ? 1 : n) : dflt;
|
|
37
|
+
/**
|
|
38
|
+
* Downscale-buffer dimensions for a `width`×`height` view at `downscale` — pure,
|
|
39
|
+
* exported for tests. Each axis is floored, never below 1.
|
|
40
|
+
*/
|
|
41
|
+
export function glowBufferSize(width, height, downscale) {
|
|
42
|
+
const d = clampInt1(downscale, 4);
|
|
43
|
+
return { w: Math.max(1, Math.floor(width / d)), h: Math.max(1, Math.floor(height / d)) };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates a view-sized glow layer. `opts` tune the bloom ({@link GlowOptions}).
|
|
47
|
+
* Allocate once; reuse. Headless (no `document`): both canvases are `null` and
|
|
48
|
+
* {@link renderGlow} becomes a no-op.
|
|
49
|
+
*/
|
|
50
|
+
export function createGlowLayer(width, height, opts = {}) {
|
|
51
|
+
if (!Number.isInteger(width) || width <= 0 || !Number.isInteger(height) || height <= 0) {
|
|
52
|
+
throw new Error(`createGlowLayer: width and height must be positive integers, got ${width}×${height}`);
|
|
53
|
+
}
|
|
54
|
+
const downscale = clampInt1(opts.downscale ?? 4, 4);
|
|
55
|
+
const passes = clampInt1(opts.passes ?? 1, 1);
|
|
56
|
+
const alpha = clamp01(opts.alpha ?? 0.5, 0.5);
|
|
57
|
+
let source = null;
|
|
58
|
+
let blur = null;
|
|
59
|
+
if (typeof document !== 'undefined') {
|
|
60
|
+
const { w, h } = glowBufferSize(width, height, downscale);
|
|
61
|
+
source = document.createElement('canvas');
|
|
62
|
+
source.width = width;
|
|
63
|
+
source.height = height;
|
|
64
|
+
blur = document.createElement('canvas');
|
|
65
|
+
blur.width = w;
|
|
66
|
+
blur.height = h;
|
|
67
|
+
}
|
|
68
|
+
return { width, height, downscale, passes, alpha, source, blur };
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Draws one {@link GlowSource} — a soft radial blob in the source's own colour,
|
|
72
|
+
* scaled by `intensity` — into the emissive canvas context `g` (the one handed to
|
|
73
|
+
* the {@link renderGlow} callback). The blob fades to transparent at `radius`, so
|
|
74
|
+
* it adds nothing outside its reach when the layer is blitted with `'lighter'`.
|
|
75
|
+
*/
|
|
76
|
+
export function drawGlowSource(g, source) {
|
|
77
|
+
const intensity = clamp01(source.intensity ?? 1, 1);
|
|
78
|
+
if (intensity <= 0 || source.radius <= 0)
|
|
79
|
+
return;
|
|
80
|
+
const grad = g.createRadialGradient(source.x, source.y, 0, source.x, source.y, source.radius);
|
|
81
|
+
grad.addColorStop(0, source.color);
|
|
82
|
+
grad.addColorStop(1, 'transparent');
|
|
83
|
+
const prevAlpha = g.globalAlpha;
|
|
84
|
+
g.globalAlpha = intensity;
|
|
85
|
+
g.fillStyle = grad;
|
|
86
|
+
g.fillRect(source.x - source.radius, source.y - source.radius, source.radius * 2, source.radius * 2);
|
|
87
|
+
g.globalAlpha = prevAlpha;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Renders the bloom onto `ctx`, additively. Call each frame AFTER the scene is
|
|
91
|
+
* drawn (and before scanlines / `curveDisplay`). `drawSources` receives the
|
|
92
|
+
* emissive canvas context — draw your light sources into it (via
|
|
93
|
+
* {@link drawGlowSource} or any drawing). Their colour is then blurred (downscale
|
|
94
|
+
* → bilinear upscale) and blitted onto `ctx` with `'lighter'` at the layer's
|
|
95
|
+
* `alpha`, `passes` times. Restores `ctx`'s composite/alpha/smoothing afterwards,
|
|
96
|
+
* so it composes cleanly with the rest of the frame. Headless: a silent no-op.
|
|
97
|
+
*/
|
|
98
|
+
export function renderGlow(layer, ctx, drawSources) {
|
|
99
|
+
const { source, blur, width, height, passes, alpha } = layer;
|
|
100
|
+
if (!source || !blur)
|
|
101
|
+
return; // headless → nothing to draw
|
|
102
|
+
// Draw the emissive sources, then downscale into the small blur buffer. In a
|
|
103
|
+
// browser both contexts exist; headless-ish (jsdom, getContext null) this block
|
|
104
|
+
// is skipped and only the blit below runs — mirrors renderDarkness.
|
|
105
|
+
const g = source.getContext('2d');
|
|
106
|
+
const b = blur.getContext('2d');
|
|
107
|
+
if (g && b) {
|
|
108
|
+
g.clearRect(0, 0, width, height); // transparent = additive-neutral
|
|
109
|
+
drawSources(g);
|
|
110
|
+
b.imageSmoothingEnabled = true;
|
|
111
|
+
b.clearRect(0, 0, blur.width, blur.height);
|
|
112
|
+
b.drawImage(source, 0, 0, blur.width, blur.height); // downscale (average)
|
|
113
|
+
}
|
|
114
|
+
// Upscale + additive blit: drawing the small buffer back to full size with
|
|
115
|
+
// smoothing on IS the blur; 'lighter' sums the haloes over the flat scene.
|
|
116
|
+
const prevSmooth = ctx.imageSmoothingEnabled;
|
|
117
|
+
const prevOp = ctx.globalCompositeOperation;
|
|
118
|
+
const prevAlpha = ctx.globalAlpha;
|
|
119
|
+
ctx.imageSmoothingEnabled = true;
|
|
120
|
+
ctx.globalCompositeOperation = 'lighter';
|
|
121
|
+
ctx.globalAlpha = alpha;
|
|
122
|
+
for (let i = 0; i < passes; i++)
|
|
123
|
+
ctx.drawImage(blur, 0, 0, width, height);
|
|
124
|
+
ctx.imageSmoothingEnabled = prevSmooth;
|
|
125
|
+
ctx.globalCompositeOperation = prevOp;
|
|
126
|
+
ctx.globalAlpha = prevAlpha;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=glow.js.map
|
package/dist/glow.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glow.js","sourceRoot":"","sources":["../src/glow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAsB,MAAM,cAAc,CAAA;AA2CjD,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,IA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Ac,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zx-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/zrebec/zx-kit.git"
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsc",
|
|
25
25
|
"prepublishOnly": "npm run build",
|
|
26
|
-
"test": "vitest run"
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:coverage": "vitest run --coverage"
|
|
27
28
|
},
|
|
28
29
|
"keywords": [
|
|
29
30
|
"zx-spectrum",
|