@turquoisehealth/pit-viper 2.255.0 → 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.
@@ -3151,9 +3151,6 @@ var fr = /* @__PURE__ */ new Set(), pr = (e, t) => {
3151
3151
  if (!c.filter.isOpen || D.value || c.filter.singleSelect) return;
3152
3152
  let e = new Set(me.value.flatMap((e) => e.kind === "option" ? [e.option.value] : [])), t = j.value.filter((t) => !W.value.has(t) && !e.has(t));
3153
3153
  t.length && (ce.value = [...ce.value, ...t]);
3154
- }), H(() => c.filter.searchQuery, (e) => {
3155
- let t = e ?? "";
3156
- t !== g.value && (g.value = t);
3157
3154
  }), Je(g, (e) => {
3158
3155
  if (!E.value || c.filter.disabled === !0) return;
3159
3156
  let t = e.trim();
@@ -3398,7 +3395,7 @@ var fr = /* @__PURE__ */ new Set(), pr = (e, t) => {
3398
3395
  "onUpdate:modelValue": Me
3399
3396
  }, null, 8, ["disabled", "modelValue"]), s("span", _a, L(y.value), 1)])) : a("v-if", !0)], 12, ea)], 40, Xi));
3400
3397
  }
3401
- }), [["styles", ["summary[data-v-0b991fa5]{background-image:none;padding-right:2px}[data-v-0b991fa5] .pv-input-search{background-color:#fff}.suggested-title-label[data-v-0b991fa5]{text-underline-offset:2px;text-decoration:underline dotted}.pv-filter-panel-refresh-status[data-v-0b991fa5]{margin-left:auto;display:inline-flex}"]], ["__scopeId", "data-v-0b991fa5"]]), xa = ["data-style"], Sa = /* @__PURE__ */ d({
3398
+ }), [["styles", ["summary[data-v-1bc7f614]{background-image:none;padding-right:2px}[data-v-1bc7f614] .pv-input-search{background-color:#fff}.suggested-title-label[data-v-1bc7f614]{text-underline-offset:2px;text-decoration:underline dotted}.pv-filter-panel-refresh-status[data-v-1bc7f614]{margin-left:auto;display:inline-flex}"]], ["__scopeId", "data-v-1bc7f614"]]), xa = ["data-style"], Sa = /* @__PURE__ */ d({
3402
3399
  __name: "PvTag",
3403
3400
  props: {
3404
3401
  size: {
@@ -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, { emit: c }) {
295
- let l = n, u = c, d = C(n, "modelValue"), f = b(), p = t(() => l.status === "submitted" || l.status === "streaming"), m = t(() => !l.disabled && !p.value && d.value.trim().length > 0);
296
- function g() {
297
- m.value && u("submit", d.value.trim());
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 v(e) {
300
- l.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || f.value?.querySelector("textarea")?.focus();
300
+ function y() {
301
+ p.value?.querySelector("textarea")?.focus();
301
302
  }
302
- function y(e) {
303
- e.key !== "Enter" || e.shiftKey || e.isComposing || (e.preventDefault(), e.stopPropagation(), g());
303
+ function S(e) {
304
+ u.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || y();
304
305
  }
305
- return (t, c) => (_(), i("form", {
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: f,
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": p.value,
311
- onSubmit: D(g, ["prevent"]),
312
- onClick: v
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: d.value,
317
- "onUpdate:modelValue": c[0] ||= (e) => d.value = 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: y
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: p.value ? "button" : "submit",
335
- variant: p.value ? "secondary" : "primary",
340
+ type: m.value ? "button" : "submit",
341
+ variant: m.value ? "secondary" : "primary",
336
342
  size: "md",
337
- "left-icon": p.value ? "stop" : "send",
338
- "aria-label": p.value ? n.stopLabel : n.submitLabel,
339
- disabled: n.disabled || !p.value && !m.value,
340
- onClick: c[1] ||= (e) => p.value && u("stop")
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",