yc-agent-ui 1.2.1 → 1.2.2

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 (136) 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 +10 -1
  29. package/es/components/yc-ai-chat/src/studio.vue.d.ts +3 -0
  30. package/es/components/yc-plus-page/src/index.vue.d.ts +264 -264
  31. package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
  32. package/es/hooks/usePlusFormReset.d.ts +144 -144
  33. package/es/index.css +9 -9
  34. package/es/index.mjs +1 -0
  35. package/es/packages/components/chart/src/chart-card2.vue.mjs +9 -2
  36. package/es/packages/components/chart/src/chart-container2.vue.mjs +13 -1
  37. package/es/packages/components/chart/src/theme.mjs +18 -10
  38. package/es/packages/components/data-table/capability.mjs +1 -1
  39. package/es/packages/components/index.mjs +1 -0
  40. package/es/packages/components/yc-ai-chat/index.mjs +1 -0
  41. package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +21 -13
  42. package/es/packages/components/yc-ai-chat/src/select2.vue.mjs +9 -4
  43. package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +5 -3
  44. package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +50 -45
  45. package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +271 -56
  46. package/es/packages/components/yc-gradient-card/capability.mjs +8 -8
  47. package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +48 -24
  48. package/es/packages/registry/types.mjs +1 -1
  49. package/es/registry/types.d.ts +1 -1
  50. package/es/version.d.ts +1 -1
  51. package/es/version.mjs +1 -1
  52. package/index.css +1 -1
  53. package/index.js +3925 -641
  54. package/index.min.js +42 -39
  55. package/index.min.mjs +39 -36
  56. package/index.mjs +4001 -727
  57. package/lib/components/chart/src/chart-card.vue.d.ts +56 -10
  58. package/lib/components/chart/src/chart-container.vue.d.ts +11 -1
  59. package/lib/components/chart/src/theme.d.ts +1 -1
  60. package/lib/components/dialog/index.d.ts +6 -6
  61. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  62. package/lib/components/dialog-form/index.d.ts +6 -6
  63. package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
  64. package/lib/components/display-item/index.d.ts +21 -21
  65. package/lib/components/display-item/src/index.vue.d.ts +19 -19
  66. package/lib/components/drawer-form/index.d.ts +18 -18
  67. package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
  68. package/lib/components/form/index.d.ts +12 -12
  69. package/lib/components/form/src/form-content.vue.d.ts +12 -12
  70. package/lib/components/form/src/index.vue.d.ts +12 -12
  71. package/lib/components/form-item/index.d.ts +12 -12
  72. package/lib/components/form-item/src/index.vue.d.ts +10 -10
  73. package/lib/components/page/index.d.ts +258 -258
  74. package/lib/components/page/src/index.vue.d.ts +90 -90
  75. package/lib/components/render/index.d.ts +1 -1
  76. package/lib/components/render/src/index.vue.d.ts +1 -1
  77. package/lib/components/search/index.d.ts +78 -78
  78. package/lib/components/search/src/index.vue.d.ts +30 -30
  79. package/lib/components/table/src/table-column.vue.d.ts +46 -46
  80. package/lib/components/yc-ai-chat/index.d.ts +1 -0
  81. package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
  82. package/lib/components/yc-ai-chat/src/select.vue.d.ts +1 -0
  83. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +10 -1
  84. package/lib/components/yc-ai-chat/src/studio.vue.d.ts +3 -0
  85. package/lib/components/yc-plus-page/src/index.vue.d.ts +264 -264
  86. package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
  87. package/lib/hooks/usePlusFormReset.d.ts +144 -144
  88. package/lib/index.css +8 -8
  89. package/lib/index.js +41 -0
  90. package/lib/packages/components/chart/src/chart-card2.vue.js +9 -2
  91. package/lib/packages/components/chart/src/chart-container2.vue.js +13 -1
  92. package/lib/packages/components/chart/src/theme.js +18 -10
  93. package/lib/packages/components/data-table/capability.js +1 -1
  94. package/lib/packages/components/index.js +41 -0
  95. package/lib/packages/components/yc-ai-chat/index.js +41 -0
  96. package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +21 -13
  97. package/lib/packages/components/yc-ai-chat/src/select2.vue.js +9 -4
  98. package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +5 -3
  99. package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +49 -44
  100. package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +270 -55
  101. package/lib/packages/components/yc-gradient-card/capability.js +8 -8
  102. package/lib/packages/components/yc-input/src/stepper-input2.vue.js +47 -23
  103. package/lib/packages/registry/types.js +1 -1
  104. package/lib/registry/types.d.ts +1 -1
  105. package/lib/version.d.ts +1 -1
  106. package/lib/version.js +1 -1
  107. package/locale/en.js +1 -1
  108. package/locale/en.min.js +1 -1
  109. package/locale/en.min.mjs +1 -1
  110. package/locale/en.mjs +1 -1
  111. package/locale/ja.js +1 -1
  112. package/locale/ja.min.js +1 -1
  113. package/locale/ja.min.mjs +1 -1
  114. package/locale/ja.mjs +1 -1
  115. package/locale/ko.js +1 -1
  116. package/locale/ko.min.js +1 -1
  117. package/locale/ko.min.mjs +1 -1
  118. package/locale/ko.mjs +1 -1
  119. package/locale/zh-cn.js +1 -1
  120. package/locale/zh-cn.min.js +1 -1
  121. package/locale/zh-cn.min.mjs +1 -1
  122. package/locale/zh-cn.mjs +1 -1
  123. package/locale/zh-tw.js +1 -1
  124. package/locale/zh-tw.min.js +1 -1
  125. package/locale/zh-tw.min.mjs +1 -1
  126. package/locale/zh-tw.mjs +1 -1
  127. package/package.json +1 -1
  128. package/theme-chalk/index.css +1 -1
  129. package/theme-chalk/plus-search.css +1 -1
  130. package/theme-chalk/plus-yc-ai-chat.css +1 -1
  131. package/theme-chalk/plus-yc-data-table.css +1 -1
  132. package/theme-chalk/plus-yc-property-table.css +1 -1
  133. package/theme-chalk/src/search.scss +93 -3
  134. package/theme-chalk/src/yc-ai-chat.scss +774 -10
  135. package/theme-chalk/src/yc-data-table.scss +57 -42
  136. package/theme-chalk/src/yc-property-table.scss +35 -14
@@ -234,26 +234,34 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
234
234
  __props.role === "assistant" ? {
235
235
  name: "avatar",
236
236
  fn: vue.withCtx(() => [
237
- _cache[2] || (_cache[2] = vue.createElementVNode(
237
+ vue.createElementVNode(
238
238
  "div",
239
239
  {
240
- class: "yc-chat-bubble__avatar is-assistant",
240
+ class: vue.normalizeClass(["yc-chat-bubble__avatar is-assistant", { "is-custom": Boolean(_ctx.$slots.avatar) }]),
241
241
  "aria-hidden": "true"
242
242
  },
243
243
  [
244
- vue.createElementVNode("svg", {
245
- viewBox: "0 0 20 20",
246
- fill: "none"
247
- }, [
248
- vue.createElementVNode("path", {
249
- d: "M10 3L11.6 8.4L17 10L11.6 11.6L10 17L8.4 11.6L3 10L8.4 8.4L10 3Z",
250
- fill: "currentColor"
251
- })
244
+ vue.renderSlot(_ctx.$slots, "avatar", {}, () => [
245
+ _cache[2] || (_cache[2] = vue.createElementVNode(
246
+ "svg",
247
+ {
248
+ viewBox: "0 0 20 20",
249
+ fill: "none"
250
+ },
251
+ [
252
+ vue.createElementVNode("path", {
253
+ d: "M10 3L11.6 8.4L17 10L11.6 11.6L10 17L8.4 11.6L3 10L8.4 8.4L10 3Z",
254
+ fill: "currentColor"
255
+ })
256
+ ],
257
+ -1
258
+ /* CACHED */
259
+ ))
252
260
  ])
253
261
  ],
254
- -1
255
- /* CACHED */
256
- ))
262
+ 2
263
+ /* CLASS */
264
+ )
257
265
  ]),
258
266
  key: "0"
259
267
  } : void 0,
@@ -59,7 +59,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
59
59
  loading: { type: Boolean, default: false },
60
60
  clearable: { type: Boolean, default: false },
61
61
  searchable: { type: Boolean, default: true },
62
- ariaLabel: { default: "" }
62
+ ariaLabel: { default: "" },
63
+ variant: { default: "field" }
63
64
  },
64
65
  emits: ["update:modelValue", "change"],
65
66
  setup(__props, { emit: __emit }) {
@@ -86,12 +87,15 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
86
87
  if (!el || typeof window === "undefined") return;
87
88
  const rect = el.getBoundingClientRect();
88
89
  const maxLeft = Math.max(12, window.innerWidth - 280);
89
- popoverStyle.value = {
90
+ const spaceBelow = window.innerHeight - rect.bottom;
91
+ const spaceAbove = rect.top;
92
+ const openUp = spaceBelow < 240 && spaceAbove > spaceBelow;
93
+ const shared = {
90
94
  position: "fixed",
91
- top: `${rect.bottom + 6}px`,
92
95
  left: `${Math.min(rect.left, maxLeft)}px`,
93
96
  minWidth: `${Math.max(rect.width, 220)}px`
94
97
  };
98
+ popoverStyle.value = openUp ? { ...shared, bottom: `${window.innerHeight - rect.top + 6}px` } : { ...shared, top: `${rect.bottom + 6}px` };
95
99
  }
96
100
  function handleOutsidePointer(event) {
97
101
  var _a, _b;
@@ -158,7 +162,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
158
162
  class: vue.normalizeClass(["yc-chat-select", {
159
163
  "is-open": open.value,
160
164
  "is-disabled": __props.disabled,
161
- "has-value": Boolean(selectedOption.value)
165
+ "has-value": Boolean(selectedOption.value),
166
+ "is-chip": __props.variant === "chip"
162
167
  }]),
163
168
  disabled: __props.disabled,
164
169
  "aria-expanded": open.value,
@@ -153,8 +153,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
153
153
  vue.Fragment,
154
154
  { key: 1 },
155
155
  [
156
- __props.showThinking ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
157
- vue.createElementVNode("button", {
156
+ __props.showThinking || _ctx.$slots.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
157
+ vue.renderSlot(_ctx.$slots, "controls"),
158
+ __props.showThinking ? (vue.openBlock(), vue.createElementBlock("button", {
159
+ key: 0,
158
160
  type: "button",
159
161
  role: "switch",
160
162
  "aria-checked": __props.thinking,
@@ -188,7 +190,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
188
190
  1
189
191
  /* TEXT */
190
192
  )
191
- ], 10, _hoisted_3)
193
+ ], 10, _hoisted_3)) : vue.createCommentVNode("v-if", true)
192
194
  ])) : vue.createCommentVNode("v-if", true),
193
195
  vue.createElementVNode("div", _hoisted_4, [
194
196
  vue.createElementVNode("button", {
@@ -12,34 +12,35 @@ const _hoisted_1 = {
12
12
  };
13
13
  const _hoisted_2 = { class: "yc-chat-sidebar__header rail-header" };
14
14
  const _hoisted_3 = ["disabled"];
15
- const _hoisted_4 = {
15
+ const _hoisted_4 = { class: "yc-chat-sidebar__create-icon" };
16
+ const _hoisted_5 = {
16
17
  key: 0,
17
18
  class: "yc-chat-sidebar__search"
18
19
  };
19
- const _hoisted_5 = ["placeholder"];
20
- const _hoisted_6 = { class: "yc-chat-sidebar__body conversation-list" };
21
- const _hoisted_7 = {
20
+ const _hoisted_6 = ["placeholder"];
21
+ const _hoisted_7 = { class: "yc-chat-sidebar__body conversation-list" };
22
+ const _hoisted_8 = {
22
23
  key: 0,
23
24
  class: "yc-chat-sidebar__empty empty-hint"
24
25
  };
25
- const _hoisted_8 = {
26
+ const _hoisted_9 = {
26
27
  key: 1,
27
28
  class: "yc-chat-sidebar__empty empty-hint"
28
29
  };
29
- const _hoisted_9 = {
30
+ const _hoisted_10 = {
30
31
  key: 2,
31
32
  class: "yc-chat-sidebar__empty empty-hint"
32
33
  };
33
- const _hoisted_10 = {
34
+ const _hoisted_11 = {
34
35
  key: 3,
35
36
  class: "yc-chat-sidebar__empty empty-hint"
36
37
  };
37
- const _hoisted_11 = { class: "yc-chat-sidebar__item-main" };
38
- const _hoisted_12 = { class: "yc-chat-sidebar__item-title conversation-title" };
39
- const _hoisted_13 = { class: "yc-chat-sidebar__item-time conversation-time" };
40
- const _hoisted_14 = ["onClick"];
41
- const _hoisted_15 = { class: "yc-chat-sidebar__more" };
42
- const _hoisted_16 = ["disabled"];
38
+ const _hoisted_12 = { class: "yc-chat-sidebar__item-main" };
39
+ const _hoisted_13 = { class: "yc-chat-sidebar__item-title conversation-title" };
40
+ const _hoisted_14 = { class: "yc-chat-sidebar__item-time conversation-time" };
41
+ const _hoisted_15 = ["onClick"];
42
+ const _hoisted_16 = { class: "yc-chat-sidebar__more" };
43
+ const _hoisted_17 = ["disabled"];
43
44
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
45
  ...{
45
46
  name: "YcChatSidebar"
@@ -97,24 +98,28 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
97
98
  disabled: !__props.connected,
98
99
  onClick: _cache[0] || (_cache[0] = ($event) => emit("create"))
99
100
  }, [
100
- _cache[4] || (_cache[4] = vue.createElementVNode(
101
- "svg",
102
- {
103
- viewBox: "0 0 16 16",
104
- fill: "none",
105
- "aria-hidden": "true"
106
- },
107
- [
108
- vue.createElementVNode("path", {
109
- d: "M8 3.25V12.75M3.25 8H12.75",
110
- stroke: "currentColor",
111
- "stroke-width": "1.6",
112
- "stroke-linecap": "round"
113
- })
114
- ],
115
- -1
116
- /* CACHED */
117
- )),
101
+ vue.createElementVNode("span", _hoisted_4, [
102
+ vue.renderSlot(_ctx.$slots, "icon", {}, () => [
103
+ _cache[4] || (_cache[4] = vue.createElementVNode(
104
+ "svg",
105
+ {
106
+ viewBox: "0 0 16 16",
107
+ fill: "none",
108
+ "aria-hidden": "true"
109
+ },
110
+ [
111
+ vue.createElementVNode("path", {
112
+ d: "M8 3.25V12.75M3.25 8H12.75",
113
+ stroke: "currentColor",
114
+ "stroke-width": "1.6",
115
+ "stroke-linecap": "round"
116
+ })
117
+ ],
118
+ -1
119
+ /* CACHED */
120
+ ))
121
+ ])
122
+ ]),
118
123
  vue.createElementVNode(
119
124
  "span",
120
125
  null,
@@ -123,7 +128,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
123
128
  /* TEXT */
124
129
  )
125
130
  ], 8, _hoisted_3),
126
- __props.connected && __props.sessions.length > 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
131
+ __props.connected && __props.sessions.length > 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
127
132
  _cache[5] || (_cache[5] = vue.createElementVNode(
128
133
  "svg",
129
134
  {
@@ -154,33 +159,33 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
154
159
  type: "text",
155
160
  placeholder: __props.searchPlaceholder,
156
161
  class: "yc-chat-sidebar__search-input"
157
- }, null, 8, _hoisted_5), [
162
+ }, null, 8, _hoisted_6), [
158
163
  [vue.vModelText, keyword.value]
159
164
  ])
160
165
  ])) : vue.createCommentVNode("v-if", true)
161
166
  ]),
162
- vue.createElementVNode("div", _hoisted_6, [
167
+ vue.createElementVNode("div", _hoisted_7, [
163
168
  !__props.connected && __props.disconnectedText ? (vue.openBlock(), vue.createElementBlock(
164
169
  "div",
165
- _hoisted_7,
170
+ _hoisted_8,
166
171
  vue.toDisplayString(__props.disconnectedText),
167
172
  1
168
173
  /* TEXT */
169
174
  )) : !__props.connected ? (vue.openBlock(), vue.createElementBlock(
170
175
  "div",
171
- _hoisted_8,
176
+ _hoisted_9,
172
177
  vue.toDisplayString(__props.emptyText),
173
178
  1
174
179
  /* TEXT */
175
180
  )) : !__props.sessions.length && !__props.loading ? (vue.openBlock(), vue.createElementBlock(
176
181
  "div",
177
- _hoisted_9,
182
+ _hoisted_10,
178
183
  vue.toDisplayString(__props.emptyText),
179
184
  1
180
185
  /* TEXT */
181
186
  )) : !conversationItems.value.length && keyword.value ? (vue.openBlock(), vue.createElementBlock(
182
187
  "div",
183
- _hoisted_10,
188
+ _hoisted_11,
184
189
  vue.toDisplayString(__props.noResultText),
185
190
  1
186
191
  /* TEXT */
@@ -202,17 +207,17 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
202
207
  class: vue.normalizeClass(["yc-chat-sidebar__item", { active: item.id === __props.activeId }])
203
208
  },
204
209
  [
205
- vue.createElementVNode("div", _hoisted_11, [
210
+ vue.createElementVNode("div", _hoisted_12, [
206
211
  vue.createElementVNode(
207
212
  "div",
208
- _hoisted_12,
213
+ _hoisted_13,
209
214
  vue.toDisplayString(item.label),
210
215
  1
211
216
  /* TEXT */
212
217
  ),
213
218
  vue.createElementVNode(
214
219
  "div",
215
- _hoisted_13,
220
+ _hoisted_14,
216
221
  vue.toDisplayString(item.timeText),
217
222
  1
218
223
  /* TEXT */
@@ -249,7 +254,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
249
254
  -1
250
255
  /* CACHED */
251
256
  )
252
- ])], 8, _hoisted_14)
257
+ ])], 8, _hoisted_15)
253
258
  ])
254
259
  ],
255
260
  2
@@ -262,13 +267,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
262
267
  __props.hasMore ? {
263
268
  name: "load-more",
264
269
  fn: vue.withCtx(() => [
265
- vue.createElementVNode("div", _hoisted_15, [
270
+ vue.createElementVNode("div", _hoisted_16, [
266
271
  vue.createElementVNode("button", {
267
272
  type: "button",
268
273
  class: "yc-chat-sidebar__more-btn",
269
274
  disabled: __props.loading,
270
275
  onClick: _cache[3] || (_cache[3] = ($event) => emit("load-more"))
271
- }, vue.toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_16)
276
+ }, vue.toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_17)
272
277
  ])
273
278
  ]),
274
279
  key: "0"