@epam/ai-dial-skills 1.4.0-dev.110 → 1.4.0-dev.115
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/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +148 -142
- package/models/favorite-skills-panel-props.d.ts +7 -0
- package/models/favorite-skills-panel-props.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAoU5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAsB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,oSAgBrC,8BAA8B,KAAG,
|
|
1
|
+
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAsB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,oSAgBrC,8BAA8B,KAAG,6BA6kBnC,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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
|
-
@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}
|
|
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;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style: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)}.contain-paint{--tw-contain-paint:paint;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.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}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}
|
package/index.js
CHANGED
|
@@ -124,134 +124,138 @@ var U = {
|
|
|
124
124
|
rowLeaving: "_rowLeaving_1v431_32",
|
|
125
125
|
rowFadeOut: "_rowFadeOut_1v431_1",
|
|
126
126
|
listContent: "_listContent_1v431_60"
|
|
127
|
-
}, ae = "px-3 pb-0.5 pt-2", oe = 180, se = 288,
|
|
128
|
-
let { myCollectionLabel:
|
|
129
|
-
"--fs-row-hover-bg":
|
|
130
|
-
"--fs-header-text":
|
|
131
|
-
"--fs-empty-hint-text":
|
|
132
|
-
"--fs-star-color":
|
|
133
|
-
"--fs-footer-border":
|
|
134
|
-
}), [
|
|
127
|
+
}, ae = "px-3 pb-0.5 pt-2", oe = 180, se = 288, ce = ({ favorites: n, otherSkills: i = [], onSelect: a, onToggleFavorite: o, onBrowse: s, onViewDetails: l, isRowTooltipHidden: u = !1, className: d, rowClassName: h, searchQuery: v, listboxId: y, activeOptionId: b, isMenu: x = !1, labels: S = {}, colors: C, nameClassName: T = "dial-small-text", headerClassName: E = "dial-tiny-lead-semi-text", emptyHintClassName: D = "dial-small-text" }) => {
|
|
128
|
+
let { myCollectionLabel: O = "My Collection", emptyHintLabel: j = "Star a skill to pin it here", browseLabel: te = "Browse", removeFromFavoritesLabel: P = "Remove from favorites", viewDetailsLabel: F = "View details", noMatchingSkillsLabel: I = "No matching skills" } = S, re = t({
|
|
129
|
+
"--fs-row-hover-bg": C?.rowHoverBackground,
|
|
130
|
+
"--fs-header-text": C?.headerText,
|
|
131
|
+
"--fs-empty-hint-text": C?.emptyHintText,
|
|
132
|
+
"--fs-star-color": C?.starColor,
|
|
133
|
+
"--fs-footer-border": C?.footerBorder
|
|
134
|
+
}), [z, B] = N(/* @__PURE__ */ new Set()), V = M(/* @__PURE__ */ new Map());
|
|
135
135
|
ee(() => {
|
|
136
|
-
let e =
|
|
136
|
+
let e = V.current;
|
|
137
137
|
return () => {
|
|
138
138
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
139
139
|
};
|
|
140
140
|
}, []);
|
|
141
|
-
let
|
|
142
|
-
|
|
143
|
-
let
|
|
141
|
+
let H = y != null, W = x && !H, G = H || W ? "none" : void 0, K = "button";
|
|
142
|
+
H ? K = "option" : W && (K = "menuitem");
|
|
143
|
+
let J = k(), Y = v != null, ce = v?.toLowerCase() ?? "", le = (e) => e.name.toLowerCase().includes(ce), ue = Y ? n.filter(le) : n, de = Y ? i.filter(le) : [], Z = [...ue, ...de], fe = new Set(n.map((e) => e.id)), pe = Z.length === 0 && Y && ce !== "", Q = M(null), [me, he] = N();
|
|
144
144
|
A(() => {
|
|
145
|
-
Q.current &&
|
|
146
|
-
}, [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
Q.current && he(Math.min(Q.current.scrollHeight, se));
|
|
146
|
+
}, [
|
|
147
|
+
n,
|
|
148
|
+
i,
|
|
149
|
+
v
|
|
150
|
+
]);
|
|
151
|
+
let ge = (e, t) => {
|
|
152
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a(t));
|
|
153
|
+
}, _e = (e) => {
|
|
154
|
+
B((t) => new Set(t).add(e));
|
|
151
155
|
let t = setTimeout(() => {
|
|
152
|
-
|
|
156
|
+
o?.(e), B((t) => {
|
|
153
157
|
let n = new Set(t);
|
|
154
158
|
return n.delete(e), n;
|
|
155
|
-
}),
|
|
159
|
+
}), V.current.delete(e);
|
|
156
160
|
}, oe);
|
|
157
|
-
|
|
161
|
+
V.current.set(e, t);
|
|
158
162
|
};
|
|
159
163
|
return /* @__PURE__ */ R("div", {
|
|
160
|
-
className: r("flex w-full flex-col desktop:w-[280px]",
|
|
161
|
-
style:
|
|
164
|
+
className: r("flex min-h-0 w-full flex-col desktop:w-[280px]", d, U.favoritesPanel),
|
|
165
|
+
style: re,
|
|
162
166
|
children: [
|
|
163
167
|
/* @__PURE__ */ L("p", {
|
|
164
|
-
id:
|
|
165
|
-
className: r(
|
|
166
|
-
children:
|
|
168
|
+
id: J,
|
|
169
|
+
className: r(E, ae, X.header),
|
|
170
|
+
children: O
|
|
167
171
|
}),
|
|
168
172
|
/* @__PURE__ */ L("div", {
|
|
169
|
-
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", X.listContent),
|
|
170
|
-
style: { maxHeight:
|
|
173
|
+
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto contain-paint", X.listContent),
|
|
174
|
+
style: { maxHeight: me },
|
|
171
175
|
children: /* @__PURE__ */ R("div", {
|
|
172
176
|
ref: Q,
|
|
173
177
|
children: [Z.length > 0 ? /* @__PURE__ */ L("ul", {
|
|
174
|
-
id:
|
|
175
|
-
role:
|
|
176
|
-
"aria-labelledby":
|
|
178
|
+
id: y,
|
|
179
|
+
role: H ? "listbox" : G,
|
|
180
|
+
"aria-labelledby": H ? J : void 0,
|
|
177
181
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
178
182
|
children: Z.map((t) => {
|
|
179
|
-
let n =
|
|
180
|
-
role:
|
|
183
|
+
let n = H ? `${y}-${encodeURIComponent(t.id)}` : void 0, i = H ? -1 : void 0, s = /* @__PURE__ */ R("div", {
|
|
184
|
+
role: K,
|
|
181
185
|
id: n,
|
|
182
|
-
"aria-selected":
|
|
186
|
+
"aria-selected": H ? n === b : void 0,
|
|
183
187
|
"aria-label": t.name,
|
|
184
188
|
tabIndex: 0,
|
|
185
|
-
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", X.row,
|
|
186
|
-
onClick: () =>
|
|
187
|
-
onKeyDown: (e) =>
|
|
189
|
+
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", X.row, h),
|
|
190
|
+
onClick: () => a(t),
|
|
191
|
+
onKeyDown: (e) => ge(e, t),
|
|
188
192
|
children: [
|
|
189
193
|
/* @__PURE__ */ L(e, {
|
|
190
194
|
size: c.MD,
|
|
191
195
|
initialsName: t.name
|
|
192
196
|
}),
|
|
193
|
-
|
|
194
|
-
className: r(
|
|
197
|
+
v == null ? /* @__PURE__ */ L("span", {
|
|
198
|
+
className: r(T, "min-w-0 flex-1 truncate text-start"),
|
|
195
199
|
children: t.name
|
|
196
200
|
}) : /* @__PURE__ */ L(p, {
|
|
197
201
|
text: t.name,
|
|
198
|
-
query:
|
|
202
|
+
query: v,
|
|
199
203
|
maxLines: 1,
|
|
200
|
-
className: r(
|
|
204
|
+
className: r(T, "min-w-0 flex-1 text-start")
|
|
201
205
|
}),
|
|
202
|
-
|
|
206
|
+
o && fe.has(t.id) && /* @__PURE__ */ L(w, {
|
|
203
207
|
icon: /* @__PURE__ */ L(ne, {
|
|
204
208
|
size: c.SM,
|
|
205
209
|
className: X.star,
|
|
206
210
|
"aria-hidden": !0
|
|
207
211
|
}),
|
|
208
|
-
"aria-label":
|
|
212
|
+
"aria-label": P,
|
|
209
213
|
isSelected: !0,
|
|
210
|
-
tabIndex:
|
|
214
|
+
tabIndex: i,
|
|
211
215
|
onClick: (e) => {
|
|
212
|
-
e.stopPropagation(),
|
|
216
|
+
e.stopPropagation(), _e(t.id);
|
|
213
217
|
}
|
|
214
218
|
})
|
|
215
219
|
]
|
|
216
220
|
});
|
|
217
221
|
return /* @__PURE__ */ L("li", {
|
|
218
|
-
role:
|
|
219
|
-
className:
|
|
220
|
-
children:
|
|
222
|
+
role: G,
|
|
223
|
+
className: z.has(t.id) ? X.rowLeaving : X.rowEnter,
|
|
224
|
+
children: l && !u ? /* @__PURE__ */ L(m, {
|
|
221
225
|
asChild: !0,
|
|
222
226
|
contentClassName: ie,
|
|
223
227
|
content: /* @__PURE__ */ L(q, {
|
|
224
228
|
description: t.description,
|
|
225
|
-
viewDetailsLabel:
|
|
226
|
-
onViewDetails: () =>
|
|
227
|
-
viewDetailsTabIndex:
|
|
229
|
+
viewDetailsLabel: F,
|
|
230
|
+
onViewDetails: () => l(t),
|
|
231
|
+
viewDetailsTabIndex: i
|
|
228
232
|
}),
|
|
229
|
-
children:
|
|
230
|
-
}) :
|
|
233
|
+
children: s
|
|
234
|
+
}) : s
|
|
231
235
|
}, t.id);
|
|
232
236
|
})
|
|
233
|
-
}) :
|
|
234
|
-
className: r(
|
|
235
|
-
children:
|
|
237
|
+
}) : pe ? null : /* @__PURE__ */ L("p", {
|
|
238
|
+
className: r(D, "px-4 py-4 text-start", X.emptyHint),
|
|
239
|
+
children: j
|
|
236
240
|
}), /* @__PURE__ */ L(g, {
|
|
237
241
|
as: _.P,
|
|
238
|
-
className: r(
|
|
239
|
-
children:
|
|
242
|
+
className: r(D, "px-4 py-4 text-start", X.emptyHint),
|
|
243
|
+
children: pe && I
|
|
240
244
|
})]
|
|
241
245
|
})
|
|
242
246
|
}),
|
|
243
247
|
/* @__PURE__ */ L("div", {
|
|
244
248
|
className: r("border-t px-2 py-3", X.footer),
|
|
245
249
|
children: /* @__PURE__ */ L(f, {
|
|
246
|
-
role:
|
|
247
|
-
label:
|
|
250
|
+
role: W ? "menuitem" : void 0,
|
|
251
|
+
label: te,
|
|
248
252
|
className: "w-full justify-center",
|
|
249
|
-
onClick:
|
|
253
|
+
onClick: s
|
|
250
254
|
})
|
|
251
255
|
})
|
|
252
256
|
]
|
|
253
257
|
});
|
|
254
|
-
},
|
|
258
|
+
}, le = ".zip,.md", ue = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = le, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
|
|
255
259
|
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 ?? {};
|
|
256
260
|
return /* @__PURE__ */ L(v, {
|
|
257
261
|
open: e,
|
|
@@ -279,7 +283,7 @@ var U = {
|
|
|
279
283
|
}), n && /* @__PURE__ */ L(x, { ariaLabel: h })]
|
|
280
284
|
})
|
|
281
285
|
});
|
|
282
|
-
},
|
|
286
|
+
}, de = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ L(v, {
|
|
283
287
|
open: e,
|
|
284
288
|
header: r,
|
|
285
289
|
size: y.Lg,
|
|
@@ -293,21 +297,21 @@ var U = {
|
|
|
293
297
|
children: e && i(n, t)
|
|
294
298
|
})
|
|
295
299
|
})
|
|
296
|
-
}),
|
|
300
|
+
}), Z = (e, t = null) => e.map((e) => e.type === V.Folder ? {
|
|
297
301
|
path: e.id,
|
|
298
302
|
name: e.name,
|
|
299
303
|
nodeType: z.FOLDER,
|
|
300
304
|
parentPath: t,
|
|
301
305
|
folderId: e.id,
|
|
302
|
-
items:
|
|
306
|
+
items: Z(e.items, e.id)
|
|
303
307
|
} : {
|
|
304
308
|
path: e.id,
|
|
305
309
|
name: e.name,
|
|
306
310
|
nodeType: z.ITEM,
|
|
307
311
|
parentPath: t,
|
|
308
312
|
folderId: t ?? ""
|
|
309
|
-
}),
|
|
310
|
-
let s = j(() =>
|
|
313
|
+
}), fe = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => {
|
|
314
|
+
let s = j(() => Z(e), [e]), c = j(() => new Set(n), [n]);
|
|
311
315
|
return /* @__PURE__ */ L(B, {
|
|
312
316
|
items: s,
|
|
313
317
|
showFiles: !0,
|
|
@@ -325,10 +329,10 @@ var U = {
|
|
|
325
329
|
autoFocus: !0,
|
|
326
330
|
onEscape: a
|
|
327
331
|
});
|
|
328
|
-
},
|
|
332
|
+
}, pe = (e) => /* @__PURE__ */ L(H, {
|
|
329
333
|
...e,
|
|
330
|
-
renderContentFileTree: (e) => /* @__PURE__ */ L(
|
|
331
|
-
}),
|
|
334
|
+
renderContentFileTree: (e) => /* @__PURE__ */ L(fe, { ...e })
|
|
335
|
+
}), Q = (e) => e == null || /[\s/]/.test(e), me = (e, t, n) => {
|
|
332
336
|
let r = [], i = 0;
|
|
333
337
|
return t.forEach((t, a) => {
|
|
334
338
|
let o = `/${n(t.url)}`, s = i;
|
|
@@ -336,7 +340,7 @@ var U = {
|
|
|
336
340
|
let t = e.indexOf(o, s);
|
|
337
341
|
if (t === -1) return;
|
|
338
342
|
let n = t + o.length;
|
|
339
|
-
if (
|
|
343
|
+
if (Q(e[n])) {
|
|
340
344
|
r.push({
|
|
341
345
|
skillIndex: a,
|
|
342
346
|
start: t,
|
|
@@ -347,14 +351,14 @@ var U = {
|
|
|
347
351
|
s = t + 1;
|
|
348
352
|
}
|
|
349
353
|
}), r;
|
|
350
|
-
},
|
|
354
|
+
}, he = (e, t) => {
|
|
351
355
|
let n = /* @__PURE__ */ new Map();
|
|
352
356
|
t.forEach((e) => {
|
|
353
357
|
e.name !== "" && !n.has(e.name) && n.set(e.name, e.url);
|
|
354
358
|
});
|
|
355
359
|
let r = [...n.keys()].sort((e, t) => t.length - e.length), i = [], a = e.indexOf("/");
|
|
356
360
|
for (; a !== -1;) {
|
|
357
|
-
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) &&
|
|
361
|
+
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) && Q(e[o + t.length])) : void 0, c = s == null ? void 0 : n.get(s);
|
|
358
362
|
s != null && c != null ? (i.push({
|
|
359
363
|
url: c,
|
|
360
364
|
name: s,
|
|
@@ -363,7 +367,7 @@ var U = {
|
|
|
363
367
|
}), a = e.indexOf("/", o + s.length)) : a = e.indexOf("/", o);
|
|
364
368
|
}
|
|
365
369
|
return i;
|
|
366
|
-
},
|
|
370
|
+
}, ge = (e, t) => {
|
|
367
371
|
let n = Math.min(e.length, t.length), r = 0;
|
|
368
372
|
for (; r < n && e[r] === t[r];) r += 1;
|
|
369
373
|
let i = n - r, a = 0;
|
|
@@ -373,13 +377,13 @@ var U = {
|
|
|
373
377
|
deletedLength: e.length - r - a,
|
|
374
378
|
insertedLength: t.length - r - a
|
|
375
379
|
};
|
|
376
|
-
},
|
|
380
|
+
}, _e = (e, t) => {
|
|
377
381
|
let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
|
|
378
382
|
return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
|
|
379
383
|
...i,
|
|
380
384
|
start: i.start + r
|
|
381
385
|
}), e), []);
|
|
382
|
-
},
|
|
386
|
+
}, ve = (e, t, n, r, i) => {
|
|
383
387
|
let a = r.length + 1, o = a + +!!i, s = e.map((e) => e.start >= t ? {
|
|
384
388
|
...e,
|
|
385
389
|
start: e.start + o
|
|
@@ -390,7 +394,7 @@ var U = {
|
|
|
390
394
|
length: a
|
|
391
395
|
};
|
|
392
396
|
return [...s, c].sort((e, t) => e.start - t.start);
|
|
393
|
-
},
|
|
397
|
+
}, ye = (e, t) => e.find((e) => e.start + e.length === t), be = (e, t, n) => {
|
|
394
398
|
let r = t;
|
|
395
399
|
for (; r > 0 && !/\s/.test(e[r - 1]);) r--;
|
|
396
400
|
let i = r;
|
|
@@ -400,21 +404,21 @@ var U = {
|
|
|
400
404
|
start: r,
|
|
401
405
|
end: i
|
|
402
406
|
};
|
|
403
|
-
},
|
|
407
|
+
}, xe = (e, t, n) => {
|
|
404
408
|
if (n === "" || t.insertedLength < n.length) return;
|
|
405
409
|
let r = e.indexOf(n, Math.max(0, t.start - n.length)), i = t.start + t.insertedLength - n.length;
|
|
406
410
|
return r !== -1 && r <= i ? r : void 0;
|
|
407
|
-
},
|
|
411
|
+
}, Se = () => {
|
|
408
412
|
let [e, t] = N(""), [n, r] = N([]), i = M(e);
|
|
409
413
|
i.current = e;
|
|
410
414
|
let a = M(n);
|
|
411
415
|
a.current = n;
|
|
412
416
|
let o = M(null), s = O((e) => {
|
|
413
|
-
let n =
|
|
417
|
+
let n = ge(i.current, e), a = o.current;
|
|
414
418
|
o.current = null;
|
|
415
|
-
let s = a == null ? void 0 :
|
|
419
|
+
let s = a == null ? void 0 : xe(e, n, a.text);
|
|
416
420
|
r((t) => {
|
|
417
|
-
let r =
|
|
421
|
+
let r = _e(t, n);
|
|
418
422
|
if (a == null || s == null) return r;
|
|
419
423
|
let i = a.mentions.map((e) => ({
|
|
420
424
|
...e,
|
|
@@ -424,11 +428,11 @@ var U = {
|
|
|
424
428
|
}), i.current = e, t(e);
|
|
425
429
|
}, []), c = O((e, n, a) => {
|
|
426
430
|
let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
|
|
427
|
-
return i.current = l, t(l), r((t) =>
|
|
431
|
+
return i.current = l, t(l), r((t) => ve(t, a, e, n, s)), s;
|
|
428
432
|
}, []), l = O((e, n, a) => {
|
|
429
433
|
let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
|
|
430
|
-
i.current = c, t(c), r((t) =>
|
|
431
|
-
}, []), u = O((e) =>
|
|
434
|
+
i.current = c, t(c), r((t) => ve(t, a, e, n, !1));
|
|
435
|
+
}, []), u = O((e) => ye(a.current, e), []), d = j(() => {
|
|
432
436
|
if (n.length !== 0) return n.map((e) => ({ url: e.url }));
|
|
433
437
|
}, [n]), f = O((e, t) => {
|
|
434
438
|
o.current = t.length > 0 ? {
|
|
@@ -438,7 +442,7 @@ var U = {
|
|
|
438
442
|
}, []), p = O(() => {
|
|
439
443
|
t(""), r([]);
|
|
440
444
|
}, []), m = O((e, n, i) => {
|
|
441
|
-
let a = n ?? [], o =
|
|
445
|
+
let a = n ?? [], o = me(e, a, i);
|
|
442
446
|
t(e), r(o.map((e) => {
|
|
443
447
|
let t = a[e.skillIndex];
|
|
444
448
|
return {
|
|
@@ -472,18 +476,18 @@ var U = {
|
|
|
472
476
|
p,
|
|
473
477
|
m
|
|
474
478
|
]);
|
|
475
|
-
},
|
|
479
|
+
}, Ce = (e) => ({
|
|
476
480
|
id: e.url,
|
|
477
481
|
name: e.name,
|
|
478
482
|
description: e.description
|
|
479
|
-
}),
|
|
483
|
+
}), we = (e) => {
|
|
480
484
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
481
485
|
return t[t.length - 1] ?? e;
|
|
482
|
-
},
|
|
486
|
+
}, Te = (e) => {
|
|
483
487
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
484
488
|
return t[0] !== "skills" || t.length < 3 ? null : t[1];
|
|
485
|
-
},
|
|
486
|
-
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 =
|
|
489
|
+
}, Ee = (e, t) => Te(e) === t ? G.Deleted : G.NotShared, De = "/", Oe = ({ 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 }) => {
|
|
490
|
+
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 = Se(), B = j(() => [
|
|
487
491
|
...t,
|
|
488
492
|
...n ?? [],
|
|
489
493
|
...r ?? []
|
|
@@ -491,7 +495,7 @@ var U = {
|
|
|
491
495
|
t,
|
|
492
496
|
n,
|
|
493
497
|
r
|
|
494
|
-
]), V = j(() => new Map(B.map((e) => [e.url, e])), [B]), H = O((e) => V.get(e)?.name ??
|
|
498
|
+
]), V = j(() => new Map(B.map((e) => [e.url, e])), [B]), H = O((e) => V.get(e)?.name ?? we(e), [V]), U = j(() => B.filter((e) => a.has(e.url)).map((e) => Ce(e)), [B, a]), ie = j(() => B.filter((e) => !a.has(e.url)).map((e) => Ce(e)), [B, a]), W = z.anchors.length > 0 && !e, G = j(() => z.anchors.map((t) => ({
|
|
495
499
|
start: t.start,
|
|
496
500
|
length: t.length,
|
|
497
501
|
isUnsupported: !e,
|
|
@@ -517,14 +521,14 @@ var U = {
|
|
|
517
521
|
f,
|
|
518
522
|
w,
|
|
519
523
|
C
|
|
520
|
-
]),
|
|
524
|
+
]), K = O((e, t, n) => {
|
|
521
525
|
let r = z.insertMention(e, t, n);
|
|
522
526
|
I((e) => e + 1), R(n + 1 + t.length + +!!r);
|
|
523
|
-
}, [z]), K = O((e) => {
|
|
524
|
-
let t = ye(z.draft, e, Ee);
|
|
525
|
-
return t == null ? e : (z.onDraftChange(z.draft.slice(0, t.start) + z.draft.slice(t.end)), t.start);
|
|
526
527
|
}, [z]), q = O((e) => {
|
|
527
|
-
let t =
|
|
528
|
+
let t = be(z.draft, e, De);
|
|
529
|
+
return t == null ? e : (z.onDraftChange(z.draft.slice(0, t.start) + z.draft.slice(t.end)), t.start);
|
|
530
|
+
}, [z]), J = O((e) => {
|
|
531
|
+
let t = be(z.draft, e, De);
|
|
528
532
|
if (t == null) return;
|
|
529
533
|
let n = z.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
|
|
530
534
|
return {
|
|
@@ -532,22 +536,22 @@ var U = {
|
|
|
532
536
|
text: z.draft.slice(t.start, t.end),
|
|
533
537
|
mentionUrl: n?.url
|
|
534
538
|
};
|
|
535
|
-
}, [z]),
|
|
539
|
+
}, [z]), X = O(() => {
|
|
536
540
|
z.reset(), I((e) => e + 1), R(void 0);
|
|
537
|
-
}, [z]), { expectInsertion:
|
|
538
|
-
|
|
541
|
+
}, [z]), { expectInsertion: ae } = z, oe = O((t) => {
|
|
542
|
+
ae(t, e ? he(t, B) : []);
|
|
539
543
|
}, [
|
|
540
|
-
|
|
544
|
+
ae,
|
|
541
545
|
e,
|
|
542
546
|
B
|
|
543
|
-
]),
|
|
547
|
+
]), se = O((e, t) => {
|
|
544
548
|
z.seedFromMessage(e, t, H), I((e) => e + 1), R(void 0);
|
|
545
|
-
}, [z, H]),
|
|
549
|
+
}, [z, H]), le = O((e) => se(`/${H(e)} `, [{ url: e }]), [se, H]), ue = O((e, t) => {
|
|
546
550
|
if (t == null || t.length === 0) return null;
|
|
547
|
-
let n =
|
|
551
|
+
let n = me(e, t, H), r = [], i = 0;
|
|
548
552
|
return n.forEach((n) => {
|
|
549
553
|
n.start > i && r.push(e.slice(i, n.start));
|
|
550
|
-
let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ??
|
|
554
|
+
let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ?? we(a.url), l = s == null ? Ee(a.url, o) : void 0;
|
|
551
555
|
r.push({
|
|
552
556
|
text: e.slice(n.start, n.start + n.length),
|
|
553
557
|
node: /* @__PURE__ */ L(Y, {
|
|
@@ -577,8 +581,8 @@ var U = {
|
|
|
577
581
|
o,
|
|
578
582
|
x,
|
|
579
583
|
S
|
|
580
|
-
]),
|
|
581
|
-
let t = V.get(e.url), n = t?.name ??
|
|
584
|
+
]), Z = O((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
585
|
+
let t = V.get(e.url), n = t?.name ?? we(e.url), r = t == null ? Ee(e.url, o) : void 0;
|
|
582
586
|
return /* @__PURE__ */ L(Y, {
|
|
583
587
|
name: n,
|
|
584
588
|
path: e.url,
|
|
@@ -603,31 +607,31 @@ var U = {
|
|
|
603
607
|
o,
|
|
604
608
|
x,
|
|
605
609
|
S
|
|
606
|
-
]),
|
|
610
|
+
]), fe = O((e, t) => /* @__PURE__ */ L(ce, {
|
|
607
611
|
favorites: U,
|
|
608
612
|
isMenu: !0,
|
|
609
613
|
onSelect: (n) => {
|
|
610
|
-
|
|
614
|
+
K(n.id, n.name, q(t)), e();
|
|
611
615
|
},
|
|
612
616
|
onToggleFavorite: s,
|
|
613
617
|
onBrowse: () => {
|
|
614
|
-
let n =
|
|
618
|
+
let n = J(t), r = q(t);
|
|
615
619
|
P(r), F.current = n ?? null, e(), E(!0);
|
|
616
620
|
},
|
|
617
621
|
onViewDetails: (n) => {
|
|
618
|
-
|
|
622
|
+
q(t), e(), k(n.id);
|
|
619
623
|
},
|
|
620
624
|
isRowTooltipHidden: m,
|
|
621
625
|
labels: w
|
|
622
626
|
}), [
|
|
623
627
|
U,
|
|
624
|
-
G,
|
|
625
628
|
K,
|
|
626
629
|
q,
|
|
630
|
+
J,
|
|
627
631
|
s,
|
|
628
632
|
m,
|
|
629
633
|
w
|
|
630
|
-
]),
|
|
634
|
+
]), pe = j(() => e ? {
|
|
631
635
|
key: "skills",
|
|
632
636
|
title: _,
|
|
633
637
|
icon: /* @__PURE__ */ L(te, {
|
|
@@ -635,29 +639,30 @@ var U = {
|
|
|
635
639
|
"aria-hidden": !0,
|
|
636
640
|
stroke: l
|
|
637
641
|
}),
|
|
638
|
-
renderOverlay:
|
|
642
|
+
renderOverlay: fe,
|
|
639
643
|
backLabel: v
|
|
640
644
|
} : void 0, [
|
|
641
645
|
e,
|
|
642
646
|
_,
|
|
643
647
|
v,
|
|
644
|
-
|
|
645
|
-
]),
|
|
646
|
-
triggerPrefix:
|
|
648
|
+
fe
|
|
649
|
+
]), Q = j(() => e ? {
|
|
650
|
+
triggerPrefix: De,
|
|
647
651
|
menuLabel: _,
|
|
648
652
|
emptyQueryHint: b,
|
|
649
|
-
onTextPaste:
|
|
650
|
-
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ L(
|
|
653
|
+
onTextPaste: oe,
|
|
654
|
+
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ L(ce, {
|
|
651
655
|
favorites: U,
|
|
656
|
+
otherSkills: ie,
|
|
652
657
|
searchQuery: e,
|
|
653
658
|
listboxId: r,
|
|
654
659
|
activeOptionId: i,
|
|
655
660
|
onSelect: (e) => {
|
|
656
|
-
n({ consumeQuery: !0 }),
|
|
661
|
+
n({ consumeQuery: !0 }), K(e.id, e.name, t);
|
|
657
662
|
},
|
|
658
663
|
onToggleFavorite: s,
|
|
659
664
|
onBrowse: () => {
|
|
660
|
-
let r = `${
|
|
665
|
+
let r = `${De}${e}`, i = z.anchors.find((e) => e.start === t && e.length === r.length);
|
|
661
666
|
n({
|
|
662
667
|
consumeQuery: !0,
|
|
663
668
|
returnFocus: !1
|
|
@@ -678,13 +683,14 @@ var U = {
|
|
|
678
683
|
_,
|
|
679
684
|
b,
|
|
680
685
|
U,
|
|
681
|
-
|
|
686
|
+
ie,
|
|
687
|
+
K,
|
|
682
688
|
z.anchors,
|
|
683
689
|
s,
|
|
684
690
|
m,
|
|
685
691
|
w,
|
|
686
|
-
|
|
687
|
-
]),
|
|
692
|
+
oe
|
|
693
|
+
]), ge = O(() => {
|
|
688
694
|
E(!1);
|
|
689
695
|
let e = F.current;
|
|
690
696
|
if (F.current = null, e == null) return;
|
|
@@ -692,13 +698,13 @@ var U = {
|
|
|
692
698
|
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);
|
|
693
699
|
}, [z]);
|
|
694
700
|
return {
|
|
695
|
-
skillMenuOverlay:
|
|
696
|
-
commandMenu:
|
|
697
|
-
skillCatalogModal: /* @__PURE__ */ L(
|
|
701
|
+
skillMenuOverlay: pe,
|
|
702
|
+
commandMenu: Q,
|
|
703
|
+
skillCatalogModal: /* @__PURE__ */ L(de, {
|
|
698
704
|
isOpen: T,
|
|
699
|
-
onClose:
|
|
705
|
+
onClose: ge,
|
|
700
706
|
onSelect: (e) => {
|
|
701
|
-
F.current = null,
|
|
707
|
+
F.current = null, K(e, H(e), A), E(!1);
|
|
702
708
|
},
|
|
703
709
|
title: y,
|
|
704
710
|
renderContent: h
|
|
@@ -712,27 +718,27 @@ var U = {
|
|
|
712
718
|
}),
|
|
713
719
|
message: z.draft,
|
|
714
720
|
messageRevision: ne,
|
|
715
|
-
activeMentions:
|
|
721
|
+
activeMentions: G,
|
|
716
722
|
onDraftChange: z.onDraftChange,
|
|
717
723
|
onBackspaceAtCaret: z.onBackspaceAtCaret,
|
|
718
724
|
caretPositionOverride: re,
|
|
719
|
-
isSkillUnsupported:
|
|
725
|
+
isSkillUnsupported: W,
|
|
720
726
|
selectedSkills: z.orderedSkills,
|
|
721
|
-
resetSkillMentions:
|
|
722
|
-
seedSkillMentions:
|
|
723
|
-
selectSkillByUrl:
|
|
724
|
-
recognizeMentionsInInsertion:
|
|
725
|
-
renderHistorySkillSegments:
|
|
726
|
-
renderHistorySkills:
|
|
727
|
+
resetSkillMentions: X,
|
|
728
|
+
seedSkillMentions: se,
|
|
729
|
+
selectSkillByUrl: le,
|
|
730
|
+
recognizeMentionsInInsertion: oe,
|
|
731
|
+
renderHistorySkillSegments: ue,
|
|
732
|
+
renderHistorySkills: Z
|
|
727
733
|
};
|
|
728
|
-
},
|
|
734
|
+
}, ke = (...e) => {
|
|
729
735
|
let t = /* @__PURE__ */ new Map();
|
|
730
736
|
for (let n of e) for (let e of n ?? []) t.set(e.url, {
|
|
731
737
|
id: e.url,
|
|
732
738
|
name: e.name
|
|
733
739
|
});
|
|
734
740
|
return [...t.values()];
|
|
735
|
-
},
|
|
741
|
+
}, $ = {
|
|
736
742
|
background: "_background_1goqn_1",
|
|
737
743
|
border: "_border_1goqn_5",
|
|
738
744
|
value: "_value_1goqn_9",
|
|
@@ -789,7 +795,7 @@ var U = {
|
|
|
789
795
|
disabled: d,
|
|
790
796
|
removeLabel: m.removeLabel,
|
|
791
797
|
onRemove: (e) => n(e, t),
|
|
792
|
-
className: i ?
|
|
798
|
+
className: i ? $.unavailableTag : void 0
|
|
793
799
|
});
|
|
794
800
|
return i ? /* @__PURE__ */ L(T, {
|
|
795
801
|
tooltip: m.unavailableTooltipLabel ?? "The skill has been deleted or access revoked",
|
|
@@ -820,7 +826,7 @@ var U = {
|
|
|
820
826
|
disabled: d || A,
|
|
821
827
|
invalid: !!f || E,
|
|
822
828
|
className: "w-full min-w-0",
|
|
823
|
-
fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in P &&
|
|
829
|
+
fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in P && $.background, "--ssf-border" in P && $.border, "--ssf-text" in P && $.value, (f || E) && $.invalid, g?.typography?.fontClassName ?? "dial-small-text", g?.triggerClassName),
|
|
824
830
|
listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
|
|
825
831
|
})
|
|
826
832
|
})
|
|
@@ -832,4 +838,4 @@ var U = {
|
|
|
832
838
|
});
|
|
833
839
|
};
|
|
834
840
|
//#endregion
|
|
835
|
-
export { Y as ChatSkill, W as ChatSkillDetailsTrigger,
|
|
841
|
+
export { Y as ChatSkill, W as ChatSkillDetailsTrigger, ce as FavoriteSkillsPanel, U as SKILLS_CLASS, ue as SkillArchiveUploadDialog, de as SkillCatalogModal, fe as SkillContentFileTree, pe as SkillDetailsSidePanel, q as SkillInfoTooltipContent, Me as SkillSelectorField, G as SkillUnresolvedReason, Ce as buildFavoriteSkillItem, ke as buildSkillSelectorOptions, ge as diffTextChange, ye as findMentionAtCaret, we as getSkillFallbackName, ve as insertAnchor, me as matchSkillMentions, _e as reconcileAnchors, Se as useSkillMentions, Oe as useSkillSelectorOverlay };
|
|
@@ -31,6 +31,13 @@ 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
|
+
/**
|
|
35
|
+
* Skills from the rest of the catalog (own, shared, public) that are not
|
|
36
|
+
* favorites. Rendered after the favorites, and only in search mode (an empty
|
|
37
|
+
* `searchQuery` included), so the list shows every skill while the favorites
|
|
38
|
+
* stay on top. These rows have no star action.
|
|
39
|
+
*/
|
|
40
|
+
otherSkills?: FavoriteSkillItem[];
|
|
34
41
|
/** 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
42
|
onSelect: (item: FavoriteSkillItem) => void;
|
|
36
43
|
/** Removes a favorite by id; omitted hides the star action. */
|
|
@@ -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,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,0HAA0H;IAC1H,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,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"}
|
|
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;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,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,0HAA0H;IAC1H,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,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"}
|
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.4.0-dev.
|
|
4
|
+
"version": "1.4.0-dev.115",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@tabler/icons-react": "^3.50.0",
|
|
25
|
-
"@epam/ai-dial-catalog": "1.4.0-dev.
|
|
26
|
-
"@epam/ai-dial-conversation-input": "1.4.0-dev.
|
|
25
|
+
"@epam/ai-dial-catalog": "1.4.0-dev.115",
|
|
26
|
+
"@epam/ai-dial-conversation-input": "1.4.0-dev.115"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@epam/ai-dial-chat-shared": "1.4.0-dev.
|
|
29
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.115",
|
|
30
30
|
"@epam/ai-dial-react-file-manager": "^0.4.3",
|
|
31
31
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
32
32
|
"react": "^19.2.8"
|