@epam/ai-dial-skills 1.3.0-dev.51 → 1.3.0-dev.56

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAqC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA+IxC,CAAC"}
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAwJxC,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
1
  ._row_1v431_1:hover,._row_1v431_1:focus-visible,._row_1v431_1[aria-selected=true]{background:var(--fs-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_1v431_8{color:var(--fs-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1v431_12{color:var(--fs-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1v431_16{color:var(--fs-star-color,var(--text-warning-icon,#eec840))}._footer_1v431_20{border-top-color:var(--fs-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1v431_28{animation:.2s ease-out _rowFadeIn_1v431_1}._rowLeaving_1v431_32{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1v431_1}@keyframes _rowFadeIn_1v431_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1v431_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1v431_60{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1v431_28,._rowLeaving_1v431_32{animation:none}._listContent_1v431_60{transition:none}}._background_1ult0_1{background:var(--ssf-bg)}._border_1ult0_5{border-color:var(--ssf-border)}._value_1ult0_9{color:var(--ssf-text)}._clear_1ult0_13{margin-block:-.5rem}._invalid_1ult0_17{color:var(--ssf-error,var(--text-error,#ae2f2f));border-color:var(--ssf-error,var(--text-error,#ae2f2f))}._invalid_1ult0_17 input{color:var(--ssf-error,var(--text-error,#ae2f2f))}
2
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.-me-1{margin-inline-end:-.25rem}.-ms-1{margin-inline-start:-.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-\[24px\]{height:24px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\2c calc\(100vw-2rem\)\)\]{width:min(var(--reference-width),calc(100vw - 2rem))}.w-full{width:100%}.min-w-0{min-width:0}.\!max-w-\[min\(95vw\2c 1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[550px\]{max-width:550px}.max-w-\[min\(550px\2c calc\(100vw-10px\)\)\]{max-width:min(550px,calc(100vw - 10px))}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pe-1{padding-inline-end:.25rem}.ps-1{padding-inline-start:.25rem}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-accent{color:var(--text-accent,#1d4ed8)}.text-error{color:var(--text-error,#ae2f2f)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-info:hover{background-color:var(--bg-info,#e1eaf9)}.focus-visible\:bg-info:focus-visible{background-color:var(--bg-info,#e1eaf9)}.active\:bg-info:active{background-color:var(--bg-info,#e1eaf9)}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:\!max-w-full{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}}
2
+ /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.-me-1{margin-inline-end:-.25rem}.-ms-1{margin-inline-start:-.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-\[24px\]{height:24px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\2c calc\(100vw-2rem\)\)\]{width:min(var(--reference-width),calc(100vw - 2rem))}.w-full{width:100%}.min-w-0{min-width:0}.\!max-w-\[min\(95vw\2c 1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[550px\]{max-width:550px}.max-w-\[min\(550px\2c calc\(100vw-10px\)\)\]{max-width:min(550px,calc(100vw - 10px))}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pe-1{padding-inline-end:.25rem}.ps-1{padding-inline-start:.25rem}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-accent{color:var(--text-accent,#1d4ed8)}.text-error{color:var(--text-error,#ae2f2f)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-info:hover{background-color:var(--bg-info,#e1eaf9)}.focus-visible\:bg-info:focus-visible{background-color:var(--bg-info,#e1eaf9)}.active\:bg-info:active{background-color:var(--bg-info,#e1eaf9)}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:\!max-w-full{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}}
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { DeploymentIcon as e, buildCssVars as t, isSkillSelectionUnsupported as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
2
  import { BASE_ICON_SIZE as i, Button as a, ButtonAppearance as o, ButtonVariant as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, FileDropzone as u, GhostButton as d, Highlight as f, InteractiveTooltip as p, InteractiveTooltipTrigger as m, Popup as h, PopupSize as g, Select as _, Spinner as v, ToggleIconButton as y, Tooltip as b, TooltipPlacement as x } from "@epam/ai-dial-ui-kit";
3
- import { Suspense as S, useCallback as C, useEffect as w, useId as T, useLayoutEffect as E, useMemo as D, useRef as O, useState as k } from "react";
4
- import { IconBlocks as ee, IconEye as A, IconLock as j, IconStarFilled as M, IconTrash as N } from "@tabler/icons-react";
5
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
6
- import { DialFileNodeType as L, DialFoldersTree as R } from "@epam/ai-dial-react-file-manager";
7
- import { CatalogContentNodeType as te, DetailsPanel as z } from "@epam/ai-dial-catalog";
3
+ import { Suspense as S, useCallback as C, useEffect as w, useId as T, useLayoutEffect as ee, useMemo as E, useRef as D, useState as O } from "react";
4
+ import { IconBlocks as te, IconEye as k, IconLock as A, IconStarFilled as j, IconTrash as M } from "@tabler/icons-react";
5
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
6
+ import { DialFileNodeType as I, DialFoldersTree as L } from "@epam/ai-dial-react-file-manager";
7
+ import { CatalogContentNodeType as R, DetailsPanel as z } from "@epam/ai-dial-catalog";
8
8
  //#region src/constants/public-class-names.ts
9
9
  var B = {
10
10
  selectorField: "dial-skills-selector-field",
@@ -14,31 +14,31 @@ var B = {
14
14
  return e.Deleted = "deleted", e.NotShared = "not-shared", e;
15
15
  }({}), H = ({ description: e, unsupportedMessage: t, unresolvedReason: n, deletedMessage: r, notSharedMessage: i, viewDetailsLabel: u = "View details", onViewDetails: d, viewDetailsTabIndex: f }) => {
16
16
  if (n != null) {
17
- let e = n === V.Deleted, t = e ? N : j, a = e ? r : i;
18
- return /* @__PURE__ */ I("div", {
17
+ let e = n === V.Deleted, t = e ? M : A, a = e ? r : i;
18
+ return /* @__PURE__ */ F("div", {
19
19
  className: "flex flex-row items-center gap-2",
20
- children: [/* @__PURE__ */ F(t, {
20
+ children: [/* @__PURE__ */ P(t, {
21
21
  size: c.MD,
22
22
  stroke: l,
23
23
  "aria-hidden": !0,
24
24
  className: "shrink-0 text-secondary"
25
- }), /* @__PURE__ */ F("p", {
25
+ }), /* @__PURE__ */ P("p", {
26
26
  className: "dial-tiny-text text-start text-primary",
27
27
  children: a
28
28
  })]
29
29
  });
30
30
  }
31
- return t == null ? /* @__PURE__ */ I("div", {
31
+ return t == null ? /* @__PURE__ */ F("div", {
32
32
  className: "flex flex-col gap-3",
33
- children: [e != null && e !== "" && /* @__PURE__ */ F("p", {
33
+ children: [e != null && e !== "" && /* @__PURE__ */ P("p", {
34
34
  className: "text-start",
35
35
  children: e
36
- }), /* @__PURE__ */ F(a, {
36
+ }), /* @__PURE__ */ P(a, {
37
37
  variant: s.Primary,
38
38
  appearance: o.Link,
39
39
  className: "h-[24px] self-start",
40
40
  label: u,
41
- iconBefore: /* @__PURE__ */ F(A, {
41
+ iconBefore: /* @__PURE__ */ P(k, {
42
42
  size: c.SM,
43
43
  stroke: l,
44
44
  "aria-hidden": !0
@@ -46,46 +46,49 @@ var B = {
46
46
  onClick: d,
47
47
  tabIndex: f
48
48
  })]
49
- }) : /* @__PURE__ */ F("p", {
49
+ }) : /* @__PURE__ */ P("p", {
50
50
  className: "text-start",
51
51
  children: t
52
52
  });
53
53
  }, U = ({ name: e, path: t, description: n, isUnsupported: i = !1, unresolvedReason: a, labelClassName: o = "dial-body-paragraph-text text-accent", unsupportedLabelClassName: s = "text-error", unsupportedClassName: c = "bg-error", detailsTrigger: l = "hover", onViewDetails: u, labels: d = {} }) => {
54
- let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: h = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = k(0), b = l === "click", S = () => {
54
+ let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: h = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = O(0), b = l === "click", S = () => {
55
55
  y((e) => e + 1), u(t);
56
- }, C = O(null), [w, T] = k(null);
57
- return E(() => {
58
- let e = C.current, t = () => T(e?.getBoundingClientRect().width ?? null);
59
- if (t(), !e || typeof ResizeObserver > "u") return;
60
- let n = new ResizeObserver(t);
61
- return n.observe(e), () => n.disconnect();
62
- }, [o]), /* @__PURE__ */ F(p, {
56
+ }, [C, w] = O(null), [T, E] = O(null);
57
+ return ee(() => {
58
+ if (!C) return;
59
+ let e = () => {
60
+ C.isConnected && E(C.getBoundingClientRect().width);
61
+ };
62
+ if (e(), typeof ResizeObserver > "u") return;
63
+ let t = new ResizeObserver(e);
64
+ return t.observe(C), () => t.disconnect();
65
+ }, [C, o]), /* @__PURE__ */ P(p, {
63
66
  asChild: !0,
64
67
  placement: x.Top,
65
68
  trigger: b ? m.Click : m.Hover,
66
69
  contentClassName: "max-w-[min(550px,calc(100vw-10px))]",
67
- content: a == null ? i ? /* @__PURE__ */ F(H, { unsupportedMessage: h }) : /* @__PURE__ */ F(H, {
70
+ content: a == null ? i ? /* @__PURE__ */ P(H, { unsupportedMessage: h }) : /* @__PURE__ */ P(H, {
68
71
  description: n,
69
72
  viewDetailsLabel: f,
70
73
  onViewDetails: S
71
- }) : /* @__PURE__ */ F(H, {
74
+ }) : /* @__PURE__ */ P(H, {
72
75
  unresolvedReason: a,
73
76
  deletedMessage: g,
74
77
  notSharedMessage: _
75
78
  }),
76
- children: /* @__PURE__ */ I("span", {
79
+ children: /* @__PURE__ */ F("span", {
77
80
  tabIndex: 0,
78
81
  className: r("relative -me-1 -ms-1 inline cursor-pointer select-text rounded-full pe-1 ps-1", i ? c : "hover:bg-info focus-visible:bg-info active:bg-info", i ? r(o, s) : o, B.chip),
79
82
  "aria-label": `/${e}`,
80
- children: [/* @__PURE__ */ F("span", {
81
- ref: C,
83
+ children: [/* @__PURE__ */ P("span", {
84
+ ref: w,
82
85
  "aria-hidden": !0,
83
86
  className: "inset-inline-start-0 pointer-events-none absolute top-0 select-none",
84
87
  children: "/"
85
- }), /* @__PURE__ */ F("span", {
88
+ }), /* @__PURE__ */ P("span", {
86
89
  "aria-hidden": !0,
87
90
  className: "select-none",
88
- style: { paddingInlineStart: w ?? void 0 },
91
+ style: { paddingInlineStart: T ?? void 0 },
89
92
  children: e
90
93
  })]
91
94
  })
@@ -102,13 +105,13 @@ var B = {
102
105
  rowFadeOut: "_rowFadeOut_1v431_1",
103
106
  listContent: "_listContent_1v431_60"
104
107
  }, G = "px-3 pb-0.5 pt-2", ne = 180, re = 288, K = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: m, listboxId: h, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: b, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: C = "dial-small-text" }) => {
105
- let { myCollectionLabel: D = "My Collection", emptyHintLabel: ee = "Star a skill to pin it here", browseLabel: A = "Browse", removeFromFavoritesLabel: j = "Remove from favorites", viewDetailsLabel: N = "View details", noMatchingSkillsLabel: P = "No matching skills" } = v, L = t({
108
+ let { myCollectionLabel: E = "My Collection", emptyHintLabel: te = "Star a skill to pin it here", browseLabel: k = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: M = "View details", noMatchingSkillsLabel: N = "No matching skills" } = v, I = t({
106
109
  "--fs-row-hover-bg": b?.rowHoverBackground,
107
110
  "--fs-header-text": b?.headerText,
108
111
  "--fs-empty-hint-text": b?.emptyHintText,
109
112
  "--fs-star-color": b?.starColor,
110
113
  "--fs-footer-border": b?.footerBorder
111
- }), [R, te] = k(/* @__PURE__ */ new Set()), z = O(/* @__PURE__ */ new Map());
114
+ }), [L, R] = O(/* @__PURE__ */ new Set()), z = D(/* @__PURE__ */ new Map());
112
115
  w(() => {
113
116
  let e = z.current;
114
117
  return () => {
@@ -117,43 +120,43 @@ var B = {
117
120
  }, []);
118
121
  let V = h != null, U = _ && !V, K = V || U ? "none" : void 0, q = "button";
119
122
  V ? q = "option" : U && (q = "menuitem");
120
- let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = O(null), [$, ie] = k();
121
- E(() => {
123
+ let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = D(null), [$, ie] = O();
124
+ ee(() => {
122
125
  Q.current && ie(Math.min(Q.current.scrollHeight, re));
123
126
  }, [n, m]);
124
127
  let ae = (e, t) => {
125
128
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
126
129
  }, oe = (e) => {
127
- te((t) => new Set(t).add(e));
130
+ R((t) => new Set(t).add(e));
128
131
  let t = setTimeout(() => {
129
- a?.(e), te((t) => {
132
+ a?.(e), R((t) => {
130
133
  let n = new Set(t);
131
134
  return n.delete(e), n;
132
135
  }), z.current.delete(e);
133
136
  }, ne);
134
137
  z.current.set(e, t);
135
138
  };
136
- return /* @__PURE__ */ I("div", {
139
+ return /* @__PURE__ */ F("div", {
137
140
  className: r("flex w-full flex-col desktop:w-[280px]", l, B.favoritesPanel),
138
- style: L,
141
+ style: I,
139
142
  children: [
140
- /* @__PURE__ */ F("p", {
143
+ /* @__PURE__ */ P("p", {
141
144
  id: J,
142
145
  className: r(S, G, W.header),
143
- children: D
146
+ children: E
144
147
  }),
145
- /* @__PURE__ */ F("div", {
148
+ /* @__PURE__ */ P("div", {
146
149
  className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", W.listContent),
147
150
  style: { maxHeight: $ },
148
- children: /* @__PURE__ */ F("div", {
151
+ children: /* @__PURE__ */ P("div", {
149
152
  ref: Q,
150
- children: Z.length > 0 ? /* @__PURE__ */ F("ul", {
153
+ children: Z.length > 0 ? /* @__PURE__ */ P("ul", {
151
154
  id: h,
152
155
  role: V ? "listbox" : K,
153
156
  "aria-labelledby": V ? J : void 0,
154
157
  className: "flex flex-col gap-1 px-1 pb-1",
155
158
  children: Z.map((t) => {
156
- let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ I("div", {
159
+ let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ F("div", {
157
160
  role: q,
158
161
  id: n,
159
162
  "aria-selected": V ? n === g : void 0,
@@ -163,26 +166,26 @@ var B = {
163
166
  onClick: () => i(t),
164
167
  onKeyDown: (e) => ae(e, t),
165
168
  children: [
166
- /* @__PURE__ */ F(e, {
169
+ /* @__PURE__ */ P(e, {
167
170
  size: c.MD,
168
171
  initialsName: t.name
169
172
  }),
170
- m == null ? /* @__PURE__ */ F("span", {
173
+ m == null ? /* @__PURE__ */ P("span", {
171
174
  className: r(x, "min-w-0 flex-1 truncate text-start"),
172
175
  children: t.name
173
- }) : /* @__PURE__ */ F(f, {
176
+ }) : /* @__PURE__ */ P(f, {
174
177
  text: t.name,
175
178
  query: m,
176
179
  maxLines: 1,
177
180
  className: r(x, "min-w-0 flex-1 text-start")
178
181
  }),
179
- a && /* @__PURE__ */ F(y, {
180
- icon: /* @__PURE__ */ F(M, {
182
+ a && /* @__PURE__ */ P(y, {
183
+ icon: /* @__PURE__ */ P(j, {
181
184
  size: c.SM,
182
185
  className: W.star,
183
186
  "aria-hidden": !0
184
187
  }),
185
- "aria-label": j,
188
+ "aria-label": A,
186
189
  isSelected: !0,
187
190
  tabIndex: o,
188
191
  onClick: (e) => {
@@ -191,15 +194,15 @@ var B = {
191
194
  })
192
195
  ]
193
196
  });
194
- return /* @__PURE__ */ F("li", {
197
+ return /* @__PURE__ */ P("li", {
195
198
  role: K,
196
- className: R.has(t.id) ? W.rowLeaving : W.rowEnter,
197
- children: s ? /* @__PURE__ */ F(p, {
199
+ className: L.has(t.id) ? W.rowLeaving : W.rowEnter,
200
+ children: s ? /* @__PURE__ */ P(p, {
198
201
  asChild: !0,
199
202
  contentClassName: "max-w-[550px]",
200
- content: /* @__PURE__ */ F(H, {
203
+ content: /* @__PURE__ */ P(H, {
201
204
  description: t.description,
202
- viewDetailsLabel: N,
205
+ viewDetailsLabel: M,
203
206
  onViewDetails: () => s(t),
204
207
  viewDetailsTabIndex: o
205
208
  }),
@@ -207,22 +210,22 @@ var B = {
207
210
  }) : l
208
211
  }, t.id);
209
212
  })
210
- }) : Y && X !== "" ? /* @__PURE__ */ F("p", {
213
+ }) : Y && X !== "" ? /* @__PURE__ */ P("p", {
211
214
  role: "status",
212
215
  "aria-live": "polite",
213
216
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
214
- children: P
215
- }) : /* @__PURE__ */ F("p", {
217
+ children: N
218
+ }) : /* @__PURE__ */ P("p", {
216
219
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
217
- children: ee
220
+ children: te
218
221
  })
219
222
  })
220
223
  }),
221
- /* @__PURE__ */ F("div", {
224
+ /* @__PURE__ */ P("div", {
222
225
  className: r("border-t px-2 py-3", W.footer),
223
- children: /* @__PURE__ */ F(d, {
226
+ children: /* @__PURE__ */ P(d, {
224
227
  role: U ? "menuitem" : void 0,
225
- label: A,
228
+ label: k,
226
229
  className: "w-full justify-center",
227
230
  onClick: o
228
231
  })
@@ -231,19 +234,19 @@ var B = {
231
234
  });
232
235
  }, q = ".zip,.md", J = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = q, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
233
236
  let { dialogTitle: c = "Upload skill", dropZoneLabel: l = "Drag and drop it or click here to upload", dropZoneMobileLabel: d = "Click here to upload", formatsLabel: f = "File formats .zip and SKILL.md", fileInputAriaLabel: p = "Upload a skill ZIP archive or a SKILL.md file", closeAriaLabel: m = "Close", uploadingAriaLabel: _ = "Uploading skill" } = i ?? {};
234
- return /* @__PURE__ */ F(h, {
237
+ return /* @__PURE__ */ P(h, {
235
238
  open: e,
236
239
  size: g.Sm,
237
240
  header: c,
238
241
  closeAriaLabel: m,
239
242
  onClose: a,
240
- children: /* @__PURE__ */ I("div", {
243
+ children: /* @__PURE__ */ F("div", {
241
244
  className: "flex flex-col gap-4 px-6 py-4",
242
- children: [/* @__PURE__ */ F(u, {
243
- label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
245
+ children: [/* @__PURE__ */ P(u, {
246
+ label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
244
247
  className: "desktop:hidden",
245
248
  children: d
246
- }), /* @__PURE__ */ F("span", {
249
+ }), /* @__PURE__ */ P("span", {
247
250
  className: "hidden desktop:inline",
248
251
  children: l
249
252
  })] }),
@@ -254,55 +257,55 @@ var B = {
254
257
  errorText: n ? void 0 : t,
255
258
  onChange: o,
256
259
  onReject: s
257
- }), n && /* @__PURE__ */ F(v, { ariaLabel: _ })]
260
+ }), n && /* @__PURE__ */ P(v, { ariaLabel: _ })]
258
261
  })
259
262
  });
260
- }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ F(h, {
263
+ }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ P(h, {
261
264
  open: e,
262
265
  header: r,
263
266
  size: g.Lg,
264
267
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden mobile:h-full mobile:!max-w-full mobile:rounded-none",
265
268
  overlayClassName: "mobile:p-0",
266
269
  onClose: t,
267
- children: /* @__PURE__ */ F("div", {
270
+ children: /* @__PURE__ */ P("div", {
268
271
  className: "h-[min(80vh,840px)] overflow-auto mobile:h-full",
269
- children: /* @__PURE__ */ F(S, {
272
+ children: /* @__PURE__ */ P(S, {
270
273
  fallback: null,
271
274
  children: e && i(n, t)
272
275
  })
273
276
  })
274
- }), X = (e, t = null) => e.map((e) => e.type === te.Folder ? {
277
+ }), X = (e, t = null) => e.map((e) => e.type === R.Folder ? {
275
278
  path: e.id,
276
279
  name: e.name,
277
- nodeType: L.FOLDER,
280
+ nodeType: I.FOLDER,
278
281
  parentPath: t,
279
282
  folderId: e.id,
280
283
  items: X(e.items, e.id)
281
284
  } : {
282
285
  path: e.id,
283
286
  name: e.name,
284
- nodeType: L.ITEM,
287
+ nodeType: I.ITEM,
285
288
  parentPath: t,
286
289
  folderId: t ?? ""
287
- }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ F(R, {
288
- items: D(() => X(e), [e]),
290
+ }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ P(L, {
291
+ items: E(() => X(e), [e]),
289
292
  showFiles: !0,
290
293
  areHiddenFilesVisible: !0,
291
294
  selectedPath: t,
292
- expandedPaths: D(() => new Set(n), [n]),
295
+ expandedPaths: E(() => new Set(n), [n]),
293
296
  onExpandedPathsChange: (e) => {
294
297
  for (let t of e) n.has(t) || r(t);
295
298
  for (let t of n) e.has(t) || r(t);
296
299
  },
297
300
  onItemClick: (e) => {
298
- e.nodeType === L.ITEM && i(e.path);
301
+ e.nodeType === I.ITEM && i(e.path);
299
302
  },
300
303
  ariaLabel: o,
301
304
  autoFocus: !0,
302
305
  onEscape: a
303
- }), Q = (e) => /* @__PURE__ */ F(z, {
306
+ }), Q = (e) => /* @__PURE__ */ P(z, {
304
307
  ...e,
305
- renderContentFileTree: (e) => /* @__PURE__ */ F(Z, { ...e })
308
+ renderContentFileTree: (e) => /* @__PURE__ */ P(Z, { ...e })
306
309
  }), $ = (e) => e == null || /[\s/]/.test(e), ie = (e, t, n) => {
307
310
  let r = [], i = 0;
308
311
  return t.forEach((t, a) => {
@@ -380,11 +383,11 @@ var B = {
380
383
  let r = e.indexOf(n, Math.max(0, t.start - n.length)), i = t.start + t.insertedLength - n.length;
381
384
  return r !== -1 && r <= i ? r : void 0;
382
385
  }, fe = () => {
383
- let [e, t] = k(""), [n, r] = k([]), i = O(e);
386
+ let [e, t] = O(""), [n, r] = O([]), i = D(e);
384
387
  i.current = e;
385
- let a = O(n);
388
+ let a = D(n);
386
389
  a.current = n;
387
- let o = O(null), s = C((e) => {
390
+ let o = D(null), s = C((e) => {
388
391
  let n = oe(i.current, e), a = o.current;
389
392
  o.current = null;
390
393
  let s = a == null ? void 0 : de(e, n, a.text);
@@ -403,7 +406,7 @@ var B = {
403
406
  }, []), l = C((e, n, a) => {
404
407
  let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
405
408
  i.current = c, t(c), r((t) => ce(t, a, e, n, !1));
406
- }, []), u = C((e) => le(a.current, e), []), d = D(() => {
409
+ }, []), u = C((e) => le(a.current, e), []), d = E(() => {
407
410
  if (n.length !== 0) return n.map((e) => ({ url: e.url }));
408
411
  }, [n]), f = C((e, t) => {
409
412
  o.current = t.length > 0 ? {
@@ -424,7 +427,7 @@ var B = {
424
427
  };
425
428
  }));
426
429
  }, []);
427
- return D(() => ({
430
+ return E(() => ({
428
431
  draft: e,
429
432
  anchors: n,
430
433
  onDraftChange: s,
@@ -458,7 +461,7 @@ var B = {
458
461
  let t = e.split("/").filter((e) => e.length > 0);
459
462
  return t[0] !== "skills" || t.length < 3 ? null : t[1];
460
463
  }, ge = (e, t) => he(e) === t ? V.Deleted : V.NotShared, _e = "/", ve = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionLabelClassName: d = "text-accent", activeMentionDetailsTrigger: f, historyDetailsTrigger: p, renderCatalogContent: m, detailsPanelComponent: h }) => {
461
- let { addMenuLabel: g = "Skills", backLabel: _ = "Back", catalogModalTitleLabel: v = "Use skill", emptyQueryHintLabel: y = "Type to filter", deletedTooltipLabel: b, notSharedTooltipLabel: x, unsupportedTooltipLabel: w, panelLabels: T } = c ?? {}, [E, A] = k(!1), [j, M] = k(null), [N, P] = k(0), I = O(null), [L, R] = k(0), [te, z] = k(void 0), B = fe(), V = D(() => [
464
+ let { addMenuLabel: g = "Skills", backLabel: _ = "Back", catalogModalTitleLabel: v = "Use skill", emptyQueryHintLabel: y = "Type to filter", deletedTooltipLabel: b, notSharedTooltipLabel: x, unsupportedTooltipLabel: w, panelLabels: T } = c ?? {}, [ee, k] = O(!1), [A, j] = O(null), [M, N] = O(0), F = D(null), [I, L] = O(0), [R, z] = O(void 0), B = fe(), V = E(() => [
462
465
  ...t,
463
466
  ...n ?? [],
464
467
  ...r ?? []
@@ -466,18 +469,18 @@ var B = {
466
469
  t,
467
470
  n,
468
471
  r
469
- ]), H = D(() => new Map(V.map((e) => [e.url, e])), [V]), W = C((e) => H.get(e)?.name ?? me(e), [H]), G = D(() => V.filter((e) => a.has(e.url)).map((e) => pe(e)), [V, a]), ne = B.anchors.length > 0 && !e, re = D(() => B.anchors.map((t) => ({
472
+ ]), H = E(() => new Map(V.map((e) => [e.url, e])), [V]), W = C((e) => H.get(e)?.name ?? me(e), [H]), G = E(() => V.filter((e) => a.has(e.url)).map((e) => pe(e)), [V, a]), ne = B.anchors.length > 0 && !e, re = E(() => B.anchors.map((t) => ({
470
473
  start: t.start,
471
474
  length: t.length,
472
475
  isUnsupported: !e,
473
- render: () => /* @__PURE__ */ F(U, {
476
+ render: () => /* @__PURE__ */ P(U, {
474
477
  name: t.name,
475
478
  path: t.url,
476
479
  labelClassName: d,
477
480
  description: H.get(t.url)?.description,
478
481
  isUnsupported: !e,
479
482
  detailsTrigger: f,
480
- onViewDetails: M,
483
+ onViewDetails: j,
481
484
  labels: {
482
485
  viewDetailsLabel: T?.viewDetailsLabel,
483
486
  unsupportedTooltipLabel: w
@@ -493,7 +496,7 @@ var B = {
493
496
  w
494
497
  ]), q = C((e, t, n) => {
495
498
  let r = B.insertMention(e, t, n);
496
- R((e) => e + 1), z(n + 1 + t.length + +!!r);
499
+ L((e) => e + 1), z(n + 1 + t.length + +!!r);
497
500
  }, [B]), J = C((e) => {
498
501
  let t = ue(B.draft, e, _e);
499
502
  return t == null ? e : (B.onDraftChange(B.draft.slice(0, t.start) + B.draft.slice(t.end)), t.start);
@@ -507,7 +510,7 @@ var B = {
507
510
  mentionUrl: n?.url
508
511
  };
509
512
  }, [B]), Z = C(() => {
510
- B.reset(), R((e) => e + 1), z(void 0);
513
+ B.reset(), L((e) => e + 1), z(void 0);
511
514
  }, [B]), { expectInsertion: Q } = B, $ = C((t) => {
512
515
  Q(t, e ? ae(t, V) : []);
513
516
  }, [
@@ -515,7 +518,7 @@ var B = {
515
518
  e,
516
519
  V
517
520
  ]), oe = C((e, t) => {
518
- B.seedFromMessage(e, t, W), R((e) => e + 1), z(void 0);
521
+ B.seedFromMessage(e, t, W), L((e) => e + 1), z(void 0);
519
522
  }, [B, W]), se = C((e, t) => {
520
523
  if (t == null || t.length === 0) return null;
521
524
  let n = ie(e, t, W), r = [], i = 0;
@@ -524,14 +527,14 @@ var B = {
524
527
  let a = t[n.skillIndex], s = H.get(a.url), c = s?.name ?? me(a.url), l = s == null ? ge(a.url, o) : void 0;
525
528
  r.push({
526
529
  text: e.slice(n.start, n.start + n.length),
527
- node: /* @__PURE__ */ F(U, {
530
+ node: /* @__PURE__ */ P(U, {
528
531
  name: c,
529
532
  path: a.url,
530
533
  labelClassName: u,
531
534
  description: s?.description,
532
535
  unresolvedReason: l,
533
536
  detailsTrigger: p,
534
- onViewDetails: M,
537
+ onViewDetails: j,
535
538
  labels: {
536
539
  viewDetailsLabel: T?.viewDetailsLabel,
537
540
  deletedTooltipLabel: b,
@@ -551,14 +554,14 @@ var B = {
551
554
  x
552
555
  ]), ce = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
553
556
  let t = H.get(e.url), n = t?.name ?? me(e.url), r = t == null ? ge(e.url, o) : void 0;
554
- return /* @__PURE__ */ F(U, {
557
+ return /* @__PURE__ */ P(U, {
555
558
  name: n,
556
559
  path: e.url,
557
560
  labelClassName: u,
558
561
  description: t?.description,
559
562
  unresolvedReason: r,
560
563
  detailsTrigger: p,
561
- onViewDetails: M,
564
+ onViewDetails: j,
562
565
  labels: {
563
566
  viewDetailsLabel: T?.viewDetailsLabel,
564
567
  deletedTooltipLabel: b,
@@ -573,7 +576,7 @@ var B = {
573
576
  o,
574
577
  b,
575
578
  x
576
- ]), le = C((e, t) => /* @__PURE__ */ F(K, {
579
+ ]), le = C((e, t) => /* @__PURE__ */ P(K, {
577
580
  favorites: G,
578
581
  isMenu: !0,
579
582
  onSelect: (n) => {
@@ -582,10 +585,10 @@ var B = {
582
585
  onToggleFavorite: s,
583
586
  onBrowse: () => {
584
587
  let n = X(t);
585
- P(J(t)), I.current = n ?? null, e(), A(!0);
588
+ N(J(t)), F.current = n ?? null, e(), k(!0);
586
589
  },
587
590
  onViewDetails: (n) => {
588
- J(t), e(), M(n.id);
591
+ J(t), e(), j(n.id);
589
592
  },
590
593
  labels: T
591
594
  }), [
@@ -597,10 +600,10 @@ var B = {
597
600
  T
598
601
  ]);
599
602
  return {
600
- skillMenuOverlay: D(() => e ? {
603
+ skillMenuOverlay: E(() => e ? {
601
604
  key: "skills",
602
605
  title: g,
603
- icon: /* @__PURE__ */ F(ee, {
606
+ icon: /* @__PURE__ */ P(te, {
604
607
  size: i,
605
608
  "aria-hidden": !0,
606
609
  stroke: l
@@ -613,12 +616,12 @@ var B = {
613
616
  _,
614
617
  le
615
618
  ]),
616
- commandMenu: D(() => e ? {
619
+ commandMenu: E(() => e ? {
617
620
  triggerPrefix: _e,
618
621
  menuLabel: g,
619
622
  emptyQueryHint: y,
620
623
  onTextPaste: $,
621
- renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(K, {
624
+ renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ P(K, {
622
625
  favorites: G,
623
626
  searchQuery: e,
624
627
  listboxId: r,
@@ -632,14 +635,14 @@ var B = {
632
635
  n({
633
636
  consumeQuery: !0,
634
637
  returnFocus: !1
635
- }), P(t), I.current = {
638
+ }), N(t), F.current = {
636
639
  position: t,
637
640
  text: r,
638
641
  mentionUrl: i?.url
639
- }, A(!0);
642
+ }, k(!0);
640
643
  },
641
644
  onViewDetails: (e) => {
642
- n({ consumeQuery: !0 }), M(e.id);
645
+ n({ consumeQuery: !0 }), j(e.id);
643
646
  },
644
647
  labels: T
645
648
  })
@@ -654,34 +657,34 @@ var B = {
654
657
  T,
655
658
  $
656
659
  ]),
657
- skillCatalogModal: /* @__PURE__ */ F(Y, {
658
- isOpen: E,
660
+ skillCatalogModal: /* @__PURE__ */ P(Y, {
661
+ isOpen: ee,
659
662
  onClose: C(() => {
660
- A(!1);
661
- let e = I.current;
662
- if (I.current = null, e == null) return;
663
+ k(!1);
664
+ let e = F.current;
665
+ if (F.current = null, e == null) return;
663
666
  let { position: t, text: n, mentionUrl: r } = e;
664
- r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), R((e) => e + 1), z(t + n.length);
667
+ r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), L((e) => e + 1), z(t + n.length);
665
668
  }, [B]),
666
669
  onSelect: (e) => {
667
- I.current = null, q(e, W(e), N), A(!1);
670
+ F.current = null, q(e, W(e), M), k(!1);
668
671
  },
669
672
  title: v,
670
673
  renderContent: m
671
674
  }),
672
- skillDetailsPanel: /* @__PURE__ */ F(S, {
675
+ skillDetailsPanel: /* @__PURE__ */ P(S, {
673
676
  fallback: null,
674
- children: /* @__PURE__ */ F(h, {
675
- skillId: j,
676
- onClose: () => M(null)
677
+ children: /* @__PURE__ */ P(h, {
678
+ skillId: A,
679
+ onClose: () => j(null)
677
680
  })
678
681
  }),
679
682
  message: B.draft,
680
- messageRevision: L,
683
+ messageRevision: I,
681
684
  activeMentions: re,
682
685
  onDraftChange: B.onDraftChange,
683
686
  onBackspaceAtCaret: B.onBackspaceAtCaret,
684
- caretPositionOverride: te,
687
+ caretPositionOverride: R,
685
688
  isSkillUnsupported: ne,
686
689
  selectedSkills: B.orderedSkills,
687
690
  resetSkillMentions: Z,
@@ -697,25 +700,25 @@ var B = {
697
700
  clear: "_clear_1ult0_13",
698
701
  invalid: "_invalid_1ult0_17"
699
702
  }, be = [], xe = "Selected model does not support skills. Select a different model to use a skill.", Se = ({ value: i, onChange: a, displayNames: o, skills: s = be, isSkillsSupported: l, isDisabled: u = !1, error: d, labels: p, className: m, styles: h }) => {
700
- let [g, v] = k(!1), [y, x] = k(""), S = O(null), C = T(), w = i.some((e) => n(e, l)), D = l && !u, ee = g && D, A = i.length > 0 ? p.unsupportedTooltipLabel : p.unavailableTooltipLabel ?? xe, j = !l && i.length === 0, M = d ?? (j ? A : void 0), N = new Map(i.map((e) => [e, {
703
+ let [g, v] = O(!1), [y, x] = O(""), S = D(null), C = T(), w = i.some((e) => n(e, l)), E = l && !u, te = g && E, k = i.length > 0 ? p.unsupportedTooltipLabel : p.unavailableTooltipLabel ?? xe, A = !l && i.length === 0, j = d ?? (A ? k : void 0), M = new Map(i.map((e) => [e, {
701
704
  id: e,
702
705
  name: o?.[e] || e
703
706
  }]));
704
- s.forEach((e) => N.set(e.id, e));
705
- let P = [...N.values()].map((t) => ({
707
+ s.forEach((e) => M.set(e.id, e));
708
+ let N = [...M.values()].map((t) => ({
706
709
  value: t.id,
707
710
  label: t.name,
708
- labelNode: y.trim() ? /* @__PURE__ */ F(f, {
711
+ labelNode: y.trim() ? /* @__PURE__ */ P(f, {
709
712
  text: t.name,
710
713
  query: y,
711
714
  maxLines: 1
712
715
  }) : void 0,
713
- icon: /* @__PURE__ */ F(e, {
716
+ icon: /* @__PURE__ */ P(e, {
714
717
  size: c.SM,
715
718
  initialsName: t.name
716
719
  }),
717
720
  disabled: !l
718
- })), L = {
721
+ })), I = {
719
722
  ...t({
720
723
  "--ssf-text": h?.colors?.text,
721
724
  "--ssf-bg": h?.colors?.background,
@@ -724,55 +727,55 @@ var B = {
724
727
  }),
725
728
  ...h?.cssVars
726
729
  };
727
- return E(() => {
730
+ return ee(() => {
728
731
  let e = S.current?.querySelector("[role=\"combobox\"]");
729
- e && (M ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
732
+ e && (j ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
730
733
  }, [
731
- M,
734
+ j,
732
735
  C,
733
736
  d,
734
737
  u,
735
738
  w
736
- ]), /* @__PURE__ */ I("div", {
739
+ ]), /* @__PURE__ */ F("div", {
737
740
  ref: S,
738
741
  className: r("min-w-0", m, B.selectorField),
739
- style: L,
740
- children: [/* @__PURE__ */ F(b, {
741
- tooltip: A,
742
+ style: I,
743
+ children: [/* @__PURE__ */ P(b, {
744
+ tooltip: k,
742
745
  hideTooltip: l,
743
746
  triggerClassName: "block w-full min-w-0",
744
- children: /* @__PURE__ */ F("div", {
747
+ children: /* @__PURE__ */ P("div", {
745
748
  inert: u ? !0 : void 0,
746
- children: /* @__PURE__ */ F(_, {
749
+ children: /* @__PURE__ */ P(_, {
747
750
  multiple: !0,
748
751
  searchable: !0,
749
- open: ee,
752
+ open: te,
750
753
  onOpenChange: (e) => {
751
- e && !D || v(e);
754
+ e && !E || v(e);
752
755
  },
753
756
  onSearchQueryChange: x,
754
757
  value: i,
755
758
  onChange: (e) => {
756
759
  u || a(Array.isArray(e) ? e : [e]);
757
760
  },
758
- options: P,
761
+ options: N,
759
762
  placeholder: p.placeholder,
760
763
  labelProps: { label: p.fieldLabel },
761
764
  error: d,
762
- caption: j ? A : void 0,
765
+ caption: A ? k : void 0,
763
766
  searchPlaceholder: p.searchPlaceholder ?? "Search skills",
764
767
  emptyStateTitle: y.trim() ? p.noMatchingSkillsLabel ?? "No matching skills" : p.emptyLabel ?? "No skills available",
765
- disabled: u || j,
768
+ disabled: u || A,
766
769
  invalid: !!d || w,
767
770
  className: "w-full min-w-0",
768
- fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in L && ye.background, "--ssf-border" in L && ye.border, "--ssf-text" in L && ye.value, (d || w) && ye.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
771
+ fieldClassName: r(E ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in I && ye.background, "--ssf-border" in I && ye.border, "--ssf-text" in I && ye.value, (d || w) && ye.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
769
772
  listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
770
773
  })
771
774
  })
772
- }), M && /* @__PURE__ */ F("span", {
775
+ }), j && /* @__PURE__ */ P("span", {
773
776
  id: C,
774
777
  className: "sr-only",
775
- children: M
778
+ children: j
776
779
  })]
777
780
  });
778
781
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-skills",
3
3
  "description": "Host-agnostic UI for picking a favorite skill to attach to a chat input",
4
- "version": "1.3.0-dev.51",
4
+ "version": "1.3.0-dev.56",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-catalog": "1.3.0-dev.51",
22
- "@epam/ai-dial-conversation-input": "1.3.0-dev.51"
21
+ "@epam/ai-dial-catalog": "1.3.0-dev.56",
22
+ "@epam/ai-dial-conversation-input": "1.3.0-dev.56"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.3.0-dev.51",
25
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.56",
26
26
  "@epam/ai-dial-react-file-manager": "^0.3.5",
27
27
  "@epam/ai-dial-ui-kit": "^0.15.4",
28
28
  "react": "^19.2.8"