@epam/ai-dial-skills 1.1.0-dev.438 → 1.1.0-dev.441

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.
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ChatSkillProps } from '../../models/chat-skill-props';
3
+ /** A used skill rendered as a `/name` ghost button with a description tooltip and a "View details" action. */
4
+ export declare const ChatSkill: FC<ChatSkillProps>;
5
+ //# sourceMappingURL=ChatSkill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,8GAA8G;AAC9G,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAkExC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAqCzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA4Q5D,CAAC"}
1
+ {"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAgQ5D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SkillInfoTooltipContentProps } from '../../models/skill-info-tooltip-content-props';
3
+ /** Inner content of a skill's interactive tooltip: the description above a "View details" link action. */
4
+ export declare const SkillInfoTooltipContent: FC<SkillInfoTooltipContentProps>;
5
+ //# sourceMappingURL=SkillInfoTooltipContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAElG,0GAA0G;AAC1G,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAwCpE,CAAC"}
@@ -2,9 +2,10 @@ import { UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult } from '.
2
2
  /**
3
3
  * Owns the Skills Add-menu flow: the favorites overlay with lazily resolved
4
4
  * row descriptions, the "Use skill" browse modal's open state, the skill
5
- * details side panel's open state, and the single selected skill shown as an
6
- * input chip. The host injects the listing data, favorites state, the
7
- * description fetch, labels, and the modal/panel components.
5
+ * details side panel's open state, and the single selected skill rendered as
6
+ * the input's inline `ChatSkill` element. The host injects the listing data,
7
+ * favorites state, the description fetch, labels, and the modal/panel
8
+ * components.
8
9
  */
9
10
  export declare const useSkillSelectorOverlay: ({ isEnabled, skills, sharedWithMe, publicSkills, favoriteIds, onToggleFavorite, fetchSkillDescription, labels, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
10
11
  //# sourceMappingURL=useSkillSelectorOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAAI,sLAWrC,8BAA8B,KAAG,6BAyNnC,CAAC"}
1
+ {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,sLAWrC,8BAA8B,KAAG,6BAiRnC,CAAC"}
package/index.d.ts CHANGED
@@ -1,11 +1,15 @@
1
+ export { ChatSkill } from './components/ChatSkill/ChatSkill';
1
2
  export { FavoriteSkillsPanel } from './components/FavoriteSkillsPanel/FavoriteSkillsPanel';
2
3
  export { SkillCatalogModal } from './components/SkillCatalogModal/SkillCatalogModal';
3
4
  export { SkillDetailsSidePanel } from './components/SkillDetailsSidePanel/SkillDetailsSidePanel';
5
+ export { SkillInfoTooltipContent } from './components/SkillInfoTooltipContent/SkillInfoTooltipContent';
4
6
  export { useSkillSelectorOverlay } from './hooks/useSkillSelectorOverlay/useSkillSelectorOverlay';
5
7
  export { buildFavoriteSkillItem } from './models/favorite-skill-item';
8
+ export type { ChatSkillLabels, ChatSkillProps, } from './models/chat-skill-props';
6
9
  export type { FavoriteSkillItem, SkillListingEntry, } from './models/favorite-skill-item';
7
10
  export type { FavoriteSkillsPanelColors, FavoriteSkillsPanelLabels, FavoriteSkillsPanelProps, } from './models/favorite-skills-panel-props';
8
11
  export type { SkillCatalogModalProps } from './models/skill-catalog-modal-props';
9
12
  export type { SkillDetailsSidePanelProps } from './models/skill-details-side-panel-props';
13
+ export type { SkillInfoTooltipContentProps } from './models/skill-info-tooltip-content-props';
10
14
  export type { SkillDetailsPanelComponentProps, SkillSelectorOverlayLabels, UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult, } from './models/skill-selector-overlay';
11
15
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EACV,eAAe,EACf,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,YAAY,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAC9F,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC"}
package/index.js CHANGED
@@ -1,10 +1,61 @@
1
- import { DeploymentIcon as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as r, Button as i, ButtonAppearance as a, ButtonVariant as o, DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, GhostButton as l, InteractiveTooltip as u, Popup as d, PopupSize as f, Spinner as p, ToggleIconButton as m } from "@epam/ai-dial-ui-kit";
3
- import { IconBlocks as h, IconEye as g, IconStarFilled as _ } from "@tabler/icons-react";
4
- import { Suspense as v, useCallback as y, useEffect as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w } from "react";
5
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
6
- import { DetailsPanel as D } from "@epam/ai-dial-catalog";
7
- var O = {
1
+ import { BASE_ICON_SIZE as e, Button as t, ButtonAppearance as n, ButtonVariant as r, DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, GhostButton as o, Highlight as s, InteractiveTooltip as c, Popup as l, PopupSize as u, Spinner as d, ToggleIconButton as f, TooltipPlacement as p } from "@epam/ai-dial-ui-kit";
2
+ import { Suspense as m, useCallback as h, useEffect as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b } from "react";
3
+ import { IconBlocks as x, IconEye as S, IconStarFilled as C } from "@tabler/icons-react";
4
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
5
+ import { DeploymentIcon as E, buildCssVars as D, mergeClasses as O } from "@epam/ai-dial-chat-shared";
6
+ import { DetailsPanel as k } from "@epam/ai-dial-catalog";
7
+ //#region src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx
8
+ var A = ({ description: e, isDescriptionLoading: o, viewDetailsLabel: s = "View details", onViewDetails: c }) => {
9
+ let l = e != null && e !== "";
10
+ return /* @__PURE__ */ T("div", {
11
+ className: "flex flex-col gap-3",
12
+ children: [
13
+ o && /* @__PURE__ */ w(d, { size: i.SM }),
14
+ !o && l && /* @__PURE__ */ w("p", {
15
+ className: "text-start",
16
+ children: e
17
+ }),
18
+ /* @__PURE__ */ w(t, {
19
+ variant: r.Primary,
20
+ appearance: n.Link,
21
+ className: "h-[24px] self-start",
22
+ label: s,
23
+ iconBefore: /* @__PURE__ */ w(S, {
24
+ size: i.SM,
25
+ stroke: a,
26
+ "aria-hidden": !0
27
+ }),
28
+ onClick: c
29
+ })
30
+ ]
31
+ });
32
+ }, j = ({ name: e, path: t, description: n, isDescriptionLoading: r, labelClassName: i = "dial-body-paragraph-text", onViewDetails: a, onTooltipOpen: s, labels: l = {} }) => {
33
+ let { viewDetailsLabel: u = "View details" } = l, [d, f] = b(0);
34
+ return /* @__PURE__ */ w(c, {
35
+ asChild: !0,
36
+ placement: p.Top,
37
+ contentClassName: "max-w-[550px]",
38
+ onOpenChange: (e) => {
39
+ e && s?.(t);
40
+ },
41
+ content: /* @__PURE__ */ w(A, {
42
+ description: n,
43
+ isDescriptionLoading: r,
44
+ viewDetailsLabel: u,
45
+ onViewDetails: () => {
46
+ f((e) => e + 1), a(t);
47
+ }
48
+ }),
49
+ children: /* @__PURE__ */ w("span", {
50
+ className: "inline-flex items-center",
51
+ children: /* @__PURE__ */ w(o, {
52
+ label: `/${e}`,
53
+ textClassName: i,
54
+ className: "h-auto px-2 py-0"
55
+ })
56
+ })
57
+ }, d);
58
+ }, M = {
8
59
  row: "_row_1ovug_1",
9
60
  header: "_header_1ovug_5",
10
61
  emptyHint: "_emptyHint_1ovug_9",
@@ -15,266 +66,274 @@ var O = {
15
66
  rowLeaving: "_rowLeaving_1ovug_29",
16
67
  rowFadeOut: "_rowFadeOut_1ovug_1",
17
68
  listContent: "_listContent_1ovug_57"
18
- }, k = "px-3 pb-0.5 pt-2", A = 180, j = 288, M = 300, N = ({ onOpen: e }) => {
19
- let t = C(e);
20
- return t.current = e, b(() => {
21
- t.current();
22
- }, []), null;
23
- }, P = ({ favorites: r, onSelect: d, onToggleFavorite: f, onBrowse: h, onViewDetails: v, onItemTooltipOpen: y, labels: S = {}, colors: D, nameClassName: P = "dial-small-text", headerClassName: F = "dial-tiny-lead-semi-text", emptyHintClassName: I = "dial-small-text" }) => {
24
- let { myCollectionLabel: L = "My Collection", emptyHintLabel: R = "Star a skill to pin it here", browseLabel: z = "Browse", removeFromFavoritesLabel: B = "Remove from favorites", viewDetailsLabel: V = "View details" } = S, H = t({
25
- "--fs-row-hover-bg": D?.rowHoverBackground,
26
- "--fs-header-text": D?.headerText,
27
- "--fs-empty-hint-text": D?.emptyHintText,
28
- "--fs-star-color": D?.starColor,
29
- "--fs-footer-border": D?.footerBorder
30
- }), [U, W] = w(/* @__PURE__ */ new Set()), G = C(/* @__PURE__ */ new Map()), [K, q] = w(null), J = C(void 0), Y = () => {
31
- clearTimeout(J.current), J.current = void 0;
32
- }, X = (e) => {
33
- Y(), q(e);
34
- }, Z = () => {
35
- Y(), J.current = setTimeout(() => {
36
- q(null), J.current = void 0;
37
- }, M);
38
- };
39
- b(() => {
40
- let e = G.current;
69
+ }, N = "px-3 pb-0.5 pt-2", P = 180, F = 288, I = ({ favorites: e, onSelect: t, onToggleFavorite: n, onBrowse: r, onViewDetails: a, onItemTooltipOpen: l, searchQuery: u, labels: d = {}, colors: p, nameClassName: m = "dial-small-text", headerClassName: h = "dial-tiny-lead-semi-text", emptyHintClassName: v = "dial-small-text" }) => {
70
+ let { myCollectionLabel: x = "My Collection", emptyHintLabel: S = "Star a skill to pin it here", browseLabel: k = "Browse", removeFromFavoritesLabel: j = "Remove from favorites", viewDetailsLabel: I = "View details", noMatchingSkillsLabel: L = "No matching skills" } = d, R = D({
71
+ "--fs-row-hover-bg": p?.rowHoverBackground,
72
+ "--fs-header-text": p?.headerText,
73
+ "--fs-empty-hint-text": p?.emptyHintText,
74
+ "--fs-star-color": p?.starColor,
75
+ "--fs-footer-border": p?.footerBorder
76
+ }), [z, B] = b(/* @__PURE__ */ new Set()), V = y(/* @__PURE__ */ new Map());
77
+ g(() => {
78
+ let e = V.current;
41
79
  return () => {
42
- e.forEach((e) => clearTimeout(e)), e.clear(), clearTimeout(J.current);
80
+ e.forEach((e) => clearTimeout(e)), e.clear();
43
81
  };
44
82
  }, []);
45
- let Q = C(null), [$, ee] = w();
46
- x(() => {
47
- Q.current && ee(Math.min(Q.current.scrollHeight, j));
48
- }, [r]);
49
- let te = (e, t) => {
50
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d(t));
51
- }, ne = (e) => {
52
- W((t) => new Set(t).add(e));
83
+ let H = u != null, U = u?.toLowerCase() ?? "", W = H ? e.filter((e) => e.name.toLowerCase().includes(U)) : e, G = y(null), [K, q] = b();
84
+ _(() => {
85
+ G.current && q(Math.min(G.current.scrollHeight, F));
86
+ }, [e, u]);
87
+ let J = (e, n) => {
88
+ e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t(n));
89
+ }, Y = (e) => {
90
+ B((t) => new Set(t).add(e));
53
91
  let t = setTimeout(() => {
54
- f(e), W((t) => {
92
+ n(e), B((t) => {
55
93
  let n = new Set(t);
56
94
  return n.delete(e), n;
57
- }), G.current.delete(e);
58
- }, A);
59
- G.current.set(e, t);
95
+ }), V.current.delete(e);
96
+ }, P);
97
+ V.current.set(e, t);
60
98
  };
61
- return /* @__PURE__ */ E("div", {
62
- className: "flex min-w-[240px] flex-col",
63
- style: H,
99
+ return /* @__PURE__ */ T("div", {
100
+ className: "flex w-[280px] flex-col",
101
+ style: R,
64
102
  children: [
65
- /* @__PURE__ */ T("p", {
66
- className: n(F, k, O.header),
67
- children: L
103
+ /* @__PURE__ */ w("p", {
104
+ className: O(h, N, M.header),
105
+ children: x
68
106
  }),
69
- /* @__PURE__ */ T("div", {
70
- className: n("max-h-72 min-h-0 flex-1 overflow-y-auto", O.listContent),
71
- style: { maxHeight: $ },
72
- children: /* @__PURE__ */ T("div", {
73
- ref: Q,
74
- children: r.length > 0 ? /* @__PURE__ */ T("ul", {
107
+ /* @__PURE__ */ w("div", {
108
+ className: O("max-h-72 min-h-0 flex-1 overflow-y-auto", M.listContent),
109
+ style: { maxHeight: K },
110
+ children: /* @__PURE__ */ w("div", {
111
+ ref: G,
112
+ children: W.length > 0 ? /* @__PURE__ */ w("ul", {
75
113
  className: "flex flex-col gap-1 px-1 pb-1",
76
- children: r.map((t) => {
77
- let r = /* @__PURE__ */ E("div", {
114
+ children: W.map((e) => {
115
+ let n = /* @__PURE__ */ T("div", {
78
116
  role: "button",
79
117
  tabIndex: 0,
80
- className: n("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", O.row),
81
- onClick: () => d(t),
82
- onKeyDown: (e) => te(e, t),
83
- onMouseEnter: () => X(t.id),
84
- onMouseLeave: Z,
85
- onFocus: () => X(t.id),
86
- onBlur: Z,
118
+ className: O("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", M.row),
119
+ onClick: () => t(e),
120
+ onKeyDown: (t) => J(t, e),
87
121
  children: [
88
- /* @__PURE__ */ T(e, {
89
- size: s.MD,
90
- initialsName: t.name
122
+ /* @__PURE__ */ w(E, {
123
+ size: i.MD,
124
+ initialsName: e.name
91
125
  }),
92
- /* @__PURE__ */ T("span", {
93
- className: n(P, "min-w-0 flex-1 truncate text-start"),
94
- children: t.name
126
+ u == null ? /* @__PURE__ */ w("span", {
127
+ className: O(m, "min-w-0 flex-1 truncate text-start"),
128
+ children: e.name
129
+ }) : /* @__PURE__ */ w(s, {
130
+ text: e.name,
131
+ query: u,
132
+ maxLines: 1,
133
+ className: O(m, "min-w-0 flex-1 text-start")
95
134
  }),
96
- /* @__PURE__ */ T(m, {
97
- icon: /* @__PURE__ */ T(_, {
98
- size: s.SM,
99
- className: O.star,
135
+ /* @__PURE__ */ w(f, {
136
+ icon: /* @__PURE__ */ w(C, {
137
+ size: i.SM,
138
+ className: M.star,
100
139
  "aria-hidden": !0
101
140
  }),
102
- "aria-label": B,
141
+ "aria-label": j,
103
142
  isSelected: !0,
104
- onClick: (e) => {
105
- e.stopPropagation(), ne(t.id);
143
+ onClick: (t) => {
144
+ t.stopPropagation(), Y(e.id);
106
145
  }
107
146
  })
108
147
  ]
109
- }), l = t.description != null && t.description !== "";
110
- return /* @__PURE__ */ T("li", {
111
- className: U.has(t.id) ? O.rowLeaving : O.rowEnter,
112
- children: /* @__PURE__ */ T(u, {
148
+ });
149
+ return /* @__PURE__ */ w("li", {
150
+ className: z.has(e.id) ? M.rowLeaving : M.rowEnter,
151
+ children: /* @__PURE__ */ w(c, {
113
152
  asChild: !0,
114
- open: K === t.id,
115
153
  contentClassName: "max-w-[550px]",
116
- content: /* @__PURE__ */ E("div", {
117
- className: "flex flex-col gap-3",
118
- onMouseEnter: Y,
119
- onMouseLeave: Z,
120
- onFocus: Y,
121
- onBlur: Z,
122
- children: [
123
- /* @__PURE__ */ T(N, { onOpen: () => y?.(t.id) }),
124
- t.isDescriptionLoading && /* @__PURE__ */ T(p, { size: s.SM }),
125
- !t.isDescriptionLoading && l && /* @__PURE__ */ T("p", {
126
- className: "text-start",
127
- children: t.description
128
- }),
129
- /* @__PURE__ */ T(i, {
130
- variant: o.Primary,
131
- appearance: a.Link,
132
- label: V,
133
- iconBefore: /* @__PURE__ */ T(g, {
134
- size: s.SM,
135
- stroke: c,
136
- "aria-hidden": !0
137
- }),
138
- onClick: () => v(t)
139
- })
140
- ]
154
+ onOpenChange: (t) => {
155
+ t && l?.(e.id);
156
+ },
157
+ content: /* @__PURE__ */ w(A, {
158
+ description: e.description,
159
+ isDescriptionLoading: e.isDescriptionLoading,
160
+ viewDetailsLabel: I,
161
+ onViewDetails: () => a(e)
141
162
  }),
142
- children: r
163
+ children: n
143
164
  })
144
- }, t.id);
165
+ }, e.id);
145
166
  })
146
- }) : /* @__PURE__ */ T("p", {
147
- className: n(I, "px-4 py-4 text-start", O.emptyHint),
148
- children: R
167
+ }) : H && U !== "" ? /* @__PURE__ */ w("p", {
168
+ role: "status",
169
+ "aria-live": "polite",
170
+ className: O(v, "px-4 py-4 text-start", M.emptyHint),
171
+ children: L
172
+ }) : /* @__PURE__ */ w("p", {
173
+ className: O(v, "px-4 py-4 text-start", M.emptyHint),
174
+ children: S
149
175
  })
150
176
  })
151
177
  }),
152
- /* @__PURE__ */ T("div", {
153
- className: n("border-t px-2 py-3", O.footer),
154
- children: /* @__PURE__ */ T(l, {
155
- label: z,
178
+ /* @__PURE__ */ w("div", {
179
+ className: O("border-t px-2 py-3", M.footer),
180
+ children: /* @__PURE__ */ w(o, {
181
+ label: k,
156
182
  className: "w-full justify-center",
157
- onClick: h
183
+ onClick: r
158
184
  })
159
185
  })
160
186
  ]
161
187
  });
162
- }, F = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ T(d, {
188
+ }, L = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ w(l, {
163
189
  open: e,
164
190
  header: r,
165
- size: f.Lg,
191
+ size: u.Lg,
166
192
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
167
193
  onClose: t,
168
- children: /* @__PURE__ */ T("div", {
194
+ children: /* @__PURE__ */ w("div", {
169
195
  className: "h-[min(80vh,840px)] overflow-auto",
170
- children: /* @__PURE__ */ T(v, {
196
+ children: /* @__PURE__ */ w(m, {
171
197
  fallback: null,
172
198
  children: e && i(n, t)
173
199
  })
174
200
  })
175
- }), I = (e) => /* @__PURE__ */ T(D, { ...e }), L = (e, t, n) => ({
201
+ }), R = (e) => /* @__PURE__ */ w(k, { ...e }), z = (e, t, n) => ({
176
202
  id: e.url,
177
203
  name: e.name,
178
204
  description: t.get(e.url) ?? void 0,
179
205
  isDescriptionLoading: n.has(e.url)
180
- }), R = ({ isEnabled: t, skills: n, sharedWithMe: i, publicSkills: a, favoriteIds: o, onToggleFavorite: l, fetchSkillDescription: u, labels: d, renderCatalogContent: f, detailsPanelComponent: p }) => {
181
- let { addMenuLabel: m = "Skills", backLabel: g = "Back", catalogModalTitleLabel: _ = "Use skill", panelLabels: b } = d ?? {}, [x, E] = w(!1), [D, O] = w(null), [k, A] = w(null), [j, M] = w(/* @__PURE__ */ new Map()), [N, I] = w(/* @__PURE__ */ new Set()), R = C(/* @__PURE__ */ new Set()), z = S(() => [
206
+ }), B = ({ isEnabled: t, skills: n, sharedWithMe: r, publicSkills: i, favoriteIds: o, onToggleFavorite: s, fetchSkillDescription: c, labels: l, renderCatalogContent: u, detailsPanelComponent: d }) => {
207
+ let { addMenuLabel: f = "Skills", backLabel: p = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", panelLabels: S } = l ?? {}, [C, T] = b(!1), [E, D] = b(null), [O, k] = b(null), [A, M] = b(/* @__PURE__ */ new Map()), [N, P] = b(/* @__PURE__ */ new Set()), F = y(/* @__PURE__ */ new Set()), R = v(() => [
182
208
  ...n,
183
- ...i ?? [],
184
- ...a ?? []
209
+ ...r ?? [],
210
+ ...i ?? []
185
211
  ], [
186
212
  n,
187
- i,
188
- a
189
- ]), B = S(() => z.filter((e) => o.has(e.url)).map((e) => L(e, j, N)), [
190
- z,
213
+ r,
214
+ i
215
+ ]), B = v(() => R.filter((e) => o.has(e.url)).map((e) => z(e, A, N)), [
216
+ R,
191
217
  o,
192
- j,
218
+ A,
193
219
  N
194
- ]), V = S(() => z.find((e) => e.url === k) ?? null, [z, k]), H = y((e) => {
195
- A(e);
196
- }, []), U = y(() => {
197
- A(null);
198
- }, []), W = S(() => V == null ? [] : [{
199
- id: V.url,
200
- label: V.name,
201
- icon: /* @__PURE__ */ T(e, {
202
- size: s.SM,
203
- initialsName: V.name
204
- }),
205
- onRemove: U
206
- }], [V, U]), G = y((e) => {
207
- j.has(e) || R.current.has(e) || (R.current.add(e), I((t) => new Set(t).add(e)), u(e).then((t) => {
208
- R.current.delete(e), I((t) => {
220
+ ]), V = v(() => R.find((e) => e.url === O) ?? null, [R, O]), H = h((e) => {
221
+ k(e);
222
+ }, []), U = h(() => {
223
+ k(null);
224
+ }, []), W = h((e) => {
225
+ A.has(e) || F.current.has(e) || (F.current.add(e), P((t) => new Set(t).add(e)), c(e).then((t) => {
226
+ F.current.delete(e), P((t) => {
209
227
  let n = new Set(t);
210
228
  return n.delete(e), n;
211
229
  }), M((n) => new Map(n).set(e, t));
212
230
  }));
213
- }, [j, u]), K = y((e) => /* @__PURE__ */ T(P, {
231
+ }, [A, c]), G = V == null ? null : /* @__PURE__ */ w(j, {
232
+ name: V.name,
233
+ path: V.url,
234
+ description: A.get(V.url) ?? void 0,
235
+ isDescriptionLoading: N.has(V.url),
236
+ onTooltipOpen: W,
237
+ onViewDetails: D,
238
+ labels: { viewDetailsLabel: S?.viewDetailsLabel }
239
+ }), K = h((e) => /* @__PURE__ */ w(I, {
214
240
  favorites: B,
215
241
  onSelect: (t) => {
216
242
  H(t.id), e();
217
243
  },
218
- onToggleFavorite: l,
244
+ onToggleFavorite: s,
219
245
  onBrowse: () => {
220
- e(), E(!0);
246
+ e(), T(!0);
221
247
  },
222
248
  onViewDetails: (t) => {
223
- e(), O(t.id);
249
+ e(), D(t.id);
224
250
  },
225
- onItemTooltipOpen: G,
226
- labels: b
251
+ onItemTooltipOpen: W,
252
+ labels: S
227
253
  }), [
228
254
  B,
229
255
  H,
230
- l,
231
- G,
232
- b
233
- ]), q = S(() => ({
256
+ s,
257
+ W,
258
+ S
259
+ ]), q = v(() => ({
234
260
  key: "skills",
235
- title: m,
236
- icon: /* @__PURE__ */ T(h, {
237
- size: r,
261
+ title: f,
262
+ icon: /* @__PURE__ */ w(x, {
263
+ size: e,
238
264
  "aria-hidden": !0,
239
- stroke: c
265
+ stroke: a
240
266
  }),
241
267
  renderOverlay: K,
242
- backLabel: g
268
+ backLabel: p
243
269
  }), [
244
- m,
245
- g,
270
+ f,
271
+ p,
246
272
  K
273
+ ]), J = v(() => t ? {
274
+ triggerPrefix: "/",
275
+ menuLabel: f,
276
+ emptyQueryHint: _,
277
+ renderMenu: ({ query: e, close: t }) => /* @__PURE__ */ w(I, {
278
+ favorites: B,
279
+ searchQuery: e,
280
+ onSelect: (e) => {
281
+ t({ consumeQuery: !0 }), H(e.id);
282
+ },
283
+ onToggleFavorite: s,
284
+ onBrowse: () => {
285
+ t({ consumeQuery: !0 }), T(!0);
286
+ },
287
+ onViewDetails: (e) => {
288
+ t({ consumeQuery: !0 }), D(e.id);
289
+ },
290
+ onItemTooltipOpen: W,
291
+ labels: S
292
+ })
293
+ } : void 0, [
294
+ t,
295
+ f,
296
+ _,
297
+ B,
298
+ H,
299
+ s,
300
+ W,
301
+ S
247
302
  ]);
248
303
  return t ? {
249
304
  skillMenuOverlay: q,
250
- skillCatalogModal: /* @__PURE__ */ T(F, {
251
- isOpen: x,
252
- onClose: () => E(!1),
305
+ commandMenu: J,
306
+ skillCatalogModal: /* @__PURE__ */ w(L, {
307
+ isOpen: C,
308
+ onClose: () => T(!1),
253
309
  onSelect: (e) => {
254
- H(e), E(!1);
310
+ H(e), T(!1);
255
311
  },
256
- title: _,
257
- renderContent: f
312
+ title: g,
313
+ renderContent: u
258
314
  }),
259
- skillDetailsPanel: /* @__PURE__ */ T(v, {
315
+ skillDetailsPanel: /* @__PURE__ */ w(m, {
260
316
  fallback: null,
261
- children: /* @__PURE__ */ T(p, {
262
- skillId: D,
263
- onClose: () => O(null),
317
+ children: /* @__PURE__ */ w(d, {
318
+ skillId: E,
319
+ onClose: () => D(null),
264
320
  onUseInChat: (e) => {
265
- H(e), O(null);
321
+ H(e), D(null);
266
322
  }
267
323
  })
268
324
  }),
269
- selectedSkillChips: W,
270
- selectSkill: H
325
+ selectedSkillElement: G,
326
+ selectSkill: H,
327
+ removeSelectedSkill: U
271
328
  } : {
272
329
  skillMenuOverlay: void 0,
330
+ commandMenu: void 0,
273
331
  skillCatalogModal: null,
274
332
  skillDetailsPanel: null,
275
- selectedSkillChips: [],
276
- selectSkill: () => void 0
333
+ selectedSkillElement: null,
334
+ selectSkill: () => void 0,
335
+ removeSelectedSkill: () => void 0
277
336
  };
278
337
  };
279
338
  //#endregion
280
- export { P as FavoriteSkillsPanel, F as SkillCatalogModal, I as SkillDetailsSidePanel, L as buildFavoriteSkillItem, R as useSkillSelectorOverlay };
339
+ export { j as ChatSkill, I as FavoriteSkillsPanel, L as SkillCatalogModal, R as SkillDetailsSidePanel, A as SkillInfoTooltipContent, z as buildFavoriteSkillItem, B as useSkillSelectorOverlay };
@@ -0,0 +1,35 @@
1
+ /** Localizable string labels for {@link ChatSkillProps}'s component. */
2
+ export interface ChatSkillLabels {
3
+ /** Label for the tooltip's "View details" action. Defaults to `'View details'`. */
4
+ viewDetailsLabel?: string;
5
+ }
6
+ /** Props for the ChatSkill component. */
7
+ export interface ChatSkillProps {
8
+ /** Display name, rendered after the `/` prefix in the button's label. */
9
+ name: string;
10
+ /**
11
+ * The skill's resource URL (`skills/{bucket}/{path}`), passed to every
12
+ * callback so the host never has to re-derive it.
13
+ */
14
+ path: string;
15
+ /** The skill's description, shown in the tooltip. Omitted when empty. */
16
+ description?: string;
17
+ /**
18
+ * Whether the description is still being resolved by the host. While
19
+ * `true` the tooltip shows a spinner in the description's place.
20
+ */
21
+ isDescriptionLoading?: boolean;
22
+ /** CSS class applied to the `/name` label. Defaults to `'dial-body-paragraph-text'`. */
23
+ labelClassName?: string;
24
+ /** Called with the skill's path when the tooltip's "View details" button is clicked. */
25
+ onViewDetails: (path: string) => void;
26
+ /**
27
+ * Called with the skill's path each time the tooltip opens (hover or
28
+ * focus) — the host's lazy-description trigger, wherever the component
29
+ * renders.
30
+ */
31
+ onTooltipOpen?: (path: string) => void;
32
+ /** Localizable string overrides. */
33
+ labels?: ChatSkillLabels;
34
+ }
35
+ //# sourceMappingURL=chat-skill-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
@@ -11,6 +11,8 @@ export interface FavoriteSkillsPanelLabels {
11
11
  removeFromFavoritesLabel?: string;
12
12
  /** Label for a row tooltip's "View details" action. Defaults to `'View details'`. */
13
13
  viewDetailsLabel?: string;
14
+ /** Hint shown when `searchQuery` filters out every favorite. Defaults to `'No matching skills'`. */
15
+ noMatchingSkillsLabel?: string;
14
16
  }
15
17
  /** CSS custom-property overrides for the favorites panel. */
16
18
  export interface FavoriteSkillsPanelColors {
@@ -39,6 +41,13 @@ export interface FavoriteSkillsPanelProps {
39
41
  onViewDetails: (item: FavoriteSkillItem) => void;
40
42
  /** Called with a skill's id each time one of its row's interactive tooltips opens (hover or focus). */
41
43
  onItemTooltipOpen?: (id: string) => void;
44
+ /**
45
+ * When provided, the panel enters search mode: rows are filtered to names
46
+ * containing this string case-insensitively and matched names render with a
47
+ * highlight mark. An empty string shows every row. Omit to show all
48
+ * favorites unfiltered.
49
+ */
50
+ searchQuery?: string;
42
51
  /** Localizable string overrides. */
43
52
  labels?: FavoriteSkillsPanelLabels;
44
53
  /** Color overrides applied as CSS custom properties. */
@@ -1 +1 @@
1
- {"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,kGAAkG;IAClG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,uGAAuG;IACvG,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,oCAAoC;IACpC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
1
+ {"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,kGAAkG;IAClG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,uGAAuG;IACvG,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,15 @@
1
+ /** Props for the shared skill info tooltip content component. */
2
+ export interface SkillInfoTooltipContentProps {
3
+ /** The skill's description paragraph. Omitted entirely when empty. */
4
+ description?: string;
5
+ /**
6
+ * Whether the description is still being resolved by the host. While
7
+ * `true` a spinner renders in the description's place.
8
+ */
9
+ isDescriptionLoading?: boolean;
10
+ /** Label for the "View details" action. Defaults to `'View details'`. */
11
+ viewDetailsLabel?: string;
12
+ /** Called when the "View details" button is clicked. */
13
+ onViewDetails: () => void;
14
+ }
15
+ //# sourceMappingURL=skill-info-tooltip-content-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B"}
@@ -1,4 +1,4 @@
1
- import { MenuOverlayConfig, SelectedEntityChip } from '@epam/ai-dial-conversation-input';
1
+ import { CommandMenuConfig, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
2
2
  import { ComponentType, ReactNode } from 'react';
3
3
  import { SkillListingEntry } from './favorite-skill-item';
4
4
  import { FavoriteSkillsPanelLabels } from './favorite-skills-panel-props';
@@ -22,6 +22,11 @@ export interface SkillSelectorOverlayLabels {
22
22
  backLabel?: string;
23
23
  /** Header title of the "Use skill" browse modal. Defaults to `'Use skill'`. */
24
24
  catalogModalTitleLabel?: string;
25
+ /**
26
+ * Hint rendered in the text area right after the `/` while the slash menu
27
+ * is open with an empty query. Defaults to `'Type to filter'`.
28
+ */
29
+ emptyQueryHintLabel?: string;
25
30
  /** Labels forwarded to the favorites panel rendered as the overlay. */
26
31
  panelLabels?: FavoriteSkillsPanelLabels;
27
32
  }
@@ -67,6 +72,13 @@ export interface UseSkillSelectorOverlayResult {
67
72
  * would leave the menu item in place with nothing behind it.
68
73
  */
69
74
  skillMenuOverlay?: MenuOverlayConfig;
75
+ /**
76
+ * The Skills entry for the `commandMenu` prop of
77
+ * `ConversationInput`/`Input`: typing `/` into an empty textarea opens the
78
+ * favorites panel in search mode above the input. `undefined` while
79
+ * `isEnabled` is `false`, disabling the slash menu entirely.
80
+ */
81
+ commandMenu?: CommandMenuConfig;
70
82
  /**
71
83
  * The browse modal element. Render at a stable level outside the popover
72
84
  * (e.g. next to the input); `null` while `isEnabled` is `false`.
@@ -78,14 +90,24 @@ export interface UseSkillSelectorOverlayResult {
78
90
  */
79
91
  skillDetailsPanel: ReactNode;
80
92
  /**
81
- * The selected skill as input chip data at most one entry, replaced on
82
- * every selection. Empty while `isEnabled` is `false` or nothing is selected.
93
+ * The selected skill as a `ChatSkill` element for the conversation input's
94
+ * `inlineStartSlot` at most one, replaced on every selection, carrying
95
+ * the shared tooltip (with the same lazy description fetch as the favorite
96
+ * rows). The element has no remove control of its own; removal is the
97
+ * input's Backspace-at-start gesture, wired through `removeSelectedSkill`.
98
+ * `null` while `isEnabled` is `false` or nothing is selected.
83
99
  */
84
- selectedSkillChips: SelectedEntityChip[];
100
+ selectedSkillElement: ReactNode;
85
101
  /**
86
102
  * Selects a skill by its resource URL (`skills/{bucket}/{path}`), replacing
87
103
  * any prior selection.
88
104
  */
89
105
  selectSkill: (skillId: string) => void;
106
+ /**
107
+ * Clears the selected skill. Wire to the input's `onInlineStartRemove` —
108
+ * Backspace with the caret collapsed at position 0 while the selected
109
+ * skill's element is shown.
110
+ */
111
+ removeSelectedSkill: () => void;
90
112
  }
91
113
  //# sourceMappingURL=skill-selector-overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,6FAA6F;AAC7F,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uEAAuE;IACvE,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,qEAAqE;IACrE,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,0EAA0E;IAC1E,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,qBAAqB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnE,oCAAoC;IACpC,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC;;;;OAIG;IACH,oBAAoB,EAAE,CACpB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAC9B,OAAO,EAAE,MAAM,IAAI,KAChB,SAAS,CAAC;IACf,sEAAsE;IACtE,qBAAqB,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;CACvE;AAED,6CAA6C;AAC7C,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;IACzC;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC"}
1
+ {"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,6FAA6F;AAC7F,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uEAAuE;IACvE,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,qEAAqE;IACrE,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,0EAA0E;IAC1E,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,qBAAqB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnE,oCAAoC;IACpC,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC;;;;OAIG;IACH,oBAAoB,EAAE,CACpB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAC9B,OAAO,EAAE,MAAM,IAAI,KAChB,SAAS,CAAC;IACf,sEAAsE;IACtE,qBAAqB,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;CACvE;AAED,6CAA6C;AAC7C,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;;;;;OAOG;IACH,oBAAoB,EAAE,SAAS,CAAC;IAChC;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC"}
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.1.0-dev.438",
4
+ "version": "1.1.0-dev.441",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -16,9 +16,9 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@epam/ai-dial-catalog": "1.1.0-dev.438",
20
- "@epam/ai-dial-chat-shared": "1.1.0-dev.438",
21
- "@epam/ai-dial-conversation-input": "1.1.0-dev.438",
19
+ "@epam/ai-dial-catalog": "1.1.0-dev.441",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.441",
21
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.441",
22
22
  "@epam/ai-dial-ui-kit": "*",
23
23
  "@tabler/icons-react": "^3.0.0",
24
24
  "react": "^19.0.0"