yc-agent-ui 1.2.1 → 1.2.3
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 +26 -5
- package/es/components/chart/src/chart-card.vue.d.ts +56 -10
- package/es/components/chart/src/chart-container.vue.d.ts +11 -1
- package/es/components/chart/src/theme.d.ts +1 -1
- package/es/components/dialog/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +6 -6
- package/es/components/dialog-form/src/index.vue.d.ts +6 -6
- package/es/components/display-item/index.d.ts +21 -21
- package/es/components/display-item/src/index.vue.d.ts +19 -19
- package/es/components/drawer-form/index.d.ts +18 -18
- package/es/components/drawer-form/src/index.vue.d.ts +10 -10
- package/es/components/form/index.d.ts +12 -12
- package/es/components/form/src/form-content.vue.d.ts +12 -12
- package/es/components/form/src/index.vue.d.ts +12 -12
- package/es/components/form-item/index.d.ts +12 -12
- package/es/components/form-item/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +258 -258
- package/es/components/page/src/index.vue.d.ts +90 -90
- package/es/components/render/index.d.ts +1 -1
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +78 -78
- package/es/components/search/src/index.vue.d.ts +30 -30
- package/es/components/table/src/table-column.vue.d.ts +46 -46
- package/es/components/yc-ai-chat/index.d.ts +1 -0
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/select.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +29 -2
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
- package/es/components/yc-ai-chat/src/type.d.ts +2 -0
- package/es/components/yc-plus-page/src/index.vue.d.ts +264 -264
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +144 -144
- package/es/index.css +8 -8
- package/es/index.mjs +1 -0
- package/es/packages/components/chart/src/chart-card2.vue.mjs +9 -2
- package/es/packages/components/chart/src/chart-container2.vue.mjs +13 -1
- package/es/packages/components/chart/src/theme.mjs +18 -10
- package/es/packages/components/data-table/capability.mjs +1 -1
- package/es/packages/components/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +21 -13
- package/es/packages/components/yc-ai-chat/src/select2.vue.mjs +9 -4
- package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +5 -3
- package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +735 -150
- package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +452 -85
- package/es/packages/components/yc-gradient-card/capability.mjs +8 -8
- package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +48 -24
- package/es/packages/registry/types.mjs +1 -1
- package/es/registry/types.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +5707 -1690
- package/index.min.js +41 -38
- package/index.min.mjs +38 -35
- package/index.mjs +5772 -1765
- package/lib/components/chart/src/chart-card.vue.d.ts +56 -10
- package/lib/components/chart/src/chart-container.vue.d.ts +11 -1
- package/lib/components/chart/src/theme.d.ts +1 -1
- package/lib/components/dialog/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +6 -6
- package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
- package/lib/components/display-item/index.d.ts +21 -21
- package/lib/components/display-item/src/index.vue.d.ts +19 -19
- package/lib/components/drawer-form/index.d.ts +18 -18
- package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
- package/lib/components/form/index.d.ts +12 -12
- package/lib/components/form/src/form-content.vue.d.ts +12 -12
- package/lib/components/form/src/index.vue.d.ts +12 -12
- package/lib/components/form-item/index.d.ts +12 -12
- package/lib/components/form-item/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +258 -258
- package/lib/components/page/src/index.vue.d.ts +90 -90
- package/lib/components/render/index.d.ts +1 -1
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +78 -78
- package/lib/components/search/src/index.vue.d.ts +30 -30
- package/lib/components/table/src/table-column.vue.d.ts +46 -46
- package/lib/components/yc-ai-chat/index.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/select.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +29 -2
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
- package/lib/components/yc-ai-chat/src/type.d.ts +2 -0
- package/lib/components/yc-plus-page/src/index.vue.d.ts +264 -264
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +144 -144
- package/lib/index.css +12 -12
- package/lib/index.js +41 -0
- package/lib/packages/components/chart/src/chart-card2.vue.js +9 -2
- package/lib/packages/components/chart/src/chart-container2.vue.js +13 -1
- package/lib/packages/components/chart/src/theme.js +18 -10
- package/lib/packages/components/data-table/capability.js +1 -1
- package/lib/packages/components/index.js +41 -0
- package/lib/packages/components/yc-ai-chat/index.js +41 -0
- package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +21 -13
- package/lib/packages/components/yc-ai-chat/src/select2.vue.js +9 -4
- package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +5 -3
- package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +734 -149
- package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +451 -84
- package/lib/packages/components/yc-gradient-card/capability.js +8 -8
- package/lib/packages/components/yc-input/src/stepper-input2.vue.js +47 -23
- package/lib/packages/registry/types.js +1 -1
- package/lib/registry/types.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-search.css +1 -1
- package/theme-chalk/plus-yc-ai-chat.css +1 -1
- package/theme-chalk/plus-yc-data-table.css +1 -1
- package/theme-chalk/plus-yc-property-table.css +1 -1
- package/theme-chalk/src/search.scss +93 -3
- package/theme-chalk/src/yc-ai-chat.scss +1281 -114
- package/theme-chalk/src/yc-data-table.scss +57 -42
- package/theme-chalk/src/yc-property-table.scss +35 -14
|
@@ -6,7 +6,7 @@ const capability = {
|
|
|
6
6
|
{
|
|
7
7
|
id: "yc-gradient-card-01",
|
|
8
8
|
title: "\u65B9\u6848 01 \xB7 \u8212\u7F13\u89E3\u538B (\u73BB\u7483\u62DF\u6001)",
|
|
9
|
-
categories: ["\
|
|
9
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
10
10
|
component: YcGradientCard,
|
|
11
11
|
props: {
|
|
12
12
|
palette: "01",
|
|
@@ -21,7 +21,7 @@ const capability = {
|
|
|
21
21
|
{
|
|
22
22
|
id: "yc-gradient-card-02",
|
|
23
23
|
title: "\u65B9\u6848 02 \xB7 \u5FC3\u52A8\u6CBB\u6108 (\u67D4\u5149\u5149\u6655)",
|
|
24
|
-
categories: ["\
|
|
24
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
25
25
|
component: YcGradientCard,
|
|
26
26
|
props: {
|
|
27
27
|
palette: "02",
|
|
@@ -36,7 +36,7 @@ const capability = {
|
|
|
36
36
|
{
|
|
37
37
|
id: "yc-gradient-card-03",
|
|
38
38
|
title: "\u65B9\u6848 03 \xB7 \u751F\u673A\u76CE\u7136 (\u65E5\u5149\u6E10\u53D8)",
|
|
39
|
-
categories: ["\
|
|
39
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
40
40
|
component: YcGradientCard,
|
|
41
41
|
props: {
|
|
42
42
|
palette: "03",
|
|
@@ -51,7 +51,7 @@ const capability = {
|
|
|
51
51
|
{
|
|
52
52
|
id: "yc-gradient-card-04",
|
|
53
53
|
title: "\u65B9\u6848 04 \xB7 \u6D6A\u6F2B\u6CE1\u6CE1 (\u6D41\u5149\u6BDB\u73BB\u7483)",
|
|
54
|
-
categories: ["\
|
|
54
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
55
55
|
component: YcGradientCard,
|
|
56
56
|
props: {
|
|
57
57
|
palette: "04",
|
|
@@ -66,7 +66,7 @@ const capability = {
|
|
|
66
66
|
{
|
|
67
67
|
id: "yc-gradient-card-05",
|
|
68
68
|
title: "\u65B9\u6848 05 \xB7 \u590F\u65E5\u6E05\u51C9 (\u5FAE\u5149\u8FB9\u6846)",
|
|
69
|
-
categories: ["\
|
|
69
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
70
70
|
component: YcGradientCard,
|
|
71
71
|
props: {
|
|
72
72
|
palette: "05",
|
|
@@ -81,7 +81,7 @@ const capability = {
|
|
|
81
81
|
{
|
|
82
82
|
id: "yc-gradient-card-06",
|
|
83
83
|
title: "\u65B9\u6848 06 \xB7 \u6668\u5149\u62A4\u773C (\u7EB8\u8D28\u6E29\u6DA6)",
|
|
84
|
-
categories: ["\
|
|
84
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
85
85
|
component: YcGradientCard,
|
|
86
86
|
props: {
|
|
87
87
|
palette: "06",
|
|
@@ -96,7 +96,7 @@ const capability = {
|
|
|
96
96
|
{
|
|
97
97
|
id: "yc-gradient-card-07",
|
|
98
98
|
title: "\u65B9\u6848 07 \xB7 \u70DF\u96E8\u6C5F\u5357 (\u6C34\u58A8\u5929\u9752)",
|
|
99
|
-
categories: ["\
|
|
99
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
100
100
|
component: YcGradientCard,
|
|
101
101
|
props: {
|
|
102
102
|
palette: "07",
|
|
@@ -111,7 +111,7 @@ const capability = {
|
|
|
111
111
|
{
|
|
112
112
|
id: "yc-gradient-card-10",
|
|
113
113
|
title: "\u65B9\u6848 10 \xB7 \u5178\u96C5\u8F7B\u5962 (\u5C0A\u4EAB\u9EC4\u7D2B)",
|
|
114
|
-
categories: ["\
|
|
114
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
115
115
|
component: YcGradientCard,
|
|
116
116
|
props: {
|
|
117
117
|
palette: "10",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, withKeys, withModifiers } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, withKeys, withModifiers } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
key: 0,
|
|
@@ -40,6 +40,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
const props = __props;
|
|
41
41
|
const emit = __emit;
|
|
42
42
|
const focused = ref(false);
|
|
43
|
+
const draft = ref("");
|
|
43
44
|
const normalize = (val) => {
|
|
44
45
|
let next = val;
|
|
45
46
|
if (props.min !== void 0 && next < props.min) next = props.min;
|
|
@@ -50,10 +51,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
51
|
const current = computed(
|
|
51
52
|
() => props.modelValue === null || props.modelValue === void 0 || Number.isNaN(Number(props.modelValue)) ? null : Number(props.modelValue)
|
|
52
53
|
);
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
return props.precision > 0 ?
|
|
56
|
-
}
|
|
54
|
+
const formatSettled = (val) => {
|
|
55
|
+
if (val === null) return "";
|
|
56
|
+
return props.precision > 0 ? val.toFixed(props.precision) : String(val);
|
|
57
|
+
};
|
|
58
|
+
const displayText = computed(() => focused.value ? draft.value : formatSettled(current.value));
|
|
59
|
+
watch(
|
|
60
|
+
() => props.modelValue,
|
|
61
|
+
() => {
|
|
62
|
+
if (!focused.value) draft.value = formatSettled(current.value);
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true }
|
|
65
|
+
);
|
|
57
66
|
const canDecrease = computed(() => {
|
|
58
67
|
var _a;
|
|
59
68
|
return props.min === void 0 || ((_a = current.value) != null ? _a : 0) > props.min;
|
|
@@ -67,27 +76,42 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
76
|
if (props.disabled || props.readonly) return;
|
|
68
77
|
const base = (_b = (_a = current.value) != null ? _a : props.min) != null ? _b : 0;
|
|
69
78
|
const next = normalize(base + dir * props.step);
|
|
79
|
+
draft.value = formatSettled(next);
|
|
70
80
|
emit("update:modelValue", next);
|
|
71
81
|
emit("change", next);
|
|
72
82
|
};
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
const sanitizeDraft = (raw) => {
|
|
84
|
+
let next = raw.replace(/[^\d.-]/g, "");
|
|
85
|
+
const negative = next.startsWith("-");
|
|
86
|
+
next = next.replace(/-/g, "");
|
|
87
|
+
const dot = next.indexOf(".");
|
|
88
|
+
if (dot >= 0) {
|
|
89
|
+
next = next.slice(0, dot + 1) + next.slice(dot + 1).replace(/\./g, "");
|
|
78
90
|
}
|
|
91
|
+
return `${negative ? "-" : ""}${next}`;
|
|
92
|
+
};
|
|
93
|
+
const parseDraft = (raw) => {
|
|
94
|
+
if (!raw || raw === "-" || raw === "." || raw === "-.") return null;
|
|
79
95
|
const num = Number(raw);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
return Number.isFinite(num) ? num : null;
|
|
97
|
+
};
|
|
98
|
+
const onFocus = () => {
|
|
99
|
+
focused.value = true;
|
|
100
|
+
draft.value = current.value === null ? "" : String(current.value);
|
|
101
|
+
};
|
|
102
|
+
const onInput = (event) => {
|
|
103
|
+
const raw = sanitizeDraft(event.target.value);
|
|
104
|
+
draft.value = raw;
|
|
105
|
+
const parsed = parseDraft(raw);
|
|
106
|
+
emit("update:modelValue", parsed);
|
|
83
107
|
};
|
|
84
108
|
const onBlur = () => {
|
|
85
109
|
focused.value = false;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
const parsed = parseDraft(draft.value);
|
|
111
|
+
const settled = parsed === null ? null : normalize(parsed);
|
|
112
|
+
draft.value = formatSettled(settled);
|
|
113
|
+
emit("update:modelValue", settled);
|
|
114
|
+
emit("change", settled);
|
|
91
115
|
};
|
|
92
116
|
return (_ctx, _cache) => {
|
|
93
117
|
return openBlock(), createElementBlock(
|
|
@@ -119,7 +143,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
143
|
disabled: __props.disabled || __props.readonly || !canDecrease.value,
|
|
120
144
|
"aria-label": "\u51CF\u5C11",
|
|
121
145
|
onClick: _cache[0] || (_cache[0] = ($event) => stepBy(-1))
|
|
122
|
-
}, [..._cache[
|
|
146
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
123
147
|
createElementVNode(
|
|
124
148
|
"svg",
|
|
125
149
|
{
|
|
@@ -149,11 +173,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
149
173
|
disabled: __props.disabled,
|
|
150
174
|
readonly: __props.readonly,
|
|
151
175
|
onInput,
|
|
152
|
-
onFocus
|
|
176
|
+
onFocus,
|
|
153
177
|
onBlur,
|
|
154
178
|
onKeydown: [
|
|
155
|
-
_cache[
|
|
156
|
-
_cache[
|
|
179
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => stepBy(1), ["prevent"]), ["up"])),
|
|
180
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => stepBy(-1), ["prevent"]), ["down"]))
|
|
157
181
|
]
|
|
158
182
|
}, null, 40, _hoisted_5),
|
|
159
183
|
__props.unit ? (openBlock(), createElementBlock(
|
|
@@ -169,8 +193,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
169
193
|
class: "yc-stepper__btn is-plus",
|
|
170
194
|
disabled: __props.disabled || __props.readonly || !canIncrease.value,
|
|
171
195
|
"aria-label": "\u589E\u52A0",
|
|
172
|
-
onClick: _cache[
|
|
173
|
-
}, [..._cache[
|
|
196
|
+
onClick: _cache[3] || (_cache[3] = ($event) => stepBy(1))
|
|
197
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
174
198
|
createElementVNode(
|
|
175
199
|
"svg",
|
|
176
200
|
{
|
package/es/registry/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
|
|
3
|
-
export declare const GALLERY_CATEGORY_ORDER: readonly ["表单录入", "数据表格", "树与导航", "卡片与展示", "图表看板", "
|
|
3
|
+
export declare const GALLERY_CATEGORY_ORDER: readonly ["表单录入", "数据表格", "树与导航", "卡片与展示", "图表看板", "渐变配色", "问卷与表单", "操作与反馈"];
|
|
4
4
|
export type GalleryCategory = (typeof GALLERY_CATEGORY_ORDER)[number] | (string & {});
|
|
5
5
|
export interface GalleryItem {
|
|
6
6
|
id: string;
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.3";
|
package/es/version.mjs
CHANGED