@turquoisehealth/pit-viper 2.264.1 → 2.264.2-dev.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.
Files changed (37) hide show
  1. package/_site/assets/css/pit-viper-a11y-v3.css +5 -0
  2. package/_site/assets/css/pit-viper-a11y.css +5 -0
  3. package/_site/assets/css/pit-viper-consumer.css +5 -0
  4. package/_site/assets/css/pit-viper-v2-scoped.css +4 -0
  5. package/_site/assets/css/pit-viper-v2.css +5 -0
  6. package/_site/assets/css/pit-viper-v3.css +5 -0
  7. package/_site/assets/css/pit-viper.css +5 -0
  8. package/package.json +1 -1
  9. package/pv-components/dist/stats/vue/ai/stats.html +1 -1
  10. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  11. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-filter-panel-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-prompt-input-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-question-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +1 -1
  16. package/pv-components/dist/vue/ai/components/ai/PvPromptInput/PvPromptInput.vue.d.ts +4 -0
  17. package/pv-components/dist/vue/ai/components/ai/PvPromptInput/types.d.ts +12 -0
  18. package/pv-components/dist/vue/ai/components/ai/PvQuestion/types.d.ts +4 -0
  19. package/pv-components/dist/vue/ai/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +1 -1
  20. package/pv-components/dist/vue/ai/components/base/PvRange/PvRange.vue.d.ts +2 -2
  21. package/pv-components/dist/vue/ai/components/base/PvSuggestionTag/PvSuggestionTag.vue.d.ts +5 -0
  22. package/pv-components/dist/vue/ai/components/base/PvTooltip/PvTooltip.vue.d.ts +1 -1
  23. package/pv-components/dist/vue/ai/components/base/PvTooltipV2/PvTooltipV2.vue.d.ts +1 -1
  24. package/pv-components/dist/vue/ai/pv-components-ai.mjs +486 -325
  25. package/pv-components/dist/vue/ai/pv-components-ai.mjs.map +1 -1
  26. package/pv-components/dist/vue/base/components/base/PvSuggestionTag/PvSuggestionTag.vue.d.ts +5 -0
  27. package/pv-components/dist/vue/base/pv-components-base.mjs +1102 -1096
  28. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  29. package/pv-components/dist/vue/visualizations/components/base/PvSuggestionTag/PvSuggestionTag.vue.d.ts +5 -0
  30. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +599 -593
  31. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  32. package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +875 -869
  33. package/pv-components/dist/web/components/pv-prompt-input/pv-prompt-input.js +826 -572
  34. package/pv-components/dist/web/components/pv-question/pv-question.js +387 -373
  35. package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +382 -376
  36. package/pv-components/dist/web/pv-components.iife.js +36 -36
  37. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
@@ -1,8 +1,8 @@
1
1
  (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.pv-badge-md[data-v-3def68cb]{--inset-size:2px 2px;min-width:20px;min-height:20px;max-height:20px;font-weight:500}.pv-badge-sm[data-v-3def68cb]{--inset-size:0 2px;min-width:16px;min-height:16px;max-height:16px;font-weight:500}.pv-rounded[data-v-3def68cb]{border-radius:50%}.input-icon-position{pointer-events:none;position:absolute;top:8px;left:12px}summary[data-v-dfa0b416]{background-image:none;padding-right:2px}
2
- /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { Comment as e, Fragment as t, Text as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, getCurrentInstance as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onBeforeUpdate as y, onMounted as b, onScopeDispose as x, openBlock as S, ref as C, renderList as w, renderSlot as T, toDisplayString as E, toHandlers as D, unref as O, useId as k, useModel as A, useSlots as j, vModelDynamic as M, vModelText as N, watch as P, withCtx as F, withDirectives as I, withKeys as L, withModifiers as R } from "vue";
2
+ /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { Comment as e, Fragment as t, Text as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, getCurrentInstance as f, guardReactiveProps as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onBeforeUpdate as x, onMounted as S, onScopeDispose as C, openBlock as w, ref as T, renderList as E, renderSlot as D, toDisplayString as O, toHandlers as k, unref as A, useId as j, useModel as M, useSlots as N, useTemplateRef as P, vModelDynamic as F, vModelText as I, vShow as L, watch as R, withCtx as z, withDirectives as B, withKeys as ee, withModifiers as V } from "vue";
3
3
  //#endregion
4
4
  //#region src/components/base/PvSpinner/PvSpinner.vue
5
- var z = /* @__PURE__ */ d({
5
+ var te = /* @__PURE__ */ d({
6
6
  __name: "PvSpinner",
7
7
  props: {
8
8
  size: { default: "lg" },
@@ -20,26 +20,26 @@ var z = /* @__PURE__ */ d({
20
20
  dark: "pv-spinner-dark",
21
21
  white: "pv-spinner-light"
22
22
  };
23
- return (r, i) => (S(), s("div", {
23
+ return (r, i) => (w(), s("div", {
24
24
  "data-testid": "pv-spinner",
25
- class: g(n[e.variant]),
26
- style: _({ "--size": t[e.size] })
25
+ class: _(n[e.variant]),
26
+ style: y({ "--size": t[e.size] })
27
27
  }, null, 6));
28
28
  }
29
- }), B = ["ghost"], V = {
29
+ }), ne = ["ghost"], H = {
30
30
  md: "pv-button-small",
31
31
  lg: void 0,
32
32
  xl: "pv-button-large"
33
- }, H = (e) => e == null || !V.hasOwnProperty(e) ? null : V[e] || null;
33
+ }, re = (e) => e == null || !H.hasOwnProperty(e) ? null : H[e] || null;
34
34
  //#endregion
35
35
  //#region src/web-components/utils.ts
36
36
  function U() {
37
- let e = C(!1), t = f()?.root || {};
37
+ let e = T(!1), t = f()?.root || {};
38
38
  return "isCE" in t && t.isCE === !0 && (e.value = !0), e;
39
39
  }
40
40
  //#endregion
41
41
  //#region src/components/base/baseProps.ts
42
- var ee = [
42
+ var ie = [
43
43
  void 0,
44
44
  10,
45
45
  12,
@@ -48,24 +48,24 @@ var ee = [
48
48
  24,
49
49
  32,
50
50
  64
51
- ], te = ["xlink:href"], W = /* @__PURE__ */ d({
51
+ ], ae = ["xlink:href"], W = /* @__PURE__ */ d({
52
52
  __name: "PvIcon",
53
53
  props: {
54
54
  name: {},
55
55
  size: {}
56
56
  },
57
57
  setup(e) {
58
- let t = e, n = U(), r = C(null), a = i(() => ({
58
+ let t = e, n = U(), r = T(null), a = i(() => ({
59
59
  "pv-icon": !0,
60
- [`pv-icon-${t.size}`]: t.size != null && ee.includes(t.size)
60
+ [`pv-icon-${t.size}`]: t.size != null && ie.includes(t.size)
61
61
  })), o = i(() => n.value && r.value ? `${r.value}#${t.name}` : `#${t.name}`);
62
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (e, t) => (S(), s("svg", {
62
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (e, t) => (w(), s("svg", {
63
63
  "data-testid": "pv-icon",
64
64
  "aria-hidden": "true",
65
- class: g(a.value)
66
- }, [c("use", { "xlink:href": o.value }, null, 8, te)], 2));
65
+ class: _(a.value)
66
+ }, [c("use", { "xlink:href": o.value }, null, 8, ae)], 2));
67
67
  }
68
- }), ne = /* @__PURE__ */ d({
68
+ }), oe = /* @__PURE__ */ d({
69
69
  __name: "PvCounterBadge",
70
70
  props: {
71
71
  maxValue: { default: 99 },
@@ -87,19 +87,19 @@ var ee = [
87
87
  "pv-surface": t.variant == "ghost",
88
88
  "pv-rounded": t.rounded
89
89
  }));
90
- return (e, t) => (S(), s("div", {
91
- class: g(r.value),
90
+ return (e, t) => (w(), s("div", {
91
+ class: _(r.value),
92
92
  "data-testid": "pv-counter-badge"
93
- }, E(n.value), 3));
93
+ }, O(n.value), 3));
94
94
  }
95
95
  }), G = (e, t) => {
96
96
  let n = e.__vccOpts || e;
97
97
  for (let [e, r] of t) n[e] = r;
98
98
  return n;
99
- }, K = /* @__PURE__ */ G(ne, [["__scopeId", "data-v-3def68cb"]]), re = ["disabled", "aria-label"], ie = {
99
+ }, K = /* @__PURE__ */ G(oe, [["__scopeId", "data-v-3def68cb"]]), q = ["disabled", "aria-label"], se = {
100
100
  key: 2,
101
101
  "data-testid": "pv-button-label"
102
- }, q = /* @__PURE__ */ d({
102
+ }, J = /* @__PURE__ */ d({
103
103
  __name: "PvButton",
104
104
  props: {
105
105
  variant: { default: "primary" },
@@ -126,57 +126,57 @@ var ee = [
126
126
  setup(e) {
127
127
  let n = e, r = i(() => !n.label || n.loading ? n.label || n.ariaLabel : void 0), c = i(() => {
128
128
  let e = [];
129
- n.inverse && B.includes(n.variant) ? e.push(`pv-button-${n.variant}-inverse`) : e.push(`pv-button-${n.variant}`);
130
- let t = H(n.size);
129
+ n.inverse && ne.includes(n.variant) ? e.push(`pv-button-${n.variant}-inverse`) : e.push(`pv-button-${n.variant}`);
130
+ let t = re(n.size);
131
131
  return t && e.push(t), e;
132
132
  });
133
- return (n, i) => (S(), s("button", {
133
+ return (n, i) => (w(), s("button", {
134
134
  type: "button",
135
- class: g(c.value),
135
+ class: _(c.value),
136
136
  disabled: e.disabled,
137
137
  "aria-label": r.value,
138
138
  "data-testid": "pv-button"
139
- }, [e.loading ? (S(), a(z, {
139
+ }, [e.loading ? (w(), a(te, {
140
140
  key: 0,
141
141
  size: "sm"
142
- })) : (S(), s(t, { key: 1 }, [
143
- e.leftCounterBadge ? (S(), a(K, {
142
+ })) : (w(), s(t, { key: 1 }, [
143
+ e.leftCounterBadge ? (w(), a(K, {
144
144
  key: 0,
145
145
  value: e.leftCounterBadge,
146
146
  variant: "tertiary"
147
147
  }, null, 8, ["value"])) : o("", !0),
148
- e.leftIcon ? (S(), a(W, {
148
+ e.leftIcon ? (w(), a(W, {
149
149
  key: 1,
150
150
  name: e.leftIcon,
151
151
  "data-testid": "pv-button-left-icon"
152
152
  }, null, 8, ["name"])) : o("", !0),
153
- e.label ? (S(), s("span", ie, E(e.label), 1)) : o("", !0),
154
- e.rightCounterBadge ? (S(), a(K, {
153
+ e.label ? (w(), s("span", se, O(e.label), 1)) : o("", !0),
154
+ e.rightCounterBadge ? (w(), a(K, {
155
155
  key: 3,
156
156
  value: e.rightCounterBadge,
157
157
  variant: "tertiary"
158
158
  }, null, 8, ["value"])) : o("", !0),
159
- e.rightIcon ? (S(), a(W, {
159
+ e.rightIcon ? (w(), a(W, {
160
160
  key: 4,
161
161
  name: e.rightIcon,
162
162
  "data-testid": "pv-button-right-icon"
163
163
  }, null, 8, ["name"])) : o("", !0)
164
- ], 64))], 10, re));
164
+ ], 64))], 10, q));
165
165
  }
166
- }), J = ["for"], Y = {
166
+ }), ce = ["for"], le = {
167
167
  key: 0,
168
168
  class: "pv-surface-accent pv-inset-square pv-text-body-md pv-radius pv-bordered",
169
169
  style: { "--inset-size": "6px 10px" }
170
- }, ae = { class: "pv-relative pv-flex-item" }, oe = [
170
+ }, ue = { class: "pv-relative pv-flex-item" }, de = [
171
171
  "disabled",
172
172
  "type",
173
173
  "placeholder",
174
174
  "id",
175
175
  "data-invalid",
176
176
  "step"
177
- ], se = /* @__PURE__ */ d({
177
+ ], fe = /* @__PURE__ */ d({
178
178
  __name: "PvInput",
179
- props: /* @__PURE__ */ p({
179
+ props: /* @__PURE__ */ m({
180
180
  showLabel: { type: Boolean },
181
181
  error: { type: Boolean },
182
182
  disabled: { type: Boolean },
@@ -194,19 +194,19 @@ var ee = [
194
194
  }),
195
195
  emits: ["update:modelValue"],
196
196
  setup(e) {
197
- let n = e, r = A(e, "modelValue"), l = i(() => n.inputIcon ? { "--inset-size": "8px 12px 6px 36px" } : {});
198
- return (n, i) => (S(), s(t, null, [
199
- n.$slots.label || e.showLabel ? (S(), s("label", {
197
+ let n = e, r = M(e, "modelValue"), l = i(() => n.inputIcon ? { "--inset-size": "8px 12px 6px 36px" } : {});
198
+ return (n, i) => (w(), s(t, null, [
199
+ n.$slots.label || e.showLabel ? (w(), s("label", {
200
200
  key: 0,
201
201
  "data-testid": "pv-input-label",
202
202
  class: "pv-label pv-stack-8",
203
203
  for: e.id
204
- }, [T(n.$slots, "label")], 8, J)) : o("", !0),
205
- c("div", { class: g(["pv-flex pv-flex-item", { "pv-stack-8": e.lowerLabel }]) }, [e.prefixLabel ? (S(), s("div", Y, E(e.prefixLabel), 1)) : o("", !0), c("div", ae, [e.inputIcon ? (S(), a(W, {
204
+ }, [D(n.$slots, "label")], 8, ce)) : o("", !0),
205
+ c("div", { class: _(["pv-flex pv-flex-item", { "pv-stack-8": e.lowerLabel }]) }, [e.prefixLabel ? (w(), s("div", le, O(e.prefixLabel), 1)) : o("", !0), c("div", ue, [e.inputIcon ? (w(), a(W, {
206
206
  key: 0,
207
207
  class: "pv-absolute input-icon-position",
208
208
  name: e.inputIcon
209
- }, null, 8, ["name"])) : o("", !0), I(c("input", m(n.$attrs, {
209
+ }, null, 8, ["name"])) : o("", !0), B(c("input", h(n.$attrs, {
210
210
  "onUpdate:modelValue": i[0] ||= (e) => r.value = e,
211
211
  "data-testid": "pv-input",
212
212
  class: ["pv-input-text", {
@@ -220,57 +220,70 @@ var ee = [
220
220
  id: e.id,
221
221
  "data-invalid": e.error ? !0 : void 0,
222
222
  step: e.step
223
- }), null, 16, oe), [[M, r.value]])])], 2),
224
- e.lowerLabel ? (S(), s("p", {
223
+ }), null, 16, de), [[F, r.value]])])], 2),
224
+ e.lowerLabel ? (w(), s("p", {
225
225
  key: 1,
226
226
  "data-testid": "pv-input-lower-label",
227
227
  style: { "margin-left": "12px" },
228
- class: g(["pv-text-body-xs", {
228
+ class: _(["pv-text-body-xs", {
229
229
  "pv-text-red": e.error,
230
230
  "pv-text-subdued": !e.error
231
231
  }])
232
- }, E(e.lowerLabel), 3)) : o("", !0)
232
+ }, O(e.lowerLabel), 3)) : o("", !0)
233
233
  ], 64));
234
234
  }
235
- }), ce = ["onKeydown"], le = { class: "pv-question-header pv-inset-square-16 pv-space-between" }, ue = {
235
+ }), pe = ["onKeydown"], me = { class: "pv-question-header pv-inset-square-16 pv-space-between" }, he = {
236
236
  class: "pv-question-header-copy pv-flex-vertical pv-flex-item",
237
237
  style: {
238
238
  "--flex-align": "flex-start",
239
239
  "--flex-gap": "4px",
240
240
  "min-width": "0"
241
241
  }
242
- }, de = {
242
+ }, ge = {
243
243
  key: 0,
244
244
  class: "pv-text-body-md pv-text-tertiary"
245
- }, fe = { class: "pv-question-header-actions pv-flex" }, pe = {
245
+ }, _e = { class: "pv-question-header-actions pv-flex" }, ve = {
246
246
  key: 0,
247
247
  class: "pv-text-body-xs pv-text-tertiary",
248
248
  role: "status",
249
249
  "aria-live": "polite"
250
- }, me = {
250
+ }, ye = {
251
251
  class: "pv-question-body pv-border-bottom",
252
252
  style: { "padding-bottom": "2px" }
253
- }, he = {
253
+ }, be = {
254
254
  class: "pv-question-options pv-flex-vertical pv-inset-inline-16",
255
255
  style: {
256
256
  "--flex-align": "stretch",
257
257
  "--flex-gap": "2px"
258
258
  }
259
- }, ge = ["aria-activedescendant"], _e = [
259
+ }, xe = ["aria-activedescendant"], Se = [
260
260
  "id",
261
261
  "aria-selected",
262
262
  "data-active",
263
263
  "onClick",
264
264
  "onMouseenter"
265
- ], ve = {
265
+ ], Ce = {
266
+ key: 0,
267
+ class: "pv-flex-item pv-flex-vertical",
268
+ style: {
269
+ "--flex-align": "flex-start",
270
+ "--flex-gap": "2px",
271
+ "min-width": "0"
272
+ }
273
+ }, we = { class: "pv-question-answer-text pv-text-title-md" }, Te = { class: "pv-question-description pv-text-body-sm pv-text-tertiary" }, Ee = {
274
+ key: 1,
266
275
  class: "pv-question-answer-text pv-flex-item pv-text-title-md",
267
276
  style: { "min-width": "0" }
268
- }, ye = ["title"], be = { class: "pv-visually-hidden" }, xe = ["data-active"], Se = { class: "pv-question-chat-badge pv-flex pv-radius pv-text-subdued" }, Ce = {
277
+ }, De = {
278
+ key: 2,
279
+ class: "pv-question-tag pv-tag-highlight",
280
+ "data-style": "rounded"
281
+ }, Oe = ["title"], ke = { class: "pv-visually-hidden" }, Ae = ["data-active"], je = { class: "pv-question-chat-badge pv-flex pv-radius pv-text-subdued" }, Me = {
269
282
  class: "pv-question-chat-input pv-flex-item",
270
283
  style: { "min-width": "0" }
271
- }, we = { class: "pv-question-footer pv-inset-squish-12 pv-space-between" }, Te = /* @__PURE__ */ d({
284
+ }, Ne = { class: "pv-question-footer pv-inset-squish-12 pv-space-between" }, Pe = /* @__PURE__ */ d({
272
285
  __name: "PvQuestion",
273
- props: /* @__PURE__ */ p({
286
+ props: /* @__PURE__ */ m({
274
287
  chatInputLabel: { default: "Other answer" },
275
288
  chatInputPlaceholder: { default: "Something else..." },
276
289
  currentQuestion: { default: 1 },
@@ -284,18 +297,18 @@ var ee = [
284
297
  chatInput: { default: "" },
285
298
  chatInputModifiers: {}
286
299
  }),
287
- emits: /* @__PURE__ */ p([
300
+ emits: /* @__PURE__ */ m([
288
301
  "close",
289
302
  "select",
290
303
  "skip",
291
304
  "submit"
292
305
  ], ["update:modelValue", "update:chatInput"]),
293
306
  setup(e, { emit: n }) {
294
- let r = e, l = n, d = A(e, "modelValue"), f = A(e, "chatInput"), p = k(), m = `${p}-heading`, g = `${p}-keyboard-hint`, _ = C(), v = C(), y = r.options.findIndex((e) => e.id === d.value), b = C(Math.max(y, 0)), x = i(() => r.totalQuestions > 1), T = i(() => b.value < r.options.length ? D(b.value) : void 0);
295
- P(d, (e) => {
307
+ let r = e, l = n, d = M(e, "modelValue"), f = M(e, "chatInput"), p = j(), m = `${p}-heading`, h = `${p}-keyboard-hint`, _ = T(), v = T(), y = r.options.findIndex((e) => e.id === d.value), b = T(Math.max(y, 0)), x = i(() => r.totalQuestions > 1), S = i(() => b.value < r.options.length ? C(b.value) : void 0);
308
+ R(d, (e) => {
296
309
  let t = r.options.findIndex((t) => t.id === e);
297
310
  t >= 0 && (b.value = t);
298
- }), P(() => r.options.map((e) => e.id), (e, t) => {
311
+ }), R(() => r.options.map((e) => e.id), (e, t) => {
299
312
  let n = e.findIndex((e) => e === d.value);
300
313
  if (n >= 0) {
301
314
  b.value = n;
@@ -308,34 +321,34 @@ var ee = [
308
321
  let r = t[b.value], i = e.indexOf(r);
309
322
  b.value = i >= 0 ? i : Math.min(b.value, Math.max(e.length - 1, 0));
310
323
  });
311
- function D(e) {
324
+ function C(e) {
312
325
  return `${p}-option-${e}`;
313
326
  }
314
- function O(e) {
315
- r.options.length && (b.value = e, h(() => _.value?.focus()));
327
+ function D(e) {
328
+ r.options.length && (b.value = e, g(() => _.value?.focus()));
316
329
  }
317
- function j() {
318
- b.value = r.options.length, h(() => v.value?.querySelector("input")?.focus());
330
+ function k() {
331
+ b.value = r.options.length, g(() => v.value?.querySelector("input")?.focus());
319
332
  }
320
- function M(e, t) {
333
+ function A(e, t) {
321
334
  b.value = t, d.value = e.id, l("select", e);
322
335
  }
323
336
  function N(e, t) {
324
- M(e, t), h(() => _.value?.focus());
337
+ A(e, t), g(() => _.value?.focus());
325
338
  }
326
- function F() {
339
+ function P() {
327
340
  b.value >= r.options.length && (b.value = 0);
328
341
  }
329
- function I(e) {
330
- e.key === "ArrowDown" ? (e.preventDefault(), b.value >= r.options.length - 1 ? j() : b.value += 1) : e.key === "ArrowUp" ? (e.preventDefault(), b.value <= 0 ? j() : --b.value) : e.key === "Enter" && r.options[b.value] && (e.preventDefault(), M(r.options[b.value], b.value));
342
+ function F(e) {
343
+ e.key === "ArrowDown" ? (e.preventDefault(), b.value >= r.options.length - 1 ? k() : b.value += 1) : e.key === "ArrowUp" ? (e.preventDefault(), b.value <= 0 ? k() : --b.value) : e.key === "Enter" && r.options[b.value] && (e.preventDefault(), A(r.options[b.value], b.value));
331
344
  }
332
- function z() {
345
+ function I() {
333
346
  b.value = r.options.length, d.value = void 0;
334
347
  }
335
- function B(e) {
348
+ function L(e) {
336
349
  if (!(!r.options.length && (e.key === "ArrowDown" || e.key === "ArrowUp"))) {
337
- if (e.key === "ArrowDown") e.preventDefault(), O(0);
338
- else if (e.key === "ArrowUp") e.preventDefault(), O(r.options.length - 1);
350
+ if (e.key === "ArrowDown") e.preventDefault(), D(0);
351
+ else if (e.key === "ArrowUp") e.preventDefault(), D(r.options.length - 1);
339
352
  else if (e.key === "Enter" && !e.isComposing) {
340
353
  e.preventDefault();
341
354
  let t = f.value.trim();
@@ -343,29 +356,29 @@ var ee = [
343
356
  }
344
357
  }
345
358
  }
346
- function V() {
359
+ function z() {
347
360
  l("close");
348
361
  }
349
- function H() {
362
+ function B() {
350
363
  l("skip");
351
364
  }
352
- return (n, r) => (S(), s("section", {
365
+ return (n, r) => (w(), s("section", {
353
366
  class: "pv-question pv-card pv-surface pv-full-width",
354
367
  "data-testid": "pv-question",
355
368
  "aria-labelledby": m,
356
- onKeydown: L(R(H, ["stop", "prevent"]), ["esc"])
369
+ onKeydown: ee(V(B, ["stop", "prevent"]), ["esc"])
357
370
  }, [
358
- c("header", le, [c("div", ue, [c("h3", {
371
+ c("header", me, [c("div", he, [c("h3", {
359
372
  id: m,
360
373
  class: "pv-heading-3"
361
- }, E(e.headerLabel), 1), e.subheader ? (S(), s("p", de, E(e.subheader), 1)) : o("", !0)]), c("div", fe, [x.value ? (S(), s("span", pe, E(e.currentQuestion) + " of " + E(e.totalQuestions), 1)) : o("", !0), u(q, {
374
+ }, O(e.headerLabel), 1), e.subheader ? (w(), s("p", ge, O(e.subheader), 1)) : o("", !0)]), c("div", _e, [x.value ? (w(), s("span", ve, O(e.currentQuestion) + " of " + O(e.totalQuestions), 1)) : o("", !0), u(J, {
362
375
  ariaLabel: "Close",
363
376
  leftIcon: "close",
364
377
  size: "md",
365
378
  variant: "ghost",
366
- onClick: V
379
+ onClick: z
367
380
  })])]),
368
- c("div", me, [c("div", he, [c("div", {
381
+ c("div", ye, [c("div", be, [c("div", {
369
382
  ref_key: "listboxRef",
370
383
  ref: _,
371
384
  class: "pv-question-listbox pv-flex-vertical",
@@ -376,13 +389,13 @@ var ee = [
376
389
  "data-testid": "pv-question-listbox",
377
390
  role: "listbox",
378
391
  tabindex: "0",
379
- "aria-activedescendant": T.value,
380
- "aria-describedby": g,
392
+ "aria-activedescendant": S.value,
393
+ "aria-describedby": h,
381
394
  "aria-labelledby": m,
382
- onFocus: F,
383
- onKeydown: I
384
- }, [(S(!0), s(t, null, w(e.options, (e, t) => (S(), s("div", {
385
- id: D(t),
395
+ onFocus: P,
396
+ onKeydown: F
397
+ }, [(w(!0), s(t, null, E(e.options, (e, t) => (w(), s("div", {
398
+ id: C(t),
386
399
  key: e.id,
387
400
  class: "pv-question-option pv-flex pv-inset-squish-12 pv-radius-lg",
388
401
  "data-testid": "pv-question-option",
@@ -397,9 +410,10 @@ var ee = [
397
410
  size: "sm",
398
411
  variant: "tertiary"
399
412
  }, null, 8, ["value"]),
400
- c("span", ve, E(e.label), 1),
401
- e.helpText ? (S(), s("span", {
402
- key: 0,
413
+ e.description ? (w(), s("div", Ce, [c("span", we, O(e.label), 1), c("span", Te, O(e.description), 1)])) : (w(), s("span", Ee, O(e.label), 1)),
414
+ e.tag ? (w(), s("span", De, O(e.tag), 1)) : o("", !0),
415
+ e.helpText ? (w(), s("span", {
416
+ key: 3,
403
417
  class: "pv-question-help pv-flex",
404
418
  style: { "--flex-gap": "0" },
405
419
  title: e.helpText
@@ -407,9 +421,9 @@ var ee = [
407
421
  class: "pv-text-tertiary",
408
422
  name: "info-circle",
409
423
  size: 12
410
- }), c("span", be, E(e.helpText), 1)], 8, ye)) : o("", !0),
411
- d.value === e.id ? (S(), a(W, {
412
- key: 1,
424
+ }), c("span", ke, O(e.helpText), 1)], 8, Oe)) : o("", !0),
425
+ d.value === e.id ? (w(), a(W, {
426
+ key: 4,
413
427
  class: "pv-question-check pv-text-brand",
414
428
  name: "check"
415
429
  })) : o("", !0),
@@ -417,26 +431,26 @@ var ee = [
417
431
  class: "pv-question-chevron pv-text-tertiary",
418
432
  name: "chevron-right"
419
433
  })
420
- ], 40, _e))), 128))], 40, ge), c("div", {
434
+ ], 40, Se))), 128))], 40, xe), c("div", {
421
435
  ref_key: "chatInputWrapperRef",
422
436
  ref: v,
423
437
  class: "pv-question-chat pv-flex pv-inset-squish-12 pv-radius-lg",
424
438
  "data-testid": "pv-question-chat",
425
439
  "data-active": b.value === e.options.length || void 0,
426
- onClick: j,
440
+ onClick: k,
427
441
  onMouseenter: r[1] ||= (t) => b.value = e.options.length
428
442
  }, [
429
- c("span", Se, [u(W, {
443
+ c("span", je, [u(W, {
430
444
  name: "text-search",
431
445
  size: 12
432
446
  })]),
433
- c("div", Ce, [u(se, {
447
+ c("div", Me, [u(fe, {
434
448
  modelValue: f.value,
435
449
  "onUpdate:modelValue": r[0] ||= (e) => f.value = e,
436
450
  "aria-label": e.chatInputLabel,
437
451
  placeholder: e.chatInputPlaceholder,
438
- onFocus: z,
439
- onKeydown: B
452
+ onFocus: I,
453
+ onKeydown: L
440
454
  }, null, 8, [
441
455
  "modelValue",
442
456
  "aria-label",
@@ -446,36 +460,36 @@ var ee = [
446
460
  class: "pv-question-chevron pv-text-tertiary",
447
461
  name: "chevron-right"
448
462
  })
449
- ], 40, xe)])]),
450
- c("footer", we, [c("span", {
451
- id: g,
463
+ ], 40, Ae)])]),
464
+ c("footer", Ne, [c("span", {
465
+ id: h,
452
466
  class: "pv-text-body-xs pv-text-tertiary"
453
- }, "↑↓ to navigate • Enter to select • Esc to skip"), u(q, {
467
+ }, "↑↓ to navigate • Enter to select • Esc to skip"), u(J, {
454
468
  class: "pv-question-skip",
455
469
  label: "Skip",
456
470
  size: "lg",
457
471
  variant: "secondary",
458
- onClick: H
472
+ onClick: B
459
473
  })])
460
- ], 40, ce));
474
+ ], 40, pe));
461
475
  }
462
- }), Ee = {
476
+ }), Fe = {
463
477
  key: 0,
464
478
  class: "pv-confirmation pv-bordered pv-radius pv-inset-square-16 pv-flow-16",
465
479
  "data-testid": "pv-confirmation",
466
480
  "aria-label": "Tool approval"
467
- }, De = { class: "pv-text-body-sm" }, Oe = {
481
+ }, Ie = { class: "pv-text-body-sm" }, Le = {
468
482
  class: "pv-flex",
469
483
  style: { "--flex-justify": "flex-end" }
470
- }, ke = {
484
+ }, Re = {
471
485
  key: 1,
472
486
  class: "pv-flex pv-text-body-sm pv-text-success",
473
487
  role: "status"
474
- }, Ae = {
488
+ }, ze = {
475
489
  key: 2,
476
490
  class: "pv-flex pv-text-body-sm pv-text-critical",
477
491
  role: "status"
478
- }, je = /* @__PURE__ */ d({
492
+ }, Be = /* @__PURE__ */ d({
479
493
  __name: "PvConfirmation",
480
494
  props: {
481
495
  approval: {},
@@ -497,37 +511,223 @@ var ee = [
497
511
  approved: e
498
512
  });
499
513
  }
500
- return (n, r) => d.value || f.value || p.value ? (S(), s("section", Ee, [d.value ? (S(), s(t, { key: 0 }, [c("div", De, [T(n.$slots, "default", {}, () => [l(E(e.message), 1)])]), c("div", Oe, [u(q, {
514
+ return (n, r) => d.value || f.value || p.value ? (w(), s("section", Fe, [d.value ? (w(), s(t, { key: 0 }, [c("div", Ie, [D(n.$slots, "default", {}, () => [l(O(e.message), 1)])]), c("div", Le, [u(J, {
501
515
  variant: "secondary",
502
516
  size: "md",
503
517
  label: e.rejectLabel,
504
518
  disabled: e.disabled,
505
519
  onClick: r[0] ||= (e) => m(!1)
506
- }, null, 8, ["label", "disabled"]), u(q, {
520
+ }, null, 8, ["label", "disabled"]), u(J, {
507
521
  size: "md",
508
522
  label: e.approveLabel,
509
523
  disabled: e.disabled,
510
524
  onClick: r[1] ||= (e) => m(!0)
511
- }, null, 8, ["label", "disabled"])])], 64)) : f.value ? (S(), s("p", ke, [u(W, {
525
+ }, null, 8, ["label", "disabled"])])], 64)) : f.value ? (w(), s("p", Re, [u(W, {
512
526
  name: "check-circle",
513
527
  size: 20
514
- }), T(n.$slots, "accepted", {}, () => [r[2] ||= l("You approved this tool execution.", -1)])])) : (S(), s("p", Ae, [u(W, {
528
+ }), D(n.$slots, "accepted", {}, () => [r[2] ||= l("You approved this tool execution.", -1)])])) : (w(), s("p", ze, [u(W, {
515
529
  name: "close-circle",
516
530
  size: 20
517
- }), T(n.$slots, "rejected", {}, () => [r[3] ||= l("You rejected this tool execution.", -1)])]))])) : o("", !0);
531
+ }), D(n.$slots, "rejected", {}, () => [r[3] ||= l("You rejected this tool execution.", -1)])]))])) : o("", !0);
532
+ }
533
+ });
534
+ //#endregion
535
+ //#region src/composables/useSlotPresence.ts
536
+ function Y(e, t) {
537
+ if (e.nodeType !== Node.TEXT_NODE) return !1;
538
+ let n = e.textContent ?? "";
539
+ return t ? n.length > 0 : n.trim().length > 0;
540
+ }
541
+ function Ve(e, t, n) {
542
+ let r = t === "default" ? "" : t, i = Array.from(e.childNodes);
543
+ return r === "" ? i.some((e) => e.nodeType === Node.ELEMENT_NODE ? !e.hasAttribute("slot") : Y(e, n)) : i.some((e) => e.nodeType === Node.ELEMENT_NODE ? e.getAttribute("slot") === r : !1);
544
+ }
545
+ function He(e) {
546
+ if (e.shadowRoot) return null;
547
+ let t = e._slots;
548
+ return !t || typeof t != "object" ? null : t;
549
+ }
550
+ function Ue(e, t, n) {
551
+ let r = e[t === "" ? "default" : t];
552
+ return r ? r.some((e) => e.nodeType === Node.ELEMENT_NODE ? !0 : Y(e, n)) : !1;
553
+ }
554
+ function We(e, t) {
555
+ let n = e.shadowRoot;
556
+ return n ? t === "default" || t === "" ? n.querySelector("slot:not([name])") : n.querySelector(`slot[name="${CSS.escape(t)}"]`) : null;
557
+ }
558
+ function Ge(e, t, { useShadowSlot: n = !0, countWhitespaceTextInDefaultSlot: r = !1 } = {}) {
559
+ let i = n ? We(e, t) : null;
560
+ if (i) return i.assignedNodes({ flatten: !0 }).some((e) => e.nodeType === Node.ELEMENT_NODE ? !0 : Y(e, r));
561
+ let a = He(e);
562
+ return a ? Ue(a, t, r) : Ve(e, t, r);
563
+ }
564
+ function X(e, t = {}) {
565
+ let { host: n, vueSlots: r, observe: a = !0, listenSlotChange: o = !0, countWhitespaceTextInDefaultSlot: s = !1 } = t, c = U(), l = r ?? N(), u = e === "default" || e === "" ? "default" : e, d = () => !!l && !!l[u], f = T(d());
566
+ x(() => {
567
+ f.value = d();
568
+ });
569
+ let p = T(!1), m = null, h = null, g = () => {
570
+ m &&= (m.disconnect(), null), h &&= (h.removeEventListener("slotchange", _), null);
571
+ }, _ = () => {
572
+ if (!c.value) {
573
+ p.value = !1;
574
+ return;
575
+ }
576
+ let t = A(n);
577
+ if (!t) {
578
+ p.value = !1;
579
+ return;
580
+ }
581
+ p.value = Ge(t, e, {
582
+ useShadowSlot: o,
583
+ countWhitespaceTextInDefaultSlot: s
584
+ });
585
+ }, v = () => {
586
+ if (!c.value) return;
587
+ g();
588
+ let e = A(n);
589
+ if (!e) {
590
+ p.value = !1;
591
+ return;
592
+ }
593
+ _(), o && (h = e.shadowRoot, h?.addEventListener("slotchange", _)), a && (m = new MutationObserver(() => _()), m.observe(e, {
594
+ childList: !0,
595
+ subtree: !1,
596
+ attributes: !0,
597
+ attributeFilter: ["slot"],
598
+ characterData: !0
599
+ }));
600
+ };
601
+ return S(v), b(g), R(() => A(n), () => {
602
+ c.value && v();
603
+ }), {
604
+ present: i(() => c.value ? p.value : f.value),
605
+ hasVueSlot: f,
606
+ hasNativeSlot: p,
607
+ refresh: _
608
+ };
609
+ }
610
+ //#endregion
611
+ //#region src/components/base/PvTooltip/PvTooltip.vue?vue&type=script&setup=true&lang.ts
612
+ var Ke = [
613
+ "data-position",
614
+ "data-style",
615
+ "data-static",
616
+ "aria-labelledby"
617
+ ], qe = ["id"], Je = /* @__PURE__ */ d({
618
+ __name: "PvTooltip",
619
+ props: {
620
+ variant: { default: "white" },
621
+ tooltipPosition: { default: "top-right" },
622
+ ariaLabelledBy: { default: "ariaLabelledById" },
623
+ size: { default: "md" },
624
+ disableInteractive: {
625
+ type: Boolean,
626
+ default: !1
627
+ },
628
+ delay: { default: 0 }
629
+ },
630
+ setup(e) {
631
+ let t = e, n = P("rootRef"), { present: r } = X("tooltip-content", { host: i(() => {
632
+ let e = n.value?.getRootNode();
633
+ return e instanceof ShadowRoot ? e.host : null;
634
+ }) }), a = i(() => t.delay > 0), c = T(!1), l = T(!1), u, d = () => {
635
+ u && clearTimeout(u), u = void 0;
636
+ }, f = i(() => !a.value || c.value || l.value), p = () => {
637
+ a.value && (d(), u = setTimeout(() => {
638
+ u = void 0, l.value = !0;
639
+ }, t.delay));
640
+ }, m = () => {
641
+ a.value && (d(), l.value = !1);
642
+ }, h = () => {
643
+ a.value && (c.value = !0);
644
+ }, g = () => {
645
+ a.value && (c.value = !1);
646
+ };
647
+ return b(d), (t, i) => (w(), s("div", {
648
+ ref_key: "rootRef",
649
+ ref: n,
650
+ "data-testid": "pv-tooltip",
651
+ class: _([{
652
+ "pv-tooltip": A(r),
653
+ "pv-tooltip-small": A(r) && e.size === "sm"
654
+ }]),
655
+ "data-position": e.tooltipPosition,
656
+ "data-style": e.variant === "white" ? "white" : "dark",
657
+ "data-static": e.disableInteractive ? !0 : void 0,
658
+ "aria-labelledby": A(r) ? e.ariaLabelledBy : void 0,
659
+ onMouseenter: p,
660
+ onMouseleave: m,
661
+ onFocusin: h,
662
+ onFocusout: g
663
+ }, [D(t.$slots, "label"), A(r) ? B((w(), s("div", {
664
+ key: 0,
665
+ role: "tooltip",
666
+ id: e.ariaLabelledBy,
667
+ "data-testid": "pv-tooltip-content"
668
+ }, [D(t.$slots, "tooltip-content")], 8, qe)), [[L, f.value]]) : o("", !0)], 42, Ke));
518
669
  }
519
- }), Me = {
670
+ }), Ye = { class: "pv-text-body-sm" }, Xe = /* @__PURE__ */ d({
671
+ __name: "PvButtonWithTooltip",
672
+ props: {
673
+ tooltipText: {},
674
+ tooltipVariant: { default: "dark" },
675
+ tooltipPosition: {},
676
+ delay: { default: 500 },
677
+ variant: {},
678
+ disabled: { type: Boolean },
679
+ size: {},
680
+ loading: { type: Boolean },
681
+ label: {},
682
+ leftIcon: {},
683
+ rightIcon: {},
684
+ inverse: { type: Boolean },
685
+ leftCounterBadge: {},
686
+ rightCounterBadge: {},
687
+ ariaLabel: {}
688
+ },
689
+ setup(e) {
690
+ let t = e, n = i(() => t.size === "md" ? "sm" : "md"), r = i(() => ({
691
+ variant: t.variant,
692
+ disabled: t.disabled,
693
+ size: t.size,
694
+ loading: t.loading,
695
+ label: t.label,
696
+ leftIcon: t.leftIcon,
697
+ rightIcon: t.rightIcon,
698
+ inverse: t.inverse,
699
+ leftCounterBadge: t.leftCounterBadge,
700
+ rightCounterBadge: t.rightCounterBadge,
701
+ ariaLabel: t.ariaLabel
702
+ }));
703
+ return (t, i) => (w(), a(Je, {
704
+ variant: e.tooltipVariant,
705
+ "tooltip-position": e.tooltipPosition,
706
+ delay: e.delay,
707
+ size: n.value
708
+ }, {
709
+ "tooltip-content": z(() => [c("p", Ye, O(e.tooltipText), 1)]),
710
+ label: z(() => [u(J, v(p(r.value)), null, 16)]),
711
+ _: 1
712
+ }, 8, [
713
+ "variant",
714
+ "tooltip-position",
715
+ "delay",
716
+ "size"
717
+ ]));
718
+ }
719
+ }), Ze = {
520
720
  class: "pv-flex-vertical",
521
721
  style: { "--flex-align": "flex-start" }
522
- }, Ne = ["for"], Pe = [
722
+ }, Qe = ["for"], $e = [
523
723
  "rows",
524
724
  "disabled",
525
725
  "placeholder",
526
726
  "id",
527
727
  "data-invalid"
528
- ], Fe = /* @__PURE__ */ d({
728
+ ], et = /* @__PURE__ */ d({
529
729
  __name: "PvTextArea",
530
- props: /* @__PURE__ */ p({
730
+ props: /* @__PURE__ */ m({
531
731
  error: { type: Boolean },
532
732
  disabled: { type: Boolean },
533
733
  placeholder: {},
@@ -541,14 +741,14 @@ var ee = [
541
741
  }),
542
742
  emits: ["update:modelValue"],
543
743
  setup(e) {
544
- let t = A(e, "modelValue");
545
- return (n, r) => (S(), s("div", Me, [
546
- n.$slots.label ? (S(), s("label", {
744
+ let t = M(e, "modelValue");
745
+ return (n, r) => (w(), s("div", Ze, [
746
+ n.$slots.label ? (w(), s("label", {
547
747
  key: 0,
548
748
  class: "pv-label",
549
749
  for: e.id
550
- }, [T(n.$slots, "label")], 8, Ne)) : o("", !0),
551
- I(c("textarea", m(n.$attrs, {
750
+ }, [D(n.$slots, "label")], 8, Qe)) : o("", !0),
751
+ B(c("textarea", h(n.$attrs, {
552
752
  "onUpdate:modelValue": r[0] ||= (e) => t.value = e,
553
753
  class: ["pv-textarea", { "pv-surface-accent": e.variant === "grey" }],
554
754
  rows: e.rows,
@@ -556,78 +756,93 @@ var ee = [
556
756
  placeholder: e.placeholder,
557
757
  id: e.id,
558
758
  "data-invalid": e.error ? !0 : void 0
559
- }), null, 16, Pe), [[N, t.value]]),
560
- e.lowerLabel ? (S(), s("p", {
759
+ }), null, 16, $e), [[I, t.value]]),
760
+ e.lowerLabel ? (w(), s("p", {
561
761
  key: 1,
562
762
  style: { "margin-left": "12px" },
563
- class: g(["pv-text-body-xs", {
763
+ class: _(["pv-text-body-xs", {
564
764
  "pv-text-red": e.error,
565
765
  "pv-text-subdued": !e.error
566
766
  }])
567
- }, E(e.lowerLabel), 3)) : o("", !0)
767
+ }, O(e.lowerLabel), 3)) : o("", !0)
568
768
  ]));
569
769
  }
570
- }), Ie = ["aria-busy"], Le = {
770
+ }), tt = ["aria-busy"], nt = {
571
771
  key: 0,
572
772
  class: "pv-full-width pv-flow-8"
573
- }, Re = { class: "pv-prompt-input-footer pv-flex pv-full-width" }, ze = { class: "pv-prompt-input-actions pv-flex pv-flex-item" }, Be = {
773
+ }, rt = { class: "pv-prompt-input-footer pv-flex pv-full-width" }, it = { class: "pv-prompt-input-actions pv-flex pv-flex-item" }, at = {
574
774
  class: "pv-visually-hidden",
575
775
  "aria-live": "polite"
576
- }, Ve = /* @__PURE__ */ d({
776
+ }, ot = /* @__PURE__ */ d({
577
777
  __name: "PvPromptInput",
578
- props: /* @__PURE__ */ p({
778
+ props: /* @__PURE__ */ m({
579
779
  ariaLabel: { default: "Message" },
580
780
  disabled: {
581
781
  type: Boolean,
582
782
  default: !1
583
783
  },
784
+ ignoreModifiedEnter: {
785
+ type: Boolean,
786
+ default: !1
787
+ },
584
788
  maxHeight: { default: "200px" },
585
789
  maxLength: {},
586
790
  placeholder: { default: "Ask anything..." },
791
+ roundedButton: {
792
+ type: Boolean,
793
+ default: !1
794
+ },
587
795
  rows: { default: 1 },
588
796
  status: { default: "ready" },
589
797
  stopLabel: { default: "Stop generating" },
590
- submitLabel: { default: "Send message" }
798
+ stopTooltip: {},
799
+ submitIcon: { default: "send" },
800
+ submitLabel: { default: "Send message" },
801
+ submitPending: {
802
+ type: Boolean,
803
+ default: !1
804
+ },
805
+ submitPendingLabel: {}
591
806
  }, {
592
807
  modelValue: { default: "" },
593
808
  modelModifiers: {}
594
809
  }),
595
- emits: /* @__PURE__ */ p(["submit", "stop"], ["update:modelValue"]),
810
+ emits: /* @__PURE__ */ m(["submit", "stop"], ["update:modelValue"]),
596
811
  setup(e, { expose: n, emit: r }) {
597
- let a = e, d = r, f = A(e, "modelValue"), p = C(), m = i(() => a.status === "submitted" || a.status === "streaming"), h = i(() => !a.disabled && !m.value && f.value.trim().length > 0);
598
- function g() {
599
- h.value && d("submit", f.value.trim());
812
+ let d = e, f = r, p = M(e, "modelValue"), m = T(), h = i(() => d.status === "submitted" || d.status === "streaming"), g = i(() => d.submitPending && !h.value), _ = i(() => !d.disabled && !h.value && !d.submitPending && p.value.trim().length > 0), v = i(() => h.value ? d.stopTooltip : g.value ? d.submitPendingLabel : void 0), b = i(() => d.roundedButton ? { "--button-radius": "999px" } : void 0);
813
+ function x() {
814
+ _.value && f("submit", p.value.trim());
600
815
  }
601
- function v() {
602
- p.value?.querySelector("textarea")?.focus();
816
+ function S() {
817
+ m.value?.querySelector("textarea")?.focus();
603
818
  }
604
- function y(e) {
605
- a.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || v();
819
+ function C(e) {
820
+ d.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || S();
606
821
  }
607
- function b(e) {
608
- e.key !== "Enter" || e.shiftKey || e.isComposing || (e.preventDefault(), e.stopPropagation(), g());
822
+ function E(e) {
823
+ e.key !== "Enter" || e.shiftKey || e.isComposing || d.ignoreModifiedEnter && (e.ctrlKey || e.metaKey || e.altKey) || (e.preventDefault(), e.stopPropagation(), x());
609
824
  }
610
- return n({ focus: v }), (n, r) => (S(), s("form", {
825
+ return n({ focus: S }), (n, r) => (w(), s("form", {
611
826
  ref_key: "formRef",
612
- ref: p,
827
+ ref: m,
613
828
  class: "pv-prompt-input pv-bordered pv-radius pv-inset-square-8 pv-flex-vertical",
614
829
  "data-testid": "pv-prompt-input",
615
- "aria-busy": m.value,
616
- onSubmit: R(g, ["prevent"]),
617
- onClick: y
830
+ "aria-busy": h.value,
831
+ onSubmit: V(x, ["prevent"]),
832
+ onClick: C
618
833
  }, [
619
- n.$slots.header ? (S(), s("div", Le, [T(n.$slots, "header")])) : o("", !0),
620
- u(Fe, {
621
- modelValue: f.value,
622
- "onUpdate:modelValue": r[0] ||= (e) => f.value = e,
834
+ n.$slots.header ? (w(), s("div", nt, [D(n.$slots, "header")])) : o("", !0),
835
+ u(et, {
836
+ modelValue: p.value,
837
+ "onUpdate:modelValue": r[0] ||= (e) => p.value = e,
623
838
  class: "pv-prompt-input-textarea",
624
- style: _({ "--prompt-input-max-height": e.maxHeight }),
839
+ style: y({ "--prompt-input-max-height": e.maxHeight }),
625
840
  rows: e.rows,
626
841
  maxlength: e.maxLength,
627
842
  placeholder: e.placeholder,
628
843
  disabled: e.disabled,
629
844
  "aria-label": e.ariaLabel,
630
- onKeydown: b
845
+ onKeydown: E
631
846
  }, null, 8, [
632
847
  "modelValue",
633
848
  "style",
@@ -637,32 +852,57 @@ var ee = [
637
852
  "disabled",
638
853
  "aria-label"
639
854
  ]),
640
- c("div", Re, [c("div", ze, [T(n.$slots, "actions")]), u(q, {
641
- type: m.value ? "button" : "submit",
642
- variant: m.value ? "secondary" : "primary",
855
+ c("div", rt, [c("div", it, [D(n.$slots, "actions")]), v.value ? (w(), a(Xe, {
856
+ key: 0,
857
+ "tooltip-text": v.value,
858
+ delay: 0,
859
+ variant: h.value ? "secondary" : "primary",
643
860
  size: "md",
644
- "left-icon": m.value ? "stop" : "send",
645
- "aria-label": m.value ? e.stopLabel : e.submitLabel,
646
- disabled: e.disabled || !m.value && !h.value,
647
- onClick: r[1] ||= (e) => m.value && d("stop")
861
+ "left-icon": h.value ? "stop" : e.submitIcon,
862
+ "aria-label": h.value ? e.stopLabel : e.submitLabel,
863
+ disabled: e.disabled || !h.value && !_.value,
864
+ loading: g.value,
865
+ style: y(b.value),
866
+ onClick: r[1] ||= (e) => h.value && f("stop")
867
+ }, null, 8, [
868
+ "tooltip-text",
869
+ "variant",
870
+ "left-icon",
871
+ "aria-label",
872
+ "disabled",
873
+ "loading",
874
+ "style"
875
+ ])) : (w(), a(J, {
876
+ key: 1,
877
+ type: h.value ? "button" : "submit",
878
+ variant: h.value ? "secondary" : "primary",
879
+ size: "md",
880
+ "left-icon": h.value ? "stop" : e.submitIcon,
881
+ "aria-label": h.value ? e.stopLabel : e.submitLabel,
882
+ disabled: e.disabled || !h.value && !_.value,
883
+ loading: g.value,
884
+ style: y(b.value),
885
+ onClick: r[2] ||= (e) => h.value && f("stop")
648
886
  }, null, 8, [
649
887
  "type",
650
888
  "variant",
651
889
  "left-icon",
652
890
  "aria-label",
653
- "disabled"
654
- ])]),
655
- c("p", Be, [e.status === "submitted" ? (S(), s(t, { key: 0 }, [l("Message submitted.")], 64)) : e.status === "streaming" ? (S(), s(t, { key: 1 }, [l("Response is streaming.")], 64)) : e.status === "error" ? (S(), s(t, { key: 2 }, [l("The message could not be sent.")], 64)) : o("", !0)])
656
- ], 40, Ie));
891
+ "disabled",
892
+ "loading",
893
+ "style"
894
+ ]))]),
895
+ c("p", at, [e.status === "submitted" ? (w(), s(t, { key: 0 }, [l("Message submitted.")], 64)) : e.status === "streaming" ? (w(), s(t, { key: 1 }, [l("Response is streaming.")], 64)) : e.status === "error" ? (w(), s(t, { key: 2 }, [l("The message could not be sent.")], 64)) : o("", !0)])
896
+ ], 40, tt));
657
897
  }
658
- }), He = [
898
+ }), st = [
659
899
  "ready",
660
900
  "submitted",
661
901
  "streaming",
662
902
  "error"
663
- ], Ue = ["open"], X = /* @__PURE__ */ G(/* @__PURE__ */ d({
903
+ ], ct = ["open"], Z = /* @__PURE__ */ G(/* @__PURE__ */ d({
664
904
  __name: "PvAccordion",
665
- props: /* @__PURE__ */ p({
905
+ props: /* @__PURE__ */ m({
666
906
  chevronPosition: { default: "right" },
667
907
  chevronVariant: { default: "vertical" },
668
908
  defaultOpen: { type: Boolean },
@@ -688,148 +928,69 @@ var ee = [
688
928
  modelValue: { type: Boolean },
689
929
  modelModifiers: {}
690
930
  }),
691
- emits: /* @__PURE__ */ p([
931
+ emits: /* @__PURE__ */ m([
692
932
  "summary-mouseenter",
693
933
  "summary-mouseleave",
694
934
  "summary-click"
695
935
  ], ["update:modelValue"]),
696
936
  setup(e, { emit: n }) {
697
- let r = e, l = A(e, "modelValue"), u = n;
937
+ let r = e, l = M(e, "modelValue"), u = n;
698
938
  r.defaultOpen !== void 0 && (l.value = r.defaultOpen);
699
939
  let d = (e) => {
700
940
  l.value = e.target.open;
701
941
  }, f = (e) => {
702
942
  e.detail !== 0 && (e.target?.closest("[data-pv-accordion-chevron]") || e.defaultPrevented || (e.preventDefault(), u("summary-click", e)));
703
- }, p = i(() => r.toggleOnChevronOnly ? { click: f } : {}), h = { width: r.enableTriggerFullWidth ? "100%" : "fit-content" }, g = i(() => r.chevronVariant === "horizontal" ? r.chevronPosition === "left" ? l.value ? "chevron-down" : "chevron-right" : l.value ? "chevron-down" : "chevron-left" : l.value ? "chevron-up" : "chevron-down");
704
- return (n, r) => (S(), s("details", {
943
+ }, p = i(() => r.toggleOnChevronOnly ? { click: f } : {}), m = { width: r.enableTriggerFullWidth ? "100%" : "fit-content" }, g = i(() => r.chevronVariant === "horizontal" ? r.chevronPosition === "left" ? l.value ? "chevron-down" : "chevron-right" : l.value ? "chevron-down" : "chevron-left" : l.value ? "chevron-up" : "chevron-down");
944
+ return (n, r) => (w(), s("details", {
705
945
  "data-testid": "pv-accordion",
706
946
  class: "pv-accordion",
707
947
  open: l.value,
708
948
  onToggle: d
709
- }, [c("summary", m(e.summaryAttrs, {
949
+ }, [c("summary", h(e.summaryAttrs, {
710
950
  class: ["pv-flex pv-space-between pv-relative", e.summaryClasses],
711
951
  style: {
712
- ...h,
952
+ ...m,
713
953
  ...e.summaryStyles
714
954
  },
715
955
  onMouseenter: r[0] ||= (e) => n.$emit("summary-mouseenter"),
716
956
  onMouseleave: r[1] ||= (e) => n.$emit("summary-mouseleave")
717
- }, D(p.value, !0)), [
718
- T(n.$slots, "leading", {}, void 0, !0),
719
- e.chevronPosition === "left" ? (S(), a(W, {
957
+ }, k(p.value, !0)), [
958
+ D(n.$slots, "leading", {}, void 0, !0),
959
+ e.chevronPosition === "left" ? (w(), a(W, {
720
960
  key: 0,
721
961
  name: g.value,
722
962
  "data-pv-accordion-chevron": ""
723
963
  }, null, 8, ["name"])) : o("", !0),
724
- e.enableTriggerSlot ? T(n.$slots, "trigger", { key: 1 }, void 0, !0) : (S(), s(t, { key: 2 }, [c("span", null, E(e.header), 1), e.counter ? (S(), a(K, {
964
+ e.enableTriggerSlot ? D(n.$slots, "trigger", { key: 1 }, void 0, !0) : (w(), s(t, { key: 2 }, [c("span", null, O(e.header), 1), e.counter ? (w(), a(K, {
725
965
  key: 0,
726
966
  value: e.counter,
727
967
  variant: "secondary",
728
968
  size: "sm"
729
969
  }, null, 8, ["value"])) : o("", !0)], 64)),
730
- e.chevronPosition === "right" ? (S(), a(W, {
970
+ e.chevronPosition === "right" ? (w(), a(W, {
731
971
  key: 3,
732
972
  name: g.value,
733
973
  "data-pv-accordion-chevron": ""
734
974
  }, null, 8, ["name"])) : o("", !0)
735
- ], 16), c("div", { style: _(e.contentStyles) }, [T(n.$slots, "default", {}, void 0, !0)], 4)], 40, Ue));
975
+ ], 16), c("div", { style: y(e.contentStyles) }, [D(n.$slots, "default", {}, void 0, !0)], 4)], 40, ct));
736
976
  }
737
- }), [["__scopeId", "data-v-dfa0b416"]]);
738
- //#endregion
739
- //#region src/composables/useSlotPresence.ts
740
- function Z(e, t) {
741
- if (e.nodeType !== Node.TEXT_NODE) return !1;
742
- let n = e.textContent ?? "";
743
- return t ? n.length > 0 : n.trim().length > 0;
744
- }
745
- function We(e, t, n) {
746
- let r = t === "default" ? "" : t, i = Array.from(e.childNodes);
747
- return r === "" ? i.some((e) => e.nodeType === Node.ELEMENT_NODE ? !e.hasAttribute("slot") : Z(e, n)) : i.some((e) => e.nodeType === Node.ELEMENT_NODE ? e.getAttribute("slot") === r : !1);
748
- }
749
- function Ge(e) {
750
- if (e.shadowRoot) return null;
751
- let t = e._slots;
752
- return !t || typeof t != "object" ? null : t;
753
- }
754
- function Ke(e, t, n) {
755
- let r = e[t === "" ? "default" : t];
756
- return r ? r.some((e) => e.nodeType === Node.ELEMENT_NODE ? !0 : Z(e, n)) : !1;
757
- }
758
- function qe(e, t) {
759
- let n = e.shadowRoot;
760
- return n ? t === "default" || t === "" ? n.querySelector("slot:not([name])") : n.querySelector(`slot[name="${CSS.escape(t)}"]`) : null;
761
- }
762
- function Je(e, t, { useShadowSlot: n = !0, countWhitespaceTextInDefaultSlot: r = !1 } = {}) {
763
- let i = n ? qe(e, t) : null;
764
- if (i) return i.assignedNodes({ flatten: !0 }).some((e) => e.nodeType === Node.ELEMENT_NODE ? !0 : Z(e, r));
765
- let a = Ge(e);
766
- return a ? Ke(a, t, r) : We(e, t, r);
767
- }
768
- function Ye(e, t = {}) {
769
- let { host: n, vueSlots: r, observe: a = !0, listenSlotChange: o = !0, countWhitespaceTextInDefaultSlot: s = !1 } = t, c = U(), l = r ?? j(), u = e === "default" || e === "" ? "default" : e, d = () => !!l && !!l[u], f = C(d());
770
- y(() => {
771
- f.value = d();
772
- });
773
- let p = C(!1), m = null, h = null, g = () => {
774
- m &&= (m.disconnect(), null), h &&= (h.removeEventListener("slotchange", _), null);
775
- }, _ = () => {
776
- if (!c.value) {
777
- p.value = !1;
778
- return;
779
- }
780
- let t = O(n);
781
- if (!t) {
782
- p.value = !1;
783
- return;
784
- }
785
- p.value = Je(t, e, {
786
- useShadowSlot: o,
787
- countWhitespaceTextInDefaultSlot: s
788
- });
789
- }, x = () => {
790
- if (!c.value) return;
791
- g();
792
- let e = O(n);
793
- if (!e) {
794
- p.value = !1;
795
- return;
796
- }
797
- _(), o && (h = e.shadowRoot, h?.addEventListener("slotchange", _)), a && (m = new MutationObserver(() => _()), m.observe(e, {
798
- childList: !0,
799
- subtree: !1,
800
- attributes: !0,
801
- attributeFilter: ["slot"],
802
- characterData: !0
803
- }));
804
- };
805
- return b(x), v(g), P(() => O(n), () => {
806
- c.value && x();
807
- }), {
808
- present: i(() => c.value ? p.value : f.value),
809
- hasVueSlot: f,
810
- hasNativeSlot: p,
811
- refresh: _
812
- };
813
- }
814
- //#endregion
815
- //#region src/components/ai/PvStepList/PvStepList.vue?vue&type=script&setup=true&lang.ts
816
- var Xe = ["data-status"], Ze = {
977
+ }), [["__scopeId", "data-v-dfa0b416"]]), lt = ["data-status"], ut = {
817
978
  key: 0,
818
979
  class: "pv-step-marker",
819
980
  "aria-hidden": "true"
820
- }, Qe = {
981
+ }, dt = {
821
982
  key: 1,
822
983
  class: "pv-step-dot"
823
- }, $e = { class: "pv-step-body pv-flow-8" }, et = {
984
+ }, ft = { class: "pv-step-body pv-flow-8" }, pt = {
824
985
  key: 0,
825
986
  class: "pv-step-aside pv-text-body-md pv-text-tertiary"
826
- }, tt = {
987
+ }, mt = {
827
988
  key: 0,
828
989
  class: "pv-tag-highlight"
829
- }, nt = {
990
+ }, ht = {
830
991
  key: 0,
831
992
  class: "pv-text-body-md pv-text-tertiary"
832
- }, rt = {
993
+ }, gt = {
833
994
  key: 1,
834
995
  class: "pv-flex",
835
996
  role: "list",
@@ -837,7 +998,7 @@ var Xe = ["data-status"], Ze = {
837
998
  "--flex-wrap": "wrap",
838
999
  "--flex-gap": "4px"
839
1000
  }
840
- }, it = {
1001
+ }, _t = {
841
1002
  key: 2,
842
1003
  class: "pv-text-body-md pv-text-medium pv-text-brand"
843
1004
  }, Q = /* @__PURE__ */ d({
@@ -860,46 +1021,46 @@ var Xe = ["data-status"], Ze = {
860
1021
  function d(e, t) {
861
1022
  return u(e, t) === "active" ? "pv-text-medium pv-text-default" : "pv-text-quaternary";
862
1023
  }
863
- return (n, i) => (S(), a(r, {
1024
+ return (n, i) => (w(), a(r, {
864
1025
  tag: "ol",
865
1026
  name: "pv-step",
866
1027
  class: "pv-step-list",
867
1028
  role: "list"
868
1029
  }, {
869
- default: F(() => [(S(!0), s(t, null, w(e.steps, (e, n) => (S(), s("li", {
1030
+ default: z(() => [(w(!0), s(t, null, E(e.steps, (e, n) => (w(), s("li", {
870
1031
  key: e.id ?? n,
871
1032
  class: "pv-step",
872
1033
  "data-status": u(e, n)
873
- }, [e.variant === "aside" ? o("", !0) : (S(), s("span", Ze, [e.icon ? (S(), a(W, {
1034
+ }, [e.variant === "aside" ? o("", !0) : (w(), s("span", ut, [e.icon ? (w(), a(W, {
874
1035
  key: 0,
875
1036
  name: e.icon,
876
1037
  size: 12
877
- }, null, 8, ["name"])) : (S(), s("span", Qe))])), c("div", $e, [e.variant === "aside" ? (S(), s("p", et, [c("em", null, E(e.label), 1)])) : (S(), s(t, { key: 1 }, [
1038
+ }, null, 8, ["name"])) : (w(), s("span", dt))])), c("div", ft, [e.variant === "aside" ? (w(), s("p", pt, [c("em", null, O(e.label), 1)])) : (w(), s(t, { key: 1 }, [
878
1039
  c("p", {
879
- class: g(["pv-flex pv-text-body-md", d(e, n)]),
1040
+ class: _(["pv-flex pv-text-body-md", d(e, n)]),
880
1041
  style: { "--flex-wrap": "wrap" }
881
- }, [c("span", { class: g({ "pv-shimmer": u(e, n) === "active" }) }, E(e.label), 3), e.artifact ? (S(), s("span", tt, E(e.artifact), 1)) : o("", !0)], 2),
882
- e.note ? (S(), s("p", nt, E(e.note), 1)) : o("", !0),
883
- e.tags && e.tags.length > 0 ? (S(), s("ul", rt, [(S(!0), s(t, null, w(e.tags, (e, t) => (S(), s("li", {
1042
+ }, [c("span", { class: _({ "pv-shimmer": u(e, n) === "active" }) }, O(e.label), 3), e.artifact ? (w(), s("span", mt, O(e.artifact), 1)) : o("", !0)], 2),
1043
+ e.note ? (w(), s("p", ht, O(e.note), 1)) : o("", !0),
1044
+ e.tags && e.tags.length > 0 ? (w(), s("ul", gt, [(w(!0), s(t, null, E(e.tags, (e, t) => (w(), s("li", {
884
1045
  key: t,
885
- class: g(["pv-tag-secondary", { "pv-text-quaternary": e.variant === "muted" }]),
1046
+ class: _(["pv-tag-secondary", { "pv-text-quaternary": e.variant === "muted" }]),
886
1047
  "data-style": "rounded"
887
- }, E(e.label), 3))), 128))])) : o("", !0),
888
- e.outcome ? (S(), s("p", it, " →\xA0" + E(e.outcome), 1)) : o("", !0)
889
- ], 64))])], 8, Xe))), 128))]),
1048
+ }, O(e.label), 3))), 128))])) : o("", !0),
1049
+ e.outcome ? (w(), s("p", _t, " →\xA0" + O(e.outcome), 1)) : o("", !0)
1050
+ ], 64))])], 8, lt))), 128))]),
890
1051
  _: 1
891
1052
  }));
892
1053
  }
893
- }), at = {
1054
+ }), vt = {
894
1055
  class: "pv-reasoning-trigger pv-flex pv-text-body-md pv-text-medium",
895
1056
  "aria-live": "polite"
896
- }, ot = { class: "pv-reasoning-content pv-text-body-md pv-text-tertiary" }, st = {
1057
+ }, yt = { class: "pv-reasoning-content pv-text-body-md pv-text-tertiary" }, $ = {
897
1058
  key: 1,
898
1059
  class: "pv-reasoning-trigger pv-reasoning-standalone pv-flex pv-text-body-md pv-text-medium pv-text-tertiary",
899
1060
  "aria-live": "polite"
900
- }, ct = /* @__PURE__ */ d({
1061
+ }, bt = /* @__PURE__ */ d({
901
1062
  __name: "PvReasoning",
902
- props: /* @__PURE__ */ p({
1063
+ props: /* @__PURE__ */ m({
903
1064
  autoCloseDelay: { default: 1e3 },
904
1065
  completedLabel: { default: "Reasoning" },
905
1066
  defaultOpen: {
@@ -922,36 +1083,36 @@ var Xe = ["data-status"], Ze = {
922
1083
  }),
923
1084
  emits: ["update:open"],
924
1085
  setup(r) {
925
- let l = r, d = A(r, "open"), p = C(), m = C(), h = C(!1), _;
1086
+ let l = r, d = M(r, "open"), p = T(), m = T(), h = T(!1), g;
926
1087
  (l.defaultOpen || l.isStreaming) && (d.value = !0), l.isStreaming && (m.value = Date.now());
927
- let y = i(() => l.duration ?? p.value), b = i(() => {
1088
+ let v = i(() => l.duration ?? p.value), y = i(() => {
928
1089
  if (l.isStreaming) return l.streamingLabel;
929
- if (y.value === void 0) return l.completedLabel;
930
- let e = Math.max(1, Math.round(y.value));
1090
+ if (v.value === void 0) return l.completedLabel;
1091
+ let e = Math.max(1, Math.round(v.value));
931
1092
  return `Thought for ${e} ${e === 1 ? "second" : "seconds"}`;
932
- }), x = j(), w = f(), D = U(), O = i(() => D.value ? w?.ce : null), { hasNativeSlot: k } = Ye("default", { host: O });
933
- function M(r) {
934
- return r.some((r) => r.type === e ? !1 : r.type === n ? String(r.children ?? "").trim().length > 0 : r.type === t ? Array.isArray(r.children) && M(r.children) : !0);
1093
+ }), x = N(), S = f(), C = U(), E = i(() => C.value ? S?.ce : null), { hasNativeSlot: k } = X("default", { host: E });
1094
+ function A(r) {
1095
+ return r.some((r) => r.type === e ? !1 : r.type === n ? String(r.children ?? "").trim().length > 0 : r.type === t ? Array.isArray(r.children) && A(r.children) : !0);
935
1096
  }
936
- function N() {
937
- return l.steps.length > 0 || k.value ? !0 : O.value ? !1 : M(x.default?.({}) ?? []);
1097
+ function j() {
1098
+ return l.steps.length > 0 || k.value ? !0 : E.value ? !1 : A(x.default?.({}) ?? []);
938
1099
  }
939
- function I() {
940
- _ !== void 0 && (clearTimeout(_), _ = void 0);
1100
+ function P() {
1101
+ g !== void 0 && (clearTimeout(g), g = void 0);
941
1102
  }
942
- function L(e) {
1103
+ function F(e) {
943
1104
  let t = e.target?.closest?.("summary");
944
- !t || t.parentElement !== e.currentTarget || (h.value = !0, I());
1105
+ !t || t.parentElement !== e.currentTarget || (h.value = !0, P());
945
1106
  }
946
- return P(() => l.isStreaming, (e, t) => {
947
- if (I(), e) {
1107
+ return R(() => l.isStreaming, (e, t) => {
1108
+ if (P(), e) {
948
1109
  m.value = Date.now(), p.value = void 0, h.value = !1, d.value = !0;
949
1110
  return;
950
1111
  }
951
- t && (m.value !== void 0 && (p.value = (Date.now() - m.value) / 1e3), h.value || (_ = setTimeout(() => {
1112
+ t && (m.value !== void 0 && (p.value = (Date.now() - m.value) / 1e3), h.value || (g = setTimeout(() => {
952
1113
  h.value || (d.value = !1);
953
1114
  }, l.autoCloseDelay)));
954
- }), v(I), (e, t) => N() ? (S(), a(X, {
1115
+ }), b(P), (e, t) => j() ? (w(), a(Z, {
955
1116
  key: 0,
956
1117
  modelValue: d.value,
957
1118
  "onUpdate:modelValue": t[0] ||= (e) => d.value = e,
@@ -963,31 +1124,31 @@ var Xe = ["data-status"], Ze = {
963
1124
  "enable-trigger-slot": "",
964
1125
  "summary-classes": { "pv-text-tertiary": !0 },
965
1126
  "summary-styles": { justifyContent: "flex-start" },
966
- onClick: L
1127
+ onClick: F
967
1128
  }, {
968
- trigger: F(() => [c("span", at, [T(e.$slots, "trigger", {}, () => [u(W, { name: "brain" }), c("span", { class: g(["pv-text-subdued", { "pv-shimmer": r.isStreaming }]) }, E(b.value), 3)])])]),
969
- default: F(() => [c("div", ot, [r.steps.length > 0 ? (S(), a(Q, {
1129
+ trigger: z(() => [c("span", vt, [D(e.$slots, "trigger", {}, () => [u(W, { name: "brain" }), c("span", { class: _(["pv-text-subdued", { "pv-shimmer": r.isStreaming }]) }, O(y.value), 3)])])]),
1130
+ default: z(() => [c("div", yt, [r.steps.length > 0 ? (w(), a(Q, {
970
1131
  key: 0,
971
1132
  steps: r.steps,
972
1133
  "in-progress": r.isStreaming
973
- }, null, 8, ["steps", "in-progress"])) : o("", !0), T(e.$slots, "default")])]),
1134
+ }, null, 8, ["steps", "in-progress"])) : o("", !0), D(e.$slots, "default")])]),
974
1135
  _: 3
975
- }, 8, ["modelValue", "default-open"])) : (S(), s("span", st, [T(e.$slots, "trigger", {}, () => [u(W, { name: "brain" }), c("span", { class: g(["pv-text-subdued", { "pv-shimmer": r.isStreaming }]) }, E(b.value), 3)])]));
1136
+ }, 8, ["modelValue", "default-open"])) : (w(), s("span", $, [D(e.$slots, "trigger", {}, () => [u(W, { name: "brain" }), c("span", { class: _(["pv-text-subdued", { "pv-shimmer": r.isStreaming }]) }, O(y.value), 3)])]));
976
1137
  }
977
- }), lt = { class: "pv-tool-heading pv-flex pv-flex-item" }, ut = { class: "pv-text-title-sm pv-truncate" }, dt = { class: "pv-tool-disclosure-content" }, ft = { class: "pv-flow-16 pv-border-top pv-tool-content" }, $ = {
1138
+ }), xt = { class: "pv-tool-heading pv-flex pv-flex-item" }, St = { class: "pv-text-title-sm pv-truncate" }, Ct = { class: "pv-tool-disclosure-content" }, wt = { class: "pv-flow-16 pv-border-top pv-tool-content" }, Tt = {
978
1139
  key: 0,
979
1140
  class: "pv-flow-8"
980
- }, pt = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, mt = {
1141
+ }, Et = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, Dt = {
981
1142
  key: 1,
982
1143
  class: "pv-flow-8",
983
1144
  role: "alert",
984
1145
  "aria-label": "Tool error"
985
- }, ht = { class: "pv-surface-critical pv-inset-square-12 pv-radius-sm pv-text-body-xs pv-text-critical" }, gt = {
1146
+ }, Ot = { class: "pv-surface-critical pv-inset-square-12 pv-radius-sm pv-text-body-xs pv-text-critical" }, kt = {
986
1147
  key: 2,
987
1148
  class: "pv-flow-8"
988
- }, _t = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, vt = /* @__PURE__ */ d({
1149
+ }, At = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, jt = /* @__PURE__ */ d({
989
1150
  __name: "PvTool",
990
- props: /* @__PURE__ */ p({
1151
+ props: /* @__PURE__ */ m({
991
1152
  defaultOpen: {
992
1153
  type: Boolean,
993
1154
  default: !1
@@ -1020,7 +1181,7 @@ var Xe = ["data-status"], Ze = {
1020
1181
  }),
1021
1182
  emits: ["update:open"],
1022
1183
  setup(e) {
1023
- let t = e, n = A(e, "open"), r = ["output-available", "output-error"];
1184
+ let t = e, n = M(e, "open"), r = ["output-available", "output-error"];
1024
1185
  (t.defaultOpen || r.includes(t.state)) && (n.value = !0);
1025
1186
  let l = i(() => ({
1026
1187
  "input-streaming": {
@@ -1060,9 +1221,9 @@ var Xe = ["data-status"], Ze = {
1060
1221
  return String(e);
1061
1222
  }
1062
1223
  }
1063
- return P(() => t.state, (e, t) => {
1224
+ return R(() => t.state, (e, t) => {
1064
1225
  e !== t && r.includes(e) && (n.value = !0);
1065
- }), (t, r) => (S(), a(X, {
1226
+ }), (t, r) => (w(), a(Z, {
1066
1227
  modelValue: n.value,
1067
1228
  "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
1068
1229
  "default-open": n.value,
@@ -1073,22 +1234,22 @@ var Xe = ["data-status"], Ze = {
1073
1234
  "enable-trigger-slot": "",
1074
1235
  "summary-classes": { "pv-inset-square-12": !0 }
1075
1236
  }, {
1076
- trigger: F(() => [c("span", lt, [
1237
+ trigger: z(() => [c("span", xt, [
1077
1238
  u(W, {
1078
1239
  name: "settings",
1079
1240
  size: 20
1080
1241
  }),
1081
- c("span", ut, E(e.toolName), 1),
1242
+ c("span", St, O(e.toolName), 1),
1082
1243
  c("span", {
1083
- class: g([l.value.className, "pv-tag-sm"]),
1244
+ class: _([l.value.className, "pv-tag-sm"]),
1084
1245
  role: "status"
1085
- }, E(l.value.label), 3)
1246
+ }, O(l.value.label), 3)
1086
1247
  ])]),
1087
- default: F(() => [c("div", dt, [c("div", ft, [t.$slots.input || e.input !== void 0 ? (S(), s("section", $, [r[1] ||= c("h3", { class: "pv-text-title-xs" }, "Parameters", -1), T(t.$slots, "input", { input: e.input }, () => [c("pre", pt, [c("code", null, E(d(e.input)), 1)])])])) : o("", !0), e.errorText ? (S(), s("section", mt, [r[2] ||= c("h3", { class: "pv-text-title-xs pv-text-critical" }, "Error", -1), c("pre", ht, E(e.errorText), 1)])) : t.$slots.output || e.output !== void 0 ? (S(), s("section", gt, [r[3] ||= c("h3", { class: "pv-text-title-xs" }, "Result", -1), T(t.$slots, "output", { output: e.output }, () => [c("pre", _t, [c("code", null, E(d(e.output)), 1)])])])) : o("", !0)])])]),
1248
+ default: z(() => [c("div", Ct, [c("div", wt, [t.$slots.input || e.input !== void 0 ? (w(), s("section", Tt, [r[1] ||= c("h3", { class: "pv-text-title-xs" }, "Parameters", -1), D(t.$slots, "input", { input: e.input }, () => [c("pre", Et, [c("code", null, O(d(e.input)), 1)])])])) : o("", !0), e.errorText ? (w(), s("section", Dt, [r[2] ||= c("h3", { class: "pv-text-title-xs pv-text-critical" }, "Error", -1), c("pre", Ot, O(e.errorText), 1)])) : t.$slots.output || e.output !== void 0 ? (w(), s("section", kt, [r[3] ||= c("h3", { class: "pv-text-title-xs" }, "Result", -1), D(t.$slots, "output", { output: e.output }, () => [c("pre", At, [c("code", null, O(d(e.output)), 1)])])])) : o("", !0)])])]),
1088
1249
  _: 3
1089
1250
  }, 8, ["modelValue", "default-open"]));
1090
1251
  }
1091
- }), yt = [
1252
+ }), Mt = [
1092
1253
  "input-streaming",
1093
1254
  "input-available",
1094
1255
  "approval-requested",
@@ -1099,8 +1260,8 @@ var Xe = ["data-status"], Ze = {
1099
1260
  ];
1100
1261
  //#endregion
1101
1262
  //#region src/components/ai/useStickToBottom.ts
1102
- function bt(e, t = {}) {
1103
- let n = t.threshold ?? 32, r = C(!0);
1263
+ function Nt(e, t = {}) {
1264
+ let n = t.threshold ?? 32, r = T(!0);
1104
1265
  function i() {
1105
1266
  let t = e.value;
1106
1267
  t && (r.value = t.scrollHeight - t.scrollTop - t.clientHeight <= n);
@@ -1131,14 +1292,14 @@ function bt(e, t = {}) {
1131
1292
  e.removeEventListener("scroll", t), s.forEach((e) => e.disconnect());
1132
1293
  };
1133
1294
  }
1134
- return P(e, (e) => {
1295
+ return R(e, (e) => {
1135
1296
  o?.(), o = void 0, e && s(e);
1136
- }, { immediate: !0 }), x(() => o?.()), {
1297
+ }, { immediate: !0 }), C(() => o?.()), {
1137
1298
  isAtBottom: r,
1138
1299
  scrollToBottom: a
1139
1300
  };
1140
1301
  }
1141
1302
  //#endregion
1142
- export { je as PvConfirmation, Ve as PvPromptInput, Te as PvQuestion, ct as PvReasoning, Q as PvStepList, vt as PvTool, He as promptInputStatuses, yt as toolLifecycleStates, bt as useStickToBottom };
1303
+ export { Be as PvConfirmation, ot as PvPromptInput, Pe as PvQuestion, bt as PvReasoning, Q as PvStepList, jt as PvTool, st as promptInputStatuses, Mt as toolLifecycleStates, Nt as useStickToBottom };
1143
1304
 
1144
1305
  //# sourceMappingURL=pv-components-ai.mjs.map