@ada-cx/lovelace 1.9.2 → 1.11.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 (67) hide show
  1. package/dist/components/AgentMessage/AgentMessage.css.d.ts +0 -1
  2. package/dist/components/AgentMessage/AgentMessage.css.js +2 -2
  3. package/dist/components/AgentMessage/AgentMessage.css.js.map +1 -1
  4. package/dist/components/AgentMessage/AgentMessage.d.ts +19 -12
  5. package/dist/components/AgentMessage/AgentMessage.js +9 -17
  6. package/dist/components/AgentMessage/AgentMessage.js.map +1 -1
  7. package/dist/components/Avatar/Avatar.css.d.ts +8 -8
  8. package/dist/components/Button/Button.css.d.ts +14 -14
  9. package/dist/components/Checkbox/Checkbox.css.d.ts +1 -1
  10. package/dist/components/Checkbox/Checkbox.css.js.map +1 -1
  11. package/dist/components/Chip/Chip.css.d.ts +4 -4
  12. package/dist/components/Dialog/Dialog.css.d.ts +2 -2
  13. package/dist/components/Divider/Divider.css.d.ts +2 -2
  14. package/dist/components/IconButton/IconButton.css.d.ts +14 -14
  15. package/dist/components/Link/Link.d.ts +7 -0
  16. package/dist/components/Link/Link.js.map +1 -1
  17. package/dist/components/MenuItem/MenuItem.css.js.map +1 -1
  18. package/dist/components/MessageError/MessageError.css.d.ts +5 -0
  19. package/dist/components/MessageError/MessageError.css.js +7 -0
  20. package/dist/components/MessageError/MessageError.css.js.map +1 -0
  21. package/dist/components/MessageError/MessageError.d.ts +38 -0
  22. package/dist/components/MessageError/MessageError.js +38 -0
  23. package/dist/components/MessageError/MessageError.js.map +1 -0
  24. package/dist/components/MessageError/index.d.ts +1 -0
  25. package/dist/components/MessageProse/MessageProse.css.d.ts +20 -0
  26. package/dist/components/MessageProse/MessageProse.css.js +7 -0
  27. package/dist/components/MessageProse/MessageProse.css.js.map +1 -0
  28. package/dist/components/MessageProse/MessageProse.d.ts +25 -0
  29. package/dist/components/MessageProse/MessageProse.js +17 -0
  30. package/dist/components/MessageProse/MessageProse.js.map +1 -0
  31. package/dist/components/MessageProse/index.d.ts +2 -0
  32. package/dist/components/MessageRow/MessageRow.context.d.ts +5 -0
  33. package/dist/components/MessageRow/MessageRow.context.js +7 -0
  34. package/dist/components/MessageRow/MessageRow.context.js.map +1 -0
  35. package/dist/components/MessageRow/MessageRow.css.d.ts +29 -0
  36. package/dist/components/MessageRow/MessageRow.css.js +39 -0
  37. package/dist/components/MessageRow/MessageRow.css.js.map +1 -0
  38. package/dist/components/MessageRow/MessageRow.d.ts +8 -0
  39. package/dist/components/MessageRow/MessageRow.js +8 -0
  40. package/dist/components/MessageRow/MessageRow.js.map +1 -0
  41. package/dist/components/MessageRow/MessageRowContent.d.ts +20 -0
  42. package/dist/components/MessageRow/MessageRowContent.js +21 -0
  43. package/dist/components/MessageRow/MessageRowContent.js.map +1 -0
  44. package/dist/components/MessageRow/MessageRowRoot.d.ts +23 -0
  45. package/dist/components/MessageRow/MessageRowRoot.js +19 -0
  46. package/dist/components/MessageRow/MessageRowRoot.js.map +1 -0
  47. package/dist/components/MessageRow/index.d.ts +2 -0
  48. package/dist/components/PictureMessage/PictureMessage.css.d.ts +2 -2
  49. package/dist/components/Radio/Radio.css.d.ts +1 -1
  50. package/dist/components/Radio/Radio.css.js.map +1 -1
  51. package/dist/components/ScrollMarker/ScrollMarker.css.d.ts +6 -6
  52. package/dist/components/Spinner/Spinner.css.d.ts +2 -2
  53. package/dist/components/ToastNotification/ToastNotification.css.d.ts +6 -6
  54. package/dist/components/UserMessage/UserMessage.css.d.ts +0 -5
  55. package/dist/components/UserMessage/UserMessage.css.js +2 -2
  56. package/dist/components/UserMessage/UserMessage.css.js.map +1 -1
  57. package/dist/components/UserMessage/UserMessage.d.ts +10 -12
  58. package/dist/components/UserMessage/UserMessage.js +12 -38
  59. package/dist/components/UserMessage/UserMessage.js.map +1 -1
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.js +28 -26
  62. package/dist/style.css +1 -1
  63. package/dist/styles/{row.d.ts → control-row.d.ts} +3 -3
  64. package/dist/tokens/generated/tokens.d.ts +1 -1
  65. package/dist/tokens/tokens.d.ts +2 -2
  66. package/dist/tokens.css +6 -0
  67. package/package.json +1 -1
@@ -1,2 +1 @@
1
- export declare const agentMessageRoot: string;
2
1
  export declare const agentMessageBody: string;
@@ -1,7 +1,7 @@
1
1
  /* empty css */
2
2
  //#region src/components/AgentMessage/AgentMessage.css.ts
3
- var e = "_1xn6t060", t = "_1xn6t061";
3
+ var e = "_1xn6t060";
4
4
  //#endregion
5
- export { t as agentMessageBody, e as agentMessageRoot };
5
+ export { e as agentMessageBody };
6
6
 
7
7
  //# sourceMappingURL=AgentMessage.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentMessage.css.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// `row` follows the ambient inline direction, so the avatar leads on the left\n// in LTR and trails on the right under `[dir=\"rtl\"]` — no per-direction variant.\nexport const agentMessageRoot = style({\n\tdisplay: \"flex\",\n\talignItems: \"flex-start\",\n\tgap: t(\"gap-12\"),\n});\n\nexport const agentMessageBody = style({\n\tmargin: 0,\n\tflex: \"1 0 0\",\n\tminWidth: 0,\n\t// Match the Figma message frame: a 24px minimum row, single lines centered\n\t// against it so short text aligns with the avatar. Keep in sync with the\n\t// Avatar `sm` size (`Avatar.css.ts`); there is no shared `avatar-size-*`\n\t// token yet.\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"center\",\n\tminHeight: \"24px\",\n\t// `start` follows the text's resolved direction (see `dir=\"auto\"` on the\n\t// element), keeping mixed-direction content aligned to its own edge.\n\ttextAlign: \"start\",\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\toverflowWrap: \"anywhere\",\n\twordBreak: \"break-word\",\n});\n"],"mappings":""}
1
+ {"version":3,"file":"AgentMessage.css.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\n\nexport const agentMessageBody = style({\n\tminWidth: 0,\n\t// Match the Figma message frame: a 24px minimum row, single lines centered\n\t// against it so short text aligns with the avatar. Keep in sync with the\n\t// Avatar `sm` size (`Avatar.css.ts`); there is no shared `avatar-size-*`\n\t// token yet.\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"center\",\n\tminHeight: \"24px\",\n\t// `start` follows the text's resolved direction (see `dir=\"auto\"` on the\n\t// element), keeping mixed-direction content aligned to its own edge.\n\ttextAlign: \"start\",\n});\n"],"mappings":""}
@@ -1,21 +1,28 @@
1
1
  import type { CSSProperties, ReactNode, Ref } from "react";
2
2
  export interface AgentMessageProps {
3
- /** Monogram shown in the agent avatar bubble. */
4
- initials?: string;
5
3
  className?: string;
6
4
  style?: CSSProperties;
7
5
  ref?: Ref<HTMLDivElement>;
8
- /** The agent's message text. */
6
+ /** The agent's message content. Block content (lists, tables) is allowed. */
9
7
  children?: ReactNode;
10
8
  }
11
9
  /**
12
- * A single chat message from the agent: a decorative avatar bubble beside the
13
- * message text. The avatar conveys nothing beyond the text, so it is hidden
14
- * from assistive tech. Announcing new messages is the consuming transcript's
15
- * responsibility — wrap the message list in a single persistent live region
16
- * (e.g. `role="log"`) rather than giving each message its own, since a
17
- * per-message live region mounted already-populated is not reliably announced.
18
- * The row mirrors under an ambient `[dir="rtl"]` and the text direction is
19
- * detected from its own content.
10
+ * A single chat message from the agent: the message body, with the text
11
+ * direction detected from its own content.
12
+ *
13
+ * Row layout is the transcript's, not this component's — an avatar, a sender
14
+ * attribution, a reaction bar or a retry control are siblings the transcript
15
+ * places beside this body, so they align with the text rather than the avatar
16
+ * gutter and stay outside the body's direction detection. `UserMessage` draws
17
+ * the same boundary.
18
+ *
19
+ * Carries `data-slot="message-body"` from the shared body it composes, for a
20
+ * transcript that needs to find it. Prefer styling this component directly over
21
+ * a descendant selector against that attribute.
22
+ *
23
+ * Announcing new messages is likewise the transcript's responsibility — wrap
24
+ * the message list in a single persistent live region (e.g. `role="log"`)
25
+ * rather than giving each message its own, since a per-message live region
26
+ * mounted already-populated is not reliably announced.
20
27
  */
21
- export declare function AgentMessage({ initials, className, children, ...rest }: AgentMessageProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function AgentMessage({ className, children, ...rest }: AgentMessageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +1,16 @@
1
1
  import { cx as e } from "../../utils/cx.js";
2
- import { Avatar as t } from "../Avatar/Avatar.js";
3
- import { agentMessageBody as n, agentMessageRoot as r } from "./AgentMessage.css.js";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { MessageProse as t } from "../MessageProse/MessageProse.js";
3
+ import { agentMessageBody as n } from "./AgentMessage.css.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/AgentMessage/AgentMessage.tsx
6
- function o({ initials: o = "C", className: s, children: c, ...l }) {
7
- return /* @__PURE__ */ a("div", {
8
- ...l,
9
- className: e(r, s),
10
- children: [/* @__PURE__ */ i(t, {
11
- "aria-hidden": !0,
12
- size: "sm",
13
- children: o
14
- }), /* @__PURE__ */ i("p", {
15
- dir: "auto",
16
- className: n,
17
- children: c
18
- })]
6
+ function i({ className: i, children: a, ...o }) {
7
+ return /* @__PURE__ */ r(t, {
8
+ ...o,
9
+ className: e(n, i),
10
+ children: a
19
11
  });
20
12
  }
21
13
  //#endregion
22
- export { o as AgentMessage };
14
+ export { i as AgentMessage };
23
15
 
24
16
  //# sourceMappingURL=AgentMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentMessage.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { Avatar } from \"../Avatar/index.js\";\nimport { agentMessageBody, agentMessageRoot } from \"./AgentMessage.css.js\";\n\nexport interface AgentMessageProps {\n\t/** Monogram shown in the agent avatar bubble. */\n\tinitials?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The agent's message text. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A single chat message from the agent: a decorative avatar bubble beside the\n * message text. The avatar conveys nothing beyond the text, so it is hidden\n * from assistive tech. Announcing new messages is the consuming transcript's\n * responsibility — wrap the message list in a single persistent live region\n * (e.g. `role=\"log\"`) rather than giving each message its own, since a\n * per-message live region mounted already-populated is not reliably announced.\n * The row mirrors under an ambient `[dir=\"rtl\"]` and the text direction is\n * detected from its own content.\n */\nexport function AgentMessage({\n\tinitials = \"C\",\n\tclassName,\n\tchildren,\n\t...rest\n}: AgentMessageProps) {\n\treturn (\n\t\t<div {...rest} className={cx(agentMessageRoot, className)}>\n\t\t\t<Avatar aria-hidden size=\"sm\">\n\t\t\t\t{initials}\n\t\t\t</Avatar>\n\t\t\t<p dir=\"auto\" className={agentMessageBody}>\n\t\t\t\t{children}\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAAa,EAC5B,cAAW,KACX,cACA,aACA,GAAG,KACkB;AACrB,QACC,kBAAC,OAAD;EAAK,GAAI;EAAM,WAAW,EAAG,GAAkB,EAAU;YAAzD,CACC,kBAAC,GAAD;GAAQ,eAAA;GAAY,MAAK;aACvB;GACO,CAAA,EACT,kBAAC,KAAD;GAAG,KAAI;GAAO,WAAW;GACvB;GACE,CAAA,CACC"}
1
+ {"version":3,"file":"AgentMessage.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { MessageProse } from \"../MessageProse/index.js\";\nimport { agentMessageBody } from \"./AgentMessage.css.js\";\n\nexport interface AgentMessageProps {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The agent's message content. Block content (lists, tables) is allowed. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A single chat message from the agent: the message body, with the text\n * direction detected from its own content.\n *\n * Row layout is the transcript's, not this component's — an avatar, a sender\n * attribution, a reaction bar or a retry control are siblings the transcript\n * places beside this body, so they align with the text rather than the avatar\n * gutter and stay outside the body's direction detection. `UserMessage` draws\n * the same boundary.\n *\n * Carries `data-slot=\"message-body\"` from the shared body it composes, for a\n * transcript that needs to find it. Prefer styling this component directly over\n * a descendant selector against that attribute.\n *\n * Announcing new messages is likewise the transcript's responsibility — wrap\n * the message list in a single persistent live region (e.g. `role=\"log\"`)\n * rather than giving each message its own, since a per-message live region\n * mounted already-populated is not reliably announced.\n */\nexport function AgentMessage({\n\tclassName,\n\tchildren,\n\t...rest\n}: AgentMessageProps) {\n\treturn (\n\t\t<MessageProse {...rest} className={cx(agentMessageBody, className)}>\n\t\t\t{children}\n\t\t</MessageProse>\n\t);\n}\n"],"mappings":";;;;;AAgCA,SAAgB,EAAa,EAC5B,cACA,aACA,GAAG,KACkB;AACrB,QACC,kBAAC,GAAD;EAAc,GAAI;EAAM,WAAW,EAAG,GAAkB,EAAU;EAChE;EACa,CAAA"}