@epam/ai-dial-skills 1.2.0-dev.14 → 1.2.0-dev.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmFxC,CAAC"}
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmFxC,CAAC"}
@@ -1 +1 @@
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,CA2P5D,CAAC"}
1
+ {"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAqT5D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { SkillArchiveUploadDialogProps } from '../../models/skill-archive-upload-dialog-props';
3
+ /**
4
+ * Dialog presenting the drop area and supported formats for a skill-archive upload, so the host
5
+ * can start the flow before the native file picker appears. Presentation only — the host wires
6
+ * selection/rejection/close to its own import controller.
7
+ */
8
+ export declare const SkillArchiveUploadDialog: FC<SkillArchiveUploadDialogProps>;
9
+ //# sourceMappingURL=SkillArchiveUploadDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillArchiveUploadDialog.d.ts","sourceRoot":"","sources":["../../../src/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAIpG;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CA4CtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAElG,kJAAkJ;AAClJ,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA8CpE,CAAC"}
1
+ {"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAElG,kJAAkJ;AAClJ,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAgDpE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SkillSelectorFieldProps } from '../../models/skill-selector-field-props';
3
+ /** Controlled skill input with favorites, catalog browsing, and explicit removal. */
4
+ export declare const SkillSelectorField: FC<SkillSelectorFieldProps>;
5
+ //# sourceMappingURL=SkillSelectorField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/SkillSelectorField/SkillSelectorField.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAsC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAOvF,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA0O1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const SKILLS_CLASS: {
2
+ /** Controlled skill selector root carrying theme overrides. */
3
+ readonly selectorField: "dial-skills-selector-field";
4
+ /** The favorite-skills panel root, which carries the themed CSS variables. */
5
+ readonly favoritesPanel: "dial-skills-favorites-panel";
6
+ /**
7
+ * The `/name` chip a `ChatSkill` renders inside the composer, additive to
8
+ * the `dial-kit-base-button` that `@epam/ai-dial-ui-kit` draws. The chip's
9
+ * height is its label line, so a host changing its padding should keep the
10
+ * vertical padding at zero or the chip stops aligning with the input's first
11
+ * text line.
12
+ */
13
+ readonly chip: "dial-skills-chip";
14
+ };
15
+ //# sourceMappingURL=public-class-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;IACvB,+DAA+D;;IAE/D,8EAA8E;;IAE9E;;;;;;OAMG;;CAEK,CAAC"}
@@ -1 +1 @@
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;AAG7C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAAI,6MAYrC,8BAA8B,KAAG,6BAoTnC,CAAC"}
1
+ {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAG7C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAAI,6MAYrC,8BAA8B,KAAG,6BA8TnC,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._row_1ovug_1:hover,._row_1ovug_1:focus-visible{background:var(--fs-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_1ovug_5{color:var(--fs-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1ovug_9{color:var(--fs-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1ovug_13{color:var(--fs-star-color,var(--text-warning-icon,#eec840))}._footer_1ovug_17{border-top-color:var(--fs-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1ovug_25{animation:.2s ease-out _rowFadeIn_1ovug_1}._rowLeaving_1ovug_29{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1ovug_1}@keyframes _rowFadeIn_1ovug_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1ovug_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1ovug_57{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1ovug_25,._rowLeaving_1ovug_29{animation:none}._listContent_1ovug_57{transition:none}}
2
- /*$vite$: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*/.visible{visibility:visible}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.size-11{height:2.75rem;width:2.75rem}.h-\[24px\]{height:24px}.h-\[40px\]{height:40px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.h-auto{height:auto}.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-pointer{cursor:pointer}.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}.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-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-0{padding-bottom:0;padding-top:0}.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}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-error{color:var(--text-error,#ae2f2f)}.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)}@media (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}.desktop\:w-full{width:100%}}
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { ChatSkill } from './components/ChatSkill/ChatSkill';
2
2
  export { FavoriteSkillsPanel } from './components/FavoriteSkillsPanel/FavoriteSkillsPanel';
3
+ export { SkillArchiveUploadDialog } from './components/SkillArchiveUploadDialog/SkillArchiveUploadDialog';
3
4
  export { SkillCatalogModal } from './components/SkillCatalogModal/SkillCatalogModal';
4
5
  export { SkillDetailsSidePanel } from './components/SkillDetailsSidePanel/SkillDetailsSidePanel';
5
6
  export { SkillInfoTooltipContent } from './components/SkillInfoTooltipContent/SkillInfoTooltipContent';
@@ -8,8 +9,12 @@ export { buildFavoriteSkillItem } from './models/favorite-skill-item';
8
9
  export type { ChatSkillLabels, ChatSkillProps, } from './models/chat-skill-props';
9
10
  export type { FavoriteSkillItem, SkillListingEntry, } from './models/favorite-skill-item';
10
11
  export type { FavoriteSkillsPanelColors, FavoriteSkillsPanelLabels, FavoriteSkillsPanelProps, } from './models/favorite-skills-panel-props';
12
+ export type { SkillArchiveUploadDialogLabels, SkillArchiveUploadDialogProps, } from './models/skill-archive-upload-dialog-props';
11
13
  export type { SkillCatalogModalProps } from './models/skill-catalog-modal-props';
12
14
  export type { SkillDetailsSidePanelProps } from './models/skill-details-side-panel-props';
13
15
  export type { SkillInfoTooltipContentProps } from './models/skill-info-tooltip-content-props';
14
16
  export type { SkillDetailsPanelComponentProps, SkillSelectorOverlayLabels, UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult, } from './models/skill-selector-overlay';
17
+ export { SKILLS_CLASS } from './constants/public-class-names';
18
+ export { SkillSelectorField } from './components/SkillSelectorField/SkillSelectorField';
19
+ export type { SkillSelectorFieldProps, SkillSelectorFieldLabels, SkillSelectorFieldStyles, } from './models/skill-selector-field-props';
15
20
  //# 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,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"}
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,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,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,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,qCAAqC,CAAC"}
package/index.js CHANGED
@@ -1,327 +1,378 @@
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, Highlight as u, InteractiveTooltip as d, Popup as f, PopupSize as p, ToggleIconButton as m, TooltipPlacement as h } from "@epam/ai-dial-ui-kit";
3
- import { Suspense as g, useCallback as _, useEffect as v, useLayoutEffect as y, useMemo as b, useRef as x, useState as S } from "react";
4
- import { IconBlocks as C, IconEye as w, IconStarFilled as T } from "@tabler/icons-react";
5
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
6
- import { DetailsPanel as O } from "@epam/ai-dial-catalog";
7
- //#region src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx
8
- var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View details", onViewDetails: r }) => t == null ? /* @__PURE__ */ D("div", {
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, ToggleIconButton as y, TooltipPlacement as b } from "@epam/ai-dial-ui-kit";
3
+ import { Suspense as x, useCallback as S, useEffect as ee, useId as C, useLayoutEffect as w, useMemo as T, useRef as E, useState as D } from "react";
4
+ import { IconBlocks as O, IconChevronDown as k, IconEye as A, IconStarFilled as j, IconX as M } from "@tabler/icons-react";
5
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
6
+ import { DetailsPanel as I } from "@epam/ai-dial-catalog";
7
+ //#region src/constants/public-class-names.ts
8
+ var L = {
9
+ selectorField: "dial-skills-selector-field",
10
+ favoritesPanel: "dial-skills-favorites-panel",
11
+ chip: "dial-skills-chip"
12
+ }, R = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View details", onViewDetails: r, viewDetailsTabIndex: i }) => t == null ? /* @__PURE__ */ F("div", {
9
13
  className: "flex flex-col gap-3",
10
- children: [e != null && e !== "" && /* @__PURE__ */ E("p", {
14
+ children: [e != null && e !== "" && /* @__PURE__ */ P("p", {
11
15
  className: "text-start",
12
16
  children: e
13
- }), /* @__PURE__ */ E(i, {
14
- variant: o.Primary,
15
- appearance: a.Link,
17
+ }), /* @__PURE__ */ P(a, {
18
+ variant: s.Primary,
19
+ appearance: o.Link,
16
20
  className: "h-[24px] self-start",
17
21
  label: n,
18
- iconBefore: /* @__PURE__ */ E(w, {
19
- size: s.SM,
20
- stroke: c,
22
+ iconBefore: /* @__PURE__ */ P(A, {
23
+ size: c.SM,
24
+ stroke: l,
21
25
  "aria-hidden": !0
22
26
  }),
23
- onClick: r
27
+ onClick: r,
28
+ tabIndex: i
24
29
  })]
25
- }) : /* @__PURE__ */ E("p", {
30
+ }) : /* @__PURE__ */ P("p", {
26
31
  className: "text-start",
27
32
  children: t
28
- }), A = ({ name: e, path: t, description: r, isUnsupported: i = !1, labelClassName: a = "dial-body-paragraph-text", unsupportedLabelClassName: o = "text-error", unsupportedClassName: s = "bg-error", onViewDetails: c, labels: u = {} }) => {
29
- let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: p = "Selected model does not support skills. Remove the skill or select different model to proceed." } = u, [m, g] = S(0);
30
- return /* @__PURE__ */ E(d, {
33
+ }), z = ({ name: e, path: t, description: n, isUnsupported: i = !1, labelClassName: a = "dial-body-paragraph-text", unsupportedLabelClassName: o = "text-error", unsupportedClassName: s = "bg-error", onViewDetails: c, labels: l = {} }) => {
34
+ let { viewDetailsLabel: u = "View details", unsupportedTooltipLabel: d = "Selected model does not support skills. Remove the skill or select different model to proceed." } = l, [p, m] = D(0);
35
+ return /* @__PURE__ */ P(h, {
31
36
  asChild: !0,
32
- placement: h.Top,
37
+ placement: b.Top,
33
38
  contentClassName: "max-w-[550px]",
34
- content: i ? /* @__PURE__ */ E(k, { unsupportedMessage: p }) : /* @__PURE__ */ E(k, {
35
- description: r,
36
- viewDetailsLabel: f,
39
+ content: i ? /* @__PURE__ */ P(R, { unsupportedMessage: d }) : /* @__PURE__ */ P(R, {
40
+ description: n,
41
+ viewDetailsLabel: u,
37
42
  onViewDetails: () => {
38
- g((e) => e + 1), c(t);
43
+ m((e) => e + 1), c(t);
39
44
  }
40
45
  }),
41
- children: /* @__PURE__ */ E("span", {
46
+ children: /* @__PURE__ */ P("span", {
42
47
  className: "inline-flex items-center",
43
- children: /* @__PURE__ */ E(l, {
48
+ children: /* @__PURE__ */ P(f, {
44
49
  label: `/${e}`,
45
- textClassName: i ? n(a, o) : a,
46
- className: i ? n("h-auto px-2 py-0", s) : "h-auto px-2 py-0"
50
+ textClassName: i ? r(a, o) : a,
51
+ className: r("h-auto px-2 py-0", i && s, L.chip)
47
52
  })
48
53
  })
49
- }, m);
50
- }, j = {
51
- row: "_row_1ovug_1",
52
- header: "_header_1ovug_5",
53
- emptyHint: "_emptyHint_1ovug_9",
54
- star: "_star_1ovug_13",
55
- footer: "_footer_1ovug_17",
56
- rowEnter: "_rowEnter_1ovug_25",
57
- rowFadeIn: "_rowFadeIn_1ovug_1",
58
- rowLeaving: "_rowLeaving_1ovug_29",
59
- rowFadeOut: "_rowFadeOut_1ovug_1",
60
- listContent: "_listContent_1ovug_57"
61
- }, M = "px-3 pb-0.5 pt-2", N = 180, P = 288, F = ({ favorites: r, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: c, searchQuery: f, labels: p = {}, colors: h, nameClassName: g = "dial-small-text", headerClassName: _ = "dial-tiny-lead-semi-text", emptyHintClassName: b = "dial-small-text" }) => {
62
- let { myCollectionLabel: C = "My Collection", emptyHintLabel: w = "Star a skill to pin it here", browseLabel: O = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: F = "View details", noMatchingSkillsLabel: I = "No matching skills" } = p, L = t({
63
- "--fs-row-hover-bg": h?.rowHoverBackground,
64
- "--fs-header-text": h?.headerText,
65
- "--fs-empty-hint-text": h?.emptyHintText,
66
- "--fs-star-color": h?.starColor,
67
- "--fs-footer-border": h?.footerBorder
68
- }), [R, z] = S(/* @__PURE__ */ new Set()), B = x(/* @__PURE__ */ new Map());
69
- v(() => {
70
- let e = B.current;
54
+ }, p);
55
+ }, B = {
56
+ row: "_row_1v431_1",
57
+ header: "_header_1v431_8",
58
+ emptyHint: "_emptyHint_1v431_12",
59
+ star: "_star_1v431_16",
60
+ footer: "_footer_1v431_20",
61
+ rowEnter: "_rowEnter_1v431_28",
62
+ rowFadeIn: "_rowFadeIn_1v431_1",
63
+ rowLeaving: "_rowLeaving_1v431_32",
64
+ rowFadeOut: "_rowFadeOut_1v431_1",
65
+ listContent: "_listContent_1v431_60"
66
+ }, V = "px-3 pb-0.5 pt-2", te = 180, H = 288, U = ({ 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: b, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: T = "dial-small-text" }) => {
67
+ let { myCollectionLabel: O = "My Collection", emptyHintLabel: k = "Star a skill to pin it here", browseLabel: A = "Browse", removeFromFavoritesLabel: M = "Remove from favorites", viewDetailsLabel: N = "View details", noMatchingSkillsLabel: I = "No matching skills" } = v, z = t({
68
+ "--fs-row-hover-bg": b?.rowHoverBackground,
69
+ "--fs-header-text": b?.headerText,
70
+ "--fs-empty-hint-text": b?.emptyHintText,
71
+ "--fs-star-color": b?.starColor,
72
+ "--fs-footer-border": b?.footerBorder
73
+ }), [U, W] = D(/* @__PURE__ */ new Set()), G = E(/* @__PURE__ */ new Map());
74
+ ee(() => {
75
+ let e = G.current;
71
76
  return () => {
72
77
  e.forEach((e) => clearTimeout(e)), e.clear();
73
78
  };
74
79
  }, []);
75
- let V = f != null, H = f?.toLowerCase() ?? "", U = V ? r.filter((e) => e.name.toLowerCase().includes(H)) : r, W = x(null), [G, K] = S();
76
- y(() => {
77
- W.current && K(Math.min(W.current.scrollHeight, P));
78
- }, [r, f]);
79
- let q = (e, t) => {
80
+ let K = m != null, q = _ && !K, J = K || q ? "none" : void 0, Y = "button";
81
+ K ? Y = "option" : q && (Y = "menuitem");
82
+ let X = C(), Z = d != null, ne = d?.toLowerCase() ?? "", Q = Z ? n.filter((e) => e.name.toLowerCase().includes(ne)) : n, $ = E(null), [re, ie] = D();
83
+ w(() => {
84
+ $.current && ie(Math.min($.current.scrollHeight, H));
85
+ }, [n, d]);
86
+ let ae = (e, t) => {
80
87
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
81
- }, J = (e) => {
82
- z((t) => new Set(t).add(e));
88
+ }, oe = (e) => {
89
+ W((t) => new Set(t).add(e));
83
90
  let t = setTimeout(() => {
84
- a(e), z((t) => {
91
+ a?.(e), W((t) => {
85
92
  let n = new Set(t);
86
93
  return n.delete(e), n;
87
- }), B.current.delete(e);
88
- }, N);
89
- B.current.set(e, t);
94
+ }), G.current.delete(e);
95
+ }, te);
96
+ G.current.set(e, t);
90
97
  };
91
- return /* @__PURE__ */ D("div", {
92
- className: "flex w-full flex-col desktop:w-[280px]",
93
- style: L,
98
+ return /* @__PURE__ */ F("div", {
99
+ className: r("flex w-full flex-col desktop:w-[280px]", l, L.favoritesPanel),
100
+ style: z,
94
101
  children: [
95
- /* @__PURE__ */ E("p", {
96
- className: n(_, M, j.header),
97
- children: C
102
+ /* @__PURE__ */ P("p", {
103
+ id: X,
104
+ className: r(S, V, B.header),
105
+ children: O
98
106
  }),
99
- /* @__PURE__ */ E("div", {
100
- className: n("max-h-72 min-h-0 flex-1 overflow-y-auto", j.listContent),
101
- style: { maxHeight: G },
102
- children: /* @__PURE__ */ E("div", {
103
- ref: W,
104
- children: U.length > 0 ? /* @__PURE__ */ E("ul", {
107
+ /* @__PURE__ */ P("div", {
108
+ className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", B.listContent),
109
+ style: { maxHeight: re },
110
+ children: /* @__PURE__ */ P("div", {
111
+ ref: $,
112
+ children: Q.length > 0 ? /* @__PURE__ */ P("ul", {
113
+ id: m,
114
+ role: K ? "listbox" : J,
115
+ "aria-labelledby": K ? X : void 0,
105
116
  className: "flex flex-col gap-1 px-1 pb-1",
106
- children: U.map((t) => {
107
- let r = /* @__PURE__ */ D("div", {
108
- role: "button",
117
+ children: Q.map((t) => {
118
+ let n = K ? `${m}-${encodeURIComponent(t.id)}` : void 0, o = K ? -1 : void 0, l = /* @__PURE__ */ F("div", {
119
+ role: Y,
120
+ id: n,
121
+ "aria-selected": K ? n === g : void 0,
122
+ "aria-label": t.name,
109
123
  tabIndex: 0,
110
- className: n("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", j.row),
124
+ className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", B.row, u),
111
125
  onClick: () => i(t),
112
- onKeyDown: (e) => q(e, t),
126
+ onKeyDown: (e) => ae(e, t),
113
127
  children: [
114
- /* @__PURE__ */ E(e, {
115
- size: s.MD,
128
+ /* @__PURE__ */ P(e, {
129
+ size: c.MD,
116
130
  initialsName: t.name
117
131
  }),
118
- f == null ? /* @__PURE__ */ E("span", {
119
- className: n(g, "min-w-0 flex-1 truncate text-start"),
132
+ d == null ? /* @__PURE__ */ P("span", {
133
+ className: r(x, "min-w-0 flex-1 truncate text-start"),
120
134
  children: t.name
121
- }) : /* @__PURE__ */ E(u, {
135
+ }) : /* @__PURE__ */ P(p, {
122
136
  text: t.name,
123
- query: f,
137
+ query: d,
124
138
  maxLines: 1,
125
- className: n(g, "min-w-0 flex-1 text-start")
139
+ className: r(x, "min-w-0 flex-1 text-start")
126
140
  }),
127
- /* @__PURE__ */ E(m, {
128
- icon: /* @__PURE__ */ E(T, {
129
- size: s.SM,
130
- className: j.star,
141
+ a && /* @__PURE__ */ P(y, {
142
+ icon: /* @__PURE__ */ P(j, {
143
+ size: c.SM,
144
+ className: B.star,
131
145
  "aria-hidden": !0
132
146
  }),
133
- "aria-label": A,
147
+ "aria-label": M,
134
148
  isSelected: !0,
149
+ tabIndex: o,
135
150
  onClick: (e) => {
136
- e.stopPropagation(), J(t.id);
151
+ e.stopPropagation(), oe(t.id);
137
152
  }
138
153
  })
139
154
  ]
140
155
  });
141
- return /* @__PURE__ */ E("li", {
142
- className: R.has(t.id) ? j.rowLeaving : j.rowEnter,
143
- children: /* @__PURE__ */ E(d, {
156
+ return /* @__PURE__ */ P("li", {
157
+ role: J,
158
+ className: U.has(t.id) ? B.rowLeaving : B.rowEnter,
159
+ children: s ? /* @__PURE__ */ P(h, {
144
160
  asChild: !0,
145
161
  contentClassName: "max-w-[550px]",
146
- content: /* @__PURE__ */ E(k, {
162
+ content: /* @__PURE__ */ P(R, {
147
163
  description: t.description,
148
- viewDetailsLabel: F,
149
- onViewDetails: () => c(t)
164
+ viewDetailsLabel: N,
165
+ onViewDetails: () => s(t),
166
+ viewDetailsTabIndex: o
150
167
  }),
151
- children: r
152
- })
168
+ children: l
169
+ }) : l
153
170
  }, t.id);
154
171
  })
155
- }) : V && H !== "" ? /* @__PURE__ */ E("p", {
172
+ }) : Z && ne !== "" ? /* @__PURE__ */ P("p", {
156
173
  role: "status",
157
174
  "aria-live": "polite",
158
- className: n(b, "px-4 py-4 text-start", j.emptyHint),
175
+ className: r(T, "px-4 py-4 text-start", B.emptyHint),
159
176
  children: I
160
- }) : /* @__PURE__ */ E("p", {
161
- className: n(b, "px-4 py-4 text-start", j.emptyHint),
162
- children: w
177
+ }) : /* @__PURE__ */ P("p", {
178
+ className: r(T, "px-4 py-4 text-start", B.emptyHint),
179
+ children: k
163
180
  })
164
181
  })
165
182
  }),
166
- /* @__PURE__ */ E("div", {
167
- className: n("border-t px-2 py-3", j.footer),
168
- children: /* @__PURE__ */ E(l, {
169
- label: O,
183
+ /* @__PURE__ */ P("div", {
184
+ className: r("border-t px-2 py-3", B.footer),
185
+ children: /* @__PURE__ */ P(f, {
186
+ role: q ? "menuitem" : void 0,
187
+ label: A,
170
188
  className: "w-full justify-center",
171
189
  onClick: o
172
190
  })
173
191
  })
174
192
  ]
175
193
  });
176
- }, I = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ E(f, {
194
+ }, W = ".zip,.md", G = ({ isOpen: e, errorText: t, accept: n = W, labels: r, onClose: i, onFilesSelected: a, onFilesRejected: o }) => {
195
+ let { dialogTitle: s = "Upload skill", dropZoneLabel: c = "Drag and drop it or click here to upload", dropZoneMobileLabel: l = "Click here to upload", formatsLabel: u = "File formats .zip and SKILL.md", fileInputAriaLabel: f = "Upload a skill ZIP archive or a SKILL.md file", closeAriaLabel: p = "Close" } = r ?? {};
196
+ return /* @__PURE__ */ P(g, {
197
+ open: e,
198
+ size: _.Sm,
199
+ header: s,
200
+ closeAriaLabel: p,
201
+ onClose: i,
202
+ children: /* @__PURE__ */ P("div", {
203
+ className: "px-6 py-4",
204
+ children: /* @__PURE__ */ P(d, {
205
+ label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
206
+ className: "desktop:hidden",
207
+ children: l
208
+ }), /* @__PURE__ */ P("span", {
209
+ className: "hidden desktop:inline",
210
+ children: c
211
+ })] }),
212
+ description: u,
213
+ ariaLabel: f,
214
+ accept: n,
215
+ errorText: t,
216
+ onChange: a,
217
+ onReject: o
218
+ })
219
+ })
220
+ });
221
+ }, K = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ P(g, {
177
222
  open: e,
178
223
  header: r,
179
- size: p.Lg,
224
+ size: _.Lg,
180
225
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
181
226
  onClose: t,
182
- children: /* @__PURE__ */ E("div", {
227
+ children: /* @__PURE__ */ P("div", {
183
228
  className: "h-[min(80vh,840px)] overflow-auto",
184
- children: /* @__PURE__ */ E(g, {
229
+ children: /* @__PURE__ */ P(x, {
185
230
  fallback: null,
186
231
  children: e && i(n, t)
187
232
  })
188
233
  })
189
- }), L = (e) => /* @__PURE__ */ E(O, { ...e }), R = (e) => ({
234
+ }), q = (e) => /* @__PURE__ */ P(I, { ...e }), J = (e) => ({
190
235
  id: e.url,
191
236
  name: e.name,
192
237
  description: e.description
193
- }), z = (e) => {
238
+ }), Y = (e) => {
194
239
  let t = e.split("/").filter((e) => e.length > 0);
195
240
  return t[t.length - 1] ?? e;
196
- }, B = ({ isEnabled: e, isSkillsSupported: t, skills: n, sharedWithMe: i, publicSkills: a, favoriteIds: o, onToggleFavorite: s, labels: l, historyChipLabelClassName: u, renderCatalogContent: d, detailsPanelComponent: f }) => {
197
- let { addMenuLabel: p = "Skills", backLabel: m = "Back", catalogModalTitleLabel: h = "Use skill", emptyQueryHintLabel: v = "Type to filter", unsupportedTooltipLabel: y = "Selected model does not support skills. Remove the skill or select different model to proceed.", panelLabels: x } = l ?? {}, w = e && t, [T, D] = S(!1), [O, k] = S(null), [j, M] = S(null), N = b(() => [
198
- ...n,
199
- ...i ?? [],
200
- ...a ?? []
241
+ }, X = ({ isEnabled: e, isSkillsSupported: t, skills: r, sharedWithMe: a, publicSkills: o, favoriteIds: s, onToggleFavorite: c, labels: u, historyChipLabelClassName: d, renderCatalogContent: f, detailsPanelComponent: p }) => {
242
+ let { addMenuLabel: m = "Skills", backLabel: h = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", unsupportedTooltipLabel: v = "Selected model does not support skills. Remove the skill or select different model to proceed.", panelLabels: y } = u ?? {}, b = e && t, [ee, C] = D(!1), [w, E] = D(null), [k, A] = D(null), j = T(() => [
243
+ ...r,
244
+ ...a ?? [],
245
+ ...o ?? []
201
246
  ], [
202
- n,
203
- i,
204
- a
205
- ]), P = b(() => new Map(N.map((e) => [e.url, e])), [N]), L = b(() => N.filter((e) => o.has(e.url)).map((e) => R(e)), [N, o]), B = b(() => j == null ? null : P.get(j) ?? null, [P, j]), V = B != null && !t, H = _((e) => {
206
- M(e);
207
- }, []), U = _(() => {
208
- M(null);
209
- }, []), W = j, G = b(() => j == null ? void 0 : [{ url: j }], [j]), K = b(() => B == null ? null : /* @__PURE__ */ E(A, {
210
- name: B.name,
211
- path: B.url,
212
- description: B.description,
213
- isUnsupported: V,
214
- onViewDetails: k,
247
+ r,
248
+ a,
249
+ o
250
+ ]), M = T(() => new Map(j.map((e) => [e.url, e])), [j]), N = T(() => j.filter((e) => s.has(e.url)).map((e) => J(e)), [j, s]), F = T(() => k == null ? null : M.get(k) ?? {
251
+ url: k,
252
+ name: k
253
+ }, [M, k]), I = n(k, t), L = S((e) => {
254
+ A(e);
255
+ }, []), R = S(() => {
256
+ A(null);
257
+ }, []), B = k, V = T(() => k == null ? void 0 : [{ url: k }], [k]), te = T(() => F == null ? null : /* @__PURE__ */ P(z, {
258
+ name: F.name,
259
+ path: F.url,
260
+ description: F.description,
261
+ isUnsupported: I,
262
+ onViewDetails: E,
215
263
  labels: {
216
- viewDetailsLabel: x?.viewDetailsLabel,
217
- unsupportedTooltipLabel: y
264
+ viewDetailsLabel: y?.viewDetailsLabel,
265
+ unsupportedTooltipLabel: v
218
266
  }
219
267
  }), [
220
- B,
221
- V,
222
- x,
223
- y
224
- ]), q = _((e) => e == null || e.length === 0 ? null : e.map((e) => {
225
- let t = P.get(e.url);
226
- return /* @__PURE__ */ E(A, {
227
- name: t?.name ?? z(e.url),
268
+ F,
269
+ I,
270
+ y,
271
+ v
272
+ ]), H = S((e) => e == null || e.length === 0 ? null : e.map((e) => {
273
+ let t = M.get(e.url);
274
+ return /* @__PURE__ */ P(z, {
275
+ name: t?.name ?? Y(e.url),
228
276
  path: e.url,
229
- labelClassName: u,
277
+ labelClassName: d,
230
278
  description: t?.description,
231
- onViewDetails: k,
232
- labels: { viewDetailsLabel: x?.viewDetailsLabel }
279
+ onViewDetails: E,
280
+ labels: { viewDetailsLabel: y?.viewDetailsLabel }
233
281
  }, e.url);
234
282
  }), [
235
- P,
236
- u,
237
- x
238
- ]), J = _((e) => /* @__PURE__ */ E(F, {
239
- favorites: L,
283
+ M,
284
+ d,
285
+ y
286
+ ]), W = S((e) => /* @__PURE__ */ P(U, {
287
+ favorites: N,
288
+ isMenu: !0,
240
289
  onSelect: (t) => {
241
- H(t.id), e();
290
+ L(t.id), e();
242
291
  },
243
- onToggleFavorite: s,
292
+ onToggleFavorite: c,
244
293
  onBrowse: () => {
245
- e(), D(!0);
294
+ e(), C(!0);
246
295
  },
247
296
  onViewDetails: (t) => {
248
- e(), k(t.id);
297
+ e(), E(t.id);
249
298
  },
250
- labels: x
299
+ labels: y
251
300
  }), [
301
+ N,
252
302
  L,
253
- H,
254
- s,
255
- x
256
- ]), Y = b(() => w ? {
303
+ c,
304
+ y
305
+ ]), G = T(() => b ? {
257
306
  key: "skills",
258
- title: p,
259
- icon: /* @__PURE__ */ E(C, {
260
- size: r,
307
+ title: m,
308
+ icon: /* @__PURE__ */ P(O, {
309
+ size: i,
261
310
  "aria-hidden": !0,
262
- stroke: c
311
+ stroke: l
263
312
  }),
264
- renderOverlay: J,
265
- backLabel: m
313
+ renderOverlay: W,
314
+ backLabel: h
266
315
  } : void 0, [
267
- w,
268
- p,
316
+ b,
269
317
  m,
270
- J
271
- ]), X = b(() => w ? {
318
+ h,
319
+ W
320
+ ]), q = T(() => b ? {
272
321
  triggerPrefix: "/",
273
- menuLabel: p,
274
- emptyQueryHint: v,
275
- renderMenu: ({ query: e, close: t }) => /* @__PURE__ */ E(F, {
276
- favorites: L,
322
+ menuLabel: m,
323
+ emptyQueryHint: _,
324
+ renderMenu: ({ query: e, close: t, listboxId: n, activeOptionId: r }) => /* @__PURE__ */ P(U, {
325
+ favorites: N,
277
326
  searchQuery: e,
327
+ listboxId: n,
328
+ activeOptionId: r,
278
329
  onSelect: (e) => {
279
- t({ consumeQuery: !0 }), H(e.id);
330
+ t({ consumeQuery: !0 }), L(e.id);
280
331
  },
281
- onToggleFavorite: s,
332
+ onToggleFavorite: c,
282
333
  onBrowse: () => {
283
- t({ consumeQuery: !0 }), D(!0);
334
+ t({ consumeQuery: !0 }), C(!0);
284
335
  },
285
336
  onViewDetails: (e) => {
286
- t({ consumeQuery: !0 }), k(e.id);
337
+ t({ consumeQuery: !0 }), E(e.id);
287
338
  },
288
- labels: x
339
+ labels: y
289
340
  })
290
341
  } : void 0, [
291
- w,
292
- p,
293
- v,
342
+ b,
343
+ m,
344
+ _,
345
+ N,
294
346
  L,
295
- H,
296
- s,
297
- x
347
+ c,
348
+ y
298
349
  ]);
299
350
  return e ? {
300
- skillMenuOverlay: Y,
301
- commandMenu: X,
302
- skillCatalogModal: /* @__PURE__ */ E(I, {
303
- isOpen: T,
304
- onClose: () => D(!1),
351
+ skillMenuOverlay: G,
352
+ commandMenu: q,
353
+ skillCatalogModal: /* @__PURE__ */ P(K, {
354
+ isOpen: ee,
355
+ onClose: () => C(!1),
305
356
  onSelect: (e) => {
306
- H(e), D(!1);
357
+ L(e), C(!1);
307
358
  },
308
- title: h,
309
- renderContent: d
359
+ title: g,
360
+ renderContent: f
310
361
  }),
311
- skillDetailsPanel: /* @__PURE__ */ E(g, {
362
+ skillDetailsPanel: /* @__PURE__ */ P(x, {
312
363
  fallback: null,
313
- children: /* @__PURE__ */ E(f, {
314
- skillId: O,
315
- onClose: () => k(null)
364
+ children: /* @__PURE__ */ P(p, {
365
+ skillId: w,
366
+ onClose: () => E(null)
316
367
  })
317
368
  }),
318
- selectedSkillElement: K,
319
- selectedSkillPath: W,
320
- selectedSkills: G,
321
- isSkillUnsupported: V,
322
- selectSkill: H,
323
- removeSelectedSkill: U,
324
- renderHistorySkills: q
369
+ selectedSkillElement: te,
370
+ selectedSkillPath: B,
371
+ selectedSkills: V,
372
+ isSkillUnsupported: I,
373
+ selectSkill: L,
374
+ removeSelectedSkill: R,
375
+ renderHistorySkills: H
325
376
  } : {
326
377
  skillMenuOverlay: void 0,
327
378
  commandMenu: void 0,
@@ -335,6 +386,139 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
335
386
  removeSelectedSkill: () => void 0,
336
387
  renderHistorySkills: () => null
337
388
  };
389
+ }, Z = {
390
+ background: "_background_14zdf_1",
391
+ border: "_border_14zdf_5",
392
+ value: "_value_14zdf_9",
393
+ clear: "_clear_14zdf_13",
394
+ invalid: "_invalid_14zdf_17"
395
+ }, ne = [], Q = ({ value: e, onChange: i, displayName: a, favorites: o = ne, onToggleFavorite: s, onViewDetails: c, renderOverlay: d, isSkillsSupported: p, isDisabled: h = !1, isInvalid: g = !1, labelledById: _, describedById: y, labels: b, renderCatalogContent: x, className: S, styles: w }) => {
396
+ let [T, O] = D(!1), [A, j] = D(!1), [I, R] = D(""), z = E(null), B = C(), V = E(null), te = E(!1), H = n(e, p), W = p && !h, G = T && W, q = A && W, J = () => {
397
+ V.current && !V.current.disabled ? V.current.focus() : z.current?.querySelector("button:not(:disabled)")?.focus();
398
+ };
399
+ ee(() => {
400
+ te.current && !G && !q && ((document.activeElement === document.body || z.current?.contains(document.activeElement)) && J(), O(!1), j(!1)), te.current = G || q;
401
+ }, [G, q]);
402
+ let Y = (e) => {
403
+ e && !W || (R(""), O(e));
404
+ }, X = (e) => {
405
+ W && i(e), O(!1), j(!1);
406
+ }, Q = {
407
+ ...t({
408
+ "--ssf-text": w?.colors?.text,
409
+ "--ssf-bg": w?.colors?.background,
410
+ "--ssf-border": w?.colors?.border,
411
+ "--ssf-error": w?.colors?.error
412
+ }),
413
+ ...w?.cssVars
414
+ }, $ = /* @__PURE__ */ F("div", {
415
+ id: B,
416
+ className: "w-full min-w-0",
417
+ children: [/* @__PURE__ */ P("div", {
418
+ className: "p-2",
419
+ children: /* @__PURE__ */ P(v, {
420
+ value: I,
421
+ onChange: (e) => R(e ?? ""),
422
+ placeholder: b.searchPlaceholder ?? "Search skills",
423
+ "aria-label": b.searchPlaceholder ?? "Search skills",
424
+ clearLabel: b.clearSearchLabel ?? "Clear search"
425
+ })
426
+ }), /* @__PURE__ */ P(U, {
427
+ className: "min-w-0 desktop:w-full",
428
+ rowClassName: "min-h-11",
429
+ favorites: o,
430
+ searchQuery: I,
431
+ labels: b.panelLabels,
432
+ onSelect: (e) => X(e.id),
433
+ onToggleFavorite: s,
434
+ onViewDetails: c ? (e) => {
435
+ O(!1), c(e);
436
+ } : void 0,
437
+ onBrowse: () => {
438
+ O(!1), j(!0);
439
+ }
440
+ })]
441
+ }), re = /* @__PURE__ */ P(m, {
442
+ inputRef: V,
443
+ readOnly: !0,
444
+ role: "combobox",
445
+ "aria-haspopup": "dialog",
446
+ "aria-expanded": G,
447
+ "aria-controls": G ? B : void 0,
448
+ "aria-labelledby": _,
449
+ "aria-describedby": y,
450
+ "aria-invalid": g || H,
451
+ disabled: !W,
452
+ invalid: g || H,
453
+ value: e ? a || e : "",
454
+ placeholder: b.placeholder,
455
+ title: p ? e ? a || e : void 0 : b.unsupportedTooltipLabel,
456
+ containerClassName: "w-full min-w-0",
457
+ wrapperClassName: r("cursor-pointer", "--ssf-bg" in Q && Z.background, "--ssf-border" in Q && Z.border, (g || H) && Z.invalid, w?.triggerClassName),
458
+ className: r("min-w-0 cursor-pointer text-ellipsis", "--ssf-text" in Q && Z.value, w?.typography?.fontClassName ?? "dial-small-text"),
459
+ onKeyDown: (e) => {
460
+ [
461
+ "Enter",
462
+ " ",
463
+ "ArrowDown"
464
+ ].includes(e.key) ? (e.preventDefault(), e.stopPropagation(), Y(e.key === "ArrowDown" || !G)) : e.key === "Escape" && Y(!1);
465
+ },
466
+ iconAfter: /* @__PURE__ */ F("span", {
467
+ className: "flex shrink-0 items-center",
468
+ children: [e && /* @__PURE__ */ P(f, {
469
+ type: "button",
470
+ className: r("size-11 shrink-0", Z.clear),
471
+ disabled: h,
472
+ "aria-label": b.removeSkillLabel,
473
+ onKeyDown: (e) => e.stopPropagation(),
474
+ onClick: (e) => {
475
+ e.stopPropagation(), i(void 0), O(!1), W ? V.current?.focus() : z.current?.focus();
476
+ },
477
+ iconBefore: /* @__PURE__ */ P(M, {
478
+ "aria-hidden": !0,
479
+ size: 18,
480
+ stroke: l
481
+ })
482
+ }), /* @__PURE__ */ P(k, {
483
+ "aria-hidden": !0,
484
+ size: 20,
485
+ stroke: l,
486
+ className: r("transition-transform", G && "rotate-180")
487
+ })]
488
+ })
489
+ });
490
+ return /* @__PURE__ */ F("div", {
491
+ ref: z,
492
+ role: "group",
493
+ "aria-labelledby": _,
494
+ tabIndex: -1,
495
+ className: r("min-w-0", S, L.selectorField),
496
+ style: Q,
497
+ children: [d ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("div", {
498
+ className: "w-full min-w-0",
499
+ onClick: () => Y(!G),
500
+ children: re
501
+ }), d($, G, () => Y(!1))] }) : /* @__PURE__ */ P(u, {
502
+ open: G,
503
+ onOpenChange: Y,
504
+ disabled: !W,
505
+ className: "w-full min-w-0",
506
+ listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full",
507
+ renderOverlay: () => /* @__PURE__ */ P("div", {
508
+ role: "dialog",
509
+ "aria-labelledby": _,
510
+ children: $
511
+ }),
512
+ initialFocus: 0,
513
+ children: re
514
+ }), q && /* @__PURE__ */ P(K, {
515
+ isOpen: !0,
516
+ onClose: () => j(!1),
517
+ title: b.modalTitle,
518
+ onSelect: X,
519
+ renderContent: x
520
+ })]
521
+ });
338
522
  };
339
523
  //#endregion
340
- export { A as ChatSkill, F as FavoriteSkillsPanel, I as SkillCatalogModal, L as SkillDetailsSidePanel, k as SkillInfoTooltipContent, R as buildFavoriteSkillItem, B as useSkillSelectorOverlay };
524
+ export { z as ChatSkill, U as FavoriteSkillsPanel, L as SKILLS_CLASS, G as SkillArchiveUploadDialog, K as SkillCatalogModal, q as SkillDetailsSidePanel, R as SkillInfoTooltipContent, Q as SkillSelectorField, J as buildFavoriteSkillItem, X as useSkillSelectorOverlay };
@@ -31,14 +31,18 @@ export interface FavoriteSkillsPanelColors {
31
31
  export interface FavoriteSkillsPanelProps {
32
32
  /** The user's favorited skills, already resolved by the host. */
33
33
  favorites: FavoriteSkillItem[];
34
- /** Called when a row is activated (click, Enter, or Space). */
34
+ /** Called when a row is activated (click, Enter, or Space — or, in listbox mode, Enter in the owning text field while the row is active). */
35
35
  onSelect: (item: FavoriteSkillItem) => void;
36
- /** Called with a skill's id when its row's star button is clicked to remove it from favorites. */
37
- onToggleFavorite: (id: string) => void;
36
+ /** Removes a favorite by id; omitted hides the star action. */
37
+ onToggleFavorite?: (id: string) => void;
38
38
  /** Called when the "Browse" button is clicked. */
39
39
  onBrowse: () => void;
40
- /** Called when a row tooltip's "View details" button is clicked. */
41
- onViewDetails: (item: FavoriteSkillItem) => void;
40
+ /** Opens skill details; omitted hides the details tooltip. */
41
+ onViewDetails?: (item: FavoriteSkillItem) => void;
42
+ /** Additional classes applied to the panel root. */
43
+ className?: string;
44
+ /** Additional classes applied to each favorite row. */
45
+ rowClassName?: string;
42
46
  /**
43
47
  * When provided, the panel enters search mode: rows are filtered to names
44
48
  * containing this string case-insensitively and matched names render with a
@@ -46,6 +50,29 @@ export interface FavoriteSkillsPanelProps {
46
50
  * favorites unfiltered.
47
51
  */
48
52
  searchQuery?: string;
53
+ /**
54
+ * When provided, the list renders as a `role="listbox"` with this `id` and
55
+ * each row as a `role="option"` — the shape a list autocomplete (e.g. the
56
+ * conversation input's `commandMenu`) drives from its text field. In this
57
+ * mode Tab moves from row to row: a row's star and its tooltip's "View
58
+ * details" stay clickable but leave the Tab sequence. Omit for the plain
59
+ * list of button rows.
60
+ */
61
+ listboxId?: string;
62
+ /**
63
+ * Renders the rows and the "Browse" action as `role="menuitem"` for a host
64
+ * that mounts the panel inside a `role="menu"` container (e.g. a submenu
65
+ * whose arrow keys move between menu items). Ignored with `listboxId`.
66
+ * Defaults to `false`: rows are `role="button"`.
67
+ */
68
+ isMenu?: boolean;
69
+ /**
70
+ * `id` of the row the owning text field has active, rendered with
71
+ * `aria-selected="true"` and the row highlight — pass through the id the
72
+ * text field reports; row ids are derived from `listboxId` and each item's
73
+ * id. Used only with `listboxId`.
74
+ */
75
+ activeOptionId?: string | null;
49
76
  /** Localizable string overrides. */
50
77
  labels?: FavoriteSkillsPanelLabels;
51
78
  /** 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;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;;;;;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"}
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,6IAA6I;IAC7I,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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,33 @@
1
+ /** Labels for {@link SkillArchiveUploadDialogProps}; each has an English default. */
2
+ export interface SkillArchiveUploadDialogLabels {
3
+ /** Dialog header. Defaults to `'Upload skill'`. */
4
+ dialogTitle?: string;
5
+ /** Drop-zone label shown on desktop widths. Defaults to `'Drag and drop it or click here to upload'`. */
6
+ dropZoneLabel?: string;
7
+ /** Drop-zone label shown on mobile widths. Defaults to `'Click here to upload'`. */
8
+ dropZoneMobileLabel?: string;
9
+ /** Sentence describing accepted formats, shown under the drop zone. Defaults to `'File formats .zip and SKILL.md'`. */
10
+ formatsLabel?: string;
11
+ /** Accessible name for the native file input. Defaults to `'Upload a skill ZIP archive or a SKILL.md file'`. */
12
+ fileInputAriaLabel?: string;
13
+ /** Accessible name for the dialog's close button. Defaults to `'Close'`. */
14
+ closeAriaLabel?: string;
15
+ }
16
+ /** Props for {@link SkillArchiveUploadDialog}. */
17
+ export interface SkillArchiveUploadDialogProps {
18
+ /** Whether the dialog is open. */
19
+ isOpen: boolean;
20
+ /** Rejection message rendered under the drop area; omit when nothing was rejected. */
21
+ errorText?: string;
22
+ /** `accept` value forwarded to the drop zone/native file input. Defaults to `'.zip,.md'`. */
23
+ accept?: string;
24
+ /** Labels rendered by the dialog; each falls back to an English default. */
25
+ labels?: SkillArchiveUploadDialogLabels;
26
+ /** Called on Escape, the close button, or an outside click. */
27
+ onClose: () => void;
28
+ /** Called with the picked or dropped files that `accept` allowed through. */
29
+ onFilesSelected: (files: File[]) => void;
30
+ /** Called when a drop carried files that `accept` excluded. */
31
+ onFilesRejected: () => void;
32
+ }
33
+ //# sourceMappingURL=skill-archive-upload-dialog-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-archive-upload-dialog-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-archive-upload-dialog-props.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,WAAW,8BAA8B;IAC7C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uHAAuH;IACvH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6EAA6E;IAC7E,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,+DAA+D;IAC/D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B"}
@@ -11,5 +11,11 @@ export interface SkillInfoTooltipContentProps {
11
11
  viewDetailsLabel?: string;
12
12
  /** Called when the "View details" button is clicked. Unused while `unsupportedMessage` is set. */
13
13
  onViewDetails?: () => void;
14
+ /**
15
+ * `tabIndex` of the "View details" button. Pass `-1` to keep it out of the
16
+ * Tab sequence (still clickable) where the tooltip hangs off a list row and
17
+ * Tab should move from row to row. Unset keeps the button's default.
18
+ */
19
+ viewDetailsTabIndex?: number;
14
20
  }
15
21
  //# sourceMappingURL=skill-info-tooltip-content-props.d.ts.map
@@ -1 +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,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B"}
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,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,80 @@
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';
5
+ /** Translated text for a controlled skill field. */
6
+ export interface SkillSelectorFieldLabels {
7
+ /** Empty selection text. */
8
+ placeholder: string;
9
+ /** Browse dialog title. */
10
+ modalTitle: string;
11
+ /** Accessible name of the removal control. */
12
+ removeSkillLabel: string;
13
+ /** Explanation shown when the selected model cannot use skills. */
14
+ unsupportedTooltipLabel: string;
15
+ /** Favorites panel text; omitted entries use the panel's English defaults. */
16
+ panelLabels?: FavoriteSkillsPanelLabels;
17
+ /** Favorites search label and placeholder. Defaults to 'Search skills'. */
18
+ searchPlaceholder?: string;
19
+ /** Accessible search clear label. Defaults to 'Clear search'. */
20
+ clearSearchLabel?: string;
21
+ }
22
+ /** Per-instance theme and typography overrides for the skill field. */
23
+ export interface SkillSelectorFieldStyles {
24
+ /** Field color overrides; omitted values use the host theme. */
25
+ colors?: {
26
+ /** Text color. */
27
+ text?: string;
28
+ /** Field background. */
29
+ background?: string;
30
+ /** Field border. */
31
+ border?: string;
32
+ /** Invalid-state text and border. */
33
+ error?: string;
34
+ };
35
+ /** Label typography overrides. */
36
+ typography?: {
37
+ /** CSS classes applied to the value. Defaults to 'dial-small-text'. */
38
+ fontClassName?: string;
39
+ };
40
+ /** Additional classes applied to the input wrapper. */
41
+ triggerClassName?: string;
42
+ /** CSS custom properties merged after the typed overrides. */
43
+ cssVars?: CSSProperties;
44
+ }
45
+ /** Host-controlled selection; catalog data and rendering belong to the caller. */
46
+ export interface SkillSelectorFieldProps {
47
+ /** Selected reference, independent of catalog loading. */
48
+ value?: string;
49
+ /** Called to replace or remove the selected reference. */
50
+ onChange: (value: string | undefined) => void;
51
+ /** Resolved name; defaults to the full selected reference. */
52
+ displayName?: string;
53
+ /** Host-resolved favorite skills. Defaults to an empty list. */
54
+ favorites?: FavoriteSkillItem[];
55
+ /** Removes a skill from favorites; omitted hides the star action. */
56
+ onToggleFavorite?: (id: string) => void;
57
+ /** Opens host-owned skill details; omitted hides the details tooltip. */
58
+ onViewDetails?: (item: FavoriteSkillItem) => void;
59
+ /** Optional popup presentation, such as a mobile sheet. Defaults to a dropdown. */
60
+ renderOverlay?: (panel: ReactNode, isOpen: boolean, onClose: () => void) => ReactNode;
61
+ /** Explicit skill support for the selected model. */
62
+ isSkillsSupported: boolean;
63
+ /** Disables all controls. Defaults to false. */
64
+ isDisabled?: boolean;
65
+ /** Host validation state. Defaults to false. */
66
+ isInvalid?: boolean;
67
+ /** ID of the host-rendered label. */
68
+ labelledById: string;
69
+ /** ID of host-rendered feedback. */
70
+ describedById?: string;
71
+ /** Translated visible and accessible text. */
72
+ labels: SkillSelectorFieldLabels;
73
+ /** Catalog content that calls back with the selected reference. */
74
+ renderCatalogContent: SkillCatalogModalProps['renderContent'];
75
+ /** Additional classes applied to the root. */
76
+ className?: string;
77
+ /** Theme and typography overrides. */
78
+ styles?: SkillSelectorFieldStyles;
79
+ }
80
+ //# sourceMappingURL=skill-selector-field-props.d.ts.map
@@ -0,0 +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;IACpB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,uBAAuB,EAAE,MAAM,CAAC;IAChC,8EAA8E;IAC9E,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,uEAAuE;AACvE,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,MAAM,CAAC,EAAE;QACP,kBAAkB;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,wBAAwB;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,oBAAoB;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,qCAAqC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,kCAAkC;IAClC,UAAU,CAAC,EAAE;QACX,uEAAuE;QACvE,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,kFAAkF;AAClF,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;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,4 +1,4 @@
1
- import { RequestSkill } from '../../../chat-shared/src/index.ts';
1
+ import { RequestSkill } from '@epam/ai-dial-chat-shared';
2
2
  import { CommandMenuConfig, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
3
3
  import { ComponentType, ReactNode } from 'react';
4
4
  import { SkillListingEntry } from './favorite-skill-item';
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.14",
4
+ "version": "1.2.0-dev.141",
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.14",
22
- "@epam/ai-dial-conversation-input": "1.2.0-dev.14"
21
+ "@epam/ai-dial-catalog": "1.2.0-dev.141",
22
+ "@epam/ai-dial-conversation-input": "1.2.0-dev.141"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.14",
26
- "@epam/ai-dial-ui-kit": "^0.14.2",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.141",
26
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.18",
27
27
  "react": "^19.2.8"
28
28
  },
29
29
  "repository": {
package/test-setup.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export {};
1
2
  //# sourceMappingURL=test-setup.d.ts.map