@neo-ui-kit/react 1.4.5 → 1.4.7
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 +1 -1
- package/dist/chunks/{chunk-P5SNVRBZ.js → chunk-5KH4JI2K.js} +44 -33
- package/dist/chunks/{chunk-4XHHN4GR.js → chunk-VRD5EAQ4.js} +1 -1
- package/dist/core.js +1 -1
- package/dist/forms.js +2 -2
- package/dist/index.js +2 -2
- package/dist/theme/base.css +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ import "@neo-ui-kit/react/styles.css";
|
|
|
65
65
|
To test repository changes before publishing, run `npm run package` from the repository root and install the resulting archive in a separate application:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npm install /path/to/adui/release/neo-ui-kit-react-1.4.
|
|
68
|
+
npm install /path/to/adui/release/neo-ui-kit-react-1.4.7.tgz
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
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-пакет).
|
|
@@ -370,6 +370,7 @@ function createBorderWorker(item) {
|
|
|
370
370
|
groups.forEach((group) => {
|
|
371
371
|
group.style.visibility = "hidden";
|
|
372
372
|
});
|
|
373
|
+
item.overlay.setAttribute("data-ready", "");
|
|
373
374
|
canvas.style.visibility = "";
|
|
374
375
|
visibility();
|
|
375
376
|
},
|
|
@@ -389,6 +390,7 @@ function createBorderWorker(item) {
|
|
|
389
390
|
groups.forEach((group, index) => {
|
|
390
391
|
group.style.visibility = originalVisibility[index];
|
|
391
392
|
});
|
|
393
|
+
item.overlay.setAttribute("data-ready", "");
|
|
392
394
|
canvas.remove();
|
|
393
395
|
clients.delete(id);
|
|
394
396
|
if (worker === thread2) thread2.postMessage({ type: "remove", id });
|
|
@@ -404,7 +406,7 @@ function createBorderWorker(item) {
|
|
|
404
406
|
}
|
|
405
407
|
async function update() {
|
|
406
408
|
const dpr = devicePixelRatio || 1;
|
|
407
|
-
const width = item.
|
|
409
|
+
const width = item.width + 32, height = item.height + 32;
|
|
408
410
|
const radius = item.lights[0].radius;
|
|
409
411
|
const styles = groups.map((group) => ({
|
|
410
412
|
mask: group.style.maskImage,
|
|
@@ -1153,6 +1155,7 @@ function tick(now) {
|
|
|
1153
1155
|
}
|
|
1154
1156
|
if (needsScan || now - lastScan > 400) scan(now);
|
|
1155
1157
|
const deadline = performance.now() + 8;
|
|
1158
|
+
const updates = [];
|
|
1156
1159
|
for (const item of measurements) {
|
|
1157
1160
|
if (!item.element.isConnected) {
|
|
1158
1161
|
measurements.delete(item);
|
|
@@ -1161,8 +1164,9 @@ function tick(now) {
|
|
|
1161
1164
|
if (item.element._adInView === false) continue;
|
|
1162
1165
|
if (performance.now() >= deadline) break;
|
|
1163
1166
|
measurements.delete(item);
|
|
1164
|
-
item.
|
|
1167
|
+
updates.push(item.measure());
|
|
1165
1168
|
}
|
|
1169
|
+
for (const update of updates) update?.();
|
|
1166
1170
|
if (now - last >= FRAME - 6) {
|
|
1167
1171
|
if (FRAME > 1e3 / 60)
|
|
1168
1172
|
for (const animation of active) animation.currentTime = now - animation.__adStart;
|
|
@@ -1501,7 +1505,7 @@ U.attachBorder = (element, { shell = false, round = false, scope, defer = false
|
|
|
1501
1505
|
for (const spot of light.spots) spot.style.transform = transform;
|
|
1502
1506
|
}
|
|
1503
1507
|
};
|
|
1504
|
-
item.
|
|
1508
|
+
item.measure = () => {
|
|
1505
1509
|
const computed = getComputedStyle(element);
|
|
1506
1510
|
const sides = ["Top", "Right", "Bottom", "Left"];
|
|
1507
1511
|
const borderWidths = sides.map((side) => parseFloat(computed[`border${side}Width`]) || 0);
|
|
@@ -1510,10 +1514,7 @@ U.attachBorder = (element, { shell = false, round = false, scope, defer = false
|
|
|
1510
1514
|
return Number.isFinite(value) ? value + (computed.boxSizing === "border-box" ? 0 : [start, end].reduce((sum, side) => sum + borderWidths[side] + (parseFloat(computed[`padding${sides[side]}`]) || 0), 0)) : element[fallback];
|
|
1511
1515
|
});
|
|
1512
1516
|
if (!w || !h) return;
|
|
1513
|
-
|
|
1514
|
-
item.patchedPosition = true;
|
|
1515
|
-
element.style.position = "relative";
|
|
1516
|
-
}
|
|
1517
|
+
const patchPosition = computed.position === "static";
|
|
1517
1518
|
const corners = ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map((corner) => {
|
|
1518
1519
|
const values = (computed[`border${corner}Radius`] || computed.borderTopLeftRadius).split(/\s+/);
|
|
1519
1520
|
return [w, h].map((size, axis) => {
|
|
@@ -1523,34 +1524,44 @@ U.attachBorder = (element, { shell = false, round = false, scope, defer = false
|
|
|
1523
1524
|
});
|
|
1524
1525
|
const geometry = `${w},${h},${corners},${borderWidths}`;
|
|
1525
1526
|
if (item.geometry === geometry) return;
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
item.contour = U.roundedPath(w, h, corners);
|
|
1531
|
-
const { d } = item.contour;
|
|
1532
|
-
edge.setAttribute("viewBox", `0 0 ${w} ${h}`);
|
|
1533
|
-
path.setAttribute("d", d);
|
|
1534
|
-
for (const [node, strokes] of [[aura, AURA], [core, [[shell ? 1.9 : 1.35, 1]]]]) {
|
|
1535
|
-
const mask = ringMask(w, h, d, strokes);
|
|
1536
|
-
node.style.maskImage = mask;
|
|
1537
|
-
node.style.webkitMaskImage = mask;
|
|
1538
|
-
}
|
|
1539
|
-
item.length = item.contour.length;
|
|
1540
|
-
radius = round ? 28 : Math.min(260, Math.max(42, item.length * 0.153));
|
|
1541
|
-
for (const light of lights) {
|
|
1542
|
-
light.radius = radius;
|
|
1543
|
-
for (const spot of light.spots) {
|
|
1544
|
-
spot.style.width = `${radius * 2}px`;
|
|
1545
|
-
spot.style.height = `${radius * 2}px`;
|
|
1527
|
+
return () => {
|
|
1528
|
+
if (patchPosition) {
|
|
1529
|
+
item.patchedPosition = true;
|
|
1530
|
+
element.style.position = "relative";
|
|
1546
1531
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1532
|
+
item.geometry = geometry;
|
|
1533
|
+
item.width = Math.round(w);
|
|
1534
|
+
item.height = Math.round(h);
|
|
1535
|
+
overlay.style.inset = borderWidths.map((width) => `${-width}px`).join(" ");
|
|
1536
|
+
overlay.style.width = `calc(100% + ${borderWidths[1] + borderWidths[3]}px)`;
|
|
1537
|
+
overlay.style.height = `calc(100% + ${borderWidths[0] + borderWidths[2]}px)`;
|
|
1538
|
+
item.contour = U.roundedPath(w, h, corners);
|
|
1539
|
+
const { d } = item.contour;
|
|
1540
|
+
edge.setAttribute("viewBox", `0 0 ${w} ${h}`);
|
|
1541
|
+
path.setAttribute("d", d);
|
|
1542
|
+
for (const [node, strokes] of [[aura, AURA], [core, [[shell ? 1.9 : 1.35, 1]]]]) {
|
|
1543
|
+
const mask = ringMask(w, h, d, strokes);
|
|
1544
|
+
node.style.maskImage = mask;
|
|
1545
|
+
node.style.webkitMaskImage = mask;
|
|
1546
|
+
}
|
|
1547
|
+
item.length = item.contour.length;
|
|
1548
|
+
radius = round ? 28 : Math.min(260, Math.max(42, item.length * 0.153));
|
|
1549
|
+
for (const light of lights) {
|
|
1550
|
+
light.radius = radius;
|
|
1551
|
+
for (const spot of light.spots) {
|
|
1552
|
+
spot.style.width = `${radius * 2}px`;
|
|
1553
|
+
spot.style.height = `${radius * 2}px`;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
item.paint(scope?.time || 0);
|
|
1557
|
+
if (scope) {
|
|
1558
|
+
item.worker ??= createBorderWorker(item);
|
|
1559
|
+
item.worker?.update();
|
|
1560
|
+
}
|
|
1561
|
+
if (!item.worker) overlay.setAttribute("data-ready", "");
|
|
1562
|
+
};
|
|
1553
1563
|
};
|
|
1564
|
+
item.sync = () => item.measure()?.();
|
|
1554
1565
|
const queueMeasurement = () => {
|
|
1555
1566
|
if (item.destroyed) return;
|
|
1556
1567
|
measurements.add(item);
|
package/dist/core.js
CHANGED
package/dist/forms.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
defaultFieldRegistry,
|
|
5
5
|
useForm,
|
|
6
6
|
useFormContext
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-VRD5EAQ4.js";
|
|
8
|
+
import "./chunks/chunk-5KH4JI2K.js";
|
|
9
9
|
import "./chunks/chunk-BJSFN52W.js";
|
|
10
10
|
import "./chunks/chunk-FCOU3ODR.js";
|
|
11
11
|
export {
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
useSvgId,
|
|
63
63
|
variantMaterial,
|
|
64
64
|
vectorElement
|
|
65
|
-
} from "./chunks/chunk-
|
|
65
|
+
} from "./chunks/chunk-VRD5EAQ4.js";
|
|
66
66
|
import {
|
|
67
67
|
ThemeProvider,
|
|
68
68
|
createNeonRenderer,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
useTabShape,
|
|
80
80
|
useThemePalette,
|
|
81
81
|
useTick
|
|
82
|
-
} from "./chunks/chunk-
|
|
82
|
+
} from "./chunks/chunk-5KH4JI2K.js";
|
|
83
83
|
import {
|
|
84
84
|
LocaleProvider,
|
|
85
85
|
addMessages,
|
package/dist/theme/base.css
CHANGED
|
@@ -126,6 +126,16 @@ button.ad:focus-visible {
|
|
|
126
126
|
left: 0;
|
|
127
127
|
will-change: transform;
|
|
128
128
|
}
|
|
129
|
+
.ad-border:not([data-ready]) :is(.ad-border-aura, .ad-border-core) {
|
|
130
|
+
visibility: hidden;
|
|
131
|
+
}
|
|
132
|
+
.ad-border[data-ready] > canvas {
|
|
133
|
+
animation: ad-border-reveal 160ms ease-out both;
|
|
134
|
+
}
|
|
135
|
+
@keyframes ad-border-reveal {
|
|
136
|
+
from { opacity: 0; }
|
|
137
|
+
to { opacity: 1; }
|
|
138
|
+
}
|
|
129
139
|
/* Paused borders should not reserve compositor layers for their four static spots. */
|
|
130
140
|
[data-ad-offscreen] .ad-border-light,
|
|
131
141
|
[data-ad-motion="off"] .ad-border-light {
|