@epam/ai-dial-skill-editor 1.1.0-dev.188 → 1.1.0-dev.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"SkillEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SkillEditor/SkillEditor.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAEL,EAAE,EASH,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,iCAAiC,CAAC;AAmBzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6b5C,CAAC"}
1
+ {"version":3,"file":"SkillEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SkillEditor/SkillEditor.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAEL,EAAE,EASH,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,iCAAiC,CAAC;AAqBzC,qFAAqF;AACrF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6c5C,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { SkillEditorLabels } from '../../models/skill-editor-props';
3
+ /** Props for `SkillFileDropOverlay`. */
4
+ export interface SkillFileDropOverlayProps {
5
+ /** Whether the overlay is shown. */
6
+ isVisible: boolean;
7
+ /** Text overrides. */
8
+ labels?: Pick<SkillEditorLabels, 'dropOverlayTitle' | 'dropOverlaySubtitle'>;
9
+ }
10
+ /**
11
+ * Full-surface overlay shown while a file-bearing drag is over the editor
12
+ * and the upload dialog isn't open yet, mirroring the chat composer's
13
+ * page-wide drag overlay so the interaction feels consistent app-wide.
14
+ */
15
+ export declare const SkillFileDropOverlay: FC<SkillFileDropOverlayProps>;
16
+ //# sourceMappingURL=SkillFileDropOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillFileDropOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/SkillFileDropOverlay/SkillFileDropOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,wCAAwC;AACxC,MAAM,WAAW,yBAAyB;IACxC,oCAAoC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,MAAM,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;CAC9E;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA0B9D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { SkillEditorFileActions, SkillEditorLabels } from '../../models/skill-editor-props';
3
+ /** Props for `SkillFileUploadDialog`. */
4
+ export interface SkillFileUploadDialogProps {
5
+ /** Whether the dialog is open. */
6
+ isOpen: boolean;
7
+ /** Called to close the dialog (Escape, close control, Cancel, or a successful commit). */
8
+ onClose: () => void;
9
+ /** Batch validation/commit operations, host-owned. */
10
+ fileActions: Pick<SkillEditorFileActions, 'validateBatch' | 'commitBatch'>;
11
+ /**
12
+ * Files to stage immediately when the dialog opens (e.g. files dropped
13
+ * outside the dialog before it was open). Read once per open transition.
14
+ */
15
+ initialFiles?: File[];
16
+ /** Text overrides. */
17
+ labels?: SkillEditorLabels;
18
+ }
19
+ /**
20
+ * Upload dialog offering drag-and-drop and click-to-browse multi-file
21
+ * staging, with per-row validation feedback and an atomic batch commit.
22
+ */
23
+ export declare const SkillFileUploadDialog: FC<SkillFileUploadDialogProps>;
24
+ //# sourceMappingURL=SkillFileUploadDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillFileUploadDialog.d.ts","sourceRoot":"","sources":["../../../src/components/SkillFileUploadDialog/SkillFileUploadDialog.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAe,EAAE,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAGlB,MAAM,iCAAiC,CAAC;AAOzC,yCAAyC;AACzC,MAAM,WAAW,0BAA0B;IACzC,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,0FAA0F;IAC1F,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sDAAsD;IACtD,WAAW,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,GAAG,aAAa,CAAC,CAAC;IAC3E;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,sBAAsB;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAWD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAoQhE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { DragEvent } from 'react';
2
+ /** React drag-event handlers to spread onto a drop-zone element. */
3
+ export interface SkillFileDropZoneHandlers {
4
+ /** Attach to the drop-zone element's `onDragEnter`. */
5
+ onDragEnter: (event: DragEvent<HTMLElement>) => void;
6
+ /** Attach to the drop-zone element's `onDragLeave`. */
7
+ onDragLeave: (event: DragEvent<HTMLElement>) => void;
8
+ /** Attach to the drop-zone element's `onDragOver`. */
9
+ onDragOver: (event: DragEvent<HTMLElement>) => void;
10
+ /** Attach to the drop-zone element's `onDrop`. */
11
+ onDrop: (event: DragEvent<HTMLElement>) => void;
12
+ }
13
+ /** State and handlers returned by `useSkillFileDropZone`. */
14
+ export interface SkillFileDropZoneState {
15
+ /** Whether a file-bearing drag is currently over the drop zone. */
16
+ isDragActive: boolean;
17
+ /** Handlers to spread onto the drop-zone element. */
18
+ dropZoneHandlers: SkillFileDropZoneHandlers;
19
+ }
20
+ /**
21
+ * Scoped drag-and-drop state for a single drop-zone element, using the same
22
+ * nested-enter/leave counting technique as the app's page-wide
23
+ * `usePageFileDrag`, but attached directly to the element's own React drag
24
+ * events instead of `document` listeners.
25
+ */
26
+ export declare const useSkillFileDropZone: (onFilesDropped: (files: File[]) => void) => SkillFileDropZoneState;
27
+ //# sourceMappingURL=useSkillFileDropZone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillFileDropZone.d.ts","sourceRoot":"","sources":["../../src/hooks/useSkillFileDropZone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,oEAAoE;AACpE,MAAM,WAAW,yBAAyB;IACxC,uDAAuD;IACvD,WAAW,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrD,uDAAuD;IACvD,WAAW,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrD,sDAAsD;IACtD,UAAU,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACpD,kDAAkD;IAClD,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACjD;AAED,6DAA6D;AAC7D,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,gBAAgB,EAAE,yBAAyB,CAAC;CAC7C;AAKD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,KACtC,sBAyCF,CAAC"}
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { SkillEditor } from './components/SkillEditor/SkillEditor';
2
- export type { SkillEditorColors, SkillEditorConflict, SkillEditorErrors, SkillEditorFileActions, SkillEditorLabels, SkillEditorProps, SkillEditorStyles, SkillEditorTypography, SkillEditorValues, SkillFileTreeNode, } from './models/skill-editor-props';
2
+ export type { SkillEditorColors, SkillEditorConflict, SkillEditorErrors, SkillEditorFileActions, SkillEditorLabels, SkillEditorProps, SkillEditorStyles, SkillEditorTypography, SkillEditorValues, SkillFileBatchError, SkillFileCommitResult, SkillFileTreeNode, SkillFileUploadCandidate, SkillFileValidationResult, } from './models/skill-editor-props';
3
+ export { SkillFileCandidateKind, SkillFileValidationStatus, } from './models/skill-editor-props';
3
4
  export { SkillFileNodeKind } from './types/skill-file-node-kind';
4
5
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
package/index.js CHANGED
@@ -1,48 +1,70 @@
1
- import { buildCssVars as e, mergeClasses as t } from "@epam/ai-dial-chat-shared";
2
- import { DialFileNodeType as n, DialFoldersTree as r } from "@epam/ai-dial-react-file-manager";
3
- import { Accordion as i, CaptionText as ee, ConfirmationPopup as te, ConfirmationPopupVariant as ne, ErrorText as a, GhostButton as o, Input as re, LazyMarkdownEditor as s, NeutralButton as ie, PrimaryButton as c, Spinner as l, Textarea as ae } from "@epam/ai-dial-ui-kit";
4
- import { IconPlus as oe, IconTrashX as se } from "@tabler/icons-react";
5
- import { Suspense as ce, lazy as u, useCallback as d, useEffect as f, useId as p, useMemo as m, useRef as h, useState as g } from "react";
6
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
7
- //#region src/types/skill-editor-defaults.ts
8
- var b = "SKILL.md", x = /* @__PURE__ */ function(e) {
1
+ import { buildCssVars as e, formatFileSize as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
2
+ import { DialFileNodeType as r, DialFoldersTree as i } from "@epam/ai-dial-react-file-manager";
3
+ import { Accordion as a, CaptionText as ee, ConfirmationPopup as o, ConfirmationPopupVariant as s, EditorThemes as c, ErrorText as l, GhostButton as u, GhostIconButton as te, Input as d, LazyMarkdownEditor as f, NeutralButton as p, Popup as ne, PopupSize as m, PrimaryButton as h, Spinner as g, Textarea as _ } from "@epam/ai-dial-ui-kit";
4
+ import { IconFileText as re, IconPlus as v, IconTrashX as ie, IconUpload as y } from "@tabler/icons-react";
5
+ import { Suspense as ae, lazy as b, useCallback as x, useEffect as S, useId as C, useMemo as w, useRef as T, useState as E } from "react";
6
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
7
+ //#region src/hooks/useSkillFileDropZone.ts
8
+ var A = (e) => !!e.dataTransfer?.types.includes("Files"), oe = (e) => {
9
+ let [t, n] = E(!1), r = T(0);
10
+ return {
11
+ isDragActive: t,
12
+ dropZoneHandlers: {
13
+ onDragEnter: x((e) => {
14
+ A(e) && (e.preventDefault(), r.current += 1, n(!0));
15
+ }, []),
16
+ onDragLeave: x((e) => {
17
+ A(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
18
+ }, []),
19
+ onDragOver: x((e) => {
20
+ A(e) && e.preventDefault();
21
+ }, []),
22
+ onDrop: x((t) => {
23
+ if (!A(t)) return;
24
+ t.preventDefault(), r.current = 0, n(!1);
25
+ let i = Array.from(t.dataTransfer?.files ?? []);
26
+ i.length > 0 && e(i);
27
+ }, [e])
28
+ }
29
+ };
30
+ }, j = "SKILL.md", M = /* @__PURE__ */ function(e) {
9
31
  return e.File = "file", e.Folder = "folder", e;
10
- }({}), S = (e) => {
32
+ }({}), N = (e) => {
11
33
  let t = e.lastIndexOf("/");
12
34
  return t === -1 ? null : e.slice(0, t);
13
- }, C = (e) => {
35
+ }, P = (e) => {
14
36
  let t = e.lastIndexOf("/");
15
37
  return t === -1 ? e : e.slice(t + 1);
16
- }, le = (e) => {
17
- let t = /* @__PURE__ */ new Map(), r = (e) => {
18
- let r = t.get(e);
19
- if (r) return r;
38
+ }, se = (e) => {
39
+ let t = /* @__PURE__ */ new Map(), n = (e) => {
40
+ let n = t.get(e);
41
+ if (n) return n;
20
42
  let i = {
21
43
  path: e,
22
- name: C(e),
23
- nodeType: n.FOLDER,
24
- parentPath: S(e),
44
+ name: P(e),
45
+ nodeType: r.FOLDER,
46
+ parentPath: N(e),
25
47
  folderId: e,
26
48
  items: []
27
49
  };
28
50
  return t.set(e, i), i;
29
51
  };
30
52
  for (let i of e) {
31
- if (i.kind === x.Folder) {
32
- r(i.path);
53
+ if (i.kind === M.Folder) {
54
+ n(i.path);
33
55
  continue;
34
56
  }
35
57
  t.set(i.path, {
36
58
  path: i.path,
37
59
  name: i.name,
38
- nodeType: n.ITEM,
39
- parentPath: S(i.path),
40
- folderId: S(i.path) ?? ""
60
+ nodeType: r.ITEM,
61
+ parentPath: N(i.path),
62
+ folderId: N(i.path) ?? ""
41
63
  });
42
64
  }
43
65
  for (let t of [...e]) {
44
- let e = S(t.path);
45
- for (; e != null;) r(e), e = S(e);
66
+ let e = N(t.path);
67
+ for (; e != null;) n(e), e = N(e);
46
68
  }
47
69
  let i = [];
48
70
  for (let e of t.values()) {
@@ -54,285 +76,467 @@ var b = "SKILL.md", x = /* @__PURE__ */ function(e) {
54
76
  n ? n.items = [...n.items ?? [], e] : i.push(e);
55
77
  }
56
78
  return i;
57
- }, w = {
79
+ }, ce = ({ isVisible: e, labels: t }) => {
80
+ if (!e) return null;
81
+ let r = t ?? {};
82
+ return /* @__PURE__ */ O("div", {
83
+ role: "status",
84
+ "aria-live": "polite",
85
+ className: n("pointer-events-none absolute inset-0 z-[100] flex items-center justify-center backdrop-blur-sm"),
86
+ children: /* @__PURE__ */ k("div", {
87
+ className: "flex flex-col items-center text-center",
88
+ children: [
89
+ /* @__PURE__ */ O(y, {
90
+ size: 100,
91
+ className: "text-accent-primary",
92
+ "aria-hidden": !0
93
+ }),
94
+ /* @__PURE__ */ O("span", {
95
+ className: "dial-h3-text mt-5",
96
+ children: r.dropOverlayTitle ?? "Upload files"
97
+ }),
98
+ /* @__PURE__ */ O("span", {
99
+ className: "dial-small-text mt-4",
100
+ children: r.dropOverlaySubtitle ?? "Drop files here to add them to this skill"
101
+ })
102
+ ]
103
+ })
104
+ });
105
+ }, F = /* @__PURE__ */ function(e) {
106
+ return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
107
+ }({}), I = /* @__PURE__ */ function(e) {
108
+ return e.Valid = "valid", e.Invalid = "invalid", e;
109
+ }({}), L = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), R = 0, z = () => `skill-file-candidate-${++R}`, le = ({ isOpen: e, onClose: r, fileActions: i, initialFiles: a, labels: ee }) => {
110
+ let o = ee ?? {}, s = T(null), [c, d] = E([]), [f, p] = E(/* @__PURE__ */ new Map()), [_, v] = E([]), [ae, b] = E(!1), [x, w] = E(), [D, A] = E(!1), j = C(), M = (e) => {
111
+ let t = e.map((e) => ({
112
+ id: z(),
113
+ file: e,
114
+ path: L(e)
115
+ }));
116
+ w(void 0), d((e) => [...e, ...t]);
117
+ }, N = (e) => {
118
+ d((t) => t.filter((t) => t.id !== e));
119
+ }, { isDragActive: P, dropZoneHandlers: se } = oe(M);
120
+ S(() => {
121
+ e && (d((a ?? []).map((e) => ({
122
+ id: z(),
123
+ file: e,
124
+ path: L(e)
125
+ }))), p(/* @__PURE__ */ new Map()), v([]), w(void 0));
126
+ }, [e]), S(() => {
127
+ if (!e) return;
128
+ let t = !1;
129
+ if (c.length === 0) {
130
+ p(/* @__PURE__ */ new Map()), v([]);
131
+ return;
132
+ }
133
+ return b(!0), i.validateBatch(c).then(({ results: e, batchErrors: n }) => {
134
+ t || (p(new Map(e.map((e) => [e.candidateId, e]))), v(n.map((e) => e.message)));
135
+ }).finally(() => {
136
+ t || b(!1);
137
+ }), () => {
138
+ t = !0;
139
+ };
140
+ }, [c, e]);
141
+ let ce = (e) => {
142
+ let t = Array.from(e.target.files ?? []);
143
+ e.target.value = "", t.length > 0 && M(t);
144
+ }, R = c.some((e) => f.get(e.id)?.status === I.Invalid), le = c.length > 0 && c.every((e) => f.get(e.id)?.status === I.Invalid), B = c.length > 0 && !R && _.length === 0 && !ae && !D, ue = async () => {
145
+ A(!0), w(void 0);
146
+ try {
147
+ let { results: e, batchErrors: t } = await i.validateBatch(c), n = new Map(e.map((e) => [e.candidateId, e]));
148
+ if (p(n), v(t.map((e) => e.message)), c.some((e) => n.get(e.id)?.status === I.Invalid) || t.length > 0) return;
149
+ let a = await i.commitBatch(c);
150
+ if (a.error) {
151
+ w(a.error);
152
+ return;
153
+ }
154
+ r();
155
+ } finally {
156
+ A(!1);
157
+ }
158
+ };
159
+ return /* @__PURE__ */ O(ne, {
160
+ open: e,
161
+ header: o.uploadDialogTitle ?? "Upload files from device",
162
+ size: m.Sm,
163
+ closeAriaLabel: o.uploadDialogCloseAriaLabel ?? "Close",
164
+ onClose: r,
165
+ footer: /* @__PURE__ */ k("div", {
166
+ className: "flex min-h-[44px] items-center justify-end gap-2 px-6 py-4",
167
+ children: [/* @__PURE__ */ O(u, {
168
+ label: o.uploadCancelLabel ?? "Cancel",
169
+ onClick: r
170
+ }), /* @__PURE__ */ O(h, {
171
+ label: o.uploadConfirmLabel ?? "Add",
172
+ iconBefore: D ? /* @__PURE__ */ O(g, {
173
+ size: 16,
174
+ ariaLabel: ""
175
+ }) : void 0,
176
+ onClick: () => void ue(),
177
+ disabled: !B
178
+ })]
179
+ }),
180
+ children: /* @__PURE__ */ k("div", {
181
+ className: "flex flex-col gap-4 px-6 py-4",
182
+ children: [
183
+ /* @__PURE__ */ k("div", {
184
+ role: "button",
185
+ tabIndex: 0,
186
+ "aria-label": o.uploadDropZoneAriaLabel ?? "Upload files",
187
+ className: n("bg-layer-2 flex min-h-[164px] cursor-pointer flex-col items-center justify-center gap-4 rounded-lg border border-dashed border-secondary px-6 py-9 focus-visible:outline focus-visible:outline-focus-black", P && "border-accent-primary bg-layer-3", le && "border-error"),
188
+ onClick: () => s.current?.click(),
189
+ onKeyDown: (e) => {
190
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.current?.click());
191
+ },
192
+ ...se,
193
+ children: [/* @__PURE__ */ O(y, {
194
+ size: 32,
195
+ "aria-hidden": !0
196
+ }), /* @__PURE__ */ k("div", {
197
+ className: "flex flex-col items-center gap-2 text-center",
198
+ children: [/* @__PURE__ */ O("span", {
199
+ className: "dial-small-text desktop:hidden",
200
+ children: o.uploadDropZoneMobileLabel ?? "Click here to upload"
201
+ }), /* @__PURE__ */ O("span", {
202
+ className: "dial-small-text hidden desktop:inline",
203
+ children: o.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
204
+ })]
205
+ })]
206
+ }),
207
+ /* @__PURE__ */ O("input", {
208
+ ref: s,
209
+ type: "file",
210
+ multiple: !0,
211
+ className: "hidden",
212
+ onChange: ce
213
+ }),
214
+ /* @__PURE__ */ O("span", {
215
+ role: "status",
216
+ "aria-live": "polite",
217
+ className: "sr-only",
218
+ id: j,
219
+ children: _.map((e) => `${o.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
220
+ }),
221
+ _.map((e) => /* @__PURE__ */ O(l, { text: e }, e)),
222
+ c.length > 0 && /* @__PURE__ */ O("ul", {
223
+ className: "flex flex-col gap-2",
224
+ children: c.map((e) => {
225
+ let n = f.get(e.id), r = n?.kind === F.Manifest, i = n?.status === I.Invalid;
226
+ return /* @__PURE__ */ k("li", {
227
+ className: "flex items-center gap-2 rounded-lg border border-tertiary p-2",
228
+ children: [
229
+ /* @__PURE__ */ O(re, {
230
+ size: 20,
231
+ "aria-hidden": !0
232
+ }),
233
+ /* @__PURE__ */ k("div", {
234
+ className: "flex min-w-0 flex-1 flex-col",
235
+ children: [
236
+ /* @__PURE__ */ O("span", {
237
+ className: "dial-small-text truncate",
238
+ children: e.path
239
+ }),
240
+ /* @__PURE__ */ O("span", {
241
+ className: "dial-tiny-text text-secondary",
242
+ children: t(e.file.size)
243
+ }),
244
+ i && n?.error && /* @__PURE__ */ O(l, { text: n.error }),
245
+ r && !i && /* @__PURE__ */ O("span", {
246
+ className: "dial-tiny-text text-secondary",
247
+ children: o.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
248
+ })
249
+ ]
250
+ }),
251
+ /* @__PURE__ */ O(te, {
252
+ icon: /* @__PURE__ */ O(ie, {
253
+ size: 16,
254
+ "aria-hidden": !0
255
+ }),
256
+ "aria-label": o.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
257
+ onClick: () => N(e.id)
258
+ })
259
+ ]
260
+ }, e.id);
261
+ })
262
+ }),
263
+ x && /* @__PURE__ */ O(l, { text: x })
264
+ ]
265
+ })
266
+ });
267
+ }, B = {
58
268
  title: "_title_l82ak_1",
59
269
  helperText: "_helperText_l82ak_5",
60
270
  headerBorder: "_headerBorder_l82ak_9",
61
271
  sidebarBorder: "_sidebarBorder_l82ak_13",
62
272
  actionBarBorder: "_actionBarBorder_l82ak_17"
63
- }, ue = u(async () => {
64
- let { MarkdownEditor: e } = await s();
273
+ }, ue = b(async () => {
274
+ let { MarkdownEditor: e } = await f();
65
275
  return { default: e };
66
- }), T = ({ initialValues: n, files: s, selectedPath: u, onSelectedPathChange: S, expandedPaths: C, onExpandedPathsChange: T, isLoading: de = !1, hasLoadError: fe = !1, isSubmitting: E = !1, errors: D, submitError: O, conflict: k, onReloadLatest: pe, isNameReadOnly: me = !1, onDirtyChange: A, fileActions: j, headerContent: he, supportingFileContent: ge, onSubmit: _e, onCancel: ve, onRetry: ye, labels: be, styles: M, dir: xe, instructionsEditorTheme: Se = "light" }) => {
67
- let [N, P] = g({
68
- name: n?.name ?? "",
69
- description: n?.description ?? "",
70
- instructions: n?.instructions ?? ""
71
- }), F = h(s);
72
- f(() => {
73
- P({
74
- name: n?.name ?? "",
75
- description: n?.description ?? "",
76
- instructions: n?.instructions ?? ""
77
- }), F.current = s;
78
- }, [n]);
79
- let I = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), L = h(!1);
80
- f(() => {
276
+ }), de = ({ initialValues: t, files: r, selectedPath: te, onSelectedPathChange: f, expandedPaths: ne, onExpandedPathsChange: m, isLoading: re = !1, hasLoadError: y = !1, isSubmitting: b = !1, errors: A, submitError: N, conflict: P, onReloadLatest: F, isNameReadOnly: I = !1, onDirtyChange: L, fileActions: R, headerContent: z, supportingFileContent: de, onSubmit: fe, onCancel: pe, onRetry: me, labels: V, styles: he, dir: ge, instructionsEditorTheme: _e = c.light }) => {
277
+ let [H, U] = E({
278
+ name: t?.name ?? "",
279
+ description: t?.description ?? "",
280
+ instructions: t?.instructions ?? ""
281
+ }), ve = T(r);
282
+ S(() => {
283
+ U({
284
+ name: t?.name ?? "",
285
+ description: t?.description ?? "",
286
+ instructions: t?.instructions ?? ""
287
+ }), ve.current = r;
288
+ }, [t]);
289
+ let ye = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), be = T(!1);
290
+ S(() => {
81
291
  let e = {
82
- name: n?.name ?? "",
83
- description: n?.description ?? "",
84
- instructions: n?.instructions ?? ""
85
- }, t = JSON.stringify(N) !== JSON.stringify(e) || I(s) !== I(F.current);
86
- t !== L.current && (L.current = t, A?.(t));
292
+ name: t?.name ?? "",
293
+ description: t?.description ?? "",
294
+ instructions: t?.instructions ?? ""
295
+ }, n = JSON.stringify(H) !== JSON.stringify(e) || ye(r) !== ye(ve.current);
296
+ n !== be.current && (be.current = n, L?.(n));
87
297
  }, [
88
- N,
89
- s,
90
- n,
91
- A
298
+ H,
299
+ r,
300
+ t,
301
+ L
92
302
  ]);
93
- let [R, Ce] = g(b), z = u ?? R, B = d((e) => {
94
- Ce(e), S?.(e);
95
- }, [S]), [we, Te] = g([]), V = C ?? we, Ee = m(() => new Set(V), [V]), De = d((e) => {
303
+ let [xe, Se] = E(j), W = te ?? xe, G = x((e) => {
304
+ Se(e), f?.(e);
305
+ }, [f]), [Ce, we] = E([]), Te = ne ?? Ce, Ee = w(() => new Set(Te), [Te]), De = x((e) => {
96
306
  let t = [...e];
97
- Te(t), T?.(t);
98
- }, [T]), [H, U] = g(null), [W, G] = g(), K = h(null), [Oe, ke] = g(!0), q = be ?? {}, J = M?.colors, Y = M?.typography ?? {}, X = Y.titleClassName ?? "dial-body-semi-text", Ae = Y.helperTextClassName ?? "dial-tiny-semi-text", je = e({
99
- "--se-title-color": J?.title,
100
- "--se-helper-text-color": J?.helperText,
101
- "--se-border-color": J?.border
102
- }), Me = m(() => le([{
103
- path: b,
104
- name: b,
105
- kind: x.File
106
- }, ...s]), [s]), Z = m(() => s.find((e) => e.path === z), [s, z]), Ne = d((e) => {
107
- B(e.path);
108
- }, [B]), Pe = d((e) => e.path === "SKILL.md" ? [] : [{
307
+ we(t), m?.(t);
308
+ }, [m]), [K, q] = E(null), [J, Y] = E(!1), [Oe, X] = E(), [ke, Ae] = E(!0), { isDragActive: je, dropZoneHandlers: Me } = oe(x((e) => {
309
+ J || (X(e), Y(!0));
310
+ }, [J])), Z = V ?? {}, Q = he?.colors, Ne = he?.typography ?? {}, Pe = Ne.titleClassName ?? "dial-body-semi-text", Fe = Ne.helperTextClassName ?? "dial-tiny-semi-text", Ie = e({
311
+ "--se-title-color": Q?.title,
312
+ "--se-helper-text-color": Q?.helperText,
313
+ "--se-border-color": Q?.border
314
+ }), Le = w(() => se([{
315
+ path: j,
316
+ name: j,
317
+ kind: M.File
318
+ }, ...r]), [r]), $ = w(() => r.find((e) => e.path === W), [r, W]), Re = x((e) => {
319
+ G(e.path);
320
+ }, [G]), ze = x((e) => e.path === "SKILL.md" ? [] : [{
109
321
  key: "remove",
110
- label: /* @__PURE__ */ v("span", {
322
+ label: /* @__PURE__ */ O("span", {
111
323
  className: "text-error",
112
- children: q.removeLabel ?? "Remove"
324
+ children: Z.removeLabel ?? "Remove"
113
325
  }),
114
326
  danger: !0,
115
- icon: /* @__PURE__ */ v(se, {
327
+ icon: /* @__PURE__ */ O(ie, {
116
328
  size: 16,
117
329
  className: "text-error",
118
330
  "aria-hidden": !0
119
331
  }),
120
- onClick: () => U(e.path)
121
- }], [q.removeLabel]), Fe = async (e) => {
122
- let t = e.target.files?.[0];
123
- if (e.target.value = "", !t) return;
124
- let n = j.validatePath(t.name);
125
- if (n) {
126
- G(n);
127
- return;
128
- }
129
- G(void 0);
130
- try {
131
- await j.onUploadFile(t, t.name);
132
- } catch (e) {
133
- G(e instanceof Error ? e.message : String(e));
134
- }
135
- }, Ie = p(), Le = p(), Q = /* @__PURE__ */ y("div", {
332
+ onClick: () => q(e.path)
333
+ }], [Z.removeLabel]), Be = C(), Ve = C(), He = /* @__PURE__ */ k("div", {
136
334
  className: "flex flex-col gap-2 desktop:gap-5",
137
- children: [
138
- /* @__PURE__ */ y("div", {
139
- className: "flex items-center justify-between",
140
- children: [/* @__PURE__ */ v("span", {
141
- className: t(w.title, X),
142
- children: q.filesHeading ?? "Files"
143
- }), /* @__PURE__ */ v(ie, {
144
- label: q.addUploadLabel ?? "Upload from device",
145
- iconBefore: /* @__PURE__ */ v(oe, {
146
- size: 16,
147
- "aria-hidden": !0
148
- }),
149
- onClick: () => K.current?.click()
150
- })]
151
- }),
152
- /* @__PURE__ */ v("input", {
153
- ref: K,
154
- type: "file",
155
- className: "hidden",
156
- onChange: Fe
157
- }),
158
- W && /* @__PURE__ */ v(a, { text: W }),
159
- /* @__PURE__ */ v("div", {
160
- id: Ie,
161
- role: "tree",
162
- "aria-label": q.filesTreeAriaLabel ?? "Skill files",
163
- children: /* @__PURE__ */ v(r, {
164
- items: Me,
165
- showFiles: !0,
166
- selectedPath: z,
167
- expandedPaths: Ee,
168
- onExpandedPathsChange: De,
169
- onItemClick: Ne,
170
- getContextMenuItems: Pe,
171
- rootItemPath: ""
172
- })
335
+ children: [/* @__PURE__ */ k("div", {
336
+ className: "flex items-center justify-between",
337
+ children: [/* @__PURE__ */ O("span", {
338
+ className: n(B.title, Pe),
339
+ children: Z.filesHeading ?? "Files"
340
+ }), /* @__PURE__ */ O(p, {
341
+ label: Z.addUploadLabel ?? "Upload from device",
342
+ iconBefore: /* @__PURE__ */ O(v, {
343
+ size: 16,
344
+ "aria-hidden": !0
345
+ }),
346
+ onClick: () => {
347
+ X(void 0), Y(!0);
348
+ }
349
+ })]
350
+ }), /* @__PURE__ */ O("div", {
351
+ id: Be,
352
+ role: "tree",
353
+ "aria-label": Z.filesTreeAriaLabel ?? "Skill files",
354
+ children: /* @__PURE__ */ O(i, {
355
+ items: Le,
356
+ showFiles: !0,
357
+ selectedPath: W,
358
+ expandedPaths: Ee,
359
+ onExpandedPathsChange: De,
360
+ onItemClick: Re,
361
+ getContextMenuItems: ze,
362
+ rootItemPath: ""
173
363
  })
174
- ]
175
- }), Re = E ? q.savingStatusLabel ?? "Saving" : "", $ = /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(o, {
176
- label: q.cancelLabel ?? "Cancel",
177
- onClick: ve,
178
- disabled: E
179
- }), /* @__PURE__ */ v(c, {
180
- label: q.createLabel ?? "Create",
181
- iconBefore: E ? /* @__PURE__ */ v(l, {
364
+ })]
365
+ }), Ue = b ? Z.savingStatusLabel ?? "Saving" : "", We = /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(u, {
366
+ label: Z.cancelLabel ?? "Cancel",
367
+ onClick: pe,
368
+ disabled: b
369
+ }), /* @__PURE__ */ O(h, {
370
+ label: Z.createLabel ?? "Create",
371
+ iconBefore: b ? /* @__PURE__ */ O(g, {
182
372
  size: 16,
183
373
  ariaLabel: ""
184
374
  }) : void 0,
185
- onClick: () => _e(N),
186
- disabled: E
375
+ onClick: () => fe(H),
376
+ disabled: b
187
377
  })] });
188
- return de ? /* @__PURE__ */ v("div", {
378
+ return re ? /* @__PURE__ */ O("div", {
189
379
  className: "flex h-full items-center justify-center",
190
- children: /* @__PURE__ */ v(l, { ariaLabel: q.loadingAriaLabel ?? "Loading skill" })
191
- }) : fe ? /* @__PURE__ */ y("div", {
380
+ children: /* @__PURE__ */ O(g, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
381
+ }) : y ? /* @__PURE__ */ k("div", {
192
382
  role: "alert",
193
383
  className: "flex flex-col items-center gap-4 p-8",
194
- children: [/* @__PURE__ */ v(a, { text: q.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ v(c, {
195
- label: q.retryLabel ?? "Retry",
196
- onClick: ye
384
+ children: [/* @__PURE__ */ O(l, { text: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ O(h, {
385
+ label: Z.retryLabel ?? "Retry",
386
+ onClick: me
197
387
  })]
198
- }) : /* @__PURE__ */ y("div", {
199
- dir: xe,
200
- className: "flex h-full flex-col",
201
- style: je,
388
+ }) : /* @__PURE__ */ k("div", {
389
+ dir: ge,
390
+ className: "relative flex h-full flex-col",
391
+ style: Ie,
392
+ ...Me,
202
393
  children: [
203
- /* @__PURE__ */ v("span", {
394
+ /* @__PURE__ */ O(ce, {
395
+ isVisible: je && !J,
396
+ labels: V
397
+ }),
398
+ /* @__PURE__ */ O("span", {
204
399
  role: "status",
205
400
  "aria-live": "polite",
206
401
  className: "sr-only",
207
- id: Le,
208
- children: Re
402
+ id: Ve,
403
+ children: Ue
209
404
  }),
210
- O && /* @__PURE__ */ v("div", {
405
+ N && /* @__PURE__ */ O("div", {
211
406
  role: "alert",
212
407
  className: "px-4 pt-2",
213
- children: /* @__PURE__ */ v(a, { text: O })
408
+ children: /* @__PURE__ */ O(l, { text: N })
214
409
  }),
215
- k && /* @__PURE__ */ y("div", {
410
+ P && /* @__PURE__ */ k("div", {
216
411
  role: "alert",
217
412
  className: "flex items-center gap-2 px-4 pt-2",
218
- children: [/* @__PURE__ */ v(a, { text: k.message }), /* @__PURE__ */ v(o, {
219
- label: q.reloadLatestLabel ?? "Reload latest",
220
- onClick: pe
413
+ children: [/* @__PURE__ */ O(l, { text: P.message }), /* @__PURE__ */ O(u, {
414
+ label: Z.reloadLatestLabel ?? "Reload latest",
415
+ onClick: F
221
416
  })]
222
417
  }),
223
- /* @__PURE__ */ y("div", {
224
- className: t("hidden items-center justify-between gap-2 border-b px-4 py-2 desktop:flex desktop:px-8 desktop:pb-3 desktop:pt-3", w.headerBorder),
225
- children: [/* @__PURE__ */ v("div", {
418
+ /* @__PURE__ */ k("div", {
419
+ className: n("hidden items-center justify-between gap-2 border-b px-4 py-2 desktop:flex desktop:px-8 desktop:pb-3 desktop:pt-3", B.headerBorder),
420
+ children: [/* @__PURE__ */ O("div", {
226
421
  className: "flex min-w-0 flex-1 items-center gap-2",
227
- children: he
228
- }), /* @__PURE__ */ v("div", {
422
+ children: z
423
+ }), /* @__PURE__ */ O("div", {
229
424
  className: "flex shrink-0 items-center gap-2",
230
- children: $
425
+ children: We
231
426
  })]
232
427
  }),
233
- /* @__PURE__ */ y("div", {
428
+ /* @__PURE__ */ k("div", {
234
429
  className: "flex flex-1 flex-col gap-4 overflow-y-auto px-4 pb-20 desktop:flex-row desktop:gap-0 desktop:px-0 desktop:pb-0",
235
430
  children: [
236
- /* @__PURE__ */ v("div", {
431
+ /* @__PURE__ */ O("div", {
237
432
  className: "desktop:hidden",
238
- children: /* @__PURE__ */ v(i, {
239
- title: q.editingFileLabel ?? "Editing file",
240
- description: Z?.name ?? "SKILL.md",
241
- expanded: Oe,
242
- onToggle: ke,
243
- ariaLabel: q.editingFileLabel ?? "Editing file",
244
- children: Q
433
+ children: /* @__PURE__ */ O(a, {
434
+ title: Z.editingFileLabel ?? "Editing file",
435
+ description: $?.name ?? "SKILL.md",
436
+ expanded: ke,
437
+ onToggle: Ae,
438
+ ariaLabel: Z.editingFileLabel ?? "Editing file",
439
+ children: He
245
440
  })
246
441
  }),
247
- /* @__PURE__ */ v("div", {
248
- className: t("hidden border-e desktop:block desktop:w-[360px] desktop:shrink-0 desktop:px-8 desktop:py-6", w.sidebarBorder),
249
- children: Q
442
+ /* @__PURE__ */ O("div", {
443
+ className: n("hidden border-e desktop:block desktop:w-[360px] desktop:shrink-0 desktop:px-8 desktop:py-6", B.sidebarBorder),
444
+ children: He
250
445
  }),
251
- /* @__PURE__ */ y("div", {
446
+ /* @__PURE__ */ k("div", {
252
447
  className: "flex min-w-0 flex-1 flex-col gap-4 desktop:gap-5 desktop:px-8 desktop:py-6",
253
- children: [/* @__PURE__ */ v("h2", {
254
- className: t(w.title, X),
255
- children: z === "SKILL.md" ? b : q.selectedFileHeading?.(Z?.name ?? z) ?? Z?.name ?? z
256
- }), z === "SKILL.md" ? /* @__PURE__ */ y(_, { children: [
257
- /* @__PURE__ */ v(re, {
448
+ children: [/* @__PURE__ */ O("h2", {
449
+ className: n(B.title, Pe),
450
+ children: W === "SKILL.md" ? j : Z.selectedFileHeading?.($?.name ?? W) ?? $?.name ?? W
451
+ }), W === "SKILL.md" ? /* @__PURE__ */ k(D, { children: [
452
+ /* @__PURE__ */ O(d, {
258
453
  labelProps: {
259
- label: q.nameLabel ?? "Name",
454
+ label: Z.nameLabel ?? "Name",
260
455
  required: !0
261
456
  },
262
- value: N.name,
263
- onChange: (e) => P((t) => ({
457
+ value: H.name,
458
+ onChange: (e) => U((t) => ({
264
459
  ...t,
265
460
  name: e ?? ""
266
461
  })),
267
- placeholder: q.namePlaceholder ?? "good-morning-breakfast",
268
- caption: D?.name ? void 0 : q.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
269
- error: D?.name,
270
- invalid: !!D?.name,
271
- disabled: me
462
+ placeholder: Z.namePlaceholder ?? "good-morning-breakfast",
463
+ caption: A?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
464
+ error: A?.name,
465
+ invalid: !!A?.name,
466
+ disabled: I
272
467
  }),
273
- /* @__PURE__ */ v(ae, {
468
+ /* @__PURE__ */ O(_, {
274
469
  labelProps: {
275
- label: q.descriptionLabel ?? "Description",
470
+ label: Z.descriptionLabel ?? "Description",
276
471
  required: !0
277
472
  },
278
- value: N.description,
279
- placeholder: q.descriptionPlaceholder ?? "What this skill does and when to use it",
280
- onChange: (e) => P((t) => ({
473
+ value: H.description,
474
+ placeholder: Z.descriptionPlaceholder ?? "What this skill does and when to use it",
475
+ onChange: (e) => U((t) => ({
281
476
  ...t,
282
477
  description: e
283
478
  })),
284
- error: D?.description,
285
- invalid: !!D?.description
479
+ error: A?.description,
480
+ invalid: !!A?.description
286
481
  }),
287
- /* @__PURE__ */ y("div", {
482
+ /* @__PURE__ */ k("div", {
288
483
  className: "flex flex-1 flex-col gap-2",
289
484
  children: [
290
- /* @__PURE__ */ y("span", {
485
+ /* @__PURE__ */ k("span", {
291
486
  className: "flex items-center gap-0.5",
292
- children: [/* @__PURE__ */ v("span", {
293
- className: t(w.helperText, Ae),
294
- children: q.instructionsLabel ?? "Instructions"
295
- }), /* @__PURE__ */ v("span", {
487
+ children: [/* @__PURE__ */ O("span", {
488
+ className: n(B.helperText, Fe),
489
+ children: Z.instructionsLabel ?? "Instructions"
490
+ }), /* @__PURE__ */ O("span", {
296
491
  className: "dial-tiny-text text-error",
297
492
  children: "*"
298
493
  })]
299
494
  }),
300
- /* @__PURE__ */ v(ce, {
301
- fallback: /* @__PURE__ */ v(l, { ariaLabel: q.instructionsLoadingAriaLabel ?? "Loading" }),
302
- children: /* @__PURE__ */ v(ue, {
303
- value: N.instructions,
304
- onChange: (e) => P((t) => ({
495
+ /* @__PURE__ */ O(ae, {
496
+ fallback: /* @__PURE__ */ O(g, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
497
+ children: /* @__PURE__ */ O(ue, {
498
+ value: H.instructions,
499
+ onChange: (e) => U((t) => ({
305
500
  ...t,
306
501
  instructions: e
307
502
  })),
308
- theme: Se,
309
- placeholder: q.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
503
+ theme: _e,
504
+ placeholder: Z.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
310
505
  })
311
506
  }),
312
- D?.instructions && /* @__PURE__ */ v(a, { text: D.instructions })
507
+ A?.instructions && /* @__PURE__ */ O(l, { text: A.instructions })
313
508
  ]
314
509
  })
315
- ] }) : Z?.kind === x.File && (ge ?? /* @__PURE__ */ v(ee, { text: q.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." }))]
510
+ ] }) : $?.kind === M.File && (de ?? /* @__PURE__ */ O(ee, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." }))]
316
511
  })
317
512
  ]
318
513
  }),
319
- /* @__PURE__ */ v("div", {
320
- className: t("fixed inset-x-0 bottom-0 flex items-center gap-2 border-t p-3 desktop:hidden", w.actionBarBorder),
321
- children: $
514
+ /* @__PURE__ */ O("div", {
515
+ className: n("fixed inset-x-0 bottom-0 flex items-center gap-2 border-t p-3 desktop:hidden", B.actionBarBorder),
516
+ children: We
322
517
  }),
323
- H && /* @__PURE__ */ v(te, {
324
- header: q.removeConfirmTitle ?? "Remove file",
325
- description: q.removeConfirmMessage?.(H) ?? `Remove "${H}"? This cannot be undone.`,
326
- confirmLabel: q.removeConfirmLabel ?? "Remove",
327
- cancelLabel: q.removeCancelLabel ?? "Cancel",
328
- variant: ne.Danger,
518
+ K && /* @__PURE__ */ O(o, {
519
+ header: Z.removeConfirmTitle ?? "Remove file",
520
+ description: Z.removeConfirmMessage?.(K) ?? `Remove "${K}"? This cannot be undone.`,
521
+ confirmLabel: Z.removeConfirmLabel ?? "Remove",
522
+ cancelLabel: Z.removeCancelLabel ?? "Cancel",
523
+ variant: s.Danger,
329
524
  onConfirm: () => {
330
- j.onRemoveNode(H), z === H && B("SKILL.md"), U(null);
525
+ R.onRemoveNode(K), W === K && G("SKILL.md"), q(null);
526
+ },
527
+ onCancel: () => q(null)
528
+ }),
529
+ /* @__PURE__ */ O(le, {
530
+ isOpen: J,
531
+ onClose: () => {
532
+ Y(!1), X(void 0);
331
533
  },
332
- onCancel: () => U(null)
534
+ fileActions: R,
535
+ initialFiles: Oe,
536
+ labels: V
333
537
  })
334
538
  ]
335
539
  });
336
540
  };
337
541
  //#endregion
338
- export { T as SkillEditor, x as SkillFileNodeKind };
542
+ export { de as SkillEditor, F as SkillFileCandidateKind, M as SkillFileNodeKind, I as SkillFileValidationStatus };
@@ -1,3 +1,4 @@
1
+ import { EditorThemes } from '@epam/ai-dial-ui-kit';
1
2
  import { ReactNode } from 'react';
2
3
  import { SkillFileNodeKind } from '../types/skill-file-node-kind';
3
4
  /**
@@ -34,24 +35,74 @@ export interface SkillEditorErrors {
34
35
  /** Message shown under the Instructions editor. */
35
36
  instructions?: string;
36
37
  }
38
+ /** Whether a staged upload candidate is the Skill manifest or an ordinary supporting file. */
39
+ export declare enum SkillFileCandidateKind {
40
+ /** An ordinary supporting file, added to the tree on commit. */
41
+ SupportingFile = "supporting-file",
42
+ /** The root `SKILL.md` manifest, handled by the host as a metadata import rather than a tree entry. */
43
+ Manifest = "manifest"
44
+ }
45
+ /** Whether a staged upload candidate's latest host validation passed. */
46
+ export declare enum SkillFileValidationStatus {
47
+ /** The candidate may be included in a commit. */
48
+ Valid = "valid",
49
+ /** The candidate is blocked from commit; see the result's `error`. */
50
+ Invalid = "invalid"
51
+ }
52
+ /** One file staged in the upload dialog, not yet committed to the editor. */
53
+ export interface SkillFileUploadCandidate {
54
+ /** Stable id for React keys and remove targeting, independent of path edits. */
55
+ id: string;
56
+ /** The raw selected or dropped file. */
57
+ file: File;
58
+ /** Resolved relative path (`webkitRelativePath` falling back to `File.name`, `/`-normalized). */
59
+ path: string;
60
+ }
61
+ /** Host validation outcome for one staged candidate. */
62
+ export interface SkillFileValidationResult {
63
+ /** The `SkillFileUploadCandidate.id` this result applies to. */
64
+ candidateId: string;
65
+ /** Whether the candidate currently passes host validation. */
66
+ status: SkillFileValidationStatus;
67
+ /** Whether this candidate is the Skill manifest or an ordinary supporting file. */
68
+ kind: SkillFileCandidateKind;
69
+ /** Error message to render on the candidate's row. Present when `status` is `Invalid`. */
70
+ error?: string;
71
+ }
72
+ /** A validation problem attributable to the whole staged batch, not one row (e.g. total size/count). */
73
+ export interface SkillFileBatchError {
74
+ /** Message rendered in the dialog's batch-level error region. */
75
+ message: string;
76
+ }
77
+ /** Outcome of committing a staged batch to the editor. */
78
+ export interface SkillFileCommitResult {
79
+ /** Present when the commit failed; the dialog stays open with the batch intact and shows this message. */
80
+ error?: string;
81
+ }
37
82
  /**
38
83
  * Host-owned operations on the in-memory supporting-file set. The library
39
- * calls these when the user uploads a file from their device or removes an
84
+ * calls these when the user stages files in the upload dialog or removes an
40
85
  * entry; it never mutates `files` itself.
41
86
  */
42
87
  export interface SkillEditorFileActions {
43
88
  /**
44
- * Validates an uploaded file's path before it is added to the tree. Return
45
- * an error message to block the addition, or `undefined` to accept it.
89
+ * Validates the complete currently staged batch. Called on every staged-set
90
+ * change and again immediately before a commit. Never mutates any state.
46
91
  */
47
- validatePath: (path: string) => string | undefined;
92
+ validateBatch: (candidates: SkillFileUploadCandidate[]) => Promise<{
93
+ /** One result per candidate, in the same order as `candidates`. */
94
+ results: SkillFileValidationResult[];
95
+ /** Errors attributable to the batch as a whole. */
96
+ batchErrors: SkillFileBatchError[];
97
+ }>;
48
98
  /**
49
- * Called when the user picks a local file to upload as a supporting file.
50
- * Resolves once the host has read and stored its content; rejects to
51
- * surface an inline upload error instead of adding the node.
99
+ * Called once, with the full currently-valid staged batch, when the user
100
+ * confirms the upload dialog. Resolves without an `error` to close the
101
+ * dialog and clear staged state; resolves with an `error` to keep the
102
+ * dialog open with the batch intact.
52
103
  */
53
- onUploadFile: (file: File, path: string) => Promise<void>;
54
- /** Called after the user confirms removing a non-protected node. */
104
+ commitBatch: (candidates: SkillFileUploadCandidate[]) => Promise<SkillFileCommitResult>;
105
+ /** Called after the user confirms removing a non-protected node already present in the tree. */
55
106
  onRemoveNode: (path: string) => void;
56
107
  }
57
108
  /** Text overrides for `SkillEditor`. Every field has an English default. */
@@ -111,6 +162,30 @@ export interface SkillEditorLabels {
111
162
  supportingFileNote?: string;
112
163
  /** Label of the "Reload latest" button rendered next to the host-supplied `conflict.message` in the conflict state. Defaults to `'Reload latest'`. */
113
164
  reloadLatestLabel?: string;
165
+ /** Upload dialog title. Defaults to `'Upload files from device'`. */
166
+ uploadDialogTitle?: string;
167
+ /** Accessible label of the upload dialog's close control. Defaults to `'Close'`. */
168
+ uploadDialogCloseAriaLabel?: string;
169
+ /** Drop-zone copy shown at the `desktop` breakpoint. Defaults to `'Drag and drop it or click here to upload'`. */
170
+ uploadDropZoneLabel?: string;
171
+ /** Drop-zone copy shown at the `mobile` breakpoint (no drag surface). Defaults to `'Click here to upload'`. */
172
+ uploadDropZoneMobileLabel?: string;
173
+ /** Accessible label of the drop zone / native-picker trigger. Defaults to `'Upload files'`. */
174
+ uploadDropZoneAriaLabel?: string;
175
+ /** Builds the accessible label of a staged row's remove control, given its path. Defaults to a sentence naming the path. */
176
+ uploadRemoveCandidateLabel?: (path: string) => string;
177
+ /** Explanatory copy on a manifest-kind staged row. Defaults to a sentence explaining it will populate/replace the Skill's metadata. */
178
+ uploadManifestRowNote?: string;
179
+ /** Confirm ("Add"/"Upload") button label in the upload dialog. Defaults to `'Add'`. */
180
+ uploadConfirmLabel?: string;
181
+ /** Cancel button label in the upload dialog. Defaults to `'Cancel'`. */
182
+ uploadCancelLabel?: string;
183
+ /** Prefix announced in the `aria-live` region when a batch-level error appears. Defaults to `'Upload error: '`. */
184
+ uploadBatchErrorAriaPrefix?: string;
185
+ /** Title shown in the full-surface overlay while a file-bearing drag is over the editor and the upload dialog isn't open yet. Defaults to `'Upload files'`. */
186
+ dropOverlayTitle?: string;
187
+ /** Subtitle shown below `dropOverlayTitle`. Defaults to `'Drop files here to add them to this skill'`. */
188
+ dropOverlaySubtitle?: string;
114
189
  }
115
190
  /**
116
191
  * Describes a save-time conflict (e.g. a stale ETag) distinct from
@@ -223,7 +298,7 @@ export interface SkillEditorProps {
223
298
  styles?: SkillEditorStyles;
224
299
  /** Explicit direction override. Omit to inherit from the ambient `dir` attribute. */
225
300
  dir?: 'ltr' | 'rtl';
226
- /** Theme applied to the Instructions Markdown editor, resolved by the host from its own theme state. Defaults to `'light'`. */
227
- instructionsEditorTheme?: 'light' | 'dark';
301
+ /** Theme applied to the Instructions Markdown editor, resolved by the host from its own theme state. Defaults to `EditorThemes.light`. */
302
+ instructionsEditorTheme?: EditorThemes;
228
303
  }
229
304
  //# sourceMappingURL=skill-editor-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-editor-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-editor-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE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BAAmB,CAAC;IAC/B,kHAAkH;IAClH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,qCAAqC;IACrC,WAAW,EAAE,sBAAsB,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,iEAAiE;IACjE,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,uBAAuB;IACvB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,qFAAqF;IACrF,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,0IAA0I;IAC1I,uBAAuB,CAAC,EAAE,YAAY,CAAC;CACxC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-skill-editor",
3
3
  "description": "Host-agnostic form for authoring a DIAL Skill, with an inline supporting-file tree",
4
- "version": "1.1.0-dev.188",
4
+ "version": "1.1.0-dev.191",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@epam/ai-dial-chat-shared": "1.1.0-dev.188",
19
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.191",
20
20
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
21
21
  "@epam/ai-dial-react-file-manager": "^0.1.0-dev.17",
22
22
  "@tabler/icons-react": "^3.0.0",
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Resolves a selected/dropped `File`'s relative path: `webkitRelativePath`
3
+ * when the browser populated it, falling back to `File.name`, with any
4
+ * backslash separator normalized to a forward slash.
5
+ */
6
+ export declare const resolveCandidatePath: (file: File) => string;
7
+ //# sourceMappingURL=candidate-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidate-path.d.ts","sourceRoot":"","sources":["../../src/utils/candidate-path.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,IAAI,KAAG,MAKjD,CAAC"}