@epam/ai-dial-skills 1.3.0-dev.296 → 1.3.0-dev.305
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":"SkillSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/SkillSelectorField/SkillSelectorField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SkillSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/SkillSelectorField/SkillSelectorField.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,yCAAyC,CAAC;AAQjD,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiK1D,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
._unresolvedIcon_1v08q_1{color:var(--sk-tooltip-unresolved-icon,var(--text-secondary,#57647a))}._unresolvedMessage_1v08q_5{color:var(--sk-tooltip-unresolved-message,var(--text-primary,#161b2d))}._chip_ddlyv_1{color:var(--sk-chip-label,var(--text-accent,#1d4ed8))}._chip_ddlyv_1:hover,._chip_ddlyv_1:focus-visible,._chip_ddlyv_1:active{background:var(--sk-chip-hover-bg,var(--bg-info,#e1eaf9))}._chip_ddlyv_1._unsupported_ddlyv_9{color:var(--sk-chip-unsupported-label,var(--text-error,#ae2f2f));background:var(--sk-chip-unsupported-bg,var(--bg-error,#f3d6d8))}._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}}.
|
|
1
|
+
._unresolvedIcon_1v08q_1{color:var(--sk-tooltip-unresolved-icon,var(--text-secondary,#57647a))}._unresolvedMessage_1v08q_5{color:var(--sk-tooltip-unresolved-message,var(--text-primary,#161b2d))}._chip_ddlyv_1{color:var(--sk-chip-label,var(--text-accent,#1d4ed8))}._chip_ddlyv_1:hover,._chip_ddlyv_1:focus-visible,._chip_ddlyv_1:active{background:var(--sk-chip-hover-bg,var(--bg-info,#e1eaf9))}._chip_ddlyv_1._unsupported_ddlyv_9{color:var(--sk-chip-unsupported-label,var(--text-error,#ae2f2f));background:var(--sk-chip-unsupported-bg,var(--bg-error,#f3d6d8))}._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_1goqn_1{background:var(--ssf-bg)}._border_1goqn_5{border-color:var(--ssf-border)}._value_1goqn_9{color:var(--ssf-text)}._clear_1goqn_13{margin-block:-.5rem}._invalid_1goqn_17{color:var(--ssf-error,var(--text-error,#ae2f2f));border-color:var(--ssf-error,var(--text-error,#ae2f2f))}._invalid_1goqn_17 input{color:var(--ssf-error,var(--text-error,#ae2f2f))}._unavailableTag_1goqn_25._unavailableTag_1goqn_25{background:var(--ssf-unavailable-tag-bg,var(--bg-error,#f3d6d8));border-color:var(--ssf-unavailable-tag-border,var(--stroke-error,#ae2f2f));cursor:pointer}
|
|
2
2
|
/*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
3
|
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:0}.-ms-1{margin-inline-start:-.25rem}.-me-1{margin-inline-end:-.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.h-\[min\(80vh\,840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\,860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.max-h-\[280px\]{max-height:280px}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\,calc\(100vw-2rem\)\)\]{width:min(var(--reference-width), calc(100vw - 2rem))}.w-full{width:100%}.max-w-\[min\(95vw\,1200px\)\]\!{max-width:min(95vw,1200px)!important}.max-w-\[min\(420px\,calc\(100vw-10px\)\)\]{max-width:min(420px,100vw - 10px)}.max-w-full{max-width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.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}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-transparent{border-color:#0000}.px-1{padding-inline:.25rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-1\.5{padding-block:.375rem}.py-3{padding-block:.75rem}.py-4{padding-block:1rem}.ps-1{padding-inline-start:.25rem}.pe-1{padding-inline-end:.25rem}.pt-2{padding-top:.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.text-start{text-align:start}.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-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:max-w-full\!{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:hidden{display:none}.desktop\:inline{display:inline}.desktop\:w-\[280px\]{width:280px}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
package/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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, ElementSize as u, FileDropzone as d, GhostButton as f, Highlight as p, InteractiveTooltip as m, InteractiveTooltipTrigger as h, LiveRegion as g, LiveRegionElement as _, Popup as v, PopupSize as y, Select as b, Spinner as x,
|
|
3
|
-
import { Suspense as
|
|
4
|
-
import { IconBlocks as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { DialFileNodeType as
|
|
7
|
-
import { CatalogContentNodeType as
|
|
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, ElementSize as u, FileDropzone as d, GhostButton as f, Highlight as p, InteractiveTooltip as m, InteractiveTooltipTrigger as h, LiveRegion as g, LiveRegionElement as _, Popup as v, PopupSize as y, Select as b, Spinner as x, Tag as S, TagAppearance as C, ToggleIconButton as w, Tooltip as T, TooltipPlacement as E } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { Suspense as D, useCallback as O, useEffect as ee, useId as k, useLayoutEffect as A, useMemo as j, useRef as M, useState as N } from "react";
|
|
4
|
+
import { IconBlocks as te, IconEye as P, IconLock as F, IconStarFilled as ne, IconTrash as I } from "@tabler/icons-react";
|
|
5
|
+
import { Fragment as re, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
6
|
+
import { DialFileNodeType as z, DialFoldersTree as B } from "@epam/ai-dial-react-file-manager";
|
|
7
|
+
import { CatalogContentNodeType as V, DetailsPanel as H } from "@epam/ai-dial-catalog";
|
|
8
8
|
//#region src/constants/public-class-names.ts
|
|
9
|
-
var
|
|
9
|
+
var U = {
|
|
10
10
|
selectorField: "dial-skills-selector-field",
|
|
11
11
|
favoritesPanel: "dial-skills-favorites-panel",
|
|
12
12
|
chip: "dial-skills-chip"
|
|
13
|
-
},
|
|
13
|
+
}, ie = "max-h-[280px] max-w-[min(420px,calc(100vw-10px))] overflow-y-auto", W = /* @__PURE__ */ function(e) {
|
|
14
14
|
return e.Deleted = "deleted", e.NotShared = "not-shared", e;
|
|
15
|
-
}({}),
|
|
15
|
+
}({}), G = {
|
|
16
16
|
unresolvedIcon: "_unresolvedIcon_1v08q_1",
|
|
17
17
|
unresolvedMessage: "_unresolvedMessage_1v08q_5"
|
|
18
|
-
},
|
|
18
|
+
}, K = ({ description: e, unsupportedMessage: n, unresolvedReason: i, deletedMessage: d, notSharedMessage: f, viewDetailsLabel: p = "View details", onViewDetails: m, viewDetailsTabIndex: h, textClassName: g = "dial-tiny-text", colors: _ }) => {
|
|
19
19
|
if (i != null) {
|
|
20
|
-
let e = i ===
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
let e = i === W.Deleted, n = e ? I : F, a = e ? d : f;
|
|
21
|
+
return /* @__PURE__ */ R("div", {
|
|
22
22
|
className: "flex flex-row items-center gap-2",
|
|
23
23
|
style: t({
|
|
24
24
|
"--sk-tooltip-unresolved-icon": _?.unresolvedIcon,
|
|
25
25
|
"--sk-tooltip-unresolved-message": _?.unresolvedMessage
|
|
26
26
|
}),
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ L(n, {
|
|
28
28
|
size: c.MD,
|
|
29
29
|
stroke: l,
|
|
30
30
|
"aria-hidden": !0,
|
|
31
|
-
className: r("shrink-0",
|
|
32
|
-
}), /* @__PURE__ */
|
|
33
|
-
className: r(g, "text-start",
|
|
31
|
+
className: r("shrink-0", G.unresolvedIcon)
|
|
32
|
+
}), /* @__PURE__ */ L("p", {
|
|
33
|
+
className: r(g, "text-start", G.unresolvedMessage),
|
|
34
34
|
children: a
|
|
35
35
|
})]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
return n == null ? /* @__PURE__ */
|
|
38
|
+
return n == null ? /* @__PURE__ */ R("div", {
|
|
39
39
|
className: "flex flex-col gap-3",
|
|
40
|
-
children: [e != null && e !== "" && /* @__PURE__ */
|
|
40
|
+
children: [e != null && e !== "" && /* @__PURE__ */ L("p", {
|
|
41
41
|
className: r(g, "text-start"),
|
|
42
42
|
children: e
|
|
43
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ L(a, {
|
|
44
44
|
variant: s.Primary,
|
|
45
45
|
appearance: o.Link,
|
|
46
46
|
size: u.Small,
|
|
47
47
|
className: "self-start",
|
|
48
48
|
label: p,
|
|
49
|
-
iconBefore: /* @__PURE__ */
|
|
49
|
+
iconBefore: /* @__PURE__ */ L(P, {
|
|
50
50
|
size: c.SM,
|
|
51
51
|
stroke: l,
|
|
52
52
|
"aria-hidden": !0
|
|
@@ -54,23 +54,23 @@ var V = {
|
|
|
54
54
|
onClick: m,
|
|
55
55
|
tabIndex: h
|
|
56
56
|
})]
|
|
57
|
-
}) : /* @__PURE__ */
|
|
57
|
+
}) : /* @__PURE__ */ L("p", {
|
|
58
58
|
className: r(g, "text-start"),
|
|
59
59
|
children: n
|
|
60
60
|
});
|
|
61
|
-
},
|
|
61
|
+
}, q = {
|
|
62
62
|
chip: "_chip_ddlyv_1",
|
|
63
63
|
unsupported: "_unsupported_ddlyv_9"
|
|
64
|
-
},
|
|
65
|
-
let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: p = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] =
|
|
64
|
+
}, J = ({ name: e, path: n, description: i, isUnsupported: a = !1, unresolvedReason: o, labelClassName: s = "dial-body-paragraph-text", colors: c, detailsTrigger: l = "hover", onViewDetails: u, labels: d = {} }) => {
|
|
65
|
+
let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: p = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = N(0), b = t({
|
|
66
66
|
"--sk-chip-label": c?.label,
|
|
67
67
|
"--sk-chip-hover-bg": c?.hoverBackground,
|
|
68
68
|
"--sk-chip-unsupported-label": c?.unsupportedLabel,
|
|
69
69
|
"--sk-chip-unsupported-bg": c?.unsupportedBackground
|
|
70
70
|
}), x = l === "click", S = () => {
|
|
71
71
|
y((e) => e + 1), u(n);
|
|
72
|
-
}, [C,
|
|
73
|
-
return
|
|
72
|
+
}, [C, w] = N(null), [T, D] = N(null);
|
|
73
|
+
return A(() => {
|
|
74
74
|
if (!C) return;
|
|
75
75
|
let e = () => {
|
|
76
76
|
C.isConnected && D(C.getBoundingClientRect().width);
|
|
@@ -78,40 +78,40 @@ var V = {
|
|
|
78
78
|
if (e(), typeof ResizeObserver > "u") return;
|
|
79
79
|
let t = new ResizeObserver(e);
|
|
80
80
|
return t.observe(C), () => t.disconnect();
|
|
81
|
-
}, [C, s]), /* @__PURE__ */
|
|
81
|
+
}, [C, s]), /* @__PURE__ */ L(m, {
|
|
82
82
|
asChild: !0,
|
|
83
|
-
placement:
|
|
83
|
+
placement: E.Top,
|
|
84
84
|
trigger: x ? h.Click : h.Hover,
|
|
85
|
-
contentClassName:
|
|
86
|
-
content: o == null ? a ? /* @__PURE__ */
|
|
85
|
+
contentClassName: ie,
|
|
86
|
+
content: o == null ? a ? /* @__PURE__ */ L(K, { unsupportedMessage: p }) : /* @__PURE__ */ L(K, {
|
|
87
87
|
description: i,
|
|
88
88
|
viewDetailsLabel: f,
|
|
89
89
|
onViewDetails: S
|
|
90
|
-
}) : /* @__PURE__ */
|
|
90
|
+
}) : /* @__PURE__ */ L(K, {
|
|
91
91
|
unresolvedReason: o,
|
|
92
92
|
deletedMessage: g,
|
|
93
93
|
notSharedMessage: _,
|
|
94
94
|
colors: c?.tooltip
|
|
95
95
|
}),
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ R("span", {
|
|
97
97
|
tabIndex: 0,
|
|
98
|
-
className: r("relative -ms-1 -me-1 inline cursor-pointer rounded-full ps-1 pe-1 select-text",
|
|
98
|
+
className: r("relative -ms-1 -me-1 inline cursor-pointer rounded-full ps-1 pe-1 select-text", q.chip, a && q.unsupported, s, U.chip),
|
|
99
99
|
style: b,
|
|
100
100
|
"aria-label": `/${e}`,
|
|
101
|
-
children: [/* @__PURE__ */
|
|
102
|
-
ref:
|
|
101
|
+
children: [/* @__PURE__ */ L("span", {
|
|
102
|
+
ref: w,
|
|
103
103
|
"aria-hidden": !0,
|
|
104
104
|
className: "inset-inline-start-0 pointer-events-none absolute select-none",
|
|
105
105
|
children: "/"
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ L("span", {
|
|
107
107
|
"aria-hidden": !0,
|
|
108
108
|
className: "select-none",
|
|
109
|
-
style: { paddingInlineStart:
|
|
109
|
+
style: { paddingInlineStart: T ?? void 0 },
|
|
110
110
|
children: e
|
|
111
111
|
})]
|
|
112
112
|
})
|
|
113
113
|
}, v);
|
|
114
|
-
},
|
|
114
|
+
}, Y = {
|
|
115
115
|
row: "_row_1v431_1",
|
|
116
116
|
header: "_header_1v431_8",
|
|
117
117
|
emptyHint: "_emptyHint_1v431_12",
|
|
@@ -122,25 +122,25 @@ var V = {
|
|
|
122
122
|
rowLeaving: "_rowLeaving_1v431_32",
|
|
123
123
|
rowFadeOut: "_rowFadeOut_1v431_1",
|
|
124
124
|
listContent: "_listContent_1v431_60"
|
|
125
|
-
},
|
|
126
|
-
let { myCollectionLabel:
|
|
127
|
-
"--fs-row-hover-bg":
|
|
128
|
-
"--fs-header-text":
|
|
129
|
-
"--fs-empty-hint-text":
|
|
130
|
-
"--fs-star-color":
|
|
131
|
-
"--fs-footer-border":
|
|
132
|
-
}), [
|
|
133
|
-
|
|
125
|
+
}, ae = "px-3 pb-0.5 pt-2", oe = 180, se = 288, X = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, isRowTooltipHidden: l = !1, className: u, rowClassName: d, searchQuery: h, listboxId: v, activeOptionId: y, isMenu: b = !1, labels: x = {}, colors: S, nameClassName: C = "dial-small-text", headerClassName: T = "dial-tiny-lead-semi-text", emptyHintClassName: E = "dial-small-text" }) => {
|
|
126
|
+
let { myCollectionLabel: D = "My Collection", emptyHintLabel: O = "Star a skill to pin it here", browseLabel: j = "Browse", removeFromFavoritesLabel: te = "Remove from favorites", viewDetailsLabel: P = "View details", noMatchingSkillsLabel: F = "No matching skills" } = x, I = t({
|
|
127
|
+
"--fs-row-hover-bg": S?.rowHoverBackground,
|
|
128
|
+
"--fs-header-text": S?.headerText,
|
|
129
|
+
"--fs-empty-hint-text": S?.emptyHintText,
|
|
130
|
+
"--fs-star-color": S?.starColor,
|
|
131
|
+
"--fs-footer-border": S?.footerBorder
|
|
132
|
+
}), [re, z] = N(/* @__PURE__ */ new Set()), B = M(/* @__PURE__ */ new Map());
|
|
133
|
+
ee(() => {
|
|
134
134
|
let e = B.current;
|
|
135
135
|
return () => {
|
|
136
136
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
137
137
|
};
|
|
138
138
|
}, []);
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
let
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
let V = v != null, H = b && !V, W = V || H ? "none" : void 0, G = "button";
|
|
140
|
+
V ? G = "option" : H && (G = "menuitem");
|
|
141
|
+
let q = k(), J = h != null, X = h?.toLowerCase() ?? "", Z = J ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, ce = Z.length === 0 && J && X !== "", Q = M(null), [$, le] = N();
|
|
142
|
+
A(() => {
|
|
143
|
+
Q.current && le(Math.min(Q.current.scrollHeight, se));
|
|
144
144
|
}, [n, h]);
|
|
145
145
|
let ue = (e, t) => {
|
|
146
146
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
|
|
@@ -151,59 +151,59 @@ var V = {
|
|
|
151
151
|
let n = new Set(t);
|
|
152
152
|
return n.delete(e), n;
|
|
153
153
|
}), B.current.delete(e);
|
|
154
|
-
},
|
|
154
|
+
}, oe);
|
|
155
155
|
B.current.set(e, t);
|
|
156
156
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
className: r("flex w-full flex-col desktop:w-[280px]", u,
|
|
159
|
-
style:
|
|
157
|
+
return /* @__PURE__ */ R("div", {
|
|
158
|
+
className: r("flex w-full flex-col desktop:w-[280px]", u, U.favoritesPanel),
|
|
159
|
+
style: I,
|
|
160
160
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
id:
|
|
163
|
-
className: r(T,
|
|
164
|
-
children:
|
|
161
|
+
/* @__PURE__ */ L("p", {
|
|
162
|
+
id: q,
|
|
163
|
+
className: r(T, ae, Y.header),
|
|
164
|
+
children: D
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto",
|
|
168
|
-
style: { maxHeight:
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
ref:
|
|
171
|
-
children: [Z.length > 0 ? /* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ L("div", {
|
|
167
|
+
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", Y.listContent),
|
|
168
|
+
style: { maxHeight: $ },
|
|
169
|
+
children: /* @__PURE__ */ R("div", {
|
|
170
|
+
ref: Q,
|
|
171
|
+
children: [Z.length > 0 ? /* @__PURE__ */ L("ul", {
|
|
172
172
|
id: v,
|
|
173
|
-
role:
|
|
174
|
-
"aria-labelledby":
|
|
173
|
+
role: V ? "listbox" : W,
|
|
174
|
+
"aria-labelledby": V ? q : void 0,
|
|
175
175
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
176
176
|
children: Z.map((t) => {
|
|
177
|
-
let n =
|
|
178
|
-
role:
|
|
177
|
+
let n = V ? `${v}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, u = /* @__PURE__ */ R("div", {
|
|
178
|
+
role: G,
|
|
179
179
|
id: n,
|
|
180
|
-
"aria-selected":
|
|
180
|
+
"aria-selected": V ? n === y : void 0,
|
|
181
181
|
"aria-label": t.name,
|
|
182
182
|
tabIndex: 0,
|
|
183
|
-
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors",
|
|
183
|
+
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", Y.row, d),
|
|
184
184
|
onClick: () => i(t),
|
|
185
185
|
onKeyDown: (e) => ue(e, t),
|
|
186
186
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ L(e, {
|
|
188
188
|
size: c.MD,
|
|
189
189
|
initialsName: t.name
|
|
190
190
|
}),
|
|
191
|
-
h == null ? /* @__PURE__ */
|
|
192
|
-
className: r(
|
|
191
|
+
h == null ? /* @__PURE__ */ L("span", {
|
|
192
|
+
className: r(C, "min-w-0 flex-1 truncate text-start"),
|
|
193
193
|
children: t.name
|
|
194
|
-
}) : /* @__PURE__ */
|
|
194
|
+
}) : /* @__PURE__ */ L(p, {
|
|
195
195
|
text: t.name,
|
|
196
196
|
query: h,
|
|
197
197
|
maxLines: 1,
|
|
198
|
-
className: r(
|
|
198
|
+
className: r(C, "min-w-0 flex-1 text-start")
|
|
199
199
|
}),
|
|
200
|
-
a && /* @__PURE__ */
|
|
201
|
-
icon: /* @__PURE__ */
|
|
200
|
+
a && /* @__PURE__ */ L(w, {
|
|
201
|
+
icon: /* @__PURE__ */ L(ne, {
|
|
202
202
|
size: c.SM,
|
|
203
|
-
className:
|
|
203
|
+
className: Y.star,
|
|
204
204
|
"aria-hidden": !0
|
|
205
205
|
}),
|
|
206
|
-
"aria-label":
|
|
206
|
+
"aria-label": te,
|
|
207
207
|
isSelected: !0,
|
|
208
208
|
tabIndex: o,
|
|
209
209
|
onClick: (e) => {
|
|
@@ -212,15 +212,15 @@ var V = {
|
|
|
212
212
|
})
|
|
213
213
|
]
|
|
214
214
|
});
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
role:
|
|
217
|
-
className:
|
|
218
|
-
children: s && !l ? /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ L("li", {
|
|
216
|
+
role: W,
|
|
217
|
+
className: re.has(t.id) ? Y.rowLeaving : Y.rowEnter,
|
|
218
|
+
children: s && !l ? /* @__PURE__ */ L(m, {
|
|
219
219
|
asChild: !0,
|
|
220
|
-
contentClassName:
|
|
221
|
-
content: /* @__PURE__ */
|
|
220
|
+
contentClassName: ie,
|
|
221
|
+
content: /* @__PURE__ */ L(K, {
|
|
222
222
|
description: t.description,
|
|
223
|
-
viewDetailsLabel:
|
|
223
|
+
viewDetailsLabel: P,
|
|
224
224
|
onViewDetails: () => s(t),
|
|
225
225
|
viewDetailsTabIndex: o
|
|
226
226
|
}),
|
|
@@ -228,42 +228,42 @@ var V = {
|
|
|
228
228
|
}) : u
|
|
229
229
|
}, t.id);
|
|
230
230
|
})
|
|
231
|
-
}) :
|
|
232
|
-
className: r(E, "px-4 py-4 text-start",
|
|
233
|
-
children:
|
|
234
|
-
}), /* @__PURE__ */
|
|
231
|
+
}) : ce ? null : /* @__PURE__ */ L("p", {
|
|
232
|
+
className: r(E, "px-4 py-4 text-start", Y.emptyHint),
|
|
233
|
+
children: O
|
|
234
|
+
}), /* @__PURE__ */ L(g, {
|
|
235
235
|
as: _.P,
|
|
236
|
-
className: r(E, "px-4 py-4 text-start",
|
|
237
|
-
children:
|
|
236
|
+
className: r(E, "px-4 py-4 text-start", Y.emptyHint),
|
|
237
|
+
children: ce && F
|
|
238
238
|
})]
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
className: r("border-t px-2 py-3",
|
|
243
|
-
children: /* @__PURE__ */
|
|
244
|
-
role:
|
|
245
|
-
label:
|
|
241
|
+
/* @__PURE__ */ L("div", {
|
|
242
|
+
className: r("border-t px-2 py-3", Y.footer),
|
|
243
|
+
children: /* @__PURE__ */ L(f, {
|
|
244
|
+
role: H ? "menuitem" : void 0,
|
|
245
|
+
label: j,
|
|
246
246
|
className: "w-full justify-center",
|
|
247
247
|
onClick: o
|
|
248
248
|
})
|
|
249
249
|
})
|
|
250
250
|
]
|
|
251
251
|
});
|
|
252
|
-
},
|
|
252
|
+
}, Z = ".zip,.md", ce = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = Z, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
|
|
253
253
|
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 ?? {};
|
|
254
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ L(v, {
|
|
255
255
|
open: e,
|
|
256
256
|
size: y.Sm,
|
|
257
257
|
header: c,
|
|
258
258
|
closeAriaLabel: m,
|
|
259
259
|
onClose: a,
|
|
260
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ R("div", {
|
|
261
261
|
className: "flex flex-col gap-4 px-6 py-4",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
-
label: /* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ L(d, {
|
|
263
|
+
label: /* @__PURE__ */ R(re, { children: [/* @__PURE__ */ L("span", {
|
|
264
264
|
className: "desktop:hidden",
|
|
265
265
|
children: u
|
|
266
|
-
}), /* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ L("span", {
|
|
267
267
|
className: "hidden desktop:inline",
|
|
268
268
|
children: l
|
|
269
269
|
})] }),
|
|
@@ -274,39 +274,39 @@ var V = {
|
|
|
274
274
|
errorText: n ? void 0 : t,
|
|
275
275
|
onChange: o,
|
|
276
276
|
onReject: s
|
|
277
|
-
}), n && /* @__PURE__ */
|
|
277
|
+
}), n && /* @__PURE__ */ L(x, { ariaLabel: h })]
|
|
278
278
|
})
|
|
279
279
|
});
|
|
280
|
-
},
|
|
280
|
+
}, Q = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ L(v, {
|
|
281
281
|
open: e,
|
|
282
282
|
header: r,
|
|
283
283
|
size: y.Lg,
|
|
284
284
|
className: "h-[min(90vh,860px)] max-w-[min(95vw,1200px)]! overflow-hidden mobile:h-full mobile:max-w-full! mobile:rounded-none",
|
|
285
285
|
overlayClassName: "mobile:p-0",
|
|
286
286
|
onClose: t,
|
|
287
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ L("div", {
|
|
288
288
|
className: "h-[min(80vh,840px)] overflow-auto mobile:h-full",
|
|
289
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ L(D, {
|
|
290
290
|
fallback: null,
|
|
291
291
|
children: e && i(n, t)
|
|
292
292
|
})
|
|
293
293
|
})
|
|
294
|
-
}),
|
|
294
|
+
}), $ = (e, t = null) => e.map((e) => e.type === V.Folder ? {
|
|
295
295
|
path: e.id,
|
|
296
296
|
name: e.name,
|
|
297
|
-
nodeType:
|
|
297
|
+
nodeType: z.FOLDER,
|
|
298
298
|
parentPath: t,
|
|
299
299
|
folderId: e.id,
|
|
300
|
-
items:
|
|
300
|
+
items: $(e.items, e.id)
|
|
301
301
|
} : {
|
|
302
302
|
path: e.id,
|
|
303
303
|
name: e.name,
|
|
304
|
-
nodeType:
|
|
304
|
+
nodeType: z.ITEM,
|
|
305
305
|
parentPath: t,
|
|
306
306
|
folderId: t ?? ""
|
|
307
|
-
}),
|
|
308
|
-
let s =
|
|
309
|
-
return /* @__PURE__ */
|
|
307
|
+
}), le = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => {
|
|
308
|
+
let s = j(() => $(e), [e]), c = j(() => new Set(n), [n]);
|
|
309
|
+
return /* @__PURE__ */ L(B, {
|
|
310
310
|
items: s,
|
|
311
311
|
showFiles: !0,
|
|
312
312
|
areHiddenFilesVisible: !0,
|
|
@@ -317,16 +317,16 @@ var V = {
|
|
|
317
317
|
for (let t of n) e.has(t) || r(t);
|
|
318
318
|
},
|
|
319
319
|
onItemClick: (e) => {
|
|
320
|
-
e.nodeType ===
|
|
320
|
+
e.nodeType === z.ITEM && i(e.path);
|
|
321
321
|
},
|
|
322
322
|
ariaLabel: o,
|
|
323
323
|
autoFocus: !0,
|
|
324
324
|
onEscape: a
|
|
325
325
|
});
|
|
326
|
-
},
|
|
326
|
+
}, ue = (e) => /* @__PURE__ */ L(H, {
|
|
327
327
|
...e,
|
|
328
|
-
renderContentFileTree: (e) => /* @__PURE__ */
|
|
329
|
-
}),
|
|
328
|
+
renderContentFileTree: (e) => /* @__PURE__ */ L(le, { ...e })
|
|
329
|
+
}), de = (e) => e == null || /[\s/]/.test(e), fe = (e, t, n) => {
|
|
330
330
|
let r = [], i = 0;
|
|
331
331
|
return t.forEach((t, a) => {
|
|
332
332
|
let o = `/${n(t.url)}`, s = i;
|
|
@@ -334,7 +334,7 @@ var V = {
|
|
|
334
334
|
let t = e.indexOf(o, s);
|
|
335
335
|
if (t === -1) return;
|
|
336
336
|
let n = t + o.length;
|
|
337
|
-
if (
|
|
337
|
+
if (de(e[n])) {
|
|
338
338
|
r.push({
|
|
339
339
|
skillIndex: a,
|
|
340
340
|
start: t,
|
|
@@ -345,14 +345,14 @@ var V = {
|
|
|
345
345
|
s = t + 1;
|
|
346
346
|
}
|
|
347
347
|
}), r;
|
|
348
|
-
},
|
|
348
|
+
}, pe = (e, t) => {
|
|
349
349
|
let n = /* @__PURE__ */ new Map();
|
|
350
350
|
t.forEach((e) => {
|
|
351
351
|
e.name !== "" && !n.has(e.name) && n.set(e.name, e.url);
|
|
352
352
|
});
|
|
353
353
|
let r = [...n.keys()].sort((e, t) => t.length - e.length), i = [], a = e.indexOf("/");
|
|
354
354
|
for (; a !== -1;) {
|
|
355
|
-
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) &&
|
|
355
|
+
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) && de(e[o + t.length])) : void 0, c = s == null ? void 0 : n.get(s);
|
|
356
356
|
s != null && c != null ? (i.push({
|
|
357
357
|
url: c,
|
|
358
358
|
name: s,
|
|
@@ -361,7 +361,7 @@ var V = {
|
|
|
361
361
|
}), a = e.indexOf("/", o + s.length)) : a = e.indexOf("/", o);
|
|
362
362
|
}
|
|
363
363
|
return i;
|
|
364
|
-
},
|
|
364
|
+
}, me = (e, t) => {
|
|
365
365
|
let n = Math.min(e.length, t.length), r = 0;
|
|
366
366
|
for (; r < n && e[r] === t[r];) r += 1;
|
|
367
367
|
let i = n - r, a = 0;
|
|
@@ -371,13 +371,13 @@ var V = {
|
|
|
371
371
|
deletedLength: e.length - r - a,
|
|
372
372
|
insertedLength: t.length - r - a
|
|
373
373
|
};
|
|
374
|
-
},
|
|
374
|
+
}, he = (e, t) => {
|
|
375
375
|
let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
|
|
376
376
|
return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
|
|
377
377
|
...i,
|
|
378
378
|
start: i.start + r
|
|
379
379
|
}), e), []);
|
|
380
|
-
},
|
|
380
|
+
}, ge = (e, t, n, r, i) => {
|
|
381
381
|
let a = r.length + 1, o = a + +!!i, s = e.map((e) => e.start >= t ? {
|
|
382
382
|
...e,
|
|
383
383
|
start: e.start + o
|
|
@@ -388,7 +388,7 @@ var V = {
|
|
|
388
388
|
length: a
|
|
389
389
|
};
|
|
390
390
|
return [...s, c].sort((e, t) => e.start - t.start);
|
|
391
|
-
},
|
|
391
|
+
}, _e = (e, t) => e.find((e) => e.start + e.length === t), ve = (e, t, n) => {
|
|
392
392
|
let r = t;
|
|
393
393
|
for (; r > 0 && !/\s/.test(e[r - 1]);) r--;
|
|
394
394
|
let i = r;
|
|
@@ -398,21 +398,21 @@ var V = {
|
|
|
398
398
|
start: r,
|
|
399
399
|
end: i
|
|
400
400
|
};
|
|
401
|
-
},
|
|
401
|
+
}, ye = (e, t, n) => {
|
|
402
402
|
if (n === "" || t.insertedLength < n.length) return;
|
|
403
403
|
let r = e.indexOf(n, Math.max(0, t.start - n.length)), i = t.start + t.insertedLength - n.length;
|
|
404
404
|
return r !== -1 && r <= i ? r : void 0;
|
|
405
|
-
},
|
|
406
|
-
let [e, t] =
|
|
405
|
+
}, be = () => {
|
|
406
|
+
let [e, t] = N(""), [n, r] = N([]), i = M(e);
|
|
407
407
|
i.current = e;
|
|
408
|
-
let a =
|
|
408
|
+
let a = M(n);
|
|
409
409
|
a.current = n;
|
|
410
|
-
let o =
|
|
411
|
-
let n =
|
|
410
|
+
let o = M(null), s = O((e) => {
|
|
411
|
+
let n = me(i.current, e), a = o.current;
|
|
412
412
|
o.current = null;
|
|
413
|
-
let s = a == null ? void 0 :
|
|
413
|
+
let s = a == null ? void 0 : ye(e, n, a.text);
|
|
414
414
|
r((t) => {
|
|
415
|
-
let r =
|
|
415
|
+
let r = he(t, n);
|
|
416
416
|
if (a == null || s == null) return r;
|
|
417
417
|
let i = a.mentions.map((e) => ({
|
|
418
418
|
...e,
|
|
@@ -420,23 +420,23 @@ var V = {
|
|
|
420
420
|
})).filter((t) => e.startsWith(`/${t.name}`, t.start) && !r.some((e) => e.start < t.start + t.length && t.start < e.start + e.length));
|
|
421
421
|
return [...r, ...i].sort((e, t) => e.start - t.start);
|
|
422
422
|
}), i.current = e, t(e);
|
|
423
|
-
}, []), c =
|
|
423
|
+
}, []), c = O((e, n, a) => {
|
|
424
424
|
let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
|
|
425
|
-
return i.current = l, t(l), r((t) =>
|
|
426
|
-
}, []), l =
|
|
425
|
+
return i.current = l, t(l), r((t) => ge(t, a, e, n, s)), s;
|
|
426
|
+
}, []), l = O((e, n, a) => {
|
|
427
427
|
let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
|
|
428
|
-
i.current = c, t(c), r((t) =>
|
|
429
|
-
}, []), u =
|
|
428
|
+
i.current = c, t(c), r((t) => ge(t, a, e, n, !1));
|
|
429
|
+
}, []), u = O((e) => _e(a.current, e), []), d = j(() => {
|
|
430
430
|
if (n.length !== 0) return n.map((e) => ({ url: e.url }));
|
|
431
|
-
}, [n]), f =
|
|
431
|
+
}, [n]), f = O((e, t) => {
|
|
432
432
|
o.current = t.length > 0 ? {
|
|
433
433
|
text: e,
|
|
434
434
|
mentions: t
|
|
435
435
|
} : null;
|
|
436
|
-
}, []), p =
|
|
436
|
+
}, []), p = O(() => {
|
|
437
437
|
t(""), r([]);
|
|
438
|
-
}, []), m =
|
|
439
|
-
let a = n ?? [], o =
|
|
438
|
+
}, []), m = O((e, n, i) => {
|
|
439
|
+
let a = n ?? [], o = fe(e, a, i);
|
|
440
440
|
t(e), r(o.map((e) => {
|
|
441
441
|
let t = a[e.skillIndex];
|
|
442
442
|
return {
|
|
@@ -447,7 +447,7 @@ var V = {
|
|
|
447
447
|
};
|
|
448
448
|
}));
|
|
449
449
|
}, []);
|
|
450
|
-
return
|
|
450
|
+
return j(() => ({
|
|
451
451
|
draft: e,
|
|
452
452
|
anchors: n,
|
|
453
453
|
onDraftChange: s,
|
|
@@ -470,18 +470,18 @@ var V = {
|
|
|
470
470
|
p,
|
|
471
471
|
m
|
|
472
472
|
]);
|
|
473
|
-
},
|
|
473
|
+
}, xe = (e) => ({
|
|
474
474
|
id: e.url,
|
|
475
475
|
name: e.name,
|
|
476
476
|
description: e.description
|
|
477
|
-
}),
|
|
477
|
+
}), Se = (e) => {
|
|
478
478
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
479
479
|
return t[t.length - 1] ?? e;
|
|
480
|
-
},
|
|
480
|
+
}, Ce = (e) => {
|
|
481
481
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
482
482
|
return t[0] !== "skills" || t.length < 3 ? null : t[1];
|
|
483
|
-
},
|
|
484
|
-
let { addMenuLabel: _ = "Skills", backLabel: v = "Back", catalogModalTitleLabel: y = "Use skill", emptyQueryHintLabel: b = "Type to filter", deletedTooltipLabel: x, notSharedTooltipLabel: S, unsupportedTooltipLabel: C, panelLabels: w } = c ?? {}, [
|
|
483
|
+
}, we = (e, t) => Ce(e) === t ? W.Deleted : W.NotShared, Te = "/", Ee = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, chipColors: d, activeMentionDetailsTrigger: f, historyDetailsTrigger: p, isRowTooltipHidden: m = !1, renderCatalogContent: h, detailsPanelComponent: g }) => {
|
|
484
|
+
let { addMenuLabel: _ = "Skills", backLabel: v = "Back", catalogModalTitleLabel: y = "Use skill", emptyQueryHintLabel: b = "Type to filter", deletedTooltipLabel: x, notSharedTooltipLabel: S, unsupportedTooltipLabel: C, panelLabels: w } = c ?? {}, [T, E] = N(!1), [ee, k] = N(null), [A, P] = N(0), F = M(null), [ne, I] = N(0), [re, R] = N(void 0), z = be(), B = j(() => [
|
|
485
485
|
...t,
|
|
486
486
|
...n ?? [],
|
|
487
487
|
...r ?? []
|
|
@@ -489,11 +489,11 @@ var V = {
|
|
|
489
489
|
t,
|
|
490
490
|
n,
|
|
491
491
|
r
|
|
492
|
-
]), V =
|
|
492
|
+
]), V = j(() => new Map(B.map((e) => [e.url, e])), [B]), H = O((e) => V.get(e)?.name ?? Se(e), [V]), U = j(() => B.filter((e) => a.has(e.url)).map((e) => xe(e)), [B, a]), ie = z.anchors.length > 0 && !e, W = j(() => z.anchors.map((t) => ({
|
|
493
493
|
start: t.start,
|
|
494
494
|
length: t.length,
|
|
495
495
|
isUnsupported: !e,
|
|
496
|
-
render: () => /* @__PURE__ */
|
|
496
|
+
render: () => /* @__PURE__ */ L(J, {
|
|
497
497
|
name: t.name,
|
|
498
498
|
path: t.url,
|
|
499
499
|
labelClassName: "",
|
|
@@ -501,7 +501,7 @@ var V = {
|
|
|
501
501
|
description: V.get(t.url)?.description,
|
|
502
502
|
isUnsupported: !e,
|
|
503
503
|
detailsTrigger: f,
|
|
504
|
-
onViewDetails:
|
|
504
|
+
onViewDetails: k,
|
|
505
505
|
labels: {
|
|
506
506
|
viewDetailsLabel: w?.viewDetailsLabel,
|
|
507
507
|
unsupportedTooltipLabel: C
|
|
@@ -515,14 +515,14 @@ var V = {
|
|
|
515
515
|
f,
|
|
516
516
|
w,
|
|
517
517
|
C
|
|
518
|
-
]),
|
|
518
|
+
]), G = O((e, t, n) => {
|
|
519
519
|
let r = z.insertMention(e, t, n);
|
|
520
|
-
|
|
521
|
-
}, [z]),
|
|
522
|
-
let t =
|
|
520
|
+
I((e) => e + 1), R(n + 1 + t.length + +!!r);
|
|
521
|
+
}, [z]), K = O((e) => {
|
|
522
|
+
let t = ve(z.draft, e, Te);
|
|
523
523
|
return t == null ? e : (z.onDraftChange(z.draft.slice(0, t.start) + z.draft.slice(t.end)), t.start);
|
|
524
|
-
}, [z]),
|
|
525
|
-
let t =
|
|
524
|
+
}, [z]), q = O((e) => {
|
|
525
|
+
let t = ve(z.draft, e, Te);
|
|
526
526
|
if (t == null) return;
|
|
527
527
|
let n = z.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
|
|
528
528
|
return {
|
|
@@ -530,25 +530,25 @@ var V = {
|
|
|
530
530
|
text: z.draft.slice(t.start, t.end),
|
|
531
531
|
mentionUrl: n?.url
|
|
532
532
|
};
|
|
533
|
-
}, [z]),
|
|
534
|
-
z.reset(),
|
|
535
|
-
}, [z]), { expectInsertion:
|
|
536
|
-
|
|
533
|
+
}, [z]), Y = O(() => {
|
|
534
|
+
z.reset(), I((e) => e + 1), R(void 0);
|
|
535
|
+
}, [z]), { expectInsertion: ae } = z, oe = O((t) => {
|
|
536
|
+
ae(t, e ? pe(t, B) : []);
|
|
537
537
|
}, [
|
|
538
|
-
|
|
538
|
+
ae,
|
|
539
539
|
e,
|
|
540
540
|
B
|
|
541
|
-
]), se =
|
|
542
|
-
z.seedFromMessage(e, t, H),
|
|
543
|
-
}, [z, H]),
|
|
541
|
+
]), se = O((e, t) => {
|
|
542
|
+
z.seedFromMessage(e, t, H), I((e) => e + 1), R(void 0);
|
|
543
|
+
}, [z, H]), Z = O((e, t) => {
|
|
544
544
|
if (t == null || t.length === 0) return null;
|
|
545
|
-
let n =
|
|
545
|
+
let n = fe(e, t, H), r = [], i = 0;
|
|
546
546
|
return n.forEach((n) => {
|
|
547
547
|
n.start > i && r.push(e.slice(i, n.start));
|
|
548
|
-
let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ??
|
|
548
|
+
let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ?? Se(a.url), l = s == null ? we(a.url, o) : void 0;
|
|
549
549
|
r.push({
|
|
550
550
|
text: e.slice(n.start, n.start + n.length),
|
|
551
|
-
node: /* @__PURE__ */
|
|
551
|
+
node: /* @__PURE__ */ L(J, {
|
|
552
552
|
name: c,
|
|
553
553
|
path: a.url,
|
|
554
554
|
labelClassName: u,
|
|
@@ -556,7 +556,7 @@ var V = {
|
|
|
556
556
|
description: s?.description,
|
|
557
557
|
unresolvedReason: l,
|
|
558
558
|
detailsTrigger: p,
|
|
559
|
-
onViewDetails:
|
|
559
|
+
onViewDetails: k,
|
|
560
560
|
labels: {
|
|
561
561
|
viewDetailsLabel: w?.viewDetailsLabel,
|
|
562
562
|
deletedTooltipLabel: x,
|
|
@@ -575,9 +575,9 @@ var V = {
|
|
|
575
575
|
o,
|
|
576
576
|
x,
|
|
577
577
|
S
|
|
578
|
-
]),
|
|
579
|
-
let t = V.get(e.url), n = t?.name ??
|
|
580
|
-
return /* @__PURE__ */
|
|
578
|
+
]), ce = O((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
579
|
+
let t = V.get(e.url), n = t?.name ?? Se(e.url), r = t == null ? we(e.url, o) : void 0;
|
|
580
|
+
return /* @__PURE__ */ L(J, {
|
|
581
581
|
name: n,
|
|
582
582
|
path: e.url,
|
|
583
583
|
labelClassName: u,
|
|
@@ -585,7 +585,7 @@ var V = {
|
|
|
585
585
|
description: t?.description,
|
|
586
586
|
unresolvedReason: r,
|
|
587
587
|
detailsTrigger: p,
|
|
588
|
-
onViewDetails:
|
|
588
|
+
onViewDetails: k,
|
|
589
589
|
labels: {
|
|
590
590
|
viewDetailsLabel: w?.viewDetailsLabel,
|
|
591
591
|
deletedTooltipLabel: x,
|
|
@@ -601,72 +601,72 @@ var V = {
|
|
|
601
601
|
o,
|
|
602
602
|
x,
|
|
603
603
|
S
|
|
604
|
-
]),
|
|
604
|
+
]), $ = O((e, t) => /* @__PURE__ */ L(X, {
|
|
605
605
|
favorites: U,
|
|
606
606
|
isMenu: !0,
|
|
607
607
|
onSelect: (n) => {
|
|
608
|
-
|
|
608
|
+
G(n.id, n.name, K(t)), e();
|
|
609
609
|
},
|
|
610
610
|
onToggleFavorite: s,
|
|
611
611
|
onBrowse: () => {
|
|
612
|
-
let n =
|
|
613
|
-
|
|
612
|
+
let n = q(t), r = K(t);
|
|
613
|
+
P(r), F.current = n ?? null, e(), E(!0);
|
|
614
614
|
},
|
|
615
615
|
onViewDetails: (n) => {
|
|
616
|
-
|
|
616
|
+
K(t), e(), k(n.id);
|
|
617
617
|
},
|
|
618
618
|
isRowTooltipHidden: m,
|
|
619
619
|
labels: w
|
|
620
620
|
}), [
|
|
621
621
|
U,
|
|
622
|
+
G,
|
|
622
623
|
K,
|
|
623
|
-
|
|
624
|
-
ie,
|
|
624
|
+
q,
|
|
625
625
|
s,
|
|
626
626
|
m,
|
|
627
627
|
w
|
|
628
|
-
]), le =
|
|
628
|
+
]), le = j(() => e ? {
|
|
629
629
|
key: "skills",
|
|
630
630
|
title: _,
|
|
631
|
-
icon: /* @__PURE__ */
|
|
631
|
+
icon: /* @__PURE__ */ L(te, {
|
|
632
632
|
size: i,
|
|
633
633
|
"aria-hidden": !0,
|
|
634
634
|
stroke: l
|
|
635
635
|
}),
|
|
636
|
-
renderOverlay:
|
|
636
|
+
renderOverlay: $,
|
|
637
637
|
backLabel: v
|
|
638
638
|
} : void 0, [
|
|
639
639
|
e,
|
|
640
640
|
_,
|
|
641
641
|
v,
|
|
642
|
-
|
|
643
|
-
]),
|
|
644
|
-
triggerPrefix:
|
|
642
|
+
$
|
|
643
|
+
]), ue = j(() => e ? {
|
|
644
|
+
triggerPrefix: Te,
|
|
645
645
|
menuLabel: _,
|
|
646
646
|
emptyQueryHint: b,
|
|
647
|
-
onTextPaste:
|
|
648
|
-
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */
|
|
647
|
+
onTextPaste: oe,
|
|
648
|
+
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ L(X, {
|
|
649
649
|
favorites: U,
|
|
650
650
|
searchQuery: e,
|
|
651
651
|
listboxId: r,
|
|
652
652
|
activeOptionId: i,
|
|
653
653
|
onSelect: (e) => {
|
|
654
|
-
n({ consumeQuery: !0 }),
|
|
654
|
+
n({ consumeQuery: !0 }), G(e.id, e.name, t);
|
|
655
655
|
},
|
|
656
656
|
onToggleFavorite: s,
|
|
657
657
|
onBrowse: () => {
|
|
658
|
-
let r = `${
|
|
658
|
+
let r = `${Te}${e}`, i = z.anchors.find((e) => e.start === t && e.length === r.length);
|
|
659
659
|
n({
|
|
660
660
|
consumeQuery: !0,
|
|
661
661
|
returnFocus: !1
|
|
662
|
-
}),
|
|
662
|
+
}), P(t), F.current = {
|
|
663
663
|
position: t,
|
|
664
664
|
text: r,
|
|
665
665
|
mentionUrl: i?.url
|
|
666
|
-
},
|
|
666
|
+
}, E(!0);
|
|
667
667
|
},
|
|
668
668
|
onViewDetails: (e) => {
|
|
669
|
-
n({ consumeQuery: !0 }),
|
|
669
|
+
n({ consumeQuery: !0 }), k(e.id);
|
|
670
670
|
},
|
|
671
671
|
isRowTooltipHidden: m,
|
|
672
672
|
labels: w
|
|
@@ -676,134 +676,157 @@ var V = {
|
|
|
676
676
|
_,
|
|
677
677
|
b,
|
|
678
678
|
U,
|
|
679
|
-
|
|
679
|
+
G,
|
|
680
680
|
z.anchors,
|
|
681
681
|
s,
|
|
682
682
|
m,
|
|
683
683
|
w,
|
|
684
|
-
|
|
685
|
-
]),
|
|
686
|
-
|
|
684
|
+
oe
|
|
685
|
+
]), de = O(() => {
|
|
686
|
+
E(!1);
|
|
687
687
|
let e = F.current;
|
|
688
688
|
if (F.current = null, e == null) return;
|
|
689
689
|
let { position: t, text: n, mentionUrl: r } = e;
|
|
690
|
-
r == null ? z.onDraftChange(z.draft.slice(0, t) + n + z.draft.slice(t)) : z.restoreMention(r, n.slice(1), t),
|
|
690
|
+
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);
|
|
691
691
|
}, [z]);
|
|
692
692
|
return {
|
|
693
693
|
skillMenuOverlay: le,
|
|
694
|
-
commandMenu:
|
|
695
|
-
skillCatalogModal: /* @__PURE__ */
|
|
696
|
-
isOpen:
|
|
697
|
-
onClose:
|
|
694
|
+
commandMenu: ue,
|
|
695
|
+
skillCatalogModal: /* @__PURE__ */ L(Q, {
|
|
696
|
+
isOpen: T,
|
|
697
|
+
onClose: de,
|
|
698
698
|
onSelect: (e) => {
|
|
699
|
-
F.current = null,
|
|
699
|
+
F.current = null, G(e, H(e), A), E(!1);
|
|
700
700
|
},
|
|
701
701
|
title: y,
|
|
702
702
|
renderContent: h
|
|
703
703
|
}),
|
|
704
|
-
skillDetailsPanel: /* @__PURE__ */
|
|
704
|
+
skillDetailsPanel: /* @__PURE__ */ L(D, {
|
|
705
705
|
fallback: null,
|
|
706
|
-
children: /* @__PURE__ */
|
|
707
|
-
skillId:
|
|
708
|
-
onClose: () =>
|
|
706
|
+
children: /* @__PURE__ */ L(g, {
|
|
707
|
+
skillId: ee,
|
|
708
|
+
onClose: () => k(null)
|
|
709
709
|
})
|
|
710
710
|
}),
|
|
711
711
|
message: z.draft,
|
|
712
712
|
messageRevision: ne,
|
|
713
|
-
activeMentions:
|
|
713
|
+
activeMentions: W,
|
|
714
714
|
onDraftChange: z.onDraftChange,
|
|
715
715
|
onBackspaceAtCaret: z.onBackspaceAtCaret,
|
|
716
716
|
caretPositionOverride: re,
|
|
717
|
-
isSkillUnsupported:
|
|
717
|
+
isSkillUnsupported: ie,
|
|
718
718
|
selectedSkills: z.orderedSkills,
|
|
719
|
-
resetSkillMentions:
|
|
719
|
+
resetSkillMentions: Y,
|
|
720
720
|
seedSkillMentions: se,
|
|
721
|
-
recognizeMentionsInInsertion:
|
|
722
|
-
renderHistorySkillSegments:
|
|
723
|
-
renderHistorySkills:
|
|
721
|
+
recognizeMentionsInInsertion: oe,
|
|
722
|
+
renderHistorySkillSegments: Z,
|
|
723
|
+
renderHistorySkills: ce
|
|
724
724
|
};
|
|
725
|
-
},
|
|
725
|
+
}, De = (...e) => {
|
|
726
726
|
let t = /* @__PURE__ */ new Map();
|
|
727
727
|
for (let n of e) for (let e of n ?? []) t.set(e.url, {
|
|
728
728
|
id: e.url,
|
|
729
729
|
name: e.name
|
|
730
730
|
});
|
|
731
731
|
return [...t.values()];
|
|
732
|
-
},
|
|
733
|
-
background: "
|
|
734
|
-
border: "
|
|
735
|
-
value: "
|
|
736
|
-
clear: "
|
|
737
|
-
invalid: "
|
|
738
|
-
|
|
739
|
-
|
|
732
|
+
}, Oe = {
|
|
733
|
+
background: "_background_1goqn_1",
|
|
734
|
+
border: "_border_1goqn_5",
|
|
735
|
+
value: "_value_1goqn_9",
|
|
736
|
+
clear: "_clear_1goqn_13",
|
|
737
|
+
invalid: "_invalid_1goqn_17",
|
|
738
|
+
unavailableTag: "_unavailableTag_1goqn_25"
|
|
739
|
+
}, ke = [], Ae = "Selected model does not support skills. Select a different model to use a skill.", je = ({ value: i, onChange: a, displayNames: o, unavailableValues: s = [], skills: l = ke, isSkillsSupported: u, isDisabled: d = !1, error: f, labels: m, className: h, styles: g }) => {
|
|
740
|
+
let [_, v] = N(!1), [y, x] = N(""), w = k(), E = i.some((e) => n(e, u)), D = u && !d, O = _ && D, ee = i.length > 0 ? m.unsupportedTooltipLabel : void 0, A = !u && i.length === 0, j = A ? m.unavailableHintLabel ?? Ae : void 0, M = new Map(i.map((e) => [e, {
|
|
740
741
|
id: e,
|
|
741
742
|
name: o?.[e] || e
|
|
742
743
|
}]));
|
|
743
|
-
|
|
744
|
-
let
|
|
744
|
+
l.forEach((e) => M.set(e.id, e));
|
|
745
|
+
let te = [...M.values()].map((t) => ({
|
|
745
746
|
value: t.id,
|
|
746
747
|
label: t.name,
|
|
747
|
-
labelNode:
|
|
748
|
+
labelNode: y.trim() ? /* @__PURE__ */ L(p, {
|
|
748
749
|
text: t.name,
|
|
749
|
-
query:
|
|
750
|
+
query: y,
|
|
750
751
|
maxLines: 1
|
|
751
752
|
}) : void 0,
|
|
752
|
-
icon: /* @__PURE__ */
|
|
753
|
+
icon: /* @__PURE__ */ L(e, {
|
|
753
754
|
size: c.SM,
|
|
754
755
|
initialsName: t.name
|
|
755
756
|
}),
|
|
756
|
-
disabled: !
|
|
757
|
-
})),
|
|
757
|
+
disabled: !u || s.includes(t.id)
|
|
758
|
+
})), P = {
|
|
758
759
|
...t({
|
|
759
|
-
"--ssf-text":
|
|
760
|
-
"--ssf-bg":
|
|
761
|
-
"--ssf-border":
|
|
762
|
-
"--ssf-error":
|
|
760
|
+
"--ssf-text": g?.colors?.text,
|
|
761
|
+
"--ssf-bg": g?.colors?.background,
|
|
762
|
+
"--ssf-border": g?.colors?.border,
|
|
763
|
+
"--ssf-error": g?.colors?.error,
|
|
764
|
+
"--ssf-unavailable-tag-bg": g?.colors?.unavailableTagBackground,
|
|
765
|
+
"--ssf-unavailable-tag-border": g?.colors?.unavailableTagBorder
|
|
763
766
|
}),
|
|
764
|
-
...
|
|
767
|
+
...g?.cssVars
|
|
765
768
|
};
|
|
766
|
-
return /* @__PURE__ */
|
|
767
|
-
className: r("min-w-0",
|
|
768
|
-
style:
|
|
769
|
-
children: [/* @__PURE__ */
|
|
770
|
-
tooltip:
|
|
771
|
-
hideTooltip:
|
|
769
|
+
return /* @__PURE__ */ R("div", {
|
|
770
|
+
className: r("min-w-0", h, U.selectorField),
|
|
771
|
+
style: P,
|
|
772
|
+
children: [/* @__PURE__ */ L(T, {
|
|
773
|
+
tooltip: ee,
|
|
774
|
+
hideTooltip: u,
|
|
772
775
|
triggerClassName: "block w-full min-w-0",
|
|
773
|
-
children: /* @__PURE__ */
|
|
774
|
-
inert:
|
|
775
|
-
children: /* @__PURE__ */
|
|
776
|
+
children: /* @__PURE__ */ L("div", {
|
|
777
|
+
inert: d ? !0 : void 0,
|
|
778
|
+
children: /* @__PURE__ */ L(b, {
|
|
776
779
|
multiple: !0,
|
|
780
|
+
customMultiSelectTagsRenderer: s.length ? (e, t, n) => t.map((t) => {
|
|
781
|
+
let r = e.find((e) => e.value === t)?.label ?? t, i = s.includes(t), a = /* @__PURE__ */ L(S, {
|
|
782
|
+
label: r,
|
|
783
|
+
title: i ? "" : void 0,
|
|
784
|
+
appearance: C.Bordered,
|
|
785
|
+
closable: !0,
|
|
786
|
+
disabled: d,
|
|
787
|
+
removeLabel: m.removeLabel,
|
|
788
|
+
onRemove: (e) => n(e, t),
|
|
789
|
+
className: i ? Oe.unavailableTag : void 0
|
|
790
|
+
});
|
|
791
|
+
return i ? /* @__PURE__ */ L(T, {
|
|
792
|
+
tooltip: m.unavailableTooltipLabel ?? "The skill has been deleted or access revoked",
|
|
793
|
+
triggerClassName: "min-w-0 cursor-pointer",
|
|
794
|
+
children: a
|
|
795
|
+
}, t) : /* @__PURE__ */ L("span", {
|
|
796
|
+
className: "min-w-0",
|
|
797
|
+
children: a
|
|
798
|
+
}, t);
|
|
799
|
+
}) : void 0,
|
|
777
800
|
searchable: !0,
|
|
778
|
-
open:
|
|
801
|
+
open: O,
|
|
779
802
|
onOpenChange: (e) => {
|
|
780
|
-
(!e ||
|
|
803
|
+
(!e || D) && v(e);
|
|
781
804
|
},
|
|
782
|
-
onSearchQueryChange:
|
|
805
|
+
onSearchQueryChange: x,
|
|
783
806
|
value: i,
|
|
784
807
|
onChange: (e) => {
|
|
785
|
-
|
|
808
|
+
d || a(Array.isArray(e) ? e : [e]);
|
|
786
809
|
},
|
|
787
|
-
options:
|
|
788
|
-
placeholder:
|
|
789
|
-
labelProps: { label:
|
|
790
|
-
error:
|
|
791
|
-
ariaDescribedBy:
|
|
792
|
-
searchPlaceholder:
|
|
793
|
-
emptyStateTitle:
|
|
794
|
-
disabled:
|
|
795
|
-
invalid: !!
|
|
810
|
+
options: te,
|
|
811
|
+
placeholder: m.placeholder,
|
|
812
|
+
labelProps: { label: m.fieldLabel },
|
|
813
|
+
error: f,
|
|
814
|
+
ariaDescribedBy: j ? w : void 0,
|
|
815
|
+
searchPlaceholder: m.searchPlaceholder ?? "Search skills",
|
|
816
|
+
emptyStateTitle: y.trim() ? m.noMatchingSkillsLabel ?? "No matching skills" : m.emptyLabel ?? "No skills available",
|
|
817
|
+
disabled: d || A,
|
|
818
|
+
invalid: !!f || E,
|
|
796
819
|
className: "w-full min-w-0",
|
|
797
|
-
fieldClassName: r(
|
|
820
|
+
fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in P && Oe.background, "--ssf-border" in P && Oe.border, "--ssf-text" in P && Oe.value, (f || E) && Oe.invalid, g?.typography?.fontClassName ?? "dial-small-text", g?.triggerClassName),
|
|
798
821
|
listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
|
|
799
822
|
})
|
|
800
823
|
})
|
|
801
|
-
}),
|
|
802
|
-
id:
|
|
824
|
+
}), j && /* @__PURE__ */ L("span", {
|
|
825
|
+
id: w,
|
|
803
826
|
className: "sr-only",
|
|
804
|
-
children:
|
|
827
|
+
children: j
|
|
805
828
|
})]
|
|
806
829
|
});
|
|
807
830
|
};
|
|
808
831
|
//#endregion
|
|
809
|
-
export {
|
|
832
|
+
export { J as ChatSkill, X as FavoriteSkillsPanel, U as SKILLS_CLASS, ce as SkillArchiveUploadDialog, Q as SkillCatalogModal, le as SkillContentFileTree, ue as SkillDetailsSidePanel, K as SkillInfoTooltipContent, je as SkillSelectorField, W as SkillUnresolvedReason, xe as buildFavoriteSkillItem, De as buildSkillSelectorOptions, me as diffTextChange, _e as findMentionAtCaret, Se as getSkillFallbackName, ge as insertAnchor, fe as matchSkillMentions, he as reconcileAnchors, be as useSkillMentions, Ee as useSkillSelectorOverlay };
|
|
@@ -3,6 +3,10 @@ import { CSSProperties } from 'react';
|
|
|
3
3
|
export interface SkillSelectorFieldLabels {
|
|
4
4
|
/** Visible and accessible field label. */
|
|
5
5
|
fieldLabel: string;
|
|
6
|
+
/** Explanation for an unavailable selection. Defaults to 'The skill has been deleted or access revoked'. */
|
|
7
|
+
unavailableTooltipLabel?: string;
|
|
8
|
+
/** Accessible remove action label for unavailable tags. Defaults to the kit label. */
|
|
9
|
+
removeLabel?: string;
|
|
6
10
|
/** Empty selection text. */
|
|
7
11
|
placeholder: string;
|
|
8
12
|
/** Explanation shown when the selected model cannot use skills. */
|
|
@@ -28,6 +32,10 @@ export interface SkillSelectorFieldStyles {
|
|
|
28
32
|
border?: string;
|
|
29
33
|
/** Invalid-state text and border. */
|
|
30
34
|
error?: string;
|
|
35
|
+
/** Unavailable tag fill. */
|
|
36
|
+
unavailableTagBackground?: string;
|
|
37
|
+
/** Unavailable tag border. */
|
|
38
|
+
unavailableTagBorder?: string;
|
|
31
39
|
};
|
|
32
40
|
/** Label typography overrides. */
|
|
33
41
|
typography?: {
|
|
@@ -68,5 +76,7 @@ export interface SkillSelectorFieldProps {
|
|
|
68
76
|
onChange: (value: string[]) => void;
|
|
69
77
|
/** Host-resolved names keyed by reference; missing entries display the URL. */
|
|
70
78
|
displayNames?: Record<string, string>;
|
|
79
|
+
/** Host-confirmed unavailable selected references; tags remain removable. */
|
|
80
|
+
unavailableValues?: string[];
|
|
71
81
|
}
|
|
72
82
|
//# 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,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,qPAAqP;IACrP,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;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;
|
|
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,4GAA4G;IAC5G,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,uBAAuB,EAAE,MAAM,CAAC;IAChC,qPAAqP;IACrP,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;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;QACf,4BAA4B;QAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,8BAA8B;QAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,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,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,mFAAmF;IACnF,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC/B,qDAAqD;IACrD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,MAAM,EAAE,wBAAwB,CAAC;IACjC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-skills",
|
|
3
3
|
"description": "Host-agnostic UI for picking a favorite skill to attach to a chat input",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.305",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.50.0",
|
|
21
|
-
"@epam/ai-dial-catalog": "1.3.0-dev.
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.3.0-dev.
|
|
21
|
+
"@epam/ai-dial-catalog": "1.3.0-dev.305",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.3.0-dev.305"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.305",
|
|
26
26
|
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.25",
|
|
27
27
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.67",
|
|
28
28
|
"react": "^19.2.8"
|