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.
Files changed (138) hide show
  1. package/README.md +26 -5
  2. package/es/components/chart/src/chart-card.vue.d.ts +56 -10
  3. package/es/components/chart/src/chart-container.vue.d.ts +11 -1
  4. package/es/components/chart/src/theme.d.ts +1 -1
  5. package/es/components/dialog/index.d.ts +6 -6
  6. package/es/components/dialog/src/index.vue.d.ts +2 -2
  7. package/es/components/dialog-form/index.d.ts +6 -6
  8. package/es/components/dialog-form/src/index.vue.d.ts +6 -6
  9. package/es/components/display-item/index.d.ts +21 -21
  10. package/es/components/display-item/src/index.vue.d.ts +19 -19
  11. package/es/components/drawer-form/index.d.ts +18 -18
  12. package/es/components/drawer-form/src/index.vue.d.ts +10 -10
  13. package/es/components/form/index.d.ts +12 -12
  14. package/es/components/form/src/form-content.vue.d.ts +12 -12
  15. package/es/components/form/src/index.vue.d.ts +12 -12
  16. package/es/components/form-item/index.d.ts +12 -12
  17. package/es/components/form-item/src/index.vue.d.ts +10 -10
  18. package/es/components/page/index.d.ts +258 -258
  19. package/es/components/page/src/index.vue.d.ts +90 -90
  20. package/es/components/render/index.d.ts +1 -1
  21. package/es/components/render/src/index.vue.d.ts +1 -1
  22. package/es/components/search/index.d.ts +78 -78
  23. package/es/components/search/src/index.vue.d.ts +30 -30
  24. package/es/components/table/src/table-column.vue.d.ts +46 -46
  25. package/es/components/yc-ai-chat/index.d.ts +1 -0
  26. package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
  27. package/es/components/yc-ai-chat/src/select.vue.d.ts +1 -0
  28. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +29 -2
  29. package/es/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
  30. package/es/components/yc-ai-chat/src/type.d.ts +2 -0
  31. package/es/components/yc-plus-page/src/index.vue.d.ts +264 -264
  32. package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
  33. package/es/hooks/usePlusFormReset.d.ts +144 -144
  34. package/es/index.css +8 -8
  35. package/es/index.mjs +1 -0
  36. package/es/packages/components/chart/src/chart-card2.vue.mjs +9 -2
  37. package/es/packages/components/chart/src/chart-container2.vue.mjs +13 -1
  38. package/es/packages/components/chart/src/theme.mjs +18 -10
  39. package/es/packages/components/data-table/capability.mjs +1 -1
  40. package/es/packages/components/index.mjs +1 -0
  41. package/es/packages/components/yc-ai-chat/index.mjs +1 -0
  42. package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +21 -13
  43. package/es/packages/components/yc-ai-chat/src/select2.vue.mjs +9 -4
  44. package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +5 -3
  45. package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +735 -150
  46. package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +452 -85
  47. package/es/packages/components/yc-gradient-card/capability.mjs +8 -8
  48. package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +48 -24
  49. package/es/packages/registry/types.mjs +1 -1
  50. package/es/registry/types.d.ts +1 -1
  51. package/es/version.d.ts +1 -1
  52. package/es/version.mjs +1 -1
  53. package/index.css +1 -1
  54. package/index.js +5707 -1690
  55. package/index.min.js +41 -38
  56. package/index.min.mjs +38 -35
  57. package/index.mjs +5772 -1765
  58. package/lib/components/chart/src/chart-card.vue.d.ts +56 -10
  59. package/lib/components/chart/src/chart-container.vue.d.ts +11 -1
  60. package/lib/components/chart/src/theme.d.ts +1 -1
  61. package/lib/components/dialog/index.d.ts +6 -6
  62. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  63. package/lib/components/dialog-form/index.d.ts +6 -6
  64. package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
  65. package/lib/components/display-item/index.d.ts +21 -21
  66. package/lib/components/display-item/src/index.vue.d.ts +19 -19
  67. package/lib/components/drawer-form/index.d.ts +18 -18
  68. package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
  69. package/lib/components/form/index.d.ts +12 -12
  70. package/lib/components/form/src/form-content.vue.d.ts +12 -12
  71. package/lib/components/form/src/index.vue.d.ts +12 -12
  72. package/lib/components/form-item/index.d.ts +12 -12
  73. package/lib/components/form-item/src/index.vue.d.ts +10 -10
  74. package/lib/components/page/index.d.ts +258 -258
  75. package/lib/components/page/src/index.vue.d.ts +90 -90
  76. package/lib/components/render/index.d.ts +1 -1
  77. package/lib/components/render/src/index.vue.d.ts +1 -1
  78. package/lib/components/search/index.d.ts +78 -78
  79. package/lib/components/search/src/index.vue.d.ts +30 -30
  80. package/lib/components/table/src/table-column.vue.d.ts +46 -46
  81. package/lib/components/yc-ai-chat/index.d.ts +1 -0
  82. package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
  83. package/lib/components/yc-ai-chat/src/select.vue.d.ts +1 -0
  84. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +29 -2
  85. package/lib/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
  86. package/lib/components/yc-ai-chat/src/type.d.ts +2 -0
  87. package/lib/components/yc-plus-page/src/index.vue.d.ts +264 -264
  88. package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
  89. package/lib/hooks/usePlusFormReset.d.ts +144 -144
  90. package/lib/index.css +12 -12
  91. package/lib/index.js +41 -0
  92. package/lib/packages/components/chart/src/chart-card2.vue.js +9 -2
  93. package/lib/packages/components/chart/src/chart-container2.vue.js +13 -1
  94. package/lib/packages/components/chart/src/theme.js +18 -10
  95. package/lib/packages/components/data-table/capability.js +1 -1
  96. package/lib/packages/components/index.js +41 -0
  97. package/lib/packages/components/yc-ai-chat/index.js +41 -0
  98. package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +21 -13
  99. package/lib/packages/components/yc-ai-chat/src/select2.vue.js +9 -4
  100. package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +5 -3
  101. package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +734 -149
  102. package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +451 -84
  103. package/lib/packages/components/yc-gradient-card/capability.js +8 -8
  104. package/lib/packages/components/yc-input/src/stepper-input2.vue.js +47 -23
  105. package/lib/packages/registry/types.js +1 -1
  106. package/lib/registry/types.d.ts +1 -1
  107. package/lib/version.d.ts +1 -1
  108. package/lib/version.js +1 -1
  109. package/locale/en.js +1 -1
  110. package/locale/en.min.js +1 -1
  111. package/locale/en.min.mjs +1 -1
  112. package/locale/en.mjs +1 -1
  113. package/locale/ja.js +1 -1
  114. package/locale/ja.min.js +1 -1
  115. package/locale/ja.min.mjs +1 -1
  116. package/locale/ja.mjs +1 -1
  117. package/locale/ko.js +1 -1
  118. package/locale/ko.min.js +1 -1
  119. package/locale/ko.min.mjs +1 -1
  120. package/locale/ko.mjs +1 -1
  121. package/locale/zh-cn.js +1 -1
  122. package/locale/zh-cn.min.js +1 -1
  123. package/locale/zh-cn.min.mjs +1 -1
  124. package/locale/zh-cn.mjs +1 -1
  125. package/locale/zh-tw.js +1 -1
  126. package/locale/zh-tw.min.js +1 -1
  127. package/locale/zh-tw.min.mjs +1 -1
  128. package/locale/zh-tw.mjs +1 -1
  129. package/package.json +1 -1
  130. package/theme-chalk/index.css +1 -1
  131. package/theme-chalk/plus-search.css +1 -1
  132. package/theme-chalk/plus-yc-ai-chat.css +1 -1
  133. package/theme-chalk/plus-yc-data-table.css +1 -1
  134. package/theme-chalk/plus-yc-property-table.css +1 -1
  135. package/theme-chalk/src/search.scss +93 -3
  136. package/theme-chalk/src/yc-ai-chat.scss +1281 -114
  137. package/theme-chalk/src/yc-data-table.scss +57 -42
  138. 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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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: ["\u8BBE\u8BA1\u7CFB\u7EDF"],
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 displayText = computed(() => {
54
- if (current.value === null) return "";
55
- return props.precision > 0 ? current.value.toFixed(props.precision) : String(current.value);
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 onInput = (event) => {
74
- const raw = event.target.value.replace(/[^\d.-]/g, "");
75
- if (!raw || raw === "-" || raw === ".") {
76
- emit("update:modelValue", null);
77
- return;
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
- if (Number.isFinite(num)) {
81
- emit("update:modelValue", normalize(num));
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
- if (current.value !== null) {
87
- const settled = normalize(current.value);
88
- emit("update:modelValue", settled);
89
- emit("change", settled);
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[5] || (_cache[5] = [
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: _cache[1] || (_cache[1] = ($event) => focused.value = true),
176
+ onFocus,
153
177
  onBlur,
154
178
  onKeydown: [
155
- _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => stepBy(1), ["prevent"]), ["up"])),
156
- _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => stepBy(-1), ["prevent"]), ["down"]))
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[4] || (_cache[4] = ($event) => stepBy(1))
173
- }, [..._cache[6] || (_cache[6] = [
196
+ onClick: _cache[3] || (_cache[3] = ($event) => stepBy(1))
197
+ }, [..._cache[5] || (_cache[5] = [
174
198
  createElementVNode(
175
199
  "svg",
176
200
  {
@@ -4,7 +4,7 @@ const GALLERY_CATEGORY_ORDER = [
4
4
  "\u6811\u4E0E\u5BFC\u822A",
5
5
  "\u5361\u7247\u4E0E\u5C55\u793A",
6
6
  "\u56FE\u8868\u770B\u677F",
7
- "\u8BBE\u8BA1\u7CFB\u7EDF",
7
+ "\u6E10\u53D8\u914D\u8272",
8
8
  "\u95EE\u5377\u4E0E\u8868\u5355",
9
9
  "\u64CD\u4F5C\u4E0E\u53CD\u9988"
10
10
  ];
@@ -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";
1
+ export declare const version = "1.2.3";
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "1.2.1";
1
+ const version = "1.2.3";
2
2
 
3
3
  export { version };