@epam/ai-dial-skills 1.2.0-dev.14 → 1.2.0-dev.142
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.
- package/components/ChatSkill/ChatSkill.d.ts +3 -2
- package/components/ChatSkill/ChatSkill.d.ts.map +1 -1
- package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts +9 -0
- package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts.map +1 -0
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
- package/components/SkillSelectorField/SkillSelectorField.d.ts +5 -0
- package/components/SkillSelectorField/SkillSelectorField.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +15 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/hooks/useSkillMentions/useSkillMentions.d.ts +50 -0
- package/hooks/useSkillMentions/useSkillMentions.d.ts.map +1 -0
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +4 -3
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +13 -0
- package/index.d.ts.map +1 -1
- package/index.js +507 -198
- package/models/favorite-skills-panel-props.d.ts +32 -5
- package/models/favorite-skills-panel-props.d.ts.map +1 -1
- package/models/skill-archive-upload-dialog-props.d.ts +33 -0
- package/models/skill-archive-upload-dialog-props.d.ts.map +1 -0
- package/models/skill-info-tooltip-content-props.d.ts +6 -0
- package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
- package/models/skill-mention-anchor.d.ts +12 -0
- package/models/skill-mention-anchor.d.ts.map +1 -0
- package/models/skill-selector-field-props.d.ts +80 -0
- package/models/skill-selector-field-props.d.ts.map +1 -0
- package/models/skill-selector-overlay.d.ts +101 -55
- package/models/skill-selector-overlay.d.ts.map +1 -1
- package/package.json +5 -5
- package/test-setup.d.ts +1 -0
- package/utils/skill-mention-matching.d.ts +25 -0
- package/utils/skill-mention-matching.d.ts.map +1 -0
- package/utils/skill-mention-tracking.d.ts +39 -0
- package/utils/skill-mention-tracking.d.ts.map +1 -0
package/index.js
CHANGED
|
@@ -1,171 +1,199 @@
|
|
|
1
|
-
import { DeploymentIcon as e, buildCssVars as t,
|
|
2
|
-
import { BASE_ICON_SIZE as
|
|
3
|
-
import { Suspense as
|
|
4
|
-
import { IconBlocks as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { DetailsPanel as
|
|
7
|
-
//#region src/
|
|
8
|
-
var
|
|
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 ee, TooltipPlacement as y } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { Suspense as b, useCallback as x, useEffect as te, useId as S, useLayoutEffect as C, useMemo as w, useRef as T, useState as E } from "react";
|
|
4
|
+
import { IconBlocks as D, IconChevronDown as ne, IconEye as O, IconStarFilled as k, IconX as A } from "@tabler/icons-react";
|
|
5
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
import { DetailsPanel as P } from "@epam/ai-dial-catalog";
|
|
7
|
+
//#region src/constants/public-class-names.ts
|
|
8
|
+
var F = {
|
|
9
|
+
selectorField: "dial-skills-selector-field",
|
|
10
|
+
favoritesPanel: "dial-skills-favorites-panel",
|
|
11
|
+
chip: "dial-skills-chip"
|
|
12
|
+
}, I = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View details", onViewDetails: r, viewDetailsTabIndex: i }) => t == null ? /* @__PURE__ */ N("div", {
|
|
9
13
|
className: "flex flex-col gap-3",
|
|
10
|
-
children: [e != null && e !== "" && /* @__PURE__ */
|
|
14
|
+
children: [e != null && e !== "" && /* @__PURE__ */ M("p", {
|
|
11
15
|
className: "text-start",
|
|
12
16
|
children: e
|
|
13
|
-
}), /* @__PURE__ */
|
|
14
|
-
variant:
|
|
15
|
-
appearance:
|
|
17
|
+
}), /* @__PURE__ */ M(a, {
|
|
18
|
+
variant: s.Primary,
|
|
19
|
+
appearance: o.Link,
|
|
16
20
|
className: "h-[24px] self-start",
|
|
17
21
|
label: n,
|
|
18
|
-
iconBefore: /* @__PURE__ */
|
|
19
|
-
size:
|
|
20
|
-
stroke:
|
|
22
|
+
iconBefore: /* @__PURE__ */ M(O, {
|
|
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__ */
|
|
30
|
+
}) : /* @__PURE__ */ M("p", {
|
|
26
31
|
className: "text-start",
|
|
27
32
|
children: t
|
|
28
|
-
}),
|
|
29
|
-
let { viewDetailsLabel:
|
|
30
|
-
|
|
33
|
+
}), L = ({ name: e, path: t, description: n, isUnsupported: i = !1, labelClassName: a = "dial-body-paragraph-text text-accent", 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, [f, p] = E(0), m = () => {
|
|
35
|
+
p((e) => e + 1), c(t);
|
|
36
|
+
}, g = T(null), [_, v] = E(null);
|
|
37
|
+
return C(() => {
|
|
38
|
+
v(g.current?.getBoundingClientRect().width ?? null);
|
|
39
|
+
}, [a]), /* @__PURE__ */ M(h, {
|
|
31
40
|
asChild: !0,
|
|
32
|
-
placement:
|
|
41
|
+
placement: y.Top,
|
|
33
42
|
contentClassName: "max-w-[550px]",
|
|
34
|
-
content: i ? /* @__PURE__ */
|
|
35
|
-
description:
|
|
36
|
-
viewDetailsLabel:
|
|
37
|
-
onViewDetails:
|
|
38
|
-
g((e) => e + 1), c(t);
|
|
39
|
-
}
|
|
43
|
+
content: i ? /* @__PURE__ */ M(I, { unsupportedMessage: d }) : /* @__PURE__ */ M(I, {
|
|
44
|
+
description: n,
|
|
45
|
+
viewDetailsLabel: u,
|
|
46
|
+
onViewDetails: m
|
|
40
47
|
}),
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
children: /* @__PURE__ */ N("span", {
|
|
49
|
+
tabIndex: 0,
|
|
50
|
+
className: r("relative -me-1 -ms-1 inline-block cursor-pointer select-text rounded-full pe-1 ps-1", i ? s : "hover:bg-info focus-visible:bg-info active:bg-info", i ? r(a, o) : a, F.chip),
|
|
51
|
+
"aria-label": `/${e}`,
|
|
52
|
+
children: [/* @__PURE__ */ M("span", {
|
|
53
|
+
ref: g,
|
|
54
|
+
"aria-hidden": !0,
|
|
55
|
+
className: "inset-inline-start-0 pointer-events-none absolute top-0 select-none",
|
|
56
|
+
children: "/"
|
|
57
|
+
}), /* @__PURE__ */ M("span", {
|
|
58
|
+
"aria-hidden": !0,
|
|
59
|
+
className: "select-none",
|
|
60
|
+
style: { paddingInlineStart: _ ?? void 0 },
|
|
61
|
+
children: e
|
|
62
|
+
})]
|
|
48
63
|
})
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
row: "
|
|
52
|
-
header: "
|
|
53
|
-
emptyHint: "
|
|
54
|
-
star: "
|
|
55
|
-
footer: "
|
|
56
|
-
rowEnter: "
|
|
57
|
-
rowFadeIn: "
|
|
58
|
-
rowLeaving: "
|
|
59
|
-
rowFadeOut: "
|
|
60
|
-
listContent: "
|
|
61
|
-
},
|
|
62
|
-
let { myCollectionLabel:
|
|
63
|
-
"--fs-row-hover-bg":
|
|
64
|
-
"--fs-header-text":
|
|
65
|
-
"--fs-empty-hint-text":
|
|
66
|
-
"--fs-star-color":
|
|
67
|
-
"--fs-footer-border":
|
|
68
|
-
}), [
|
|
69
|
-
|
|
70
|
-
let e =
|
|
64
|
+
}, f);
|
|
65
|
+
}, R = {
|
|
66
|
+
row: "_row_1v431_1",
|
|
67
|
+
header: "_header_1v431_8",
|
|
68
|
+
emptyHint: "_emptyHint_1v431_12",
|
|
69
|
+
star: "_star_1v431_16",
|
|
70
|
+
footer: "_footer_1v431_20",
|
|
71
|
+
rowEnter: "_rowEnter_1v431_28",
|
|
72
|
+
rowFadeIn: "_rowFadeIn_1v431_1",
|
|
73
|
+
rowLeaving: "_rowLeaving_1v431_32",
|
|
74
|
+
rowFadeOut: "_rowFadeOut_1v431_1",
|
|
75
|
+
listContent: "_listContent_1v431_60"
|
|
76
|
+
}, z = "px-3 pb-0.5 pt-2", B = 180, V = 288, H = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: d, listboxId: m, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: y, nameClassName: b = "dial-small-text", headerClassName: x = "dial-tiny-lead-semi-text", emptyHintClassName: w = "dial-small-text" }) => {
|
|
77
|
+
let { myCollectionLabel: D = "My Collection", emptyHintLabel: ne = "Star a skill to pin it here", browseLabel: O = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: j = "View details", noMatchingSkillsLabel: P = "No matching skills" } = v, L = t({
|
|
78
|
+
"--fs-row-hover-bg": y?.rowHoverBackground,
|
|
79
|
+
"--fs-header-text": y?.headerText,
|
|
80
|
+
"--fs-empty-hint-text": y?.emptyHintText,
|
|
81
|
+
"--fs-star-color": y?.starColor,
|
|
82
|
+
"--fs-footer-border": y?.footerBorder
|
|
83
|
+
}), [H, U] = E(/* @__PURE__ */ new Set()), W = T(/* @__PURE__ */ new Map());
|
|
84
|
+
te(() => {
|
|
85
|
+
let e = W.current;
|
|
71
86
|
return () => {
|
|
72
87
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
73
88
|
};
|
|
74
89
|
}, []);
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
let G = m != null, K = _ && !G, q = G || K ? "none" : void 0, J = "button";
|
|
91
|
+
G ? J = "option" : K && (J = "menuitem");
|
|
92
|
+
let Y = S(), X = d != null, Z = d?.toLowerCase() ?? "", Q = X ? n.filter((e) => e.name.toLowerCase().includes(Z)) : n, re = T(null), [ie, ae] = E();
|
|
93
|
+
C(() => {
|
|
94
|
+
re.current && ae(Math.min(re.current.scrollHeight, V));
|
|
95
|
+
}, [n, d]);
|
|
96
|
+
let oe = (e, t) => {
|
|
80
97
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
|
|
81
|
-
},
|
|
82
|
-
|
|
98
|
+
}, $ = (e) => {
|
|
99
|
+
U((t) => new Set(t).add(e));
|
|
83
100
|
let t = setTimeout(() => {
|
|
84
|
-
a(e),
|
|
101
|
+
a?.(e), U((t) => {
|
|
85
102
|
let n = new Set(t);
|
|
86
103
|
return n.delete(e), n;
|
|
87
|
-
}),
|
|
88
|
-
},
|
|
89
|
-
|
|
104
|
+
}), W.current.delete(e);
|
|
105
|
+
}, B);
|
|
106
|
+
W.current.set(e, t);
|
|
90
107
|
};
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
className: "flex w-full flex-col desktop:w-[280px]",
|
|
108
|
+
return /* @__PURE__ */ N("div", {
|
|
109
|
+
className: r("flex w-full flex-col desktop:w-[280px]", l, F.favoritesPanel),
|
|
93
110
|
style: L,
|
|
94
111
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
/* @__PURE__ */ M("p", {
|
|
113
|
+
id: Y,
|
|
114
|
+
className: r(x, z, R.header),
|
|
115
|
+
children: D
|
|
98
116
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
className:
|
|
101
|
-
style: { maxHeight:
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
-
ref:
|
|
104
|
-
children:
|
|
117
|
+
/* @__PURE__ */ M("div", {
|
|
118
|
+
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", R.listContent),
|
|
119
|
+
style: { maxHeight: ie },
|
|
120
|
+
children: /* @__PURE__ */ M("div", {
|
|
121
|
+
ref: re,
|
|
122
|
+
children: Q.length > 0 ? /* @__PURE__ */ M("ul", {
|
|
123
|
+
id: m,
|
|
124
|
+
role: G ? "listbox" : q,
|
|
125
|
+
"aria-labelledby": G ? Y : void 0,
|
|
105
126
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
106
|
-
children:
|
|
107
|
-
let
|
|
108
|
-
role:
|
|
127
|
+
children: Q.map((t) => {
|
|
128
|
+
let n = G ? `${m}-${encodeURIComponent(t.id)}` : void 0, o = G ? -1 : void 0, l = /* @__PURE__ */ N("div", {
|
|
129
|
+
role: J,
|
|
130
|
+
id: n,
|
|
131
|
+
"aria-selected": G ? n === g : void 0,
|
|
132
|
+
"aria-label": t.name,
|
|
109
133
|
tabIndex: 0,
|
|
110
|
-
className:
|
|
134
|
+
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", R.row, u),
|
|
111
135
|
onClick: () => i(t),
|
|
112
|
-
onKeyDown: (e) =>
|
|
136
|
+
onKeyDown: (e) => oe(e, t),
|
|
113
137
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
size:
|
|
138
|
+
/* @__PURE__ */ M(e, {
|
|
139
|
+
size: c.MD,
|
|
116
140
|
initialsName: t.name
|
|
117
141
|
}),
|
|
118
|
-
|
|
119
|
-
className:
|
|
142
|
+
d == null ? /* @__PURE__ */ M("span", {
|
|
143
|
+
className: r(b, "min-w-0 flex-1 truncate text-start"),
|
|
120
144
|
children: t.name
|
|
121
|
-
}) : /* @__PURE__ */
|
|
145
|
+
}) : /* @__PURE__ */ M(p, {
|
|
122
146
|
text: t.name,
|
|
123
|
-
query:
|
|
147
|
+
query: d,
|
|
124
148
|
maxLines: 1,
|
|
125
|
-
className:
|
|
149
|
+
className: r(b, "min-w-0 flex-1 text-start")
|
|
126
150
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
icon: /* @__PURE__ */
|
|
129
|
-
size:
|
|
130
|
-
className:
|
|
151
|
+
a && /* @__PURE__ */ M(ee, {
|
|
152
|
+
icon: /* @__PURE__ */ M(k, {
|
|
153
|
+
size: c.SM,
|
|
154
|
+
className: R.star,
|
|
131
155
|
"aria-hidden": !0
|
|
132
156
|
}),
|
|
133
157
|
"aria-label": A,
|
|
134
158
|
isSelected: !0,
|
|
159
|
+
tabIndex: o,
|
|
135
160
|
onClick: (e) => {
|
|
136
|
-
e.stopPropagation(),
|
|
161
|
+
e.stopPropagation(), $(t.id);
|
|
137
162
|
}
|
|
138
163
|
})
|
|
139
164
|
]
|
|
140
165
|
});
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
|
|
143
|
-
|
|
166
|
+
return /* @__PURE__ */ M("li", {
|
|
167
|
+
role: q,
|
|
168
|
+
className: H.has(t.id) ? R.rowLeaving : R.rowEnter,
|
|
169
|
+
children: s ? /* @__PURE__ */ M(h, {
|
|
144
170
|
asChild: !0,
|
|
145
171
|
contentClassName: "max-w-[550px]",
|
|
146
|
-
content: /* @__PURE__ */
|
|
172
|
+
content: /* @__PURE__ */ M(I, {
|
|
147
173
|
description: t.description,
|
|
148
|
-
viewDetailsLabel:
|
|
149
|
-
onViewDetails: () =>
|
|
174
|
+
viewDetailsLabel: j,
|
|
175
|
+
onViewDetails: () => s(t),
|
|
176
|
+
viewDetailsTabIndex: o
|
|
150
177
|
}),
|
|
151
|
-
children:
|
|
152
|
-
})
|
|
178
|
+
children: l
|
|
179
|
+
}) : l
|
|
153
180
|
}, t.id);
|
|
154
181
|
})
|
|
155
|
-
}) :
|
|
182
|
+
}) : X && Z !== "" ? /* @__PURE__ */ M("p", {
|
|
156
183
|
role: "status",
|
|
157
184
|
"aria-live": "polite",
|
|
158
|
-
className:
|
|
159
|
-
children:
|
|
160
|
-
}) : /* @__PURE__ */
|
|
161
|
-
className:
|
|
162
|
-
children:
|
|
185
|
+
className: r(w, "px-4 py-4 text-start", R.emptyHint),
|
|
186
|
+
children: P
|
|
187
|
+
}) : /* @__PURE__ */ M("p", {
|
|
188
|
+
className: r(w, "px-4 py-4 text-start", R.emptyHint),
|
|
189
|
+
children: ne
|
|
163
190
|
})
|
|
164
191
|
})
|
|
165
192
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
className:
|
|
168
|
-
children: /* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ M("div", {
|
|
194
|
+
className: r("border-t px-2 py-3", R.footer),
|
|
195
|
+
children: /* @__PURE__ */ M(f, {
|
|
196
|
+
role: K ? "menuitem" : void 0,
|
|
169
197
|
label: O,
|
|
170
198
|
className: "w-full justify-center",
|
|
171
199
|
onClick: o
|
|
@@ -173,168 +201,449 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
173
201
|
})
|
|
174
202
|
]
|
|
175
203
|
});
|
|
176
|
-
},
|
|
204
|
+
}, U = ".zip,.md", W = ({ isOpen: e, errorText: t, accept: n = U, labels: r, onClose: i, onFilesSelected: a, onFilesRejected: o }) => {
|
|
205
|
+
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 ?? {};
|
|
206
|
+
return /* @__PURE__ */ M(g, {
|
|
207
|
+
open: e,
|
|
208
|
+
size: _.Sm,
|
|
209
|
+
header: s,
|
|
210
|
+
closeAriaLabel: p,
|
|
211
|
+
onClose: i,
|
|
212
|
+
children: /* @__PURE__ */ M("div", {
|
|
213
|
+
className: "px-6 py-4",
|
|
214
|
+
children: /* @__PURE__ */ M(d, {
|
|
215
|
+
label: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", {
|
|
216
|
+
className: "desktop:hidden",
|
|
217
|
+
children: l
|
|
218
|
+
}), /* @__PURE__ */ M("span", {
|
|
219
|
+
className: "hidden desktop:inline",
|
|
220
|
+
children: c
|
|
221
|
+
})] }),
|
|
222
|
+
description: u,
|
|
223
|
+
ariaLabel: f,
|
|
224
|
+
accept: n,
|
|
225
|
+
errorText: t,
|
|
226
|
+
onChange: a,
|
|
227
|
+
onReject: o
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
}, G = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ M(g, {
|
|
177
232
|
open: e,
|
|
178
233
|
header: r,
|
|
179
|
-
size:
|
|
234
|
+
size: _.Lg,
|
|
180
235
|
className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
|
|
181
236
|
onClose: t,
|
|
182
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ M("div", {
|
|
183
238
|
className: "h-[min(80vh,840px)] overflow-auto",
|
|
184
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ M(b, {
|
|
185
240
|
fallback: null,
|
|
186
241
|
children: e && i(n, t)
|
|
187
242
|
})
|
|
188
243
|
})
|
|
189
|
-
}),
|
|
244
|
+
}), K = (e) => /* @__PURE__ */ M(P, { ...e }), q = (e) => e == null || /[\s/]/.test(e), J = (e, t, n) => {
|
|
245
|
+
let r = [], i = 0;
|
|
246
|
+
return t.forEach((t, a) => {
|
|
247
|
+
let o = `/${n(t.url)}`, s = i;
|
|
248
|
+
for (; s <= e.length;) {
|
|
249
|
+
let t = e.indexOf(o, s);
|
|
250
|
+
if (t === -1) return;
|
|
251
|
+
let n = t + o.length;
|
|
252
|
+
if (q(e[n])) {
|
|
253
|
+
r.push({
|
|
254
|
+
skillIndex: a,
|
|
255
|
+
start: t,
|
|
256
|
+
length: o.length
|
|
257
|
+
}), i = n;
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
s = t + 1;
|
|
261
|
+
}
|
|
262
|
+
}), r;
|
|
263
|
+
}, Y = (e, t) => {
|
|
264
|
+
let n = Math.min(e.length, t.length), r = 0;
|
|
265
|
+
for (; r < n && e[r] === t[r];) r += 1;
|
|
266
|
+
let i = n - r, a = 0;
|
|
267
|
+
for (; a < i && e[e.length - 1 - a] === t[t.length - 1 - a];) a += 1;
|
|
268
|
+
return {
|
|
269
|
+
start: r,
|
|
270
|
+
deletedLength: e.length - r - a,
|
|
271
|
+
insertedLength: t.length - r - a
|
|
272
|
+
};
|
|
273
|
+
}, X = (e, t) => {
|
|
274
|
+
let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
|
|
275
|
+
return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
|
|
276
|
+
...i,
|
|
277
|
+
start: i.start + r
|
|
278
|
+
}), e), []);
|
|
279
|
+
}, Z = (e, t, n, r, i) => {
|
|
280
|
+
let a = r.length + 1, o = a + +!!i, s = e.map((e) => e.start >= t ? {
|
|
281
|
+
...e,
|
|
282
|
+
start: e.start + o
|
|
283
|
+
} : e), c = {
|
|
284
|
+
url: n,
|
|
285
|
+
name: r,
|
|
286
|
+
start: t,
|
|
287
|
+
length: a
|
|
288
|
+
};
|
|
289
|
+
return [...s, c].sort((e, t) => e.start - t.start);
|
|
290
|
+
}, Q = (e, t) => e.find((e) => e.start + e.length === t), re = () => {
|
|
291
|
+
let [e, t] = E(""), [n, r] = E([]), i = T(e);
|
|
292
|
+
i.current = e;
|
|
293
|
+
let a = T(n);
|
|
294
|
+
return a.current = n, {
|
|
295
|
+
draft: e,
|
|
296
|
+
anchors: n,
|
|
297
|
+
onDraftChange: x((e) => {
|
|
298
|
+
let n = Y(i.current, e);
|
|
299
|
+
r((e) => X(e, n)), i.current = e, t(e);
|
|
300
|
+
}, []),
|
|
301
|
+
insertMention: x((e, n, a) => {
|
|
302
|
+
let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
|
|
303
|
+
return i.current = l, t(l), r((t) => Z(t, a, e, n, s)), s;
|
|
304
|
+
}, []),
|
|
305
|
+
onBackspaceAtCaret: x((e) => Q(a.current, e), []),
|
|
306
|
+
orderedSkills: w(() => {
|
|
307
|
+
if (n.length !== 0) return n.map((e) => ({ url: e.url }));
|
|
308
|
+
}, [n]),
|
|
309
|
+
reset: x(() => {
|
|
310
|
+
t(""), r([]);
|
|
311
|
+
}, []),
|
|
312
|
+
seedFromMessage: x((e, n, i) => {
|
|
313
|
+
let a = n ?? [], o = J(e, a, i);
|
|
314
|
+
t(e), r(o.map((e) => {
|
|
315
|
+
let t = a[e.skillIndex];
|
|
316
|
+
return {
|
|
317
|
+
url: t.url,
|
|
318
|
+
name: i(t.url),
|
|
319
|
+
start: e.start,
|
|
320
|
+
length: e.length
|
|
321
|
+
};
|
|
322
|
+
}));
|
|
323
|
+
}, [])
|
|
324
|
+
};
|
|
325
|
+
}, ie = (e) => ({
|
|
190
326
|
id: e.url,
|
|
191
327
|
name: e.name,
|
|
192
328
|
description: e.description
|
|
193
|
-
}),
|
|
329
|
+
}), ae = (e) => {
|
|
194
330
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
195
331
|
return t[t.length - 1] ?? e;
|
|
196
|
-
},
|
|
197
|
-
let { addMenuLabel: p = "Skills", backLabel: m = "Back", catalogModalTitleLabel: h = "Use skill", emptyQueryHintLabel:
|
|
332
|
+
}, oe = ({ isEnabled: e, isSkillsSupported: t, skills: n, sharedWithMe: r, publicSkills: a, favoriteIds: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, renderCatalogContent: d, detailsPanelComponent: f }) => {
|
|
333
|
+
let { addMenuLabel: p = "Skills", backLabel: m = "Back", catalogModalTitleLabel: h = "Use skill", emptyQueryHintLabel: g = "Type to filter", panelLabels: _ } = c ?? {}, v = e && t, [ee, y] = E(!1), [te, S] = E(null), [C, T] = E(0), [ne, O] = E(0), [k, A] = E(void 0), j = re(), N = w(() => [
|
|
198
334
|
...n,
|
|
199
|
-
...
|
|
335
|
+
...r ?? [],
|
|
200
336
|
...a ?? []
|
|
201
337
|
], [
|
|
202
338
|
n,
|
|
203
|
-
|
|
339
|
+
r,
|
|
204
340
|
a
|
|
205
|
-
]), P =
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
viewDetailsLabel:
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
]),
|
|
341
|
+
]), P = w(() => new Map(N.map((e) => [e.url, e])), [N]), F = x((e) => P.get(e)?.name ?? ae(e), [P]), I = w(() => N.filter((e) => o.has(e.url)).map((e) => ie(e)), [N, o]), R = j.anchors.length > 0 && !t, z = w(() => j.anchors.map((e) => ({
|
|
342
|
+
start: e.start,
|
|
343
|
+
length: e.length,
|
|
344
|
+
isUnsupported: !t,
|
|
345
|
+
render: () => /* @__PURE__ */ M(L, {
|
|
346
|
+
name: e.name,
|
|
347
|
+
path: e.url,
|
|
348
|
+
labelClassName: u,
|
|
349
|
+
description: P.get(e.url)?.description,
|
|
350
|
+
isUnsupported: !t,
|
|
351
|
+
onViewDetails: S,
|
|
352
|
+
labels: { viewDetailsLabel: _?.viewDetailsLabel }
|
|
353
|
+
})
|
|
354
|
+
})), [
|
|
355
|
+
j.anchors,
|
|
356
|
+
t,
|
|
357
|
+
P,
|
|
358
|
+
u,
|
|
359
|
+
_
|
|
360
|
+
]), B = x((e, t, n) => {
|
|
361
|
+
let r = j.insertMention(e, t, n);
|
|
362
|
+
O((e) => e + 1), A(n + 1 + t.length + +!!r);
|
|
363
|
+
}, [j]), V = x(() => {
|
|
364
|
+
j.reset(), O((e) => e + 1), A(void 0);
|
|
365
|
+
}, [j]), U = x((e, t) => {
|
|
366
|
+
j.seedFromMessage(e, t, F), O((e) => e + 1), A(void 0);
|
|
367
|
+
}, [j, F]), W = x((e, t) => {
|
|
368
|
+
if (t == null || t.length === 0) return null;
|
|
369
|
+
let n = J(e, t, F), r = [], i = 0;
|
|
370
|
+
return n.forEach((n) => {
|
|
371
|
+
n.start > i && r.push(e.slice(i, n.start));
|
|
372
|
+
let a = t[n.skillIndex], o = P.get(a.url), s = o?.name ?? ae(a.url);
|
|
373
|
+
r.push(/* @__PURE__ */ M(L, {
|
|
374
|
+
name: s,
|
|
375
|
+
path: a.url,
|
|
376
|
+
labelClassName: u,
|
|
377
|
+
description: o?.description,
|
|
378
|
+
onViewDetails: S,
|
|
379
|
+
labels: { viewDetailsLabel: _?.viewDetailsLabel }
|
|
380
|
+
}, `${a.url}-${n.start}`)), i = n.start + n.length;
|
|
381
|
+
}), i < e.length && r.push(e.slice(i)), r;
|
|
382
|
+
}, [
|
|
383
|
+
F,
|
|
384
|
+
P,
|
|
385
|
+
u,
|
|
386
|
+
_
|
|
387
|
+
]), K = x((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
225
388
|
let t = P.get(e.url);
|
|
226
|
-
return /* @__PURE__ */
|
|
227
|
-
name: t?.name ??
|
|
389
|
+
return /* @__PURE__ */ M(L, {
|
|
390
|
+
name: t?.name ?? ae(e.url),
|
|
228
391
|
path: e.url,
|
|
229
392
|
labelClassName: u,
|
|
230
393
|
description: t?.description,
|
|
231
|
-
onViewDetails:
|
|
232
|
-
labels: { viewDetailsLabel:
|
|
394
|
+
onViewDetails: S,
|
|
395
|
+
labels: { viewDetailsLabel: _?.viewDetailsLabel }
|
|
233
396
|
}, e.url);
|
|
234
397
|
}), [
|
|
235
398
|
P,
|
|
236
399
|
u,
|
|
237
|
-
|
|
238
|
-
]),
|
|
239
|
-
favorites:
|
|
240
|
-
|
|
241
|
-
|
|
400
|
+
_
|
|
401
|
+
]), q = x((e, t) => /* @__PURE__ */ M(H, {
|
|
402
|
+
favorites: I,
|
|
403
|
+
isMenu: !0,
|
|
404
|
+
onSelect: (n) => {
|
|
405
|
+
B(n.id, n.name, t), e();
|
|
242
406
|
},
|
|
243
407
|
onToggleFavorite: s,
|
|
244
408
|
onBrowse: () => {
|
|
245
|
-
e(),
|
|
409
|
+
T(t), e(), y(!0);
|
|
246
410
|
},
|
|
247
411
|
onViewDetails: (t) => {
|
|
248
|
-
e(),
|
|
412
|
+
e(), S(t.id);
|
|
249
413
|
},
|
|
250
|
-
labels:
|
|
414
|
+
labels: _
|
|
251
415
|
}), [
|
|
252
|
-
|
|
253
|
-
|
|
416
|
+
I,
|
|
417
|
+
B,
|
|
254
418
|
s,
|
|
255
|
-
|
|
256
|
-
]), Y =
|
|
419
|
+
_
|
|
420
|
+
]), Y = w(() => v ? {
|
|
257
421
|
key: "skills",
|
|
258
422
|
title: p,
|
|
259
|
-
icon: /* @__PURE__ */
|
|
260
|
-
size:
|
|
423
|
+
icon: /* @__PURE__ */ M(D, {
|
|
424
|
+
size: i,
|
|
261
425
|
"aria-hidden": !0,
|
|
262
|
-
stroke:
|
|
426
|
+
stroke: l
|
|
263
427
|
}),
|
|
264
|
-
renderOverlay:
|
|
428
|
+
renderOverlay: q,
|
|
265
429
|
backLabel: m
|
|
266
430
|
} : void 0, [
|
|
267
|
-
|
|
431
|
+
v,
|
|
268
432
|
p,
|
|
269
433
|
m,
|
|
270
|
-
|
|
271
|
-
]), X =
|
|
434
|
+
q
|
|
435
|
+
]), X = w(() => v ? {
|
|
272
436
|
triggerPrefix: "/",
|
|
273
437
|
menuLabel: p,
|
|
274
|
-
emptyQueryHint:
|
|
275
|
-
renderMenu: ({ query: e,
|
|
276
|
-
favorites:
|
|
438
|
+
emptyQueryHint: g,
|
|
439
|
+
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ M(H, {
|
|
440
|
+
favorites: I,
|
|
277
441
|
searchQuery: e,
|
|
442
|
+
listboxId: r,
|
|
443
|
+
activeOptionId: i,
|
|
278
444
|
onSelect: (e) => {
|
|
279
|
-
|
|
445
|
+
n({ consumeQuery: !0 }), B(e.id, e.name, t);
|
|
280
446
|
},
|
|
281
447
|
onToggleFavorite: s,
|
|
282
448
|
onBrowse: () => {
|
|
283
|
-
|
|
449
|
+
n({ consumeQuery: !0 }), T(t), y(!0);
|
|
284
450
|
},
|
|
285
451
|
onViewDetails: (e) => {
|
|
286
|
-
|
|
452
|
+
n({ consumeQuery: !0 }), S(e.id);
|
|
287
453
|
},
|
|
288
|
-
labels:
|
|
454
|
+
labels: _
|
|
289
455
|
})
|
|
290
456
|
} : void 0, [
|
|
291
|
-
w,
|
|
292
|
-
p,
|
|
293
457
|
v,
|
|
294
|
-
|
|
295
|
-
|
|
458
|
+
p,
|
|
459
|
+
g,
|
|
460
|
+
I,
|
|
461
|
+
B,
|
|
296
462
|
s,
|
|
297
|
-
|
|
463
|
+
_
|
|
298
464
|
]);
|
|
299
465
|
return e ? {
|
|
300
466
|
skillMenuOverlay: Y,
|
|
301
467
|
commandMenu: X,
|
|
302
|
-
skillCatalogModal: /* @__PURE__ */
|
|
303
|
-
isOpen:
|
|
304
|
-
onClose: () =>
|
|
468
|
+
skillCatalogModal: /* @__PURE__ */ M(G, {
|
|
469
|
+
isOpen: ee,
|
|
470
|
+
onClose: () => y(!1),
|
|
305
471
|
onSelect: (e) => {
|
|
306
|
-
|
|
472
|
+
B(e, F(e), C), y(!1);
|
|
307
473
|
},
|
|
308
474
|
title: h,
|
|
309
475
|
renderContent: d
|
|
310
476
|
}),
|
|
311
|
-
skillDetailsPanel: /* @__PURE__ */
|
|
477
|
+
skillDetailsPanel: /* @__PURE__ */ M(b, {
|
|
312
478
|
fallback: null,
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
-
skillId:
|
|
315
|
-
onClose: () =>
|
|
479
|
+
children: /* @__PURE__ */ M(f, {
|
|
480
|
+
skillId: te,
|
|
481
|
+
onClose: () => S(null)
|
|
316
482
|
})
|
|
317
483
|
}),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
484
|
+
message: j.draft,
|
|
485
|
+
messageRevision: ne,
|
|
486
|
+
activeMentions: z,
|
|
487
|
+
onDraftChange: j.onDraftChange,
|
|
488
|
+
onBackspaceAtCaret: j.onBackspaceAtCaret,
|
|
489
|
+
caretPositionOverride: k,
|
|
490
|
+
isSkillUnsupported: R,
|
|
491
|
+
selectedSkills: j.orderedSkills,
|
|
492
|
+
resetSkillMentions: V,
|
|
493
|
+
seedSkillMentions: U,
|
|
494
|
+
renderHistorySkillSegments: W,
|
|
495
|
+
renderHistorySkills: K
|
|
325
496
|
} : {
|
|
326
497
|
skillMenuOverlay: void 0,
|
|
327
498
|
commandMenu: void 0,
|
|
328
499
|
skillCatalogModal: null,
|
|
329
500
|
skillDetailsPanel: null,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
501
|
+
message: "",
|
|
502
|
+
messageRevision: 0,
|
|
503
|
+
activeMentions: [],
|
|
504
|
+
onDraftChange: () => void 0,
|
|
505
|
+
onBackspaceAtCaret: () => void 0,
|
|
506
|
+
caretPositionOverride: void 0,
|
|
333
507
|
isSkillUnsupported: !1,
|
|
334
|
-
|
|
335
|
-
|
|
508
|
+
selectedSkills: void 0,
|
|
509
|
+
resetSkillMentions: () => void 0,
|
|
510
|
+
seedSkillMentions: () => void 0,
|
|
511
|
+
renderHistorySkillSegments: () => null,
|
|
336
512
|
renderHistorySkills: () => null
|
|
337
513
|
};
|
|
514
|
+
}, $ = {
|
|
515
|
+
background: "_background_14zdf_1",
|
|
516
|
+
border: "_border_14zdf_5",
|
|
517
|
+
value: "_value_14zdf_9",
|
|
518
|
+
clear: "_clear_14zdf_13",
|
|
519
|
+
invalid: "_invalid_14zdf_17"
|
|
520
|
+
}, se = [], ce = ({ value: e, onChange: i, displayName: a, favorites: o = se, onToggleFavorite: s, onViewDetails: c, renderOverlay: d, isSkillsSupported: p, isDisabled: h = !1, isInvalid: g = !1, labelledById: _, describedById: ee, labels: y, renderCatalogContent: b, className: x, styles: C }) => {
|
|
521
|
+
let [w, D] = E(!1), [O, k] = E(!1), [P, I] = E(""), L = T(null), R = S(), z = T(null), B = T(!1), V = n(e, p), U = p && !h, W = w && U, K = O && U, q = () => {
|
|
522
|
+
z.current && !z.current.disabled ? z.current.focus() : L.current?.querySelector("button:not(:disabled)")?.focus();
|
|
523
|
+
};
|
|
524
|
+
te(() => {
|
|
525
|
+
B.current && !W && !K && ((document.activeElement === document.body || L.current?.contains(document.activeElement)) && q(), D(!1), k(!1)), B.current = W || K;
|
|
526
|
+
}, [W, K]);
|
|
527
|
+
let J = (e) => {
|
|
528
|
+
e && !U || (I(""), D(e));
|
|
529
|
+
}, Y = (e) => {
|
|
530
|
+
U && i(e), D(!1), k(!1);
|
|
531
|
+
}, X = {
|
|
532
|
+
...t({
|
|
533
|
+
"--ssf-text": C?.colors?.text,
|
|
534
|
+
"--ssf-bg": C?.colors?.background,
|
|
535
|
+
"--ssf-border": C?.colors?.border,
|
|
536
|
+
"--ssf-error": C?.colors?.error
|
|
537
|
+
}),
|
|
538
|
+
...C?.cssVars
|
|
539
|
+
}, Z = /* @__PURE__ */ N("div", {
|
|
540
|
+
id: R,
|
|
541
|
+
className: "w-full min-w-0",
|
|
542
|
+
children: [/* @__PURE__ */ M("div", {
|
|
543
|
+
className: "p-2",
|
|
544
|
+
children: /* @__PURE__ */ M(v, {
|
|
545
|
+
value: P,
|
|
546
|
+
onChange: (e) => I(e ?? ""),
|
|
547
|
+
placeholder: y.searchPlaceholder ?? "Search skills",
|
|
548
|
+
"aria-label": y.searchPlaceholder ?? "Search skills",
|
|
549
|
+
clearLabel: y.clearSearchLabel ?? "Clear search"
|
|
550
|
+
})
|
|
551
|
+
}), /* @__PURE__ */ M(H, {
|
|
552
|
+
className: "min-w-0 desktop:w-full",
|
|
553
|
+
rowClassName: "min-h-11",
|
|
554
|
+
favorites: o,
|
|
555
|
+
searchQuery: P,
|
|
556
|
+
labels: y.panelLabels,
|
|
557
|
+
onSelect: (e) => Y(e.id),
|
|
558
|
+
onToggleFavorite: s,
|
|
559
|
+
onViewDetails: c ? (e) => {
|
|
560
|
+
D(!1), c(e);
|
|
561
|
+
} : void 0,
|
|
562
|
+
onBrowse: () => {
|
|
563
|
+
D(!1), k(!0);
|
|
564
|
+
}
|
|
565
|
+
})]
|
|
566
|
+
}), Q = /* @__PURE__ */ M(m, {
|
|
567
|
+
inputRef: z,
|
|
568
|
+
readOnly: !0,
|
|
569
|
+
role: "combobox",
|
|
570
|
+
"aria-haspopup": "dialog",
|
|
571
|
+
"aria-expanded": W,
|
|
572
|
+
"aria-controls": W ? R : void 0,
|
|
573
|
+
"aria-labelledby": _,
|
|
574
|
+
"aria-describedby": ee,
|
|
575
|
+
"aria-invalid": g || V,
|
|
576
|
+
disabled: !U,
|
|
577
|
+
invalid: g || V,
|
|
578
|
+
value: e ? a || e : "",
|
|
579
|
+
placeholder: y.placeholder,
|
|
580
|
+
title: p ? e ? a || e : void 0 : y.unsupportedTooltipLabel,
|
|
581
|
+
containerClassName: "w-full min-w-0",
|
|
582
|
+
wrapperClassName: r("cursor-pointer", "--ssf-bg" in X && $.background, "--ssf-border" in X && $.border, (g || V) && $.invalid, C?.triggerClassName),
|
|
583
|
+
className: r("min-w-0 cursor-pointer text-ellipsis", "--ssf-text" in X && $.value, C?.typography?.fontClassName ?? "dial-small-text"),
|
|
584
|
+
onKeyDown: (e) => {
|
|
585
|
+
[
|
|
586
|
+
"Enter",
|
|
587
|
+
" ",
|
|
588
|
+
"ArrowDown"
|
|
589
|
+
].includes(e.key) ? (e.preventDefault(), e.stopPropagation(), J(e.key === "ArrowDown" || !W)) : e.key === "Escape" && J(!1);
|
|
590
|
+
},
|
|
591
|
+
iconAfter: /* @__PURE__ */ N("span", {
|
|
592
|
+
className: "flex shrink-0 items-center",
|
|
593
|
+
children: [e && /* @__PURE__ */ M(f, {
|
|
594
|
+
type: "button",
|
|
595
|
+
className: r("size-11 shrink-0", $.clear),
|
|
596
|
+
disabled: h,
|
|
597
|
+
"aria-label": y.removeSkillLabel,
|
|
598
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
599
|
+
onClick: (e) => {
|
|
600
|
+
e.stopPropagation(), i(void 0), D(!1), U ? z.current?.focus() : L.current?.focus();
|
|
601
|
+
},
|
|
602
|
+
iconBefore: /* @__PURE__ */ M(A, {
|
|
603
|
+
"aria-hidden": !0,
|
|
604
|
+
size: 18,
|
|
605
|
+
stroke: l
|
|
606
|
+
})
|
|
607
|
+
}), /* @__PURE__ */ M(ne, {
|
|
608
|
+
"aria-hidden": !0,
|
|
609
|
+
size: 20,
|
|
610
|
+
stroke: l,
|
|
611
|
+
className: r("transition-transform", W && "rotate-180")
|
|
612
|
+
})]
|
|
613
|
+
})
|
|
614
|
+
});
|
|
615
|
+
return /* @__PURE__ */ N("div", {
|
|
616
|
+
ref: L,
|
|
617
|
+
role: "group",
|
|
618
|
+
"aria-labelledby": _,
|
|
619
|
+
tabIndex: -1,
|
|
620
|
+
className: r("min-w-0", x, F.selectorField),
|
|
621
|
+
style: X,
|
|
622
|
+
children: [d ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
623
|
+
className: "w-full min-w-0",
|
|
624
|
+
onClick: () => J(!W),
|
|
625
|
+
children: Q
|
|
626
|
+
}), d(Z, W, () => J(!1))] }) : /* @__PURE__ */ M(u, {
|
|
627
|
+
open: W,
|
|
628
|
+
onOpenChange: J,
|
|
629
|
+
disabled: !U,
|
|
630
|
+
className: "w-full min-w-0",
|
|
631
|
+
listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full",
|
|
632
|
+
renderOverlay: () => /* @__PURE__ */ M("div", {
|
|
633
|
+
role: "dialog",
|
|
634
|
+
"aria-labelledby": _,
|
|
635
|
+
children: Z
|
|
636
|
+
}),
|
|
637
|
+
initialFocus: 0,
|
|
638
|
+
children: Q
|
|
639
|
+
}), K && /* @__PURE__ */ M(G, {
|
|
640
|
+
isOpen: !0,
|
|
641
|
+
onClose: () => k(!1),
|
|
642
|
+
title: y.modalTitle,
|
|
643
|
+
onSelect: Y,
|
|
644
|
+
renderContent: b
|
|
645
|
+
})]
|
|
646
|
+
});
|
|
338
647
|
};
|
|
339
648
|
//#endregion
|
|
340
|
-
export {
|
|
649
|
+
export { L as ChatSkill, H as FavoriteSkillsPanel, F as SKILLS_CLASS, W as SkillArchiveUploadDialog, G as SkillCatalogModal, K as SkillDetailsSidePanel, I as SkillInfoTooltipContent, ce as SkillSelectorField, ie as buildFavoriteSkillItem, Y as diffTextChange, Q as findMentionAtCaret, ae as getSkillFallbackName, Z as insertAnchor, J as matchSkillMentions, X as reconcileAnchors, re as useSkillMentions, oe as useSkillSelectorOverlay };
|