@bbki.ng/components 2.6.16 → 4.0.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/dist/Button.d.ts +1 -0
- package/dist/_virtual/_commonjsHelpers.mjs +6 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/jsx-runtime.mjs +7 -0
- package/dist/_virtual/jsx-runtime2.mjs +4 -0
- package/dist/_virtual/react-jsx-runtime.development.mjs +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.mjs +4 -0
- package/dist/article/Article.d.ts +11 -0
- package/dist/article/Article.mjs +43 -0
- package/dist/blink-dot/BlinkDot.d.ts +5 -0
- package/dist/blink-dot/BlinkDot.mjs +20 -0
- package/dist/blur-cover/BlurCover.d.ts +6 -0
- package/dist/blur-cover/BlurCover.mjs +28 -0
- package/dist/breadcrumb/Breadcrumb.d.ts +9 -0
- package/dist/breadcrumb/Breadcrumb.mjs +35 -0
- package/dist/button/Button.d.ts +18 -0
- package/dist/button/Button.mjs +35 -0
- package/dist/canvas/Canvas.d.ts +23 -0
- package/dist/canvas/Canvas.mjs +85 -0
- package/dist/canvas/useRenderer.d.ts +10 -0
- package/dist/canvas/useRenderer.mjs +31 -0
- package/dist/context-menu/index.d.ts +27 -0
- package/dist/context-menu/index.mjs +131 -0
- package/dist/drop-image/DropImage.d.ts +25 -0
- package/dist/drop-image/DropImage.mjs +151 -0
- package/dist/drop-image/useDropImage.d.ts +19 -0
- package/dist/drop-image/useDropImage.mjs +67 -0
- package/dist/drop-image/utils.d.ts +2 -0
- package/dist/drop-image/utils.mjs +4 -0
- package/dist/drop-zone/DropZone.d.ts +9 -0
- package/dist/drop-zone/DropZone.mjs +44 -0
- package/dist/img/Gallery.d.ts +11 -0
- package/dist/img/Gallery.mjs +37 -0
- package/dist/img/Img.d.ts +3 -0
- package/dist/img/Img.mjs +80 -0
- package/dist/img/RandomRowsLayout.d.ts +9 -0
- package/dist/img/RandomRowsLayout.mjs +49 -0
- package/dist/img/types.d.ts +21 -0
- package/dist/img/types.mjs +4 -0
- package/dist/img/utils.d.ts +7 -0
- package/dist/img/utils.mjs +15 -0
- package/dist/index.d.ts +25 -380
- package/dist/index.mjs +79 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.mjs +17 -0
- package/dist/label/index.d.ts +5 -0
- package/dist/label/index.mjs +17 -0
- package/dist/layout/layout.d.ts +7 -0
- package/dist/layout/layout.mjs +27 -0
- package/dist/link/Link.d.ts +17 -0
- package/dist/link/Link.mjs +83 -0
- package/dist/list/list.d.ts +23 -0
- package/dist/list/list.mjs +76 -0
- package/dist/loading-spiral/LoadingSpiral.d.ts +5 -0
- package/dist/loading-spiral/LoadingSpiral.mjs +37 -0
- package/dist/loading-spiral/constants.d.ts +6 -0
- package/dist/loading-spiral/constants.mjs +61 -0
- package/dist/loading-spiral/createOptions.d.ts +17 -0
- package/dist/loading-spiral/createOptions.mjs +30 -0
- package/dist/loading-spiral/createSettings.d.ts +16 -0
- package/dist/loading-spiral/createSettings.mjs +21 -0
- package/dist/loading-spiral/useCanvasRef.d.ts +4 -0
- package/dist/loading-spiral/utils.d.ts +1 -0
- package/dist/logo/Logo.d.ts +6 -0
- package/dist/logo/Logo.mjs +36 -0
- package/dist/nav/Nav.d.ts +10 -0
- package/dist/nav/Nav.mjs +27 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.18.9/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +519 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +373 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.0.8_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +182 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +108 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +120 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-arrow/dist/index.mjs +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom_04e7d2b59cf7ec97f40d26a998d7601d/node_modules/@radix-ui/react-collection/dist/index.mjs +60 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.1.5_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_1ce4db5e792f73d797e22c043cc3d326/node_modules/@radix-ui/react-context-menu/dist/index.mjs +213 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +88 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.5_@types_react-dom@18.0.6_@types_react@18.0.15_re_0263a24376d55e4c2bb8fa2f75f1db3c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +136 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-do_a79d961df31bbecb3b2c94878dbb0724/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +188 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.mjs +61 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-label/dist/index.mjs +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.0.6_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.mjs +657 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.1.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popper/dist/index.mjs +218 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.mjs +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs +81 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_69cf2e3e4b4e2c2fefdb8ea262543b5e/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +199 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +53 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +48 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +37 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.3_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs +37 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.3/node_modules/aria-hidden/dist/es2015/index.mjs +49 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs +40 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs +23 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +7 -0
- package/dist/node_modules/.pnpm/phenomenon@1.6.0/node_modules/phenomenon/dist/phenomenon.mjs +109 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +61 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +25 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +116 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.mjs +46 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +16 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +62 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.mjs +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/hook.mjs +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/singleton.mjs +30 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.mjs +589 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +32 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.mjs +8 -0
- package/dist/node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.mjs +29 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useRef.mjs +25 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/exports.mjs +21 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.mjs +67 -0
- package/dist/page/Page.d.ts +28 -0
- package/dist/page/Page.mjs +67 -0
- package/dist/panel/Panel.d.ts +6 -0
- package/dist/panel/Panel.mjs +17 -0
- package/dist/pop-confirm/PopConfirm.d.ts +10 -0
- package/dist/pop-confirm/PopConfirm.mjs +40 -0
- package/dist/skeleton/Seleton.d.ts +23 -0
- package/dist/skeleton/Seleton.mjs +69 -0
- package/dist/spinner/Spinner.d.ts +7 -0
- package/dist/table/Table.d.ts +18 -0
- package/dist/table/Table.mjs +34 -0
- package/dist/tag/Tag.d.ts +10 -0
- package/dist/tag/Tag.mjs +33 -0
- package/package.json +22 -13
- package/dist/index.cjs +0 -1816
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -1821
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -1738
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { composeRefs as u } from "../../../../../@radix-ui_react-compose-refs@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs";
|
|
3
|
+
import { jsx as c, Fragment as d } from "../../../../../../../_virtual/jsx-runtime.mjs";
|
|
4
|
+
var m = l.forwardRef((e, n) => {
|
|
5
|
+
const { children: r, ...t } = e, o = l.Children.toArray(r), i = o.find(y);
|
|
6
|
+
if (i) {
|
|
7
|
+
const s = i.props.children, a = o.map((p) => p === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : p);
|
|
8
|
+
return /* @__PURE__ */ c(f, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
|
|
11
|
+
});
|
|
12
|
+
m.displayName = "Slot";
|
|
13
|
+
var f = l.forwardRef((e, n) => {
|
|
14
|
+
const { children: r, ...t } = e;
|
|
15
|
+
if (l.isValidElement(r)) {
|
|
16
|
+
const o = C(r);
|
|
17
|
+
return l.cloneElement(r, {
|
|
18
|
+
...h(t, r.props),
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
ref: n ? u(n, o) : o
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
24
|
+
});
|
|
25
|
+
f.displayName = "SlotClone";
|
|
26
|
+
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
27
|
+
function y(e) {
|
|
28
|
+
return l.isValidElement(e) && e.type === g;
|
|
29
|
+
}
|
|
30
|
+
function h(e, n) {
|
|
31
|
+
const r = { ...n };
|
|
32
|
+
for (const t in n) {
|
|
33
|
+
const o = e[t], i = n[t];
|
|
34
|
+
/^on[A-Z]/.test(t) ? o && i ? r[t] = (...a) => {
|
|
35
|
+
i(...a), o(...a);
|
|
36
|
+
} : o && (r[t] = o) : t === "style" ? r[t] = { ...o, ...i } : t === "className" && (r[t] = [o, i].filter(Boolean).join(" "));
|
|
37
|
+
}
|
|
38
|
+
return { ...e, ...r };
|
|
39
|
+
}
|
|
40
|
+
function C(e) {
|
|
41
|
+
var t, o;
|
|
42
|
+
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
43
|
+
return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
m as Slot,
|
|
47
|
+
g as Slottable
|
|
48
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef as t, useEffect as u, useMemo as a } from "react";
|
|
2
|
+
function o(c) {
|
|
3
|
+
const e = t(c);
|
|
4
|
+
return u(() => {
|
|
5
|
+
e.current = c;
|
|
6
|
+
}), a(
|
|
7
|
+
() => (...f) => {
|
|
8
|
+
var r;
|
|
9
|
+
return (r = e.current) === null || r === void 0 ? void 0 : r.call(e, ...f);
|
|
10
|
+
},
|
|
11
|
+
[]
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
o as useCallbackRef
|
|
16
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useCallback as i, useState as $, useRef as C, useEffect as b } from "react";
|
|
2
|
+
import { useCallbackRef as f } from "../../../../../@radix-ui_react-use-callback-ref@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs";
|
|
3
|
+
function g({ prop: e, defaultProp: s, onChange: c = () => {
|
|
4
|
+
} }) {
|
|
5
|
+
const [t, n] = h({
|
|
6
|
+
defaultProp: s,
|
|
7
|
+
onChange: c
|
|
8
|
+
}), o = e !== void 0, u = o ? e : t, a = f(c), d = i((r) => {
|
|
9
|
+
if (o) {
|
|
10
|
+
const l = typeof r == "function" ? r(e) : r;
|
|
11
|
+
l !== e && a(l);
|
|
12
|
+
} else
|
|
13
|
+
n(r);
|
|
14
|
+
}, [
|
|
15
|
+
o,
|
|
16
|
+
e,
|
|
17
|
+
n,
|
|
18
|
+
a
|
|
19
|
+
]);
|
|
20
|
+
return [
|
|
21
|
+
u,
|
|
22
|
+
d
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
function h({ defaultProp: e, onChange: s }) {
|
|
26
|
+
const c = $(e), [t] = c, n = C(t), o = f(s);
|
|
27
|
+
return b(() => {
|
|
28
|
+
n.current !== t && (o(t), n.current = t);
|
|
29
|
+
}, [
|
|
30
|
+
t,
|
|
31
|
+
n,
|
|
32
|
+
o
|
|
33
|
+
]), c;
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
g as useControllableState
|
|
37
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useEffect as n } from "react";
|
|
2
|
+
import { useCallbackRef as t } from "../../../../../@radix-ui_react-use-callback-ref@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs";
|
|
3
|
+
function l(d, e = globalThis == null ? void 0 : globalThis.document) {
|
|
4
|
+
const o = t(d);
|
|
5
|
+
n(() => {
|
|
6
|
+
const a = (s) => {
|
|
7
|
+
s.key === "Escape" && o(s);
|
|
8
|
+
};
|
|
9
|
+
return e.addEventListener("keydown", a), () => e.removeEventListener("keydown", a);
|
|
10
|
+
}, [
|
|
11
|
+
o,
|
|
12
|
+
e
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
l as useEscapeKeydown
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useState as n } from "react";
|
|
2
|
+
import { useLayoutEffect as c } from "../../../../../@radix-ui_react-use-layout-effect@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs";
|
|
3
|
+
function z(e) {
|
|
4
|
+
const [h, r] = n(void 0);
|
|
5
|
+
return c(() => {
|
|
6
|
+
if (e) {
|
|
7
|
+
r({
|
|
8
|
+
width: e.offsetWidth,
|
|
9
|
+
height: e.offsetHeight
|
|
10
|
+
});
|
|
11
|
+
const f = new ResizeObserver((i) => {
|
|
12
|
+
if (!Array.isArray(i) || !i.length)
|
|
13
|
+
return;
|
|
14
|
+
const b = i[0];
|
|
15
|
+
let o, t;
|
|
16
|
+
if ("borderBoxSize" in b) {
|
|
17
|
+
const s = b.borderBoxSize, d = Array.isArray(s) ? s[0] : s;
|
|
18
|
+
o = d.inlineSize, t = d.blockSize;
|
|
19
|
+
} else
|
|
20
|
+
o = e.offsetWidth, t = e.offsetHeight;
|
|
21
|
+
r({
|
|
22
|
+
width: o,
|
|
23
|
+
height: t
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
return f.observe(e, {
|
|
27
|
+
box: "border-box"
|
|
28
|
+
}), () => f.unobserve(e);
|
|
29
|
+
} else
|
|
30
|
+
r(void 0);
|
|
31
|
+
}, [
|
|
32
|
+
e
|
|
33
|
+
]), h;
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
z as useSize
|
|
37
|
+
};
|
package/dist/node_modules/.pnpm/aria-hidden@1.2.3/node_modules/aria-hidden/dist/es2015/index.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var k = function(r) {
|
|
2
|
+
if (typeof document > "u")
|
|
3
|
+
return null;
|
|
4
|
+
var u = Array.isArray(r) ? r[0] : r;
|
|
5
|
+
return u.ownerDocument.body;
|
|
6
|
+
}, f = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
|
7
|
+
return r && (r.host || W(r.parentNode));
|
|
8
|
+
}, S = function(r, u) {
|
|
9
|
+
return u.map(function(e) {
|
|
10
|
+
if (r.contains(e))
|
|
11
|
+
return e;
|
|
12
|
+
var n = W(e);
|
|
13
|
+
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
|
14
|
+
}).filter(function(e) {
|
|
15
|
+
return !!e;
|
|
16
|
+
});
|
|
17
|
+
}, D = function(r, u, e, n) {
|
|
18
|
+
var i = S(u, Array.isArray(r) ? r : [r]);
|
|
19
|
+
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
|
20
|
+
var c = p[e], l = [], v = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
|
21
|
+
!t || v.has(t) || (v.add(t), y(t.parentNode));
|
|
22
|
+
};
|
|
23
|
+
i.forEach(y);
|
|
24
|
+
var A = function(t) {
|
|
25
|
+
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
|
26
|
+
if (v.has(a))
|
|
27
|
+
A(a);
|
|
28
|
+
else {
|
|
29
|
+
var s = a.getAttribute(n), w = s !== null && s !== "false", M = (f.get(a) || 0) + 1, d = (c.get(a) || 0) + 1;
|
|
30
|
+
f.set(a, M), c.set(a, d), l.push(a), M === 1 && w && o.set(a, !0), d === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
return A(u), v.clear(), h++, function() {
|
|
35
|
+
l.forEach(function(t) {
|
|
36
|
+
var a = f.get(t) - 1, s = c.get(t) - 1;
|
|
37
|
+
f.set(t, a), c.set(t, s), a || (o.has(t) || t.removeAttribute(n), o.delete(t)), s || t.removeAttribute(e);
|
|
38
|
+
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), p = {});
|
|
39
|
+
};
|
|
40
|
+
}, E = function(r, u, e) {
|
|
41
|
+
e === void 0 && (e = "data-aria-hidden");
|
|
42
|
+
var n = Array.from(Array.isArray(r) ? r : [r]), i = k(r);
|
|
43
|
+
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), D(n, i, e, "aria-hidden")) : function() {
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
E as hideOthers
|
|
49
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs as p } from "../../../../../_virtual/_commonjsHelpers.mjs";
|
|
2
|
+
import { __module as l } from "../../../../../_virtual/index.mjs";
|
|
3
|
+
/*!
|
|
4
|
+
Copyright (c) 2018 Jed Watson.
|
|
5
|
+
Licensed under the MIT License (MIT), see
|
|
6
|
+
http://jedwatson.github.io/classnames
|
|
7
|
+
*/
|
|
8
|
+
(function(f) {
|
|
9
|
+
(function() {
|
|
10
|
+
var a = {}.hasOwnProperty;
|
|
11
|
+
function t() {
|
|
12
|
+
for (var e = [], o = 0; o < arguments.length; o++) {
|
|
13
|
+
var s = arguments[o];
|
|
14
|
+
if (s) {
|
|
15
|
+
var n = typeof s;
|
|
16
|
+
if (n === "string" || n === "number")
|
|
17
|
+
e.push(s);
|
|
18
|
+
else if (Array.isArray(s)) {
|
|
19
|
+
if (s.length) {
|
|
20
|
+
var i = t.apply(null, s);
|
|
21
|
+
i && e.push(i);
|
|
22
|
+
}
|
|
23
|
+
} else if (n === "object")
|
|
24
|
+
if (s.toString === Object.prototype.toString)
|
|
25
|
+
for (var r in s)
|
|
26
|
+
a.call(s, r) && s[r] && e.push(r);
|
|
27
|
+
else
|
|
28
|
+
e.push(s.toString());
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return e.join(" ");
|
|
32
|
+
}
|
|
33
|
+
f.exports ? (t.default = t, f.exports = t) : window.classNames = t;
|
|
34
|
+
})();
|
|
35
|
+
})(l);
|
|
36
|
+
var u = l.exports;
|
|
37
|
+
const h = /* @__PURE__ */ p(u);
|
|
38
|
+
export {
|
|
39
|
+
h as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var n, f, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number")
|
|
4
|
+
t += r;
|
|
5
|
+
else if (typeof r == "object")
|
|
6
|
+
if (Array.isArray(r)) {
|
|
7
|
+
var o = r.length;
|
|
8
|
+
for (n = 0; n < o; n++)
|
|
9
|
+
r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
|
|
10
|
+
} else
|
|
11
|
+
for (f in r)
|
|
12
|
+
r[f] && (t && (t += " "), t += f);
|
|
13
|
+
return t;
|
|
14
|
+
}
|
|
15
|
+
function i() {
|
|
16
|
+
for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++)
|
|
17
|
+
(r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
i as clsx,
|
|
22
|
+
i as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var m = ["x", "y", "z"], l = function(t) {
|
|
2
|
+
Object.assign(this, { uniforms: {}, geometry: { vertices: [{ x: 0, y: 0, z: 0 }] }, mode: 0, modifiers: {}, attributes: [], multiplier: 1, buffers: [] }), Object.assign(this, t), this.prepareProgram(), this.prepareUniforms(), this.prepareAttributes();
|
|
3
|
+
};
|
|
4
|
+
l.prototype.compileShader = function(t, e) {
|
|
5
|
+
var i = this.gl.createShader(t);
|
|
6
|
+
return this.gl.shaderSource(i, e), this.gl.compileShader(i), i;
|
|
7
|
+
}, l.prototype.prepareProgram = function() {
|
|
8
|
+
var t = this.gl, e = this.vertex, i = this.fragment, s = t.createProgram();
|
|
9
|
+
t.attachShader(s, this.compileShader(35633, e)), t.attachShader(s, this.compileShader(35632, i)), t.linkProgram(s), t.useProgram(s), this.program = s;
|
|
10
|
+
}, l.prototype.prepareUniforms = function() {
|
|
11
|
+
for (var t = Object.keys(this.uniforms), e = 0; e < t.length; e += 1) {
|
|
12
|
+
var i = this.gl.getUniformLocation(this.program, t[e]);
|
|
13
|
+
this.uniforms[t[e]].location = i;
|
|
14
|
+
}
|
|
15
|
+
}, l.prototype.prepareAttributes = function() {
|
|
16
|
+
this.geometry.vertices !== void 0 && this.attributes.push({ name: "aPosition", size: 3 }), this.geometry.normal !== void 0 && this.attributes.push({ name: "aNormal", size: 3 }), this.attributeKeys = [];
|
|
17
|
+
for (var t = 0; t < this.attributes.length; t += 1)
|
|
18
|
+
this.attributeKeys.push(this.attributes[t].name), this.prepareAttribute(this.attributes[t]);
|
|
19
|
+
}, l.prototype.prepareAttribute = function(t) {
|
|
20
|
+
for (var e = this.geometry, i = this.multiplier, s = e.vertices, o = e.normal, h = new Float32Array(i * s.length * t.size), u = 0; u < i; u += 1)
|
|
21
|
+
for (var r = t.data && t.data(u, i), a = u * s.length * t.size, n = 0; n < s.length; n += 1)
|
|
22
|
+
for (var f = 0; f < t.size; f += 1) {
|
|
23
|
+
var c = this.modifiers[t.name];
|
|
24
|
+
h[a] = c !== void 0 ? c(r, n, f, this) : t.name === "aPosition" ? s[n][m[f]] : t.name === "aNormal" ? o[n][m[f]] : r[f], a += 1;
|
|
25
|
+
}
|
|
26
|
+
this.attributes[this.attributeKeys.indexOf(t.name)].data = h, this.prepareBuffer(this.attributes[this.attributeKeys.indexOf(t.name)]);
|
|
27
|
+
}, l.prototype.prepareBuffer = function(t) {
|
|
28
|
+
var e = t.data, i = t.name, s = t.size, o = this.gl.createBuffer();
|
|
29
|
+
this.gl.bindBuffer(34962, o), this.gl.bufferData(34962, e, 35044);
|
|
30
|
+
var h = this.gl.getAttribLocation(this.program, i);
|
|
31
|
+
this.gl.enableVertexAttribArray(h), this.gl.vertexAttribPointer(h, s, 5126, !1, 0, 0), this.buffers[this.attributeKeys.indexOf(t.name)] = { buffer: o, location: h, size: s };
|
|
32
|
+
}, l.prototype.render = function(t) {
|
|
33
|
+
var e = this, i = this.uniforms, s = this.multiplier, o = this.gl;
|
|
34
|
+
o.useProgram(this.program);
|
|
35
|
+
for (var h = 0; h < this.buffers.length; h += 1) {
|
|
36
|
+
var u = this.buffers[h], r = u.location, a = u.buffer, n = u.size;
|
|
37
|
+
o.enableVertexAttribArray(r), o.bindBuffer(34962, a), o.vertexAttribPointer(r, n, 5126, !1, 0, 0);
|
|
38
|
+
}
|
|
39
|
+
Object.keys(t).forEach(function(f) {
|
|
40
|
+
i[f].value = t[f].value;
|
|
41
|
+
}), Object.keys(i).forEach(function(f) {
|
|
42
|
+
var c = i[f];
|
|
43
|
+
e.uniformMap[c.type](c.location, c.value);
|
|
44
|
+
}), o.drawArrays(this.mode, 0, s * this.geometry.vertices.length), this.onRender && this.onRender(this);
|
|
45
|
+
}, l.prototype.destroy = function() {
|
|
46
|
+
for (var t = 0; t < this.buffers.length; t += 1)
|
|
47
|
+
this.gl.deleteBuffer(this.buffers[t].buffer);
|
|
48
|
+
this.gl.deleteProgram(this.program), this.gl = null;
|
|
49
|
+
};
|
|
50
|
+
var p = function(t) {
|
|
51
|
+
var e = this, i = t || {}, s = i.canvas;
|
|
52
|
+
s === void 0 && (s = document.querySelector("canvas"));
|
|
53
|
+
var o = i.context;
|
|
54
|
+
o === void 0 && (o = {});
|
|
55
|
+
var h = i.contextType;
|
|
56
|
+
h === void 0 && (h = "experimental-webgl");
|
|
57
|
+
var u = i.settings;
|
|
58
|
+
u === void 0 && (u = {});
|
|
59
|
+
var r = s.getContext(h, Object.assign({ alpha: !1, antialias: !1 }, o));
|
|
60
|
+
Object.assign(this, { gl: r, canvas: s, uniforms: {}, instances: /* @__PURE__ */ new Map(), shouldRender: !0 }), Object.assign(this, { devicePixelRatio: 1, clearColor: [1, 1, 1, 1], position: { x: 0, y: 0, z: 2 }, clip: [1e-3, 100] }), Object.assign(this, u), this.uniformMap = { float: function(a, n) {
|
|
61
|
+
return r.uniform1f(a, n);
|
|
62
|
+
}, vec2: function(a, n) {
|
|
63
|
+
return r.uniform2fv(a, n);
|
|
64
|
+
}, vec3: function(a, n) {
|
|
65
|
+
return r.uniform3fv(a, n);
|
|
66
|
+
}, vec4: function(a, n) {
|
|
67
|
+
return r.uniform4fv(a, n);
|
|
68
|
+
}, mat2: function(a, n) {
|
|
69
|
+
return r.uniformMatrix2fv(a, !1, n);
|
|
70
|
+
}, mat3: function(a, n) {
|
|
71
|
+
return r.uniformMatrix3fv(a, !1, n);
|
|
72
|
+
}, mat4: function(a, n) {
|
|
73
|
+
return r.uniformMatrix4fv(a, !1, n);
|
|
74
|
+
} }, r.enable(r.DEPTH_TEST), r.depthFunc(r.LEQUAL), r.getContextAttributes().alpha === !1 && (r.clearColor.apply(r, this.clearColor), r.clearDepth(1)), this.onSetup && this.onSetup(r), window.addEventListener("resize", function() {
|
|
75
|
+
return e.resize();
|
|
76
|
+
}), this.resize(), this.render();
|
|
77
|
+
};
|
|
78
|
+
p.prototype.resize = function() {
|
|
79
|
+
var t = this.gl, e = this.canvas, i = this.devicePixelRatio, s = this.position;
|
|
80
|
+
e.width = e.clientWidth * i, e.height = e.clientHeight * i;
|
|
81
|
+
var o = t.drawingBufferWidth, h = t.drawingBufferHeight, u = o / h;
|
|
82
|
+
t.viewport(0, 0, o, h);
|
|
83
|
+
var r = Math.tan(Math.PI / 180 * 22.5), a = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, s.x, s.y, (u < 1 ? 1 : u) * -s.z, 1];
|
|
84
|
+
this.uniforms.uProjectionMatrix = { type: "mat4", value: [0.5 / r, 0, 0, 0, 0, u / r * 0.5, 0, 0, 0, 0, -(this.clip[1] + this.clip[0]) / (this.clip[1] - this.clip[0]), -1, 0, 0, -2 * this.clip[1] * (this.clip[0] / (this.clip[1] - this.clip[0])), 0] }, this.uniforms.uViewMatrix = { type: "mat4", value: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] }, this.uniforms.uModelMatrix = { type: "mat4", value: a };
|
|
85
|
+
}, p.prototype.toggle = function(t) {
|
|
86
|
+
t !== this.shouldRender && (this.shouldRender = t !== void 0 ? t : !this.shouldRender, this.shouldRender && this.render());
|
|
87
|
+
}, p.prototype.render = function() {
|
|
88
|
+
var t = this;
|
|
89
|
+
this.gl.clear(16640), this.instances.forEach(function(e) {
|
|
90
|
+
e.render(t.uniforms);
|
|
91
|
+
}), this.onRender && this.onRender(this), this.shouldRender && requestAnimationFrame(function() {
|
|
92
|
+
return t.render();
|
|
93
|
+
});
|
|
94
|
+
}, p.prototype.add = function(t, e) {
|
|
95
|
+
e === void 0 && (e = { uniforms: {} }), e.uniforms === void 0 && (e.uniforms = {}), Object.assign(e.uniforms, JSON.parse(JSON.stringify(this.uniforms))), Object.assign(e, { gl: this.gl, uniformMap: this.uniformMap });
|
|
96
|
+
var i = new l(e);
|
|
97
|
+
return this.instances.set(t, i), i;
|
|
98
|
+
}, p.prototype.remove = function(t) {
|
|
99
|
+
var e = this.instances.get(t);
|
|
100
|
+
e !== void 0 && (e.destroy(), this.instances.delete(t));
|
|
101
|
+
}, p.prototype.destroy = function() {
|
|
102
|
+
var t = this;
|
|
103
|
+
this.instances.forEach(function(e, i) {
|
|
104
|
+
e.destroy(), t.instances.delete(i);
|
|
105
|
+
}), this.toggle(!1);
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
p as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { styleSingleton as m } from "../../../../../react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs";
|
|
3
|
+
import { noScrollbarsClassName as p, zeroRightClassName as l, fullWidthClassName as g, removedBarSizeVariable as v } from "./constants.mjs";
|
|
4
|
+
import { getGapWidth as s } from "./utils.mjs";
|
|
5
|
+
import { jsx as u } from "../../../../../../../_virtual/jsx-runtime.mjs";
|
|
6
|
+
var h = m(), r = "data-scroll-locked", x = function(t, e, o, n) {
|
|
7
|
+
var a = t.left, i = t.top, f = t.right, c = t.gap;
|
|
8
|
+
return o === void 0 && (o = "margin"), `
|
|
9
|
+
.`.concat(p, ` {
|
|
10
|
+
overflow: hidden `).concat(n, `;
|
|
11
|
+
padding-right: `).concat(c, "px ").concat(n, `;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(r, `] {
|
|
14
|
+
overflow: hidden `).concat(n, `;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([e && "position: relative ".concat(n, ";"), o === "margin" && `
|
|
17
|
+
padding-left: `.concat(a, `px;
|
|
18
|
+
padding-top: `).concat(i, `px;
|
|
19
|
+
padding-right: `).concat(f, `px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(c, "px ").concat(n, `;
|
|
23
|
+
`), o === "padding" && "padding-right: ".concat(c, "px ").concat(n, ";")].filter(Boolean).join(""), `
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(l, ` {
|
|
27
|
+
right: `).concat(c, "px ").concat(n, `;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(g, ` {
|
|
31
|
+
margin-right: `).concat(c, "px ").concat(n, `;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(l, " .").concat(l, ` {
|
|
35
|
+
right: 0 `).concat(n, `;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(g, " .").concat(g, ` {
|
|
39
|
+
margin-right: 0 `).concat(n, `;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(r, `] {
|
|
43
|
+
`).concat(v, ": ").concat(c, `px;
|
|
44
|
+
}
|
|
45
|
+
`);
|
|
46
|
+
}, A = function(t) {
|
|
47
|
+
var e = t.noRelative, o = t.noImportant, n = t.gapMode, a = n === void 0 ? "margin" : n, i = d.useMemo(function() {
|
|
48
|
+
return s(a);
|
|
49
|
+
}, [a]);
|
|
50
|
+
return d.useEffect(function() {
|
|
51
|
+
return document.body.setAttribute(r, ""), function() {
|
|
52
|
+
document.body.removeAttribute(r);
|
|
53
|
+
};
|
|
54
|
+
}, []), /* @__PURE__ */ u(h, {
|
|
55
|
+
styles: x(i, !e, a, o ? "" : "!important")
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
A as RemoveScrollBar,
|
|
60
|
+
r as lockAttribute
|
|
61
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var a = {
|
|
2
|
+
left: 0,
|
|
3
|
+
top: 0,
|
|
4
|
+
right: 0,
|
|
5
|
+
gap: 0
|
|
6
|
+
}, e = function(t) {
|
|
7
|
+
return parseInt(t || "", 10) || 0;
|
|
8
|
+
}, o = function(t) {
|
|
9
|
+
var n = window.getComputedStyle(document.body), i = n[t === "padding" ? "paddingLeft" : "marginLeft"], r = n[t === "padding" ? "paddingTop" : "marginTop"], d = n[t === "padding" ? "paddingRight" : "marginRight"];
|
|
10
|
+
return [e(i), e(r), e(d)];
|
|
11
|
+
}, f = function(t) {
|
|
12
|
+
if (t === void 0 && (t = "margin"), typeof window > "u")
|
|
13
|
+
return a;
|
|
14
|
+
var n = o(t), i = document.documentElement.clientWidth, r = window.innerWidth;
|
|
15
|
+
return {
|
|
16
|
+
left: n[0],
|
|
17
|
+
top: n[1],
|
|
18
|
+
right: n[2],
|
|
19
|
+
gap: Math.max(0, r - i + n[2] - n[0])
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
f as getGapWidth,
|
|
24
|
+
a as zeroGap
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __assign as a } from "../../../../../tslib@2.4.1/node_modules/tslib/tslib.es6.mjs";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { RemoveScroll as r } from "./UI.mjs";
|
|
4
|
+
import s from "./sidecar.mjs";
|
|
5
|
+
import { jsx as t } from "../../../../../../../_virtual/jsx-runtime.mjs";
|
|
6
|
+
var f = m.forwardRef(function(o, e) {
|
|
7
|
+
return /* @__PURE__ */ t(r, {
|
|
8
|
+
...a({}, o, {
|
|
9
|
+
ref: e,
|
|
10
|
+
sideCar: s
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
f.classNames = r.classNames;
|
|
15
|
+
export {
|
|
16
|
+
f as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { __spreadArray as A } from "../../../../../tslib@2.4.1/node_modules/tslib/tslib.es6.mjs";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { RemoveScrollBar as j } from "../../../../../react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs";
|
|
4
|
+
import { styleSingleton as I } from "../../../../../react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs";
|
|
5
|
+
import { nonPassive as f } from "./aggresiveCapture.mjs";
|
|
6
|
+
import { locationCouldBeScrolled as B, handleScroll as W } from "./handleScroll.mjs";
|
|
7
|
+
import { jsxs as p, Fragment as F, jsx as X } from "../../../../../../../_virtual/jsx-runtime.mjs";
|
|
8
|
+
var k = function(t) {
|
|
9
|
+
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
10
|
+
}, x = function(t) {
|
|
11
|
+
return [t.deltaX, t.deltaY];
|
|
12
|
+
}, M = function(t) {
|
|
13
|
+
return t && "current" in t ? t.current : t;
|
|
14
|
+
}, Q = function(t, o) {
|
|
15
|
+
return t[0] === o[0] && t[1] === o[1];
|
|
16
|
+
}, Z = function(t) {
|
|
17
|
+
return `
|
|
18
|
+
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
19
|
+
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
20
|
+
`);
|
|
21
|
+
}, _ = 0, s = [];
|
|
22
|
+
function O(t) {
|
|
23
|
+
var o = n.useRef([]), E = n.useRef([0, 0]), h = n.useRef(), v = n.useState(_++)[0], m = n.useState(function() {
|
|
24
|
+
return I();
|
|
25
|
+
})[0], g = n.useRef(t);
|
|
26
|
+
n.useEffect(function() {
|
|
27
|
+
g.current = t;
|
|
28
|
+
}, [t]), n.useEffect(function() {
|
|
29
|
+
if (t.inert) {
|
|
30
|
+
document.body.classList.add("block-interactivity-".concat(v));
|
|
31
|
+
var e = A([t.lockRef.current], (t.shards || []).map(M)).filter(Boolean);
|
|
32
|
+
return e.forEach(function(r) {
|
|
33
|
+
return r.classList.add("allow-interactivity-".concat(v));
|
|
34
|
+
}), function() {
|
|
35
|
+
document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
|
|
36
|
+
return r.classList.remove("allow-interactivity-".concat(v));
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}, [t.inert, t.lockRef.current, t.shards]);
|
|
41
|
+
var y = n.useCallback(function(e, r) {
|
|
42
|
+
if ("touches" in e && e.touches.length === 2)
|
|
43
|
+
return !g.current.allowPinchZoom;
|
|
44
|
+
var i = k(e), u = E.current, c = "deltaX" in e ? e.deltaX : u[0] - i[0], l = "deltaY" in e ? e.deltaY : u[1] - i[1], a, C = e.target, d = Math.abs(c) > Math.abs(l) ? "h" : "v";
|
|
45
|
+
if ("touches" in e && d === "h" && C.type === "range")
|
|
46
|
+
return !1;
|
|
47
|
+
var b = B(d, C);
|
|
48
|
+
if (!b)
|
|
49
|
+
return !0;
|
|
50
|
+
if (b ? a = d : (a = d === "v" ? "h" : "v", b = B(d, C)), !b)
|
|
51
|
+
return !1;
|
|
52
|
+
if (!h.current && "changedTouches" in e && (c || l) && (h.current = a), !a)
|
|
53
|
+
return !0;
|
|
54
|
+
var Y = h.current || a;
|
|
55
|
+
return W(Y, r, e, Y === "h" ? c : l);
|
|
56
|
+
}, []), S = n.useCallback(function(e) {
|
|
57
|
+
var r = e;
|
|
58
|
+
if (!(!s.length || s[s.length - 1] !== m)) {
|
|
59
|
+
var i = "deltaY" in r ? x(r) : k(r), u = o.current.filter(function(a) {
|
|
60
|
+
return a.name === r.type && a.target === r.target && Q(a.delta, i);
|
|
61
|
+
})[0];
|
|
62
|
+
if (u && u.should) {
|
|
63
|
+
r.cancelable && r.preventDefault();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!u) {
|
|
67
|
+
var c = (g.current.shards || []).map(M).filter(Boolean).filter(function(a) {
|
|
68
|
+
return a.contains(r.target);
|
|
69
|
+
}), l = c.length > 0 ? y(r, c[0]) : !g.current.noIsolation;
|
|
70
|
+
l && r.cancelable && r.preventDefault();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, []), R = n.useCallback(function(e, r, i, u) {
|
|
74
|
+
var c = {
|
|
75
|
+
name: e,
|
|
76
|
+
delta: r,
|
|
77
|
+
target: i,
|
|
78
|
+
should: u
|
|
79
|
+
};
|
|
80
|
+
o.current.push(c), setTimeout(function() {
|
|
81
|
+
o.current = o.current.filter(function(l) {
|
|
82
|
+
return l !== c;
|
|
83
|
+
});
|
|
84
|
+
}, 1);
|
|
85
|
+
}, []), L = n.useCallback(function(e) {
|
|
86
|
+
E.current = k(e), h.current = void 0;
|
|
87
|
+
}, []), T = n.useCallback(function(e) {
|
|
88
|
+
R(e.type, x(e), e.target, y(e, t.lockRef.current));
|
|
89
|
+
}, []), w = n.useCallback(function(e) {
|
|
90
|
+
R(e.type, k(e), e.target, y(e, t.lockRef.current));
|
|
91
|
+
}, []);
|
|
92
|
+
n.useEffect(function() {
|
|
93
|
+
return s.push(m), t.setCallbacks({
|
|
94
|
+
onScrollCapture: T,
|
|
95
|
+
onWheelCapture: T,
|
|
96
|
+
onTouchMoveCapture: w
|
|
97
|
+
}), document.addEventListener("wheel", S, f), document.addEventListener("touchmove", S, f), document.addEventListener("touchstart", L, f), function() {
|
|
98
|
+
s = s.filter(function(e) {
|
|
99
|
+
return e !== m;
|
|
100
|
+
}), document.removeEventListener("wheel", S, f), document.removeEventListener("touchmove", S, f), document.removeEventListener("touchstart", L, f);
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
103
|
+
var D = t.removeScrollBar, P = t.inert;
|
|
104
|
+
return /* @__PURE__ */ p(F, {
|
|
105
|
+
children: [P ? /* @__PURE__ */ X(m, {
|
|
106
|
+
styles: Z(v)
|
|
107
|
+
}) : null, D ? /* @__PURE__ */ X(j, {
|
|
108
|
+
gapMode: "margin"
|
|
109
|
+
}) : null]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
export {
|
|
113
|
+
O as RemoveScrollSideCar,
|
|
114
|
+
x as getDeltaXY,
|
|
115
|
+
k as getTouchXY
|
|
116
|
+
};
|