@neo-ui-kit/react 1.4.11 → 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 +1 -1
- package/dist/chunks/{chunk-GHRYZ3BG.js → chunk-SJA722AD.js} +1 -1
- package/dist/chunks/{chunk-6URATN43.js → chunk-UBFT5MHP.js} +24 -0
- package/dist/core/motion-engine.d.ts +2 -0
- package/dist/core.js +1 -1
- package/dist/forms.js +2 -2
- package/dist/index.js +21 -5
- 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.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-пакет).
|
|
@@ -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,
|
|
@@ -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
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-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-
|
|
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-
|
|
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)
|
|
4914
|
+
if (entry) {
|
|
4915
|
+
inView = entry.isIntersecting;
|
|
4916
|
+
visibility();
|
|
4917
|
+
}
|
|
4908
4918
|
}, { rootMargin: "0px" });
|
|
4909
|
-
|
|
4910
|
-
|
|
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;
|