@turquoisehealth/pit-viper 2.255.1 → 2.256.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.
- package/_site/assets/css/pit-viper-a11y-v3.css +20 -11
- package/_site/assets/css/pit-viper-a11y.css +20 -11
- package/_site/assets/css/pit-viper-consumer.css +20 -11
- package/_site/assets/css/pit-viper-v2-scoped.css +17 -11
- package/_site/assets/css/pit-viper-v2.css +20 -11
- package/_site/assets/css/pit-viper-v3.css +20 -11
- package/_site/assets/css/pit-viper.css +20 -11
- package/package.json +1 -1
- package/pv-components/dist/stats/vue/ai/stats.html +1 -1
- package/pv-components/dist/stats/web/pv-prompt-input-stats.html +1 -1
- package/pv-components/dist/vue/ai/components/ai/PvPromptInput/PvPromptInput.vue.d.ts +4 -1
- package/pv-components/dist/vue/ai/components/ai/PvPromptInput/types.d.ts +2 -0
- package/pv-components/dist/vue/ai/pv-components-ai.mjs +28 -22
- package/pv-components/dist/vue/ai/pv-components-ai.mjs.map +1 -1
- package/pv-components/dist/web/components/pv-prompt-input/pv-prompt-input.js +28 -22
- package/pv-components/dist/web/pv-components.iife.js +1 -1
- package/pv-components/dist/web/pv-components.iife.js.map +1 -1
|
@@ -266,6 +266,7 @@ var N = [
|
|
|
266
266
|
default: "200px",
|
|
267
267
|
type: String
|
|
268
268
|
},
|
|
269
|
+
maxLength: { type: Number },
|
|
269
270
|
placeholder: {
|
|
270
271
|
default: "Ask anything...",
|
|
271
272
|
type: String
|
|
@@ -291,53 +292,58 @@ var N = [
|
|
|
291
292
|
modelModifiers: {}
|
|
292
293
|
}),
|
|
293
294
|
emits: /* @__PURE__ */ d(["submit", "stop"], ["update:modelValue"]),
|
|
294
|
-
setup(n, {
|
|
295
|
-
let
|
|
296
|
-
function
|
|
297
|
-
|
|
295
|
+
setup(n, { expose: c, emit: l }) {
|
|
296
|
+
let u = n, d = l, f = C(n, "modelValue"), p = b(), m = t(() => u.status === "submitted" || u.status === "streaming"), g = t(() => !u.disabled && !m.value && f.value.trim().length > 0);
|
|
297
|
+
function v() {
|
|
298
|
+
g.value && d("submit", f.value.trim());
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
300
|
+
function y() {
|
|
301
|
+
p.value?.querySelector("textarea")?.focus();
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
303
|
+
function S(e) {
|
|
304
|
+
u.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || y();
|
|
304
305
|
}
|
|
305
|
-
|
|
306
|
+
function w(e) {
|
|
307
|
+
e.key !== "Enter" || e.shiftKey || e.isComposing || (e.preventDefault(), e.stopPropagation(), v());
|
|
308
|
+
}
|
|
309
|
+
return c({ focus: y }), (t, c) => (_(), i("form", {
|
|
306
310
|
ref_key: "formRef",
|
|
307
|
-
ref:
|
|
311
|
+
ref: p,
|
|
308
312
|
class: "pv-prompt-input pv-bordered pv-radius pv-inset-square-8 pv-flex-vertical",
|
|
309
313
|
"data-testid": "pv-prompt-input",
|
|
310
|
-
"aria-busy":
|
|
311
|
-
onSubmit: D(
|
|
312
|
-
onClick:
|
|
314
|
+
"aria-busy": m.value,
|
|
315
|
+
onSubmit: D(v, ["prevent"]),
|
|
316
|
+
onClick: S
|
|
313
317
|
}, [
|
|
314
318
|
t.$slots.header ? (_(), i("div", de, [x(t.$slots, "header")])) : r("v-if", !0),
|
|
315
319
|
s(le, {
|
|
316
|
-
modelValue:
|
|
317
|
-
"onUpdate:modelValue": c[0] ||= (e) =>
|
|
320
|
+
modelValue: f.value,
|
|
321
|
+
"onUpdate:modelValue": c[0] ||= (e) => f.value = e,
|
|
318
322
|
class: "pv-prompt-input-textarea",
|
|
319
323
|
style: h({ "--prompt-input-max-height": n.maxHeight }),
|
|
320
324
|
rows: n.rows,
|
|
325
|
+
maxlength: n.maxLength,
|
|
321
326
|
placeholder: n.placeholder,
|
|
322
327
|
disabled: n.disabled,
|
|
323
328
|
"aria-label": n.ariaLabel,
|
|
324
|
-
onKeydown:
|
|
329
|
+
onKeydown: w
|
|
325
330
|
}, null, 8, [
|
|
326
331
|
"modelValue",
|
|
327
332
|
"style",
|
|
328
333
|
"rows",
|
|
334
|
+
"maxlength",
|
|
329
335
|
"placeholder",
|
|
330
336
|
"disabled",
|
|
331
337
|
"aria-label"
|
|
332
338
|
]),
|
|
333
339
|
a("div", fe, [a("div", pe, [x(t.$slots, "actions")]), s(ae, {
|
|
334
|
-
type:
|
|
335
|
-
variant:
|
|
340
|
+
type: m.value ? "button" : "submit",
|
|
341
|
+
variant: m.value ? "secondary" : "primary",
|
|
336
342
|
size: "md",
|
|
337
|
-
"left-icon":
|
|
338
|
-
"aria-label":
|
|
339
|
-
disabled: n.disabled || !
|
|
340
|
-
onClick: c[1] ||= (e) =>
|
|
343
|
+
"left-icon": m.value ? "stop" : "send",
|
|
344
|
+
"aria-label": m.value ? n.stopLabel : n.submitLabel,
|
|
345
|
+
disabled: n.disabled || !m.value && !g.value,
|
|
346
|
+
onClick: c[1] ||= (e) => m.value && d("stop")
|
|
341
347
|
}, null, 8, [
|
|
342
348
|
"type",
|
|
343
349
|
"variant",
|