@epam/ai-dial-skill-editor 1.2.0-dev.48 → 1.2.0-dev.58

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":"AAiCA,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAEL,EAAE,EAQH,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,iCAAiC,CAAC;AAsBzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2e5C,CAAC"}
1
+ {"version":3,"file":"SkillEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SkillEditor/SkillEditor.tsx"],"names":[],"mappings":"AAiCA,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAEL,EAAE,EAQH,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,iCAAiC,CAAC;AAsBzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA8e5C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const SKILL_EDITOR_CLASS: {
2
+ /** The editor's root surface, which is also the file drop zone. */
3
+ readonly root: "dial-skill-editor-root";
4
+ };
5
+ //# sourceMappingURL=public-class-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB;IAC7B,mEAAmE;;CAE3D,CAAC"}
package/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export { SkillEditor } from './components/SkillEditor/SkillEditor';
2
2
  export type { SkillEditorColors, SkillEditorConflict, SkillEditorErrors, SkillEditorFileActions, SkillEditorLabels, SkillEditorProps, SkillEditorStyles, SkillEditorTypography, SkillEditorValues, SkillFileBatchError, SkillFileCommitResult, SkillFileTreeNode, SkillFileUploadCandidate, SkillFileValidationResult, } from './models/skill-editor-props';
3
3
  export { SkillFileCandidateKind, SkillFileValidationStatus, } from './models/skill-editor-props';
4
4
  export { SkillFileNodeKind } from './types/skill-file-node-kind';
5
+ export { SKILL_EDITOR_CLASS } from './constants/public-class-names';
5
6
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
package/index.js CHANGED
@@ -1,37 +1,41 @@
1
1
  import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as t, buildCssVars as n, formatFileSize as r, mergeClasses as i, useAvailableHeightCap as a } from "@epam/ai-dial-chat-shared";
2
- import { Accordion as o, CaptionText as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, EditorThemes as u, ErrorText as d, FileDropzone as f, GhostButton as ee, GhostIconButton as te, Input as p, NeutralButton as m, Popup as ne, PopupSize as re, PrimaryButton as ie, Spinner as h, Textarea as g } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
4
- import { IconArrowNarrowLeft as b, IconFileText as ae, IconPlus as oe, IconTrashX as se, IconUpload as x } from "@tabler/icons-react";
5
- import { Suspense as S, lazy as C, useCallback as w, useEffect as T, useId as E, useMemo as D, useRef as O, useState as k } from "react";
6
- import { DialFileNodeType as A, DialFoldersTree as ce } from "@epam/ai-dial-react-file-manager";
7
- import { LazyMarkdownEditor as j } from "@epam/ai-dial-ui-kit/editors";
8
- var M = {
2
+ import { Accordion as o, CaptionText as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, EditorThemes as u, ErrorText as d, FileDropzone as f, GhostButton as ee, GhostIconButton as p, Input as m, NeutralButton as h, Popup as g, PopupSize as te, PrimaryButton as ne, Spinner as _, Textarea as v } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
4
+ import { IconArrowNarrowLeft as S, IconFileText as re, IconPlus as ie, IconTrashX as ae, IconUpload as C } from "@tabler/icons-react";
5
+ import { Suspense as w, lazy as T, useCallback as E, useEffect as D, useId as O, useMemo as k, useRef as A, useState as j } from "react";
6
+ import { DialFileNodeType as M, DialFoldersTree as oe } from "@epam/ai-dial-react-file-manager";
7
+ import { LazyMarkdownEditor as N } from "@epam/ai-dial-ui-kit/editors";
8
+ //#region ../builder-form/src/constants/public-class-names.ts
9
+ var se = {
10
+ layout: "dial-builder-form-layout",
11
+ section: "dial-builder-form-section"
12
+ }, P = {
9
13
  headerBorder: "_headerBorder_1kidu_1",
10
14
  footerBorder: "_footerBorder_1kidu_5",
11
15
  sidebarBorder: "_sidebarBorder_1kidu_9"
12
- }, N = ({ title: e, onBack: t, backAriaLabel: r = "Back", actions: a, leftContent: o, rightContent: s, isSaving: u = !1, labels: d, styles: f, dir: ee }) => {
13
- let p = E(), m = u ? d?.savingStatusLabel ?? "Saving" : "";
14
- return /* @__PURE__ */ y("div", {
16
+ }, ce = ({ title: e, onBack: t, backAriaLabel: r = "Back", actions: a, leftContent: o, rightContent: s, isSaving: u = !1, labels: d, styles: f, dir: ee }) => {
17
+ let m = O(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = n({
18
+ "--el-header-border-color": f?.colors?.headerBorderColor,
19
+ "--el-sidebar-border-color": f?.colors?.sidebarBorderColor
20
+ });
21
+ return /* @__PURE__ */ x("div", {
15
22
  dir: ee,
16
- className: "flex min-h-0 flex-1 flex-col",
17
- style: n({
18
- "--el-header-border-color": f?.colors?.headerBorderColor,
19
- "--el-sidebar-border-color": f?.colors?.sidebarBorderColor
20
- }),
23
+ className: i("flex min-h-0 flex-1 flex-col", se.layout),
24
+ style: g,
21
25
  children: [
22
- /* @__PURE__ */ v("span", {
26
+ /* @__PURE__ */ b("span", {
23
27
  role: "status",
24
28
  "aria-live": "polite",
25
29
  className: "sr-only",
26
- id: p,
27
- children: m
30
+ id: m,
31
+ children: h
28
32
  }),
29
- /* @__PURE__ */ y("div", {
30
- className: i("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", M.headerBorder),
31
- children: [/* @__PURE__ */ y("div", {
33
+ /* @__PURE__ */ x("div", {
34
+ className: i("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", P.headerBorder),
35
+ children: [/* @__PURE__ */ x("div", {
32
36
  className: "flex min-w-0 flex-1 items-center gap-2",
33
- children: [/* @__PURE__ */ v(te, {
34
- icon: /* @__PURE__ */ v(b, {
37
+ children: [/* @__PURE__ */ b(p, {
38
+ icon: /* @__PURE__ */ b(S, {
35
39
  size: c.LG,
36
40
  stroke: l,
37
41
  "aria-hidden": !0,
@@ -39,91 +43,91 @@ var M = {
39
43
  }),
40
44
  "aria-label": r,
41
45
  onClick: t
42
- }), /* @__PURE__ */ v("h1", {
46
+ }), /* @__PURE__ */ b("h1", {
43
47
  className: "dial-h2-text min-w-0 truncate",
44
48
  children: e
45
49
  })]
46
- }), a != null && /* @__PURE__ */ v("div", {
50
+ }), a != null && /* @__PURE__ */ b("div", {
47
51
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
48
52
  children: a
49
53
  })]
50
54
  }),
51
- /* @__PURE__ */ y("div", {
55
+ /* @__PURE__ */ x("div", {
52
56
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
53
- children: [/* @__PURE__ */ v("div", {
54
- className: i(s == null ? "desktop:flex-1" : "desktop:w-[360px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", s == null ? void 0 : M.sidebarBorder),
57
+ children: [/* @__PURE__ */ b("div", {
58
+ className: i(s == null ? "desktop:flex-1" : "desktop:w-[360px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", s == null ? void 0 : P.sidebarBorder),
55
59
  children: o
56
- }), s != null && /* @__PURE__ */ v("div", {
60
+ }), s != null && /* @__PURE__ */ b("div", {
57
61
  className: "desktop:flex-1 desktop:overflow-y-auto",
58
62
  children: s
59
63
  })]
60
64
  }),
61
- a != null && /* @__PURE__ */ v("div", {
62
- className: i("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", M.footerBorder),
65
+ a != null && /* @__PURE__ */ b("div", {
66
+ className: i("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", P.footerBorder),
63
67
  children: a
64
68
  })
65
69
  ]
66
70
  });
67
- }, P = (e) => !!e.dataTransfer?.types.includes("Files"), le = (e) => {
68
- let [t, n] = k(!1), r = O(0);
71
+ }, le = { root: "dial-skill-editor-root" }, F = (e) => !!e.dataTransfer?.types.includes("Files"), ue = (e) => {
72
+ let [t, n] = j(!1), r = A(0);
69
73
  return {
70
74
  isDragActive: t,
71
75
  dropZoneHandlers: {
72
- onDragEnter: w((e) => {
73
- P(e) && (e.preventDefault(), r.current += 1, n(!0));
76
+ onDragEnter: E((e) => {
77
+ F(e) && (e.preventDefault(), r.current += 1, n(!0));
74
78
  }, []),
75
- onDragLeave: w((e) => {
76
- P(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
79
+ onDragLeave: E((e) => {
80
+ F(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
77
81
  }, []),
78
- onDragOver: w((e) => {
79
- P(e) && e.preventDefault();
82
+ onDragOver: E((e) => {
83
+ F(e) && e.preventDefault();
80
84
  }, []),
81
- onDrop: w((t) => {
82
- if (!P(t)) return;
85
+ onDrop: E((t) => {
86
+ if (!F(t)) return;
83
87
  t.preventDefault(), r.current = 0, n(!1);
84
88
  let i = Array.from(t.dataTransfer?.files ?? []);
85
89
  i.length > 0 && e(i);
86
90
  }, [e])
87
91
  }
88
92
  };
89
- }, F = "SKILL.md", I = /* @__PURE__ */ function(e) {
93
+ }, I = "SKILL.md", L = /* @__PURE__ */ function(e) {
90
94
  return e.File = "file", e.Folder = "folder", e;
91
- }({}), L = (e) => {
95
+ }({}), R = (e) => {
92
96
  let t = e.lastIndexOf("/");
93
97
  return t === -1 ? null : e.slice(0, t);
94
- }, R = (e) => {
98
+ }, de = (e) => {
95
99
  let t = e.lastIndexOf("/");
96
100
  return t === -1 ? e : e.slice(t + 1);
97
- }, ue = (e) => {
101
+ }, fe = (e) => {
98
102
  let t = /* @__PURE__ */ new Map(), n = (e) => {
99
103
  let n = t.get(e);
100
104
  if (n) return n;
101
105
  let r = {
102
106
  path: e,
103
- name: R(e),
104
- nodeType: A.FOLDER,
105
- parentPath: L(e),
107
+ name: de(e),
108
+ nodeType: M.FOLDER,
109
+ parentPath: R(e),
106
110
  folderId: e,
107
111
  items: []
108
112
  };
109
113
  return t.set(e, r), r;
110
114
  };
111
115
  for (let r of e) {
112
- if (r.kind === I.Folder) {
116
+ if (r.kind === L.Folder) {
113
117
  n(r.path);
114
118
  continue;
115
119
  }
116
120
  t.set(r.path, {
117
121
  path: r.path,
118
122
  name: r.name,
119
- nodeType: A.ITEM,
120
- parentPath: L(r.path),
121
- folderId: L(r.path) ?? ""
123
+ nodeType: M.ITEM,
124
+ parentPath: R(r.path),
125
+ folderId: R(r.path) ?? ""
122
126
  });
123
127
  }
124
128
  for (let t of [...e]) {
125
- let e = L(t.path);
126
- for (; e != null;) n(e), e = L(e);
129
+ let e = R(t.path);
130
+ for (; e != null;) n(e), e = R(e);
127
131
  }
128
132
  let r = [];
129
133
  for (let e of t.values()) {
@@ -135,462 +139,462 @@ var M = {
135
139
  n ? n.items = [...n.items ?? [], e] : r.push(e);
136
140
  }
137
141
  return r;
138
- }, de = ({ isVisible: e, labels: t }) => {
142
+ }, pe = ({ isVisible: e, labels: t }) => {
139
143
  if (!e) return null;
140
144
  let n = t ?? {};
141
- return /* @__PURE__ */ v("div", {
145
+ return /* @__PURE__ */ b("div", {
142
146
  role: "status",
143
147
  "aria-live": "polite",
144
148
  className: i("pointer-events-none absolute inset-0 z-[100] flex items-center justify-center backdrop-blur-sm"),
145
- children: /* @__PURE__ */ y("div", {
149
+ children: /* @__PURE__ */ x("div", {
146
150
  className: "flex flex-col items-center text-center",
147
151
  children: [
148
- /* @__PURE__ */ v(x, {
152
+ /* @__PURE__ */ b(C, {
149
153
  size: 100,
150
154
  className: "text-accent-primary",
151
155
  "aria-hidden": !0,
152
156
  stroke: l
153
157
  }),
154
- /* @__PURE__ */ v("span", {
158
+ /* @__PURE__ */ b("span", {
155
159
  className: "dial-h3-text mt-5",
156
160
  children: n.dropOverlayTitle ?? "Upload files"
157
161
  }),
158
- /* @__PURE__ */ v("span", {
162
+ /* @__PURE__ */ b("span", {
159
163
  className: "dial-small-text mt-4",
160
164
  children: n.dropOverlaySubtitle ?? "Drop files here to add them to this skill"
161
165
  })
162
166
  ]
163
167
  })
164
168
  });
165
- }, fe = /* @__PURE__ */ function(e) {
169
+ }, z = /* @__PURE__ */ function(e) {
166
170
  return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
167
- }({}), z = /* @__PURE__ */ function(e) {
171
+ }({}), B = /* @__PURE__ */ function(e) {
168
172
  return e.Valid = "valid", e.Invalid = "invalid", e;
169
- }({}), B = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), V = 0, H = () => `skill-file-candidate-${++V}`, pe = ({ isOpen: e, onClose: t, fileActions: n, initialFiles: i, labels: a }) => {
170
- let o = a ?? {}, [s, c] = k([]), [u, p] = k(/* @__PURE__ */ new Map()), [m, g] = k([]), [b, oe] = k(!1), [x, S] = k(), [C, w] = k(!1), D = E(), O = (e) => {
173
+ }({}), V = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), H = 0, U = () => `skill-file-candidate-${++H}`, me = ({ isOpen: e, onClose: t, fileActions: n, initialFiles: i, labels: a }) => {
174
+ let o = a ?? {}, [s, c] = j([]), [u, m] = j(/* @__PURE__ */ new Map()), [h, v] = j([]), [S, ie] = j(!1), [C, w] = j(), [T, E] = j(!1), k = O(), A = (e) => {
171
175
  let t = e.map((e) => ({
172
- id: H(),
176
+ id: U(),
173
177
  file: e,
174
- path: B(e)
178
+ path: V(e)
175
179
  }));
176
- S(void 0), c((e) => [...e, ...t]);
177
- }, A = (e) => {
180
+ w(void 0), c((e) => [...e, ...t]);
181
+ }, M = (e) => {
178
182
  c((t) => t.filter((t) => t.id !== e));
179
183
  };
180
- T(() => {
184
+ D(() => {
181
185
  e && (c((i ?? []).map((e) => ({
182
- id: H(),
186
+ id: U(),
183
187
  file: e,
184
- path: B(e)
185
- }))), p(/* @__PURE__ */ new Map()), g([]), S(void 0));
186
- }, [e]), T(() => {
188
+ path: V(e)
189
+ }))), m(/* @__PURE__ */ new Map()), v([]), w(void 0));
190
+ }, [e]), D(() => {
187
191
  if (!e) return;
188
192
  let t = !1;
189
193
  if (s.length === 0) {
190
- p(/* @__PURE__ */ new Map()), g([]);
194
+ m(/* @__PURE__ */ new Map()), v([]);
191
195
  return;
192
196
  }
193
- return oe(!0), n.validateBatch(s).then(({ results: e, batchErrors: n }) => {
194
- t || (p(new Map(e.map((e) => [e.candidateId, e]))), g(n.map((e) => e.message)));
197
+ return ie(!0), n.validateBatch(s).then(({ results: e, batchErrors: n }) => {
198
+ t || (m(new Map(e.map((e) => [e.candidateId, e]))), v(n.map((e) => e.message)));
195
199
  }).finally(() => {
196
- t || oe(!1);
200
+ t || ie(!1);
197
201
  }), () => {
198
202
  t = !0;
199
203
  };
200
204
  }, [s, e]);
201
- let ce = s.some((e) => u.get(e.id)?.status === z.Invalid), j = s.length > 0 && s.every((e) => u.get(e.id)?.status === z.Invalid), M = s.length > 0 && !ce && m.length === 0 && !b && !C, N = async () => {
202
- w(!0), S(void 0);
205
+ let oe = s.some((e) => u.get(e.id)?.status === B.Invalid), N = s.length > 0 && s.every((e) => u.get(e.id)?.status === B.Invalid), se = s.length > 0 && !oe && h.length === 0 && !S && !T, P = async () => {
206
+ E(!0), w(void 0);
203
207
  try {
204
208
  let { results: e, batchErrors: r } = await n.validateBatch(s), i = new Map(e.map((e) => [e.candidateId, e]));
205
- if (p(i), g(r.map((e) => e.message)), s.some((e) => i.get(e.id)?.status === z.Invalid) || r.length > 0) return;
209
+ if (m(i), v(r.map((e) => e.message)), s.some((e) => i.get(e.id)?.status === B.Invalid) || r.length > 0) return;
206
210
  let a = await n.commitBatch(s);
207
211
  if (a.error) {
208
- S(a.error);
212
+ w(a.error);
209
213
  return;
210
214
  }
211
215
  t();
212
216
  } finally {
213
- w(!1);
217
+ E(!1);
214
218
  }
215
219
  };
216
- return /* @__PURE__ */ v(ne, {
220
+ return /* @__PURE__ */ b(g, {
217
221
  open: e,
218
222
  header: o.uploadDialogTitle ?? "Upload files from device",
219
- size: re.Sm,
223
+ size: te.Sm,
220
224
  closeAriaLabel: o.uploadDialogCloseAriaLabel ?? "Close",
221
225
  onClose: t,
222
- footer: /* @__PURE__ */ y("div", {
226
+ footer: /* @__PURE__ */ x("div", {
223
227
  className: "flex min-h-[44px] items-center justify-end gap-2 px-6 py-4",
224
- children: [/* @__PURE__ */ v(ee, {
228
+ children: [/* @__PURE__ */ b(ee, {
225
229
  label: o.uploadCancelLabel ?? "Cancel",
226
230
  onClick: t
227
- }), /* @__PURE__ */ v(ie, {
231
+ }), /* @__PURE__ */ b(ne, {
228
232
  label: o.uploadConfirmLabel ?? "Add",
229
- iconBefore: C ? /* @__PURE__ */ v(h, {
233
+ iconBefore: T ? /* @__PURE__ */ b(_, {
230
234
  size: 16,
231
235
  ariaLabel: ""
232
236
  }) : void 0,
233
- onClick: () => void N(),
234
- disabled: !M
237
+ onClick: () => void P(),
238
+ disabled: !se
235
239
  })]
236
240
  }),
237
- children: /* @__PURE__ */ y("div", {
241
+ children: /* @__PURE__ */ x("div", {
238
242
  className: "flex flex-col gap-4 px-6 py-4",
239
243
  children: [
240
- /* @__PURE__ */ v(f, {
241
- label: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
244
+ /* @__PURE__ */ b(f, {
245
+ label: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
242
246
  className: "desktop:hidden",
243
247
  children: o.uploadDropZoneMobileLabel ?? "Click here to upload"
244
- }), /* @__PURE__ */ v("span", {
248
+ }), /* @__PURE__ */ b("span", {
245
249
  className: "hidden desktop:inline",
246
250
  children: o.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
247
251
  })] }),
248
252
  ariaLabel: o.uploadDropZoneAriaLabel ?? "Upload files",
249
253
  multiple: !0,
250
- className: j ? "border-error hover:border-error" : void 0,
251
- onChange: O
254
+ className: N ? "border-error hover:border-error" : void 0,
255
+ onChange: A
252
256
  }),
253
- /* @__PURE__ */ v("span", {
257
+ /* @__PURE__ */ b("span", {
254
258
  role: "status",
255
259
  "aria-live": "polite",
256
260
  className: "sr-only",
257
- id: D,
258
- children: m.map((e) => `${o.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
261
+ id: k,
262
+ children: h.map((e) => `${o.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
259
263
  }),
260
- m.map((e) => /* @__PURE__ */ v(d, { text: e }, e)),
261
- s.length > 0 && /* @__PURE__ */ v("ul", {
264
+ h.map((e) => /* @__PURE__ */ b(d, { text: e }, e)),
265
+ s.length > 0 && /* @__PURE__ */ b("ul", {
262
266
  className: "flex flex-col gap-2",
263
267
  children: s.map((e) => {
264
- let t = u.get(e.id), n = t?.kind === fe.Manifest, i = t?.status === z.Invalid;
265
- return /* @__PURE__ */ y("li", {
268
+ let t = u.get(e.id), n = t?.kind === z.Manifest, i = t?.status === B.Invalid;
269
+ return /* @__PURE__ */ x("li", {
266
270
  className: "flex items-center gap-2 rounded-lg border border-tertiary p-2",
267
271
  children: [
268
- /* @__PURE__ */ v(ae, {
272
+ /* @__PURE__ */ b(re, {
269
273
  size: 20,
270
274
  "aria-hidden": !0,
271
275
  stroke: l
272
276
  }),
273
- /* @__PURE__ */ y("div", {
277
+ /* @__PURE__ */ x("div", {
274
278
  className: "flex min-w-0 flex-1 flex-col",
275
279
  children: [
276
- /* @__PURE__ */ v("span", {
280
+ /* @__PURE__ */ b("span", {
277
281
  className: "dial-small-text truncate",
278
282
  children: e.path
279
283
  }),
280
- /* @__PURE__ */ v("span", {
284
+ /* @__PURE__ */ b("span", {
281
285
  className: "dial-tiny-text text-secondary",
282
286
  children: r(e.file.size)
283
287
  }),
284
- i && t?.error && /* @__PURE__ */ v(d, { text: t.error }),
285
- n && !i && /* @__PURE__ */ v("span", {
288
+ i && t?.error && /* @__PURE__ */ b(d, { text: t.error }),
289
+ n && !i && /* @__PURE__ */ b("span", {
286
290
  className: "dial-tiny-text text-secondary",
287
291
  children: o.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
288
292
  })
289
293
  ]
290
294
  }),
291
- /* @__PURE__ */ v(te, {
292
- icon: /* @__PURE__ */ v(se, {
295
+ /* @__PURE__ */ b(p, {
296
+ icon: /* @__PURE__ */ b(ae, {
293
297
  size: 16,
294
298
  "aria-hidden": !0,
295
299
  stroke: l
296
300
  }),
297
301
  "aria-label": o.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
298
- onClick: () => A(e.id)
302
+ onClick: () => M(e.id)
299
303
  })
300
304
  ]
301
305
  }, e.id);
302
306
  })
303
307
  }),
304
- x && /* @__PURE__ */ v(d, { text: x })
308
+ C && /* @__PURE__ */ b(d, { text: C })
305
309
  ]
306
310
  })
307
311
  });
308
- }, U = {
312
+ }, he = {
309
313
  title: "_title_65glc_1",
310
314
  helperText: "_helperText_65glc_5"
311
- }, me = C(async () => {
312
- let { MarkdownEditor: e } = await j();
315
+ }, ge = T(async () => {
316
+ let { MarkdownEditor: e } = await N();
313
317
  return { default: e };
314
- }), W = ({ initialValues: r, files: f, selectedPath: te, onSelectedPathChange: ne, expandedPaths: re, onExpandedPathsChange: b, isLoading: ae = !1, hasLoadError: x = !1, isSubmitting: C = !1, errors: E, submitError: A, conflict: j, onReloadLatest: M, isNameReadOnly: P = !1, onDirtyChange: L, fileActions: R, supportingFileContent: fe, onSubmit: z, onCancel: B, onBack: V, backAriaLabel: H, title: W, onRetry: he, labels: ge, styles: _e, dir: ve, instructionsEditorTheme: ye = u.light }) => {
315
- let [G, K] = k({
318
+ }), _e = ({ initialValues: r, files: f, selectedPath: p, onSelectedPathChange: g, expandedPaths: te, onExpandedPathsChange: S, isLoading: re = !1, hasLoadError: C = !1, isSubmitting: T = !1, errors: O, submitError: M, conflict: N, onReloadLatest: se, isNameReadOnly: P = !1, onDirtyChange: F, fileActions: R, supportingFileContent: de, onSubmit: z, onCancel: B, onBack: V, backAriaLabel: H, title: U, onRetry: _e, labels: ve, styles: ye, dir: be, instructionsEditorTheme: xe = u.light }) => {
319
+ let [W, G] = j({
316
320
  name: r?.name ?? "",
317
321
  description: r?.description ?? "",
318
322
  instructions: r?.instructions ?? ""
319
- }), be = a(), xe = O(r), Se = xe.current !== r, Ce = O(f);
320
- T(() => {
321
- xe.current = r, K({
323
+ }), Se = a(), Ce = A(r), we = Ce.current !== r, Te = A(f);
324
+ D(() => {
325
+ Ce.current = r, G({
322
326
  name: r?.name ?? "",
323
327
  description: r?.description ?? "",
324
328
  instructions: r?.instructions ?? ""
325
- }), Ce.current = f;
329
+ }), Te.current = f;
326
330
  }, [r]);
327
- let we = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), Te = O(!1);
328
- T(() => {
329
- if (Se) return;
331
+ let Ee = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), De = A(!1);
332
+ D(() => {
333
+ if (we) return;
330
334
  let e = {
331
335
  name: r?.name ?? "",
332
336
  description: r?.description ?? "",
333
337
  instructions: r?.instructions ?? ""
334
- }, t = JSON.stringify(G) !== JSON.stringify(e) || we(f) !== we(Ce.current);
335
- t !== Te.current && (Te.current = t, L?.(t));
338
+ }, t = JSON.stringify(W) !== JSON.stringify(e) || Ee(f) !== Ee(Te.current);
339
+ t !== De.current && (De.current = t, F?.(t));
336
340
  }, [
337
- G,
341
+ W,
338
342
  f,
339
343
  r,
340
- Se,
341
- L
344
+ we,
345
+ F
342
346
  ]);
343
- let [Ee, De] = k(F), q = te ?? Ee, J = w((e) => {
344
- De(e), ne?.(e);
345
- }, [ne]), [Oe, ke] = k([]), Ae = re ?? Oe, je = D(() => new Set(Ae), [Ae]), Me = w((e) => {
347
+ let [Oe, ke] = j(I), K = p ?? Oe, q = E((e) => {
348
+ ke(e), g?.(e);
349
+ }, [g]), [Ae, je] = j([]), Me = te ?? Ae, Ne = k(() => new Set(Me), [Me]), Pe = E((e) => {
346
350
  let t = [...e];
347
- ke(t), b?.(t);
348
- }, [b]), [Y, Ne] = k(!1), [Pe, Fe] = k(), [Ie, Le] = k(!1), { isDragActive: Re, dropZoneHandlers: ze } = le(w((e) => {
349
- Y || (Fe(e), Ne(!0));
350
- }, [Y])), X = ge ?? {}, Z = _e?.colors, Q = _e?.typography ?? {}, Be = Q.titleClassName ?? "dial-body-semi-text", Ve = Q.helperTextClassName ?? "dial-tiny-semi-text", He = Q.removeIconClassName ?? "text-secondary", Ue = n({
351
- "--se-title-color": Z?.title,
352
- "--se-helper-text-color": Z?.helperText
353
- }), We = Z?.border ? { colors: {
354
- headerBorderColor: Z.border,
355
- sidebarBorderColor: Z.border
356
- } } : void 0, Ge = D(() => ue([{
357
- path: F,
358
- name: F,
359
- kind: I.File
360
- }, ...f]), [f]), $ = D(() => f.find((e) => e.path === q), [f, q]), Ke = w((e) => {
361
- J(e.path);
362
- }, [J]), qe = w((e) => {
363
- R.onRemoveNode(e), q === e && J(F);
351
+ je(t), S?.(t);
352
+ }, [S]), [J, Fe] = j(!1), [Ie, Le] = j(), [Re, ze] = j(!1), { isDragActive: Be, dropZoneHandlers: Ve } = ue(E((e) => {
353
+ J || (Le(e), Fe(!0));
354
+ }, [J])), Y = ve ?? {}, X = ye?.colors, He = ye?.typography ?? {}, Ue = He.titleClassName ?? "dial-body-semi-text", We = He.helperTextClassName ?? "dial-tiny-semi-text", Ge = He.removeIconClassName ?? "text-secondary", Ke = n({
355
+ "--se-title-color": X?.title,
356
+ "--se-helper-text-color": X?.helperText
357
+ }), Z = X?.border ? { colors: {
358
+ headerBorderColor: X.border,
359
+ sidebarBorderColor: X.border
360
+ } } : void 0, qe = k(() => fe([{
361
+ path: I,
362
+ name: I,
363
+ kind: L.File
364
+ }, ...f]), [f]), Q = k(() => f.find((e) => e.path === K), [f, K]), Je = E((e) => {
365
+ q(e.path);
366
+ }, [q]), Ye = E((e) => {
367
+ R.onRemoveNode(e), K === e && q(I);
364
368
  }, [
365
369
  R,
366
- q,
367
- J
368
- ]), Je = w((e) => e.path === "SKILL.md" ? [] : [{
370
+ K,
371
+ q
372
+ ]), Xe = E((e) => e.path === "SKILL.md" ? [] : [{
369
373
  key: "remove",
370
- label: X.removeLabel ?? "Remove",
371
- icon: /* @__PURE__ */ v(se, {
374
+ label: Y.removeLabel ?? "Remove",
375
+ icon: /* @__PURE__ */ b(ae, {
372
376
  size: c.SM,
373
- className: He,
377
+ className: Ge,
374
378
  "aria-hidden": !0,
375
379
  stroke: l
376
380
  }),
377
- onClick: () => qe(e.path)
381
+ onClick: () => Ye(e.path)
378
382
  }], [
379
- X.removeLabel,
380
- He,
381
- qe
382
- ]), Ye = /* @__PURE__ */ y("div", {
383
+ Y.removeLabel,
384
+ Ge,
385
+ Ye
386
+ ]), Ze = /* @__PURE__ */ x("div", {
383
387
  className: "flex flex-col gap-2 desktop:gap-5",
384
- children: [/* @__PURE__ */ y("div", {
388
+ children: [/* @__PURE__ */ x("div", {
385
389
  className: "flex items-center justify-between",
386
- children: [/* @__PURE__ */ v("span", {
387
- className: i(U.title, Be),
388
- children: X.filesHeading ?? "Files"
389
- }), /* @__PURE__ */ v(m, {
390
- label: X.addUploadLabel ?? "Upload from device",
391
- iconBefore: /* @__PURE__ */ v(oe, {
390
+ children: [/* @__PURE__ */ b("span", {
391
+ className: i(he.title, Ue),
392
+ children: Y.filesHeading ?? "Files"
393
+ }), /* @__PURE__ */ b(h, {
394
+ label: Y.addUploadLabel ?? "Upload from device",
395
+ iconBefore: /* @__PURE__ */ b(ie, {
392
396
  size: 16,
393
397
  "aria-hidden": !0,
394
398
  stroke: l
395
399
  }),
396
400
  onClick: () => {
397
- Fe(void 0), Ne(!0);
401
+ Le(void 0), Fe(!0);
398
402
  }
399
403
  })]
400
- }), /* @__PURE__ */ v("div", {
404
+ }), /* @__PURE__ */ b("div", {
401
405
  role: "tree",
402
- "aria-label": X.filesTreeAriaLabel ?? "Skill files",
403
- children: /* @__PURE__ */ v(ce, {
404
- items: Ge,
406
+ "aria-label": Y.filesTreeAriaLabel ?? "Skill files",
407
+ children: /* @__PURE__ */ b(oe, {
408
+ items: qe,
405
409
  showFiles: !0,
406
- selectedPath: q,
407
- expandedPaths: je,
408
- onExpandedPathsChange: Me,
409
- onItemClick: Ke,
410
- getContextMenuItems: Je,
410
+ selectedPath: K,
411
+ expandedPaths: Ne,
412
+ onExpandedPathsChange: Pe,
413
+ onItemClick: Je,
414
+ getContextMenuItems: Xe,
411
415
  rootItemPath: ""
412
416
  })
413
417
  })]
414
- }), Xe = /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(m, {
415
- label: X.cancelLabel ?? "Cancel",
418
+ }), $ = /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(h, {
419
+ label: Y.cancelLabel ?? "Cancel",
416
420
  onClick: B,
417
- disabled: C
418
- }), /* @__PURE__ */ v(ie, {
419
- label: X.createLabel ?? "Create",
420
- iconBefore: C ? /* @__PURE__ */ v(h, {
421
+ disabled: T
422
+ }), /* @__PURE__ */ b(ne, {
423
+ label: Y.createLabel ?? "Create",
424
+ iconBefore: T ? /* @__PURE__ */ b(_, {
421
425
  size: 16,
422
426
  ariaLabel: ""
423
427
  }) : void 0,
424
- onClick: () => z(G),
425
- disabled: C
428
+ onClick: () => z(W),
429
+ disabled: T
426
430
  })] });
427
- return ae ? /* @__PURE__ */ v("div", {
428
- dir: ve,
431
+ return re ? /* @__PURE__ */ b("div", {
432
+ dir: be,
429
433
  className: "relative flex min-h-0 flex-1 flex-col",
430
- children: /* @__PURE__ */ v(N, {
431
- title: W,
434
+ children: /* @__PURE__ */ b(ce, {
435
+ title: U,
432
436
  onBack: V,
433
437
  backAriaLabel: H,
434
- actions: Xe,
438
+ actions: $,
435
439
  isSaving: !1,
436
- labels: { savingStatusLabel: X.savingStatusLabel },
437
- styles: We,
438
- leftContent: /* @__PURE__ */ v("div", {
440
+ labels: { savingStatusLabel: Y.savingStatusLabel },
441
+ styles: Z,
442
+ leftContent: /* @__PURE__ */ b("div", {
439
443
  role: "status",
440
- "aria-label": X.loadingAriaLabel ?? "Loading skill",
444
+ "aria-label": Y.loadingAriaLabel ?? "Loading skill",
441
445
  className: "flex flex-1 items-center justify-center p-8",
442
- children: /* @__PURE__ */ v(h, {})
446
+ children: /* @__PURE__ */ b(_, {})
443
447
  })
444
448
  })
445
- }) : x ? /* @__PURE__ */ v("div", {
446
- dir: ve,
449
+ }) : C ? /* @__PURE__ */ b("div", {
450
+ dir: be,
447
451
  className: "relative flex min-h-0 flex-1 flex-col",
448
- children: /* @__PURE__ */ v(N, {
449
- title: W,
452
+ children: /* @__PURE__ */ b(ce, {
453
+ title: U,
450
454
  onBack: V,
451
455
  backAriaLabel: H,
452
- actions: Xe,
456
+ actions: $,
453
457
  isSaving: !1,
454
- labels: { savingStatusLabel: X.savingStatusLabel },
455
- styles: We,
456
- leftContent: /* @__PURE__ */ y("div", {
458
+ labels: { savingStatusLabel: Y.savingStatusLabel },
459
+ styles: Z,
460
+ leftContent: /* @__PURE__ */ x("div", {
457
461
  role: "alert",
458
462
  className: "flex flex-col items-center gap-4 p-8",
459
- children: [/* @__PURE__ */ v(d, { text: X.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ v(ie, {
460
- label: X.retryLabel ?? "Retry",
461
- onClick: he
463
+ children: [/* @__PURE__ */ b(d, { text: Y.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ b(ne, {
464
+ label: Y.retryLabel ?? "Retry",
465
+ onClick: _e
462
466
  })]
463
467
  })
464
468
  })
465
- }) : /* @__PURE__ */ y("div", {
466
- dir: ve,
467
- className: "relative flex min-h-0 flex-1 flex-col",
468
- style: Ue,
469
- ...ze,
469
+ }) : /* @__PURE__ */ x("div", {
470
+ dir: be,
471
+ className: i("relative flex min-h-0 flex-1 flex-col", le.root),
472
+ style: Ke,
473
+ ...Ve,
470
474
  children: [
471
- /* @__PURE__ */ v(de, {
472
- isVisible: Re && !Y,
473
- labels: ge
475
+ /* @__PURE__ */ b(pe, {
476
+ isVisible: Be && !J,
477
+ labels: ve
474
478
  }),
475
- /* @__PURE__ */ v(N, {
476
- title: W,
479
+ /* @__PURE__ */ b(ce, {
480
+ title: U,
477
481
  onBack: V,
478
482
  backAriaLabel: H,
479
- actions: Xe,
480
- isSaving: C,
481
- labels: { savingStatusLabel: X.savingStatusLabel },
482
- styles: We,
483
- leftContent: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
483
+ actions: $,
484
+ isSaving: T,
485
+ labels: { savingStatusLabel: Y.savingStatusLabel },
486
+ styles: Z,
487
+ leftContent: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
484
488
  className: "px-4 py-4 desktop:hidden",
485
- children: /* @__PURE__ */ v(o, {
486
- title: X.editingFileLabel ?? "Editing file",
487
- description: $?.name ?? "SKILL.md",
488
- expanded: Ie,
489
- onToggle: Le,
490
- ariaLabel: X.editingFileLabel ?? "Editing file",
491
- children: Ye
489
+ children: /* @__PURE__ */ b(o, {
490
+ title: Y.editingFileLabel ?? "Editing file",
491
+ description: Q?.name ?? "SKILL.md",
492
+ expanded: Re,
493
+ onToggle: ze,
494
+ ariaLabel: Y.editingFileLabel ?? "Editing file",
495
+ children: Ze
492
496
  })
493
- }), /* @__PURE__ */ v("div", {
497
+ }), /* @__PURE__ */ b("div", {
494
498
  className: "hidden px-8 py-6 desktop:block",
495
- children: Ye
499
+ children: Ze
496
500
  })] }),
497
- rightContent: /* @__PURE__ */ y("div", {
501
+ rightContent: /* @__PURE__ */ x("div", {
498
502
  className: "flex flex-1 flex-col gap-4 px-4 py-6 desktop:gap-5 desktop:px-8",
499
503
  children: [
500
- A != null && /* @__PURE__ */ v("div", {
504
+ M != null && /* @__PURE__ */ b("div", {
501
505
  role: "alert",
502
- children: /* @__PURE__ */ v(d, { text: A })
506
+ children: /* @__PURE__ */ b(d, { text: M })
503
507
  }),
504
- j != null && /* @__PURE__ */ y("div", {
508
+ N != null && /* @__PURE__ */ x("div", {
505
509
  role: "alert",
506
510
  className: "flex items-center gap-2",
507
- children: [/* @__PURE__ */ v(d, { text: j.message }), /* @__PURE__ */ v(ee, {
508
- label: X.reloadLatestLabel ?? "Reload latest",
509
- onClick: M
511
+ children: [/* @__PURE__ */ b(d, { text: N.message }), /* @__PURE__ */ b(ee, {
512
+ label: Y.reloadLatestLabel ?? "Reload latest",
513
+ onClick: se
510
514
  })]
511
515
  }),
512
- /* @__PURE__ */ v("h2", {
513
- className: i(U.title, Be),
514
- children: q === "SKILL.md" ? F : X.selectedFileHeading?.($?.name ?? q) ?? $?.name ?? q
516
+ /* @__PURE__ */ b("h2", {
517
+ className: i(he.title, Ue),
518
+ children: K === "SKILL.md" ? I : Y.selectedFileHeading?.(Q?.name ?? K) ?? Q?.name ?? K
515
519
  }),
516
- q === "SKILL.md" ? /* @__PURE__ */ y(_, { children: [
517
- /* @__PURE__ */ v(p, {
520
+ K === "SKILL.md" ? /* @__PURE__ */ x(y, { children: [
521
+ /* @__PURE__ */ b(m, {
518
522
  labelProps: {
519
- label: X.nameLabel ?? "Name",
523
+ label: Y.nameLabel ?? "Name",
520
524
  required: !0
521
525
  },
522
- value: G.name,
523
- onChange: (e) => K((t) => ({
526
+ value: W.name,
527
+ onChange: (e) => G((t) => ({
524
528
  ...t,
525
529
  name: e ?? ""
526
530
  })),
527
- placeholder: X.namePlaceholder ?? "good-morning-breakfast",
528
- caption: E?.name ? void 0 : X.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
529
- error: E?.name,
530
- invalid: !!E?.name,
531
+ placeholder: Y.namePlaceholder ?? "good-morning-breakfast",
532
+ caption: O?.name ? void 0 : Y.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
533
+ error: O?.name,
534
+ invalid: !!O?.name,
531
535
  disabled: P
532
536
  }),
533
- /* @__PURE__ */ v(g, {
537
+ /* @__PURE__ */ b(v, {
534
538
  labelProps: {
535
- label: X.descriptionLabel ?? "Description",
539
+ label: Y.descriptionLabel ?? "Description",
536
540
  required: !0
537
541
  },
538
- value: G.description,
539
- placeholder: X.descriptionPlaceholder ?? "What this skill does and when to use it",
540
- onChange: (e) => K((t) => ({
542
+ value: W.description,
543
+ placeholder: Y.descriptionPlaceholder ?? "What this skill does and when to use it",
544
+ onChange: (e) => G((t) => ({
541
545
  ...t,
542
546
  description: e
543
547
  })),
544
- error: E?.description,
545
- invalid: !!E?.description
548
+ error: O?.description,
549
+ invalid: !!O?.description
546
550
  }),
547
- /* @__PURE__ */ y("div", {
551
+ /* @__PURE__ */ x("div", {
548
552
  className: "flex flex-1 flex-col gap-2",
549
553
  children: [
550
- /* @__PURE__ */ y("span", {
554
+ /* @__PURE__ */ x("span", {
551
555
  className: "flex items-center gap-0.5",
552
- children: [/* @__PURE__ */ v("span", {
553
- className: i(U.helperText, Ve),
554
- children: X.instructionsLabel ?? "Instructions"
555
- }), /* @__PURE__ */ v("span", {
556
+ children: [/* @__PURE__ */ b("span", {
557
+ className: i(he.helperText, We),
558
+ children: Y.instructionsLabel ?? "Instructions"
559
+ }), /* @__PURE__ */ b("span", {
556
560
  className: "dial-tiny-text text-error",
557
561
  children: "*"
558
562
  })]
559
563
  }),
560
- /* @__PURE__ */ v("div", {
561
- ref: be,
564
+ /* @__PURE__ */ b("div", {
565
+ ref: Se,
562
566
  className: i(e, t),
563
- children: /* @__PURE__ */ v(S, {
564
- fallback: /* @__PURE__ */ v(h, { ariaLabel: X.instructionsLoadingAriaLabel ?? "Loading" }),
565
- children: /* @__PURE__ */ v(me, {
566
- value: G.instructions,
567
- onChange: (e) => K((t) => ({
567
+ children: /* @__PURE__ */ b(w, {
568
+ fallback: /* @__PURE__ */ b(_, { ariaLabel: Y.instructionsLoadingAriaLabel ?? "Loading" }),
569
+ children: /* @__PURE__ */ b(ge, {
570
+ value: W.instructions,
571
+ onChange: (e) => G((t) => ({
568
572
  ...t,
569
573
  instructions: e
570
574
  })),
571
- theme: ye,
572
- placeholder: X.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
575
+ theme: xe,
576
+ placeholder: Y.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
573
577
  })
574
578
  })
575
579
  }),
576
- E?.instructions != null && /* @__PURE__ */ v(d, { text: E.instructions })
580
+ O?.instructions != null && /* @__PURE__ */ b(d, { text: O.instructions })
577
581
  ]
578
582
  })
579
- ] }) : $?.kind === I.File && (fe ?? /* @__PURE__ */ v(s, { text: X.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." }))
583
+ ] }) : Q?.kind === L.File && (de ?? /* @__PURE__ */ b(s, { text: Y.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." }))
580
584
  ]
581
585
  })
582
586
  }),
583
- /* @__PURE__ */ v(pe, {
584
- isOpen: Y,
587
+ /* @__PURE__ */ b(me, {
588
+ isOpen: J,
585
589
  onClose: () => {
586
- Ne(!1), Fe(void 0);
590
+ Fe(!1), Le(void 0);
587
591
  },
588
592
  fileActions: R,
589
- initialFiles: Pe,
590
- labels: ge
593
+ initialFiles: Ie,
594
+ labels: ve
591
595
  })
592
596
  ]
593
597
  });
594
598
  };
595
599
  //#endregion
596
- export { W as SkillEditor, fe as SkillFileCandidateKind, I as SkillFileNodeKind, z as SkillFileValidationStatus };
600
+ export { le as SKILL_EDITOR_CLASS, _e as SkillEditor, z as SkillFileCandidateKind, L as SkillFileNodeKind, B as SkillFileValidationStatus };
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-dev.48",
4
+ "version": "1.2.0-dev.58",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,11 +20,11 @@
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-dev.48"
23
+ "@epam/ai-dial-builder-form": "1.2.0-dev.58"
24
24
  },
25
25
  "peerDependencies": {
26
- "@epam/ai-dial-chat-shared": "1.2.0-dev.48",
27
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.7",
26
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.58",
27
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.9",
28
28
  "@epam/ai-dial-react-file-manager": "^0.3.0-dev.2",
29
29
  "react": "^19.2.8"
30
30
  },