@burdenoff/microfe-healthybowl 2026.629.6 → 2026.629.7

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.
@@ -9,32 +9,33 @@ var o = ({ onSend: o, disabled: s = !1, placeholder: c = "Ask anything...", tool
9
9
  if (!e) return;
10
10
  let t = e.value.trim();
11
11
  !t || s || (o(t), e.value = "", e.style.height = "auto");
12
- }, [o, s]);
12
+ }, [o, s]), p = t((e) => {
13
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), f());
14
+ }, [f]), m = t(() => {
15
+ let e = d.current;
16
+ e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 140)}px`);
17
+ }, []);
13
18
  return /* @__PURE__ */ i("div", {
14
19
  className: "px-4 pb-4 pt-2",
15
20
  children: /* @__PURE__ */ a("div", {
16
- className: "rounded-2xl border border-border-default bg-bg-sunken shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15",
17
- children: [/* @__PURE__ */ i("textarea", {
18
- ref: d,
19
- onKeyDown: t((e) => {
20
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), f());
21
- }, [f]),
22
- onInput: t(() => {
23
- let e = d.current;
24
- e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 140)}px`);
25
- }, []),
26
- disabled: s,
27
- placeholder: c,
28
- rows: 1,
29
- className: "w-full resize-none bg-transparent px-4 pb-1.5 pt-3.5 text-[13px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50",
30
- "aria-label": u("healthybowl.assistant.chatInput.ariaLabel", "Message input"),
31
- "data-testid": "assistant-input"
32
- }), /* @__PURE__ */ a("div", {
33
- className: "flex items-center justify-between gap-2 px-2.5 pb-2.5 pt-1",
34
- children: [/* @__PURE__ */ i("div", {
35
- className: "flex min-w-0 items-center gap-1.5",
21
+ className: "flex items-center gap-1 rounded-[26px] border border-border-default bg-bg-sunken py-1.5 pl-2 pr-2 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15",
22
+ children: [
23
+ l ? /* @__PURE__ */ i("div", {
24
+ className: "flex flex-shrink-0 items-center gap-1",
36
25
  children: l
37
- }), /* @__PURE__ */ i("button", {
26
+ }) : null,
27
+ /* @__PURE__ */ i("textarea", {
28
+ ref: d,
29
+ onKeyDown: p,
30
+ onInput: m,
31
+ disabled: s,
32
+ placeholder: c,
33
+ rows: 1,
34
+ className: "min-w-0 flex-1 resize-none bg-transparent px-2 py-1.5 text-[13px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50",
35
+ "aria-label": u("healthybowl.assistant.chatInput.ariaLabel", "Message input"),
36
+ "data-testid": "assistant-input"
37
+ }),
38
+ /* @__PURE__ */ i("button", {
38
39
  type: "button",
39
40
  onClick: f,
40
41
  disabled: s,
@@ -42,8 +43,8 @@ var o = ({ onSend: o, disabled: s = !1, placeholder: c = "Ask anything...", tool
42
43
  "aria-label": u("healthybowl.assistant.chatInput.send", "Send message"),
43
44
  "data-testid": "assistant-send",
44
45
  children: /* @__PURE__ */ i(r, { className: "size-4" })
45
- })]
46
- })]
46
+ })
47
+ ]
47
48
  })
48
49
  });
49
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantChatInput.js","names":[],"sources":["../../../src/components/assistant/AssistantChatInput.tsx"],"sourcesContent":["import { useRef, useCallback, type FC, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\n\ninterface Props {\n onSend: (message: string) => void;\n disabled?: boolean;\n placeholder?: string;\n /** Rendered inline on the left of the composer toolbar (e.g. the mode chip). */\n toolbarStart?: ReactNode;\n}\n\n/**\n * Composer — a single rounded \"card\" (Google-Stitch-style) holding the textarea\n * with an inline bottom toolbar: contextual controls on the left (mode chip) and\n * a circular send up-arrow on the right. The whole card lifts its border on\n * focus. Uses HB semantic tokens only.\n */\nexport const AssistantChatInput: FC<Props> = ({\n onSend,\n disabled = false,\n placeholder = 'Ask anything...',\n toolbarStart,\n}) => {\n const tr = useTr();\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const handleSend = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n const value = textarea.value.trim();\n if (!value || disabled) return;\n\n onSend(value);\n textarea.value = '';\n textarea.style.height = 'auto';\n }, [onSend, disabled]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend]\n );\n\n const handleInput = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n textarea.style.height = 'auto';\n textarea.style.height = `${Math.min(textarea.scrollHeight, 140)}px`;\n }, []);\n\n return (\n <div className=\"px-4 pb-4 pt-2\">\n <div className=\"rounded-2xl border border-border-default bg-bg-sunken shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15\">\n <textarea\n ref={textareaRef}\n onKeyDown={handleKeyDown}\n onInput={handleInput}\n disabled={disabled}\n placeholder={placeholder}\n rows={1}\n className=\"w-full resize-none bg-transparent px-4 pb-1.5 pt-3.5 text-[13px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50\"\n aria-label={tr('healthybowl.assistant.chatInput.ariaLabel', 'Message input')}\n data-testid=\"assistant-input\"\n />\n <div className=\"flex items-center justify-between gap-2 px-2.5 pb-2.5 pt-1\">\n <div className=\"flex min-w-0 items-center gap-1.5\">{toolbarStart}</div>\n <button\n type=\"button\"\n onClick={handleSend}\n disabled={disabled}\n className=\"flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text shadow-sm transition-all hover:bg-action-primary-bg-hover hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:scale-100 disabled:opacity-40\"\n aria-label={tr('healthybowl.assistant.chatInput.send', 'Send message')}\n data-testid=\"assistant-send\"\n >\n <ArrowUp className=\"size-4\" />\n </button>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAkBA,IAAa,KAAiC,EAC5C,WACA,cAAW,IACX,iBAAc,mBACd,sBACI;CACJ,IAAM,IAAK,GAAO,EACZ,IAAc,EAA4B,KAAK,EAE/C,IAAa,QAAkB;EACnC,IAAM,IAAW,EAAY;AAC7B,MAAI,CAAC,EAAU;EAEf,IAAM,IAAQ,EAAS,MAAM,MAAM;AAC/B,GAAC,KAAS,MAEd,EAAO,EAAM,EACb,EAAS,QAAQ,IACjB,EAAS,MAAM,SAAS;IACvB,CAAC,GAAQ,EAAS,CAAC;AAmBtB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,YAAD;IACE,KAAK;IACL,WAtBc,GACnB,MAA0C;AACzC,KAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,aAC1B,EAAE,gBAAgB,EAClB,GAAY;OAGhB,CAAC,EAAW,CACb;IAeO,SAbY,QAAkB;KACpC,IAAM,IAAW,EAAY;AACxB,WACL,EAAS,MAAM,SAAS,QACxB,EAAS,MAAM,SAAS,GAAG,KAAK,IAAI,EAAS,cAAc,IAAI,CAAC;OAC/D,EAAE,CAAC;IASY;IACG;IACb,MAAM;IACN,WAAU;IACV,cAAY,EAAG,6CAA6C,gBAAgB;IAC5E,eAAY;IACZ,CAAA,EACF,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAqC;KAAmB,CAAA,EACvE,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACC;KACV,WAAU;KACV,cAAY,EAAG,wCAAwC,eAAe;KACtE,eAAY;eAEZ,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;KACvB,CAAA,CACL;MACF;;EACF,CAAA"}
1
+ {"version":3,"file":"AssistantChatInput.js","names":[],"sources":["../../../src/components/assistant/AssistantChatInput.tsx"],"sourcesContent":["import { useRef, useCallback, type FC, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp } from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\n\ninterface Props {\n onSend: (message: string) => void;\n disabled?: boolean;\n placeholder?: string;\n /** Rendered inline on the left of the composer toolbar (e.g. the mode chip). */\n toolbarStart?: ReactNode;\n}\n\n/**\n * Composer — a single rounded \"card\" (Google-Stitch-style) holding the textarea\n * with an inline bottom toolbar: contextual controls on the left (mode chip) and\n * a circular send up-arrow on the right. The whole card lifts its border on\n * focus. Uses HB semantic tokens only.\n */\nexport const AssistantChatInput: FC<Props> = ({\n onSend,\n disabled = false,\n placeholder = 'Ask anything...',\n toolbarStart,\n}) => {\n const tr = useTr();\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const handleSend = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n const value = textarea.value.trim();\n if (!value || disabled) return;\n\n onSend(value);\n textarea.value = '';\n textarea.style.height = 'auto';\n }, [onSend, disabled]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend]\n );\n\n const handleInput = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n textarea.style.height = 'auto';\n textarea.style.height = `${Math.min(textarea.scrollHeight, 140)}px`;\n }, []);\n\n return (\n <div className=\"px-4 pb-4 pt-2\">\n {/* Single-row rounded \"pill\" composer (Google-Gemini style): the mode chip\n on the left, the input in the middle, a circular send on the right. */}\n <div className=\"flex items-center gap-1 rounded-[26px] border border-border-default bg-bg-sunken py-1.5 pl-2 pr-2 shadow-sm transition-all focus-within:border-action-primary-bg focus-within:shadow-md focus-within:ring-2 focus-within:ring-action-primary-bg/15\">\n {toolbarStart ? <div className=\"flex flex-shrink-0 items-center gap-1\">{toolbarStart}</div> : null}\n <textarea\n ref={textareaRef}\n onKeyDown={handleKeyDown}\n onInput={handleInput}\n disabled={disabled}\n placeholder={placeholder}\n rows={1}\n className=\"min-w-0 flex-1 resize-none bg-transparent px-2 py-1.5 text-[13px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50\"\n aria-label={tr('healthybowl.assistant.chatInput.ariaLabel', 'Message input')}\n data-testid=\"assistant-input\"\n />\n <button\n type=\"button\"\n onClick={handleSend}\n disabled={disabled}\n className=\"flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text shadow-sm transition-all hover:bg-action-primary-bg-hover hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:scale-100 disabled:opacity-40\"\n aria-label={tr('healthybowl.assistant.chatInput.send', 'Send message')}\n data-testid=\"assistant-send\"\n >\n <ArrowUp className=\"size-4\" />\n </button>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAkBA,IAAa,KAAiC,EAC5C,WACA,cAAW,IACX,iBAAc,mBACd,sBACI;CACJ,IAAM,IAAK,GAAO,EACZ,IAAc,EAA4B,KAAK,EAE/C,IAAa,QAAkB;EACnC,IAAM,IAAW,EAAY;AAC7B,MAAI,CAAC,EAAU;EAEf,IAAM,IAAQ,EAAS,MAAM,MAAM;AAC/B,GAAC,KAAS,MAEd,EAAO,EAAM,EACb,EAAS,QAAQ,IACjB,EAAS,MAAM,SAAS;IACvB,CAAC,GAAQ,EAAS,CAAC,EAEhB,IAAgB,GACnB,MAA0C;AACzC,EAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,aAC1B,EAAE,gBAAgB,EAClB,GAAY;IAGhB,CAAC,EAAW,CACb,EAEK,IAAc,QAAkB;EACpC,IAAM,IAAW,EAAY;AACxB,QACL,EAAS,MAAM,SAAS,QACxB,EAAS,MAAM,SAAS,GAAG,KAAK,IAAI,EAAS,cAAc,IAAI,CAAC;IAC/D,EAAE,CAAC;AAEN,QACE,kBAAC,OAAD;EAAK,WAAU;YAGb,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG,IAAe,kBAAC,OAAD;KAAK,WAAU;eAAyC;KAAmB,CAAA,GAAG;IAC9F,kBAAC,YAAD;KACE,KAAK;KACL,WAAW;KACX,SAAS;KACC;KACG;KACb,MAAM;KACN,WAAU;KACV,cAAY,EAAG,6CAA6C,gBAAgB;KAC5E,eAAY;KACZ,CAAA;IACF,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACC;KACV,WAAU;KACV,cAAY,EAAG,wCAAwC,eAAe;KACtE,eAAY;eAEZ,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;KACvB,CAAA;IACL;;EACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-healthybowl",
3
- "version": "2026.629.6",
3
+ "version": "2026.629.7",
4
4
  "description": "Burdenoff HealthyBowl Microfrontend - Comprehensive organic farming and agro-foods management platform",
5
5
  "type": "module",
6
6
  "files": [