@patterninc/pattern-ui 0.0.0-main.202610210459.504fff4cf4d3 → 0.0.0-main.202610210503.8535dfd740a5

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 (49) hide show
  1. package/dist/ai-elements/reasoning-stepped/reasoning-stepped.js +29 -11
  2. package/dist/ai-elements/thinking/thinking.js +105 -81
  3. package/dist/ai-elements/tool-call/tool-call-step.js +150 -91
  4. package/dist/ai-elements/tool-call/tool-call-trigger.js +127 -77
  5. package/dist/ai-elements/tool-call/tool-call.js +93 -55
  6. package/dist/browser/@patterninc/pattern-ui/dev-tools.js +1 -1
  7. package/dist/browser/@patterninc/pattern-ui/locales/en.js +1 -1
  8. package/dist/browser/@patterninc/pattern-ui/locales/es.js +1 -1
  9. package/dist/browser/@patterninc/pattern-ui/locales/fr.js +1 -1
  10. package/dist/browser/@patterninc/pattern-ui/locales/pl.js +1 -1
  11. package/dist/browser/@patterninc/pattern-ui/locales/pseudo-LOCALE.js +1 -1
  12. package/dist/browser/@patterninc/pattern-ui/locales/zh.js +1 -1
  13. package/dist/browser/@patterninc/pattern-ui/reasoning-stepped.js +1 -1
  14. package/dist/browser/@patterninc/pattern-ui/simple-provider.js +1 -1
  15. package/dist/browser/@patterninc/pattern-ui/switch-control.js +1 -1
  16. package/dist/browser/@patterninc/pattern-ui/switch-field.js +1 -1
  17. package/dist/browser/@patterninc/pattern-ui/switch.js +1 -1
  18. package/dist/browser/@patterninc/pattern-ui/thinking.js +1 -1
  19. package/dist/browser/@patterninc/pattern-ui/tool-call.js +1 -1
  20. package/dist/browser/_chunks/{Switch-SlA81WxV.js → Switch-tFJ803kv.js} +1 -1
  21. package/dist/browser/_chunks/{SwitchControl-C2VB9_Bm.js → SwitchControl-C6o2IWP4.js} +1 -1
  22. package/dist/browser/_chunks/{messages-5m2Zo88A.js → messages-Cy4zXvjO.js} +1 -1
  23. package/dist/components/Switch/Switch.js +1 -1
  24. package/dist/locales/en/messages.js +1 -1
  25. package/dist/locales/es/messages.js +1 -1
  26. package/dist/locales/fr/messages.js +1 -1
  27. package/dist/locales/pl/messages.js +1 -1
  28. package/dist/locales/pseudo-LOCALE/messages.js +1 -1
  29. package/dist/locales/zh/messages.js +1 -1
  30. package/dist/play-cdn-claude.js +1 -1
  31. package/package.json +1 -1
  32. package/src/ai-elements/reasoning-stepped/reasoning-stepped.tsx +13 -3
  33. package/src/ai-elements/thinking/thinking.tsx +9 -12
  34. package/src/ai-elements/tool-call/tool-call-step.tsx +22 -8
  35. package/src/ai-elements/tool-call/tool-call-trigger.tsx +10 -5
  36. package/src/ai-elements/tool-call/tool-call.tsx +8 -11
  37. package/src/components/Switch/Switch.tsx +1 -1
  38. package/src/locales/en/messages.po +3 -0
  39. package/src/locales/en/messages.ts +1 -1
  40. package/src/locales/es/messages.po +3 -0
  41. package/src/locales/es/messages.ts +1 -1
  42. package/src/locales/fr/messages.po +3 -0
  43. package/src/locales/fr/messages.ts +1 -1
  44. package/src/locales/pl/messages.po +3 -0
  45. package/src/locales/pl/messages.ts +1 -1
  46. package/src/locales/pseudo-LOCALE/messages.po +3 -0
  47. package/src/locales/pseudo-LOCALE/messages.ts +1 -1
  48. package/src/locales/zh/messages.po +3 -0
  49. package/src/locales/zh/messages.ts +1 -1
@@ -5,28 +5,46 @@ import { cn } from "cn";
5
5
 
6
6
  //#region src/ai-elements/reasoning-stepped/reasoning-stepped.tsx
7
7
  function ReasoningStepped(t0) {
8
- const $ = c(6);
8
+ const $ = c(9);
9
9
  const { className, children, qaTestId: t1 } = t0;
10
10
  const qaTestId = t1 === void 0 ? "reasoning-stepped" : t1;
11
11
  let t2;
12
12
  if ($[0] !== className) {
13
- t2 = cn("flex flex-col", className);
13
+ t2 = cn("relative", className);
14
14
  $[0] = className;
15
15
  $[1] = t2;
16
16
  } else t2 = $[1];
17
17
  let t3;
18
- if ($[2] !== children || $[3] !== qaTestId || $[4] !== t2) {
18
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
19
19
  t3 = /* @__PURE__ */ jsx("div", {
20
+ "aria-hidden": true,
21
+ className: "absolute top-3.5 bottom-0 left-3 w-[1.5px] -translate-x-1/2 rounded-full bg-border-soft",
22
+ "data-slot": "reasoning-spine"
23
+ });
24
+ $[2] = t3;
25
+ } else t3 = $[2];
26
+ let t4;
27
+ if ($[3] !== children) {
28
+ t4 = /* @__PURE__ */ jsx("div", {
29
+ className: "relative flex flex-col gap-2",
30
+ children
31
+ });
32
+ $[3] = children;
33
+ $[4] = t4;
34
+ } else t4 = $[4];
35
+ let t5;
36
+ if ($[5] !== qaTestId || $[6] !== t2 || $[7] !== t4) {
37
+ t5 = /* @__PURE__ */ jsxs("div", {
20
38
  className: t2,
21
39
  "qa-test-id": qaTestId,
22
- children
40
+ children: [t3, t4]
23
41
  });
24
- $[2] = children;
25
- $[3] = qaTestId;
26
- $[4] = t2;
27
- $[5] = t3;
28
- } else t3 = $[5];
29
- return t3;
42
+ $[5] = qaTestId;
43
+ $[6] = t2;
44
+ $[7] = t4;
45
+ $[8] = t5;
46
+ } else t5 = $[8];
47
+ return t5;
30
48
  }
31
49
  function ReasoningStep(t0) {
32
50
  const $ = c(15);
@@ -50,7 +68,7 @@ function ReasoningStep(t0) {
50
68
  t5 = /* @__PURE__ */ jsx(ReasoningTrigger, {
51
69
  status,
52
70
  headerText,
53
- className: "py-1"
71
+ className: "w-full bg-base-inverse py-1"
54
72
  });
55
73
  $[4] = headerText;
56
74
  $[5] = status;
@@ -7,6 +7,7 @@ import { useToggle } from "../../hooks/useToggle/useToggle.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { createContext, useContext, useState } from "react";
10
+ import { useLingui } from "@lingui/react";
10
11
  import { cn } from "cn";
11
12
  import { motion } from "motion/react";
12
13
 
@@ -79,110 +80,133 @@ function Thinking(t0) {
79
80
  }
80
81
  /** ThinkingTrigger — Clickable trigger that shows the PI logo and timing text. */
81
82
  function ThinkingTrigger(t0) {
82
- const $ = c(24);
83
- const { className, headerText: t1, isThinking: t2, qaTestId: t3 } = t0;
84
- const headerText = t1 === void 0 ? "Thought for 4 seconds" : t1;
85
- const isThinking = t2 === void 0 ? false : t2;
86
- const qaTestId = t3 === void 0 ? "thinking-trigger" : t3;
83
+ const $ = c(34);
84
+ const { className, headerText, isThinking: t1, qaTestId: t2 } = t0;
85
+ const isThinking = t1 === void 0 ? false : t1;
86
+ const qaTestId = t2 === void 0 ? "thinking-trigger" : t2;
87
+ const { _: _t } = useLingui();
87
88
  const { isOpen, setIsOpen } = useThinking();
88
- let t4;
89
+ const labelColor = isOpen ? "text-text-sub" : "text-text-soft group-hover:text-text-sub";
90
+ let t3;
89
91
  if ($[0] !== isOpen || $[1] !== setIsOpen) {
90
- t4 = () => setIsOpen(!isOpen);
92
+ t3 = () => setIsOpen(!isOpen);
91
93
  $[0] = isOpen;
92
94
  $[1] = setIsOpen;
93
- $[2] = t4;
94
- } else t4 = $[2];
95
- let t5;
95
+ $[2] = t3;
96
+ } else t3 = $[2];
97
+ let t4;
96
98
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
97
- t5 = { scale: .95 };
98
- $[3] = t5;
99
- } else t5 = $[3];
100
- let t6;
99
+ t4 = { scale: .95 };
100
+ $[3] = t4;
101
+ } else t4 = $[3];
102
+ let t5;
101
103
  if ($[4] !== className) {
102
- t6 = cn("pui-text-body-medium-alt group flex items-center gap-2 transition-colors", "cursor-pointer border-none bg-transparent p-0", className);
104
+ t5 = cn("pui-text-body-medium-alt group flex items-center gap-2 transition-colors", "cursor-pointer border-none bg-transparent p-0", className);
103
105
  $[4] = className;
104
- $[5] = t6;
105
- } else t6 = $[5];
106
- const t7 = useToggle("pi_long_chat_render_perf") ? void 0 : {
106
+ $[5] = t5;
107
+ } else t5 = $[5];
108
+ const t6 = useToggle("pi_long_chat_render_perf") ? void 0 : {
107
109
  transform: "translate3d(0, 0, 0)",
108
110
  backfaceVisibility: "hidden"
109
111
  };
112
+ let t7;
113
+ if ($[6] !== labelColor) {
114
+ t7 = cn("transition-colors", labelColor);
115
+ $[6] = labelColor;
116
+ $[7] = t7;
117
+ } else t7 = $[7];
110
118
  let t8;
111
- if ($[6] !== isThinking) {
112
- t8 = /* @__PURE__ */ jsx("div", {
113
- className: "text-text-soft transition-colors group-hover:text-text-strong",
114
- children: /* @__PURE__ */ jsx(AnimatedLogoPI, {
115
- isAnimating: isThinking,
116
- size: 20
117
- })
119
+ if ($[8] !== isThinking) {
120
+ t8 = /* @__PURE__ */ jsx(AnimatedLogoPI, {
121
+ isAnimating: isThinking,
122
+ size: 20
118
123
  });
119
- $[6] = isThinking;
120
- $[7] = t8;
121
- } else t8 = $[7];
124
+ $[8] = isThinking;
125
+ $[9] = t8;
126
+ } else t8 = $[9];
122
127
  let t9;
123
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
124
- t9 = cn("pui-text-body-medium-compact transition-colors", "text-text-soft group-hover:text-text-strong");
125
- $[8] = t9;
126
- } else t9 = $[8];
127
- let t10;
128
- if ($[9] !== headerText) {
129
- t10 = /* @__PURE__ */ jsx("span", {
130
- className: t9,
131
- children: headerText
128
+ if ($[10] !== t7 || $[11] !== t8) {
129
+ t9 = /* @__PURE__ */ jsx("div", {
130
+ className: t7,
131
+ children: t8
132
132
  });
133
- $[9] = headerText;
134
- $[10] = t10;
135
- } else t10 = $[10];
136
- const t11 = isOpen ? "rotate-90" : "rotate-0";
133
+ $[10] = t7;
134
+ $[11] = t8;
135
+ $[12] = t9;
136
+ } else t9 = $[12];
137
+ let t10;
138
+ if ($[13] !== labelColor) {
139
+ t10 = cn("pui-text-body-medium-compact transition-colors", labelColor);
140
+ $[13] = labelColor;
141
+ $[14] = t10;
142
+ } else t10 = $[14];
143
+ let t11;
144
+ if ($[15] !== _t || $[16] !== headerText) {
145
+ t11 = headerText ?? _t({ id: "-D6jVS" });
146
+ $[15] = _t;
147
+ $[16] = headerText;
148
+ $[17] = t11;
149
+ } else t11 = $[17];
137
150
  let t12;
138
- if ($[11] !== t11) {
139
- t12 = cn("text-icon-soft transition-all duration-200 group-hover:text-icon-strong", t11);
140
- $[11] = t11;
141
- $[12] = t12;
142
- } else t12 = $[12];
143
- let t13;
144
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
145
- t13 = /* @__PURE__ */ jsx(ChevronRightIcon, {
151
+ if ($[18] !== t10 || $[19] !== t11) {
152
+ t12 = /* @__PURE__ */ jsx("span", {
153
+ className: t10,
154
+ children: t11
155
+ });
156
+ $[18] = t10;
157
+ $[19] = t11;
158
+ $[20] = t12;
159
+ } else t12 = $[20];
160
+ const t13 = isOpen ? "rotate-90" : "rotate-0";
161
+ let t14;
162
+ if ($[21] !== t13) {
163
+ t14 = cn("text-icon-soft transition-all duration-200 group-hover:text-icon-strong", t13);
164
+ $[21] = t13;
165
+ $[22] = t14;
166
+ } else t14 = $[22];
167
+ let t15;
168
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
169
+ t15 = /* @__PURE__ */ jsx(ChevronRightIcon, {
146
170
  size: 20,
147
171
  color: "currentColor"
148
172
  });
149
- $[13] = t13;
150
- } else t13 = $[13];
151
- let t14;
152
- if ($[14] !== t12) {
153
- t14 = /* @__PURE__ */ jsx("div", {
154
- className: t12,
155
- children: t13
173
+ $[23] = t15;
174
+ } else t15 = $[23];
175
+ let t16;
176
+ if ($[24] !== t14) {
177
+ t16 = /* @__PURE__ */ jsx("div", {
178
+ className: t14,
179
+ children: t15
156
180
  });
157
- $[14] = t12;
158
- $[15] = t14;
159
- } else t14 = $[15];
160
- let t15;
161
- if ($[16] !== qaTestId || $[17] !== t10 || $[18] !== t14 || $[19] !== t4 || $[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
162
- t15 = /* @__PURE__ */ jsxs(motion.button, {
181
+ $[24] = t14;
182
+ $[25] = t16;
183
+ } else t16 = $[25];
184
+ let t17;
185
+ if ($[26] !== qaTestId || $[27] !== t12 || $[28] !== t16 || $[29] !== t3 || $[30] !== t5 || $[31] !== t6 || $[32] !== t9) {
186
+ t17 = /* @__PURE__ */ jsxs(motion.button, {
163
187
  type: "button",
164
- onClick: t4,
165
- whileTap: t5,
188
+ onClick: t3,
189
+ whileTap: t4,
166
190
  transition: springTransition,
167
- className: t6,
168
- style: t7,
191
+ className: t5,
192
+ style: t6,
169
193
  "qa-test-id": qaTestId,
170
194
  children: [
171
- t8,
172
- t10,
173
- t14
195
+ t9,
196
+ t12,
197
+ t16
174
198
  ]
175
199
  });
176
- $[16] = qaTestId;
177
- $[17] = t10;
178
- $[18] = t14;
179
- $[19] = t4;
180
- $[20] = t6;
181
- $[21] = t7;
182
- $[22] = t8;
183
- $[23] = t15;
184
- } else t15 = $[23];
185
- return t15;
200
+ $[26] = qaTestId;
201
+ $[27] = t12;
202
+ $[28] = t16;
203
+ $[29] = t3;
204
+ $[30] = t5;
205
+ $[31] = t6;
206
+ $[32] = t9;
207
+ $[33] = t17;
208
+ } else t17 = $[33];
209
+ return t17;
186
210
  }
187
211
  /** ThinkingContent — Animated expandable panel for thinking text and tags. */
188
212
  function ThinkingContent(t0) {
@@ -228,7 +252,7 @@ function ThinkingContent(t0) {
228
252
  className: "flex gap-2",
229
253
  children: [/* @__PURE__ */ jsx("div", {
230
254
  className: "flex w-6 items-center justify-center",
231
- children: /* @__PURE__ */ jsx("div", { className: "h-full w-[1.5px] rounded-full bg-border-soft" })
255
+ children: /* @__PURE__ */ jsx("div", { className: "h-full w-px rounded-full bg-depth-black-4" })
232
256
  }), /* @__PURE__ */ jsxs("div", {
233
257
  className: "flex-1 space-y-2",
234
258
  children: [/* @__PURE__ */ jsx("div", {
@@ -247,7 +271,7 @@ function ThinkingContent(t0) {
247
271
  if ($[7] !== contentRef || $[8] !== t9) {
248
272
  t10 = /* @__PURE__ */ jsx("div", {
249
273
  ref: contentRef,
250
- className: "pt-2 pb-4",
274
+ className: "py-4",
251
275
  children: t9
252
276
  });
253
277
  $[7] = contentRef;
@@ -5,9 +5,10 @@ import { useToggle } from "../../hooks/useToggle/useToggle.js";
5
5
  import { ToolCallTrigger } from "./tool-call-trigger.js";
6
6
  import { c } from "react/compiler-runtime";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { useEffect, useRef, useState } from "react";
8
+ import { useEffect, useId, useRef, useState } from "react";
9
9
  import { cn } from "cn";
10
10
  import { motion } from "motion/react";
11
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
11
12
 
12
13
  //#region src/ai-elements/tool-call/tool-call-step.tsx
13
14
  /** Full trigger row (0–ICON_BOTTOM) is the gap; line only runs below trigger. */
@@ -45,7 +46,7 @@ function CurvedTailEnd(t0) {
45
46
  let t3;
46
47
  if ($[3] !== t1) {
47
48
  t3 = /* @__PURE__ */ jsx("svg", {
48
- className: "absolute z-0 overflow-visible text-border-soft",
49
+ className: "absolute z-0 overflow-visible text-depth-black-4",
49
50
  width: CURVE_SVG_WIDTH,
50
51
  height: CURVE_VIEWBOX_HEIGHT,
51
52
  viewBox: "0 0 13 38",
@@ -61,27 +62,75 @@ function CurvedTailEnd(t0) {
61
62
  return t3;
62
63
  }
63
64
  function ToolCallStep(t0) {
64
- const $ = c(47);
65
- const { className, status, headerText, suffixProps, onSuffixClick, suffixAriaLabel, prefixProps, tags: t1, children, defaultOpen: t2, _isLast: t3, qaTestId: t4 } = t0;
65
+ const $ = c(67);
66
+ let children;
67
+ let className;
68
+ let forwardedRef;
69
+ let headerText;
70
+ let onSuffixClick;
71
+ let prefixProps;
72
+ let props;
73
+ let status;
74
+ let suffixAriaLabel;
75
+ let suffixProps;
76
+ let t1;
77
+ let t2;
78
+ let t3;
79
+ let t4;
80
+ if ($[0] !== t0) {
81
+ ({className, status, headerText, suffixProps, onSuffixClick, suffixAriaLabel, prefixProps, tags: t1, children, defaultOpen: t2, _isLast: t3, qaTestId: t4, ref: forwardedRef, ...props} = t0);
82
+ $[0] = t0;
83
+ $[1] = children;
84
+ $[2] = className;
85
+ $[3] = forwardedRef;
86
+ $[4] = headerText;
87
+ $[5] = onSuffixClick;
88
+ $[6] = prefixProps;
89
+ $[7] = props;
90
+ $[8] = status;
91
+ $[9] = suffixAriaLabel;
92
+ $[10] = suffixProps;
93
+ $[11] = t1;
94
+ $[12] = t2;
95
+ $[13] = t3;
96
+ $[14] = t4;
97
+ } else {
98
+ children = $[1];
99
+ className = $[2];
100
+ forwardedRef = $[3];
101
+ headerText = $[4];
102
+ onSuffixClick = $[5];
103
+ prefixProps = $[6];
104
+ props = $[7];
105
+ status = $[8];
106
+ suffixAriaLabel = $[9];
107
+ suffixProps = $[10];
108
+ t1 = $[11];
109
+ t2 = $[12];
110
+ t3 = $[13];
111
+ t4 = $[14];
112
+ }
66
113
  let t5;
67
- if ($[0] !== t1) {
114
+ if ($[15] !== t1) {
68
115
  t5 = t1 === void 0 ? [] : t1;
69
- $[0] = t1;
70
- $[1] = t5;
71
- } else t5 = $[1];
116
+ $[15] = t1;
117
+ $[16] = t5;
118
+ } else t5 = $[16];
72
119
  const tags = t5;
73
120
  const defaultOpen = t2 === void 0 ? false : t2;
74
121
  const _isLast = t3 === void 0 ? true : t3;
75
122
  const qaTestId = t4 === void 0 ? "tool-call-step" : t4;
123
+ const contentId = useId();
76
124
  const [isOpen, setIsOpen] = useState(defaultOpen);
77
125
  const [hasOpened, setHasOpened] = useState(defaultOpen);
78
126
  if (isOpen && !hasOpened) setHasOpened(true);
79
127
  const { contentRef, measuredHeight } = useExpandableHeight();
80
128
  const stepRef = useRef(null);
129
+ const composedRef = useComposedRefs(forwardedRef, stepRef);
81
130
  const [straightHeight, setStraightHeight] = useState(0);
82
131
  const [tailTop, setTailTop] = useState(TRIGGER_ROW_GAP);
83
132
  let t6;
84
- if ($[2] !== _isLast || $[3] !== contentRef || $[4] !== isOpen) {
133
+ if ($[17] !== _isLast || $[18] !== contentRef || $[19] !== isOpen) {
85
134
  t6 = () => {
86
135
  if (!isOpen || !_isLast) return;
87
136
  if (typeof ResizeObserver === "undefined") return;
@@ -103,64 +152,64 @@ function ToolCallStep(t0) {
103
152
  observer.disconnect();
104
153
  };
105
154
  };
106
- $[2] = _isLast;
107
- $[3] = contentRef;
108
- $[4] = isOpen;
109
- $[5] = t6;
110
- } else t6 = $[5];
155
+ $[17] = _isLast;
156
+ $[18] = contentRef;
157
+ $[19] = isOpen;
158
+ $[20] = t6;
159
+ } else t6 = $[20];
111
160
  let t7;
112
- if ($[6] !== _isLast || $[7] !== contentRef || $[8] !== isOpen || $[9] !== measuredHeight) {
161
+ if ($[21] !== _isLast || $[22] !== contentRef || $[23] !== isOpen || $[24] !== measuredHeight) {
113
162
  t7 = [
114
163
  _isLast,
115
164
  contentRef,
116
165
  isOpen,
117
166
  measuredHeight
118
167
  ];
119
- $[6] = _isLast;
120
- $[7] = contentRef;
121
- $[8] = isOpen;
122
- $[9] = measuredHeight;
123
- $[10] = t7;
124
- } else t7 = $[10];
168
+ $[21] = _isLast;
169
+ $[22] = contentRef;
170
+ $[23] = isOpen;
171
+ $[24] = measuredHeight;
172
+ $[25] = t7;
173
+ } else t7 = $[25];
125
174
  useEffect(t6, t7);
126
175
  const showLineBelow = !_isLast;
127
176
  const showCurve = _isLast && isOpen;
128
177
  const t8 = isOpen ? measuredHeight : 0;
129
178
  const t9 = isOpen ? 1 : 0;
130
179
  let t10;
131
- if ($[11] !== t8 || $[12] !== t9) {
180
+ if ($[26] !== t8 || $[27] !== t9) {
132
181
  t10 = {
133
182
  height: t8,
134
183
  opacity: t9
135
184
  };
136
- $[11] = t8;
137
- $[12] = t9;
138
- $[13] = t10;
139
- } else t10 = $[13];
185
+ $[26] = t8;
186
+ $[27] = t9;
187
+ $[28] = t10;
188
+ } else t10 = $[28];
140
189
  const contentAnimationValues = t10;
141
190
  let t11;
142
- if ($[14] !== className) {
191
+ if ($[29] !== className) {
143
192
  t11 = cn("group/step relative", className);
144
- $[14] = className;
145
- $[15] = t11;
146
- } else t11 = $[15];
193
+ $[29] = className;
194
+ $[30] = t11;
195
+ } else t11 = $[30];
147
196
  let t12;
148
- if ($[16] !== showLineBelow) {
197
+ if ($[31] !== showLineBelow) {
149
198
  t12 = showLineBelow ? /* @__PURE__ */ jsx("div", {
150
- className: "absolute bottom-0 z-0 w-px bg-border-soft",
199
+ className: "absolute bottom-0 z-0 w-px bg-depth-black-4",
151
200
  style: {
152
201
  left: 11.5,
153
202
  top: TRIGGER_ROW_GAP
154
203
  },
155
204
  "aria-hidden": true
156
205
  }) : null;
157
- $[16] = showLineBelow;
158
- $[17] = t12;
159
- } else t12 = $[17];
206
+ $[31] = showLineBelow;
207
+ $[32] = t12;
208
+ } else t12 = $[32];
160
209
  let t13;
161
- if ($[18] !== showCurve || $[19] !== straightHeight || $[20] !== tailTop) {
210
+ if ($[33] !== showCurve || $[34] !== straightHeight || $[35] !== tailTop) {
162
211
  t13 = showCurve ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
163
- className: "absolute z-0 w-px bg-border-soft",
212
+ className: "absolute z-0 w-px bg-depth-black-4",
164
213
  style: {
165
214
  left: 11.5,
166
215
  top: TRIGGER_ROW_GAP,
@@ -168,19 +217,19 @@ function ToolCallStep(t0) {
168
217
  },
169
218
  "aria-hidden": true
170
219
  }), /* @__PURE__ */ jsx(CurvedTailEnd, { top: tailTop })] }) : null;
171
- $[18] = showCurve;
172
- $[19] = straightHeight;
173
- $[20] = tailTop;
174
- $[21] = t13;
175
- } else t13 = $[21];
220
+ $[33] = showCurve;
221
+ $[34] = straightHeight;
222
+ $[35] = tailTop;
223
+ $[36] = t13;
224
+ } else t13 = $[36];
176
225
  let t14;
177
- if ($[22] !== isOpen) {
226
+ if ($[37] !== isOpen) {
178
227
  t14 = () => setIsOpen(!isOpen);
179
- $[22] = isOpen;
180
- $[23] = t14;
181
- } else t14 = $[23];
228
+ $[37] = isOpen;
229
+ $[38] = t14;
230
+ } else t14 = $[38];
182
231
  let t15;
183
- if ($[24] !== headerText || $[25] !== isOpen || $[26] !== onSuffixClick || $[27] !== prefixProps || $[28] !== status || $[29] !== suffixAriaLabel || $[30] !== suffixProps || $[31] !== t14) {
232
+ if ($[39] !== contentId || $[40] !== headerText || $[41] !== isOpen || $[42] !== onSuffixClick || $[43] !== prefixProps || $[44] !== status || $[45] !== suffixAriaLabel || $[46] !== suffixProps || $[47] !== t14) {
184
233
  t15 = /* @__PURE__ */ jsx(ToolCallTrigger, {
185
234
  status,
186
235
  headerText,
@@ -189,25 +238,28 @@ function ToolCallStep(t0) {
189
238
  suffixAriaLabel,
190
239
  prefixProps,
191
240
  isOpen,
241
+ contentId,
192
242
  onClick: t14,
193
243
  className: "relative z-10 h-8"
194
244
  });
195
- $[24] = headerText;
196
- $[25] = isOpen;
197
- $[26] = onSuffixClick;
198
- $[27] = prefixProps;
199
- $[28] = status;
200
- $[29] = suffixAriaLabel;
201
- $[30] = suffixProps;
202
- $[31] = t14;
203
- $[32] = t15;
204
- } else t15 = $[32];
205
- const t16 = useToggle("pi_long_chat_render_perf") ? void 0 : {
245
+ $[39] = contentId;
246
+ $[40] = headerText;
247
+ $[41] = isOpen;
248
+ $[42] = onSuffixClick;
249
+ $[43] = prefixProps;
250
+ $[44] = status;
251
+ $[45] = suffixAriaLabel;
252
+ $[46] = suffixProps;
253
+ $[47] = t14;
254
+ $[48] = t15;
255
+ } else t15 = $[48];
256
+ const t16 = !isOpen;
257
+ const t17 = useToggle("pi_long_chat_render_perf") ? void 0 : {
206
258
  willChange: "height, opacity",
207
259
  transform: "translate3d(0, 0, 0)",
208
260
  backfaceVisibility: "hidden"
209
261
  };
210
- const t17 = !useToggle("pi_long_chat_render_perf") || hasOpened ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
262
+ const t18 = !useToggle("pi_long_chat_render_perf") || hasOpened ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
211
263
  className: "py-1",
212
264
  children: /* @__PURE__ */ jsx("div", {
213
265
  className: cn("pui-text-body-medium-compact text-text-soft", "wrap-break-word whitespace-pre-wrap"),
@@ -217,54 +269,61 @@ function ToolCallStep(t0) {
217
269
  className: "flex flex-wrap gap-2 py-1",
218
270
  children: tags.map(_temp)
219
271
  }) : null] }) : null;
220
- let t18;
221
- if ($[33] !== contentRef || $[34] !== t17) {
222
- t18 = /* @__PURE__ */ jsx("div", {
272
+ let t19;
273
+ if ($[49] !== contentRef || $[50] !== t18) {
274
+ t19 = /* @__PURE__ */ jsx("div", {
223
275
  ref: contentRef,
224
276
  className: "pt-1 pb-1 pl-8",
225
- children: t17
277
+ children: t18
226
278
  });
227
- $[33] = contentRef;
228
- $[34] = t17;
229
- $[35] = t18;
230
- } else t18 = $[35];
231
- let t19;
232
- if ($[36] !== contentAnimationValues || $[37] !== t16 || $[38] !== t18) {
233
- t19 = /* @__PURE__ */ jsx(motion.div, {
279
+ $[49] = contentRef;
280
+ $[50] = t18;
281
+ $[51] = t19;
282
+ } else t19 = $[51];
283
+ let t20;
284
+ if ($[52] !== contentAnimationValues || $[53] !== contentId || $[54] !== t16 || $[55] !== t17 || $[56] !== t19) {
285
+ t20 = /* @__PURE__ */ jsx(motion.div, {
286
+ id: contentId,
287
+ inert: t16,
234
288
  initial: contentAnimationValues,
235
289
  animate: contentAnimationValues,
236
290
  transition: panelTransition,
237
291
  className: "w-full overflow-hidden",
238
- style: t16,
239
- children: t18
292
+ style: t17,
293
+ children: t19
240
294
  });
241
- $[36] = contentAnimationValues;
242
- $[37] = t16;
243
- $[38] = t18;
244
- $[39] = t19;
245
- } else t19 = $[39];
246
- let t20;
247
- if ($[40] !== qaTestId || $[41] !== t11 || $[42] !== t12 || $[43] !== t13 || $[44] !== t15 || $[45] !== t19) {
248
- t20 = /* @__PURE__ */ jsxs("div", {
249
- ref: stepRef,
295
+ $[52] = contentAnimationValues;
296
+ $[53] = contentId;
297
+ $[54] = t16;
298
+ $[55] = t17;
299
+ $[56] = t19;
300
+ $[57] = t20;
301
+ } else t20 = $[57];
302
+ let t21;
303
+ if ($[58] !== composedRef || $[59] !== props || $[60] !== qaTestId || $[61] !== t11 || $[62] !== t12 || $[63] !== t13 || $[64] !== t15 || $[65] !== t20) {
304
+ t21 = /* @__PURE__ */ jsxs("div", {
305
+ ...props,
306
+ ref: composedRef,
250
307
  className: t11,
251
308
  "qa-test-id": qaTestId,
252
309
  children: [
253
310
  t12,
254
311
  t13,
255
312
  t15,
256
- t19
313
+ t20
257
314
  ]
258
315
  });
259
- $[40] = qaTestId;
260
- $[41] = t11;
261
- $[42] = t12;
262
- $[43] = t13;
263
- $[44] = t15;
264
- $[45] = t19;
265
- $[46] = t20;
266
- } else t20 = $[46];
267
- return t20;
316
+ $[58] = composedRef;
317
+ $[59] = props;
318
+ $[60] = qaTestId;
319
+ $[61] = t11;
320
+ $[62] = t12;
321
+ $[63] = t13;
322
+ $[64] = t15;
323
+ $[65] = t20;
324
+ $[66] = t21;
325
+ } else t21 = $[66];
326
+ return t21;
268
327
  }
269
328
  function _temp(tag, index) {
270
329
  return /* @__PURE__ */ jsx(Tag, {