@epam/ai-dial-skill-editor 1.2.0-rc.1 → 1.2.0-rc.3

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":"SkillEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SkillEditor/SkillEditor.tsx"],"names":[],"mappings":"AA0DA,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAEL,EAAE,EAUH,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,iCAAiC,CAAC;AAuDzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA20B5C,CAAC"}
1
+ {"version":3,"file":"SkillEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SkillEditor/SkillEditor.tsx"],"names":[],"mappings":"AA0DA,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAEL,EAAE,EAUH,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,iCAAiC,CAAC;AAuDzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAu1B5C,CAAC"}
package/index.js CHANGED
@@ -982,7 +982,7 @@ var Re = {
982
982
  }, ct = [U.Name, U.Description], lt = 24, ut = 300, dt = "desktop:px-8 desktop:py-6", ft = "desktop:px-8 desktop:py-6", pt = "gap-4 px-4 py-6 desktop:gap-5 desktop:px-8 desktop:py-6", mt = R(async () => {
983
983
  let { MarkdownEditor: e } = await _e();
984
984
  return { default: e };
985
- }), ht = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: v, expandedPaths: S, onExpandedPathsChange: w, isLoading: T = !1, hasLoadError: D = !1, isSubmitting: O = !1, errors: k, submitError: ee, conflict: te, onReloadLatest: j, isNameReadOnly: M = !1, onDirtyChange: N, onValuesChange: L, onRefineDescription: ie, onRefineInstructions: se, fileActions: R, supportingFileContent: fe, asideData: _e, onSubmit: ve, onCancel: ye, onBack: be, backAriaLabel: xe, title: Se, onRetry: Ce, onRetrySubmit: we, labels: Te, styles: U, dir: Ee, instructionsEditorTheme: De = y.light }) => {
985
+ }), ht = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: _, expandedPaths: v, onExpandedPathsChange: S, isLoading: T = !1, hasLoadError: D = !1, isSubmitting: O = !1, errors: k, submitError: ee, conflict: te, onReloadLatest: j, isNameReadOnly: M = !1, onDirtyChange: N, onValuesChange: L, onRefineDescription: ie, onRefineInstructions: se, fileActions: R, supportingFileContent: fe, asideData: _e, onSubmit: ve, onCancel: ye, onBack: be, backAriaLabel: xe, title: Se, onRetry: Ce, onRetrySubmit: we, labels: Te, styles: U, dir: Ee, instructionsEditorTheme: De = y.light }) => {
986
986
  let [W, Oe] = H({
987
987
  name: r?.name ?? "",
988
988
  description: r?.description ?? "",
@@ -1051,11 +1051,11 @@ var Re = {
1051
1051
  N
1052
1052
  ]);
1053
1053
  let [rt, it] = H(K), X = s ?? rt, Z = z((e) => {
1054
- it(e), v?.(e);
1055
- }, [v]), [ht, gt] = H([]), _t = S ?? ht, vt = B(() => new Set(_t), [_t]), yt = z((e) => {
1054
+ it(e), _?.(e);
1055
+ }, [_]), [ht, gt] = H([]), _t = v ?? ht, vt = B(() => new Set(_t), [_t]), yt = z((e) => {
1056
1056
  let t = [...e];
1057
- gt(t), w?.(t);
1058
- }, [w]), [bt, xt] = H(!1), [St, Ct] = H(st), wt = z((e) => {
1057
+ gt(t), S?.(t);
1058
+ }, [S]), [bt, xt] = H(!1), [St, Ct] = H(st), wt = z((e) => {
1059
1059
  Ct(e), xt(!0);
1060
1060
  }, []), [Tt, Et] = H(!1), { isDragActive: Dt, dropZoneHandlers: Ot } = Xe(z((e) => {
1061
1061
  bt || wt({
@@ -1177,12 +1177,12 @@ var Re = {
1177
1177
  i,
1178
1178
  X
1179
1179
  ]), tn = z((e, t) => {
1180
- if (e.path === "SKILL.md" || e.path === Vt) return [];
1180
+ if (e.path === Vt || e.nodeType !== he.FOLDER) return [];
1181
1181
  let n = {
1182
1182
  path: e.path,
1183
1183
  name: e.name,
1184
- kind: e.nodeType === he.FOLDER ? q.Folder : q.File
1185
- }, r = n.kind === q.Folder ? $t(We(ze.Child, n), t) : [];
1184
+ kind: q.Folder
1185
+ }, r = $t(We(ze.Child, n), t);
1186
1186
  return r.push({
1187
1187
  key: "add-sibling",
1188
1188
  icon: Qe(ce),
@@ -1205,7 +1205,16 @@ var Re = {
1205
1205
  ]), nn = B(() => ({
1206
1206
  [Y.Mobile]: (e) => tn(e, Y.Mobile),
1207
1207
  [Y.Desktop]: (e) => tn(e, Y.Desktop)
1208
- }), [tn]), rn = (e) => /* @__PURE__ */ I("div", {
1208
+ }), [tn]), rn = z((e) => e.nodeType === he.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(w, {
1209
+ size: b.Small,
1210
+ icon: Qe(le, Mt, g.SM),
1211
+ "aria-label": Q.deleteLabel ?? "Delete",
1212
+ onClick: () => qt(e.path)
1213
+ }), [
1214
+ Q.deleteLabel,
1215
+ Mt,
1216
+ qt
1217
+ ]), an = (e) => /* @__PURE__ */ I("div", {
1209
1218
  className: "flex flex-col gap-2 desktop:gap-5",
1210
1219
  children: [/* @__PURE__ */ I("div", {
1211
1220
  className: "flex items-center justify-between",
@@ -1217,11 +1226,6 @@ var Re = {
1217
1226
  variant: m.Neutral,
1218
1227
  appearance: f.Solid,
1219
1228
  size: b.Small,
1220
- iconBefore: /* @__PURE__ */ F(ce, {
1221
- size: g.SM,
1222
- "aria-hidden": !0,
1223
- stroke: _
1224
- }),
1225
1229
  items: en[e]
1226
1230
  })]
1227
1231
  }), /* @__PURE__ */ F("div", {
@@ -1235,6 +1239,7 @@ var Re = {
1235
1239
  onExpandedPathsChange: yt,
1236
1240
  onItemClick: Kt,
1237
1241
  getContextMenuItems: nn[e],
1242
+ renderItemActions: rn,
1238
1243
  renamedPath: Ht === e ? Vt : void 0,
1239
1244
  onRenameSave: zt.handleSave,
1240
1245
  onRenameCancel: zt.handleCancel,
@@ -1242,17 +1247,17 @@ var Re = {
1242
1247
  rootItemPath: ""
1243
1248
  })
1244
1249
  })]
1245
- }), an = B(() => ({
1250
+ }), on = B(() => ({
1246
1251
  name: W.name,
1247
1252
  description: W.description,
1248
1253
  iconUrl: "",
1249
1254
  version: "",
1250
1255
  topics: [],
1251
1256
  otherLocales: []
1252
- }), [W.name, W.description]), on = B(() => ({
1257
+ }), [W.name, W.description]), sn = B(() => ({
1253
1258
  name: k?.name,
1254
1259
  description: k?.description
1255
- }), [k?.name, k?.description]), sn = B(() => ({ form: {
1260
+ }), [k?.name, k?.description]), cn = B(() => ({ form: {
1256
1261
  ...Pe,
1257
1262
  name: {
1258
1263
  label: Q.nameLabel ?? "Name",
@@ -1268,9 +1273,9 @@ var Re = {
1268
1273
  Q.namePlaceholder,
1269
1274
  Q.descriptionLabel,
1270
1275
  Q.descriptionPlaceholder
1271
- ]), cn = (e) => {
1276
+ ]), ln = (e) => {
1272
1277
  e.name !== void 0 && Me({ name: e.name }), e.description !== void 0 && (Le.reset(), Me({ description: e.description }));
1273
- }, ln = ie ? (e, t) => /* @__PURE__ */ F(a, {
1278
+ }, un = ie ? (e, t) => /* @__PURE__ */ F(a, {
1274
1279
  isEnabled: !0,
1275
1280
  fieldId: t,
1276
1281
  required: !0,
@@ -1280,7 +1285,7 @@ var Re = {
1280
1285
  disabled: Be || O,
1281
1286
  ...Ft,
1282
1287
  children: e
1283
- }) : void 0, un = {
1288
+ }) : void 0, dn = {
1284
1289
  title: Se,
1285
1290
  onBack: Ge,
1286
1291
  onCancel: Ue,
@@ -1299,7 +1304,7 @@ var Re = {
1299
1304
  dir: Ee,
1300
1305
  className: "relative flex min-h-0 flex-1 flex-col",
1301
1306
  children: /* @__PURE__ */ F(Ne, {
1302
- ...un,
1307
+ ...dn,
1303
1308
  metadata: /* @__PURE__ */ F("div", {
1304
1309
  role: "status",
1305
1310
  "aria-label": Q.loadingAriaLabel ?? "Loading skill",
@@ -1312,7 +1317,7 @@ var Re = {
1312
1317
  dir: Ee,
1313
1318
  className: "relative flex min-h-0 flex-1 flex-col",
1314
1319
  children: /* @__PURE__ */ F(Ne, {
1315
- ...un,
1320
+ ...dn,
1316
1321
  metadata: /* @__PURE__ */ I("div", {
1317
1322
  role: "alert",
1318
1323
  className: "flex flex-col items-center gap-4 p-8",
@@ -1323,7 +1328,7 @@ var Re = {
1323
1328
  })
1324
1329
  })
1325
1330
  });
1326
- let dn = X === K, fn = dn ? K : Q.selectedFileHeading?.(Gt?.name ?? X) ?? Gt?.name ?? X, pn = ee != null || te != null ? /* @__PURE__ */ I("div", {
1331
+ let fn = X === K, pn = fn ? K : Q.selectedFileHeading?.(Gt?.name ?? X) ?? Gt?.name ?? X, mn = ee != null || te != null ? /* @__PURE__ */ I("div", {
1327
1332
  className: "flex flex-col gap-2",
1328
1333
  children: [ee != null && /* @__PURE__ */ I("div", {
1329
1334
  className: "flex items-center gap-2",
@@ -1338,7 +1343,7 @@ var Re = {
1338
1343
  onClick: j
1339
1344
  })]
1340
1345
  })]
1341
- }) : void 0, mn = /* @__PURE__ */ F(a, {
1346
+ }) : void 0, hn = /* @__PURE__ */ F(a, {
1342
1347
  isEnabled: !!se,
1343
1348
  fieldId: ke,
1344
1349
  required: !0,
@@ -1390,7 +1395,7 @@ var Re = {
1390
1395
  labels: Te
1391
1396
  }),
1392
1397
  /* @__PURE__ */ F(Ne, {
1393
- ...un,
1398
+ ...dn,
1394
1399
  asideData: _e,
1395
1400
  asideSectionClassName: ft,
1396
1401
  isSubmitting: O,
@@ -1403,26 +1408,26 @@ var Re = {
1403
1408
  expanded: Tt,
1404
1409
  onToggle: Et,
1405
1410
  ariaLabel: Q.editingFileLabel ?? "Editing file",
1406
- children: rn(Y.Mobile)
1411
+ children: an(Y.Mobile)
1407
1412
  })
1408
1413
  }), /* @__PURE__ */ F("div", {
1409
1414
  className: "hidden desktop:block",
1410
- children: rn(Y.Desktop)
1415
+ children: an(Y.Desktop)
1411
1416
  })] }),
1412
- alert: pn,
1413
- setupTitle: fn,
1417
+ alert: mn,
1418
+ setupTitle: pn,
1414
1419
  setupSectionClassName: pt,
1415
- setup: dn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ie, {
1416
- values: an,
1417
- errors: on,
1418
- onChange: cn,
1420
+ setup: fn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ie, {
1421
+ values: on,
1422
+ errors: sn,
1423
+ onChange: ln,
1419
1424
  fields: ct,
1420
1425
  isDescriptionRequired: !0,
1421
1426
  isNameReadOnly: M,
1422
1427
  nameCaption: k?.name ? void 0 : Q.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1423
- renderDescription: ln,
1424
- labels: sn
1425
- }), mn] }) : /* @__PURE__ */ F(P, { children: Gt?.kind === q.File && /* @__PURE__ */ F("div", {
1428
+ renderDescription: un,
1429
+ labels: cn
1430
+ }), hn] }) : /* @__PURE__ */ F(P, { children: Gt?.kind === q.File && /* @__PURE__ */ F("div", {
1426
1431
  className: "flex min-h-0 flex-1 flex-col",
1427
1432
  children: fe ?? /* @__PURE__ */ F(h, { text: Q.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1428
1433
  }) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-skill-editor",
3
3
  "description": "Host-agnostic form for authoring a DIAL Skill, with an inline supporting-file tree",
4
- "version": "1.2.0-rc.1",
4
+ "version": "1.2.0-rc.3",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,12 +20,12 @@
20
20
  "@tabler/icons-react": "^3.44.0",
21
21
  "@uiw/react-markdown-preview": "^5.2.1",
22
22
  "@uiw/react-md-editor": "^4.1.1",
23
- "@epam/ai-dial-builder-form": "1.2.0-rc.1"
23
+ "@epam/ai-dial-builder-form": "1.2.0-rc.3"
24
24
  },
25
25
  "peerDependencies": {
26
- "@epam/ai-dial-chat-shared": "1.2.0-rc.1",
27
- "@epam/ai-dial-ui-kit": "^0.15.0",
28
- "@epam/ai-dial-react-file-manager": "^0.3.0",
26
+ "@epam/ai-dial-chat-shared": "1.2.0-rc.3",
27
+ "@epam/ai-dial-ui-kit": "^0.15.3",
28
+ "@epam/ai-dial-react-file-manager": "^0.3.2",
29
29
  "react": "^19.2.8"
30
30
  },
31
31
  "repository": {