@glodon-aiot/agent-cli-ui 3.0.5 → 3.0.7-beta.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/es/Dialog/AgentChat/index.mjs +371 -353
- package/dist/es/_virtual/lib.mjs +4 -0
- package/dist/es/_virtual/ua-parser.min.mjs +4 -0
- package/dist/es/components/Markdown/ATag/index.mjs +47 -0
- package/dist/es/components/Markdown/Image/index.mjs +56 -22
- package/dist/es/components/Markdown/Video/index.mjs +22 -0
- package/dist/es/components/Markdown/index.mjs +41 -37
- package/dist/es/index.mjs +15 -15
- package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +201 -0
- package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +1087 -0
- package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +104 -0
- package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +568 -0
- package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +158 -0
- package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +847 -0
- package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +35 -0
- package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +226 -0
- package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +33 -0
- package/dist/es/node_modules/ahooks/es/useRafState/index.mjs +16 -0
- package/dist/es/node_modules/ahooks/es/useSize/index.mjs +34 -0
- package/dist/es/node_modules/ahooks/es/useUnmountedRef/index.mjs +13 -0
- package/dist/es/node_modules/ahooks/es/utils/useIsomorphicLayoutEffectWithTarget.mjs +8 -0
- package/dist/es/node_modules/ahooks/es/utils/useLayoutEffectWithTarget.mjs +7 -0
- package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +20 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +76 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +14 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +34 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +172 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +81 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +84 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/global/index.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +141 -0
- package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +7 -0
- package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +22 -0
- package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +46 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +13 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +52 -0
- package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +10 -0
- package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +15 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +8 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +54 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +32 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +19 -0
- package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +11 -11
- package/dist/es/node_modules/react-device-detect/dist/lib.mjs +723 -0
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs +294 -0
- package/dist/es/node_modules/tslib/tslib.es6.mjs +56 -7
- package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +120 -0
- package/dist/es/utils/index.mjs +37 -23
- package/dist/lib/index.js +50 -48
- package/dist/src/components/Markdown/ATag/index.d.ts +3 -0
- package/dist/src/components/Markdown/Video/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createPortal as e } from "react-dom";
|
|
2
|
+
import { resolveContainer as n } from "./get-container.mjs";
|
|
3
|
+
import { canUseDom as i } from "./can-use-dom.mjs";
|
|
4
|
+
function f(r, o) {
|
|
5
|
+
if (i && r) {
|
|
6
|
+
const t = n(r);
|
|
7
|
+
return e(o, t);
|
|
8
|
+
}
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
f as renderToContainer
|
|
13
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __awaiter as c } from "../../../tslib/tslib.es6.mjs";
|
|
2
|
+
import * as _ from "react-dom";
|
|
3
|
+
const e = Object.assign({}, _), {
|
|
4
|
+
version: s,
|
|
5
|
+
render: f,
|
|
6
|
+
unmountComponentAtNode: l
|
|
7
|
+
} = e;
|
|
8
|
+
let r;
|
|
9
|
+
try {
|
|
10
|
+
Number((s || "").split(".")[0]) >= 18 && e.createRoot && (r = e.createRoot);
|
|
11
|
+
} catch (n) {
|
|
12
|
+
}
|
|
13
|
+
function i(n) {
|
|
14
|
+
const {
|
|
15
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: t
|
|
16
|
+
} = e;
|
|
17
|
+
t && typeof t == "object" && (t.usingClientEntryPoint = n);
|
|
18
|
+
}
|
|
19
|
+
const o = "__antd_mobile_root__";
|
|
20
|
+
function m(n, t) {
|
|
21
|
+
f(n, t);
|
|
22
|
+
}
|
|
23
|
+
function a(n, t) {
|
|
24
|
+
i(!0);
|
|
25
|
+
const u = t[o] || r(t);
|
|
26
|
+
i(!1), u.render(n), t[o] = u;
|
|
27
|
+
}
|
|
28
|
+
function v(n, t) {
|
|
29
|
+
if (r) {
|
|
30
|
+
a(n, t);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
m(n, t);
|
|
34
|
+
}
|
|
35
|
+
function d(n) {
|
|
36
|
+
return l(n);
|
|
37
|
+
}
|
|
38
|
+
function R(n) {
|
|
39
|
+
return c(this, void 0, void 0, function* () {
|
|
40
|
+
return Promise.resolve().then(() => {
|
|
41
|
+
var t;
|
|
42
|
+
(t = n[o]) === null || t === void 0 || t.unmount(), delete n[o];
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function E(n) {
|
|
47
|
+
return r ? R(n) : d(n);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
v as render,
|
|
51
|
+
E as unmount
|
|
52
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { bound as d } from "./bound.mjs";
|
|
2
|
+
function O(r, u, f) {
|
|
3
|
+
return r * u * f / (u + f * r);
|
|
4
|
+
}
|
|
5
|
+
function I(r, u, f, e, b = 0.15) {
|
|
6
|
+
return b === 0 ? d(r, u, f) : r < u ? -O(u - r, e, b) + u : r > f ? +O(r - f, e, b) + f : r;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
O as rubberband,
|
|
10
|
+
I as rubberbandIfOutOfBounds
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useInitialized as u } from "./use-initialized.mjs";
|
|
2
|
+
const l = (e) => d(e.active, e.forceRender, e.destroyOnClose) ? e.children : null;
|
|
3
|
+
function d(e, n, r) {
|
|
4
|
+
const t = u(e);
|
|
5
|
+
return n || e ? !0 : t ? !r : !1;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
l as ShouldRender,
|
|
9
|
+
d as useShouldRender
|
|
10
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { canUseDom as t } from "./can-use-dom.mjs";
|
|
2
|
+
let s = !1;
|
|
3
|
+
if (t)
|
|
4
|
+
try {
|
|
5
|
+
const e = {};
|
|
6
|
+
Object.defineProperty(e, "passive", {
|
|
7
|
+
get() {
|
|
8
|
+
s = !0;
|
|
9
|
+
}
|
|
10
|
+
}), window.addEventListener("test-passive", null, e);
|
|
11
|
+
} catch (e) {
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
s as supportsPassive
|
|
15
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useTouch as E } from "./use-touch.mjs";
|
|
2
|
+
import { useEffect as L } from "react";
|
|
3
|
+
import { getScrollParent as b } from "./get-scroll-parent.mjs";
|
|
4
|
+
import { supportsPassive as m } from "./supports-passive.mjs";
|
|
5
|
+
let r = 0;
|
|
6
|
+
const f = "adm-overflow-hidden";
|
|
7
|
+
function S(o) {
|
|
8
|
+
let t = o == null ? void 0 : o.parentElement;
|
|
9
|
+
for (; t; ) {
|
|
10
|
+
if (t.clientHeight < t.scrollHeight)
|
|
11
|
+
return t;
|
|
12
|
+
t = t.parentElement;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
function P(o, t) {
|
|
17
|
+
const n = E(), i = (e) => {
|
|
18
|
+
n.move(e);
|
|
19
|
+
const h = n.deltaY.current > 0 ? "10" : "01", s = b(e.target, o.current);
|
|
20
|
+
if (!s)
|
|
21
|
+
return;
|
|
22
|
+
if (t === "strict") {
|
|
23
|
+
const a = S(e.target);
|
|
24
|
+
if (a === document.body || a === document.documentElement) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const {
|
|
30
|
+
scrollHeight: l,
|
|
31
|
+
offsetHeight: v,
|
|
32
|
+
scrollTop: u
|
|
33
|
+
} = s, {
|
|
34
|
+
height: g
|
|
35
|
+
} = s.getBoundingClientRect();
|
|
36
|
+
let c = "11";
|
|
37
|
+
u === 0 ? c = v >= l ? "00" : "01" : l <= Math.round(g + u) && (c = "10"), c !== "11" && n.isVertical() && !(parseInt(c, 2) & parseInt(h, 2)) && e.cancelable && m && e.preventDefault();
|
|
38
|
+
}, d = () => {
|
|
39
|
+
document.addEventListener("touchstart", n.start), document.addEventListener("touchmove", i, m ? {
|
|
40
|
+
passive: !1
|
|
41
|
+
} : !1), r || document.body.classList.add(f), r++;
|
|
42
|
+
}, p = () => {
|
|
43
|
+
r && (document.removeEventListener("touchstart", n.start), document.removeEventListener("touchmove", i), r--, r || document.body.classList.remove(f));
|
|
44
|
+
};
|
|
45
|
+
L(() => {
|
|
46
|
+
if (t)
|
|
47
|
+
return d(), () => {
|
|
48
|
+
p();
|
|
49
|
+
};
|
|
50
|
+
}, [t]);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
P as useLockScroll
|
|
54
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useRef as c } from "react";
|
|
2
|
+
const f = 10;
|
|
3
|
+
function Y(t, r) {
|
|
4
|
+
return t > r && t > f ? "horizontal" : r > t && r > f ? "vertical" : "";
|
|
5
|
+
}
|
|
6
|
+
function z() {
|
|
7
|
+
const t = c(0), r = c(0), e = c(0), o = c(0), u = c(0), s = c(0), n = c(""), h = () => n.current === "vertical", X = () => n.current === "horizontal", l = () => {
|
|
8
|
+
e.current = 0, o.current = 0, u.current = 0, s.current = 0, n.current = "";
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
move: (i) => {
|
|
12
|
+
const a = i.touches[0];
|
|
13
|
+
e.current = a.clientX < 0 ? 0 : a.clientX - t.current, o.current = a.clientY - r.current, u.current = Math.abs(e.current), s.current = Math.abs(o.current), n.current || (n.current = Y(u.current, s.current));
|
|
14
|
+
},
|
|
15
|
+
start: (i) => {
|
|
16
|
+
l(), t.current = i.touches[0].clientX, r.current = i.touches[0].clientY;
|
|
17
|
+
},
|
|
18
|
+
reset: l,
|
|
19
|
+
startX: t,
|
|
20
|
+
startY: r,
|
|
21
|
+
deltaX: e,
|
|
22
|
+
deltaY: o,
|
|
23
|
+
offsetX: u,
|
|
24
|
+
offsetY: s,
|
|
25
|
+
direction: n,
|
|
26
|
+
isVertical: h,
|
|
27
|
+
isHorizontal: X
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
z as useTouch
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import s from "react";
|
|
2
|
+
const l = {
|
|
3
|
+
click: "onClick",
|
|
4
|
+
touchstart: "onTouchStart"
|
|
5
|
+
};
|
|
6
|
+
function f(a, o) {
|
|
7
|
+
const r = Object.assign({}, o.props);
|
|
8
|
+
for (const i of a) {
|
|
9
|
+
const c = l[i];
|
|
10
|
+
r[c] = function(n) {
|
|
11
|
+
var p, t;
|
|
12
|
+
n.stopPropagation(), (t = (p = o.props)[c]) === null || t === void 0 || t.call(p, n);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return s.cloneElement(o, r);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
f as withStopPropagation
|
|
19
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as
|
|
1
|
+
import { __exports as f } from "../../../_virtual/react-jsx-runtime.production.min.mjs";
|
|
2
2
|
import "../../object-assign/index.mjs";
|
|
3
3
|
import s from "react";
|
|
4
4
|
/** @license React v17.0.2
|
|
@@ -10,36 +10,36 @@ import s from "react";
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var u = s, l = 60103;
|
|
13
|
-
|
|
13
|
+
f.Fragment = 60107;
|
|
14
14
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
15
15
|
var i = Symbol.for;
|
|
16
|
-
l = i("react.element"),
|
|
16
|
+
l = i("react.element"), f.Fragment = i("react.fragment");
|
|
17
17
|
}
|
|
18
|
-
var y = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty,
|
|
18
|
+
var y = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, d = {
|
|
19
19
|
key: !0,
|
|
20
20
|
ref: !0,
|
|
21
21
|
__self: !0,
|
|
22
22
|
__source: !0
|
|
23
23
|
};
|
|
24
24
|
function m(o, r, _) {
|
|
25
|
-
var e, t = {},
|
|
26
|
-
_ !== void 0 && (
|
|
25
|
+
var e, t = {}, n = null, p = null;
|
|
26
|
+
_ !== void 0 && (n = "" + _), r.key !== void 0 && (n = "" + r.key), r.ref !== void 0 && (p = r.ref);
|
|
27
27
|
for (e in r)
|
|
28
|
-
a.call(r, e) && !
|
|
28
|
+
a.call(r, e) && !d.hasOwnProperty(e) && (t[e] = r[e]);
|
|
29
29
|
if (o && o.defaultProps)
|
|
30
30
|
for (e in r = o.defaultProps, r)
|
|
31
31
|
t[e] === void 0 && (t[e] = r[e]);
|
|
32
32
|
return {
|
|
33
33
|
$$typeof: l,
|
|
34
34
|
type: o,
|
|
35
|
-
key:
|
|
35
|
+
key: n,
|
|
36
36
|
ref: p,
|
|
37
37
|
props: t,
|
|
38
38
|
_owner: y.current
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
f.jsx = m;
|
|
42
|
+
f.jsxs = m;
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
f as default
|
|
45
45
|
};
|