@matechat/core 1.13.0-alpha.0 → 1.13.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.
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
package/Layout/index.css CHANGED
@@ -1 +1 @@
1
- .mc-layout-content-container[data-v-0df2e155]{position:relative;flex:auto;display:flex;flex-direction:column;min-height:0;margin-right:-20px}.mc-layout-content-container .mc-layout-content-scroller[data-v-0df2e155]{flex:1;overflow:auto;padding-right:8px;scrollbar-width:thin;scrollbar-gutter:stable}.mc-layout-content-container .mc-layout-content-arrow[data-v-0df2e155]{position:absolute;left:50%;transform:translate(-50%);z-index:9;display:flex;justify-content:center;align-items:center;width:32px;height:32px;cursor:pointer}.mc-layout-content-container .mc-layout-content-arrow.up[data-v-0df2e155]{top:20px}.mc-layout-content-container .mc-layout-content-arrow.down[data-v-0df2e155]{bottom:20px}.mc-layout-content-container .mc-layout-content-arrow:hover>div[data-v-0df2e155]{transform:scale(1.3);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24))}.mc-layout-content-container .mc-layout-content-arrow div[data-v-0df2e155]{display:flex;justify-content:center;align-items:center;width:24px;height:24px;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-full, 100px);box-shadow:var(--devui-box-shadow-length-base, 0 1px 6px 0) var(--devui-shadow, rgba(0, 0, 0, .16));transition:transform .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),box-shadow .3s var(--devui-animation-duration-base, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.mc-layout-header[data-v-05f64ad5]{flex:0 0 auto;min-height:40px}.mc-layout[data-v-f9e238c6]{display:flex;flex:auto;flex-direction:column}.mc-layout-aside[data-v-f9e238c6]{flex-direction:row}
1
+ .mc-layout-content-container[data-v-9c27afee]{position:relative;flex:auto;display:flex;flex-direction:column;min-height:0;margin-right:-20px}.mc-layout-content-container .mc-layout-content-scroller[data-v-9c27afee]{flex:1;overflow:auto;padding-right:8px;scrollbar-width:thin;scrollbar-gutter:stable}.mc-layout-content-container .mc-layout-content-arrow[data-v-9c27afee]{position:absolute;left:50%;transform:translate(-50%);z-index:9;display:flex;justify-content:center;align-items:center;width:32px;height:32px;cursor:pointer}.mc-layout-content-container .mc-layout-content-arrow.up[data-v-9c27afee]{top:20px}.mc-layout-content-container .mc-layout-content-arrow.down[data-v-9c27afee]{bottom:20px}.mc-layout-content-container .mc-layout-content-arrow:hover>div[data-v-9c27afee]{transform:scale(1.3);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24))}.mc-layout-content-container .mc-layout-content-arrow div[data-v-9c27afee]{display:flex;justify-content:center;align-items:center;width:24px;height:24px;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-full, 100px);box-shadow:var(--devui-box-shadow-length-base, 0 1px 6px 0) var(--devui-shadow, rgba(0, 0, 0, .16));transition:transform .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),box-shadow .3s var(--devui-animation-duration-base, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.mc-layout-header[data-v-05f64ad5]{flex:0 0 auto;min-height:40px}.mc-layout[data-v-f9e238c6]{display:flex;flex:auto;flex-direction:column}.mc-layout-aside[data-v-f9e238c6]{flex-direction:row}
package/Layout/index.js CHANGED
@@ -1,83 +1,133 @@
1
1
  import "./index.css";
2
- import { openBlock as r, createElementBlock as c, renderSlot as a, defineComponent as T, ref as f, onMounted as b, onUnmounted as A, createElementVNode as s, Fragment as B, createCommentVNode as h } from "vue";
2
+ import { openBlock as r, createElementBlock as s, renderSlot as i, createElementVNode as a, defineComponent as C, ref as f, onMounted as E, onUnmounted as T, Fragment as b, createVNode as H, createCommentVNode as p } from "vue";
3
3
  import { debounce as R } from "lodash-es";
4
- const u = (o, l) => {
5
- const i = o.__vccOpts || o;
6
- for (const [v, d] of l)
7
- i[v] = d;
8
- return i;
9
- }, I = {}, O = { class: "mc-layout-aside" };
10
- function x(o, l) {
11
- return r(), c("div", O, [
12
- a(o.$slots, "default")
4
+ const l = (o, c) => {
5
+ const d = o.__vccOpts || o;
6
+ for (const [_, u] of c)
7
+ d[_] = u;
8
+ return d;
9
+ }, V = {}, I = { class: "mc-layout-aside" };
10
+ function z(o, c) {
11
+ return r(), s("div", I, [
12
+ i(o.$slots, "default")
13
13
  ]);
14
14
  }
15
- const z = /* @__PURE__ */ u(I, [["render", x]]), N = { class: "mc-layout-content-container" }, U = /* @__PURE__ */ T({
15
+ const N = /* @__PURE__ */ l(V, [["render", z]]), O = {}, U = {
16
+ t: "1773994085709",
17
+ class: "icon",
18
+ viewBox: "0 0 1024 1024",
19
+ version: "1.1",
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ "p-id": "4044",
22
+ width: "16",
23
+ height: "16"
24
+ };
25
+ function D(o, c) {
26
+ return r(), s("svg", U, c[0] || (c[0] = [
27
+ a(
28
+ "path",
29
+ {
30
+ d: "M898.133333 512c-12.8-12.8-32-12.8-44.8-2.133333L544 800V149.333333c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v650.666667L170.666667 509.866667c-12.8-12.8-34.133333-10.666667-44.8 2.133333-12.8 12.8-10.666667 34.133333 2.133333 44.8l362.666667 341.333333c2.133333 2.133333 6.4 4.266667 8.533333 6.4 4.266667 2.133333 6.4 2.133333 10.666667 2.133334s8.533333 0 10.666666-2.133334c4.266667-2.133333 6.4-4.266667 8.533334-6.4l362.666666-341.333333c17.066667-12.8 19.2-32 6.4-44.8z",
31
+ fill: "#666666",
32
+ "p-id": "4045"
33
+ },
34
+ null,
35
+ -1
36
+ /* HOISTED */
37
+ )
38
+ ]));
39
+ }
40
+ const W = /* @__PURE__ */ l(O, [["render", D]]), F = {}, P = {
41
+ t: "1773991901622",
42
+ class: "icon",
43
+ viewBox: "0 0 1024 1024",
44
+ version: "1.1",
45
+ xmlns: "http://www.w3.org/2000/svg",
46
+ "p-id": "3858",
47
+ width: "16",
48
+ height: "16"
49
+ };
50
+ function Y(o, c) {
51
+ return r(), s("svg", P, c[0] || (c[0] = [
52
+ a(
53
+ "path",
54
+ {
55
+ d: "M896 467.2l-362.666667-341.333333c-2.133333-2.133333-6.4-4.266667-8.533333-6.4-4.266667-2.133333-6.4-2.133333-10.666667-2.133334s-8.533333 0-10.666666 2.133334c-4.266667 2.133333-6.4 4.266667-8.533334 6.4l-362.666666 341.333333c-12.8 12.8-12.8 32-2.133334 44.8 12.8 12.8 32 12.8 44.8 2.133333l309.333334-290.133333V874.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V224L853.333333 514.133333c6.4 6.4 14.933333 8.533333 21.333334 8.533334 8.533333 0 17.066667-4.266667 23.466666-10.666667 12.8-12.8 10.666667-32-2.133333-44.8z",
56
+ fill: "#666666",
57
+ "p-id": "3859"
58
+ },
59
+ null,
60
+ -1
61
+ /* HOISTED */
62
+ )
63
+ ]));
64
+ }
65
+ const j = /* @__PURE__ */ l(F, [["render", Y]]), q = { class: "mc-layout-content-container" }, G = /* @__PURE__ */ C({
16
66
  __name: "Content",
17
67
  props: {
18
68
  autoScroll: { type: Boolean, default: !0 },
19
69
  showScrollArrow: { type: Boolean, default: !0 }
20
70
  },
21
71
  emits: ["onScrollerWheel", "onScrollerScroll"],
22
- setup(o, { expose: l, emit: i }) {
23
- const v = o, d = i, n = f(), p = f(), w = f(!1), L = f(!1), S = new ResizeObserver(() => {
24
- g();
72
+ setup(o, { expose: c, emit: d }) {
73
+ const _ = o, u = d, t = f(), w = f(), y = f(!1), $ = f(!1), L = new ResizeObserver(() => {
74
+ M();
25
75
  });
26
- let $ = !1;
27
- const _ = (e) => {
28
- n.value && n.value.scrollTo({ top: e, behavior: "smooth" });
76
+ let g = !1;
77
+ const v = (e) => {
78
+ t.value && t.value.scrollTo({ top: e, behavior: "smooth" });
29
79
  }, m = () => {
30
80
  var e;
31
- _(((e = n.value) == null ? void 0 : e.scrollHeight) || 0);
32
- }, M = () => {
33
- _(0);
34
- }, g = (e = !1) => {
35
- v.autoScroll && ($ && !e || m());
81
+ v(((e = t.value) == null ? void 0 : e.scrollHeight) || 0);
82
+ }, S = () => {
83
+ v(0);
84
+ }, M = (e = !1) => {
85
+ _.autoScroll && (g && !e || m());
36
86
  }, k = (e) => {
37
- if (!n.value)
87
+ if (!t.value)
38
88
  return;
39
- const t = Math.abs(
40
- n.value.scrollTop + n.value.clientHeight - n.value.scrollHeight
89
+ const n = Math.abs(
90
+ t.value.scrollTop + t.value.clientHeight - t.value.scrollHeight
41
91
  ) < 32;
42
- e.deltaY !== 0 && ($ = !t), d("onScrollerWheel", e);
43
- }, y = R((e) => {
44
- const t = e.target;
45
- t && (w.value = t.scrollTop !== 0, L.value = t.scrollTop + t.clientHeight + 32 < t.scrollHeight, d("onScrollerScroll", e));
46
- }, 100), C = () => {
47
- var e, t;
48
- (e = n.value) == null || e.addEventListener("scroll", y), (t = n.value) == null || t.addEventListener("wheel", k);
49
- }, E = () => {
50
- var e, t;
51
- (e = n.value) == null || e.removeEventListener("scroll", y), (t = n.value) == null || t.removeEventListener("wheel", k);
92
+ e.deltaY !== 0 && (g = !n), u("onScrollerWheel", e);
93
+ }, h = R((e) => {
94
+ const n = e.target;
95
+ n && (y.value = n.scrollTop !== 0, $.value = n.scrollTop + n.clientHeight + 32 < n.scrollHeight, u("onScrollerScroll", e));
96
+ }, 100), A = () => {
97
+ var e, n;
98
+ (e = t.value) == null || e.addEventListener("scroll", h), (n = t.value) == null || n.addEventListener("wheel", k);
99
+ }, B = () => {
100
+ var e, n;
101
+ (e = t.value) == null || e.removeEventListener("scroll", h), (n = t.value) == null || n.removeEventListener("wheel", k);
52
102
  };
53
- return b(() => {
54
- S.observe(p.value), C(), y({ target: n.value });
55
- }), A(() => {
56
- S.disconnect(), E();
57
- }), l({
58
- scrollerRef: n,
59
- updateScroll: g,
60
- scrollToPosition: _,
103
+ return E(() => {
104
+ L.observe(w.value), A(), h({ target: t.value });
105
+ }), T(() => {
106
+ L.disconnect(), B();
107
+ }), c({
108
+ scrollerRef: t,
109
+ updateScroll: M,
110
+ scrollToPosition: v,
61
111
  scrollToBottom: m,
62
- scrollToTop: M
63
- }), (e, t) => (r(), c("div", N, [
64
- s(
112
+ scrollToTop: S
113
+ }), (e, n) => (r(), s("div", q, [
114
+ a(
65
115
  "div",
66
116
  {
67
117
  ref_key: "scrollerRef",
68
- ref: n,
118
+ ref: t,
69
119
  class: "mc-layout-content-scroller"
70
120
  },
71
121
  [
72
- s(
122
+ a(
73
123
  "div",
74
124
  {
75
125
  ref_key: "contentRef",
76
- ref: p,
126
+ ref: w,
77
127
  class: "mc-layout-content"
78
128
  },
79
129
  [
80
- a(e.$slots, "default", {}, void 0, !0)
130
+ i(e.$slots, "default", {}, void 0, !0)
81
131
  ],
82
132
  512
83
133
  /* NEED_PATCH */
@@ -86,72 +136,60 @@ const z = /* @__PURE__ */ u(I, [["render", x]]), N = { class: "mc-layout-content
86
136
  512
87
137
  /* NEED_PATCH */
88
138
  ),
89
- e.showScrollArrow ? (r(), c(
90
- B,
139
+ e.showScrollArrow ? (r(), s(
140
+ b,
91
141
  { key: 0 },
92
142
  [
93
- w.value ? (r(), c("div", {
143
+ y.value ? (r(), s("div", {
94
144
  key: 0,
95
145
  class: "mc-layout-content-arrow up",
96
- onClick: M
97
- }, t[0] || (t[0] = [
98
- s(
99
- "div",
100
- null,
101
- [
102
- s("i", { class: "icon icon-arrow-up-l" })
103
- ],
104
- -1
105
- /* HOISTED */
106
- )
107
- ]))) : h("v-if", !0),
108
- L.value ? (r(), c("div", {
146
+ onClick: S
147
+ }, [
148
+ a("div", null, [
149
+ H(j)
150
+ ])
151
+ ])) : p("v-if", !0),
152
+ $.value ? (r(), s("div", {
109
153
  key: 1,
110
154
  class: "mc-layout-content-arrow down",
111
155
  onClick: m
112
- }, t[1] || (t[1] = [
113
- s(
114
- "div",
115
- null,
116
- [
117
- s("i", { class: "icon icon-arrow-down-l" })
118
- ],
119
- -1
120
- /* HOISTED */
121
- )
122
- ]))) : h("v-if", !0)
156
+ }, [
157
+ a("div", null, [
158
+ H(W)
159
+ ])
160
+ ])) : p("v-if", !0)
123
161
  ],
124
162
  64
125
163
  /* STABLE_FRAGMENT */
126
- )) : h("v-if", !0)
164
+ )) : p("v-if", !0)
127
165
  ]));
128
166
  }
129
- }), V = /* @__PURE__ */ u(U, [["__scopeId", "data-v-0df2e155"]]), W = {}, D = { class: "mc-layout-header" };
130
- function F(o, l) {
131
- return r(), c("div", D, [
132
- a(o.$slots, "default", {}, void 0, !0)
167
+ }), J = /* @__PURE__ */ l(G, [["__scopeId", "data-v-9c27afee"]]), K = {}, Q = { class: "mc-layout-header" };
168
+ function X(o, c) {
169
+ return r(), s("div", Q, [
170
+ i(o.$slots, "default", {}, void 0, !0)
133
171
  ]);
134
172
  }
135
- const P = /* @__PURE__ */ u(W, [["render", F], ["__scopeId", "data-v-05f64ad5"]]), Y = {}, j = { class: "mc-layout" };
136
- function q(o, l) {
137
- return r(), c("div", j, [
138
- a(o.$slots, "default", {}, void 0, !0)
173
+ const Z = /* @__PURE__ */ l(K, [["render", X], ["__scopeId", "data-v-05f64ad5"]]), e3 = {}, o3 = { class: "mc-layout" };
174
+ function t3(o, c) {
175
+ return r(), s("div", o3, [
176
+ i(o.$slots, "default", {}, void 0, !0)
139
177
  ]);
140
178
  }
141
- const H = /* @__PURE__ */ u(Y, [["render", q], ["__scopeId", "data-v-f9e238c6"]]), G = {}, J = { class: "mc-layout-sender" };
142
- function K(o, l) {
143
- return r(), c("div", J, [
144
- a(o.$slots, "default")
179
+ const x = /* @__PURE__ */ l(e3, [["render", t3], ["__scopeId", "data-v-f9e238c6"]]), n3 = {}, c3 = { class: "mc-layout-sender" };
180
+ function r3(o, c) {
181
+ return r(), s("div", c3, [
182
+ i(o.$slots, "default")
145
183
  ]);
146
184
  }
147
- const Q = /* @__PURE__ */ u(G, [["render", K]]);
148
- H.install = (o) => {
149
- o.component("McLayoutAside", z), o.component("McLayoutContent", V), o.component("McLayoutHeader", P), o.component("McLayout", H), o.component("McLayoutSender", Q);
185
+ const s3 = /* @__PURE__ */ l(n3, [["render", r3]]);
186
+ x.install = (o) => {
187
+ o.component("McLayoutAside", N), o.component("McLayoutContent", J), o.component("McLayoutHeader", Z), o.component("McLayout", x), o.component("McLayoutSender", s3);
150
188
  };
151
189
  export {
152
- H as McLayout,
153
- z as McLayoutAside,
154
- V as McLayoutContent,
155
- P as McLayoutHeader,
156
- Q as McLayoutSender
190
+ x as McLayout,
191
+ N as McLayoutAside,
192
+ J as McLayoutContent,
193
+ Z as McLayoutHeader,
194
+ s3 as McLayoutSender
157
195
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matechat/core",
3
- "version": "1.13.0-alpha.0",
3
+ "version": "1.13.0",
4
4
  "license": "MIT",
5
5
  "description": "前端智能化场景解决方案UI库,轻松构建你的AI应用。",
6
6
  "keywords": [