@epam/ai-dial-skills 1.2.0-dev.274 → 1.2.0-dev.276

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,5 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { SkillSelectorFieldProps } from '../../models/skill-selector-field-props';
3
- /** Controlled skill input with favorites, catalog browsing, and explicit removal. */
3
+ /** Controlled multi-skill Select listing the given skills as checkbox options. */
4
4
  export declare const SkillSelectorField: FC<SkillSelectorFieldProps>;
5
5
  //# sourceMappingURL=SkillSelectorField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkillSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/SkillSelectorField/SkillSelectorField.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAsC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AASvF,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA6P1D,CAAC"}
1
+ {"version":3,"file":"SkillSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/SkillSelectorField/SkillSelectorField.tsx"],"names":[],"mappings":"AAYA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,yCAAyC,CAAC;AAOjD,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA+H1D,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_14zdf_1{background:var(--ssf-bg)}._border_14zdf_5{border-color:var(--ssf-border)}._value_14zdf_9{color:var(--ssf-text)}._clear_14zdf_13{margin-block:-.5rem}._invalid_14zdf_17{color:var(--ssf-error,var(--text-error,#9c2222));border-color:var(--ssf-error,var(--text-error,#9c2222))}._invalid_14zdf_17 input{color:var(--ssf-error,var(--text-error,#9c2222))}
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}.size-11{height:2.75rem;width:2.75rem}.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}.min-h-11{min-height:2.75rem}.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-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.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)}.p-2{padding:.5rem}.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{padding-bottom:.25rem;padding-top:.25rem}.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{padding-bottom:0}.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)}.transition-transform{transition-duration:.15s;transition-property:transform;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 (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}.desktop\:w-full{width:100%}}
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-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 (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}}
package/index.d.ts CHANGED
@@ -26,5 +26,5 @@ export type { TextChange } from './utils/skill-mention-tracking';
26
26
  export { SKILLS_CLASS } from './constants/public-class-names';
27
27
  export { SkillUnresolvedReason } from './types/skill-unresolved-reason';
28
28
  export { SkillSelectorField } from './components/SkillSelectorField/SkillSelectorField';
29
- export type { SkillSelectorFieldProps, SkillSelectorFieldLabels, SkillSelectorFieldStyles, } from './models/skill-selector-field-props';
29
+ export type { SkillSelectorFieldProps, SkillSelectorFieldLabels, SkillSelectorFieldStyles, SkillSelectorOption, } from './models/skill-selector-field-props';
30
30
  //# 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,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC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sC,CAAC;AAC9C,YAAY,EACV,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,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,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACxF,YAAY,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,qCAAqC,CAAC"}
package/index.js CHANGED
@@ -1,44 +1,44 @@
1
1
  import { DeploymentIcon as e, buildCssVars as t, isSkillSelectionUnsupported as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
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, Dropdown as u, FileDropzone as d, GhostButton as f, Highlight as p, Input as m, InteractiveTooltip as h, Popup as g, PopupSize as _, Search as v, Spinner as y, ToggleIconButton as b, Tooltip as x, TooltipPlacement as S } from "@epam/ai-dial-ui-kit";
3
- import { Suspense as C, useCallback as w, useEffect as T, useId as E, useLayoutEffect as ee, useMemo as D, useRef as O, useState as k } from "react";
4
- import { IconBlocks as te, IconChevronDown as ne, IconEye as A, IconLock as j, IconStarFilled as M, IconTrash as N, IconX as P } from "@tabler/icons-react";
5
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
6
- import { DialFileNodeType as R, DialFoldersTree as z } from "@epam/ai-dial-react-file-manager";
7
- import { CatalogContentNodeType as B, DetailsPanel as V } from "@epam/ai-dial-catalog";
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, Popup as m, PopupSize as h, Select as g, Spinner as _, ToggleIconButton as v, Tooltip as y, TooltipPlacement as b } from "@epam/ai-dial-ui-kit";
3
+ import { Suspense as x, useCallback as S, useEffect as C, useId as w, useLayoutEffect as T, useMemo as E, useRef as D, useState as O } from "react";
4
+ import { IconBlocks as k, 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 z, DetailsPanel as B } from "@epam/ai-dial-catalog";
8
8
  //#region src/constants/public-class-names.ts
9
- var H = {
9
+ var V = {
10
10
  selectorField: "dial-skills-selector-field",
11
11
  favoritesPanel: "dial-skills-favorites-panel",
12
12
  chip: "dial-skills-chip"
13
- }, U = /* @__PURE__ */ function(e) {
13
+ }, H = /* @__PURE__ */ function(e) {
14
14
  return e.Deleted = "deleted", e.NotShared = "not-shared", e;
15
- }({}), W = ({ description: e, unsupportedMessage: t, unresolvedReason: n, deletedMessage: r, notSharedMessage: i, viewDetailsLabel: u = "View details", onViewDetails: d, viewDetailsTabIndex: f }) => {
15
+ }({}), U = ({ 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 === U.Deleted, t = e ? N : j, a = e ? r : i;
18
- return /* @__PURE__ */ L("div", {
17
+ let e = n === H.Deleted, t = e ? N : j, a = e ? r : i;
18
+ return /* @__PURE__ */ I("div", {
19
19
  className: "flex flex-row items-center gap-2",
20
- children: [/* @__PURE__ */ I(t, {
20
+ children: [/* @__PURE__ */ F(t, {
21
21
  size: c.MD,
22
22
  stroke: l,
23
23
  "aria-hidden": !0,
24
24
  className: "shrink-0 text-secondary"
25
- }), /* @__PURE__ */ I("p", {
25
+ }), /* @__PURE__ */ F("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__ */ L("div", {
31
+ return t == null ? /* @__PURE__ */ I("div", {
32
32
  className: "flex flex-col gap-3",
33
- children: [e != null && e !== "" && /* @__PURE__ */ I("p", {
33
+ children: [e != null && e !== "" && /* @__PURE__ */ F("p", {
34
34
  className: "text-start",
35
35
  children: e
36
- }), /* @__PURE__ */ I(a, {
36
+ }), /* @__PURE__ */ F(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__ */ I(A, {
41
+ iconBefore: /* @__PURE__ */ F(A, {
42
42
  size: c.SM,
43
43
  stroke: l,
44
44
  "aria-hidden": !0
@@ -46,53 +46,53 @@ var H = {
46
46
  onClick: d,
47
47
  tabIndex: f
48
48
  })]
49
- }) : /* @__PURE__ */ I("p", {
49
+ }) : /* @__PURE__ */ F("p", {
50
50
  className: "text-start",
51
51
  children: t
52
52
  });
53
- }, G = ({ 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: p = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: m = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: g = "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] = k(0), [y, b] = k(!1), x = l === "click", C = () => {
55
- b(!1), v((e) => e + 1), u(t);
53
+ }, W = ({ 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: m = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: h = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: g = "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] = O(0), [y, x] = O(!1), S = l === "click", C = () => {
55
+ x(!1), v((e) => e + 1), u(t);
56
56
  }, w = (e) => {
57
- !x || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), b(!0));
58
- }, T = O(null), [E, D] = k(null);
59
- return ee(() => {
60
- D(T.current?.getBoundingClientRect().width ?? null);
61
- }, [o]), /* @__PURE__ */ I(h, {
57
+ !S || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), x(!0));
58
+ }, E = D(null), [k, A] = O(null);
59
+ return T(() => {
60
+ A(E.current?.getBoundingClientRect().width ?? null);
61
+ }, [o]), /* @__PURE__ */ F(p, {
62
62
  asChild: !0,
63
- placement: S.Top,
64
- open: x ? y : void 0,
65
- onOpenChange: x ? b : void 0,
63
+ placement: b.Top,
64
+ open: S ? y : void 0,
65
+ onOpenChange: S ? x : void 0,
66
66
  contentClassName: "max-w-[550px]",
67
- content: a == null ? i ? /* @__PURE__ */ I(W, { unsupportedMessage: p }) : /* @__PURE__ */ I(W, {
67
+ content: a == null ? i ? /* @__PURE__ */ F(U, { unsupportedMessage: m }) : /* @__PURE__ */ F(U, {
68
68
  description: n,
69
69
  viewDetailsLabel: f,
70
70
  onViewDetails: C
71
- }) : /* @__PURE__ */ I(W, {
71
+ }) : /* @__PURE__ */ F(U, {
72
72
  unresolvedReason: a,
73
- deletedMessage: m,
73
+ deletedMessage: h,
74
74
  notSharedMessage: g
75
75
  }),
76
- children: /* @__PURE__ */ L("span", {
76
+ children: /* @__PURE__ */ I("span", {
77
77
  tabIndex: 0,
78
- 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, H.chip),
78
+ 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, V.chip),
79
79
  "aria-label": `/${e}`,
80
- onClick: x ? () => b(!0) : void 0,
80
+ onClick: S ? () => x(!0) : void 0,
81
81
  onKeyDown: w,
82
- children: [/* @__PURE__ */ I("span", {
83
- ref: T,
82
+ children: [/* @__PURE__ */ F("span", {
83
+ ref: E,
84
84
  "aria-hidden": !0,
85
85
  className: "inset-inline-start-0 pointer-events-none absolute top-0 select-none",
86
86
  children: "/"
87
- }), /* @__PURE__ */ I("span", {
87
+ }), /* @__PURE__ */ F("span", {
88
88
  "aria-hidden": !0,
89
89
  className: "select-none",
90
- style: { paddingInlineStart: E ?? void 0 },
90
+ style: { paddingInlineStart: k ?? void 0 },
91
91
  children: e
92
92
  })]
93
93
  })
94
94
  }, _);
95
- }, K = {
95
+ }, G = {
96
96
  row: "_row_1v431_1",
97
97
  header: "_header_1v431_8",
98
98
  emptyHint: "_emptyHint_1v431_12",
@@ -103,105 +103,105 @@ var H = {
103
103
  rowLeaving: "_rowLeaving_1v431_32",
104
104
  rowFadeOut: "_rowFadeOut_1v431_1",
105
105
  listContent: "_listContent_1v431_60"
106
- }, re = "px-3 pb-0.5 pt-2", ie = 180, ae = 288, q = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: d, listboxId: m, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: y, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: C = "dial-small-text" }) => {
107
- let { myCollectionLabel: w = "My Collection", emptyHintLabel: D = "Star a skill to pin it here", browseLabel: te = "Browse", removeFromFavoritesLabel: ne = "Remove from favorites", viewDetailsLabel: A = "View details", noMatchingSkillsLabel: j = "No matching skills" } = v, N = t({
108
- "--fs-row-hover-bg": y?.rowHoverBackground,
109
- "--fs-header-text": y?.headerText,
110
- "--fs-empty-hint-text": y?.emptyHintText,
111
- "--fs-star-color": y?.starColor,
112
- "--fs-footer-border": y?.footerBorder
113
- }), [P, F] = k(/* @__PURE__ */ new Set()), R = O(/* @__PURE__ */ new Map());
114
- T(() => {
115
- let e = R.current;
106
+ }, ee = "px-3 pb-0.5 pt-2", K = 180, q = 288, J = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: m, listboxId: h, activeOptionId: g, isMenu: _ = !1, labels: y = {}, colors: b, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: E = "dial-small-text" }) => {
107
+ let { myCollectionLabel: k = "My Collection", emptyHintLabel: A = "Star a skill to pin it here", browseLabel: j = "Browse", removeFromFavoritesLabel: N = "Remove from favorites", viewDetailsLabel: P = "View details", noMatchingSkillsLabel: L = "No matching skills" } = y, R = t({
108
+ "--fs-row-hover-bg": b?.rowHoverBackground,
109
+ "--fs-header-text": b?.headerText,
110
+ "--fs-empty-hint-text": b?.emptyHintText,
111
+ "--fs-star-color": b?.starColor,
112
+ "--fs-footer-border": b?.footerBorder
113
+ }), [z, B] = O(/* @__PURE__ */ new Set()), H = D(/* @__PURE__ */ new Map());
114
+ C(() => {
115
+ let e = H.current;
116
116
  return () => {
117
117
  e.forEach((e) => clearTimeout(e)), e.clear();
118
118
  };
119
119
  }, []);
120
- let z = m != null, B = _ && !z, V = z || B ? "none" : void 0, U = "button";
121
- z ? U = "option" : B && (U = "menuitem");
122
- let G = E(), q = d != null, J = d?.toLowerCase() ?? "", Y = q ? n.filter((e) => e.name.toLowerCase().includes(J)) : n, X = O(null), [Z, Q] = k();
123
- ee(() => {
124
- X.current && Q(Math.min(X.current.scrollHeight, ae));
125
- }, [n, d]);
126
- let oe = (e, t) => {
120
+ let W = h != null, J = _ && !W, Y = W || J ? "none" : void 0, X = "button";
121
+ W ? X = "option" : J && (X = "menuitem");
122
+ let te = w(), Z = m != null, Q = m?.toLowerCase() ?? "", ne = Z ? n.filter((e) => e.name.toLowerCase().includes(Q)) : n, $ = D(null), [re, ie] = O();
123
+ T(() => {
124
+ $.current && ie(Math.min($.current.scrollHeight, q));
125
+ }, [n, m]);
126
+ let ae = (e, t) => {
127
127
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
128
- }, se = (e) => {
129
- F((t) => new Set(t).add(e));
128
+ }, oe = (e) => {
129
+ B((t) => new Set(t).add(e));
130
130
  let t = setTimeout(() => {
131
- a?.(e), F((t) => {
131
+ a?.(e), B((t) => {
132
132
  let n = new Set(t);
133
133
  return n.delete(e), n;
134
- }), R.current.delete(e);
135
- }, ie);
136
- R.current.set(e, t);
134
+ }), H.current.delete(e);
135
+ }, K);
136
+ H.current.set(e, t);
137
137
  };
138
- return /* @__PURE__ */ L("div", {
139
- className: r("flex w-full flex-col desktop:w-[280px]", l, H.favoritesPanel),
140
- style: N,
138
+ return /* @__PURE__ */ I("div", {
139
+ className: r("flex w-full flex-col desktop:w-[280px]", l, V.favoritesPanel),
140
+ style: R,
141
141
  children: [
142
- /* @__PURE__ */ I("p", {
143
- id: G,
144
- className: r(S, re, K.header),
145
- children: w
142
+ /* @__PURE__ */ F("p", {
143
+ id: te,
144
+ className: r(S, ee, G.header),
145
+ children: k
146
146
  }),
147
- /* @__PURE__ */ I("div", {
148
- className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", K.listContent),
149
- style: { maxHeight: Z },
150
- children: /* @__PURE__ */ I("div", {
151
- ref: X,
152
- children: Y.length > 0 ? /* @__PURE__ */ I("ul", {
153
- id: m,
154
- role: z ? "listbox" : V,
155
- "aria-labelledby": z ? G : void 0,
147
+ /* @__PURE__ */ F("div", {
148
+ className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", G.listContent),
149
+ style: { maxHeight: re },
150
+ children: /* @__PURE__ */ F("div", {
151
+ ref: $,
152
+ children: ne.length > 0 ? /* @__PURE__ */ F("ul", {
153
+ id: h,
154
+ role: W ? "listbox" : Y,
155
+ "aria-labelledby": W ? te : void 0,
156
156
  className: "flex flex-col gap-1 px-1 pb-1",
157
- children: Y.map((t) => {
158
- let n = z ? `${m}-${encodeURIComponent(t.id)}` : void 0, o = z ? -1 : void 0, l = /* @__PURE__ */ L("div", {
159
- role: U,
157
+ children: ne.map((t) => {
158
+ let n = W ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = W ? -1 : void 0, l = /* @__PURE__ */ I("div", {
159
+ role: X,
160
160
  id: n,
161
- "aria-selected": z ? n === g : void 0,
161
+ "aria-selected": W ? n === g : void 0,
162
162
  "aria-label": t.name,
163
163
  tabIndex: 0,
164
- className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", K.row, u),
164
+ className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", G.row, u),
165
165
  onClick: () => i(t),
166
- onKeyDown: (e) => oe(e, t),
166
+ onKeyDown: (e) => ae(e, t),
167
167
  children: [
168
- /* @__PURE__ */ I(e, {
168
+ /* @__PURE__ */ F(e, {
169
169
  size: c.MD,
170
170
  initialsName: t.name
171
171
  }),
172
- d == null ? /* @__PURE__ */ I("span", {
172
+ m == null ? /* @__PURE__ */ F("span", {
173
173
  className: r(x, "min-w-0 flex-1 truncate text-start"),
174
174
  children: t.name
175
- }) : /* @__PURE__ */ I(p, {
175
+ }) : /* @__PURE__ */ F(f, {
176
176
  text: t.name,
177
- query: d,
177
+ query: m,
178
178
  maxLines: 1,
179
179
  className: r(x, "min-w-0 flex-1 text-start")
180
180
  }),
181
- a && /* @__PURE__ */ I(b, {
182
- icon: /* @__PURE__ */ I(M, {
181
+ a && /* @__PURE__ */ F(v, {
182
+ icon: /* @__PURE__ */ F(M, {
183
183
  size: c.SM,
184
- className: K.star,
184
+ className: G.star,
185
185
  "aria-hidden": !0
186
186
  }),
187
- "aria-label": ne,
187
+ "aria-label": N,
188
188
  isSelected: !0,
189
189
  tabIndex: o,
190
190
  onClick: (e) => {
191
- e.stopPropagation(), se(t.id);
191
+ e.stopPropagation(), oe(t.id);
192
192
  }
193
193
  })
194
194
  ]
195
195
  });
196
- return /* @__PURE__ */ I("li", {
197
- role: V,
198
- className: P.has(t.id) ? K.rowLeaving : K.rowEnter,
199
- children: s ? /* @__PURE__ */ I(h, {
196
+ return /* @__PURE__ */ F("li", {
197
+ role: Y,
198
+ className: z.has(t.id) ? G.rowLeaving : G.rowEnter,
199
+ children: s ? /* @__PURE__ */ F(p, {
200
200
  asChild: !0,
201
201
  contentClassName: "max-w-[550px]",
202
- content: /* @__PURE__ */ I(W, {
202
+ content: /* @__PURE__ */ F(U, {
203
203
  description: t.description,
204
- viewDetailsLabel: A,
204
+ viewDetailsLabel: P,
205
205
  onViewDetails: () => s(t),
206
206
  viewDetailsTabIndex: o
207
207
  }),
@@ -209,43 +209,43 @@ var H = {
209
209
  }) : l
210
210
  }, t.id);
211
211
  })
212
- }) : q && J !== "" ? /* @__PURE__ */ I("p", {
212
+ }) : Z && Q !== "" ? /* @__PURE__ */ F("p", {
213
213
  role: "status",
214
214
  "aria-live": "polite",
215
- className: r(C, "px-4 py-4 text-start", K.emptyHint),
216
- children: j
217
- }) : /* @__PURE__ */ I("p", {
218
- className: r(C, "px-4 py-4 text-start", K.emptyHint),
219
- children: D
215
+ className: r(E, "px-4 py-4 text-start", G.emptyHint),
216
+ children: L
217
+ }) : /* @__PURE__ */ F("p", {
218
+ className: r(E, "px-4 py-4 text-start", G.emptyHint),
219
+ children: A
220
220
  })
221
221
  })
222
222
  }),
223
- /* @__PURE__ */ I("div", {
224
- className: r("border-t px-2 py-3", K.footer),
225
- children: /* @__PURE__ */ I(f, {
226
- role: B ? "menuitem" : void 0,
227
- label: te,
223
+ /* @__PURE__ */ F("div", {
224
+ className: r("border-t px-2 py-3", G.footer),
225
+ children: /* @__PURE__ */ F(d, {
226
+ role: J ? "menuitem" : void 0,
227
+ label: j,
228
228
  className: "w-full justify-center",
229
229
  onClick: o
230
230
  })
231
231
  })
232
232
  ]
233
233
  });
234
- }, J = ".zip,.md", Y = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = J, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
235
- let { dialogTitle: c = "Upload skill", dropZoneLabel: l = "Drag and drop it or click here to upload", dropZoneMobileLabel: u = "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: h = "Uploading skill" } = i ?? {};
236
- return /* @__PURE__ */ I(g, {
234
+ }, Y = ".zip,.md", X = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = Y, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
235
+ 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: g = "Close", uploadingAriaLabel: v = "Uploading skill" } = i ?? {};
236
+ return /* @__PURE__ */ F(m, {
237
237
  open: e,
238
- size: _.Sm,
238
+ size: h.Sm,
239
239
  header: c,
240
- closeAriaLabel: m,
240
+ closeAriaLabel: g,
241
241
  onClose: a,
242
- children: /* @__PURE__ */ L("div", {
242
+ children: /* @__PURE__ */ I("div", {
243
243
  className: "flex flex-col gap-4 px-6 py-4",
244
- children: [/* @__PURE__ */ I(d, {
245
- label: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("span", {
244
+ children: [/* @__PURE__ */ F(u, {
245
+ label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
246
246
  className: "desktop:hidden",
247
- children: u
248
- }), /* @__PURE__ */ I("span", {
247
+ children: d
248
+ }), /* @__PURE__ */ F("span", {
249
249
  className: "hidden desktop:inline",
250
250
  children: l
251
251
  })] }),
@@ -256,55 +256,55 @@ var H = {
256
256
  errorText: n ? void 0 : t,
257
257
  onChange: o,
258
258
  onReject: s
259
- }), n && /* @__PURE__ */ I(y, { ariaLabel: h })]
259
+ }), n && /* @__PURE__ */ F(_, { ariaLabel: v })]
260
260
  })
261
261
  });
262
- }, X = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ I(g, {
262
+ }, te = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ F(m, {
263
263
  open: e,
264
264
  header: r,
265
- size: _.Lg,
265
+ size: h.Lg,
266
266
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
267
267
  onClose: t,
268
- children: /* @__PURE__ */ I("div", {
268
+ children: /* @__PURE__ */ F("div", {
269
269
  className: "h-[min(80vh,840px)] overflow-auto",
270
- children: /* @__PURE__ */ I(C, {
270
+ children: /* @__PURE__ */ F(x, {
271
271
  fallback: null,
272
272
  children: e && i(n, t)
273
273
  })
274
274
  })
275
- }), Z = (e, t = null) => e.map((e) => e.type === B.Folder ? {
275
+ }), Z = (e, t = null) => e.map((e) => e.type === z.Folder ? {
276
276
  path: e.id,
277
277
  name: e.name,
278
- nodeType: R.FOLDER,
278
+ nodeType: L.FOLDER,
279
279
  parentPath: t,
280
280
  folderId: e.id,
281
281
  items: Z(e.items, e.id)
282
282
  } : {
283
283
  path: e.id,
284
284
  name: e.name,
285
- nodeType: R.ITEM,
285
+ nodeType: L.ITEM,
286
286
  parentPath: t,
287
287
  folderId: t ?? ""
288
- }), Q = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ I(z, {
289
- items: D(() => Z(e), [e]),
288
+ }), Q = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ F(R, {
289
+ items: E(() => Z(e), [e]),
290
290
  showFiles: !0,
291
291
  areHiddenFilesVisible: !0,
292
292
  selectedPath: t,
293
- expandedPaths: D(() => new Set(n), [n]),
293
+ expandedPaths: E(() => new Set(n), [n]),
294
294
  onExpandedPathsChange: (e) => {
295
295
  for (let t of e) n.has(t) || r(t);
296
296
  for (let t of n) e.has(t) || r(t);
297
297
  },
298
298
  onItemClick: (e) => {
299
- e.nodeType === R.ITEM && i(e.path);
299
+ e.nodeType === L.ITEM && i(e.path);
300
300
  },
301
301
  ariaLabel: o,
302
302
  autoFocus: !0,
303
303
  onEscape: a
304
- }), oe = (e) => /* @__PURE__ */ I(V, {
304
+ }), ne = (e) => /* @__PURE__ */ F(B, {
305
305
  ...e,
306
- renderContentFileTree: (e) => /* @__PURE__ */ I(Q, { ...e })
307
- }), se = (e) => e == null || /[\s/]/.test(e), ce = (e, t, n) => {
306
+ renderContentFileTree: (e) => /* @__PURE__ */ F(Q, { ...e })
307
+ }), $ = (e) => e == null || /[\s/]/.test(e), re = (e, t, n) => {
308
308
  let r = [], i = 0;
309
309
  return t.forEach((t, a) => {
310
310
  let o = `/${n(t.url)}`, s = i;
@@ -312,7 +312,7 @@ var H = {
312
312
  let t = e.indexOf(o, s);
313
313
  if (t === -1) return;
314
314
  let n = t + o.length;
315
- if (se(e[n])) {
315
+ if ($(e[n])) {
316
316
  r.push({
317
317
  skillIndex: a,
318
318
  start: t,
@@ -323,7 +323,7 @@ var H = {
323
323
  s = t + 1;
324
324
  }
325
325
  }), r;
326
- }, le = (e, t) => {
326
+ }, ie = (e, t) => {
327
327
  let n = Math.min(e.length, t.length), r = 0;
328
328
  for (; r < n && e[r] === t[r];) r += 1;
329
329
  let i = n - r, a = 0;
@@ -333,13 +333,13 @@ var H = {
333
333
  deletedLength: e.length - r - a,
334
334
  insertedLength: t.length - r - a
335
335
  };
336
- }, ue = (e, t) => {
336
+ }, ae = (e, t) => {
337
337
  let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
338
338
  return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
339
339
  ...i,
340
340
  start: i.start + r
341
341
  }), e), []);
342
- }, de = (e, t, n, r, i) => {
342
+ }, oe = (e, t, n, r, i) => {
343
343
  let a = r.length + 1, o = a + +!!i, s = e.map((e) => e.start >= t ? {
344
344
  ...e,
345
345
  start: e.start + o
@@ -350,7 +350,7 @@ var H = {
350
350
  length: a
351
351
  };
352
352
  return [...s, c].sort((e, t) => e.start - t.start);
353
- }, fe = (e, t) => e.find((e) => e.start + e.length === t), pe = (e, t, n) => {
353
+ }, se = (e, t) => e.find((e) => e.start + e.length === t), ce = (e, t, n) => {
354
354
  let r = t;
355
355
  for (; r > 0 && !/\s/.test(e[r - 1]);) r--;
356
356
  let i = r;
@@ -360,26 +360,26 @@ var H = {
360
360
  start: r,
361
361
  end: i
362
362
  };
363
- }, me = () => {
364
- let [e, t] = k(""), [n, r] = k([]), i = O(e);
363
+ }, le = () => {
364
+ let [e, t] = O(""), [n, r] = O([]), i = D(e);
365
365
  i.current = e;
366
- let a = O(n);
366
+ let a = D(n);
367
367
  a.current = n;
368
- let o = w((e) => {
369
- let n = le(i.current, e);
370
- r((e) => ue(e, n)), i.current = e, t(e);
371
- }, []), s = w((e, n, a) => {
368
+ let o = S((e) => {
369
+ let n = ie(i.current, e);
370
+ r((e) => ae(e, n)), i.current = e, t(e);
371
+ }, []), s = S((e, n, a) => {
372
372
  let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
373
- return i.current = l, t(l), r((t) => de(t, a, e, n, s)), s;
374
- }, []), c = w((e, n, a) => {
373
+ return i.current = l, t(l), r((t) => oe(t, a, e, n, s)), s;
374
+ }, []), c = S((e, n, a) => {
375
375
  let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
376
- i.current = c, t(c), r((t) => de(t, a, e, n, !1));
377
- }, []), l = w((e) => fe(a.current, e), []), u = D(() => {
376
+ i.current = c, t(c), r((t) => oe(t, a, e, n, !1));
377
+ }, []), l = S((e) => se(a.current, e), []), u = E(() => {
378
378
  if (n.length !== 0) return n.map((e) => ({ url: e.url }));
379
- }, [n]), d = w(() => {
379
+ }, [n]), d = S(() => {
380
380
  t(""), r([]);
381
- }, []), f = w((e, n, i) => {
382
- let a = n ?? [], o = ce(e, a, i);
381
+ }, []), f = S((e, n, i) => {
382
+ let a = n ?? [], o = re(e, a, i);
383
383
  t(e), r(o.map((e) => {
384
384
  let t = a[e.skillIndex];
385
385
  return {
@@ -390,7 +390,7 @@ var H = {
390
390
  };
391
391
  }));
392
392
  }, []);
393
- return D(() => ({
393
+ return E(() => ({
394
394
  draft: e,
395
395
  anchors: n,
396
396
  onDraftChange: o,
@@ -411,18 +411,18 @@ var H = {
411
411
  d,
412
412
  f
413
413
  ]);
414
- }, he = (e) => ({
414
+ }, ue = (e) => ({
415
415
  id: e.url,
416
416
  name: e.name,
417
417
  description: e.description
418
- }), ge = (e) => {
418
+ }), de = (e) => {
419
419
  let t = e.split("/").filter((e) => e.length > 0);
420
420
  return t[t.length - 1] ?? e;
421
- }, _e = (e) => {
421
+ }, fe = (e) => {
422
422
  let t = e.split("/").filter((e) => e.length > 0);
423
423
  return t[0] !== "skills" || t.length < 3 ? null : t[1];
424
- }, ve = (e, t) => _e(e) === t ? U.Deleted : U.NotShared, ye = "/", be = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionDetailsTrigger: d, renderCatalogContent: f, detailsPanelComponent: p }) => {
425
- let { addMenuLabel: m = "Skills", backLabel: h = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", deletedTooltipLabel: v, notSharedTooltipLabel: y, panelLabels: b } = c ?? {}, [x, S] = k(!1), [T, E] = k(null), [ee, ne] = k(0), A = O(null), [j, M] = k(0), [N, P] = k(void 0), F = me(), L = D(() => [
424
+ }, pe = (e, t) => fe(e) === t ? H.Deleted : H.NotShared, me = "/", he = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionDetailsTrigger: d, renderCatalogContent: f, detailsPanelComponent: p }) => {
425
+ let { addMenuLabel: m = "Skills", backLabel: h = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", deletedTooltipLabel: v, notSharedTooltipLabel: y, panelLabels: b } = c ?? {}, [C, w] = O(!1), [T, A] = O(null), [j, M] = O(0), N = D(null), [P, I] = O(0), [L, R] = O(void 0), z = le(), B = E(() => [
426
426
  ...t,
427
427
  ...n ?? [],
428
428
  ...r ?? []
@@ -430,59 +430,59 @@ var H = {
430
430
  t,
431
431
  n,
432
432
  r
433
- ]), R = D(() => new Map(L.map((e) => [e.url, e])), [L]), z = w((e) => R.get(e)?.name ?? ge(e), [R]), B = D(() => L.filter((e) => a.has(e.url)).map((e) => he(e)), [L, a]), V = F.anchors.length > 0 && !e, H = D(() => F.anchors.map((t) => ({
433
+ ]), V = E(() => new Map(B.map((e) => [e.url, e])), [B]), H = S((e) => V.get(e)?.name ?? de(e), [V]), U = E(() => B.filter((e) => a.has(e.url)).map((e) => ue(e)), [B, a]), G = z.anchors.length > 0 && !e, ee = E(() => z.anchors.map((t) => ({
434
434
  start: t.start,
435
435
  length: t.length,
436
436
  isUnsupported: !e,
437
- render: () => /* @__PURE__ */ I(G, {
437
+ render: () => /* @__PURE__ */ F(W, {
438
438
  name: t.name,
439
439
  path: t.url,
440
440
  labelClassName: u,
441
- description: R.get(t.url)?.description,
441
+ description: V.get(t.url)?.description,
442
442
  isUnsupported: !e,
443
443
  detailsTrigger: d,
444
- onViewDetails: E,
444
+ onViewDetails: A,
445
445
  labels: { viewDetailsLabel: b?.viewDetailsLabel }
446
446
  })
447
447
  })), [
448
- F.anchors,
448
+ z.anchors,
449
449
  e,
450
- R,
450
+ V,
451
451
  u,
452
452
  d,
453
453
  b
454
- ]), U = w((e, t, n) => {
455
- let r = F.insertMention(e, t, n);
456
- M((e) => e + 1), P(n + 1 + t.length + +!!r);
457
- }, [F]), W = w((e) => {
458
- let t = pe(F.draft, e, ye);
459
- return t == null ? e : (F.onDraftChange(F.draft.slice(0, t.start) + F.draft.slice(t.end)), t.start);
460
- }, [F]), K = w((e) => {
461
- let t = pe(F.draft, e, ye);
454
+ ]), K = S((e, t, n) => {
455
+ let r = z.insertMention(e, t, n);
456
+ I((e) => e + 1), R(n + 1 + t.length + +!!r);
457
+ }, [z]), q = S((e) => {
458
+ let t = ce(z.draft, e, me);
459
+ return t == null ? e : (z.onDraftChange(z.draft.slice(0, t.start) + z.draft.slice(t.end)), t.start);
460
+ }, [z]), Y = S((e) => {
461
+ let t = ce(z.draft, e, me);
462
462
  if (t == null) return;
463
- let n = F.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
463
+ let n = z.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
464
464
  return {
465
465
  position: t.start,
466
- text: F.draft.slice(t.start, t.end),
466
+ text: z.draft.slice(t.start, t.end),
467
467
  mentionUrl: n?.url
468
468
  };
469
- }, [F]), re = w(() => {
470
- F.reset(), M((e) => e + 1), P(void 0);
471
- }, [F]), ie = w((e, t) => {
472
- F.seedFromMessage(e, t, z), M((e) => e + 1), P(void 0);
473
- }, [F, z]), ae = w((e, t) => {
469
+ }, [z]), X = S(() => {
470
+ z.reset(), I((e) => e + 1), R(void 0);
471
+ }, [z]), Z = S((e, t) => {
472
+ z.seedFromMessage(e, t, H), I((e) => e + 1), R(void 0);
473
+ }, [z, H]), Q = S((e, t) => {
474
474
  if (t == null || t.length === 0) return null;
475
- let n = ce(e, t, z), r = [], i = 0;
475
+ let n = re(e, t, H), r = [], i = 0;
476
476
  return n.forEach((n) => {
477
477
  n.start > i && r.push(e.slice(i, n.start));
478
- let a = t[n.skillIndex], s = R.get(a.url), c = s?.name ?? ge(a.url), l = s == null ? ve(a.url, o) : void 0;
479
- r.push(/* @__PURE__ */ I(G, {
478
+ let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ?? de(a.url), l = s == null ? pe(a.url, o) : void 0;
479
+ r.push(/* @__PURE__ */ F(W, {
480
480
  name: c,
481
481
  path: a.url,
482
482
  labelClassName: u,
483
483
  description: s?.description,
484
484
  unresolvedReason: l,
485
- onViewDetails: E,
485
+ onViewDetails: A,
486
486
  labels: {
487
487
  viewDetailsLabel: b?.viewDetailsLabel,
488
488
  deletedTooltipLabel: v,
@@ -491,22 +491,22 @@ var H = {
491
491
  }, `${a.url}-${n.start}`)), i = n.start + n.length;
492
492
  }), i < e.length && r.push(e.slice(i)), r;
493
493
  }, [
494
- z,
495
- R,
494
+ H,
495
+ V,
496
496
  u,
497
497
  b,
498
498
  o,
499
499
  v,
500
500
  y
501
- ]), J = w((e) => e == null || e.length === 0 ? null : e.map((e) => {
502
- let t = R.get(e.url), n = t?.name ?? ge(e.url), r = t == null ? ve(e.url, o) : void 0;
503
- return /* @__PURE__ */ I(G, {
501
+ ]), ne = S((e) => e == null || e.length === 0 ? null : e.map((e) => {
502
+ let t = V.get(e.url), n = t?.name ?? de(e.url), r = t == null ? pe(e.url, o) : void 0;
503
+ return /* @__PURE__ */ F(W, {
504
504
  name: n,
505
505
  path: e.url,
506
506
  labelClassName: u,
507
507
  description: t?.description,
508
508
  unresolvedReason: r,
509
- onViewDetails: E,
509
+ onViewDetails: A,
510
510
  labels: {
511
511
  viewDetailsLabel: b?.viewDetailsLabel,
512
512
  deletedTooltipLabel: v,
@@ -514,78 +514,78 @@ var H = {
514
514
  }
515
515
  }, e.url);
516
516
  }), [
517
- R,
517
+ V,
518
518
  u,
519
519
  b,
520
520
  o,
521
521
  v,
522
522
  y
523
- ]), Y = w((e, t) => /* @__PURE__ */ I(q, {
524
- favorites: B,
523
+ ]), $ = S((e, t) => /* @__PURE__ */ F(J, {
524
+ favorites: U,
525
525
  isMenu: !0,
526
526
  onSelect: (n) => {
527
- U(n.id, n.name, W(t)), e();
527
+ K(n.id, n.name, q(t)), e();
528
528
  },
529
529
  onToggleFavorite: s,
530
530
  onBrowse: () => {
531
- let n = K(t);
532
- ne(W(t)), A.current = n ?? null, e(), S(!0);
531
+ let n = Y(t);
532
+ M(q(t)), N.current = n ?? null, e(), w(!0);
533
533
  },
534
534
  onViewDetails: (n) => {
535
- W(t), e(), E(n.id);
535
+ q(t), e(), A(n.id);
536
536
  },
537
537
  labels: b
538
538
  }), [
539
- B,
540
539
  U,
541
- W,
542
540
  K,
541
+ q,
542
+ Y,
543
543
  s,
544
544
  b
545
545
  ]);
546
546
  return {
547
- skillMenuOverlay: D(() => e ? {
547
+ skillMenuOverlay: E(() => e ? {
548
548
  key: "skills",
549
549
  title: m,
550
- icon: /* @__PURE__ */ I(te, {
550
+ icon: /* @__PURE__ */ F(k, {
551
551
  size: i,
552
552
  "aria-hidden": !0,
553
553
  stroke: l
554
554
  }),
555
- renderOverlay: Y,
555
+ renderOverlay: $,
556
556
  backLabel: h
557
557
  } : void 0, [
558
558
  e,
559
559
  m,
560
560
  h,
561
- Y
561
+ $
562
562
  ]),
563
- commandMenu: D(() => e ? {
564
- triggerPrefix: ye,
563
+ commandMenu: E(() => e ? {
564
+ triggerPrefix: me,
565
565
  menuLabel: m,
566
566
  emptyQueryHint: _,
567
- renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ I(q, {
568
- favorites: B,
567
+ renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(J, {
568
+ favorites: U,
569
569
  searchQuery: e,
570
570
  listboxId: r,
571
571
  activeOptionId: i,
572
572
  onSelect: (e) => {
573
- n({ consumeQuery: !0 }), U(e.id, e.name, t);
573
+ n({ consumeQuery: !0 }), K(e.id, e.name, t);
574
574
  },
575
575
  onToggleFavorite: s,
576
576
  onBrowse: () => {
577
- let r = `${ye}${e}`, i = F.anchors.find((e) => e.start === t && e.length === r.length);
577
+ let r = `${me}${e}`, i = z.anchors.find((e) => e.start === t && e.length === r.length);
578
578
  n({
579
579
  consumeQuery: !0,
580
580
  returnFocus: !1
581
- }), ne(t), A.current = {
581
+ }), M(t), N.current = {
582
582
  position: t,
583
583
  text: r,
584
584
  mentionUrl: i?.url
585
- }, S(!0);
585
+ }, w(!0);
586
586
  },
587
587
  onViewDetails: (e) => {
588
- n({ consumeQuery: !0 }), E(e.id);
588
+ n({ consumeQuery: !0 }), A(e.id);
589
589
  },
590
590
  labels: b
591
591
  })
@@ -593,193 +593,132 @@ var H = {
593
593
  e,
594
594
  m,
595
595
  _,
596
- B,
597
596
  U,
598
- F.anchors,
597
+ K,
598
+ z.anchors,
599
599
  s,
600
600
  b
601
601
  ]),
602
- skillCatalogModal: /* @__PURE__ */ I(X, {
603
- isOpen: x,
604
- onClose: w(() => {
605
- S(!1);
606
- let e = A.current;
607
- if (A.current = null, e == null) return;
602
+ skillCatalogModal: /* @__PURE__ */ F(te, {
603
+ isOpen: C,
604
+ onClose: S(() => {
605
+ w(!1);
606
+ let e = N.current;
607
+ if (N.current = null, e == null) return;
608
608
  let { position: t, text: n, mentionUrl: r } = e;
609
- r == null ? F.onDraftChange(F.draft.slice(0, t) + n + F.draft.slice(t)) : F.restoreMention(r, n.slice(1), t), M((e) => e + 1), P(t + n.length);
610
- }, [F]),
609
+ r == null ? z.onDraftChange(z.draft.slice(0, t) + n + z.draft.slice(t)) : z.restoreMention(r, n.slice(1), t), I((e) => e + 1), R(t + n.length);
610
+ }, [z]),
611
611
  onSelect: (e) => {
612
- A.current = null, U(e, z(e), ee), S(!1);
612
+ N.current = null, K(e, H(e), j), w(!1);
613
613
  },
614
614
  title: g,
615
615
  renderContent: f
616
616
  }),
617
- skillDetailsPanel: /* @__PURE__ */ I(C, {
617
+ skillDetailsPanel: /* @__PURE__ */ F(x, {
618
618
  fallback: null,
619
- children: /* @__PURE__ */ I(p, {
619
+ children: /* @__PURE__ */ F(p, {
620
620
  skillId: T,
621
- onClose: () => E(null)
621
+ onClose: () => A(null)
622
622
  })
623
623
  }),
624
- message: F.draft,
625
- messageRevision: j,
626
- activeMentions: H,
627
- onDraftChange: F.onDraftChange,
628
- onBackspaceAtCaret: F.onBackspaceAtCaret,
629
- caretPositionOverride: N,
630
- isSkillUnsupported: V,
631
- selectedSkills: F.orderedSkills,
632
- resetSkillMentions: re,
633
- seedSkillMentions: ie,
634
- renderHistorySkillSegments: ae,
635
- renderHistorySkills: J
624
+ message: z.draft,
625
+ messageRevision: P,
626
+ activeMentions: ee,
627
+ onDraftChange: z.onDraftChange,
628
+ onBackspaceAtCaret: z.onBackspaceAtCaret,
629
+ caretPositionOverride: L,
630
+ isSkillUnsupported: G,
631
+ selectedSkills: z.orderedSkills,
632
+ resetSkillMentions: X,
633
+ seedSkillMentions: Z,
634
+ renderHistorySkillSegments: Q,
635
+ renderHistorySkills: ne
636
636
  };
637
- }, $ = {
637
+ }, ge = {
638
638
  background: "_background_14zdf_1",
639
639
  border: "_border_14zdf_5",
640
640
  value: "_value_14zdf_9",
641
641
  clear: "_clear_14zdf_13",
642
642
  invalid: "_invalid_14zdf_17"
643
- }, xe = [], Se = "Selected model does not support skills. Select a different model to use a skill.", Ce = ({ value: e, onChange: i, displayName: a, favorites: o = xe, onToggleFavorite: s, onViewDetails: c, renderOverlay: d, isSkillsSupported: p, isDisabled: h = !1, isInvalid: g = !1, labelledById: _, describedById: y, labels: b, renderCatalogContent: S, className: C, styles: w }) => {
644
- let [ee, D] = k(!1), [te, A] = k(!1), [j, M] = k(""), N = O(null), R = E(), z = E(), B = O(null), V = O(!1), U = n(e, p), W = p && !h, G = ee && W, K = te && W, re = e ? b.unsupportedTooltipLabel : b.unavailableTooltipLabel ?? Se, ie = !p && !e, ae = [y, ie ? z : void 0].filter(Boolean).join(" ") || void 0, J = () => {
645
- B.current && !B.current.disabled ? B.current.focus() : N.current?.querySelector("button:not(:disabled)")?.focus();
646
- };
647
- T(() => {
648
- V.current && !G && !K && ((document.activeElement === document.body || N.current?.contains(document.activeElement)) && J(), D(!1), A(!1)), V.current = G || K;
649
- }, [G, K]);
650
- let Y = (e) => {
651
- e && !W || (M(""), D(e));
652
- }, Z = (e) => {
653
- W && i(e), D(!1), A(!1);
654
- }, Q = {
643
+ }, _e = [], ve = "Selected model does not support skills. Select a different model to use a skill.", ye = ({ value: i, onChange: a, displayNames: o, skills: s = _e, isSkillsSupported: l, isDisabled: u = !1, error: d, labels: p, className: m, styles: h }) => {
644
+ let [_, v] = O(!1), [b, x] = O(""), S = D(null), C = w(), E = i.some((e) => n(e, l)), k = l && !u, A = _ && k, j = i.length > 0 ? p.unsupportedTooltipLabel : p.unavailableTooltipLabel ?? ve, M = !l && i.length === 0, N = d ?? (M ? j : void 0), P = new Map(i.map((e) => [e, {
645
+ id: e,
646
+ name: o?.[e] || e
647
+ }]));
648
+ s.forEach((e) => P.set(e.id, e));
649
+ let L = [...P.values()].map((t) => ({
650
+ value: t.id,
651
+ label: t.name,
652
+ labelNode: b.trim() ? /* @__PURE__ */ F(f, {
653
+ text: t.name,
654
+ query: b,
655
+ maxLines: 1
656
+ }) : void 0,
657
+ icon: /* @__PURE__ */ F(e, {
658
+ size: c.SM,
659
+ initialsName: t.name
660
+ }),
661
+ disabled: !l
662
+ })), R = {
655
663
  ...t({
656
- "--ssf-text": w?.colors?.text,
657
- "--ssf-bg": w?.colors?.background,
658
- "--ssf-border": w?.colors?.border,
659
- "--ssf-error": w?.colors?.error
664
+ "--ssf-text": h?.colors?.text,
665
+ "--ssf-bg": h?.colors?.background,
666
+ "--ssf-border": h?.colors?.border,
667
+ "--ssf-error": h?.colors?.error
660
668
  }),
661
- ...w?.cssVars
662
- }, oe = /* @__PURE__ */ L("div", {
663
- id: R,
664
- className: "w-full min-w-0",
665
- children: [/* @__PURE__ */ I("div", {
666
- className: "p-2",
667
- children: /* @__PURE__ */ I(v, {
668
- value: j,
669
- onChange: (e) => M(e ?? ""),
670
- placeholder: b.searchPlaceholder ?? "Search skills",
671
- "aria-label": b.searchPlaceholder ?? "Search skills",
672
- clearLabel: b.clearSearchLabel ?? "Clear search"
673
- })
674
- }), /* @__PURE__ */ I(q, {
675
- className: "min-w-0 desktop:w-full",
676
- rowClassName: "min-h-11",
677
- favorites: o,
678
- searchQuery: j,
679
- labels: b.panelLabels,
680
- onSelect: (e) => Z(e.id),
681
- onToggleFavorite: s,
682
- onViewDetails: c ? (e) => {
683
- D(!1), c(e);
684
- } : void 0,
685
- onBrowse: () => {
686
- D(!1), A(!0);
687
- }
688
- })]
689
- }), se = /* @__PURE__ */ I(m, {
690
- inputRef: B,
691
- readOnly: !0,
692
- role: "combobox",
693
- "aria-haspopup": "dialog",
694
- "aria-expanded": G,
695
- "aria-controls": G ? R : void 0,
696
- "aria-labelledby": _,
697
- "aria-describedby": ae,
698
- "aria-invalid": g || U,
699
- disabled: !W,
700
- invalid: g || U,
701
- value: e ? a || e : "",
702
- placeholder: b.placeholder,
703
- title: p && e ? a || e : void 0,
704
- containerClassName: "w-full min-w-0",
705
- wrapperClassName: r(W ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in Q && $.background, "--ssf-border" in Q && $.border, (g || U) && $.invalid, w?.triggerClassName),
706
- className: r("min-w-0 cursor-pointer text-ellipsis", !W && "pointer-events-none", "--ssf-text" in Q && $.value, w?.typography?.fontClassName ?? "dial-small-text"),
707
- onKeyDown: (e) => {
708
- [
709
- "Enter",
710
- " ",
711
- "ArrowDown"
712
- ].includes(e.key) ? (e.preventDefault(), e.stopPropagation(), Y(e.key === "ArrowDown" || !G)) : e.key === "Escape" && Y(!1);
713
- },
714
- iconAfter: /* @__PURE__ */ L("span", {
715
- className: "flex shrink-0 items-center",
716
- children: [e && /* @__PURE__ */ I(f, {
717
- type: "button",
718
- className: r("size-11 shrink-0", $.clear),
719
- disabled: h,
720
- "aria-label": b.removeSkillLabel,
721
- onKeyDown: (e) => e.stopPropagation(),
722
- onClick: (e) => {
723
- e.stopPropagation(), i(void 0), D(!1), W ? B.current?.focus() : N.current?.focus();
724
- },
725
- iconBefore: /* @__PURE__ */ I(P, {
726
- "aria-hidden": !0,
727
- size: 18,
728
- stroke: l
729
- })
730
- }), /* @__PURE__ */ I(ne, {
731
- "aria-hidden": !0,
732
- size: 20,
733
- stroke: l,
734
- className: r("transition-transform", G && "rotate-180")
735
- })]
736
- })
737
- });
738
- return /* @__PURE__ */ L("div", {
739
- ref: N,
740
- role: "group",
741
- "aria-labelledby": _,
742
- tabIndex: -1,
743
- className: r("min-w-0", C, H.selectorField),
744
- style: Q,
745
- children: [
746
- /* @__PURE__ */ I(x, {
747
- tooltip: re,
748
- hideTooltip: p,
749
- triggerClassName: "block w-full min-w-0",
750
- children: d ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
751
- className: "w-full min-w-0",
752
- onClick: () => Y(!G),
753
- children: se
754
- }), d(oe, G, () => Y(!1))] }) : /* @__PURE__ */ I(u, {
755
- open: G,
756
- onOpenChange: Y,
757
- disabled: !W,
669
+ ...h?.cssVars
670
+ };
671
+ return T(() => {
672
+ let e = S.current?.querySelector("[role=\"combobox\"]");
673
+ e && (N ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || E ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
674
+ }, [
675
+ N,
676
+ C,
677
+ d,
678
+ u,
679
+ E
680
+ ]), /* @__PURE__ */ I("div", {
681
+ ref: S,
682
+ className: r("min-w-0", m, V.selectorField),
683
+ style: R,
684
+ children: [/* @__PURE__ */ F(y, {
685
+ tooltip: j,
686
+ hideTooltip: l,
687
+ triggerClassName: "block w-full min-w-0",
688
+ children: /* @__PURE__ */ F("div", {
689
+ inert: u ? !0 : void 0,
690
+ children: /* @__PURE__ */ F(g, {
691
+ multiple: !0,
692
+ searchable: !0,
693
+ open: A,
694
+ onOpenChange: (e) => {
695
+ e && !k || v(e);
696
+ },
697
+ onSearchQueryChange: x,
698
+ value: i,
699
+ onChange: (e) => {
700
+ u || a(Array.isArray(e) ? e : [e]);
701
+ },
702
+ options: L,
703
+ placeholder: p.placeholder,
704
+ labelProps: { label: p.fieldLabel },
705
+ error: d,
706
+ caption: M ? j : void 0,
707
+ searchPlaceholder: p.searchPlaceholder ?? "Search skills",
708
+ emptyStateTitle: b.trim() ? p.noMatchingSkillsLabel ?? "No matching skills" : p.emptyLabel ?? "No skills available",
709
+ disabled: u || M,
710
+ invalid: !!d || E,
758
711
  className: "w-full min-w-0",
759
- listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full",
760
- renderOverlay: () => /* @__PURE__ */ I("div", {
761
- role: "dialog",
762
- "aria-labelledby": _,
763
- children: oe
764
- }),
765
- initialFocus: 0,
766
- children: se
712
+ fieldClassName: r(k ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in R && ge.background, "--ssf-border" in R && ge.border, "--ssf-text" in R && ge.value, (d || E) && ge.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
713
+ listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
767
714
  })
768
- }),
769
- ie && /* @__PURE__ */ I("span", {
770
- id: z,
771
- className: "sr-only",
772
- children: re
773
- }),
774
- K && /* @__PURE__ */ I(X, {
775
- isOpen: !0,
776
- onClose: () => A(!1),
777
- title: b.modalTitle,
778
- onSelect: Z,
779
- renderContent: S
780
715
  })
781
- ]
716
+ }), N && /* @__PURE__ */ F("span", {
717
+ id: C,
718
+ className: "sr-only",
719
+ children: N
720
+ })]
782
721
  });
783
722
  };
784
723
  //#endregion
785
- export { G as ChatSkill, q as FavoriteSkillsPanel, H as SKILLS_CLASS, Y as SkillArchiveUploadDialog, X as SkillCatalogModal, Q as SkillContentFileTree, oe as SkillDetailsSidePanel, W as SkillInfoTooltipContent, Ce as SkillSelectorField, U as SkillUnresolvedReason, he as buildFavoriteSkillItem, le as diffTextChange, fe as findMentionAtCaret, ge as getSkillFallbackName, de as insertAnchor, ce as matchSkillMentions, ue as reconcileAnchors, me as useSkillMentions, be as useSkillSelectorOverlay };
724
+ export { W as ChatSkill, J as FavoriteSkillsPanel, V as SKILLS_CLASS, X as SkillArchiveUploadDialog, te as SkillCatalogModal, Q as SkillContentFileTree, ne as SkillDetailsSidePanel, U as SkillInfoTooltipContent, ye as SkillSelectorField, H as SkillUnresolvedReason, ue as buildFavoriteSkillItem, ie as diffTextChange, se as findMentionAtCaret, de as getSkillFallbackName, oe as insertAnchor, re as matchSkillMentions, ae as reconcileAnchors, le as useSkillMentions, he as useSkillSelectorOverlay };
@@ -1,25 +1,20 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- import { FavoriteSkillItem } from './favorite-skill-item';
3
- import { FavoriteSkillsPanelLabels } from './favorite-skills-panel-props';
4
- import { SkillCatalogModalProps } from './skill-catalog-modal-props';
1
+ import { CSSProperties } from 'react';
5
2
  /** Translated text for a controlled skill field. */
6
3
  export interface SkillSelectorFieldLabels {
4
+ /** Visible and accessible field label. */
5
+ fieldLabel: string;
7
6
  /** Empty selection text. */
8
7
  placeholder: string;
9
- /** Browse dialog title. */
10
- modalTitle: string;
11
- /** Accessible name of the removal control. */
12
- removeSkillLabel: string;
13
8
  /** Explanation shown when the selected model cannot use skills. */
14
9
  unsupportedTooltipLabel: string;
15
10
  /** Explanation shown when the field is disabled because the model cannot use skills and no skill is selected. Defaults to 'Selected model does not support skills. Select a different model to use a skill.'. */
16
11
  unavailableTooltipLabel?: string;
17
- /** Favorites panel text; omitted entries use the panel's English defaults. */
18
- panelLabels?: FavoriteSkillsPanelLabels;
19
- /** Favorites search label and placeholder. Defaults to 'Search skills'. */
12
+ /** Search input placeholder. Defaults to 'Search skills'. */
20
13
  searchPlaceholder?: string;
21
- /** Accessible search clear label. Defaults to 'Clear search'. */
22
- clearSearchLabel?: string;
14
+ /** Text shown when no skill is available. Defaults to 'No skills available'. */
15
+ emptyLabel?: string;
16
+ /** Text shown when the search matches no skill. Defaults to 'No matching skills'. */
17
+ noMatchingSkillsLabel?: string;
23
18
  }
24
19
  /** Per-instance theme and typography overrides for the skill field. */
25
20
  export interface SkillSelectorFieldStyles {
@@ -44,39 +39,34 @@ export interface SkillSelectorFieldStyles {
44
39
  /** CSS custom properties merged after the typed overrides. */
45
40
  cssVars?: CSSProperties;
46
41
  }
47
- /** Host-controlled selection; catalog data and rendering belong to the caller. */
42
+ /** One skill offered by the field's option list. */
43
+ export interface SkillSelectorOption {
44
+ /** Stable skill reference: the `skills/{bucket}/{path}` resource URL. */
45
+ id: string;
46
+ /** Display name. */
47
+ name: string;
48
+ }
49
+ /** Host-controlled multiple selection; the skill list belongs to the caller. */
48
50
  export interface SkillSelectorFieldProps {
49
- /** Selected reference, independent of catalog loading. */
50
- value?: string;
51
- /** Called to replace or remove the selected reference. */
52
- onChange: (value: string | undefined) => void;
53
- /** Resolved name; defaults to the full selected reference. */
54
- displayName?: string;
55
- /** Host-resolved favorite skills. Defaults to an empty list. */
56
- favorites?: FavoriteSkillItem[];
57
- /** Removes a skill from favorites; omitted hides the star action. */
58
- onToggleFavorite?: (id: string) => void;
59
- /** Opens host-owned skill details; omitted hides the details tooltip. */
60
- onViewDetails?: (item: FavoriteSkillItem) => void;
61
- /** Optional popup presentation, such as a mobile sheet. Defaults to a dropdown. */
62
- renderOverlay?: (panel: ReactNode, isOpen: boolean, onClose: () => void) => ReactNode;
51
+ /** Host-resolved skills offered as checkbox options. Defaults to an empty list. */
52
+ skills?: SkillSelectorOption[];
63
53
  /** Explicit skill support for the selected model. */
64
54
  isSkillsSupported: boolean;
65
55
  /** Disables all controls. Defaults to false. */
66
56
  isDisabled?: boolean;
67
- /** Host validation state. Defaults to false. */
68
- isInvalid?: boolean;
69
- /** ID of the host-rendered label. */
70
- labelledById: string;
71
- /** ID of host-rendered feedback. */
72
- describedById?: string;
57
+ /** Host validation message rendered and associated by the UI-kit Select. */
58
+ error?: string;
73
59
  /** Translated visible and accessible text. */
74
60
  labels: SkillSelectorFieldLabels;
75
- /** Catalog content that calls back with the selected reference. */
76
- renderCatalogContent: SkillCatalogModalProps['renderContent'];
77
61
  /** Additional classes applied to the root. */
78
62
  className?: string;
79
63
  /** Theme and typography overrides. */
80
64
  styles?: SkillSelectorFieldStyles;
65
+ /** Selected references in display order. */
66
+ value: string[];
67
+ /** Called with the complete selection after adding or removing a skill. */
68
+ onChange: (value: string[]) => void;
69
+ /** Host-resolved names keyed by reference; missing entries display the URL. */
70
+ displayNames?: Record<string, string>;
81
71
  }
82
72
  //# sourceMappingURL=skill-selector-field-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-selector-field-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-field-props.ts"],"names":[],"mappings":"AAAA,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;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACp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;IACxC,yEAAyE;IACzE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,mFAAmF;IACnF,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,IAAI,KAChB,SAAS,CAAC;IACf,qDAAqD;IACrD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,MAAM,EAAE,wBAAwB,CAAC;IACjC,mEAAmE;IACnE,oBAAoB,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAC9D,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC"}
1
+ {"version":3,"file":"skill-selector-field-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-field-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,uBAAuB,EAAE,MAAM,CAAC;IAChC,iNAAiN;IACjN,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AA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AM,CAAC,CAAC;CACvC"}
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.2.0-dev.274",
4
+ "version": "1.2.0-dev.276",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-catalog": "1.2.0-dev.274",
22
- "@epam/ai-dial-conversation-input": "1.2.0-dev.274"
21
+ "@epam/ai-dial-catalog": "1.2.0-dev.276",
22
+ "@epam/ai-dial-conversation-input": "1.2.0-dev.276"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.274",
26
- "@epam/ai-dial-react-file-manager": "^0.3.0-dev.22",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.276",
26
+ "@epam/ai-dial-react-file-manager": "^0.3.0-dev.24",
27
27
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.36",
28
28
  "react": "^19.2.8"
29
29
  },