@neo-ui-kit/react 1.3.12 → 1.3.13
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 -1
- package/dist/index.js +21 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,10 @@ Migration: replace `@ad-voice/ui` with `@neo-ui-kit/react` in dependencies and i
|
|
|
4
4
|
|
|
5
5
|
NEO UI — React + TypeScript UI kit: glass/ruby surfaces, animated neon borders, fields, tabs, dialogs, audio controls and a melody editor.
|
|
6
6
|
|
|
7
|
+
## 1.3.13
|
|
8
|
+
|
|
9
|
+
MelodyRoll skips repainting empty glow/voice/trail layers and a settled keyboard. A disappearing voice still clears its last frame, and keyboard hover, press and hit transitions retain their final frame. See the [performance report](https://github.com/Pro100Dimka/adui/blob/main/evidence/performance-report.md) for karaoke measurements and remaining limits under CPU ×16.
|
|
10
|
+
|
|
7
11
|
## 1.3.12
|
|
8
12
|
|
|
9
13
|
- MelodyRoll avoids repeated full style measurements for unrelated animated CSS variables and native root shadows while its beat is idle. Theme aliases still trigger reconfiguration.
|
|
@@ -47,7 +51,7 @@ import "@neo-ui-kit/react/styles.css";
|
|
|
47
51
|
To test repository changes before publishing, run `npm run package` from the repository root and install the resulting archive in a separate application:
|
|
48
52
|
|
|
49
53
|
```bash
|
|
50
|
-
npm install /path/to/adui/release/neo-ui-kit-react-1.3.
|
|
54
|
+
npm install /path/to/adui/release/neo-ui-kit-react-1.3.13.tgz
|
|
51
55
|
```
|
|
52
56
|
|
|
53
57
|
Maintainers publish new versions from `Pro100Dimka/adui` using the `release.yml` GitHub Actions workflow, a matching `v<version>` tag, and the `npm-publication` environment. npm trusts its OIDC identity; no `NPM_TOKEN` is required. The workflow checks the project and packed consumer before publishing the tested archive. Published `1.0.0` cannot be overwritten: code and README changes in npm require a new package version. See the [repository release instructions](https://github.com/Pro100Dimka/adui#npm-пакет).
|
package/dist/index.js
CHANGED
|
@@ -6327,6 +6327,7 @@ function renderGlow() {
|
|
|
6327
6327
|
scene.noteStates = kept;
|
|
6328
6328
|
scene.keyStates ??= /* @__PURE__ */ new Map();
|
|
6329
6329
|
const keyStates = /* @__PURE__ */ new Map();
|
|
6330
|
+
let keysUntil = 0;
|
|
6330
6331
|
for (const key of style.keys) {
|
|
6331
6332
|
const previous = scene.keyStates.get(key.midi);
|
|
6332
6333
|
const active = state.pitch !== void 0 && key.midi === Math.round(state.pitch);
|
|
@@ -6334,6 +6335,7 @@ function renderGlow() {
|
|
|
6334
6335
|
const pressed = scene.pressed?.includes(key.midi);
|
|
6335
6336
|
const variant = hit ? "hit" : active ? "active" : pressed ? "pressed" : "base";
|
|
6336
6337
|
const target = key[variant];
|
|
6338
|
+
if (previous?.variant !== variant) scene.keysDirty = true;
|
|
6337
6339
|
const item = {
|
|
6338
6340
|
key,
|
|
6339
6341
|
target,
|
|
@@ -6346,11 +6348,12 @@ function renderGlow() {
|
|
|
6346
6348
|
hitStart: hit && !previous?.hit ? previous ? now : scene.keyTimes?.[key.midi] ?? now : previous?.hitStart ?? now
|
|
6347
6349
|
};
|
|
6348
6350
|
keyStates.set(key.midi, item);
|
|
6349
|
-
|
|
6351
|
+
keysUntil = Math.max(keysUntil, ...["color", "shadows", "shift"].map((name) => item[name].start + item[name].duration), hit && key.hitDuration > 0 ? item.hitStart + key.hitDuration * key.hitIterations : 0);
|
|
6350
6352
|
}
|
|
6351
6353
|
scene.keyStates = keyStates;
|
|
6352
6354
|
scene.noteTimes = scene.keyTimes = void 0;
|
|
6353
|
-
scene.
|
|
6355
|
+
scene.keysUntil = keysUntil;
|
|
6356
|
+
scene.foregroundUntil = Math.max(until, keysUntil);
|
|
6354
6357
|
}
|
|
6355
6358
|
function drawForeground(scene, now) {
|
|
6356
6359
|
if (!scene.foreground) return;
|
|
@@ -6434,6 +6437,10 @@ function renderGlow() {
|
|
|
6434
6437
|
ctx.drawImage(painted, x - padding / dpr, top + height / 2 + (y - padding / dpr - top - height / 2) * scale, painted.width / dpr, painted.height / dpr * scale);
|
|
6435
6438
|
ctx.restore();
|
|
6436
6439
|
}
|
|
6440
|
+
const keysAnimating = now < scene.keysUntil;
|
|
6441
|
+
if (!scene.keysDirty && !scene.keysAnimating && !keysAnimating) return;
|
|
6442
|
+
scene.keysDirty = false;
|
|
6443
|
+
scene.keysAnimating = keysAnimating;
|
|
6437
6444
|
keyCtx.clearRect(0, 0, style.keyWidth, style.keyHeight);
|
|
6438
6445
|
scene.keySprites ??= /* @__PURE__ */ new Map();
|
|
6439
6446
|
for (const item of scene.keyStates.values()) {
|
|
@@ -6489,7 +6496,11 @@ function renderGlow() {
|
|
|
6489
6496
|
}
|
|
6490
6497
|
function drawVoice(scene, now) {
|
|
6491
6498
|
const { voiceCtx: ctx, laneWidth, laneHeight, state, voiceStyle: style, dpr } = scene;
|
|
6499
|
+
const active = state.pitch !== void 0 || state.beat > 0;
|
|
6500
|
+
if (!active && !scene.voicePainted) return;
|
|
6501
|
+
scene.voicePainted = active;
|
|
6492
6502
|
ctx.clearRect(0, 0, laneWidth, laneHeight);
|
|
6503
|
+
if (!active) return;
|
|
6493
6504
|
ctx.save();
|
|
6494
6505
|
const head = state.lead * laneWidth - scene.headWidth / 2;
|
|
6495
6506
|
const offset = laneWidth + 200;
|
|
@@ -6541,7 +6552,11 @@ function renderGlow() {
|
|
|
6541
6552
|
}
|
|
6542
6553
|
function drawTrail(scene) {
|
|
6543
6554
|
const { trailCtx: ctx, laneWidth, laneHeight, state, trailStyle } = scene;
|
|
6555
|
+
const active = scene.trail.some((point) => point.pitch !== void 0);
|
|
6556
|
+
if (!active && !scene.trailPainted) return;
|
|
6557
|
+
scene.trailPainted = active;
|
|
6544
6558
|
ctx.clearRect(0, 0, laneWidth, laneHeight);
|
|
6559
|
+
if (!active) return;
|
|
6545
6560
|
const paths = [];
|
|
6546
6561
|
let path = null;
|
|
6547
6562
|
for (const point of scene.trail) {
|
|
@@ -6568,8 +6583,9 @@ function renderGlow() {
|
|
|
6568
6583
|
}
|
|
6569
6584
|
function draw(scene, now) {
|
|
6570
6585
|
const { ctx, width, height, pad, radius: radius2, blur, color: color3, dpr } = scene;
|
|
6571
|
-
ctx.clearRect(0, 0, width + pad * 2, height + pad * 2);
|
|
6572
6586
|
const amount = value(scene, now);
|
|
6587
|
+
if (amount > 0 || scene.glowPainted) ctx.clearRect(0, 0, width + pad * 2, height + pad * 2);
|
|
6588
|
+
scene.glowPainted = amount > 0;
|
|
6573
6589
|
if (amount > 0) {
|
|
6574
6590
|
ctx.save();
|
|
6575
6591
|
ctx.beginPath();
|
|
@@ -6661,6 +6677,7 @@ function renderGlow() {
|
|
|
6661
6677
|
scene.keyCtx = scene.keyCanvas.getContext("2d");
|
|
6662
6678
|
scene.noteCtx.setTransform(data.dpr, 0, 0, data.dpr, 0, 0);
|
|
6663
6679
|
scene.keyCtx.setTransform(data.dpr, 0, 0, data.dpr, 0, 0);
|
|
6680
|
+
scene.keysDirty = true;
|
|
6664
6681
|
scene.sprites?.clear();
|
|
6665
6682
|
scene.keySprites?.clear();
|
|
6666
6683
|
scene.filteredSprites?.clear();
|
|
@@ -6699,6 +6716,7 @@ function renderGlow() {
|
|
|
6699
6716
|
retargetVoice(scene, now, previous);
|
|
6700
6717
|
retargetForeground(scene, now);
|
|
6701
6718
|
} else if (scene && data.type === "keys") {
|
|
6719
|
+
scene.keysDirty = true;
|
|
6702
6720
|
scene.pressed = data.pressed;
|
|
6703
6721
|
scene.hovered = data.hovered;
|
|
6704
6722
|
retargetForeground(scene, now);
|