@epam/ai-dial-skill-editor 1.3.0-dev.14 → 1.3.0-dev.141

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