@neo-ui-kit/react 1.4.10 → 1.4.12

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 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.10.tgz
68
+ npm install /path/to/adui/release/neo-ui-kit-react-1.4.12.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-пакет).
@@ -2,7 +2,7 @@ import {
2
2
  themes,
3
3
  useBorder,
4
4
  usePauseOffscreen
5
- } from "./chunk-6URATN43.js";
5
+ } from "./chunk-UBFT5MHP.js";
6
6
  import {
7
7
  assignRef,
8
8
  clamp,
@@ -768,7 +768,7 @@ function buttonView(p, name = "Button") {
768
768
  onPointerMove: trackLight,
769
769
  onPointerLeave: resetLight,
770
770
  children: [
771
- /* @__PURE__ */ jsx8("span", { className: "ad-button-fx", "aria-hidden": "true" }),
771
+ /* @__PURE__ */ jsx8("span", { className: "ad-button-fx", "aria-hidden": "true", children: /* @__PURE__ */ jsx8("span", { className: "ad-button-plasma" }) }),
772
772
  /* @__PURE__ */ jsx8("span", { className: "ad-button-orbit", "aria-hidden": "true" }),
773
773
  loading && /* @__PURE__ */ jsx8("span", { className: "ad-spinner", "aria-hidden": "true" }),
774
774
  icon && /* @__PURE__ */ jsx8(Icon, { name: icon }),
@@ -1228,6 +1228,29 @@ function refreshMotion() {
1228
1228
  boundariesChanged = true;
1229
1229
  schedule();
1230
1230
  }
1231
+ var modalRoots = /* @__PURE__ */ new Set();
1232
+ var modalPaused = /* @__PURE__ */ new Set();
1233
+ function refreshModalPause() {
1234
+ for (const node of modalPaused) node.removeAttribute("data-ad-paused");
1235
+ modalPaused.clear();
1236
+ const top = [...modalRoots].findLast((node) => node.isConnected);
1237
+ for (let branch = top; branch?.parentElement && branch !== document.body; branch = branch.parentElement) {
1238
+ for (const sibling of branch.parentElement.children) {
1239
+ if (sibling === branch || sibling.hasAttribute("data-ad-paused")) continue;
1240
+ sibling.setAttribute("data-ad-paused", "");
1241
+ modalPaused.add(sibling);
1242
+ }
1243
+ }
1244
+ refreshMotion();
1245
+ }
1246
+ function pauseBehindDialog(node) {
1247
+ modalRoots.add(node);
1248
+ refreshModalPause();
1249
+ return () => {
1250
+ modalRoots.delete(node);
1251
+ refreshModalPause();
1252
+ };
1253
+ }
1231
1254
  var wake = () => {
1232
1255
  for (const s of running) s.previous = null;
1233
1256
  if (document.hidden) scan(performance.now());
@@ -1955,6 +1978,7 @@ export {
1955
1978
  neonGeometry,
1956
1979
  createNeonRenderer,
1957
1980
  refreshMotion,
1981
+ pauseBehindDialog,
1958
1982
  setMotionFrameRate,
1959
1983
  subscribeTick,
1960
1984
  getMotionStats,
@@ -594,10 +594,18 @@
594
594
  overflow: hidden;
595
595
  pointer-events: none;
596
596
  }
597
- .ad-button-fx::before {
598
- content: "";
597
+ .ad-button-plasma {
599
598
  position: absolute;
600
599
  inset: -40% -10% -40% 30%;
600
+ opacity: 0;
601
+ transition: opacity 0.4s;
602
+ will-change: transform;
603
+ }
604
+ .ad-button-plasma::before {
605
+ /* Cache the filtered texture independently of its moving parent. */
606
+ content: "";
607
+ position: absolute;
608
+ inset: 0;
601
609
  background:
602
610
  radial-gradient(circle at 72% 30%, #fff 0 1.2%, transparent 2.6%),
603
611
  radial-gradient(circle at 86% 68%, var(--ad-secondary-100) 0 1.4%, transparent 3.2%),
@@ -611,9 +619,6 @@
611
619
  radial-gradient(ellipse at 80% 50%, rgb(from var(--ad-secondary) r g b / 0.44), transparent 65%);
612
620
  mask-image: linear-gradient(90deg, transparent, #000 40%);
613
621
  filter: saturate(1.35);
614
- opacity: 0;
615
- transition: opacity 0.4s;
616
- will-change: transform;
617
622
  }
618
623
  /* The breath: a faint light over the face that swells and settles. */
619
624
  .ad-button-fx::after {
@@ -654,8 +659,8 @@
654
659
  );
655
660
  will-change: transform;
656
661
  }
657
- :is(.ad-button, .ad-icon-button):is([data-ad-variant="primary"], [data-ad-variant="danger"]) > .ad-button-fx::before,
658
- .ad-toggle-button[aria-pressed="true"] > .ad-button-fx::before {
662
+ :is(.ad-button, .ad-icon-button):is([data-ad-variant="primary"], [data-ad-variant="danger"]) > .ad-button-fx > .ad-button-plasma,
663
+ .ad-toggle-button[aria-pressed="true"] > .ad-button-fx > .ad-button-plasma {
659
664
  opacity: 0.85;
660
665
  animation: ad-btn-plasma 7s ease-in-out infinite alternate;
661
666
  }
@@ -671,7 +676,7 @@
671
676
  .ad-toggle-button[aria-pressed="true"] > .ad-button-orbit::before {
672
677
  animation: ad-btn-orbit 4.5s linear infinite;
673
678
  }
674
- :is(.ad-button, .ad-icon-button, .ad-toggle-button):hover:not(:disabled) > .ad-button-fx::before {
679
+ :is(.ad-button, .ad-icon-button, .ad-toggle-button):hover:not(:disabled) > .ad-button-fx > .ad-button-plasma {
675
680
  opacity: 0.9;
676
681
  animation: ad-btn-plasma 7s ease-in-out infinite alternate;
677
682
  }
@@ -685,12 +690,14 @@
685
690
  display: none;
686
691
  }
687
692
  /* Icon-only buttons are small: the plasma centres on them instead of the right side. */
688
- .ad-icon-button > .ad-button-fx::before {
693
+ .ad-icon-button > .ad-button-fx > .ad-button-plasma {
689
694
  inset: -30%;
695
+ }
696
+ .ad-icon-button .ad-button-plasma::before {
690
697
  mask-image: radial-gradient(closest-side, #000 40%, transparent);
691
698
  }
692
699
  /* Ghost buttons stay subtle: only the comet, no plasma. */
693
- :is(.ad-button, .ad-icon-button)[data-ad-variant="ghost"] > .ad-button-fx::before {
700
+ :is(.ad-button, .ad-icon-button)[data-ad-variant="ghost"] > .ad-button-fx > .ad-button-plasma {
694
701
  display: none;
695
702
  }
696
703
  @keyframes ad-btn-plasma {
@@ -1,4 +1,6 @@
1
1
  export function refreshMotion(): void;
2
+ /** Hold the covered scene while the top dialog is open; nested dialogs share ownership. */
3
+ export function pauseBehindDialog(node: any): () => void;
2
4
  /** Diagnostic snapshot for lifecycle tests; not used to render the UI. */
3
5
  export function getMotionStats(): {
4
6
  scopes: number;
package/dist/core.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  useSmoothWheel,
12
12
  useTabShape,
13
13
  useTick
14
- } from "./chunks/chunk-6URATN43.js";
14
+ } from "./chunks/chunk-UBFT5MHP.js";
15
15
  import {
16
16
  LocaleProvider,
17
17
  addMessages,
package/dist/forms.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  defaultFieldRegistry,
5
5
  useForm,
6
6
  useFormContext
7
- } from "./chunks/chunk-V7E3BRX3.js";
8
- import "./chunks/chunk-6URATN43.js";
7
+ } from "./chunks/chunk-SJA722AD.js";
8
+ import "./chunks/chunk-UBFT5MHP.js";
9
9
  import "./chunks/chunk-BJSFN52W.js";
10
10
  import "./chunks/chunk-FCOU3ODR.js";
11
11
  export {
package/dist/index.js CHANGED
@@ -62,12 +62,13 @@ import {
62
62
  useSvgId,
63
63
  variantMaterial,
64
64
  vectorElement
65
- } from "./chunks/chunk-V7E3BRX3.js";
65
+ } from "./chunks/chunk-SJA722AD.js";
66
66
  import {
67
67
  ThemeProvider,
68
68
  createNeonRenderer,
69
69
  getMotionStats,
70
70
  neonGeometry,
71
+ pauseBehindDialog,
71
72
  refreshMotion,
72
73
  setMotionFrameRate,
73
74
  subscribeTick,
@@ -79,7 +80,7 @@ import {
79
80
  useTabShape,
80
81
  useThemePalette,
81
82
  useTick
82
- } from "./chunks/chunk-6URATN43.js";
83
+ } from "./chunks/chunk-UBFT5MHP.js";
83
84
  import {
84
85
  LocaleProvider,
85
86
  addMessages,
@@ -2895,9 +2896,11 @@ var Dialog = (p) => {
2895
2896
  if (modal) d.close();
2896
2897
  else d.removeAttribute("open");
2897
2898
  }
2899
+ const resume = open ? pauseBehindDialog(d) : void 0;
2898
2900
  return () => {
2899
2901
  if (d.open && modal) d.close();
2900
2902
  else d.removeAttribute("open");
2903
+ resume?.();
2901
2904
  if (opener?.isConnected && (document.activeElement === document.body || d.contains(document.activeElement)))
2902
2905
  opener.focus();
2903
2906
  };
@@ -2932,6 +2935,7 @@ var Dialog = (p) => {
2932
2935
  "aria-describedby": p.description ? descId : void 0,
2933
2936
  onCancel: (e) => {
2934
2937
  e.preventDefault();
2938
+ e.stopPropagation();
2935
2939
  if (!pending) setOpen(false);
2936
2940
  },
2937
2941
  children: [
@@ -4903,11 +4907,23 @@ var QuantumBackground = /* @__PURE__ */ forwardRef(function QuantumBackground2(p
4903
4907
  }, [fullscreen]);
4904
4908
  useEffect9(() => {
4905
4909
  if (!ready || !root.current || typeof IntersectionObserver === "undefined") return;
4910
+ const node = root.current;
4911
+ let inView = false;
4912
+ const visibility = () => send("visible", inView && !node.closest("[data-ad-paused], [data-ad-offscreen]"));
4906
4913
  const observer = new IntersectionObserver(([entry]) => {
4907
- if (entry) send("visible", entry.isIntersecting);
4914
+ if (entry) {
4915
+ inView = entry.isIntersecting;
4916
+ visibility();
4917
+ }
4908
4918
  }, { rootMargin: "0px" });
4909
- observer.observe(root.current);
4910
- return () => observer.disconnect();
4919
+ const boundaries = new MutationObserver(visibility);
4920
+ for (let parent = node; parent; parent = parent.parentElement)
4921
+ boundaries.observe(parent, { attributes: true, attributeFilter: ["data-ad-paused", "data-ad-offscreen"] });
4922
+ observer.observe(node);
4923
+ return () => {
4924
+ observer.disconnect();
4925
+ boundaries.disconnect();
4926
+ };
4911
4927
  }, [ready]);
4912
4928
  useEffect9(() => {
4913
4929
  if (!ready) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-ui-kit/react",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "NEO UI — React component library",
5
5
  "type": "module",
6
6
  "license": "MIT",