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
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, withDirectives, vModelText, createCommentVNode, createBlock, unref, createSlots, withCtx, normalizeClass, withModifiers } from 'vue';
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, withDirectives, vModelText, createCommentVNode, createBlock, unref, createSlots, withCtx, normalizeClass, withModifiers } from 'vue';
2
2
  import { Conversations } from 'vue-element-plus-x';
3
3
  import { formatChatSessionTime, groupChatSessionByDate } from './presets.mjs';
4
4
 
@@ -8,34 +8,35 @@ const _hoisted_1 = {
8
8
  };
9
9
  const _hoisted_2 = { class: "yc-chat-sidebar__header rail-header" };
10
10
  const _hoisted_3 = ["disabled"];
11
- const _hoisted_4 = {
11
+ const _hoisted_4 = { class: "yc-chat-sidebar__create-icon" };
12
+ const _hoisted_5 = {
12
13
  key: 0,
13
14
  class: "yc-chat-sidebar__search"
14
15
  };
15
- const _hoisted_5 = ["placeholder"];
16
- const _hoisted_6 = { class: "yc-chat-sidebar__body conversation-list" };
17
- const _hoisted_7 = {
16
+ const _hoisted_6 = ["placeholder"];
17
+ const _hoisted_7 = { class: "yc-chat-sidebar__body conversation-list" };
18
+ const _hoisted_8 = {
18
19
  key: 0,
19
20
  class: "yc-chat-sidebar__empty empty-hint"
20
21
  };
21
- const _hoisted_8 = {
22
+ const _hoisted_9 = {
22
23
  key: 1,
23
24
  class: "yc-chat-sidebar__empty empty-hint"
24
25
  };
25
- const _hoisted_9 = {
26
+ const _hoisted_10 = {
26
27
  key: 2,
27
28
  class: "yc-chat-sidebar__empty empty-hint"
28
29
  };
29
- const _hoisted_10 = {
30
+ const _hoisted_11 = {
30
31
  key: 3,
31
32
  class: "yc-chat-sidebar__empty empty-hint"
32
33
  };
33
- const _hoisted_11 = { class: "yc-chat-sidebar__item-main" };
34
- const _hoisted_12 = { class: "yc-chat-sidebar__item-title conversation-title" };
35
- const _hoisted_13 = { class: "yc-chat-sidebar__item-time conversation-time" };
36
- const _hoisted_14 = ["onClick"];
37
- const _hoisted_15 = { class: "yc-chat-sidebar__more" };
38
- const _hoisted_16 = ["disabled"];
34
+ const _hoisted_12 = { class: "yc-chat-sidebar__item-main" };
35
+ const _hoisted_13 = { class: "yc-chat-sidebar__item-title conversation-title" };
36
+ const _hoisted_14 = { class: "yc-chat-sidebar__item-time conversation-time" };
37
+ const _hoisted_15 = ["onClick"];
38
+ const _hoisted_16 = { class: "yc-chat-sidebar__more" };
39
+ const _hoisted_17 = ["disabled"];
39
40
  var _sfc_main = /* @__PURE__ */ defineComponent({
40
41
  ...{
41
42
  name: "YcChatSidebar"
@@ -93,24 +94,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
93
94
  disabled: !__props.connected,
94
95
  onClick: _cache[0] || (_cache[0] = ($event) => emit("create"))
95
96
  }, [
96
- _cache[4] || (_cache[4] = createElementVNode(
97
- "svg",
98
- {
99
- viewBox: "0 0 16 16",
100
- fill: "none",
101
- "aria-hidden": "true"
102
- },
103
- [
104
- createElementVNode("path", {
105
- d: "M8 3.25V12.75M3.25 8H12.75",
106
- stroke: "currentColor",
107
- "stroke-width": "1.6",
108
- "stroke-linecap": "round"
109
- })
110
- ],
111
- -1
112
- /* CACHED */
113
- )),
97
+ createElementVNode("span", _hoisted_4, [
98
+ renderSlot(_ctx.$slots, "icon", {}, () => [
99
+ _cache[4] || (_cache[4] = createElementVNode(
100
+ "svg",
101
+ {
102
+ viewBox: "0 0 16 16",
103
+ fill: "none",
104
+ "aria-hidden": "true"
105
+ },
106
+ [
107
+ createElementVNode("path", {
108
+ d: "M8 3.25V12.75M3.25 8H12.75",
109
+ stroke: "currentColor",
110
+ "stroke-width": "1.6",
111
+ "stroke-linecap": "round"
112
+ })
113
+ ],
114
+ -1
115
+ /* CACHED */
116
+ ))
117
+ ])
118
+ ]),
114
119
  createElementVNode(
115
120
  "span",
116
121
  null,
@@ -119,7 +124,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
119
124
  /* TEXT */
120
125
  )
121
126
  ], 8, _hoisted_3),
122
- __props.connected && __props.sessions.length > 3 ? (openBlock(), createElementBlock("div", _hoisted_4, [
127
+ __props.connected && __props.sessions.length > 3 ? (openBlock(), createElementBlock("div", _hoisted_5, [
123
128
  _cache[5] || (_cache[5] = createElementVNode(
124
129
  "svg",
125
130
  {
@@ -150,33 +155,33 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
150
155
  type: "text",
151
156
  placeholder: __props.searchPlaceholder,
152
157
  class: "yc-chat-sidebar__search-input"
153
- }, null, 8, _hoisted_5), [
158
+ }, null, 8, _hoisted_6), [
154
159
  [vModelText, keyword.value]
155
160
  ])
156
161
  ])) : createCommentVNode("v-if", true)
157
162
  ]),
158
- createElementVNode("div", _hoisted_6, [
163
+ createElementVNode("div", _hoisted_7, [
159
164
  !__props.connected && __props.disconnectedText ? (openBlock(), createElementBlock(
160
165
  "div",
161
- _hoisted_7,
166
+ _hoisted_8,
162
167
  toDisplayString(__props.disconnectedText),
163
168
  1
164
169
  /* TEXT */
165
170
  )) : !__props.connected ? (openBlock(), createElementBlock(
166
171
  "div",
167
- _hoisted_8,
172
+ _hoisted_9,
168
173
  toDisplayString(__props.emptyText),
169
174
  1
170
175
  /* TEXT */
171
176
  )) : !__props.sessions.length && !__props.loading ? (openBlock(), createElementBlock(
172
177
  "div",
173
- _hoisted_9,
178
+ _hoisted_10,
174
179
  toDisplayString(__props.emptyText),
175
180
  1
176
181
  /* TEXT */
177
182
  )) : !conversationItems.value.length && keyword.value ? (openBlock(), createElementBlock(
178
183
  "div",
179
- _hoisted_10,
184
+ _hoisted_11,
180
185
  toDisplayString(__props.noResultText),
181
186
  1
182
187
  /* TEXT */
@@ -198,17 +203,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
198
203
  class: normalizeClass(["yc-chat-sidebar__item", { active: item.id === __props.activeId }])
199
204
  },
200
205
  [
201
- createElementVNode("div", _hoisted_11, [
206
+ createElementVNode("div", _hoisted_12, [
202
207
  createElementVNode(
203
208
  "div",
204
- _hoisted_12,
209
+ _hoisted_13,
205
210
  toDisplayString(item.label),
206
211
  1
207
212
  /* TEXT */
208
213
  ),
209
214
  createElementVNode(
210
215
  "div",
211
- _hoisted_13,
216
+ _hoisted_14,
212
217
  toDisplayString(item.timeText),
213
218
  1
214
219
  /* TEXT */
@@ -245,7 +250,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
245
250
  -1
246
251
  /* CACHED */
247
252
  )
248
- ])], 8, _hoisted_14)
253
+ ])], 8, _hoisted_15)
249
254
  ])
250
255
  ],
251
256
  2
@@ -258,13 +263,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
258
263
  __props.hasMore ? {
259
264
  name: "load-more",
260
265
  fn: withCtx(() => [
261
- createElementVNode("div", _hoisted_15, [
266
+ createElementVNode("div", _hoisted_16, [
262
267
  createElementVNode("button", {
263
268
  type: "button",
264
269
  class: "yc-chat-sidebar__more-btn",
265
270
  disabled: __props.loading,
266
271
  onClick: _cache[3] || (_cache[3] = ($event) => emit("load-more"))
267
- }, toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_16)
272
+ }, toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_17)
268
273
  ])
269
274
  ]),
270
275
  key: "0"
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, Fragment, renderList, toDisplayString, createVNode, withCtx, nextTick } from 'vue';
1
+ import { defineComponent, computed, ref, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createCommentVNode, createElementVNode, Fragment, renderList, toDisplayString, createVNode, withCtx, withModifiers, nextTick } from 'vue';
2
2
  import _sfc_main$1 from './mobile-frame2.vue.mjs';
3
3
  import { YC_MOBILE_DEVICE_PRESETS } from './presets.mjs';
4
4
 
@@ -6,7 +6,10 @@ const _hoisted_1 = {
6
6
  key: 0,
7
7
  class: "yc-chat-studio__notices"
8
8
  };
9
- const _hoisted_2 = { class: "yc-chat-studio__topbar conversation-banner" };
9
+ const _hoisted_2 = {
10
+ key: 1,
11
+ class: "yc-chat-studio__topbar conversation-banner"
12
+ };
10
13
  const _hoisted_3 = { class: "yc-chat-studio__left" };
11
14
  const _hoisted_4 = ["aria-label", "title"];
12
15
  const _hoisted_5 = {
@@ -26,6 +29,7 @@ const _hoisted_8 = {
26
29
  };
27
30
  const _hoisted_9 = ["data-testid", "onClick"];
28
31
  const _hoisted_10 = {
32
+ key: 1,
29
33
  class: "yc-chat-studio__segmented",
30
34
  role: "tablist",
31
35
  "aria-label": "\u7EC8\u7AEF\u9884\u89C8\u5207\u6362"
@@ -34,7 +38,7 @@ const _hoisted_11 = ["aria-selected"];
34
38
  const _hoisted_12 = ["aria-selected"];
35
39
  const _hoisted_13 = ["disabled"];
36
40
  const _hoisted_14 = {
37
- key: 1,
41
+ key: 2,
38
42
  class: "yc-chat-studio__web-body chat-workspace"
39
43
  };
40
44
  const _hoisted_15 = { class: "yc-chat-studio__main conversation-panel" };
@@ -42,11 +46,34 @@ const _hoisted_16 = { class: "yc-chat-studio__stream-inner" };
42
46
  const _hoisted_17 = { class: "yc-chat-studio__composer-dock" };
43
47
  const _hoisted_18 = { class: "yc-chat-studio__composer-inner" };
44
48
  const _hoisted_19 = {
45
- key: 2,
46
49
  class: "yc-chat-studio__mobile-stage",
47
50
  "data-testid": "mobile-stage"
48
51
  };
49
52
  const _hoisted_20 = { class: "yc-chat-studio__mobile-canvas" };
53
+ const _hoisted_21 = {
54
+ class: "yc-chat-studio__mobile-native",
55
+ "data-testid": "mobile-native"
56
+ };
57
+ const _hoisted_22 = { class: "yc-chat-studio__mobile-header" };
58
+ const _hoisted_23 = {
59
+ key: 0,
60
+ class: "yc-chat-studio__mobile-badge"
61
+ };
62
+ const _hoisted_24 = { class: "yc-chat-studio__mobile-title-wrap" };
63
+ const _hoisted_25 = { class: "yc-chat-studio__mobile-title" };
64
+ const _hoisted_26 = {
65
+ key: 0,
66
+ class: "yc-chat-studio__mobile-sub"
67
+ };
68
+ const _hoisted_27 = { class: "yc-chat-studio__mobile-actions" };
69
+ const _hoisted_28 = ["disabled"];
70
+ const _hoisted_29 = {
71
+ key: 0,
72
+ class: "yc-chat-studio__mobile-toolbar",
73
+ "data-testid": "studio-context-bar"
74
+ };
75
+ const _hoisted_30 = { class: "yc-chat-studio__mobile-composer" };
76
+ const _hoisted_31 = { class: "yc-chat-studio__mobile-drawer" };
50
77
  var _sfc_main = /* @__PURE__ */ defineComponent({
51
78
  ...{
52
79
  name: "YcChatStudio"
@@ -62,13 +89,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
62
89
  connected: { type: Boolean, default: false },
63
90
  refreshing: { type: Boolean, default: false },
64
91
  sessionCount: { default: 0 },
65
- caption: { default: "" }
92
+ caption: { default: "" },
93
+ accentColor: { default: "" },
94
+ showViewportSwitch: { type: Boolean, default: false },
95
+ deviceSimulator: { type: Boolean, default: false }
66
96
  },
67
97
  emits: ["update:viewport", "update:deviceId", "refresh", "create"],
68
98
  setup(__props, { expose: __expose, emit: __emit }) {
69
99
  const props = __props;
100
+ const accentStyle = computed(
101
+ () => props.accentColor ? { "--yc-chat-accent": props.accentColor } : void 0
102
+ );
70
103
  const emit = __emit;
71
104
  const sidebarCollapsed = ref(false);
105
+ const mobileDrawerOpen = ref(false);
72
106
  const webScrollRef = ref(null);
73
107
  const mobileScrollRef = ref(null);
74
108
  const mobileFrameRef = ref(null);
@@ -95,6 +129,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
95
129
  }
96
130
  function closeMobileDrawer() {
97
131
  var _a;
132
+ mobileDrawerOpen.value = false;
98
133
  (_a = mobileFrameRef.value) == null ? void 0 : _a.closeDrawer();
99
134
  }
100
135
  __expose({
@@ -106,13 +141,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
106
141
  return openBlock(), createElementBlock(
107
142
  "div",
108
143
  {
109
- class: normalizeClass(["yc-chat-studio tenant-chat-page", `is-${__props.viewport}`])
144
+ class: normalizeClass(["yc-chat-studio tenant-chat-page", [`is-${__props.viewport}`, { "is-simulator": __props.viewport === "mobile" && __props.deviceSimulator }]]),
145
+ style: normalizeStyle(accentStyle.value)
110
146
  },
111
147
  [
112
148
  _ctx.$slots.notice ? (openBlock(), createElementBlock("div", _hoisted_1, [
113
149
  renderSlot(_ctx.$slots, "notice")
114
150
  ])) : createCommentVNode("v-if", true),
115
- createElementVNode("header", _hoisted_2, [
151
+ createCommentVNode(" Web \u7AEF\uFF08\u6216\u663E\u5F0F\u5F00\u542F\u5916\u90E8\u6A21\u62DF\u5668\u65F6\uFF09\u9876\u90E8\u680F "),
152
+ __props.viewport === "web" || __props.deviceSimulator ? (openBlock(), createElementBlock("header", _hoisted_2, [
116
153
  createElementVNode("div", _hoisted_3, [
117
154
  __props.viewport === "web" ? (openBlock(), createElementBlock("button", {
118
155
  key: 0,
@@ -121,7 +158,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
121
158
  "aria-label": sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
122
159
  title: sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
123
160
  onClick: _cache[0] || (_cache[0] = ($event) => sidebarCollapsed.value = !sidebarCollapsed.value)
124
- }, [..._cache[6] || (_cache[6] = [
161
+ }, [..._cache[8] || (_cache[8] = [
125
162
  createElementVNode(
126
163
  "svg",
127
164
  {
@@ -157,7 +194,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
157
194
  ])) : createCommentVNode("v-if", true)
158
195
  ]),
159
196
  createElementVNode("div", _hoisted_7, [
160
- __props.viewport === "mobile" ? (openBlock(), createElementBlock("div", _hoisted_8, [
197
+ __props.viewport === "mobile" && __props.deviceSimulator ? (openBlock(), createElementBlock("div", _hoisted_8, [
161
198
  (openBlock(true), createElementBlock(
162
199
  Fragment,
163
200
  null,
@@ -174,7 +211,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
174
211
  /* KEYED_FRAGMENT */
175
212
  ))
176
213
  ])) : createCommentVNode("v-if", true),
177
- createElementVNode("div", _hoisted_10, [
214
+ __props.showViewportSwitch ? (openBlock(), createElementBlock("div", _hoisted_10, [
178
215
  createElementVNode("button", {
179
216
  type: "button",
180
217
  role: "tab",
@@ -182,7 +219,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
182
219
  "data-testid": "viewport-web",
183
220
  class: normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "web" }]),
184
221
  onClick: _cache[1] || (_cache[1] = ($event) => switchViewport("web"))
185
- }, [..._cache[7] || (_cache[7] = [
222
+ }, [..._cache[9] || (_cache[9] = [
186
223
  createElementVNode(
187
224
  "svg",
188
225
  {
@@ -225,7 +262,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
225
262
  "data-testid": "viewport-mobile",
226
263
  class: normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "mobile" }]),
227
264
  onClick: _cache[2] || (_cache[2] = ($event) => switchViewport("mobile"))
228
- }, [..._cache[8] || (_cache[8] = [
265
+ }, [..._cache[10] || (_cache[10] = [
229
266
  createElementVNode(
230
267
  "svg",
231
268
  {
@@ -261,7 +298,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
261
298
  /* CACHED */
262
299
  )
263
300
  ])], 10, _hoisted_12)
264
- ]),
301
+ ])) : createCommentVNode("v-if", true),
265
302
  createElementVNode("button", {
266
303
  type: "button",
267
304
  class: "yc-chat-studio__ghost-btn",
@@ -277,7 +314,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
277
314
  class: normalizeClass({ "is-spinning": __props.refreshing }),
278
315
  "aria-hidden": "true"
279
316
  },
280
- [..._cache[9] || (_cache[9] = [
317
+ [..._cache[11] || (_cache[11] = [
281
318
  createElementVNode(
282
319
  "path",
283
320
  {
@@ -295,7 +332,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
295
332
  2
296
333
  /* CLASS */
297
334
  )),
298
- _cache[10] || (_cache[10] = createElementVNode(
335
+ _cache[12] || (_cache[12] = createElementVNode(
299
336
  "span",
300
337
  null,
301
338
  "\u5237\u65B0",
@@ -304,7 +341,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
304
341
  ))
305
342
  ], 8, _hoisted_13)
306
343
  ])
307
- ]),
344
+ ])) : createCommentVNode("v-if", true),
345
+ createCommentVNode(" Web \u7AEF\uFF1A\u684C\u9762\u53CC\u680F\u5DE5\u4F5C\u53F0\uFF08\u5DE6\u4FA7\u5E38\u9A7B\u53EF\u6298\u53E0\u4FA7\u680F + \u53F3\u4FA7\u4E3B\u5BF9\u8BDD\u533A\uFF09 "),
308
346
  __props.viewport === "web" ? (openBlock(), createElementBlock("div", _hoisted_14, [
309
347
  createElementVNode(
310
348
  "div",
@@ -339,50 +377,227 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
339
377
  ])
340
378
  ])
341
379
  ])
342
- ])) : (openBlock(), createElementBlock("div", _hoisted_19, [
343
- createElementVNode("div", _hoisted_20, [
344
- createVNode(_sfc_main$1, {
345
- ref_key: "mobileFrameRef",
346
- ref: mobileFrameRef,
347
- device: activeDevice.value,
348
- "agent-name": __props.agentName,
349
- status: __props.status,
350
- "status-label": __props.statusLabel,
351
- connected: __props.connected,
352
- "session-count": __props.sessionCount,
353
- caption: __props.caption,
354
- onCreate: _cache[4] || (_cache[4] = ($event) => emit("create")),
355
- onRefresh: _cache[5] || (_cache[5] = ($event) => emit("refresh"))
356
- }, {
357
- drawer: withCtx(() => [
358
- renderSlot(_ctx.$slots, "sidebar")
380
+ ])) : __props.deviceSimulator ? (openBlock(), createElementBlock(
381
+ Fragment,
382
+ { key: 3 },
383
+ [
384
+ createCommentVNode(" Mobile \u7AEF\uFF08\u6A21\u62DF\u5668\u6A21\u5F0F\uFF0C\u517C\u5BB9\u663E\u5F0F\u4F20 deviceSimulator=true\uFF09 "),
385
+ createElementVNode("div", _hoisted_19, [
386
+ createElementVNode("div", _hoisted_20, [
387
+ createVNode(_sfc_main$1, {
388
+ ref_key: "mobileFrameRef",
389
+ ref: mobileFrameRef,
390
+ device: activeDevice.value,
391
+ "agent-name": __props.agentName,
392
+ status: __props.status,
393
+ "status-label": __props.statusLabel,
394
+ connected: __props.connected,
395
+ "session-count": __props.sessionCount,
396
+ caption: __props.caption,
397
+ onCreate: _cache[4] || (_cache[4] = ($event) => emit("create")),
398
+ onRefresh: _cache[5] || (_cache[5] = ($event) => emit("refresh"))
399
+ }, {
400
+ drawer: withCtx(() => [
401
+ renderSlot(_ctx.$slots, "sidebar")
402
+ ]),
403
+ footer: withCtx(() => [
404
+ renderSlot(_ctx.$slots, "composer")
405
+ ]),
406
+ default: withCtx(() => [
407
+ createElementVNode(
408
+ "div",
409
+ {
410
+ ref_key: "mobileScrollRef",
411
+ ref: mobileScrollRef,
412
+ class: "yc-chat-studio__mobile-stream message-viewport"
413
+ },
414
+ [
415
+ renderSlot(_ctx.$slots, "messages")
416
+ ],
417
+ 512
418
+ /* NEED_PATCH */
419
+ )
420
+ ]),
421
+ _: 3
422
+ /* FORWARDED */
423
+ }, 8, ["device", "agent-name", "status", "status-label", "connected", "session-count", "caption"])
424
+ ])
425
+ ])
426
+ ],
427
+ 2112
428
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
429
+ )) : (openBlock(), createElementBlock(
430
+ Fragment,
431
+ { key: 4 },
432
+ [
433
+ createCommentVNode(" Mobile \u7AEF\uFF08\u539F\u751F H5 \u5F62\u6001\uFF1A\u9876\u90E8\u6C49\u5821\u62BD\u5C49\u5BFC\u822A + \u5168\u5BBD\u6D88\u606F\u6D41 + \u8D34\u5E95\u7D27\u51D1\u8F93\u5165\u533A\uFF09 "),
434
+ createElementVNode("div", _hoisted_21, [
435
+ createElementVNode("header", _hoisted_22, [
436
+ createElementVNode("button", {
437
+ type: "button",
438
+ class: "yc-chat-studio__icon-btn",
439
+ "aria-label": "\u6253\u5F00\u4F1A\u8BDD\u62BD\u5C49",
440
+ "data-testid": "mobile-drawer-trigger",
441
+ onClick: _cache[6] || (_cache[6] = ($event) => mobileDrawerOpen.value = true)
442
+ }, [
443
+ _cache[13] || (_cache[13] = createElementVNode(
444
+ "svg",
445
+ {
446
+ viewBox: "0 0 16 16",
447
+ fill: "none",
448
+ "aria-hidden": "true"
449
+ },
450
+ [
451
+ createElementVNode("path", {
452
+ d: "M2.5 4.25H13.5M2.5 8H10.5M2.5 11.75H13.5",
453
+ stroke: "currentColor",
454
+ "stroke-width": "1.45",
455
+ "stroke-linecap": "round"
456
+ })
457
+ ],
458
+ -1
459
+ /* CACHED */
460
+ )),
461
+ __props.sessionCount > 0 ? (openBlock(), createElementBlock(
462
+ "span",
463
+ _hoisted_23,
464
+ toDisplayString(__props.sessionCount > 99 ? "99+" : __props.sessionCount),
465
+ 1
466
+ /* TEXT */
467
+ )) : createCommentVNode("v-if", true)
468
+ ]),
469
+ createElementVNode("div", _hoisted_24, [
470
+ createElementVNode(
471
+ "span",
472
+ _hoisted_25,
473
+ toDisplayString(__props.agentName || "\u5BF9\u8BDD"),
474
+ 1
475
+ /* TEXT */
476
+ ),
477
+ __props.statusLabel ? (openBlock(), createElementBlock("span", _hoisted_26, [
478
+ createElementVNode(
479
+ "span",
480
+ {
481
+ class: normalizeClass(["yc-chat-studio__mobile-dot", `is-${__props.status}`])
482
+ },
483
+ null,
484
+ 2
485
+ /* CLASS */
486
+ ),
487
+ createElementVNode(
488
+ "span",
489
+ null,
490
+ toDisplayString(__props.statusLabel),
491
+ 1
492
+ /* TEXT */
493
+ )
494
+ ])) : createCommentVNode("v-if", true)
495
+ ]),
496
+ createElementVNode("div", _hoisted_27, [
497
+ createElementVNode("button", {
498
+ type: "button",
499
+ class: "yc-chat-studio__icon-btn",
500
+ "aria-label": "\u65B0\u5EFA\u4F1A\u8BDD",
501
+ disabled: !__props.connected,
502
+ onClick: _cache[7] || (_cache[7] = ($event) => emit("create"))
503
+ }, [..._cache[14] || (_cache[14] = [
504
+ createElementVNode(
505
+ "svg",
506
+ {
507
+ viewBox: "0 0 16 16",
508
+ fill: "none",
509
+ "aria-hidden": "true"
510
+ },
511
+ [
512
+ createElementVNode("path", {
513
+ d: "M8 3.25V12.75M3.25 8H12.75",
514
+ stroke: "currentColor",
515
+ "stroke-width": "1.5",
516
+ "stroke-linecap": "round"
517
+ })
518
+ ],
519
+ -1
520
+ /* CACHED */
521
+ )
522
+ ])], 8, _hoisted_28)
523
+ ])
359
524
  ]),
360
- footer: withCtx(() => [
525
+ _ctx.$slots.toolbar ? (openBlock(), createElementBlock("div", _hoisted_29, [
526
+ renderSlot(_ctx.$slots, "toolbar")
527
+ ])) : createCommentVNode("v-if", true),
528
+ createElementVNode(
529
+ "div",
530
+ {
531
+ ref_key: "mobileScrollRef",
532
+ ref: mobileScrollRef,
533
+ class: "yc-chat-studio__mobile-stream message-viewport"
534
+ },
535
+ [
536
+ renderSlot(_ctx.$slots, "messages")
537
+ ],
538
+ 512
539
+ /* NEED_PATCH */
540
+ ),
541
+ createElementVNode("div", _hoisted_30, [
361
542
  renderSlot(_ctx.$slots, "composer")
362
543
  ]),
363
- default: withCtx(() => [
364
- createElementVNode(
365
- "div",
366
- {
367
- ref_key: "mobileScrollRef",
368
- ref: mobileScrollRef,
369
- class: "yc-chat-studio__mobile-stream message-viewport"
370
- },
371
- [
372
- renderSlot(_ctx.$slots, "messages")
373
- ],
374
- 512
375
- /* NEED_PATCH */
376
- )
377
- ]),
378
- _: 3
379
- /* FORWARDED */
380
- }, 8, ["device", "agent-name", "status", "status-label", "connected", "session-count", "caption"])
381
- ])
382
- ]))
544
+ mobileDrawerOpen.value ? (openBlock(), createElementBlock("div", {
545
+ key: 1,
546
+ class: "yc-chat-studio__mobile-drawer-mask",
547
+ "data-testid": "mobile-drawer",
548
+ onClick: withModifiers(closeMobileDrawer, ["self"])
549
+ }, [
550
+ createElementVNode("aside", _hoisted_31, [
551
+ createElementVNode("div", { class: "yc-chat-studio__mobile-drawer-top" }, [
552
+ _cache[16] || (_cache[16] = createElementVNode(
553
+ "span",
554
+ null,
555
+ "\u5386\u53F2\u4F1A\u8BDD",
556
+ -1
557
+ /* CACHED */
558
+ )),
559
+ createElementVNode("button", {
560
+ type: "button",
561
+ class: "yc-chat-studio__icon-btn",
562
+ "aria-label": "\u5173\u95ED\u4F1A\u8BDD\u62BD\u5C49",
563
+ onClick: closeMobileDrawer
564
+ }, [..._cache[15] || (_cache[15] = [
565
+ createElementVNode(
566
+ "svg",
567
+ {
568
+ viewBox: "0 0 16 16",
569
+ fill: "none",
570
+ "aria-hidden": "true"
571
+ },
572
+ [
573
+ createElementVNode("path", {
574
+ d: "M4 4L12 12M12 4L4 12",
575
+ stroke: "currentColor",
576
+ "stroke-width": "1.5",
577
+ "stroke-linecap": "round"
578
+ })
579
+ ],
580
+ -1
581
+ /* CACHED */
582
+ )
583
+ ])])
584
+ ]),
585
+ createElementVNode("div", {
586
+ class: "yc-chat-studio__mobile-drawer-body",
587
+ onClick: closeMobileDrawer
588
+ }, [
589
+ renderSlot(_ctx.$slots, "sidebar")
590
+ ])
591
+ ])
592
+ ])) : createCommentVNode("v-if", true)
593
+ ])
594
+ ],
595
+ 2112
596
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
597
+ ))
383
598
  ],
384
- 2
385
- /* CLASS */
599
+ 6
600
+ /* CLASS, STYLE */
386
601
  );
387
602
  };
388
603
  }