@spear-ai/spectral 1.3.66 → 1.3.67

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/dist/Input.d.ts CHANGED
@@ -5,7 +5,6 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onC
5
5
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
6
6
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
7
7
  onChange?: (value: string) => void;
8
- onValueChange?: (value: string) => void;
9
8
  readonly className?: string;
10
9
  readonly clearOnFocus?: boolean;
11
10
  readonly placeholder?: string;
@@ -21,7 +20,6 @@ export declare const Input: import('react').ForwardRefExoticComponent<Omit<Input
21
20
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
22
21
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
23
22
  onChange?: (value: string) => void;
24
- onValueChange?: (value: string) => void;
25
23
  readonly className?: string;
26
24
  readonly clearOnFocus?: boolean;
27
25
  readonly placeholder?: string;
package/dist/Input.js CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
4
- import { usePasswordVisibility as tt, usePrefixWidth as rt, useClearOnFocus as et } from "./Input/InputUtils.js";
3
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
4
+ import { usePasswordVisibility as q, usePrefixWidth as tt, useClearOnFocus as rt } from "./Input/InputUtils.js";
5
5
  import "./Icons/AnalyzeIcon.js";
6
6
  import "./Icons/AnnotationsIcon.js";
7
7
  import "./Icons/ApprovedIcon.js";
8
8
  import "./Icons/CalendarIcon.js";
9
- import { CheckCircleIcon as ot } from "./Icons/CheckCircleIcon.js";
9
+ import { CheckCircleIcon as et } from "./Icons/CheckCircleIcon.js";
10
10
  import "./Icons/CheckSquareIcon.js";
11
11
  import "./Icons/CheckmarkIcon.js";
12
12
  import "./Icons/ChevronDownIcon.js";
13
13
  import "./Icons/ChevronUpIcon.js";
14
14
  import "./Icons/ClockIcon.js";
15
- import { CloseCircleIcon as it } from "./Icons/CloseCircleIcon.js";
15
+ import { CloseCircleIcon as ot } from "./Icons/CloseCircleIcon.js";
16
16
  import "./Icons/CloseIcon.js";
17
17
  import "./Icons/DashboardIcon.js";
18
18
  import "./Icons/DatabaseIcon.js";
@@ -20,10 +20,10 @@ import "./Icons/DeleteIcon.js";
20
20
  import "./Icons/DurationIcon.js";
21
21
  import "./Icons/EmailIcon.js";
22
22
  import "./Icons/EraserIcon.js";
23
- import { ErrorIcon as st } from "./Icons/ErrorIcon.js";
24
- import { EyeClosedIcon as at } from "./Icons/EyeClosedIcon.js";
23
+ import { ErrorIcon as it } from "./Icons/ErrorIcon.js";
24
+ import { EyeClosedIcon as st } from "./Icons/EyeClosedIcon.js";
25
25
  import "./Icons/EyeClosedIcon2.js";
26
- import { EyeOpenIcon as nt } from "./Icons/EyeOpenIcon.js";
26
+ import { EyeOpenIcon as at } from "./Icons/EyeOpenIcon.js";
27
27
  import "./Icons/GoToFirstIcon.js";
28
28
  import "./Icons/GoToLastIcon.js";
29
29
  import "./Icons/HarmonicCursorsIcon.js";
@@ -33,7 +33,7 @@ import "./Icons/LassoIcon.js";
33
33
  import "./Icons/LineToolIcon.js";
34
34
  import "./Icons/LineToolIcon2.js";
35
35
  import "./Icons/LiveViewIcon.js";
36
- import { LoaderIcon as pt } from "./Icons/LoaderIcon.js";
36
+ import { LoaderIcon as nt } from "./Icons/LoaderIcon.js";
37
37
  import "./Icons/LocationIcon.js";
38
38
  import "./Icons/LogoutIcon.js";
39
39
  import "./Icons/MessagesIcon.js";
@@ -59,11 +59,11 @@ import "./Icons/WarningIcon.js";
59
59
  import "./Icons/ZoomAllIcon.js";
60
60
  import "./Icons/ZoomXIcon.js";
61
61
  import "./Icons/ZoomYIcon.js";
62
- import { Label as lt } from "./Label.js";
63
- import { useFormFieldId as ct, getAriaProps as mt, getInputClasses as dt, useFormFieldState as ut, getFormFieldCSSProperties as ft, ErrorMessage as ht } from "./utils/formFieldUtils.js";
62
+ import { Label as pt } from "./Label.js";
63
+ import { useFormFieldId as lt, getAriaProps as ct, getInputClasses as mt, useFormFieldState as ut, getFormFieldCSSProperties as dt, ErrorMessage as ft } from "./utils/formFieldUtils.js";
64
64
  import { cn as f } from "./utils/twUtils.js";
65
- import { forwardRef as bt, useRef as xt, useCallback as c } from "react";
66
- const gt = (m) => ({
65
+ import { forwardRef as ht, useRef as bt, useCallback as c } from "react";
66
+ const xt = (m) => ({
67
67
  email: "email",
68
68
  password: "current-password",
69
69
  tel: "tel",
@@ -72,67 +72,66 @@ const gt = (m) => ({
72
72
  number: "off",
73
73
  date: "off",
74
74
  "datetime-local": "off"
75
- })[m] || "off", Ct = bt(
75
+ })[m] || "off", gt = ht(
76
76
  ({
77
77
  className: m,
78
78
  clearOnFocus: h = !1,
79
- disabled: P,
79
+ disabled: k,
80
80
  errorMessage: b,
81
- id: R,
82
- label: o,
81
+ id: P,
82
+ label: e,
83
83
  name: x,
84
84
  onBlur: g,
85
- onChange: C,
86
- onValueChange: a,
87
- onFocus: w,
88
- placeholder: S,
85
+ onChange: a,
86
+ onFocus: C,
87
+ placeholder: R,
89
88
  prefix: n,
90
- showClearButton: $ = !1,
91
- suppressHydrationWarning: L = !0,
89
+ showClearButton: S = !1,
90
+ suppressHydrationWarning: V = !0,
92
91
  state: i = "default",
93
92
  type: p = "text",
94
- value: v = "",
95
- required: y,
96
- startIcon: I,
97
- endIcon: N,
98
- "aria-label": M,
99
- "aria-describedby": O,
100
- ...j
101
- }, A) => {
102
- const l = ct(R, x), F = `${l}-error`, { isDisabled: E, isLoading: B, isInvalid: H } = ut(P, i), V = mt(i, y, F, O), W = xt(null), s = A || W, { isVisible: d, toggleVisibility: D, inputType: T } = tt(), { prefixWidth: G, prefixRef: J } = rt(n), { handleFocus: z } = et(
93
+ value: w = "",
94
+ required: v,
95
+ startIcon: y,
96
+ endIcon: I,
97
+ "aria-label": $,
98
+ "aria-describedby": L,
99
+ ...M
100
+ }, O) => {
101
+ const l = lt(P, x), N = `${l}-error`, { isDisabled: F, isLoading: j, isInvalid: A } = ut(k, i), B = ct(i, v, N, L), H = bt(null), s = O || H, { isVisible: u, toggleVisibility: W, inputType: D } = q(), { prefixWidth: T, prefixRef: G } = tt(n), { handleFocus: E } = rt(
103
102
  h,
104
103
  a ? (r) => a(r.target.value) : void 0
105
- ), K = c(
104
+ ), J = c(
106
105
  (r) => {
107
106
  g?.(r);
108
107
  },
109
108
  [g]
110
- ), Q = c(
109
+ ), K = c(
111
110
  (r) => {
112
- z(r, w);
111
+ E(r, C);
113
112
  },
114
- [z, w]
115
- ), U = c(
113
+ [E, C]
114
+ ), Q = c(
116
115
  (r) => {
117
- const e = r.target.value;
118
- C?.(e), a?.(e);
116
+ const o = r.target.value;
117
+ a?.(o);
119
118
  },
120
- [C, a]
121
- ), X = c(() => {
119
+ [a]
120
+ ), U = c(() => {
122
121
  s.current && (s.current.value = "", s.current.dispatchEvent(new Event("input", { bubbles: !0 })), s.current.focus());
123
- }, [s]), k = $ && v.length > 0, Y = () => {
124
- const r = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer", e = {
122
+ }, [s]), z = S && w.length > 0, X = () => {
123
+ const r = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer", o = {
125
124
  password: () => /* @__PURE__ */ t(
126
125
  "button",
127
126
  {
128
127
  className: r,
129
128
  type: "button",
130
- onClick: D,
131
- "aria-label": d ? `Hide ${o}` : `Show ${o}`,
132
- "aria-pressed": d,
129
+ onClick: W,
130
+ "aria-label": u ? `Hide ${e}` : `Show ${e}`,
131
+ "aria-pressed": u,
133
132
  "aria-controls": l,
134
133
  "data-testid": "input-password-toggle",
135
- children: d ? /* @__PURE__ */ t(at, { size: 22 }) : /* @__PURE__ */ t(nt, { size: 22 })
134
+ children: u ? /* @__PURE__ */ t(st, { size: 22 }) : /* @__PURE__ */ t(at, { size: 22 })
136
135
  }
137
136
  ),
138
137
  clear: () => /* @__PURE__ */ t(
@@ -140,75 +139,75 @@ const gt = (m) => ({
140
139
  {
141
140
  className: r,
142
141
  type: "button",
143
- onClick: X,
144
- "aria-label": `Clear ${o}`,
142
+ onClick: U,
143
+ "aria-label": `Clear ${e}`,
145
144
  "data-testid": "input-clear-button",
146
- children: /* @__PURE__ */ t(it, { size: 24 })
145
+ children: /* @__PURE__ */ t(ot, { size: 24 })
147
146
  }
148
147
  ),
149
- loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(pt, { size: 24 }) }),
150
- error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(st, { size: 24 }) }),
151
- success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(ot, { size: 24 }) })
148
+ loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(nt, { size: 24 }) }),
149
+ error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(it, { size: 24 }) }),
150
+ success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(et, { size: 24 }) })
152
151
  };
153
- return N || (p === "password" ? e.password() : k ? e.clear() : B ? e.loading() : i === "success" ? e.success() : i === "error" ? e.error() : null);
154
- }, Z = () => I || null, _ = f(
155
- dt(i, m),
152
+ return I || (p === "password" ? o.password() : z ? o.clear() : j ? o.loading() : i === "success" ? o.success() : i === "error" ? o.error() : null);
153
+ }, Y = () => y || null, Z = f(
154
+ mt(i, m),
156
155
  "[text-indent:var(--prefix-width)]",
157
- k && "pr-10"
158
- ), q = f(
156
+ z && "pr-10"
157
+ ), _ = f(
159
158
  "pointer-events-none absolute inset-y-0 left-4 flex items-center text-base text-input-text-prefix opacity-100 peer-disabled:opacity-50"
160
159
  );
161
- return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
162
- o && /* @__PURE__ */ t(
163
- lt,
160
+ return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
161
+ e && /* @__PURE__ */ t(
162
+ pt,
164
163
  {
165
164
  htmlFor: l,
166
165
  className: f(
167
166
  "mb-2 block",
168
- E && "text-input-text--disabled placeholder:text-input-text-placeholder cursor-not-allowed"
167
+ F && "text-input-text--disabled placeholder:text-input-text-placeholder cursor-not-allowed"
169
168
  ),
170
- children: o
169
+ children: e
171
170
  }
172
171
  ),
173
- /* @__PURE__ */ u("div", { className: "relative", "data-testid": "input-wrapper", children: [
174
- /* @__PURE__ */ u("div", { className: "relative", children: [
175
- Z(),
176
- n && /* @__PURE__ */ t("span", { ref: J, className: q, children: n }),
172
+ /* @__PURE__ */ d("div", { className: "relative", "data-testid": "input-wrapper", children: [
173
+ /* @__PURE__ */ d("div", { className: "relative", children: [
174
+ Y(),
175
+ n && /* @__PURE__ */ t("span", { ref: G, className: _, children: n }),
177
176
  /* @__PURE__ */ t(
178
177
  "input",
179
178
  {
180
179
  id: l,
181
180
  name: x,
182
181
  ref: s,
183
- type: p === "password" ? T : p,
184
- value: v,
185
- disabled: E,
186
- required: y,
187
- autoComplete: gt(p),
188
- className: _,
189
- onChange: U,
190
- onFocus: Q,
191
- onBlur: K,
192
- placeholder: S || o,
193
- suppressHydrationWarning: L,
194
- ...V,
195
- ...j,
182
+ type: p === "password" ? D : p,
183
+ value: w,
184
+ disabled: F,
185
+ required: v,
186
+ autoComplete: xt(p),
187
+ className: Z,
188
+ onChange: Q,
189
+ onFocus: K,
190
+ onBlur: J,
191
+ placeholder: R || e,
192
+ suppressHydrationWarning: V,
193
+ ...B,
194
+ ...M,
196
195
  "data-testid": "input-input",
197
196
  "data-state": i,
198
- style: ft({
199
- "--prefix-width": n ? `${G}px` : "0px"
197
+ style: dt({
198
+ "--prefix-width": n ? `${T}px` : "0px"
200
199
  }),
201
- "aria-label": M || o
200
+ "aria-label": $ || e
202
201
  }
203
202
  ),
204
- Y()
203
+ X()
205
204
  ] }),
206
- H && b && /* @__PURE__ */ t(ht, { id: F, message: b })
205
+ A && b && /* @__PURE__ */ t(ft, { id: N, message: b })
207
206
  ] })
208
207
  ] });
209
208
  }
210
209
  );
211
- Ct.displayName = "Input";
210
+ gt.displayName = "Input";
212
211
  export {
213
- Ct as Input
212
+ gt as Input
214
213
  };
@@ -2,7 +2,7 @@ import { ChangeEvent, ClipboardEvent, FocusEvent } from 'react';
2
2
  export type UseTextareaOptions = {
3
3
  maxLength: number;
4
4
  value: string;
5
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
5
+ onChange?: (value: string) => void;
6
6
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
7
7
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
8
  };
@@ -1,54 +1,47 @@
1
1
  "use client";
2
2
  import { useCallback as i } from "react";
3
- const v = (t, s, a) => {
4
- t.target.value.length <= s && a?.(t);
5
- }, V = (t, s, a, r) => {
6
- const c = t.clipboardData.getData("text"), o = s || "", n = t.currentTarget, l = n.selectionStart || 0, u = n.selectionEnd || 0, e = o.substring(0, l), d = o.substring(u);
7
- if ((e + c + d).length > a) {
3
+ const T = (t, n, s) => {
4
+ const a = t.target.value;
5
+ a.length <= n && s?.(a);
6
+ }, V = (t, n, s, a) => {
7
+ const r = t.clipboardData.getData("text"), c = n || "", o = t.currentTarget, l = o.selectionStart || 0, u = o.selectionEnd || 0, e = c.substring(0, l), d = c.substring(u);
8
+ if ((e + r + d).length > s) {
8
9
  t.preventDefault();
9
- const b = u - l, f = a - o.length + b, p = c.substring(0, Math.max(0, f)), g = e + p + d, T = {
10
- target: { value: g, name: n.name },
11
- currentTarget: { value: g, name: n.name },
12
- type: "change",
13
- preventDefault: () => {
14
- },
15
- stopPropagation: () => {
16
- }
17
- };
18
- r?.(T), setTimeout(() => {
19
- const h = l + p.length;
20
- n.setSelectionRange(h, h);
10
+ const g = u - l, h = s - c.length + g, p = r.substring(0, Math.max(0, h)), f = e + p + d;
11
+ a?.(f), setTimeout(() => {
12
+ const b = l + p.length;
13
+ o.setSelectionRange(b, b);
21
14
  }, 0);
22
15
  }
23
- }, m = ({ maxLength: t, value: s, onChange: a, onFocus: r, onBlur: c }) => {
24
- const o = i(
16
+ }, P = ({ maxLength: t, value: n, onChange: s, onFocus: a, onBlur: r }) => {
17
+ const c = i(
25
18
  (e) => {
26
- r?.(e);
19
+ a?.(e);
27
20
  },
28
- [r]
29
- ), n = i(
21
+ [a]
22
+ ), o = i(
30
23
  (e) => {
31
- c?.(e);
24
+ r?.(e);
32
25
  },
33
- [c]
26
+ [r]
34
27
  ), l = i(
35
28
  (e) => {
36
- v(e, t, a);
29
+ T(e, t, s);
37
30
  },
38
- [t, a]
31
+ [t, s]
39
32
  ), u = i(
40
33
  (e) => {
41
- V(e, s, t, a);
34
+ V(e, n, t, s);
42
35
  },
43
- [s, t, a]
36
+ [n, t, s]
44
37
  );
45
38
  return {
46
- handleFocus: o,
47
- handleBlur: n,
39
+ handleFocus: c,
40
+ handleBlur: o,
48
41
  handleChange: l,
49
42
  handlePaste: u
50
43
  };
51
44
  };
52
45
  export {
53
- m as useTextarea
46
+ P as useTextarea
54
47
  };
@@ -1,9 +1,9 @@
1
1
  import { FormFieldState } from '../../utils/formFieldUtils';
2
- import { ChangeEvent, ComponentProps, FocusEvent } from 'react';
2
+ import { ComponentProps, FocusEvent } from 'react';
3
3
  export type TextareaState = FormFieldState;
4
- export type TextareaProps = ComponentProps<'textarea'> & {
4
+ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'onChange'> & {
5
5
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
6
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
6
+ onChange?: (value: string) => void;
7
7
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
8
  readonly className?: string | undefined;
9
9
  readonly errorMessage?: string | undefined;
@@ -5,7 +5,6 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onC
5
5
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
6
6
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
7
7
  onChange?: (value: string) => void;
8
- onValueChange?: (value: string) => void;
9
8
  readonly className?: string;
10
9
  readonly clearOnFocus?: boolean;
11
10
  readonly placeholder?: string;
@@ -21,7 +20,6 @@ export declare const Input: import('react').ForwardRefExoticComponent<Omit<Input
21
20
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
22
21
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
23
22
  onChange?: (value: string) => void;
24
- onValueChange?: (value: string) => void;
25
23
  readonly className?: string;
26
24
  readonly clearOnFocus?: boolean;
27
25
  readonly placeholder?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAML,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,gBAAgB,CAAA;AAE5G,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,IAAI,GAAG,UAAU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L,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI;cACxC,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI;eACxC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;yBACb,MAAM;4BACH,OAAO;2BACR,MAAM;sBACX,MAAM;+BACG,OAAO;wCACE,OAAO;oBAC3B,SAAS;yBACJ,YAAY;uBACd,YAAY;YACvB,MAAM;oDA2NjB,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { FormFieldState } from '../../utils/formFieldUtils';
2
- import { ChangeEvent, ComponentProps, FocusEvent } from 'react';
2
+ import { ComponentProps, FocusEvent } from 'react';
3
3
  export type TextareaState = FormFieldState;
4
- export type TextareaProps = ComponentProps<'textarea'> & {
4
+ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'onChange'> & {
5
5
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
6
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
6
+ onChange?: (value: string) => void;
7
7
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
8
  readonly className?: string | undefined;
9
9
  readonly errorMessage?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EAEnB,KAAK,UAAU,EAEhB,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,aAAa,GAAG,cAAc,CAAA;AAI1C,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG;IACvD,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,C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,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAeD,eAAO,MAAM,QAAQ,4HA2GpB,CAAA"}
@@ -2,7 +2,7 @@ import { ChangeEvent, ClipboardEvent, FocusEvent } from 'react';
2
2
  export type UseTextareaOptions = {
3
3
  maxLength: number;
4
4
  value: string;
5
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
5
+ onChange?: (value: string) => void;
6
6
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
7
7
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/TextareaUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAe,MAAM,OAAO,CAAA;AAE3F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA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AE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACzD,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACxD,YAAY,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IAC3D,WAAW,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;CAC9D,CAAA;AA6DD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,iDAAiD,kBAAkB,KAAG,iBAmCjG,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.3.66",
3
+ "version": "1.3.67",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {