@bikdotai/bik-component-library 0.0.865-beta.4 → 0.0.865-beta.6

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 (127) hide show
  1. package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
  2. package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +29 -151
  4. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
  6. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/MentionEditor.js +2 -2
  8. package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
  10. package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/MentionPicker.js +13 -13
  12. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
  14. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
  16. package/dist/cjs/components/agent-builder/constants/steps.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  18. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/steps/Step1About.js +1 -1
  20. package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
  22. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  23. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  24. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  25. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
  26. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  27. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +4 -4
  28. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  29. package/dist/cjs/components/button/Button.js +1 -1
  30. package/dist/cjs/components/button/Button.js.map +1 -1
  31. package/dist/cjs/components/button/Button.styled.js +2 -2
  32. package/dist/cjs/components/button/Button.styled.js.map +1 -1
  33. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  34. package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
  35. package/dist/cjs/components/tag/Tag.js +1 -1
  36. package/dist/cjs/components/tag/Tag.js.map +1 -1
  37. package/dist/cjs/components/tag/Tag.styled.js +4 -4
  38. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  39. package/dist/cjs/components/tag/model.js.map +1 -1
  40. package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
  41. package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
  42. package/dist/cjs/icons/Informational/General/MessageSource.js +2 -0
  43. package/dist/cjs/icons/Informational/General/MessageSource.js.map +1 -0
  44. package/dist/cjs/icons/index.js +1 -1
  45. package/dist/cjs/index.js +1 -1
  46. package/dist/esm/components/agent-builder/AgentBuilder.js +97 -103
  47. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  48. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -76
  49. package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -68
  50. package/dist/esm/components/agent-builder/AgentBuilder.styled.js +59 -224
  51. package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  52. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +132 -135
  53. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  54. package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -2
  55. package/dist/esm/components/agent-builder/components/MentionEditor.js +45 -47
  56. package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
  57. package/dist/esm/components/agent-builder/components/MentionField.js +51 -52
  58. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  59. package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +0 -5
  60. package/dist/esm/components/agent-builder/components/MentionPicker.js +132 -134
  61. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  62. package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +0 -2
  63. package/dist/esm/components/agent-builder/components/SelectableListSection.js +46 -48
  64. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  65. package/dist/esm/components/agent-builder/constants/steps.d.ts +1 -31
  66. package/dist/esm/components/agent-builder/constants/steps.js +6 -15
  67. package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
  68. package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +1 -13
  69. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +148 -157
  70. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  71. package/dist/esm/components/agent-builder/index.d.ts +2 -5
  72. package/dist/esm/components/agent-builder/steps/Step1About.js +13 -15
  73. package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
  74. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +48 -55
  75. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  76. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +157 -158
  77. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  78. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +0 -11
  79. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +23 -127
  80. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  81. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +2 -7
  82. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +2 -2
  83. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  84. package/dist/esm/components/button/Button.js +21 -19
  85. package/dist/esm/components/button/Button.js.map +1 -1
  86. package/dist/esm/components/button/Button.styled.d.ts +1 -0
  87. package/dist/esm/components/button/Button.styled.js +5 -5
  88. package/dist/esm/components/button/Button.styled.js.map +1 -1
  89. package/dist/esm/components/button/model.d.ts +5 -0
  90. package/dist/esm/components/dropdown-button/DropdownButton.d.ts +5 -0
  91. package/dist/esm/components/dropdown-button/DropdownButton.js +4 -3
  92. package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
  93. package/dist/esm/components/tag/Tag.d.ts +1 -1
  94. package/dist/esm/components/tag/Tag.js +48 -41
  95. package/dist/esm/components/tag/Tag.js.map +1 -1
  96. package/dist/esm/components/tag/Tag.styled.d.ts +3 -0
  97. package/dist/esm/components/tag/Tag.styled.js +6 -9
  98. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  99. package/dist/esm/components/tag/model.d.ts +11 -0
  100. package/dist/esm/components/tag/model.js.map +1 -1
  101. package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
  102. package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
  103. package/dist/esm/icons/Informational/General/MessageSource.d.ts +7 -0
  104. package/dist/esm/icons/Informational/General/MessageSource.js +46 -0
  105. package/dist/esm/icons/Informational/General/MessageSource.js.map +1 -0
  106. package/dist/esm/icons/Informational/General/index.d.ts +1 -0
  107. package/dist/esm/icons/index.d.ts +25 -25
  108. package/dist/esm/icons/index.js +294 -292
  109. package/dist/esm/icons/index.js.map +1 -1
  110. package/dist/esm/index.js +636 -644
  111. package/dist/esm/index.js.map +1 -1
  112. package/package.json +1 -1
  113. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +0 -2
  114. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
  115. package/dist/cjs/components/agent-builder/components/ChannelsSection.js +0 -2
  116. package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +0 -1
  117. package/dist/cjs/components/agent-builder/constants/channels.js +0 -2
  118. package/dist/cjs/components/agent-builder/constants/channels.js.map +0 -1
  119. package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +0 -26
  120. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +0 -121
  121. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
  122. package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +0 -10
  123. package/dist/esm/components/agent-builder/components/ChannelsSection.js +0 -183
  124. package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +0 -1
  125. package/dist/esm/components/agent-builder/constants/channels.d.ts +0 -56
  126. package/dist/esm/components/agent-builder/constants/channels.js +0 -41
  127. package/dist/esm/components/agent-builder/constants/channels.js.map +0 -1
@@ -1,112 +1,111 @@
1
- import { jsxs as x, jsx as c, Fragment as ce } from "react/jsx-runtime";
2
- import se from "../../../assets/icons/chevronRight.svg.js";
3
- import de from "../../../assets/icons/searchIcon.svg.js";
4
- import ue from "../../../icons/Arrows/Normal arrows/ArrowLeft.js";
5
- import { useState as z, useMemo as I, useEffect as j, useRef as he } from "react";
1
+ import { jsxs as x, jsx as c, Fragment as ae } from "react/jsx-runtime";
2
+ import ce from "../../../assets/icons/chevronRight.svg.js";
3
+ import se from "../../../assets/icons/searchIcon.svg.js";
4
+ import de from "../../../icons/Arrows/Normal arrows/ArrowLeft.js";
5
+ import { useState as M, useMemo as I, useEffect as V, useRef as ue } from "react";
6
6
  import u from "styled-components";
7
- import { TitleSmall as pe, BodySecondary as fe, BodyCaption as ge } from "../../TypographyStyle.js";
7
+ import { TitleSmall as he, BodySecondary as pe, BodyCaption as fe } from "../../TypographyStyle.js";
8
8
  import { COLORS as o } from "../../../constants/Theme.js";
9
- import { PickerType as be } from "../../variable-picker-v3/model.js";
10
- import { CATEGORIES as me, MORE_INTEGRATIONS_KEY as v, isMoreIntegrationSource as q, toolSourceRank as Y, MORE_INTEGRATIONS_LABEL as te, isIntegrationSource as ke, CONFIG_TOOL_SOURCES as xe, MORE_INTEGRATIONS_RANK as ve } from "../constants/tools.js";
11
- import { toolSourceLabel as H } from "../utils/mentionSerialization.js";
12
- import { renderSourceIcon as re, sourceIcon as D } from "../utils/sourceIcons.js";
13
- import we from "../../../icons/Informational/Identity/PuzzlePiece.js";
14
- import { VariablePicker as ye } from "../../variable-picker-v3/VariablePicker.js";
15
- import ne from "../../../icons/Informational/Common UI/Shield.js";
16
- const oe = {
17
- Icon: we,
9
+ import { PickerType as ge } from "../../variable-picker-v3/model.js";
10
+ import { CATEGORIES as be, MORE_INTEGRATIONS_KEY as v, isMoreIntegrationSource as z, toolSourceRank as j, MORE_INTEGRATIONS_LABEL as ee, isIntegrationSource as me, CONFIG_TOOL_SOURCES as ke, MORE_INTEGRATIONS_RANK as xe } from "../constants/tools.js";
11
+ import { toolSourceLabel as Y } from "../utils/mentionSerialization.js";
12
+ import { renderSourceIcon as te, sourceIcon as q } from "../utils/sourceIcons.js";
13
+ import ve from "../../../icons/Informational/Identity/PuzzlePiece.js";
14
+ import { VariablePicker as we } from "../../variable-picker-v3/VariablePicker.js";
15
+ import re from "../../../icons/Informational/Common UI/Shield.js";
16
+ const ne = {
17
+ Icon: ve,
18
18
  w: 20,
19
19
  h: 20
20
- }, b = (s) => s.meta, A = (s) => b(s)?.plainLabel ?? s.label, Ie = "__bik_create_subagent__", Ze = ({
20
+ }, b = (s) => s.meta, A = (s) => b(s)?.plainLabel ?? s.label, ye = "__bik_create_subagent__", Xe = ({
21
21
  items: s,
22
- onSelect: C,
23
- registerKeyHandler: $,
22
+ onSelect: L,
23
+ registerKeyHandler: C,
24
24
  onClose: w,
25
25
  onCreateSubAgent: R,
26
- initialSource: J,
26
+ initialSource: H,
27
27
  toolActions: y,
28
- integrationStatus: K,
29
- onConnectIntegration: Q,
30
- appLabel: B,
31
- variablesData: G,
32
- onSelectVariable: F
28
+ integrationStatus: J,
29
+ onConnectIntegration: K,
30
+ variablesData: D,
31
+ onSelectVariable: G
33
32
  }) => {
34
- const [ie, O] = z(null), [i, S] = z(J ?? null), [T, m] = z(-1), [E, W] = z(""), k = I(
33
+ const [oe, $] = M(null), [i, S] = M(H ?? null), [B, m] = M(-1), [E, Q] = M(""), k = I(
35
34
  () => s.filter((e) => b(e)?.kind === "tool"),
36
35
  [s]
37
- ), L = I(
36
+ ), O = I(
38
37
  () => s.filter((e) => b(e)?.kind === "subagent"),
39
38
  [s]
40
- ), U = I(() => {
39
+ ), F = I(() => {
41
40
  const e = [];
42
41
  return k.forEach((n) => {
43
42
  const f = b(n)?.source ?? "other";
44
43
  e.includes(f) || e.push(f);
45
44
  }), e;
46
- }, [k]), V = I(
45
+ }, [k]), U = I(
47
46
  () => new Map(
48
47
  (y ?? []).map((e) => [e.source, e])
49
48
  ),
50
49
  [y]
51
- ), _ = I(
52
- () => me.filter((e) => e.key === "tool" ? k.length > 0 || (y?.length ?? 0) > 0 : e.key === "variable" ? (G?.length ?? 0) > 0 && !!F : L.length > 0 || !!R),
50
+ ), T = I(
51
+ () => be.filter((e) => e.key === "tool" ? k.length > 0 || (y?.length ?? 0) > 0 : e.key === "variable" ? (D?.length ?? 0) > 0 && !!G : O.length > 0 || !!R),
53
52
  [
54
53
  k.length,
55
- L.length,
54
+ O.length,
56
55
  R,
57
56
  y?.length,
58
- G?.length,
59
- F
57
+ D?.length,
58
+ G
60
59
  ]
61
- ), P = _.length === 1 ? _[0].key : null, a = ie ?? P, h = a ? a === "subagent" ? (
60
+ ), _ = T.length === 1 ? T[0].key : null, a = oe ?? _, h = a ? a === "subagent" ? (
62
61
  // Always titled — with a back arrow only when the category chooser is above.
63
62
  {
64
63
  title: "Sub-agent",
65
- onBack: P ? void 0 : () => O(null)
64
+ onBack: _ ? void 0 : () => $(null)
66
65
  }
67
66
  ) : a === "variable" ? {
68
67
  title: "Variables",
69
- onBack: P ? void 0 : () => O(null)
68
+ onBack: _ ? void 0 : () => $(null)
70
69
  } : i === v ? {
71
- title: te,
70
+ title: ee,
72
71
  onBack: () => S(null),
73
- icon: oe
72
+ icon: ne
74
73
  } : i ? {
75
- title: H(i, B),
74
+ title: Y(i),
76
75
  // Deep-linked to a source (opened from a right-panel source button):
77
76
  // that source IS the root, so no back arrow. Otherwise back returns to
78
77
  // the "More Integrations" umbrella for a vendor that lives under it,
79
78
  // else to the source chooser.
80
- onBack: J ? void 0 : () => S(
81
- q(i) ? v : null
79
+ onBack: H ? void 0 : () => S(
80
+ z(i) ? v : null
82
81
  ),
83
- icon: D(i)
82
+ icon: q(i)
84
83
  } : (
85
84
  // Always titled — matches the Sub-agent header; back arrow only when the
86
85
  // category chooser is above (i.e. not the sole category).
87
86
  {
88
87
  title: "Tools",
89
- onBack: P ? void 0 : () => O(null)
88
+ onBack: _ ? void 0 : () => $(null)
90
89
  }
91
90
  ) : null, d = I(() => {
92
91
  if (!a)
93
- return _.map((r) => ({
92
+ return T.map((r) => ({
94
93
  id: r.key,
95
94
  label: r.label,
96
95
  drillsIn: !0,
97
96
  onActivate: () => {
98
- O(r.key), S(null);
97
+ $(r.key), S(null);
99
98
  }
100
99
  }));
101
100
  if (a === "subagent") {
102
- const r = E.trim().toLowerCase(), p = L.filter((g) => !r || A(g).toLowerCase().includes(r)).map((g) => ({
101
+ const r = E.trim().toLowerCase(), p = O.filter((g) => !r || A(g).toLowerCase().includes(r)).map((g) => ({
103
102
  id: String(g.id),
104
103
  label: A(g),
105
104
  drillsIn: !1,
106
- onActivate: () => C(g)
105
+ onActivate: () => L(g)
107
106
  }));
108
107
  return R && p.push({
109
- id: Ie,
108
+ id: ye,
110
109
  label: "Create new",
111
110
  drillsIn: !1,
112
111
  isCreate: !0,
@@ -118,75 +117,75 @@ const oe = {
118
117
  if (a === "variable")
119
118
  return [];
120
119
  if (!i || i === v) {
121
- const r = (y ?? []).map((t) => t.source).filter((t) => !U.includes(t)), p = [...U, ...r], g = (t) => {
122
- const l = V.get(t);
123
- if ((l !== void 0 ? l.connected : K?.[t]) === !1)
120
+ const r = (y ?? []).map((t) => t.source).filter((t) => !F.includes(t)), p = [...F, ...r], g = (t) => {
121
+ const l = U.get(t);
122
+ if ((l !== void 0 ? l.connected : J?.[t]) === !1)
124
123
  return {
125
124
  id: t,
126
- label: H(t, B),
125
+ label: Y(t),
127
126
  drillsIn: !1,
128
- icon: D(t) ?? l?.icon,
127
+ icon: q(t) ?? l?.icon,
129
128
  rightLabel: "Connect",
130
129
  onActivate: () => {
131
- w?.(), l?.onConnect ? l.onConnect() : Q?.(t);
130
+ w?.(), l?.onConnect ? l.onConnect() : K?.(t);
132
131
  }
133
132
  };
134
- const ee = k.filter(
135
- (N) => (b(N)?.source ?? "other") === t
133
+ const Z = k.filter(
134
+ (P) => (b(P)?.source ?? "other") === t
136
135
  );
137
- if (ee.length + (l ? 1 : 0) === 1 && !(l === void 0 && ke(t))) {
138
- const N = D(t) ?? l?.icon;
136
+ if (Z.length + (l ? 1 : 0) === 1 && !(l === void 0 && me(t))) {
137
+ const P = q(t) ?? l?.icon;
139
138
  if (l)
140
139
  return {
141
140
  id: t,
142
141
  label: l.label,
143
142
  drillsIn: !1,
144
- icon: N,
143
+ icon: P,
145
144
  onActivate: () => {
146
145
  w?.(), l.onSelect();
147
146
  }
148
147
  };
149
- const M = ee[0];
148
+ const N = Z[0];
150
149
  return {
151
- id: String(M.id),
152
- label: A(M),
150
+ id: String(N.id),
151
+ label: A(N),
153
152
  drillsIn: !1,
154
- icon: N,
155
- authRequired: b(M)?.authRequired,
156
- onActivate: () => C(M)
153
+ icon: P,
154
+ authRequired: b(N)?.authRequired,
155
+ onActivate: () => L(N)
157
156
  };
158
157
  }
159
158
  return {
160
159
  id: t,
161
- label: H(t, B),
160
+ label: Y(t),
162
161
  drillsIn: !0,
163
- icon: D(t) ?? l?.icon,
162
+ icon: q(t) ?? l?.icon,
164
163
  onActivate: () => S(t)
165
164
  };
166
165
  };
167
166
  if (i === v)
168
- return p.filter((t) => q(t)).sort((t, l) => Y(t) - Y(l)).map(g);
169
- const Z = p.filter((t) => !q(t)).map((t) => ({ row: g(t), rank: Y(t) }));
170
- return p.some((t) => q(t)) && Z.push({
171
- rank: ve,
167
+ return p.filter((t) => z(t)).sort((t, l) => j(t) - j(l)).map(g);
168
+ const X = p.filter((t) => !z(t)).map((t) => ({ row: g(t), rank: j(t) }));
169
+ return p.some((t) => z(t)) && X.push({
170
+ rank: xe,
172
171
  row: {
173
172
  id: v,
174
- label: te,
173
+ label: ee,
175
174
  drillsIn: !0,
176
- icon: oe,
175
+ icon: ne,
177
176
  onActivate: () => S(v)
178
177
  }
179
- }), Z.sort((t, l) => t.rank - l.rank).map((t) => t.row);
178
+ }), X.sort((t, l) => t.rank - l.rank).map((t) => t.row);
180
179
  }
181
180
  const e = E.trim().toLowerCase(), n = k.filter((r) => (b(r)?.source ?? "other") === i).filter((r) => !e || A(r).toLowerCase().includes(e)).map((r) => ({
182
181
  id: String(r.id),
183
182
  label: A(r),
184
183
  drillsIn: !1,
185
184
  authRequired: b(r)?.authRequired,
186
- onActivate: () => C(r)
187
- })), f = V.get(i);
185
+ onActivate: () => L(r)
186
+ })), f = U.get(i);
188
187
  if (f) {
189
- const r = i in xe;
188
+ const r = i in ke;
190
189
  n.push({
191
190
  id: `create:${i}`,
192
191
  label: f.label,
@@ -200,27 +199,26 @@ const oe = {
200
199
  return n;
201
200
  }, [
202
201
  a,
203
- _,
202
+ T,
204
203
  i,
205
204
  E,
206
205
  k,
206
+ O,
207
+ F,
207
208
  L,
208
- U,
209
- C,
210
209
  w,
211
210
  R,
212
211
  y,
213
- V,
214
- K,
215
- Q,
216
- B
212
+ U,
213
+ J,
214
+ K
217
215
  ]);
218
- j(() => m(-1), [a, i, E, s]), j(() => W(""), [a, i]);
219
- const X = he({ rows: d, activeIndex: T, header: h });
220
- X.current = { rows: d, activeIndex: T, header: h }, j(() => {
221
- if ($)
222
- return $((e) => {
223
- const { rows: n, activeIndex: f, header: r } = X.current;
216
+ V(() => m(-1), [a, i, E, s]), V(() => Q(""), [a, i]);
217
+ const W = ue({ rows: d, activeIndex: B, header: h });
218
+ W.current = { rows: d, activeIndex: B, header: h }, V(() => {
219
+ if (C)
220
+ return C((e) => {
221
+ const { rows: n, activeIndex: f, header: r } = W.current;
224
222
  if (!n.length && e.key !== "ArrowLeft")
225
223
  return !1;
226
224
  switch (e.key) {
@@ -236,17 +234,17 @@ const oe = {
236
234
  default:
237
235
  return !1;
238
236
  }
239
- }), () => $(null);
240
- }, [$]);
241
- const le = a ? d.length && !d[0].drillsIn ? "items" : "sources" : "categories", ae = a === "tool" && !!i && i !== v || a === "subagent";
237
+ }), () => C(null);
238
+ }, [C]);
239
+ const ie = a ? d.length && !d[0].drillsIn ? "items" : "sources" : "categories", le = a === "tool" && !!i && i !== v || a === "subagent";
242
240
  return /* @__PURE__ */ x(
243
- Re,
241
+ Ie,
244
242
  {
245
- className: `bik-mention-picker bik-mention-picker--${le}`,
243
+ className: `bik-mention-picker bik-mention-picker--${ie}`,
246
244
  $fixedHeight: a === "variable",
247
245
  children: [
248
246
  h && /* @__PURE__ */ x(
249
- _e,
247
+ Te,
250
248
  {
251
249
  type: "button",
252
250
  onClick: h.onBack,
@@ -257,24 +255,24 @@ const oe = {
257
255
  },
258
256
  children: [
259
257
  h.onBack && /* @__PURE__ */ c(
260
- ue,
258
+ de,
261
259
  {
262
260
  width: 20,
263
261
  height: 20,
264
262
  color: o.content.primary
265
263
  }
266
264
  ),
267
- h.icon && re(h.icon),
268
- /* @__PURE__ */ x(pe, { children: [
265
+ h.icon && te(h.icon),
266
+ /* @__PURE__ */ x(he, { children: [
269
267
  " ",
270
268
  h.title
271
269
  ] })
272
270
  ]
273
271
  }
274
272
  ),
275
- ae && /* @__PURE__ */ x(Ae, { children: [
273
+ le && /* @__PURE__ */ x(Ee, { children: [
276
274
  /* @__PURE__ */ c(
277
- de,
275
+ se,
278
276
  {
279
277
  width: 20,
280
278
  height: 20,
@@ -282,15 +280,15 @@ const oe = {
282
280
  }
283
281
  ),
284
282
  /* @__PURE__ */ c(
285
- Ce,
283
+ Ae,
286
284
  {
287
285
  autoFocus: !0,
288
286
  value: E,
289
287
  placeholder: "Search",
290
288
  "data-test": "mention-picker-search",
291
- onChange: (e) => W(e.target.value),
289
+ onChange: (e) => Q(e.target.value),
292
290
  onKeyDown: (e) => {
293
- d.length && (e.key === "ArrowDown" ? (e.preventDefault(), m((n) => (n + 1) % d.length)) : e.key === "ArrowUp" ? (e.preventDefault(), m((n) => (n + d.length - 1) % d.length)) : e.key === "Enter" && (e.preventDefault(), (d[T] ?? d[0])?.onActivate()));
291
+ d.length && (e.key === "ArrowDown" ? (e.preventDefault(), m((n) => (n + 1) % d.length)) : e.key === "ArrowUp" ? (e.preventDefault(), m((n) => (n + d.length - 1) % d.length)) : e.key === "Enter" && (e.preventDefault(), (d[B] ?? d[0])?.onActivate()));
294
292
  }
295
293
  }
296
294
  )
@@ -301,51 +299,51 @@ const oe = {
301
299
  // fixed and only the variable list below scrolls. Selecting a
302
300
  // variable dismisses the menu FIRST (strips the typed "@" + query),
303
301
  // then hands the variable up to insert its `{{token}}` at the cursor.
304
- /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(
305
- ye,
302
+ /* @__PURE__ */ c(Se, { children: /* @__PURE__ */ c(
303
+ we,
306
304
  {
307
- type: be.EMBEDDED,
308
- data: G ?? [],
305
+ type: ge.EMBEDDED,
306
+ data: D ?? [],
309
307
  showRecommendedBar: !0,
310
308
  skipDefaultVariableContent: !0,
311
309
  onSelect: (e) => {
312
- w?.(), F?.(e);
310
+ w?.(), G?.(e);
313
311
  }
314
312
  }
315
313
  ) })
316
- ) : d.length === 0 ? /* @__PURE__ */ c(Pe, { children: a === "subagent" ? null : "No tools available" }) : /* @__PURE__ */ c(Se, { children: d.map((e, n) => /* @__PURE__ */ c(
317
- $e,
314
+ ) : d.length === 0 ? /* @__PURE__ */ c(_e, { children: a === "subagent" ? null : "No tools available" }) : /* @__PURE__ */ c(Re, { children: d.map((e, n) => /* @__PURE__ */ c(
315
+ Le,
318
316
  {
319
317
  type: "button",
320
- $active: n === T,
318
+ $active: n === B,
321
319
  onMouseEnter: () => m(n),
322
320
  onMouseLeave: () => m(-1),
323
321
  onClick: e.onActivate,
324
- children: e.isCreate ? /* @__PURE__ */ c(Le, { children: e.label }) : /* @__PURE__ */ x(ce, { children: [
325
- /* @__PURE__ */ x(Be, { children: [
326
- re(e.icon),
327
- /* @__PURE__ */ c(fe, { color: o.content.primary, children: e.label }),
322
+ children: e.isCreate ? /* @__PURE__ */ c(Oe, { children: e.label }) : /* @__PURE__ */ x(ae, { children: [
323
+ /* @__PURE__ */ x(Ce, { children: [
324
+ te(e.icon),
325
+ /* @__PURE__ */ c(pe, { color: o.content.primary, children: e.label }),
328
326
  e.authRequired && /* @__PURE__ */ c(
329
- ne,
327
+ re,
330
328
  {
331
329
  size: 14,
332
330
  "aria-label": "Requires customer verification"
333
331
  }
334
332
  )
335
333
  ] }),
336
- e.rightLabel ? /* @__PURE__ */ c(Te, { children: e.rightLabel }) : e.drillsIn && /* @__PURE__ */ c(se, { width: 12, height: 12 })
334
+ e.rightLabel ? /* @__PURE__ */ c(Be, { children: e.rightLabel }) : e.drillsIn && /* @__PURE__ */ c(ce, { width: 12, height: 12 })
337
335
  ] })
338
336
  },
339
337
  e.id
340
338
  )) }),
341
- d.some((e) => e.authRequired) && /* @__PURE__ */ x(Oe, { children: [
342
- /* @__PURE__ */ c(ne, { size: 16 }),
343
- /* @__PURE__ */ c(ge, { color: o.content.secondary, children: "Requires customer verification" })
339
+ d.some((e) => e.authRequired) && /* @__PURE__ */ x($e, { children: [
340
+ /* @__PURE__ */ c(re, { size: 16 }),
341
+ /* @__PURE__ */ c(fe, { color: o.content.secondary, children: "Requires customer verification" })
344
342
  ] })
345
343
  ]
346
344
  }
347
345
  );
348
- }, Re = u.div`
346
+ }, Ie = u.div`
349
347
  display: flex;
350
348
  flex-direction: column;
351
349
  min-width: 240px;
@@ -358,7 +356,7 @@ const oe = {
358
356
  border: 1px solid ${o.stroke.primary};
359
357
  border-radius: 4px;
360
358
  box-shadow: 0px -2px 8px 0px #0000001f;
361
- `, Se = u.div`
359
+ `, Re = u.div`
362
360
  flex: 1 1 auto;
363
361
  min-height: 0;
364
362
  overflow-y: auto;
@@ -367,7 +365,7 @@ const oe = {
367
365
  &::-webkit-scrollbar {
368
366
  display: none;
369
367
  }
370
- `, Ee = u.div`
368
+ `, Se = u.div`
371
369
  flex: 1 1 auto;
372
370
  min-height: 0;
373
371
 
@@ -382,14 +380,14 @@ const oe = {
382
380
  *::-webkit-scrollbar {
383
381
  display: none;
384
382
  }
385
- `, Ae = u.div`
383
+ `, Ee = u.div`
386
384
  display: flex;
387
385
  align-items: center;
388
386
  gap: 8px;
389
387
  padding: 10px 12px;
390
388
  flex-shrink: 0;
391
389
  border-bottom: 1px solid ${o.stroke.primary};
392
- `, Ce = u.input`
390
+ `, Ae = u.input`
393
391
  flex: 1;
394
392
  min-width: 0;
395
393
  border: none;
@@ -402,7 +400,7 @@ const oe = {
402
400
  &::placeholder {
403
401
  color: ${o.content.placeholder};
404
402
  }
405
- `, $e = u.button`
403
+ `, Le = u.button`
406
404
  display: flex;
407
405
  justify-content: space-between;
408
406
  align-items: center;
@@ -424,32 +422,32 @@ const oe = {
424
422
  &:hover {
425
423
  background: ${o.surface.hovered};
426
424
  }
427
- `, Be = u.div`
425
+ `, Ce = u.div`
428
426
  display: flex;
429
427
  align-items: center;
430
428
  gap: 12px;
431
429
  min-width: 0;
432
- `, Oe = u.div`
430
+ `, $e = u.div`
433
431
  display: flex;
434
432
  align-items: center;
435
433
  gap: 6px;
436
434
  padding: 8px 12px;
437
435
  border-top: 1px solid ${o.stroke.primary};
438
- `, Te = u.span`
436
+ `, Be = u.span`
439
437
  flex-shrink: 0;
440
438
  color: ${o.content.brand};
441
439
  font-family: Inter;
442
440
  font-size: 14px;
443
441
  font-weight: 600;
444
442
  white-space: nowrap;
445
- `, Le = u.div`
443
+ `, Oe = u.div`
446
444
  width: 100%;
447
445
  text-align: center;
448
446
  color: ${o.content.brand};
449
447
  font-family: Inter;
450
448
  font-size: 14px;
451
449
  font-weight: 600;
452
- `, _e = u.button`
450
+ `, Te = u.button`
453
451
  display: flex;
454
452
  align-items: center;
455
453
  padding: 12px 16px;
@@ -464,13 +462,13 @@ const oe = {
464
462
  box-sizing: border-box;
465
463
  flex-shrink: 0;
466
464
  gap: 4px;
467
- `, Pe = u.div`
465
+ `, _e = u.div`
468
466
  padding: 12px 10px;
469
467
  font-family: Inter;
470
468
  font-size: 13px;
471
469
  color: ${o.content.secondary};
472
470
  `;
473
471
  export {
474
- Ze as MentionPicker
472
+ Xe as MentionPicker
475
473
  };
476
474
  //# sourceMappingURL=MentionPicker.js.map