@glodon-aiot/agent-cli-ui 3.0.6 → 3.0.7-beta.1
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 +454 -434
- 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 -22
- 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,47 @@
|
|
|
1
|
+
var j = Object.defineProperty, v = Object.defineProperties;
|
|
2
|
+
var A = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var m = Object.prototype.hasOwnProperty, u = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (e, t, r) => t in e ? j(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, c = (e, t) => {
|
|
6
|
+
for (var r in t || (t = {}))
|
|
7
|
+
m.call(t, r) && d(e, r, t[r]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var r of w(t))
|
|
10
|
+
u.call(t, r) && d(e, r, t[r]);
|
|
11
|
+
return e;
|
|
12
|
+
}, f = (e, t) => v(e, A(t));
|
|
13
|
+
var x = (e, t) => {
|
|
14
|
+
var r = {};
|
|
15
|
+
for (var n in e)
|
|
16
|
+
m.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
17
|
+
if (e != null && w)
|
|
18
|
+
for (var n of w(e))
|
|
19
|
+
t.indexOf(n) < 0 && u.call(e, n) && (r[n] = e[n]);
|
|
20
|
+
return r;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as s, jsxs as F, Fragment as N } from "../../../_virtual/jsx-runtime.mjs";
|
|
23
|
+
const k = (e) => {
|
|
24
|
+
var h, i;
|
|
25
|
+
const n = e, {
|
|
26
|
+
node: t
|
|
27
|
+
} = n, r = x(n, [
|
|
28
|
+
"node"
|
|
29
|
+
]);
|
|
30
|
+
if (t.tagName === "a" && ((h = t.children) == null ? void 0 : h.length) > 0) {
|
|
31
|
+
const o = ((i = t.children[0]) == null ? void 0 : i.value) || "";
|
|
32
|
+
let g = /(^https?:\/\/|^www\.)(?:www\.)?[\w\-]+(\.[\w\-]+)+(\/[\w\- .\/?%&=]*)?/g, a = o.match(g), p = o.replace(g, "").trim();
|
|
33
|
+
if (!(a != null && a.length))
|
|
34
|
+
return /* @__PURE__ */ s("a", c({}, r));
|
|
35
|
+
const l = a[0];
|
|
36
|
+
return /* @__PURE__ */ F(N, {
|
|
37
|
+
children: [/* @__PURE__ */ s("a", f(c({}, r), {
|
|
38
|
+
href: /^www\./.test(l) ? "//" + l : l,
|
|
39
|
+
children: l
|
|
40
|
+
})), p]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ s("a", c({}, r));
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
k as default
|
|
47
|
+
};
|
|
@@ -1,26 +1,60 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var g = Object.defineProperty, u = Object.defineProperties;
|
|
2
|
+
var k = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var a = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var w = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (e, i, t) => i in e ? g(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, l = (e, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
w.call(i, t) && c(e, t, i[t]);
|
|
8
8
|
if (a)
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { Image as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
for (var t of a(i))
|
|
10
|
+
I.call(i, t) && c(e, t, i[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, n = (e, i) => u(e, k(i));
|
|
13
|
+
import { jsx as m, jsxs as M, Fragment as V } from "../../../_virtual/jsx-runtime.mjs";
|
|
14
|
+
import { Image as b } from "antd";
|
|
15
|
+
import "../../../node_modules/antd-mobile/es/global/index.mjs";
|
|
16
|
+
import x from "../../../node_modules/antd-mobile/es/components/image-viewer/index.mjs";
|
|
17
|
+
import { useState as o, useEffect as y } from "react";
|
|
18
|
+
import { isMobile as h } from "../../../node_modules/react-device-detect/dist/lib.mjs";
|
|
19
|
+
import C from "../Video/index.mjs";
|
|
20
|
+
import { checkMediaType as T } from "../../../utils/index.mjs";
|
|
21
|
+
const A = (e) => {
|
|
22
|
+
const [i, t] = o(!1), [s, f] = o();
|
|
23
|
+
return y(() => {
|
|
24
|
+
e.src && f(T(e.src));
|
|
25
|
+
}, [e.src]), s == "video" ? /* @__PURE__ */ m(C, {
|
|
26
|
+
src: e.src,
|
|
27
|
+
controls: !0
|
|
28
|
+
}) : h ? /* @__PURE__ */ M(V, {
|
|
29
|
+
children: [/* @__PURE__ */ m("img", {
|
|
30
|
+
style: {
|
|
31
|
+
maxWidth: "100%"
|
|
32
|
+
},
|
|
33
|
+
src: e == null ? void 0 : e.src,
|
|
34
|
+
onClick: () => {
|
|
35
|
+
t(!0);
|
|
36
|
+
}
|
|
37
|
+
}), /* @__PURE__ */ m(x, {
|
|
38
|
+
image: e == null ? void 0 : e.src,
|
|
39
|
+
visible: i,
|
|
40
|
+
onClose: () => {
|
|
41
|
+
t(!1);
|
|
42
|
+
}
|
|
43
|
+
})]
|
|
44
|
+
}) : /* @__PURE__ */ m(b, n(l({
|
|
45
|
+
style: {
|
|
46
|
+
maxWidth: "100%"
|
|
47
|
+
}
|
|
48
|
+
}, e), {
|
|
49
|
+
onClick: (d) => {
|
|
50
|
+
var r;
|
|
51
|
+
return (r = e.onClick) == null ? void 0 : r.call(e, d);
|
|
52
|
+
},
|
|
53
|
+
onError: () => {
|
|
54
|
+
console.log(e), console.warn("图片加载失败");
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
24
58
|
export {
|
|
25
|
-
|
|
59
|
+
A as default
|
|
26
60
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var d = Object.getOwnPropertySymbols;
|
|
3
|
+
var h = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var i = (o, t, e) => t in o ? a(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, r = (o, t) => {
|
|
5
|
+
for (var e in t || (t = {}))
|
|
6
|
+
h.call(t, e) && i(o, e, t[e]);
|
|
7
|
+
if (d)
|
|
8
|
+
for (var e of d(t))
|
|
9
|
+
s.call(t, e) && i(o, e, t[e]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as m } from "../../../_virtual/jsx-runtime.mjs";
|
|
13
|
+
const f = (o) => /* @__PURE__ */ m("video", r({
|
|
14
|
+
style: {
|
|
15
|
+
maxWidth: "100%",
|
|
16
|
+
width: 560,
|
|
17
|
+
height: 315
|
|
18
|
+
}
|
|
19
|
+
}, o));
|
|
20
|
+
export {
|
|
21
|
+
f as default
|
|
22
|
+
};
|
|
@@ -1,69 +1,73 @@
|
|
|
1
1
|
var c = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var w = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var t = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var f = (r,
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var d = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var f = (r, o, e) => o in r ? c(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, i = (r, o) => {
|
|
6
|
+
for (var e in o || (o = {}))
|
|
7
|
+
d.call(o, e) && f(r, e, o[e]);
|
|
8
8
|
if (t)
|
|
9
|
-
for (var
|
|
10
|
-
|
|
9
|
+
for (var e of t(o))
|
|
10
|
+
l.call(o, e) && f(r, e, o[e]);
|
|
11
11
|
return r;
|
|
12
|
-
},
|
|
13
|
-
var k = (r,
|
|
14
|
-
var
|
|
12
|
+
}, s = (r, o) => g(r, w(o));
|
|
13
|
+
var k = (r, o) => {
|
|
14
|
+
var e = {};
|
|
15
15
|
for (var m in r)
|
|
16
|
-
|
|
16
|
+
d.call(r, m) && o.indexOf(m) < 0 && (e[m] = r[m]);
|
|
17
17
|
if (r != null && t)
|
|
18
18
|
for (var m of t(r))
|
|
19
|
-
|
|
20
|
-
return
|
|
19
|
+
o.indexOf(m) < 0 && l.call(r, m) && (e[m] = r[m]);
|
|
20
|
+
return e;
|
|
21
21
|
};
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { useRef as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
22
|
+
import { jsx as a } from "../../_virtual/jsx-runtime.mjs";
|
|
23
|
+
import { useRef as h } from "react";
|
|
24
|
+
import M from "react-markdown";
|
|
25
|
+
import x from "remark-gfm";
|
|
26
26
|
import y from "rehype-raw";
|
|
27
27
|
import R from "rehype-external-links";
|
|
28
28
|
import "../../node_modules/katex/dist/katex.min.css.mjs";
|
|
29
29
|
import "./style.less.mjs";
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { replaceLatexDelimiters as
|
|
30
|
+
import v from "./Image/index.mjs";
|
|
31
|
+
import L from "./Code/index.mjs";
|
|
32
|
+
import { replaceLatexDelimiters as P } from "../../utils/index.mjs";
|
|
33
|
+
import T from "./ATag/index.mjs";
|
|
34
|
+
import b from "./Video/index.mjs";
|
|
33
35
|
import j from "../../node_modules/rehype-katex/lib/index.mjs";
|
|
34
|
-
import
|
|
35
|
-
const
|
|
36
|
-
var
|
|
36
|
+
import A from "../../node_modules/remark-math/lib/index.mjs";
|
|
37
|
+
const Q = (m) => {
|
|
38
|
+
var n = m, {
|
|
37
39
|
showLatex: r = !0,
|
|
38
|
-
children:
|
|
39
|
-
} =
|
|
40
|
+
children: o
|
|
41
|
+
} = n, e = k(n, [
|
|
40
42
|
"showLatex",
|
|
41
43
|
"children"
|
|
42
44
|
]);
|
|
43
|
-
const u =
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
+
const u = h(null);
|
|
46
|
+
return /* @__PURE__ */ a("div", {
|
|
45
47
|
ref: u,
|
|
46
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ a(M, s(i({
|
|
47
49
|
className: "markdown",
|
|
48
50
|
rehypePlugins: [j, y, [R, {
|
|
49
51
|
target: "_blank"
|
|
50
52
|
}]],
|
|
51
|
-
remarkPlugins: [
|
|
53
|
+
remarkPlugins: [A, [x, {
|
|
52
54
|
singleTilde: !1
|
|
53
55
|
}]]
|
|
54
|
-
},
|
|
55
|
-
children: r ?
|
|
56
|
+
}, e), {
|
|
57
|
+
children: r ? P(o) : o,
|
|
56
58
|
components: {
|
|
57
|
-
img(
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
+
img(p) {
|
|
60
|
+
return /* @__PURE__ */ a(v, i({}, p));
|
|
59
61
|
},
|
|
60
|
-
code(
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
}
|
|
62
|
+
code(p) {
|
|
63
|
+
return /* @__PURE__ */ a(L, i({}, p));
|
|
64
|
+
},
|
|
65
|
+
video: b,
|
|
66
|
+
a: T
|
|
63
67
|
}
|
|
64
68
|
}))
|
|
65
69
|
});
|
|
66
70
|
};
|
|
67
71
|
export {
|
|
68
|
-
|
|
72
|
+
Q as default
|
|
69
73
|
};
|