@epam/ai-dial-skill-editor 1.2.0-dev.325 → 1.2.0-dev.327

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/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, TAG_INPUT_TAG_CLASS_NAME as i, TextRefinementField as a, buildCssVars as o, formatFileSize as s, mergeClasses as c, useAvailableHeightCap as l, useTextRefinement as u } from "@epam/ai-dial-chat-shared";
2
- import { Accordion as d, ButtonAppearance as f, ButtonDropdown as p, ButtonVariant as m, CaptionText as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, DangerIconButton as v, EditorThemes as y, ElementSize as b, ErrorText as x, FileDropzone as S, GhostButton as C, GhostIconButton as w, Input as T, Label as E, LinkButton as D, NeutralButton as O, Popup as k, PopupSize as ee, PrimaryButton as A, Select as te, Spinner as j, TagInput as M, Textarea as N, TextareaResize as P } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
4
- import { IconArrowNarrowLeft as R, IconDatabase as ne, IconFileText as re, IconFileZip as ie, IconFolderPlus as ae, IconPhoto as oe, IconPlus as se, IconTrashX as ce, IconUpload as le } from "@tabler/icons-react";
5
- import { Suspense as ue, lazy as z, memo as de, useCallback as B, useEffect as fe, useId as pe, useMemo as V, useRef as H, useState as U } from "react";
6
- import { DialFileNodeType as me, DialFoldersTree as he } from "@epam/ai-dial-react-file-manager";
7
- import { LazyMarkdownEditor as ge } from "@epam/ai-dial-ui-kit/editors";
2
+ import { Accordion as d, ButtonAppearance as f, ButtonDropdown as p, ButtonVariant as m, CaptionText as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, DangerIconButton as v, EditorThemes as y, ElementSize as b, ErrorText as x, FileDropzone as S, GhostButton as C, GhostIconButton as w, Input as T, Label as E, LinkButton as D, NeutralButton as O, Popup as k, PopupSize as ee, PrimaryButton as A, Select as te, Spinner as ne, TagInput as j, Textarea as M, TextareaResize as N } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
4
+ import { IconArrowNarrowLeft as L, IconDatabase as re, IconFileText as ie, IconFileZip as ae, IconFolderPlus as oe, IconPhoto as se, IconPlus as ce, IconTrashX as le, IconUpload as ue } from "@tabler/icons-react";
5
+ import { Suspense as de, lazy as R, memo as fe, useCallback as z, useEffect as pe, useId as me, useMemo as B, useRef as V, useState as H } from "react";
6
+ import { DialFileNodeType as he, DialFoldersTree as ge } from "@epam/ai-dial-react-file-manager";
7
+ import { LazyMarkdownEditor as _e } from "@epam/ai-dial-ui-kit/editors";
8
8
  c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
9
9
  body: "_body_1xd7h_2",
10
10
  sideColumn: "_sideColumn_1xd7h_6",
@@ -12,54 +12,55 @@ c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
12
12
  }.sideColumn);
13
13
  //#endregion
14
14
  //#region ../builder-form/src/constants/public-class-names.ts
15
- var _e = {
15
+ var ve = {
16
16
  layout: "dial-builder-form-layout",
17
17
  section: "dial-builder-form-section",
18
18
  metadataSection: "dial-builder-form-metadata-section",
19
- setupSection: "dial-builder-form-setup-section"
20
- }, ve = {
19
+ setupSection: "dial-builder-form-setup-section",
20
+ asideSection: "dial-builder-form-aside-section"
21
+ }, ye = {
21
22
  section: "_section_l1mnx_1",
22
23
  title: "_title_l1mnx_5"
23
- }, ye = ({ title: e, children: t, styles: n, className: r }) => {
24
+ }, be = ({ title: e, children: t, styles: n, className: r }) => {
24
25
  let i = o({
25
26
  "--es-border-color": n?.colors?.borderColor,
26
27
  "--es-title-color": n?.colors?.titleColor
27
28
  });
28
- return /* @__PURE__ */ L("section", {
29
- className: c("flex h-full flex-col gap-4 rounded border p-6", ve.section, r, _e.section),
29
+ return /* @__PURE__ */ I("section", {
30
+ className: c("flex h-full flex-col gap-4 rounded border p-6", ye.section, r, ve.section),
30
31
  style: i,
31
- children: [e != null && /* @__PURE__ */ I("h2", {
32
- className: c("dial-h3-text", ve.title),
32
+ children: [e != null && /* @__PURE__ */ F("h2", {
33
+ className: c("dial-h3-text", ye.title),
33
34
  children: e
34
35
  }), t]
35
36
  });
36
- }, be = {
37
- headerBorder: "_headerBorder_1kidu_1",
38
- footerBorder: "_footerBorder_1kidu_5",
39
- sidebarBorder: "_sidebarBorder_1kidu_9"
40
- }, xe = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, rightContent: a, isSaving: s = !1, labels: l, styles: u, dir: d }) => {
41
- let f = pe(), p = s ? l?.savingStatusLabel ?? "Saving" : "", m = o({
42
- "--el-header-border-color": u?.colors?.headerBorderColor,
43
- "--el-sidebar-border-color": u?.colors?.sidebarBorderColor
37
+ }, xe = {
38
+ headerBorder: "_headerBorder_1adw2_1",
39
+ footerBorder: "_footerBorder_1adw2_5",
40
+ columnBorder: "_columnBorder_1adw2_10"
41
+ }, Se = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, centerContent: a, rightContent: s, isSaving: l = !1, labels: u, styles: d, dir: f }) => {
42
+ let p = me(), m = l ? u?.savingStatusLabel ?? "Saving" : "", h = o({
43
+ "--el-header-border-color": d?.colors?.headerBorderColor,
44
+ "--el-sidebar-border-color": d?.colors?.sidebarBorderColor
44
45
  });
45
- return /* @__PURE__ */ L("div", {
46
- dir: d,
47
- className: c("flex min-h-0 flex-1 flex-col", _e.layout),
48
- style: m,
46
+ return /* @__PURE__ */ I("div", {
47
+ dir: f,
48
+ className: c("flex min-h-0 flex-1 flex-col", ve.layout),
49
+ style: h,
49
50
  children: [
50
- /* @__PURE__ */ I("span", {
51
+ /* @__PURE__ */ F("span", {
51
52
  role: "status",
52
53
  "aria-live": "polite",
53
54
  className: "sr-only",
54
- id: f,
55
- children: p
55
+ id: p,
56
+ children: m
56
57
  }),
57
- /* @__PURE__ */ L("div", {
58
- className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", be.headerBorder),
59
- children: [/* @__PURE__ */ L("div", {
58
+ /* @__PURE__ */ I("div", {
59
+ className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", xe.headerBorder),
60
+ children: [/* @__PURE__ */ I("div", {
60
61
  className: "flex min-w-0 flex-1 items-center gap-2",
61
- children: [/* @__PURE__ */ I(w, {
62
- icon: /* @__PURE__ */ I(R, {
62
+ children: [/* @__PURE__ */ F(w, {
63
+ icon: /* @__PURE__ */ F(L, {
63
64
  size: g.LG,
64
65
  stroke: _,
65
66
  "aria-hidden": !0,
@@ -67,64 +68,71 @@ var _e = {
67
68
  }),
68
69
  "aria-label": n,
69
70
  onClick: t
70
- }), /* @__PURE__ */ I("h1", {
71
+ }), /* @__PURE__ */ F("h1", {
71
72
  className: "dial-h2-text min-w-0 truncate",
72
73
  children: e
73
74
  })]
74
- }), r != null && /* @__PURE__ */ I("div", {
75
+ }), r != null && /* @__PURE__ */ F("div", {
75
76
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
76
77
  children: r
77
78
  })]
78
79
  }),
79
- /* @__PURE__ */ L("div", {
80
+ /* @__PURE__ */ I("div", {
80
81
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
81
- children: [/* @__PURE__ */ I("div", {
82
- className: c(a == null ? "desktop:flex-1" : "desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", a == null ? void 0 : be.sidebarBorder),
83
- children: i
84
- }), a != null && /* @__PURE__ */ I("div", {
85
- className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
86
- children: a
87
- })]
82
+ children: [
83
+ /* @__PURE__ */ F("div", {
84
+ className: c(a == null ? "desktop:flex-1" : "desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", a == null ? void 0 : xe.columnBorder),
85
+ children: i
86
+ }),
87
+ a != null && /* @__PURE__ */ F("div", {
88
+ className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
89
+ children: a
90
+ }),
91
+ s != null && /* @__PURE__ */ F("div", {
92
+ className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", xe.columnBorder),
93
+ children: s
94
+ })
95
+ ]
88
96
  }),
89
- r != null && /* @__PURE__ */ I("div", {
90
- className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", be.footerBorder),
97
+ r != null && /* @__PURE__ */ F("div", {
98
+ className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", xe.footerBorder),
91
99
  children: r
92
100
  })
93
101
  ]
94
102
  });
95
- }, Se = {
103
+ }, Ce = {
96
104
  box: "_box_c9as8_1",
97
105
  icon: "_icon_c9as8_6",
98
106
  caption: "_caption_c9as8_10"
99
- }, Ce = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, styles: s, className: l }) => {
107
+ }, we = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, styles: s, className: l }) => {
100
108
  let u = o({
101
109
  "--aa-box-bg": s?.colors?.boxBackgroundColor,
102
110
  "--aa-box-border": s?.colors?.boxBorderColor,
103
111
  "--aa-icon": s?.colors?.placeholderIconColor,
104
112
  "--aa-caption": s?.colors?.captionColor
105
113
  });
106
- return /* @__PURE__ */ L("div", {
114
+ return /* @__PURE__ */ I("div", {
107
115
  className: c("flex flex-col gap-2", l),
108
116
  style: u,
109
- children: [/* @__PURE__ */ I(E, { label: e }), /* @__PURE__ */ L("div", {
117
+ children: [/* @__PURE__ */ F(E, { label: e }), /* @__PURE__ */ I("div", {
110
118
  className: "flex items-start gap-3",
111
- children: [/* @__PURE__ */ I("div", {
112
- className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Se.box),
113
- children: t ? /* @__PURE__ */ I("img", {
119
+ children: [/* @__PURE__ */ F("div", {
120
+ className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Ce.box),
121
+ children: t ? /* @__PURE__ */ F("img", {
114
122
  src: t,
115
123
  alt: n,
116
124
  className: "h-16 w-16 object-cover"
117
- }) : /* @__PURE__ */ I(oe, {
125
+ }) : /* @__PURE__ */ F(se, {
118
126
  size: g.LG,
119
127
  stroke: _,
120
128
  "aria-hidden": !0,
121
- className: Se.icon
129
+ className: Ce.icon
122
130
  })
123
- }), /* @__PURE__ */ L("div", {
131
+ }), /* @__PURE__ */ I("div", {
124
132
  className: "flex flex-col gap-3",
125
- children: [/* @__PURE__ */ I(C, {
133
+ children: [/* @__PURE__ */ F(C, {
126
134
  size: b.Small,
127
- iconBefore: /* @__PURE__ */ I(se, {
135
+ iconBefore: /* @__PURE__ */ F(ce, {
128
136
  size: g.SM,
129
137
  stroke: _,
130
138
  "aria-hidden": !0
@@ -132,22 +140,22 @@ var _e = {
132
140
  className: "w-fit",
133
141
  label: r,
134
142
  onClick: a
135
- }), /* @__PURE__ */ I("span", {
136
- className: c("dial-tiny-text", Se.caption),
143
+ }), /* @__PURE__ */ F("span", {
144
+ className: c("dial-tiny-text", Ce.caption),
137
145
  children: i
138
146
  })]
139
147
  })]
140
148
  })]
141
149
  });
142
- }, we = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
143
- let c = B((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = B((e) => /* @__PURE__ */ I("div", {
150
+ }, Te = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
151
+ let c = z((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = z((e) => /* @__PURE__ */ F("div", {
144
152
  className: "dial-small-text px-6 py-3",
145
- children: /* @__PURE__ */ I("p", {
153
+ children: /* @__PURE__ */ F("p", {
146
154
  className: "mb-3 text-secondary",
147
- children: e.length === 1 ? /* @__PURE__ */ L(F, { children: [
155
+ children: e.length === 1 ? /* @__PURE__ */ I(P, { children: [
148
156
  s.deleteConfirmSingleText,
149
157
  " ",
150
- /* @__PURE__ */ L("span", {
158
+ /* @__PURE__ */ I("span", {
151
159
  className: "break-words text-primary",
152
160
  children: [
153
161
  "\"",
@@ -155,10 +163,10 @@ var _e = {
155
163
  "\"?"
156
164
  ]
157
165
  })
158
- ] }) : /* @__PURE__ */ L(F, { children: [
166
+ ] }) : /* @__PURE__ */ I(P, { children: [
159
167
  s.deleteConfirmMultipleText,
160
168
  " ",
161
- /* @__PURE__ */ L("span", {
169
+ /* @__PURE__ */ I("span", {
162
170
  className: "text-primary",
163
171
  children: [
164
172
  e.length,
@@ -173,9 +181,9 @@ var _e = {
173
181
  s.deleteConfirmMultipleText,
174
182
  s.deleteConfirmItemsLabel
175
183
  ]);
176
- return /* @__PURE__ */ I(ue, {
184
+ return /* @__PURE__ */ F(de, {
177
185
  fallback: null,
178
- children: e && /* @__PURE__ */ I(i, {
186
+ children: e && /* @__PURE__ */ F(i, {
179
187
  isOpen: e,
180
188
  onClose: t,
181
189
  onAttach: n,
@@ -206,105 +214,105 @@ var _e = {
206
214
  deleteCancelLabel: s.deleteCancelLabel
207
215
  })
208
216
  });
209
- }, W = /* @__PURE__ */ function(e) {
217
+ }, U = /* @__PURE__ */ function(e) {
210
218
  return e.Avatar = "avatar", e.Name = "name", e.Version = "version", e.Description = "description", e.Locales = "locales", e.Tags = "tags", e;
211
- }({}), Te = [
219
+ }({}), Ee = [
212
220
  "avatar",
213
221
  "name",
214
222
  "version",
215
223
  "description",
216
224
  "locales",
217
225
  "tags"
218
- ], G = (e, t, n) => ({
226
+ ], De = (e, t, n) => ({
219
227
  id: e,
220
228
  language: n.find((e) => !t.has(e.code))?.code ?? "",
221
229
  name: "",
222
230
  description: ""
223
- }), Ee = ({ value: e, onChange: t, availableLocaleOptions: n = [], labels: i, className: a, summaryClassName: o = "dial-body-text text-secondary", rowLabelClassName: s = "dial-tiny-lead-text text-secondary" }) => {
224
- let { summaryLabel: l, addLabel: u, editLabel: d, popupTitle: p, addLocaleLabel: h, localeRowLabel: y = "Locale", languageLabel: x, nameLabel: S, namePlaceholder: C, descriptionLabel: w, descriptionPlaceholder: E, deleteAriaLabel: O, cancelLabel: ee = "Cancel", saveLabel: A = "Save" } = i, [j, M] = U(!1), [F, R] = U([]), ne = H(0);
225
- fe(() => {
226
- j && R(e.length > 0 ? e : [G(`locale-row-${++ne.current}`, /* @__PURE__ */ new Set(), n)]);
231
+ }), W = ({ value: e, onChange: t, availableLocaleOptions: n = [], labels: i, className: a, summaryClassName: o = "dial-body-text text-secondary", rowLabelClassName: s = "dial-tiny-lead-text text-secondary" }) => {
232
+ let { summaryLabel: l, addLabel: u, editLabel: d, popupTitle: p, addLocaleLabel: h, localeRowLabel: y = "Locale", languageLabel: x, nameLabel: S, namePlaceholder: C, descriptionLabel: w, descriptionPlaceholder: E, deleteAriaLabel: O, cancelLabel: ee = "Cancel", saveLabel: A = "Save" } = i, [ne, j] = H(!1), [P, L] = H([]), re = V(0);
233
+ pe(() => {
234
+ ne && L(e.length > 0 ? e : [De(`locale-row-${++re.current}`, /* @__PURE__ */ new Set(), n)]);
227
235
  }, [
228
- j,
236
+ ne,
229
237
  e,
230
238
  n
231
239
  ]);
232
- let re = () => M(!0), ie = () => M(!1), ae = () => {
233
- t(F.filter((e) => e.language && e.name)), M(!1);
234
- }, oe = () => {
235
- let e = new Set(F.map((e) => e.language).filter(Boolean));
236
- R((t) => [...t, G(`locale-row-${++ne.current}`, e, n)]);
237
- }, le = (e, t) => {
238
- R((n) => n.map((n) => n.id === e ? {
240
+ let ie = () => j(!0), ae = () => j(!1), oe = () => {
241
+ t(P.filter((e) => e.language && e.name)), j(!1);
242
+ }, se = () => {
243
+ let e = new Set(P.map((e) => e.language).filter(Boolean));
244
+ L((t) => [...t, De(`locale-row-${++re.current}`, e, n)]);
245
+ }, ue = (e, t) => {
246
+ L((n) => n.map((n) => n.id === e ? {
239
247
  ...n,
240
248
  ...t
241
249
  } : n));
242
- }, ue = (e) => {
243
- R((t) => t.filter((t) => t.id !== e));
244
- }, z = (e) => n.find((t) => t.code === e)?.label ?? e.toUpperCase(), de = F.some((e) => !e.language || !e.name);
245
- return n.length === 0 ? null : /* @__PURE__ */ L("div", {
250
+ }, de = (e) => {
251
+ L((t) => t.filter((t) => t.id !== e));
252
+ }, R = (e) => n.find((t) => t.code === e)?.label ?? e.toUpperCase(), fe = P.some((e) => !e.language || !e.name);
253
+ return n.length === 0 ? null : /* @__PURE__ */ I("div", {
246
254
  className: c("flex items-center gap-2", a),
247
255
  children: [
248
- e.length > 0 && /* @__PURE__ */ I("span", {
256
+ e.length > 0 && /* @__PURE__ */ F("span", {
249
257
  className: o,
250
- children: `${l}: ${e.map((e) => `[${z(e.language)}]`).join(", ")}`
258
+ children: `${l}: ${e.map((e) => `[${R(e.language)}]`).join(", ")}`
251
259
  }),
252
- /* @__PURE__ */ I(D, {
260
+ /* @__PURE__ */ F(D, {
253
261
  label: e.length > 0 ? d : u,
254
- iconBefore: /* @__PURE__ */ I(se, {
262
+ iconBefore: /* @__PURE__ */ F(ce, {
255
263
  size: g.SM,
256
264
  "aria-hidden": !0,
257
265
  stroke: _
258
266
  }),
259
267
  className: "!px-0",
260
- onClick: re
268
+ onClick: ie
261
269
  }),
262
- /* @__PURE__ */ I(k, {
263
- open: j,
270
+ /* @__PURE__ */ F(k, {
271
+ open: ne,
264
272
  header: p,
265
- onClose: ie,
273
+ onClose: ae,
266
274
  mainButtons: [{
267
275
  label: ee,
268
- onClick: ie
276
+ onClick: ae
269
277
  }, {
270
278
  label: A,
271
279
  variant: m.Primary,
272
- disabled: de,
273
- onClick: ae
280
+ disabled: fe,
281
+ onClick: oe
274
282
  }],
275
- children: /* @__PURE__ */ L("div", {
283
+ children: /* @__PURE__ */ I("div", {
276
284
  className: "flex flex-col gap-8 px-6 py-3",
277
- children: [F.map((e, t) => {
278
- let i = new Set(F.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
279
- return /* @__PURE__ */ L("div", {
285
+ children: [P.map((e, t) => {
286
+ let i = new Set(P.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
287
+ return /* @__PURE__ */ I("div", {
280
288
  className: "flex flex-col gap-2",
281
- children: [/* @__PURE__ */ L("div", {
289
+ children: [/* @__PURE__ */ I("div", {
282
290
  className: "flex items-center justify-between",
283
- children: [/* @__PURE__ */ L("span", {
291
+ children: [/* @__PURE__ */ I("span", {
284
292
  className: s,
285
293
  children: [
286
294
  y,
287
295
  " ",
288
296
  t + 1
289
297
  ]
290
- }), /* @__PURE__ */ I(v, {
298
+ }), /* @__PURE__ */ F(v, {
291
299
  appearance: f.Ghost,
292
300
  size: b.Small,
293
- icon: /* @__PURE__ */ I(ce, {
301
+ icon: /* @__PURE__ */ F(le, {
294
302
  size: g.SM,
295
303
  "aria-hidden": !0,
296
304
  stroke: _
297
305
  }),
298
306
  "aria-label": `${O} ${t + 1}`,
299
- onClick: () => ue(e.id)
307
+ onClick: () => de(e.id)
300
308
  })]
301
- }), /* @__PURE__ */ L("div", {
309
+ }), /* @__PURE__ */ I("div", {
302
310
  role: "group",
303
311
  "aria-label": `${y} ${t + 1}`,
304
312
  className: "flex flex-col gap-5",
305
- children: [/* @__PURE__ */ L("div", {
313
+ children: [/* @__PURE__ */ I("div", {
306
314
  className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
307
- children: [/* @__PURE__ */ I(te, {
315
+ children: [/* @__PURE__ */ F(te, {
308
316
  id: `${e.id}-language`,
309
317
  labelProps: {
310
318
  label: x,
@@ -317,48 +325,48 @@ var _e = {
317
325
  disabled: i.has(e.code)
318
326
  })),
319
327
  value: e.language,
320
- onChange: (t) => le(e.id, { language: t })
321
- }), /* @__PURE__ */ I(T, {
328
+ onChange: (t) => ue(e.id, { language: t })
329
+ }), /* @__PURE__ */ F(T, {
322
330
  id: `${e.id}-name`,
323
331
  containerClassName: "min-w-0 flex-1",
324
332
  required: !0,
325
333
  value: e.name,
326
- onChange: (t) => le(e.id, { name: t ?? "" }),
334
+ onChange: (t) => ue(e.id, { name: t ?? "" }),
327
335
  labelProps: {
328
336
  label: S,
329
337
  required: !0
330
338
  },
331
339
  placeholder: C
332
340
  })]
333
- }), /* @__PURE__ */ I(N, {
341
+ }), /* @__PURE__ */ F(M, {
334
342
  id: `${e.id}-description`,
335
343
  className: r,
336
- resize: P.Vertical,
344
+ resize: N.Vertical,
337
345
  value: e.description,
338
- onChange: (t) => le(e.id, { description: t }),
346
+ onChange: (t) => ue(e.id, { description: t }),
339
347
  labelProps: { label: w },
340
348
  placeholder: E
341
349
  })]
342
350
  })]
343
351
  }, e.id);
344
- }), /* @__PURE__ */ I(D, {
352
+ }), /* @__PURE__ */ F(D, {
345
353
  label: h,
346
- iconBefore: /* @__PURE__ */ I(se, {
354
+ iconBefore: /* @__PURE__ */ F(ce, {
347
355
  size: g.SM,
348
356
  "aria-hidden": !0,
349
357
  stroke: _
350
358
  }),
351
359
  className: "self-start",
352
- onClick: oe,
353
- disabled: F.length >= n.length
360
+ onClick: se,
361
+ disabled: P.length >= n.length
354
362
  })]
355
363
  })
356
364
  })
357
365
  ]
358
366
  });
359
- }, De = "Add tags, comma separated", K = "deployment-creation-form-description", Oe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = Te, isNameReadOnly: m = !1, nameCaption: h, isDescriptionRequired: g = !1, renderDescription: _, focusRequestKey: v }) => {
360
- let y = H(null), b = H(null), x = H(null), S = H(!1), C = (e) => p.includes(e), w = C(W.Name), E = C(W.Version), D = !!(t.name || t.version || t.description), O = H(v);
361
- fe(() => {
367
+ }, Oe = "Add tags, comma separated", ke = "deployment-creation-form-description", G = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = Ee, isNameReadOnly: m = !1, nameCaption: h, isDescriptionRequired: g = !1, renderDescription: _, focusRequestKey: v }) => {
368
+ let y = V(null), b = V(null), x = V(null), S = V(!1), C = (e) => p.includes(e), w = C(U.Name), E = C(U.Version), D = !!(t.name || t.version || t.description), O = V(v);
369
+ pe(() => {
362
370
  let e = () => {
363
371
  t.name ? y.current?.focus() : t.version ? b.current?.focus() : t.description && x.current?.focus();
364
372
  };
@@ -374,8 +382,8 @@ var _e = {
374
382
  t.version,
375
383
  t.description
376
384
  ]);
377
- let k = /* @__PURE__ */ I(N, {
378
- id: K,
385
+ let k = /* @__PURE__ */ F(M, {
386
+ id: ke,
379
387
  ref: x,
380
388
  value: e.description,
381
389
  onChange: (e) => n({ description: e }),
@@ -389,14 +397,14 @@ var _e = {
389
397
  invalid: !!t.description,
390
398
  containerClassName: _ ? void 0 : d?.field,
391
399
  className: r,
392
- resize: P.Vertical
400
+ resize: N.Vertical
393
401
  });
394
- return /* @__PURE__ */ L("div", {
402
+ return /* @__PURE__ */ I("div", {
395
403
  role: u.ariaLabel ? "group" : void 0,
396
404
  "aria-label": u.ariaLabel,
397
405
  className: c("flex flex-col gap-4", d?.root),
398
406
  children: [
399
- C(W.Avatar) && /* @__PURE__ */ I(Ce, {
407
+ C(U.Avatar) && /* @__PURE__ */ F(we, {
400
408
  label: u.iconUrl.label,
401
409
  avatarUrl: s,
402
410
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -404,9 +412,9 @@ var _e = {
404
412
  onAddAvatarClick: l,
405
413
  className: d?.field
406
414
  }),
407
- (w || E) && /* @__PURE__ */ L("div", {
415
+ (w || E) && /* @__PURE__ */ I("div", {
408
416
  className: c("flex items-start gap-4", d?.field),
409
- children: [w && /* @__PURE__ */ I(T, {
417
+ children: [w && /* @__PURE__ */ F(T, {
410
418
  id: "deployment-creation-form-name",
411
419
  inputRef: y,
412
420
  value: e.name,
@@ -422,7 +430,7 @@ var _e = {
422
430
  error: t.name || void 0,
423
431
  invalid: !!t.name,
424
432
  containerClassName: E ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
425
- }), E && /* @__PURE__ */ I(T, {
433
+ }), E && /* @__PURE__ */ F(T, {
426
434
  id: "deployment-creation-form-version",
427
435
  inputRef: b,
428
436
  value: e.version,
@@ -435,23 +443,23 @@ var _e = {
435
443
  containerClassName: w ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
436
444
  })]
437
445
  }),
438
- C(W.Description) && (_ ? /* @__PURE__ */ I("div", {
446
+ C(U.Description) && (_ ? /* @__PURE__ */ F("div", {
439
447
  className: d?.field,
440
- children: _(k, K)
448
+ children: _(k, ke)
441
449
  }) : k),
442
- C(W.Locales) && /* @__PURE__ */ I(Ee, {
450
+ C(U.Locales) && /* @__PURE__ */ F(W, {
443
451
  value: e.otherLocales,
444
452
  onChange: (e) => n({ otherLocales: e }),
445
453
  availableLocaleOptions: f,
446
454
  labels: u.otherLocales,
447
455
  className: d?.field
448
456
  }),
449
- C(W.Tags) && /* @__PURE__ */ I("div", {
457
+ C(U.Tags) && /* @__PURE__ */ F("div", {
450
458
  className: d?.field,
451
- children: /* @__PURE__ */ I(M, {
459
+ children: /* @__PURE__ */ F(j, {
452
460
  id: "deployment-creation-form-topics",
453
461
  labelProps: { label: u.topics.label },
454
- placeholder: u.topics.placeholder ?? De,
462
+ placeholder: u.topics.placeholder ?? Oe,
455
463
  value: e.topics,
456
464
  onChange: (e) => n({ topics: e }),
457
465
  tagClassName: i
@@ -459,47 +467,53 @@ var _e = {
459
467
  })
460
468
  ]
461
469
  });
462
- }, ke = "border-0 p-4 desktop:p-8", Ae = "desktop:flex-1", je = "px-4 pt-4 desktop:px-6 desktop:pt-6", Me = de(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, alert: h, metadataSectionClassName: g, setupSectionClassName: _, labels: v, styles: y, dir: b }) => {
463
- let x = h == null ? null : /* @__PURE__ */ I("div", {
470
+ }, Ae = "border-0 p-4 desktop:p-8", je = "desktop:flex-1", Me = "px-4 pt-4 desktop:px-6 desktop:pt-6", Ne = fe(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, metadataSectionClassName: y, setupSectionClassName: b, labels: x, styles: S, dir: C }) => {
471
+ let w = v == null ? null : /* @__PURE__ */ F("div", {
464
472
  role: "alert",
465
- className: je,
466
- children: h
467
- }), S = p != null;
468
- return /* @__PURE__ */ I(xe, {
473
+ className: Me,
474
+ children: v
475
+ }), T = p != null;
476
+ return /* @__PURE__ */ F(Se, {
469
477
  title: e,
470
478
  onBack: t,
471
- backAriaLabel: v?.backAriaLabel ?? "Back",
479
+ backAriaLabel: x?.backAriaLabel ?? "Back",
472
480
  isSaving: a,
473
- labels: { savingStatusLabel: v?.savingStatusLabel ?? "Saving" },
474
- styles: y?.layout,
475
- dir: b,
476
- actions: /* @__PURE__ */ L(F, { children: [s, !l && /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(O, {
477
- label: v?.cancelLabel ?? "Cancel",
481
+ labels: { savingStatusLabel: x?.savingStatusLabel ?? "Saving" },
482
+ rightContent: h == null ? void 0 : /* @__PURE__ */ F(be, {
483
+ title: g,
484
+ styles: S?.section,
485
+ className: c(Ae, _, ve.asideSection),
486
+ children: h
487
+ }),
488
+ styles: S?.layout,
489
+ dir: C,
490
+ actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(O, {
491
+ label: x?.cancelLabel ?? "Cancel",
478
492
  disabled: a,
479
493
  onClick: n
480
- }), /* @__PURE__ */ I(A, {
494
+ }), /* @__PURE__ */ F(A, {
481
495
  label: i,
482
496
  disabled: a || o,
483
497
  onClick: r
484
498
  })] })] }),
485
- leftContent: /* @__PURE__ */ L(F, { children: [
486
- !S && x,
487
- /* @__PURE__ */ I(ye, {
488
- title: d === null ? void 0 : d ?? v?.metadataTitle ?? "Metadata",
489
- styles: y?.section,
490
- className: c(ke, g, _e.metadataSection),
499
+ leftContent: /* @__PURE__ */ I(P, { children: [
500
+ !T && w,
501
+ /* @__PURE__ */ F(be, {
502
+ title: d === null ? void 0 : d ?? x?.metadataTitle ?? "Metadata",
503
+ styles: S?.section,
504
+ className: c(Ae, y, ve.metadataSection),
491
505
  children: u
492
506
  }),
493
507
  f
494
508
  ] }),
495
- rightContent: S ? /* @__PURE__ */ L(F, { children: [x, /* @__PURE__ */ I(ye, {
496
- title: m === null ? void 0 : m ?? v?.setupTitle ?? "Setup",
497
- styles: y?.section,
498
- className: c(ke, Ae, _, _e.setupSection),
509
+ centerContent: T ? /* @__PURE__ */ I(P, { children: [w, /* @__PURE__ */ F(be, {
510
+ title: m === null ? void 0 : m ?? x?.setupTitle ?? "Setup",
511
+ styles: S?.section,
512
+ className: c(Ae, je, b, ve.setupSection),
499
513
  children: p
500
514
  })] }) : void 0
501
515
  });
502
- }), Ne = {
516
+ }), Pe = {
503
517
  name: {
504
518
  label: "Name",
505
519
  placeholder: "Enter name"
@@ -538,7 +552,7 @@ var _e = {
538
552
  saveLabel: "Save"
539
553
  },
540
554
  ariaLabel: "Metadata"
541
- }, Pe = {
555
+ }, Fe = {
542
556
  title: "Add avatar",
543
557
  attachLabel: "Attach",
544
558
  emptyTitle: "This folder is empty",
@@ -562,12 +576,12 @@ var _e = {
562
576
  deleteConfirmItemsLabel: "items?",
563
577
  deleteConfirmLabel: "Delete",
564
578
  deleteCancelLabel: "Cancel"
565
- }, Fe = de(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = Te, isNameReadOnly: c, nameCaption: l, isDescriptionRequired: u, renderDescription: d, focusRequestKey: f, labels: p }) => {
566
- let [m, h] = U(!1), g = V(() => a ? s : s.filter((e) => e !== W.Avatar), [a, s]), _ = e.iconUrl, v = a?.resolveIconUrl, y = V(() => v ? v(_) : void 0, [_, v]), b = B(() => h(!0), []), x = B(() => h(!1), []), S = a?.resolveAttachedIconUrl, C = B((e) => {
579
+ }, Ie = fe(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = Ee, isNameReadOnly: c, nameCaption: l, isDescriptionRequired: u, renderDescription: d, focusRequestKey: f, labels: p }) => {
580
+ let [m, h] = H(!1), g = B(() => a ? s : s.filter((e) => e !== U.Avatar), [a, s]), _ = e.iconUrl, v = a?.resolveIconUrl, y = B(() => v ? v(_) : void 0, [_, v]), b = z(() => h(!0), []), x = z(() => h(!1), []), S = a?.resolveAttachedIconUrl, C = z((e) => {
567
581
  let t = S?.(e);
568
582
  t && n({ iconUrl: t }), h(!1);
569
583
  }, [n, S]);
570
- return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(Oe, {
584
+ return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(G, {
571
585
  values: e,
572
586
  errors: t,
573
587
  onChange: n,
@@ -575,7 +589,7 @@ var _e = {
575
589
  onVersionBlur: i,
576
590
  iconPreviewUrl: y,
577
591
  onAddAvatarClick: b,
578
- labels: p?.form ?? Ne,
592
+ labels: p?.form ?? Pe,
579
593
  availableLocaleOptions: o,
580
594
  fields: g,
581
595
  isNameReadOnly: c,
@@ -583,7 +597,7 @@ var _e = {
583
597
  isDescriptionRequired: u,
584
598
  renderDescription: d,
585
599
  focusRequestKey: f
586
- }), a && /* @__PURE__ */ I(we, {
600
+ }), a && /* @__PURE__ */ F(Te, {
587
601
  isOpen: m,
588
602
  onClose: x,
589
603
  onAttach: C,
@@ -591,57 +605,57 @@ var _e = {
591
605
  FileManagerModal: a.FileManagerModal,
592
606
  allowedMimeTypes: a.allowedMimeTypes,
593
607
  maxFileSizeBytes: a.maxFileSizeBytes,
594
- labels: p?.avatarPicker ?? Pe
608
+ labels: p?.avatarPicker ?? Fe
595
609
  })] });
596
- }), Ie = /* @__PURE__ */ function(e) {
610
+ }), Le = /* @__PURE__ */ function(e) {
597
611
  return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
598
612
  }({});
599
- new Set([Ie.TooLong, Ie.ControlCharacters]);
613
+ new Set([Le.TooLong, Le.ControlCharacters]);
600
614
  //#endregion
601
615
  //#region src/constants/public-class-names.ts
602
- var Le = {
616
+ var Re = {
603
617
  root: "dial-skill-editor-root",
604
618
  refineFeedback: "dial-skill-editor-refine-feedback"
605
- }, q = "SKILL.md", J = /* @__PURE__ */ function(e) {
619
+ }, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
606
620
  return e.File = "file", e.Folder = "folder", e;
607
- }({}), Re = /* @__PURE__ */ function(e) {
621
+ }({}), ze = /* @__PURE__ */ function(e) {
608
622
  return e.Header = "header", e.Child = "child", e.Sibling = "sibling", e;
609
- }({}), Y = (e) => {
623
+ }({}), J = (e) => {
610
624
  let t = e.lastIndexOf("/");
611
625
  return t === -1 ? null : e.slice(0, t);
612
- }, ze = (e) => {
626
+ }, Be = (e) => {
613
627
  let t = e.lastIndexOf("/");
614
628
  return t === -1 ? e : e.slice(t + 1);
615
- }, Be = (e) => {
629
+ }, Ve = (e) => {
616
630
  let t = /* @__PURE__ */ new Map(), n = (e) => {
617
631
  let n = t.get(e);
618
632
  if (n) return n;
619
633
  let r = {
620
634
  path: e,
621
- name: ze(e),
622
- nodeType: me.FOLDER,
623
- parentPath: Y(e),
635
+ name: Be(e),
636
+ nodeType: he.FOLDER,
637
+ parentPath: J(e),
624
638
  folderId: e,
625
639
  items: []
626
640
  };
627
641
  return t.set(e, r), r;
628
642
  };
629
643
  for (let r of e) {
630
- if (r.kind === J.Folder) {
644
+ if (r.kind === q.Folder) {
631
645
  n(r.path).name = r.name;
632
646
  continue;
633
647
  }
634
648
  t.set(r.path, {
635
649
  path: r.path,
636
650
  name: r.name,
637
- nodeType: me.ITEM,
638
- parentPath: Y(r.path),
639
- folderId: Y(r.path) ?? ""
651
+ nodeType: he.ITEM,
652
+ parentPath: J(r.path),
653
+ folderId: J(r.path) ?? ""
640
654
  });
641
655
  }
642
656
  for (let t of [...e]) {
643
- let e = Y(t.path);
644
- for (; e != null;) n(e), e = Y(e);
657
+ let e = J(t.path);
658
+ for (; e != null;) n(e), e = J(e);
645
659
  }
646
660
  let r = [];
647
661
  for (let e of t.values()) {
@@ -653,14 +667,14 @@ var Le = {
653
667
  n ? n.items = [...n.items ?? [], e] : r.push(e);
654
668
  }
655
669
  return r;
656
- }, Ve = (e, t) => e ? `${e}/${t}` : t, He = (e) => Y(e) ?? "", Ue = (e, t) => {
670
+ }, He = (e, t) => e ? `${e}/${t}` : t, Ue = (e) => J(e) ?? "", We = (e, t) => {
657
671
  if (!t) return "";
658
672
  switch (e) {
659
- case Re.Child: return t.path;
660
- case Re.Sibling: return He(t.path);
661
- case Re.Header: return t.kind === J.Folder ? t.path : "";
673
+ case ze.Child: return t.path;
674
+ case ze.Sibling: return Ue(t.path);
675
+ case ze.Header: return t.kind === q.Folder ? t.path : "";
662
676
  }
663
- }, We = (e, t) => {
677
+ }, Ge = (e, t) => {
664
678
  let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Set();
665
679
  for (let { path: i } of e) {
666
680
  if (!i.startsWith(n) || i === t) continue;
@@ -668,29 +682,29 @@ var Le = {
668
682
  r.add(e.split("/")[0]);
669
683
  }
670
684
  return r;
671
- }, Ge = (e, t, n) => {
685
+ }, Ke = (e, t, n) => {
672
686
  let r = e.trim();
673
687
  if (!r) return n.required;
674
688
  if (/[/\\]/.test(r) || r === "." || r === "..") return n.invalid;
675
689
  if (t.has(r)) return n.duplicate;
676
- }, Ke = "\\new-folder", qe = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
677
- let [o, s] = U(null), c = o?.parentPath ?? null, l = H([]), u = c == null ? void 0 : Ve(c, Ke), d = V(() => u == null ? void 0 : {
690
+ }, qe = "\\new-folder", Je = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
691
+ let [o, s] = H(null), c = o?.parentPath ?? null, l = V([]), u = c == null ? void 0 : He(c, qe), d = B(() => u == null ? void 0 : {
678
692
  path: u,
679
693
  name: n,
680
- kind: J.Folder
681
- }, [u, n]), f = B((n, i) => {
682
- let a = We(e, i);
683
- return i === "" && a.add(q), Ge(n, a, r) ?? t.validateFolderPath?.(Ve(i, n.trim()));
694
+ kind: q.Folder
695
+ }, [u, n]), f = z((n, i) => {
696
+ let a = Ge(e, i);
697
+ return i === "" && a.add(K), Ke(n, a, r) ?? t.validateFolderPath?.(He(i, n.trim()));
684
698
  }, [
685
699
  e,
686
700
  r,
687
701
  t
688
- ]), p = B((e, t) => {
702
+ ]), p = z((e, t) => {
689
703
  l.current = [], s({
690
704
  parentPath: e,
691
705
  pane: t
692
706
  }), e !== "" && i(e);
693
- }, [i]), m = B((e, t) => {
707
+ }, [i]), m = z((e, t) => {
694
708
  if (c == null || t.path !== u) return null;
695
709
  let n = f(e, c);
696
710
  return l.current = [...l.current.slice(-1), {
@@ -701,16 +715,16 @@ var Le = {
701
715
  c,
702
716
  u,
703
717
  f
704
- ]), h = B(() => {
718
+ ]), h = z(() => {
705
719
  l.current = [], s(null);
706
- }, []), g = B((e) => {
720
+ }, []), g = z((e) => {
707
721
  if (c == null) return;
708
722
  let [n] = l.current;
709
723
  if (l.current.length === 2 && n != null && !n.isValid && n.value !== e || f(e, c) != null) {
710
724
  h();
711
725
  return;
712
726
  }
713
- let r = Ve(c, e.trim());
727
+ let r = He(c, e.trim());
714
728
  h(), t.onCreateFolder?.(r), a(r);
715
729
  }, [
716
730
  c,
@@ -728,107 +742,107 @@ var Le = {
728
742
  handleSave: g,
729
743
  handleCancel: h
730
744
  };
731
- }, Je = (e) => !!e.dataTransfer?.types.includes("Files"), Ye = (e) => {
732
- let [t, n] = U(!1), r = H(0);
745
+ }, Ye = (e) => !!e.dataTransfer?.types.includes("Files"), Xe = (e) => {
746
+ let [t, n] = H(!1), r = V(0);
733
747
  return {
734
748
  isDragActive: t,
735
749
  dropZoneHandlers: {
736
- onDragEnter: B((e) => {
737
- Je(e) && (e.preventDefault(), r.current += 1, n(!0));
750
+ onDragEnter: z((e) => {
751
+ Ye(e) && (e.preventDefault(), r.current += 1, n(!0));
738
752
  }, []),
739
- onDragLeave: B((e) => {
740
- Je(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
753
+ onDragLeave: z((e) => {
754
+ Ye(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
741
755
  }, []),
742
- onDragOver: B((e) => {
743
- Je(e) && e.preventDefault();
756
+ onDragOver: z((e) => {
757
+ Ye(e) && e.preventDefault();
744
758
  }, []),
745
- onDrop: B((t) => {
746
- if (!Je(t)) return;
759
+ onDrop: z((t) => {
760
+ if (!Ye(t)) return;
747
761
  t.preventDefault(), r.current = 0, n(!1);
748
762
  let i = Array.from(t.dataTransfer?.files ?? []);
749
763
  i.length > 0 && e(i);
750
764
  }, [e])
751
765
  }
752
766
  };
753
- }, Xe = /* @__PURE__ */ function(e) {
767
+ }, Ze = /* @__PURE__ */ function(e) {
754
768
  return e.Files = "files", e.Archive = "archive", e;
755
- }({}), X = /* @__PURE__ */ function(e) {
769
+ }({}), Y = /* @__PURE__ */ function(e) {
756
770
  return e.Mobile = "mobile", e.Desktop = "desktop", e;
757
- }({}), Ze = (e, t, n = g.MD) => /* @__PURE__ */ I(e, {
771
+ }({}), Qe = (e, t, n = g.MD) => /* @__PURE__ */ F(e, {
758
772
  size: n,
759
773
  className: t,
760
774
  "aria-hidden": !0,
761
775
  stroke: _
762
- }), Qe = ({ isVisible: e, labels: t }) => {
776
+ }), $e = ({ isVisible: e, labels: t }) => {
763
777
  if (!e) return null;
764
778
  let n = t ?? {};
765
- return /* @__PURE__ */ I("div", {
779
+ return /* @__PURE__ */ F("div", {
766
780
  role: "status",
767
781
  "aria-live": "polite",
768
782
  className: c("pointer-events-none absolute inset-0 z-[100] flex items-center justify-center backdrop-blur-sm"),
769
- children: /* @__PURE__ */ L("div", {
783
+ children: /* @__PURE__ */ I("div", {
770
784
  className: "flex flex-col items-center text-center",
771
785
  children: [
772
- /* @__PURE__ */ I(le, {
786
+ /* @__PURE__ */ F(ue, {
773
787
  size: 100,
774
788
  className: "text-accent-primary",
775
789
  "aria-hidden": !0,
776
790
  stroke: _
777
791
  }),
778
- /* @__PURE__ */ I("span", {
792
+ /* @__PURE__ */ F("span", {
779
793
  className: "dial-h3-text mt-5",
780
794
  children: n.dropOverlayTitle ?? "Upload files"
781
795
  }),
782
- /* @__PURE__ */ I("span", {
796
+ /* @__PURE__ */ F("span", {
783
797
  className: "dial-small-text mt-4",
784
798
  children: n.dropOverlaySubtitle ?? "Drop files here to add them to this skill"
785
799
  })
786
800
  ]
787
801
  })
788
802
  });
789
- }, $e = /* @__PURE__ */ function(e) {
803
+ }, et = /* @__PURE__ */ function(e) {
790
804
  return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
791
- }({}), et = /* @__PURE__ */ function(e) {
805
+ }({}), tt = /* @__PURE__ */ function(e) {
792
806
  return e.Valid = "valid", e.Invalid = "invalid", e;
793
- }({}), tt = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), nt = ".zip,application/zip", Z = 0, rt = () => `skill-file-candidate-${++Z}`, it = (e, t, n) => ({
794
- id: rt(),
807
+ }({}), nt = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), rt = ".zip,application/zip", it = 0, X = () => `skill-file-candidate-${++it}`, Z = (e, t, n) => ({
808
+ id: X(),
795
809
  file: e,
796
- path: Ve(n, t.replace(/\\/g, "/"))
797
- }), at = ({ isOpen: e, onClose: t, fileActions: n, mode: r = Xe.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: o, labels: c }) => {
798
- let l = c ?? {}, [u, d] = U([]), [p, h] = U(/* @__PURE__ */ new Map()), [g, v] = U([]), [y, b] = U(!1), [C, T] = U(), [E, D] = U(!1), [O, A] = U(), [te, M] = U(0), N = H(0), P = r === Xe.Archive, R = l.uploadArchiveErrorMessage ?? "Couldn't read this archive", ne = pe(), ie = (e) => {
810
+ path: He(n, t.replace(/\\/g, "/"))
811
+ }), at = ({ isOpen: e, onClose: t, fileActions: n, mode: r = Ze.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: o, labels: c }) => {
812
+ let l = c ?? {}, [u, d] = H([]), [p, h] = H(/* @__PURE__ */ new Map()), [g, v] = H([]), [y, b] = H(!1), [C, T] = H(), [E, D] = H(!1), [O, A] = H(), [te, j] = H(0), M = V(0), N = r === Ze.Archive, L = l.uploadArchiveErrorMessage ?? "Couldn't read this archive", re = me(), ae = (e) => {
799
813
  T(void 0), d((t) => [...t, ...e]);
800
- }, ae = async (e) => {
814
+ }, oe = async (e) => {
801
815
  let { extractArchive: t } = n;
802
816
  if (!t) return;
803
- let r = N.current;
804
- A(void 0), M((e) => e + 1);
817
+ let r = M.current;
818
+ A(void 0), j((e) => e + 1);
805
819
  try {
806
820
  let n = await Promise.all(e.map((e) => t(e)));
807
- if (r !== N.current) return;
821
+ if (r !== M.current) return;
808
822
  let a = n.flat();
809
823
  if (a.length === 0) {
810
824
  A(l.uploadArchiveEmptyMessage ?? "This archive has no files");
811
825
  return;
812
826
  }
813
- ie(a.map((e) => it(e.file, e.path, i)));
827
+ ae(a.map((e) => Z(e.file, e.path, i)));
814
828
  } catch {
815
- if (r !== N.current) return;
816
- A(R);
829
+ if (r !== M.current) return;
830
+ A(L);
817
831
  } finally {
818
- r === N.current && M((e) => e - 1);
832
+ r === M.current && j((e) => e - 1);
819
833
  }
820
- }, oe = (e) => {
821
- if (P) {
822
- ae(e);
834
+ }, se = (e) => {
835
+ if (N) {
836
+ oe(e);
823
837
  return;
824
838
  }
825
- ie(e.map((e) => it(e, tt(e), i)));
826
- }, se = (e) => {
839
+ ae(e.map((e) => Z(e, nt(e), i)));
840
+ }, ce = (e) => {
827
841
  d((t) => t.filter((t) => t.id !== e));
828
842
  };
829
- fe(() => {
830
- e && (N.current += 1, d([...(a ?? []).map((e) => it(e, tt(e), i)), ...(o ?? []).map((e) => it(e.file, e.path, i))]), h(/* @__PURE__ */ new Map()), v([]), T(void 0), A(void 0), M(0));
831
- }, [e]), fe(() => {
843
+ pe(() => {
844
+ e && (M.current += 1, d([...(a ?? []).map((e) => Z(e, nt(e), i)), ...(o ?? []).map((e) => Z(e.file, e.path, i))]), h(/* @__PURE__ */ new Map()), v([]), T(void 0), A(void 0), j(0));
845
+ }, [e]), pe(() => {
832
846
  if (!e) return;
833
847
  let t = !1;
834
848
  if (u.length === 0) {
@@ -843,11 +857,11 @@ var Le = {
843
857
  t = !0;
844
858
  };
845
859
  }, [u, e]);
846
- let le = u.some((e) => p.get(e.id)?.status === et.Invalid), ue = u.length > 0 && u.every((e) => p.get(e.id)?.status === et.Invalid), z = u.length > 0 && !le && g.length === 0 && !y && !E && te === 0, de = async () => {
860
+ let ue = u.some((e) => p.get(e.id)?.status === tt.Invalid), de = u.length > 0 && u.every((e) => p.get(e.id)?.status === tt.Invalid), R = u.length > 0 && !ue && g.length === 0 && !y && !E && te === 0, fe = async () => {
847
861
  D(!0), T(void 0);
848
862
  try {
849
863
  let { results: e, batchErrors: r } = await n.validateBatch(u), i = new Map(e.map((e) => [e.candidateId, e]));
850
- if (h(i), v(r.map((e) => e.message)), u.some((e) => i.get(e.id)?.status === et.Invalid) || r.length > 0) return;
864
+ if (h(i), v(r.map((e) => e.message)), u.some((e) => i.get(e.id)?.status === tt.Invalid) || r.length > 0) return;
851
865
  let a = await n.commitBatch(u);
852
866
  if (a.error) {
853
867
  T(a.error);
@@ -858,9 +872,9 @@ var Le = {
858
872
  D(!1);
859
873
  }
860
874
  };
861
- return /* @__PURE__ */ I(k, {
875
+ return /* @__PURE__ */ F(k, {
862
876
  open: e,
863
- header: P ? l.uploadArchiveDialogTitle ?? "Upload archive from device" : l.uploadDialogTitle ?? "Upload files from device",
877
+ header: N ? l.uploadArchiveDialogTitle ?? "Upload archive from device" : l.uploadDialogTitle ?? "Upload files from device",
864
878
  size: ee.Sm,
865
879
  closeAriaLabel: l.uploadDialogCloseAriaLabel ?? "Close",
866
880
  onClose: t,
@@ -872,88 +886,88 @@ var Le = {
872
886
  }, {
873
887
  label: l.uploadConfirmLabel ?? "Add",
874
888
  variant: m.Primary,
875
- iconBefore: E ? /* @__PURE__ */ I(j, {
889
+ iconBefore: E ? /* @__PURE__ */ F(ne, {
876
890
  size: 16,
877
891
  ariaLabel: ""
878
892
  }) : void 0,
879
- onClick: () => void de(),
880
- disabled: !z
893
+ onClick: () => void fe(),
894
+ disabled: !R
881
895
  }],
882
- children: /* @__PURE__ */ L("div", {
896
+ children: /* @__PURE__ */ I("div", {
883
897
  className: "flex flex-col gap-4 px-6 py-4",
884
898
  children: [
885
- /* @__PURE__ */ I(S, {
886
- label: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("span", {
899
+ /* @__PURE__ */ F(S, {
900
+ label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
887
901
  className: "desktop:hidden",
888
- children: P ? l.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : l.uploadDropZoneMobileLabel ?? "Click here to upload"
889
- }), /* @__PURE__ */ I("span", {
902
+ children: N ? l.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : l.uploadDropZoneMobileLabel ?? "Click here to upload"
903
+ }), /* @__PURE__ */ F("span", {
890
904
  className: "hidden desktop:inline",
891
- children: P ? l.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : l.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
905
+ children: N ? l.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : l.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
892
906
  })] }),
893
907
  ariaLabel: l.uploadDropZoneAriaLabel ?? "Upload files",
894
908
  multiple: !0,
895
- accept: P ? nt : void 0,
896
- className: ue ? "border-error hover:border-error" : void 0,
897
- onChange: oe,
898
- onReject: P ? () => A(R) : void 0
909
+ accept: N ? rt : void 0,
910
+ className: de ? "border-error hover:border-error" : void 0,
911
+ onChange: se,
912
+ onReject: N ? () => A(L) : void 0
899
913
  }),
900
- te > 0 && /* @__PURE__ */ I(j, { ariaLabel: l.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
901
- /* @__PURE__ */ I("div", {
914
+ te > 0 && /* @__PURE__ */ F(ne, { ariaLabel: l.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
915
+ /* @__PURE__ */ F("div", {
902
916
  role: "alert",
903
- children: O && /* @__PURE__ */ I(x, { text: O })
917
+ children: O && /* @__PURE__ */ F(x, { text: O })
904
918
  }),
905
- /* @__PURE__ */ I("span", {
919
+ /* @__PURE__ */ F("span", {
906
920
  role: "status",
907
921
  "aria-live": "polite",
908
922
  className: "sr-only",
909
- id: ne,
923
+ id: re,
910
924
  children: g.map((e) => `${l.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
911
925
  }),
912
- g.map((e) => /* @__PURE__ */ I(x, { text: e }, e)),
913
- u.length > 0 && /* @__PURE__ */ I("ul", {
926
+ g.map((e) => /* @__PURE__ */ F(x, { text: e }, e)),
927
+ u.length > 0 && /* @__PURE__ */ F("ul", {
914
928
  className: "flex flex-col gap-2",
915
929
  children: u.map((e) => {
916
- let t = p.get(e.id), n = t?.kind === $e.Manifest, r = t?.status === et.Invalid;
917
- return /* @__PURE__ */ L("li", {
930
+ let t = p.get(e.id), n = t?.kind === et.Manifest, r = t?.status === tt.Invalid;
931
+ return /* @__PURE__ */ I("li", {
918
932
  className: "flex items-center gap-2 rounded-lg border border-tertiary p-2",
919
933
  children: [
920
- /* @__PURE__ */ I(re, {
934
+ /* @__PURE__ */ F(ie, {
921
935
  size: 20,
922
936
  "aria-hidden": !0,
923
937
  stroke: _
924
938
  }),
925
- /* @__PURE__ */ L("div", {
939
+ /* @__PURE__ */ I("div", {
926
940
  className: "flex min-w-0 flex-1 flex-col",
927
941
  children: [
928
- /* @__PURE__ */ I("span", {
942
+ /* @__PURE__ */ F("span", {
929
943
  className: "dial-small-text truncate",
930
944
  children: e.path
931
945
  }),
932
- /* @__PURE__ */ I("span", {
946
+ /* @__PURE__ */ F("span", {
933
947
  className: "dial-tiny-text text-secondary",
934
948
  children: s(e.file.size)
935
949
  }),
936
- r && t?.error && /* @__PURE__ */ I(x, { text: t.error }),
937
- n && !r && /* @__PURE__ */ I("span", {
950
+ r && t?.error && /* @__PURE__ */ F(x, { text: t.error }),
951
+ n && !r && /* @__PURE__ */ F("span", {
938
952
  className: "dial-tiny-text text-secondary",
939
953
  children: l.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
940
954
  })
941
955
  ]
942
956
  }),
943
- /* @__PURE__ */ I(w, {
944
- icon: /* @__PURE__ */ I(ce, {
957
+ /* @__PURE__ */ F(w, {
958
+ icon: /* @__PURE__ */ F(le, {
945
959
  size: 16,
946
960
  "aria-hidden": !0,
947
961
  stroke: _
948
962
  }),
949
963
  "aria-label": l.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
950
- onClick: () => se(e.id)
964
+ onClick: () => ce(e.id)
951
965
  })
952
966
  ]
953
967
  }, e.id);
954
968
  })
955
969
  }),
956
- C && /* @__PURE__ */ I(x, { text: C })
970
+ C && /* @__PURE__ */ F(x, { text: C })
957
971
  ]
958
972
  })
959
973
  });
@@ -963,106 +977,106 @@ var Le = {
963
977
  refineFeedback: "_refineFeedback_5md1a_9",
964
978
  refineError: "_refineError_5md1a_13"
965
979
  }, st = {
966
- mode: Xe.Files,
980
+ mode: Ze.Files,
967
981
  targetFolderPath: ""
968
- }, ct = [W.Name, W.Description], lt = 24, ut = 300, dt = "desktop:px-8 desktop:py-6", ft = "gap-4 px-4 py-6 desktop:gap-5 desktop:px-8 desktop:py-6", pt = z(async () => {
969
- let { MarkdownEditor: e } = await ge();
982
+ }, ct = [U.Name, U.Description], lt = 24, ut = 300, dt = "desktop:px-8 desktop:py-6", ft = "gap-4 px-4 py-6 desktop:gap-5 desktop:px-8 desktop:py-6", pt = R(async () => {
983
+ let { MarkdownEditor: e } = await _e();
970
984
  return { default: e };
971
- }), mt = ({ 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: M, isNameReadOnly: N = !1, onDirtyChange: P, onValuesChange: R, onRefineDescription: re, onRefineInstructions: oe, fileActions: z, supportingFileContent: de, onSubmit: ge, onCancel: _e, onBack: ve, backAriaLabel: ye, title: be, onRetry: xe, onRetrySubmit: Se, labels: Ce, styles: we, dir: W, instructionsEditorTheme: Te = y.light }) => {
972
- let [G, Ee] = U({
985
+ }), mt = ({ 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 }) => {
986
+ let [W, Oe] = H({
973
987
  name: r?.name ?? "",
974
988
  description: r?.description ?? "",
975
989
  instructions: r?.instructions ?? ""
976
- }), De = pe(), K = H(void 0), Oe = l({
990
+ }), ke = me(), G = V(void 0), Ae = l({
977
991
  bottomGap: lt,
978
992
  minHeight: ut
979
- }), ke = H(G), Ae = (e) => {
993
+ }), je = V(W), Me = (e) => {
980
994
  let t = {
981
- ...ke.current,
995
+ ...je.current,
982
996
  ...e
983
997
  };
984
- ke.current = t, Ee(t), R?.(t);
985
- }, je = (e) => e ? async (t, n) => {
986
- if (K.current && !K.current.aborted) throw new DOMException("Busy", "AbortError");
987
- K.current = n;
998
+ je.current = t, Oe(t), L?.(t);
999
+ }, Fe = (e) => e ? async (t, n) => {
1000
+ if (G.current && !G.current.aborted) throw new DOMException("Busy", "AbortError");
1001
+ G.current = n;
988
1002
  try {
989
1003
  return await e(t, n);
990
1004
  } finally {
991
- K.current === n && (K.current = void 0);
1005
+ G.current === n && (G.current = void 0);
992
1006
  }
993
- } : void 0, Pe = u({
994
- value: G.description,
995
- onChange: (e) => Ae({ description: e }),
996
- onRefine: je(re),
1007
+ } : void 0, Le = u({
1008
+ value: W.description,
1009
+ onChange: (e) => Me({ description: e }),
1010
+ onRefine: Fe(ie),
997
1011
  disabled: O || T || D,
998
1012
  resetKey: r
999
- }), Ie = u({
1000
- value: G.instructions,
1001
- onChange: (e) => Ae({ instructions: e }),
1002
- onRefine: je(oe),
1013
+ }), J = u({
1014
+ value: W.instructions,
1015
+ onChange: (e) => Me({ instructions: e }),
1016
+ onRefine: Fe(se),
1003
1017
  disabled: O || T || D,
1004
1018
  resetKey: r
1005
- }), Y = Pe.isPending || Ie.isPending, ze = () => {
1006
- Pe.reset(), Ie.reset();
1007
- }, Ve = () => {
1008
- ze(), _e();
1009
- }, He = () => {
1010
- ze(), ve();
1011
- }, We = () => {
1012
- O || T || D || K.current && !K.current.aborted || ge(G);
1013
- }, Ge = H(r), Ke = Ge.current !== r, Je = H(i);
1014
- fe(() => {
1015
- Ge.current = r;
1019
+ }), Be = Le.isPending || J.isPending, He = () => {
1020
+ Le.reset(), J.reset();
1021
+ }, Ue = () => {
1022
+ He(), ye();
1023
+ }, Ge = () => {
1024
+ He(), be();
1025
+ }, Ke = () => {
1026
+ O || T || D || G.current && !G.current.aborted || ve(W);
1027
+ }, qe = V(r), Ye = qe.current !== r, et = V(i);
1028
+ pe(() => {
1029
+ qe.current = r;
1016
1030
  let e = {
1017
1031
  name: r?.name ?? "",
1018
1032
  description: r?.description ?? "",
1019
1033
  instructions: r?.instructions ?? ""
1020
1034
  };
1021
- ke.current = e, Ee(e), Je.current = i;
1035
+ je.current = e, Oe(e), et.current = i;
1022
1036
  }, [r]);
1023
- let $e = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), et = H(!1);
1024
- fe(() => {
1025
- if (Ke) return;
1037
+ let tt = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), nt = V(!1);
1038
+ pe(() => {
1039
+ if (Ye) return;
1026
1040
  let e = {
1027
1041
  name: r?.name ?? "",
1028
1042
  description: r?.description ?? "",
1029
1043
  instructions: r?.instructions ?? ""
1030
- }, t = JSON.stringify(G) !== JSON.stringify(e) || $e(i) !== $e(Je.current);
1031
- t !== et.current && (et.current = t, P?.(t));
1044
+ }, t = JSON.stringify(W) !== JSON.stringify(e) || tt(i) !== tt(et.current);
1045
+ t !== nt.current && (nt.current = t, N?.(t));
1032
1046
  }, [
1033
- G,
1047
+ W,
1034
1048
  i,
1035
1049
  r,
1036
- Ke,
1037
- P
1050
+ Ye,
1051
+ N
1038
1052
  ]);
1039
- let [tt, nt] = U(q), Z = s ?? tt, rt = B((e) => {
1040
- nt(e), v?.(e);
1041
- }, [v]), [it, mt] = U([]), ht = S ?? it, gt = V(() => new Set(ht), [ht]), _t = B((e) => {
1053
+ let [rt, it] = H(K), X = s ?? rt, Z = z((e) => {
1054
+ it(e), v?.(e);
1055
+ }, [v]), [mt, ht] = H([]), gt = S ?? mt, _t = B(() => new Set(gt), [gt]), vt = z((e) => {
1042
1056
  let t = [...e];
1043
- mt(t), w?.(t);
1044
- }, [w]), [vt, yt] = U(!1), [bt, xt] = U(st), St = B((e) => {
1045
- xt(e), yt(!0);
1046
- }, []), [Ct, wt] = U(!1), { isDragActive: Tt, dropZoneHandlers: Et } = Ye(B((e) => {
1047
- vt || St({
1057
+ ht(t), w?.(t);
1058
+ }, [w]), [yt, bt] = H(!1), [xt, St] = H(st), Ct = z((e) => {
1059
+ St(e), bt(!0);
1060
+ }, []), [wt, Tt] = H(!1), { isDragActive: Et, dropZoneHandlers: Dt } = Xe(z((e) => {
1061
+ yt || Ct({
1048
1062
  ...st,
1049
1063
  initialFiles: e
1050
1064
  });
1051
- }, [vt, St])), Q = Ce ?? {}, $ = we?.colors, Dt = we?.typography ?? {}, Ot = Dt.titleClassName ?? "dial-body-semi-text", kt = Dt.helperTextClassName ?? "dial-tiny-semi-text", At = Dt.removeIconClassName, jt = Dt.menuIconClassName ?? "text-secondary", Mt = o({
1065
+ }, [yt, Ct])), Q = Te ?? {}, $ = U?.colors, Ot = U?.typography ?? {}, kt = Ot.titleClassName ?? "dial-body-semi-text", At = Ot.helperTextClassName ?? "dial-tiny-semi-text", jt = Ot.removeIconClassName, Mt = Ot.menuIconClassName ?? "text-secondary", Nt = o({
1052
1066
  "--se-title-color": $?.title,
1053
1067
  "--se-helper-text-color": $?.helperText,
1054
1068
  "--se-refine-action-text": $?.refineActionText,
1055
1069
  "--se-refine-error-text": $?.refineErrorText
1056
- }), Nt = {
1057
- feedbackClassName: c($?.refineActionText && ot.refineFeedback, Dt.refineFeedbackClassName, Le.refineFeedback),
1070
+ }), Pt = {
1071
+ feedbackClassName: c($?.refineActionText && ot.refineFeedback, Ot.refineFeedbackClassName, Re.refineFeedback),
1058
1072
  errorClassName: ot.refineError
1059
- }, Pt = {
1073
+ }, Ft = {
1060
1074
  layout: $?.border ? { colors: {
1061
1075
  headerBorderColor: $.border,
1062
1076
  sidebarBorderColor: $.border
1063
1077
  } } : void 0,
1064
1078
  section: $?.title ? { colors: { titleColor: $.title } } : void 0
1065
- }, Ft = V(() => ({
1079
+ }, It = B(() => ({
1066
1080
  required: Q.folderNameRequiredError ?? "Enter a folder name",
1067
1081
  invalid: Q.folderNameInvalidError ?? "Folder name can't contain / or \\, or be . or ..",
1068
1082
  duplicate: Q.folderNameDuplicateError ?? "An item with this name already exists here"
@@ -1070,176 +1084,176 @@ var Le = {
1070
1084
  Q.folderNameRequiredError,
1071
1085
  Q.folderNameInvalidError,
1072
1086
  Q.folderNameDuplicateError
1073
- ]), It = B((e) => {
1074
- gt.has(e) || _t(new Set([...gt, e]));
1075
- }, [gt, _t]), Lt = qe({
1087
+ ]), Lt = z((e) => {
1088
+ _t.has(e) || vt(new Set([..._t, e]));
1089
+ }, [_t, vt]), Rt = Je({
1076
1090
  files: i,
1077
- fileActions: z,
1091
+ fileActions: R,
1078
1092
  defaultName: Q.newFolderDefaultName ?? "New folder",
1079
- messages: Ft,
1080
- onRevealFolder: It,
1081
- onCreated: rt
1082
- }), { draftNode: Rt, draftPath: zt, draftPane: Bt } = Lt, Vt = V(() => Be([{
1083
- path: q,
1084
- name: q,
1085
- kind: J.File
1086
- }, ...i]), [i]), Ht = V(() => Rt ? Be([
1093
+ messages: It,
1094
+ onRevealFolder: Lt,
1095
+ onCreated: Z
1096
+ }), { draftNode: zt, draftPath: Bt, draftPane: Vt } = Rt, Ht = B(() => Ve([{
1097
+ path: K,
1098
+ name: K,
1099
+ kind: q.File
1100
+ }, ...i]), [i]), Ut = B(() => zt ? Ve([
1087
1101
  {
1088
- path: q,
1089
- name: q,
1090
- kind: J.File
1102
+ path: K,
1103
+ name: K,
1104
+ kind: q.File
1091
1105
  },
1092
1106
  ...i,
1093
- Rt
1094
- ]) : Vt, [
1107
+ zt
1108
+ ]) : Ht, [
1095
1109
  i,
1096
- Rt,
1097
- Vt
1098
- ]), Ut = V(() => i.find((e) => e.path === Z), [i, Z]), Wt = B((e) => {
1099
- e.path !== zt && rt(e.path);
1100
- }, [rt, zt]), Gt = B((e) => {
1101
- z.onRemoveNode(e), Z === e && rt(q);
1110
+ zt,
1111
+ Ht
1112
+ ]), Wt = B(() => i.find((e) => e.path === X), [i, X]), Gt = z((e) => {
1113
+ e.path !== Bt && Z(e.path);
1114
+ }, [Z, Bt]), Kt = z((e) => {
1115
+ R.onRemoveNode(e), X === e && Z(K);
1102
1116
  }, [
1103
- z,
1104
- Z,
1105
- rt
1106
- ]), { startDraft: Kt } = Lt, { onCreateFolder: qt, extractArchive: Jt, pickFromFileSystem: Yt } = z, Xt = B(async (e) => {
1107
- if (!Yt) return;
1108
- let t = await Yt();
1109
- t?.length && St({
1110
- mode: Xe.Files,
1117
+ R,
1118
+ X,
1119
+ Z
1120
+ ]), { startDraft: qt } = Rt, { onCreateFolder: Jt, extractArchive: Yt, pickFromFileSystem: Xt } = R, Zt = z(async (e) => {
1121
+ if (!Xt) return;
1122
+ let t = await Xt();
1123
+ t?.length && Ct({
1124
+ mode: Ze.Files,
1111
1125
  targetFolderPath: e,
1112
1126
  initialEntries: t
1113
1127
  });
1114
- }, [Yt, St]), Zt = B((e, t) => {
1115
- let n = (e) => Ze(e, jt), r = [];
1116
- return qt && r.push({
1128
+ }, [Xt, Ct]), Qt = z((e, t) => {
1129
+ let n = (e) => Qe(e, Mt), r = [];
1130
+ return Jt && r.push({
1117
1131
  key: "create-folder",
1118
1132
  label: Q.createFolderLabel ?? "Create folder",
1119
- icon: n(ae),
1120
- onClick: () => Kt(e, t)
1133
+ icon: n(oe),
1134
+ onClick: () => qt(e, t)
1121
1135
  }), r.push({
1122
1136
  key: "upload-files",
1123
1137
  label: Q.uploadFilesLabel ?? "Upload files from device",
1124
- icon: n(le),
1125
- onClick: () => St({
1126
- mode: Xe.Files,
1138
+ icon: n(ue),
1139
+ onClick: () => Ct({
1140
+ mode: Ze.Files,
1127
1141
  targetFolderPath: e
1128
1142
  })
1129
- }), Jt && r.push({
1143
+ }), Yt && r.push({
1130
1144
  key: "upload-archive",
1131
1145
  label: Q.uploadArchiveLabel ?? "Upload archive from device",
1132
- icon: n(ie),
1133
- onClick: () => St({
1134
- mode: Xe.Archive,
1146
+ icon: n(ae),
1147
+ onClick: () => Ct({
1148
+ mode: Ze.Archive,
1135
1149
  targetFolderPath: e
1136
1150
  })
1137
- }), Yt && r.push({
1151
+ }), Xt && r.push({
1138
1152
  key: "open-file-system",
1139
1153
  label: Q.openFileSystemLabel ?? "Open DIAL file system",
1140
- icon: n(ne),
1141
- onClick: () => void Xt(e)
1154
+ icon: n(re),
1155
+ onClick: () => void Zt(e)
1142
1156
  }), r;
1143
1157
  }, [
1144
- jt,
1145
- qt,
1158
+ Mt,
1146
1159
  Jt,
1147
1160
  Yt,
1161
+ Xt,
1148
1162
  Q.createFolderLabel,
1149
1163
  Q.uploadFilesLabel,
1150
1164
  Q.uploadArchiveLabel,
1151
1165
  Q.openFileSystemLabel,
1152
- Kt,
1153
- St,
1154
- Xt
1155
- ]), Qt = V(() => {
1156
- let e = Ue(Re.Header, i.find((e) => e.path === Z));
1166
+ qt,
1167
+ Ct,
1168
+ Zt
1169
+ ]), $t = B(() => {
1170
+ let e = We(ze.Header, i.find((e) => e.path === X));
1157
1171
  return {
1158
- [X.Mobile]: Zt(e, X.Mobile),
1159
- [X.Desktop]: Zt(e, X.Desktop)
1172
+ [Y.Mobile]: Qt(e, Y.Mobile),
1173
+ [Y.Desktop]: Qt(e, Y.Desktop)
1160
1174
  };
1161
1175
  }, [
1162
- Zt,
1176
+ Qt,
1163
1177
  i,
1164
- Z
1165
- ]), $t = B((e, t) => {
1166
- if (e.path === "SKILL.md" || e.path === zt) return [];
1178
+ X
1179
+ ]), en = z((e, t) => {
1180
+ if (e.path === "SKILL.md" || e.path === Bt) return [];
1167
1181
  let n = {
1168
1182
  path: e.path,
1169
1183
  name: e.name,
1170
- kind: e.nodeType === me.FOLDER ? J.Folder : J.File
1171
- }, r = n.kind === J.Folder ? Zt(Ue(Re.Child, n), t) : [];
1184
+ kind: e.nodeType === he.FOLDER ? q.Folder : q.File
1185
+ }, r = n.kind === q.Folder ? Qt(We(ze.Child, n), t) : [];
1172
1186
  return r.push({
1173
1187
  key: "add-sibling",
1174
- icon: Ze(se),
1188
+ icon: Qe(ce),
1175
1189
  label: Q.addSiblingLabel ?? "Add sibling",
1176
- children: Zt(Ue(Re.Sibling, n), t)
1190
+ children: Qt(We(ze.Sibling, n), t)
1177
1191
  }, {
1178
1192
  key: "delete",
1179
1193
  label: Q.deleteLabel ?? "Delete",
1180
1194
  danger: !0,
1181
- icon: Ze(ce, At),
1182
- onClick: () => Gt(e.path)
1195
+ icon: Qe(le, jt),
1196
+ onClick: () => Kt(e.path)
1183
1197
  }), r;
1184
1198
  }, [
1185
- zt,
1199
+ Bt,
1186
1200
  Q.addSiblingLabel,
1187
1201
  Q.deleteLabel,
1188
- At,
1189
- Zt,
1190
- Gt
1191
- ]), en = V(() => ({
1192
- [X.Mobile]: (e) => $t(e, X.Mobile),
1193
- [X.Desktop]: (e) => $t(e, X.Desktop)
1194
- }), [$t]), tn = (e) => /* @__PURE__ */ L("div", {
1202
+ jt,
1203
+ Qt,
1204
+ Kt
1205
+ ]), tn = B(() => ({
1206
+ [Y.Mobile]: (e) => en(e, Y.Mobile),
1207
+ [Y.Desktop]: (e) => en(e, Y.Desktop)
1208
+ }), [en]), nn = (e) => /* @__PURE__ */ I("div", {
1195
1209
  className: "flex flex-col gap-2 desktop:gap-5",
1196
- children: [/* @__PURE__ */ L("div", {
1210
+ children: [/* @__PURE__ */ I("div", {
1197
1211
  className: "flex items-center justify-between",
1198
- children: [/* @__PURE__ */ I("span", {
1199
- className: c(ot.title, Ot),
1212
+ children: [/* @__PURE__ */ F("span", {
1213
+ className: c(ot.title, kt),
1200
1214
  children: Q.filesHeading ?? "Files"
1201
- }), /* @__PURE__ */ I(p, {
1215
+ }), /* @__PURE__ */ F(p, {
1202
1216
  label: Q.addLabel ?? "Add",
1203
1217
  variant: m.Neutral,
1204
1218
  appearance: f.Solid,
1205
1219
  size: b.Small,
1206
- iconBefore: /* @__PURE__ */ I(se, {
1220
+ iconBefore: /* @__PURE__ */ F(ce, {
1207
1221
  size: g.SM,
1208
1222
  "aria-hidden": !0,
1209
1223
  stroke: _
1210
1224
  }),
1211
- items: Qt[e]
1225
+ items: $t[e]
1212
1226
  })]
1213
- }), /* @__PURE__ */ I("div", {
1227
+ }), /* @__PURE__ */ F("div", {
1214
1228
  role: "tree",
1215
1229
  "aria-label": Q.filesTreeAriaLabel ?? "Skill files",
1216
- children: /* @__PURE__ */ I(he, {
1217
- items: Bt === e ? Ht : Vt,
1230
+ children: /* @__PURE__ */ F(ge, {
1231
+ items: Vt === e ? Ut : Ht,
1218
1232
  showFiles: !0,
1219
- selectedPath: Z,
1220
- expandedPaths: gt,
1221
- onExpandedPathsChange: _t,
1222
- onItemClick: Wt,
1223
- getContextMenuItems: en[e],
1224
- renamedPath: Bt === e ? zt : void 0,
1225
- onRenameSave: Lt.handleSave,
1226
- onRenameCancel: Lt.handleCancel,
1227
- onRenameValidate: Lt.handleValidate,
1233
+ selectedPath: X,
1234
+ expandedPaths: _t,
1235
+ onExpandedPathsChange: vt,
1236
+ onItemClick: Gt,
1237
+ getContextMenuItems: tn[e],
1238
+ renamedPath: Vt === e ? Bt : void 0,
1239
+ onRenameSave: Rt.handleSave,
1240
+ onRenameCancel: Rt.handleCancel,
1241
+ onRenameValidate: Rt.handleValidate,
1228
1242
  rootItemPath: ""
1229
1243
  })
1230
1244
  })]
1231
- }), nn = V(() => ({
1232
- name: G.name,
1233
- description: G.description,
1245
+ }), rn = B(() => ({
1246
+ name: W.name,
1247
+ description: W.description,
1234
1248
  iconUrl: "",
1235
1249
  version: "",
1236
1250
  topics: [],
1237
1251
  otherLocales: []
1238
- }), [G.name, G.description]), rn = V(() => ({
1252
+ }), [W.name, W.description]), an = B(() => ({
1239
1253
  name: k?.name,
1240
1254
  description: k?.description
1241
- }), [k?.name, k?.description]), an = V(() => ({ form: {
1242
- ...Ne,
1255
+ }), [k?.name, k?.description]), on = B(() => ({ form: {
1256
+ ...Pe,
1243
1257
  name: {
1244
1258
  label: Q.nameLabel ?? "Name",
1245
1259
  placeholder: Q.namePlaceholder ?? "good-morning-breakfast"
@@ -1254,175 +1268,176 @@ var Le = {
1254
1268
  Q.namePlaceholder,
1255
1269
  Q.descriptionLabel,
1256
1270
  Q.descriptionPlaceholder
1257
- ]), on = (e) => {
1258
- e.name !== void 0 && Ae({ name: e.name }), e.description !== void 0 && (Pe.reset(), Ae({ description: e.description }));
1259
- }, sn = re ? (e, t) => /* @__PURE__ */ I(a, {
1271
+ ]), sn = (e) => {
1272
+ e.name !== void 0 && Me({ name: e.name }), e.description !== void 0 && (Le.reset(), Me({ description: e.description }));
1273
+ }, cn = ie ? (e, t) => /* @__PURE__ */ F(a, {
1260
1274
  isEnabled: !0,
1261
1275
  fieldId: t,
1262
1276
  required: !0,
1263
1277
  label: Q.descriptionLabel ?? "Description",
1264
1278
  labels: Q,
1265
- refinement: Pe,
1266
- disabled: Y || O,
1267
- ...Nt,
1279
+ refinement: Le,
1280
+ disabled: Be || O,
1281
+ ...Pt,
1268
1282
  children: e
1269
- }) : void 0, cn = {
1270
- title: be,
1271
- onBack: He,
1272
- onCancel: Ve,
1273
- onSubmit: We,
1283
+ }) : void 0, ln = {
1284
+ title: Se,
1285
+ onBack: Ge,
1286
+ onCancel: Ue,
1287
+ onSubmit: Ke,
1274
1288
  submitLabel: Q.createLabel ?? "Create",
1275
- isSubmitDisabled: Y || T || D,
1289
+ isSubmitDisabled: Be || T || D,
1276
1290
  labels: {
1277
1291
  cancelLabel: Q.cancelLabel ?? "Cancel",
1278
- backAriaLabel: ye ?? "Back",
1292
+ backAriaLabel: xe ?? "Back",
1279
1293
  savingStatusLabel: Q.savingStatusLabel ?? "Saving"
1280
1294
  },
1281
- styles: Pt,
1295
+ styles: Ft,
1282
1296
  metadataTitle: null
1283
1297
  };
1284
- if (T) return /* @__PURE__ */ I("div", {
1285
- dir: W,
1298
+ if (T) return /* @__PURE__ */ F("div", {
1299
+ dir: Ee,
1286
1300
  className: "relative flex min-h-0 flex-1 flex-col",
1287
- children: /* @__PURE__ */ I(Me, {
1288
- ...cn,
1289
- metadata: /* @__PURE__ */ I("div", {
1301
+ children: /* @__PURE__ */ F(Ne, {
1302
+ ...ln,
1303
+ metadata: /* @__PURE__ */ F("div", {
1290
1304
  role: "status",
1291
1305
  "aria-label": Q.loadingAriaLabel ?? "Loading skill",
1292
1306
  className: "flex flex-1 items-center justify-center p-8",
1293
- children: /* @__PURE__ */ I(j, {})
1307
+ children: /* @__PURE__ */ F(ne, {})
1294
1308
  })
1295
1309
  })
1296
1310
  });
1297
- if (D) return /* @__PURE__ */ I("div", {
1298
- dir: W,
1311
+ if (D) return /* @__PURE__ */ F("div", {
1312
+ dir: Ee,
1299
1313
  className: "relative flex min-h-0 flex-1 flex-col",
1300
- children: /* @__PURE__ */ I(Me, {
1301
- ...cn,
1302
- metadata: /* @__PURE__ */ L("div", {
1314
+ children: /* @__PURE__ */ F(Ne, {
1315
+ ...ln,
1316
+ metadata: /* @__PURE__ */ I("div", {
1303
1317
  role: "alert",
1304
1318
  className: "flex flex-col items-center gap-4 p-8",
1305
- children: [/* @__PURE__ */ I(x, { text: Q.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ I(A, {
1319
+ children: [/* @__PURE__ */ F(x, { text: Q.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ F(A, {
1306
1320
  label: Q.retryLabel ?? "Retry",
1307
- onClick: xe
1321
+ onClick: Ce
1308
1322
  })]
1309
1323
  })
1310
1324
  })
1311
1325
  });
1312
- let ln = Z === q, un = ln ? q : Q.selectedFileHeading?.(Ut?.name ?? Z) ?? Ut?.name ?? Z, dn = ee != null || te != null ? /* @__PURE__ */ L("div", {
1326
+ let un = X === K, dn = un ? K : Q.selectedFileHeading?.(Wt?.name ?? X) ?? Wt?.name ?? X, fn = ee != null || te != null ? /* @__PURE__ */ I("div", {
1313
1327
  className: "flex flex-col gap-2",
1314
- children: [ee != null && /* @__PURE__ */ L("div", {
1328
+ children: [ee != null && /* @__PURE__ */ I("div", {
1315
1329
  className: "flex items-center gap-2",
1316
- children: [/* @__PURE__ */ I(x, { text: ee }), Se != null && /* @__PURE__ */ I(C, {
1330
+ children: [/* @__PURE__ */ F(x, { text: ee }), we != null && /* @__PURE__ */ F(C, {
1317
1331
  label: Q.retryLabel ?? "Retry",
1318
- onClick: Se
1332
+ onClick: we
1319
1333
  })]
1320
- }), te != null && /* @__PURE__ */ L("div", {
1334
+ }), te != null && /* @__PURE__ */ I("div", {
1321
1335
  className: "flex items-center gap-2",
1322
- children: [/* @__PURE__ */ I(x, { text: te.message }), /* @__PURE__ */ I(C, {
1336
+ children: [/* @__PURE__ */ F(x, { text: te.message }), /* @__PURE__ */ F(C, {
1323
1337
  label: Q.reloadLatestLabel ?? "Reload latest",
1324
- onClick: M
1338
+ onClick: j
1325
1339
  })]
1326
1340
  })]
1327
- }) : void 0, fn = /* @__PURE__ */ I(a, {
1328
- isEnabled: !!oe,
1329
- fieldId: De,
1341
+ }) : void 0, pn = /* @__PURE__ */ F(a, {
1342
+ isEnabled: !!se,
1343
+ fieldId: ke,
1330
1344
  required: !0,
1331
- labelClassName: c(ot.helperText, kt),
1345
+ labelClassName: c(ot.helperText, At),
1332
1346
  label: Q.instructionsLabel ?? "Instructions",
1333
1347
  labels: Q,
1334
- refinement: Ie,
1335
- disabled: Y || O,
1336
- ...Nt,
1337
- children: /* @__PURE__ */ L("div", {
1348
+ refinement: J,
1349
+ disabled: Be || O,
1350
+ ...Pt,
1351
+ children: /* @__PURE__ */ I("div", {
1338
1352
  className: "flex flex-1 flex-col gap-2",
1339
1353
  children: [
1340
- !oe && /* @__PURE__ */ I(E, {
1341
- htmlFor: De,
1342
- className: c(ot.helperText, kt),
1354
+ !se && /* @__PURE__ */ F(E, {
1355
+ htmlFor: ke,
1356
+ className: c(ot.helperText, At),
1343
1357
  label: Q.instructionsLabel ?? "Instructions",
1344
1358
  required: !0
1345
1359
  }),
1346
- /* @__PURE__ */ I("div", {
1347
- ref: Oe,
1360
+ /* @__PURE__ */ F("div", {
1361
+ ref: Ae,
1348
1362
  className: c(t, e, n),
1349
- children: /* @__PURE__ */ I(ue, {
1350
- fallback: /* @__PURE__ */ I(j, { ariaLabel: Q.instructionsLoadingAriaLabel ?? "Loading" }),
1351
- children: /* @__PURE__ */ I(pt, {
1352
- id: De,
1363
+ children: /* @__PURE__ */ F(de, {
1364
+ fallback: /* @__PURE__ */ F(ne, { ariaLabel: Q.instructionsLoadingAriaLabel ?? "Loading" }),
1365
+ children: /* @__PURE__ */ F(pt, {
1366
+ id: ke,
1353
1367
  ariaLabel: Q.instructionsLabel ?? "Instructions",
1354
- value: G.instructions,
1368
+ value: W.instructions,
1355
1369
  onChange: (e) => {
1356
- Ie.reset(), Ae({ instructions: e });
1370
+ J.reset(), Me({ instructions: e });
1357
1371
  },
1358
- theme: Te,
1372
+ theme: De,
1359
1373
  showDragbar: !1,
1360
1374
  placeholder: Q.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
1361
1375
  })
1362
1376
  })
1363
1377
  }),
1364
- k?.instructions != null && /* @__PURE__ */ I(x, { text: k.instructions })
1378
+ k?.instructions != null && /* @__PURE__ */ F(x, { text: k.instructions })
1365
1379
  ]
1366
1380
  })
1367
1381
  });
1368
- return /* @__PURE__ */ L("div", {
1369
- dir: W,
1370
- className: c("relative flex min-h-0 flex-1 flex-col", Le.root),
1371
- style: Mt,
1372
- ...Et,
1382
+ return /* @__PURE__ */ I("div", {
1383
+ dir: Ee,
1384
+ className: c("relative flex min-h-0 flex-1 flex-col", Re.root),
1385
+ style: Nt,
1386
+ ...Dt,
1373
1387
  children: [
1374
- /* @__PURE__ */ I(Qe, {
1375
- isVisible: Tt && !vt,
1376
- labels: Ce
1388
+ /* @__PURE__ */ F($e, {
1389
+ isVisible: Et && !yt,
1390
+ labels: Te
1377
1391
  }),
1378
- /* @__PURE__ */ I(Me, {
1379
- ...cn,
1392
+ /* @__PURE__ */ F(Ne, {
1393
+ ...ln,
1394
+ asideData: _e,
1380
1395
  isSubmitting: O,
1381
1396
  metadataSectionClassName: dt,
1382
- metadata: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
1397
+ metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1383
1398
  className: "desktop:hidden",
1384
- children: /* @__PURE__ */ I(d, {
1399
+ children: /* @__PURE__ */ F(d, {
1385
1400
  title: Q.editingFileLabel ?? "Editing file",
1386
- description: Ut?.name ?? "SKILL.md",
1387
- expanded: Ct,
1388
- onToggle: wt,
1401
+ description: Wt?.name ?? "SKILL.md",
1402
+ expanded: wt,
1403
+ onToggle: Tt,
1389
1404
  ariaLabel: Q.editingFileLabel ?? "Editing file",
1390
- children: tn(X.Mobile)
1405
+ children: nn(Y.Mobile)
1391
1406
  })
1392
- }), /* @__PURE__ */ I("div", {
1407
+ }), /* @__PURE__ */ F("div", {
1393
1408
  className: "hidden desktop:block",
1394
- children: tn(X.Desktop)
1409
+ children: nn(Y.Desktop)
1395
1410
  })] }),
1396
- alert: dn,
1397
- setupTitle: un,
1411
+ alert: fn,
1412
+ setupTitle: dn,
1398
1413
  setupSectionClassName: ft,
1399
- setup: ln ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(Fe, {
1400
- values: nn,
1401
- errors: rn,
1402
- onChange: on,
1414
+ setup: un ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ie, {
1415
+ values: rn,
1416
+ errors: an,
1417
+ onChange: sn,
1403
1418
  fields: ct,
1404
1419
  isDescriptionRequired: !0,
1405
- isNameReadOnly: N,
1420
+ isNameReadOnly: M,
1406
1421
  nameCaption: k?.name ? void 0 : Q.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1407
- renderDescription: sn,
1408
- labels: an
1409
- }), fn] }) : /* @__PURE__ */ I(F, { children: Ut?.kind === J.File && /* @__PURE__ */ I("div", {
1422
+ renderDescription: cn,
1423
+ labels: on
1424
+ }), pn] }) : /* @__PURE__ */ F(P, { children: Wt?.kind === q.File && /* @__PURE__ */ F("div", {
1410
1425
  className: "flex min-h-0 flex-1 flex-col",
1411
- children: de ?? /* @__PURE__ */ I(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." })
1426
+ 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." })
1412
1427
  }) })
1413
1428
  }),
1414
- /* @__PURE__ */ I(at, {
1415
- isOpen: vt,
1416
- onClose: () => yt(!1),
1417
- fileActions: z,
1418
- mode: bt.mode,
1419
- targetFolderPath: bt.targetFolderPath,
1420
- initialFiles: bt.initialFiles,
1421
- initialEntries: bt.initialEntries,
1422
- labels: Ce
1429
+ /* @__PURE__ */ F(at, {
1430
+ isOpen: yt,
1431
+ onClose: () => bt(!1),
1432
+ fileActions: R,
1433
+ mode: xt.mode,
1434
+ targetFolderPath: xt.targetFolderPath,
1435
+ initialFiles: xt.initialFiles,
1436
+ initialEntries: xt.initialEntries,
1437
+ labels: Te
1423
1438
  })
1424
1439
  ]
1425
1440
  });
1426
1441
  };
1427
1442
  //#endregion
1428
- export { Le as SKILL_EDITOR_CLASS, mt as SkillEditor, $e as SkillFileCandidateKind, J as SkillFileNodeKind, Xe as SkillFileUploadMode, et as SkillFileValidationStatus };
1443
+ export { Re as SKILL_EDITOR_CLASS, mt as SkillEditor, et as SkillFileCandidateKind, q as SkillFileNodeKind, Ze as SkillFileUploadMode, tt as SkillFileValidationStatus };