@epam/ai-dial-skill-editor 1.3.0-dev.35 → 1.3.0-dev.353
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/components/SkillCreateFolderDialog/SkillCreateFolderDialog.d.ts +5 -0
- package/components/SkillCreateFolderDialog/SkillCreateFolderDialog.d.ts.map +1 -0
- package/components/SkillEditor/SkillEditor.d.ts.map +1 -1
- package/components/SkillEditorDialog/SkillEditorDialog.d.ts +5 -0
- package/components/SkillEditorDialog/SkillEditorDialog.d.ts.map +1 -0
- package/components/SkillFileDropOverlay/SkillFileDropOverlay.d.ts +4 -0
- package/components/SkillFileDropOverlay/SkillFileDropOverlay.d.ts.map +1 -1
- package/components/SkillFileUploadDialog/SkillFileUploadDialog.d.ts +21 -1
- package/components/SkillFileUploadDialog/SkillFileUploadDialog.d.ts.map +1 -1
- package/components/SkillFilesSummary/SkillFilesSummary.d.ts +5 -0
- package/components/SkillFilesSummary/SkillFilesSummary.d.ts.map +1 -0
- package/components/SkillFolderPreview/SkillFolderPreview.d.ts +5 -0
- package/components/SkillFolderPreview/SkillFolderPreview.d.ts.map +1 -0
- package/hooks/useDraftFolder.d.ts +4 -0
- package/hooks/useDraftFolder.d.ts.map +1 -1
- package/index.css +3 -2
- package/index.js +1151 -777
- package/models/skill-create-folder-dialog-props.d.ts +27 -0
- package/models/skill-create-folder-dialog-props.d.ts.map +1 -0
- package/models/skill-editor-dialog-props.d.ts +36 -0
- package/models/skill-editor-dialog-props.d.ts.map +1 -0
- package/models/skill-editor-props.d.ts +83 -11
- package/models/skill-editor-props.d.ts.map +1 -1
- package/models/skill-files-summary-props.d.ts +19 -0
- package/models/skill-files-summary-props.d.ts.map +1 -0
- package/models/skill-folder-preview-props.d.ts +28 -0
- package/models/skill-folder-preview-props.d.ts.map +1 -0
- package/package.json +7 -7
- package/types/skill-add-source.d.ts +1 -3
- package/types/skill-add-source.d.ts.map +1 -1
- package/types/skill-file-conflict-resolution.d.ts +8 -0
- package/types/skill-file-conflict-resolution.d.ts.map +1 -0
- package/utils/file-tree.d.ts +22 -4
- package/utils/file-tree.d.ts.map +1 -1
- package/utils/icon.d.ts +2 -1
- package/utils/icon.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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,
|
|
2
|
-
import { Accordion as
|
|
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, useControlErrorAssociation as u, useIsMobile as d, useTextRefinement as f } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { Accordion as p, BottomSheet as m, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as E, ErrorText as D, FileDropzone as O, FileName as k, GhostButton as A, GhostIconButton as ee, Input as j, Label as te, LinkButton as ne, LiveRegion as re, LiveRegionElement as ie, LiveRegionPoliteness as M, NeutralButton as ae, NoDataContent as oe, Popup as N, PopupSize as se, PrimaryButton as ce, RadioGroup as le, ResizeHandle as ue, Select as de, Spinner as fe, TagInput as pe, Textarea as me, TextareaResize as he } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
4
|
-
import { IconArrowNarrowLeft as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { DialFileNodeType as
|
|
7
|
-
import { LazyMarkdownEditor as
|
|
4
|
+
import { IconArrowNarrowLeft as ge, IconDatabase as L, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as Ce, lazy as we, memo as Te, useCallback as R, useEffect as Ee, useId as De, useMemo as z, useRef as B, useState as V } from "react";
|
|
6
|
+
import { DialFileNodeType as Oe, DialFoldersTree as ke } from "@epam/ai-dial-react-file-manager";
|
|
7
|
+
import { LazyMarkdownEditor as Ae } 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,64 +12,77 @@ 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
|
|
15
|
+
var H = {
|
|
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
|
-
},
|
|
21
|
+
}, je = {
|
|
22
22
|
section: "_section_l1mnx_1",
|
|
23
23
|
title: "_title_l1mnx_5"
|
|
24
|
-
},
|
|
24
|
+
}, Me = ({ 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
29
|
return /* @__PURE__ */ I("section", {
|
|
30
|
-
className: c("flex h-full flex-col gap-4 rounded border
|
|
30
|
+
className: c("flex h-full flex-col gap-4 rounded border", je.section, r, H.section),
|
|
31
31
|
style: i,
|
|
32
32
|
children: [e != null && /* @__PURE__ */ F("h2", {
|
|
33
|
-
className: c("dial-h3-text",
|
|
33
|
+
className: c(n?.typography?.titleClassName ?? "dial-h3-text", je.title),
|
|
34
34
|
children: e
|
|
35
35
|
}), t]
|
|
36
36
|
});
|
|
37
|
-
},
|
|
37
|
+
}, Ne = (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)));
|
|
40
|
+
}, U = {
|
|
38
41
|
headerBorder: "_headerBorder_1adw2_1",
|
|
39
42
|
footerBorder: "_footerBorder_1adw2_5",
|
|
40
43
|
columnBorder: "_columnBorder_1adw2_10"
|
|
41
|
-
},
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
}, Pe = ({ 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 = De(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = B(null), [_, v] = V(), y = l != null && a != null, S = l?.minWidth, C = l?.maxWidth, w = {
|
|
46
|
+
min: S,
|
|
47
|
+
max: C,
|
|
48
|
+
containerWidth: _
|
|
49
|
+
}, T = y ? Ne(l.width, w) : void 0, E = Ne(C ?? 640, w);
|
|
50
|
+
Ee(() => {
|
|
51
|
+
let e = g.current;
|
|
52
|
+
if (!y || e == null || typeof ResizeObserver > "u") return;
|
|
53
|
+
let t = new ResizeObserver(() => v(e.clientWidth));
|
|
54
|
+
return t.observe(e), () => t.disconnect();
|
|
55
|
+
}, [y]);
|
|
56
|
+
let D = o({
|
|
57
|
+
"--el-header-border-color": f?.colors?.headerBorderColor,
|
|
58
|
+
"--el-sidebar-border-color": f?.colors?.sidebarBorderColor
|
|
45
59
|
});
|
|
46
60
|
return /* @__PURE__ */ I("div", {
|
|
47
|
-
dir:
|
|
48
|
-
className: c("flex min-h-0 flex-1 flex-col",
|
|
49
|
-
style:
|
|
61
|
+
dir: p,
|
|
62
|
+
className: c("flex min-h-0 flex-1 flex-col", H.layout),
|
|
63
|
+
style: D,
|
|
50
64
|
children: [
|
|
51
|
-
/* @__PURE__ */ F(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
children: m
|
|
65
|
+
/* @__PURE__ */ F(re, {
|
|
66
|
+
visuallyHidden: !0,
|
|
67
|
+
as: ie.Span,
|
|
68
|
+
id: m,
|
|
69
|
+
children: h
|
|
57
70
|
}),
|
|
58
71
|
/* @__PURE__ */ I("div", {
|
|
59
|
-
className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:
|
|
72
|
+
className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", U.headerBorder),
|
|
60
73
|
children: [/* @__PURE__ */ I("div", {
|
|
61
74
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
62
|
-
children: [/* @__PURE__ */ F(
|
|
63
|
-
icon: /* @__PURE__ */ F(
|
|
64
|
-
size:
|
|
65
|
-
stroke:
|
|
75
|
+
children: [/* @__PURE__ */ F(ee, {
|
|
76
|
+
icon: /* @__PURE__ */ F(ge, {
|
|
77
|
+
size: b.LG,
|
|
78
|
+
stroke: x,
|
|
66
79
|
"aria-hidden": !0,
|
|
67
80
|
className: "rtl:scale-x-[-1]"
|
|
68
81
|
}),
|
|
69
82
|
"aria-label": n,
|
|
70
83
|
onClick: t
|
|
71
84
|
}), /* @__PURE__ */ F("h1", {
|
|
72
|
-
className: "dial-h2-text min-w-0 truncate",
|
|
85
|
+
className: c(f?.typography?.titleClassName ?? "dial-h2-text", "min-w-0 truncate"),
|
|
73
86
|
children: e
|
|
74
87
|
})]
|
|
75
88
|
}), r != null && /* @__PURE__ */ F("div", {
|
|
@@ -78,85 +91,106 @@ var ve = {
|
|
|
78
91
|
})]
|
|
79
92
|
}),
|
|
80
93
|
/* @__PURE__ */ I("div", {
|
|
94
|
+
ref: g,
|
|
81
95
|
className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
|
|
82
96
|
children: [
|
|
83
97
|
/* @__PURE__ */ F("div", {
|
|
84
|
-
className: c(a == null ? "desktop:flex-1" : "desktop:
|
|
98
|
+
className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !y && "desktop:w-[400px]", y && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", a == null ? void 0 : U.columnBorder),
|
|
99
|
+
style: T == null ? void 0 : { "--el-left-width": `${T}px` },
|
|
85
100
|
children: i
|
|
86
101
|
}),
|
|
102
|
+
y && T != null && /* @__PURE__ */ F("div", {
|
|
103
|
+
className: "relative hidden w-0 shrink-0 desktop:block",
|
|
104
|
+
children: /* @__PURE__ */ F(ue, {
|
|
105
|
+
width: T,
|
|
106
|
+
minWidth: S ?? 280,
|
|
107
|
+
maxWidth: E,
|
|
108
|
+
defaultWidth: l.defaultWidth ?? 400,
|
|
109
|
+
onWidthChange: l.onWidthChange,
|
|
110
|
+
label: d?.resizeHandleLabel ?? "Resize columns",
|
|
111
|
+
tooltip: d?.resizeHandleTooltip ?? "Drag to resize"
|
|
112
|
+
})
|
|
113
|
+
}),
|
|
87
114
|
a != null && /* @__PURE__ */ F("div", {
|
|
88
115
|
className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
|
|
89
116
|
children: a
|
|
90
117
|
}),
|
|
91
118
|
s != null && /* @__PURE__ */ F("div", {
|
|
92
|
-
className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s",
|
|
119
|
+
className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", U.columnBorder),
|
|
93
120
|
children: s
|
|
94
121
|
})
|
|
95
122
|
]
|
|
96
123
|
}),
|
|
97
124
|
r != null && /* @__PURE__ */ F("div", {
|
|
98
|
-
className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden
|
|
125
|
+
className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", U.footerBorder),
|
|
99
126
|
children: r
|
|
100
127
|
})
|
|
101
128
|
]
|
|
102
129
|
});
|
|
103
|
-
},
|
|
130
|
+
}, Fe = {
|
|
104
131
|
box: "_box_c9as8_1",
|
|
105
132
|
icon: "_icon_c9as8_6",
|
|
106
133
|
caption: "_caption_c9as8_10"
|
|
107
|
-
},
|
|
108
|
-
let
|
|
109
|
-
"--aa-box-bg":
|
|
110
|
-
"--aa-box-border":
|
|
111
|
-
"--aa-icon":
|
|
112
|
-
"--aa-caption":
|
|
134
|
+
}, Ie = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, captionClassName: s = "dial-tiny-text", styles: l, className: u }) => {
|
|
135
|
+
let d = o({
|
|
136
|
+
"--aa-box-bg": l?.colors?.boxBackgroundColor,
|
|
137
|
+
"--aa-box-border": l?.colors?.boxBorderColor,
|
|
138
|
+
"--aa-icon": l?.colors?.placeholderIconColor,
|
|
139
|
+
"--aa-caption": l?.colors?.captionColor
|
|
113
140
|
});
|
|
114
141
|
return /* @__PURE__ */ I("div", {
|
|
115
|
-
className: c("flex flex-col gap-2",
|
|
116
|
-
style:
|
|
117
|
-
children: [/* @__PURE__ */ F(
|
|
142
|
+
className: c("flex flex-col gap-2", u),
|
|
143
|
+
style: d,
|
|
144
|
+
children: [/* @__PURE__ */ F(te, { label: e }), /* @__PURE__ */ I("div", {
|
|
118
145
|
className: "flex items-start gap-3",
|
|
119
146
|
children: [/* @__PURE__ */ F("div", {
|
|
120
|
-
className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border",
|
|
147
|
+
className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Fe.box),
|
|
121
148
|
children: t ? /* @__PURE__ */ F("img", {
|
|
122
149
|
src: t,
|
|
123
150
|
alt: n,
|
|
124
151
|
className: "h-16 w-16 object-cover"
|
|
125
|
-
}) : /* @__PURE__ */ F(
|
|
126
|
-
size:
|
|
127
|
-
stroke:
|
|
152
|
+
}) : /* @__PURE__ */ F(ye, {
|
|
153
|
+
size: b.LG,
|
|
154
|
+
stroke: x,
|
|
128
155
|
"aria-hidden": !0,
|
|
129
|
-
className:
|
|
156
|
+
className: Fe.icon
|
|
130
157
|
})
|
|
131
158
|
}), /* @__PURE__ */ I("div", {
|
|
132
159
|
className: "flex flex-col gap-3",
|
|
133
|
-
children: [/* @__PURE__ */ F(
|
|
134
|
-
size:
|
|
135
|
-
iconBefore: /* @__PURE__ */ F(
|
|
136
|
-
size:
|
|
137
|
-
stroke:
|
|
160
|
+
children: [/* @__PURE__ */ F(A, {
|
|
161
|
+
size: T.Small,
|
|
162
|
+
iconBefore: /* @__PURE__ */ F(be, {
|
|
163
|
+
size: b.SM,
|
|
164
|
+
stroke: x,
|
|
138
165
|
"aria-hidden": !0
|
|
139
166
|
}),
|
|
140
167
|
className: "w-fit",
|
|
141
168
|
label: r,
|
|
142
169
|
onClick: a
|
|
143
170
|
}), /* @__PURE__ */ F("span", {
|
|
144
|
-
className: c(
|
|
171
|
+
className: c(s, Fe.caption),
|
|
145
172
|
children: i
|
|
146
173
|
})]
|
|
147
174
|
})]
|
|
148
175
|
})]
|
|
149
176
|
});
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
|
|
177
|
+
}, Le = {
|
|
178
|
+
confirmText: "_confirmText_19ec1_1",
|
|
179
|
+
confirmItem: "_confirmItem_19ec1_5"
|
|
180
|
+
}, Re = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: s, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
|
|
181
|
+
let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ F("div", {
|
|
182
|
+
className: c(u, "px-6 py-3"),
|
|
183
|
+
style: o({
|
|
184
|
+
"--apm-confirm-text": f,
|
|
185
|
+
"--apm-confirm-item-text": p
|
|
186
|
+
}),
|
|
153
187
|
children: /* @__PURE__ */ F("p", {
|
|
154
|
-
className: "mb-3
|
|
188
|
+
className: c("mb-3", Le.confirmText),
|
|
155
189
|
children: e.length === 1 ? /* @__PURE__ */ I(P, { children: [
|
|
156
|
-
|
|
190
|
+
l.deleteConfirmSingleText,
|
|
157
191
|
" ",
|
|
158
192
|
/* @__PURE__ */ I("span", {
|
|
159
|
-
className: "break-
|
|
193
|
+
className: c("wrap-break-word", Le.confirmItem),
|
|
160
194
|
children: [
|
|
161
195
|
"\"",
|
|
162
196
|
e[0].split("/").pop(),
|
|
@@ -164,24 +198,27 @@ var ve = {
|
|
|
164
198
|
]
|
|
165
199
|
})
|
|
166
200
|
] }) : /* @__PURE__ */ I(P, { children: [
|
|
167
|
-
|
|
201
|
+
l.deleteConfirmMultipleText,
|
|
168
202
|
" ",
|
|
169
203
|
/* @__PURE__ */ I("span", {
|
|
170
|
-
className:
|
|
204
|
+
className: Le.confirmItem,
|
|
171
205
|
children: [
|
|
172
206
|
e.length,
|
|
173
207
|
" ",
|
|
174
|
-
|
|
208
|
+
l.deleteConfirmItemsLabel
|
|
175
209
|
]
|
|
176
210
|
})
|
|
177
211
|
] })
|
|
178
212
|
})
|
|
179
213
|
}), [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
214
|
+
l.deleteConfirmSingleText,
|
|
215
|
+
l.deleteConfirmMultipleText,
|
|
216
|
+
l.deleteConfirmItemsLabel,
|
|
217
|
+
f,
|
|
218
|
+
p,
|
|
219
|
+
u
|
|
183
220
|
]);
|
|
184
|
-
return /* @__PURE__ */ F(
|
|
221
|
+
return /* @__PURE__ */ F(Ce, {
|
|
185
222
|
fallback: null,
|
|
186
223
|
children: e && /* @__PURE__ */ F(i, {
|
|
187
224
|
isOpen: e,
|
|
@@ -189,222 +226,234 @@ var ve = {
|
|
|
189
226
|
onAttach: n,
|
|
190
227
|
bucket: r,
|
|
191
228
|
allowedTypes: a,
|
|
192
|
-
maxSelectableFileSize:
|
|
229
|
+
maxSelectableFileSize: s,
|
|
193
230
|
maximumAttachmentsAmount: 1,
|
|
194
231
|
canAttachFolders: !1,
|
|
195
|
-
title:
|
|
196
|
-
attachLabel:
|
|
197
|
-
emptyTitle:
|
|
198
|
-
emptyDescription:
|
|
199
|
-
errorMessage:
|
|
200
|
-
retryLabel:
|
|
201
|
-
hiddenFilesLabel:
|
|
202
|
-
showHiddenFilesLabel:
|
|
203
|
-
hideHiddenFilesLabel:
|
|
204
|
-
getSelectionLabel:
|
|
205
|
-
uploadFilesLabel:
|
|
206
|
-
newFolderLabel:
|
|
207
|
-
downloadLabel:
|
|
208
|
-
downloadingLabel:
|
|
209
|
-
deleteLabel:
|
|
210
|
-
deletingLabel:
|
|
211
|
-
deleteConfirmTitle:
|
|
212
|
-
deleteConfirmBody:
|
|
213
|
-
deleteConfirmLabel:
|
|
214
|
-
deleteCancelLabel:
|
|
232
|
+
title: l.title,
|
|
233
|
+
attachLabel: l.attachLabel,
|
|
234
|
+
emptyTitle: l.emptyTitle,
|
|
235
|
+
emptyDescription: l.emptyDescription,
|
|
236
|
+
errorMessage: l.errorMessage,
|
|
237
|
+
retryLabel: l.retryLabel,
|
|
238
|
+
hiddenFilesLabel: l.hiddenFilesLabel,
|
|
239
|
+
showHiddenFilesLabel: l.showHiddenFilesLabel,
|
|
240
|
+
hideHiddenFilesLabel: l.hideHiddenFilesLabel,
|
|
241
|
+
getSelectionLabel: l.getSelectionLabel,
|
|
242
|
+
uploadFilesLabel: l.uploadFilesLabel,
|
|
243
|
+
newFolderLabel: l.newFolderLabel,
|
|
244
|
+
downloadLabel: l.downloadLabel,
|
|
245
|
+
downloadingLabel: l.downloadingLabel,
|
|
246
|
+
deleteLabel: l.deleteLabel,
|
|
247
|
+
deletingLabel: l.deletingLabel,
|
|
248
|
+
deleteConfirmTitle: m,
|
|
249
|
+
deleteConfirmBody: h,
|
|
250
|
+
deleteConfirmLabel: l.deleteConfirmLabel,
|
|
251
|
+
deleteCancelLabel: l.deleteCancelLabel
|
|
215
252
|
})
|
|
216
253
|
});
|
|
217
|
-
},
|
|
254
|
+
}, W = /* @__PURE__ */ function(e) {
|
|
218
255
|
return e.Avatar = "avatar", e.Name = "name", e.Version = "version", e.Description = "description", e.Locales = "locales", e.Tags = "tags", e;
|
|
219
|
-
}({}),
|
|
256
|
+
}({}), ze = [
|
|
220
257
|
"avatar",
|
|
221
258
|
"name",
|
|
222
259
|
"version",
|
|
223
260
|
"description",
|
|
224
261
|
"locales",
|
|
225
262
|
"tags"
|
|
226
|
-
],
|
|
263
|
+
], Be = {
|
|
264
|
+
summary: "_summary_1hlc9_1",
|
|
265
|
+
rowLabel: "_rowLabel_1hlc9_5"
|
|
266
|
+
}, Ve = (e, t, n) => ({
|
|
227
267
|
id: e,
|
|
228
268
|
language: n.find((e) => !t.has(e.code))?.code ?? "",
|
|
229
269
|
name: "",
|
|
230
270
|
description: ""
|
|
231
|
-
}),
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
|
|
271
|
+
}), He = (e) => e.toUpperCase(), Ue = ({ value: e, onChange: t, availableLocaleOptions: n = [], formatLocaleLabel: i = He, labels: a, className: s, summaryClassName: l = "dial-body-text", rowLabelClassName: u = "dial-tiny-lead-text", colors: d }) => {
|
|
272
|
+
let f = o({
|
|
273
|
+
"--dlf-summary-text": d?.summaryText,
|
|
274
|
+
"--dlf-row-label-text": d?.rowLabelText
|
|
275
|
+
}), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: E, namePlaceholder: D, descriptionLabel: O, descriptionPlaceholder: k, deleteAriaLabel: A, cancelLabel: ee = "Cancel", saveLabel: te = "Save" } = a, [re, ie] = V(!1), [M, ae] = V([]), oe = B(0);
|
|
276
|
+
Ee(() => {
|
|
277
|
+
re && ae(e.length > 0 ? e : [Ve(`locale-row-${++oe.current}`, /* @__PURE__ */ new Set(), n)]);
|
|
235
278
|
}, [
|
|
236
|
-
|
|
279
|
+
re,
|
|
237
280
|
e,
|
|
238
281
|
n
|
|
239
282
|
]);
|
|
240
|
-
let
|
|
241
|
-
t(
|
|
242
|
-
},
|
|
243
|
-
let e = new Set(
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
|
|
283
|
+
let se = () => ie(!0), ce = () => ie(!1), le = () => {
|
|
284
|
+
t(M.filter((e) => e.language && e.name)), ie(!1);
|
|
285
|
+
}, ue = () => {
|
|
286
|
+
let e = new Set(M.map((e) => e.language).filter(Boolean));
|
|
287
|
+
ae((t) => [...t, Ve(`locale-row-${++oe.current}`, e, n)]);
|
|
288
|
+
}, fe = (e, t) => {
|
|
289
|
+
ae((n) => n.map((n) => n.id === e ? {
|
|
247
290
|
...n,
|
|
248
291
|
...t
|
|
249
292
|
} : n));
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
|
|
293
|
+
}, pe = (e) => {
|
|
294
|
+
ae((t) => t.filter((t) => t.id !== e));
|
|
295
|
+
}, P = new Set(n.map((e) => e.code)), ge = (e) => e !== "" && !P.has(e), L = e.some((e) => ge(e.language)), _e = new Set(M.map((e) => e.language).filter((e) => P.has(e))).size, ve = (t, r) => {
|
|
296
|
+
let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(ge))];
|
|
297
|
+
return [...n.map((e) => ({
|
|
298
|
+
value: e.code,
|
|
299
|
+
label: e.label,
|
|
300
|
+
disabled: r.has(e.code)
|
|
301
|
+
})), ...o.map((e) => ({
|
|
302
|
+
value: e,
|
|
303
|
+
label: i(e),
|
|
304
|
+
disabled: r.has(e)
|
|
305
|
+
}))];
|
|
306
|
+
}, ye = M.some((e) => !e.language || !e.name);
|
|
307
|
+
return n.length === 0 && !L ? null : /* @__PURE__ */ I("div", {
|
|
308
|
+
className: c("flex items-center gap-2", s),
|
|
309
|
+
style: f,
|
|
255
310
|
children: [
|
|
256
311
|
e.length > 0 && /* @__PURE__ */ F("span", {
|
|
257
|
-
className:
|
|
258
|
-
children: `${
|
|
312
|
+
className: c(Be.summary, l),
|
|
313
|
+
children: `${p}: ${e.map((e) => `[${e.language.toUpperCase()}]`).join(", ")}`
|
|
259
314
|
}),
|
|
260
|
-
/* @__PURE__ */ F(
|
|
261
|
-
label: e.length > 0 ?
|
|
262
|
-
iconBefore: /* @__PURE__ */ F(
|
|
263
|
-
size:
|
|
315
|
+
/* @__PURE__ */ F(ne, {
|
|
316
|
+
label: e.length > 0 ? h : m,
|
|
317
|
+
iconBefore: /* @__PURE__ */ F(be, {
|
|
318
|
+
size: b.SM,
|
|
264
319
|
"aria-hidden": !0,
|
|
265
|
-
stroke:
|
|
320
|
+
stroke: x
|
|
266
321
|
}),
|
|
267
|
-
className: "
|
|
268
|
-
onClick:
|
|
322
|
+
className: "px-0!",
|
|
323
|
+
onClick: se
|
|
269
324
|
}),
|
|
270
|
-
/* @__PURE__ */ F(
|
|
271
|
-
open:
|
|
272
|
-
header:
|
|
273
|
-
onClose:
|
|
325
|
+
/* @__PURE__ */ F(N, {
|
|
326
|
+
open: re,
|
|
327
|
+
header: _,
|
|
328
|
+
onClose: ce,
|
|
274
329
|
mainButtons: [{
|
|
275
330
|
label: ee,
|
|
276
|
-
onClick:
|
|
331
|
+
onClick: ce
|
|
277
332
|
}, {
|
|
278
|
-
label:
|
|
279
|
-
variant:
|
|
280
|
-
disabled:
|
|
281
|
-
onClick:
|
|
333
|
+
label: te,
|
|
334
|
+
variant: v.Primary,
|
|
335
|
+
disabled: ye,
|
|
336
|
+
onClick: le
|
|
282
337
|
}],
|
|
283
338
|
children: /* @__PURE__ */ I("div", {
|
|
284
339
|
className: "flex flex-col gap-8 px-6 py-3",
|
|
285
|
-
|
|
286
|
-
|
|
340
|
+
style: f,
|
|
341
|
+
children: [M.map((e, t) => {
|
|
342
|
+
let n = new Set(M.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
|
|
287
343
|
return /* @__PURE__ */ I("div", {
|
|
288
344
|
className: "flex flex-col gap-2",
|
|
289
345
|
children: [/* @__PURE__ */ I("div", {
|
|
290
346
|
className: "flex items-center justify-between",
|
|
291
347
|
children: [/* @__PURE__ */ I("span", {
|
|
292
|
-
className:
|
|
348
|
+
className: c(Be.rowLabel, u),
|
|
293
349
|
children: [
|
|
294
|
-
|
|
350
|
+
C,
|
|
295
351
|
" ",
|
|
296
352
|
t + 1
|
|
297
353
|
]
|
|
298
|
-
}), /* @__PURE__ */ F(
|
|
299
|
-
appearance:
|
|
300
|
-
size:
|
|
301
|
-
icon: /* @__PURE__ */ F(
|
|
302
|
-
size:
|
|
354
|
+
}), /* @__PURE__ */ F(S, {
|
|
355
|
+
appearance: g.Ghost,
|
|
356
|
+
size: T.Small,
|
|
357
|
+
icon: /* @__PURE__ */ F(xe, {
|
|
358
|
+
size: b.SM,
|
|
303
359
|
"aria-hidden": !0,
|
|
304
|
-
stroke:
|
|
360
|
+
stroke: x
|
|
305
361
|
}),
|
|
306
|
-
"aria-label": `${
|
|
307
|
-
onClick: () =>
|
|
362
|
+
"aria-label": `${A} ${t + 1}`,
|
|
363
|
+
onClick: () => pe(e.id)
|
|
308
364
|
})]
|
|
309
365
|
}), /* @__PURE__ */ I("div", {
|
|
310
366
|
role: "group",
|
|
311
|
-
"aria-label": `${
|
|
367
|
+
"aria-label": `${C} ${t + 1}`,
|
|
312
368
|
className: "flex flex-col gap-5",
|
|
313
369
|
children: [/* @__PURE__ */ I("div", {
|
|
314
370
|
className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
|
|
315
|
-
children: [/* @__PURE__ */ F(
|
|
371
|
+
children: [/* @__PURE__ */ F(de, {
|
|
316
372
|
id: `${e.id}-language`,
|
|
317
373
|
labelProps: {
|
|
318
|
-
label:
|
|
374
|
+
label: w,
|
|
319
375
|
required: !0
|
|
320
376
|
},
|
|
321
377
|
className: "desktop:shrink-0 desktop:basis-40",
|
|
322
|
-
options:
|
|
323
|
-
value: e.code,
|
|
324
|
-
label: e.label,
|
|
325
|
-
disabled: i.has(e.code)
|
|
326
|
-
})),
|
|
378
|
+
options: ve(e, n),
|
|
327
379
|
value: e.language,
|
|
328
|
-
onChange: (t) =>
|
|
329
|
-
}), /* @__PURE__ */ F(
|
|
380
|
+
onChange: (t) => fe(e.id, { language: t })
|
|
381
|
+
}), /* @__PURE__ */ F(j, {
|
|
330
382
|
id: `${e.id}-name`,
|
|
331
383
|
containerClassName: "min-w-0 flex-1",
|
|
332
384
|
required: !0,
|
|
333
385
|
value: e.name,
|
|
334
|
-
onChange: (t) =>
|
|
386
|
+
onChange: (t) => fe(e.id, { name: t ?? "" }),
|
|
335
387
|
labelProps: {
|
|
336
|
-
label:
|
|
388
|
+
label: E,
|
|
337
389
|
required: !0
|
|
338
390
|
},
|
|
339
|
-
placeholder:
|
|
391
|
+
placeholder: D
|
|
340
392
|
})]
|
|
341
|
-
}), /* @__PURE__ */ F(
|
|
393
|
+
}), /* @__PURE__ */ F(me, {
|
|
342
394
|
id: `${e.id}-description`,
|
|
343
395
|
className: r,
|
|
344
|
-
resize:
|
|
396
|
+
resize: he.Vertical,
|
|
345
397
|
value: e.description,
|
|
346
|
-
onChange: (t) =>
|
|
347
|
-
labelProps: { label:
|
|
348
|
-
placeholder:
|
|
398
|
+
onChange: (t) => fe(e.id, { description: t }),
|
|
399
|
+
labelProps: { label: O },
|
|
400
|
+
placeholder: k
|
|
349
401
|
})]
|
|
350
402
|
})]
|
|
351
403
|
}, e.id);
|
|
352
|
-
}), /* @__PURE__ */ F(
|
|
353
|
-
label:
|
|
354
|
-
iconBefore: /* @__PURE__ */ F(
|
|
355
|
-
size:
|
|
404
|
+
}), /* @__PURE__ */ F(ne, {
|
|
405
|
+
label: y,
|
|
406
|
+
iconBefore: /* @__PURE__ */ F(be, {
|
|
407
|
+
size: b.SM,
|
|
356
408
|
"aria-hidden": !0,
|
|
357
|
-
stroke:
|
|
409
|
+
stroke: x
|
|
358
410
|
}),
|
|
359
411
|
className: "self-start",
|
|
360
|
-
onClick:
|
|
361
|
-
disabled:
|
|
412
|
+
onClick: ue,
|
|
413
|
+
disabled: _e >= n.length
|
|
362
414
|
})]
|
|
363
415
|
})
|
|
364
416
|
})
|
|
365
417
|
]
|
|
366
418
|
});
|
|
367
|
-
},
|
|
368
|
-
let
|
|
369
|
-
|
|
419
|
+
}, We = "Add tags, comma separated", Ge = "The version is changed with \"Save as new version\"", Ke = "deployment-creation-form-description", qe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = ze, isNameReadOnly: h = !1, nameReadOnlyTooltip: g, isVersionReadOnly: _ = !1, versionReadOnlyTooltip: v = Ge, nameCaption: y, isDescriptionRequired: b = !1, descriptionCaption: x, renderDescription: S, focusRequestKey: C }) => {
|
|
420
|
+
let w = B(null), T = B(null), E = B(null), D = B(!1), O = (e) => m.includes(e), k = O(W.Name), A = O(W.Version), ee = !!(t.name || t.version || t.description), te = B(C);
|
|
421
|
+
Ee(() => {
|
|
370
422
|
let e = () => {
|
|
371
|
-
t.name ?
|
|
423
|
+
t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && E.current?.focus();
|
|
372
424
|
};
|
|
373
|
-
|
|
374
|
-
v !== O.current && (O.current = v, e());
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
D && !S.current && e(), S.current = D;
|
|
425
|
+
C === void 0 ? (ee && !D.current && e(), D.current = ee) : C !== te.current && (te.current = C, e());
|
|
378
426
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
427
|
+
C,
|
|
428
|
+
ee,
|
|
381
429
|
t.name,
|
|
382
430
|
t.version,
|
|
383
431
|
t.description
|
|
384
432
|
]);
|
|
385
|
-
let
|
|
386
|
-
id:
|
|
387
|
-
ref:
|
|
433
|
+
let ne = /* @__PURE__ */ F(me, {
|
|
434
|
+
id: Ke,
|
|
435
|
+
ref: E,
|
|
388
436
|
value: e.description,
|
|
389
437
|
onChange: (e) => n({ description: e }),
|
|
390
|
-
"aria-required":
|
|
391
|
-
labelProps:
|
|
438
|
+
"aria-required": b || void 0,
|
|
439
|
+
labelProps: S ? void 0 : {
|
|
392
440
|
label: u.description.label,
|
|
393
|
-
required:
|
|
441
|
+
required: b
|
|
394
442
|
},
|
|
395
443
|
placeholder: u.description.placeholder,
|
|
444
|
+
caption: x,
|
|
396
445
|
error: t.description || void 0,
|
|
397
446
|
invalid: !!t.description,
|
|
398
|
-
containerClassName:
|
|
447
|
+
containerClassName: S ? void 0 : d?.field,
|
|
399
448
|
className: r,
|
|
400
|
-
resize:
|
|
449
|
+
resize: he.Vertical
|
|
401
450
|
});
|
|
402
451
|
return /* @__PURE__ */ I("div", {
|
|
403
452
|
role: u.ariaLabel ? "group" : void 0,
|
|
404
453
|
"aria-label": u.ariaLabel,
|
|
405
454
|
className: c("flex flex-col gap-4", d?.root),
|
|
406
455
|
children: [
|
|
407
|
-
|
|
456
|
+
O(W.Avatar) && /* @__PURE__ */ F(Ie, {
|
|
408
457
|
label: u.iconUrl.label,
|
|
409
458
|
avatarUrl: s,
|
|
410
459
|
addAvatarLabel: u.iconUrl.addAvatarLabel,
|
|
@@ -412,54 +461,61 @@ var ve = {
|
|
|
412
461
|
onAddAvatarClick: l,
|
|
413
462
|
className: d?.field
|
|
414
463
|
}),
|
|
415
|
-
(
|
|
464
|
+
(k || A) && /* @__PURE__ */ I("div", {
|
|
416
465
|
className: c("flex items-start gap-4", d?.field),
|
|
417
|
-
children: [
|
|
466
|
+
children: [k && /* @__PURE__ */ F(j, {
|
|
418
467
|
id: "deployment-creation-form-name",
|
|
419
|
-
inputRef:
|
|
468
|
+
inputRef: w,
|
|
420
469
|
value: e.name,
|
|
421
470
|
onChange: (e) => n({ name: e ?? "" }),
|
|
422
471
|
onBlur: a,
|
|
423
|
-
|
|
472
|
+
disabled: h,
|
|
473
|
+
tooltipText: h ? g : void 0,
|
|
424
474
|
labelProps: {
|
|
425
475
|
label: u.name.label,
|
|
426
476
|
required: !0
|
|
427
477
|
},
|
|
428
478
|
placeholder: u.name.placeholder,
|
|
429
|
-
caption:
|
|
479
|
+
caption: y,
|
|
430
480
|
error: t.name || void 0,
|
|
431
481
|
invalid: !!t.name,
|
|
432
|
-
containerClassName:
|
|
433
|
-
}),
|
|
482
|
+
containerClassName: A ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
|
|
483
|
+
}), A && /* @__PURE__ */ F(j, {
|
|
434
484
|
id: "deployment-creation-form-version",
|
|
435
|
-
inputRef:
|
|
485
|
+
inputRef: T,
|
|
436
486
|
value: e.version,
|
|
437
|
-
onChange: (e) =>
|
|
438
|
-
|
|
487
|
+
onChange: (e) => {
|
|
488
|
+
_ || n({ version: e ?? "" });
|
|
489
|
+
},
|
|
490
|
+
onBlur: _ ? void 0 : o,
|
|
491
|
+
readOnly: _,
|
|
492
|
+
tooltipText: _ ? v : void 0,
|
|
439
493
|
labelProps: { label: u.version.label },
|
|
440
494
|
placeholder: u.version.placeholder,
|
|
441
495
|
error: t.version || void 0,
|
|
442
496
|
invalid: !!t.version,
|
|
443
|
-
containerClassName:
|
|
497
|
+
containerClassName: k ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
|
|
444
498
|
})]
|
|
445
499
|
}),
|
|
446
|
-
|
|
500
|
+
O(W.Description) && (S ? /* @__PURE__ */ F("div", {
|
|
447
501
|
className: d?.field,
|
|
448
|
-
children:
|
|
449
|
-
}) :
|
|
450
|
-
|
|
502
|
+
children: S(ne, Ke)
|
|
503
|
+
}) : ne),
|
|
504
|
+
O(W.Locales) && /* @__PURE__ */ F(Ue, {
|
|
451
505
|
value: e.otherLocales,
|
|
452
506
|
onChange: (e) => n({ otherLocales: e }),
|
|
453
507
|
availableLocaleOptions: f,
|
|
508
|
+
formatLocaleLabel: p,
|
|
454
509
|
labels: u.otherLocales,
|
|
455
|
-
className: d?.field
|
|
510
|
+
className: d?.field,
|
|
511
|
+
colors: d?.localesColors
|
|
456
512
|
}),
|
|
457
|
-
|
|
513
|
+
O(W.Tags) && /* @__PURE__ */ F("div", {
|
|
458
514
|
className: d?.field,
|
|
459
|
-
children: /* @__PURE__ */ F(
|
|
515
|
+
children: /* @__PURE__ */ F(pe, {
|
|
460
516
|
id: "deployment-creation-form-topics",
|
|
461
517
|
labelProps: { label: u.topics.label },
|
|
462
|
-
placeholder: u.topics.placeholder ??
|
|
518
|
+
placeholder: u.topics.placeholder ?? We,
|
|
463
519
|
value: e.topics,
|
|
464
520
|
onChange: (e) => n({ topics: e }),
|
|
465
521
|
tagClassName: i
|
|
@@ -467,53 +523,58 @@ var ve = {
|
|
|
467
523
|
})
|
|
468
524
|
]
|
|
469
525
|
});
|
|
470
|
-
},
|
|
471
|
-
let
|
|
472
|
-
|
|
473
|
-
className:
|
|
526
|
+
}, Je = "border-0 p-4 desktop:p-8", Ye = "border-0", Xe = "desktop:flex-1", Ze = "px-4 pt-4 desktop:px-6 desktop:pt-6", Qe = Te(({ 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, hasSetupSectionPadding: S = !0, labels: C, styles: w, dir: T }) => {
|
|
527
|
+
let E = /* @__PURE__ */ F(re, {
|
|
528
|
+
politeness: M.Assertive,
|
|
529
|
+
className: v == null ? void 0 : Ze,
|
|
474
530
|
children: v
|
|
475
|
-
}),
|
|
476
|
-
return /* @__PURE__ */ F(
|
|
531
|
+
}), D = p != null;
|
|
532
|
+
return /* @__PURE__ */ F(Pe, {
|
|
477
533
|
title: e,
|
|
478
534
|
onBack: t,
|
|
479
|
-
backAriaLabel:
|
|
535
|
+
backAriaLabel: C?.backAriaLabel ?? "Back",
|
|
480
536
|
isSaving: a,
|
|
481
|
-
|
|
482
|
-
|
|
537
|
+
resizableLeftColumn: y,
|
|
538
|
+
labels: {
|
|
539
|
+
savingStatusLabel: C?.savingStatusLabel ?? "Saving",
|
|
540
|
+
resizeHandleLabel: C?.resizeHandleLabel,
|
|
541
|
+
resizeHandleTooltip: C?.resizeHandleTooltip
|
|
542
|
+
},
|
|
543
|
+
rightContent: h == null ? void 0 : /* @__PURE__ */ F(Me, {
|
|
483
544
|
title: g,
|
|
484
|
-
styles:
|
|
485
|
-
className: c(
|
|
545
|
+
styles: w?.section,
|
|
546
|
+
className: c(Je, _, H.asideSection),
|
|
486
547
|
children: h
|
|
487
548
|
}),
|
|
488
|
-
styles:
|
|
489
|
-
dir:
|
|
490
|
-
actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(
|
|
491
|
-
label:
|
|
549
|
+
styles: w?.layout,
|
|
550
|
+
dir: T,
|
|
551
|
+
actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(ae, {
|
|
552
|
+
label: C?.cancelLabel ?? "Cancel",
|
|
492
553
|
disabled: a,
|
|
493
554
|
onClick: n
|
|
494
|
-
}), /* @__PURE__ */ F(
|
|
555
|
+
}), /* @__PURE__ */ F(ce, {
|
|
495
556
|
label: i,
|
|
496
557
|
disabled: a || o,
|
|
497
558
|
onClick: r
|
|
498
559
|
})] })] }),
|
|
499
560
|
leftContent: /* @__PURE__ */ I(P, { children: [
|
|
500
|
-
!
|
|
501
|
-
/* @__PURE__ */ F(
|
|
502
|
-
title: d === null ? void 0 : d ??
|
|
503
|
-
styles:
|
|
504
|
-
className: c(
|
|
561
|
+
!D && E,
|
|
562
|
+
/* @__PURE__ */ F(Me, {
|
|
563
|
+
title: d === null ? void 0 : d ?? C?.metadataTitle ?? "Metadata",
|
|
564
|
+
styles: w?.section,
|
|
565
|
+
className: c(Je, b, H.metadataSection),
|
|
505
566
|
children: u
|
|
506
567
|
}),
|
|
507
568
|
f
|
|
508
569
|
] }),
|
|
509
|
-
centerContent:
|
|
510
|
-
title: m === null ? void 0 : m ??
|
|
511
|
-
styles:
|
|
512
|
-
className: c(
|
|
570
|
+
centerContent: D ? /* @__PURE__ */ I(P, { children: [E, /* @__PURE__ */ F(Me, {
|
|
571
|
+
title: m === null ? void 0 : m ?? C?.setupTitle ?? "Setup",
|
|
572
|
+
styles: w?.section,
|
|
573
|
+
className: c(S ? Je : Ye, Xe, x, H.setupSection),
|
|
513
574
|
children: p
|
|
514
575
|
})] }) : void 0
|
|
515
576
|
});
|
|
516
|
-
}),
|
|
577
|
+
}), $e = {
|
|
517
578
|
name: {
|
|
518
579
|
label: "Name",
|
|
519
580
|
placeholder: "Enter name"
|
|
@@ -552,7 +613,7 @@ var ve = {
|
|
|
552
613
|
saveLabel: "Save"
|
|
553
614
|
},
|
|
554
615
|
ariaLabel: "Metadata"
|
|
555
|
-
},
|
|
616
|
+
}, et = {
|
|
556
617
|
title: "Add avatar",
|
|
557
618
|
attachLabel: "Attach",
|
|
558
619
|
emptyTitle: "This folder is empty",
|
|
@@ -576,83 +637,82 @@ var ve = {
|
|
|
576
637
|
deleteConfirmItemsLabel: "items?",
|
|
577
638
|
deleteConfirmLabel: "Delete",
|
|
578
639
|
deleteCancelLabel: "Cancel"
|
|
579
|
-
},
|
|
580
|
-
let [
|
|
581
|
-
let t =
|
|
582
|
-
t && n({ iconUrl: t }),
|
|
583
|
-
}, [n,
|
|
584
|
-
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(
|
|
640
|
+
}, tt = Te(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = ze, isNameReadOnly: l, nameReadOnlyTooltip: u, isVersionReadOnly: d, versionReadOnlyTooltip: f, nameCaption: p, isDescriptionRequired: m, descriptionCaption: h, renderDescription: g, focusRequestKey: _, labels: v }) => {
|
|
641
|
+
let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), E = R(() => b(!1), []), D = a?.resolveAttachedIconUrl, O = R((e) => {
|
|
642
|
+
let t = D?.(e);
|
|
643
|
+
t && n({ iconUrl: t }), b(!1);
|
|
644
|
+
}, [n, D]);
|
|
645
|
+
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(qe, {
|
|
585
646
|
values: e,
|
|
586
647
|
errors: t,
|
|
587
648
|
onChange: n,
|
|
588
649
|
onNameBlur: r,
|
|
589
650
|
onVersionBlur: i,
|
|
590
|
-
iconPreviewUrl:
|
|
591
|
-
onAddAvatarClick:
|
|
592
|
-
labels:
|
|
651
|
+
iconPreviewUrl: w,
|
|
652
|
+
onAddAvatarClick: T,
|
|
653
|
+
labels: v?.form ?? $e,
|
|
593
654
|
availableLocaleOptions: o,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
655
|
+
formatLocaleLabel: s,
|
|
656
|
+
fields: x,
|
|
657
|
+
isNameReadOnly: l,
|
|
658
|
+
nameReadOnlyTooltip: u,
|
|
659
|
+
isVersionReadOnly: d,
|
|
660
|
+
versionReadOnlyTooltip: f,
|
|
661
|
+
nameCaption: p,
|
|
662
|
+
isDescriptionRequired: m,
|
|
663
|
+
descriptionCaption: h,
|
|
664
|
+
renderDescription: g,
|
|
665
|
+
focusRequestKey: _
|
|
666
|
+
}), a && /* @__PURE__ */ F(Re, {
|
|
667
|
+
isOpen: y,
|
|
668
|
+
onClose: E,
|
|
669
|
+
onAttach: O,
|
|
604
670
|
bucket: a.bucket,
|
|
605
671
|
FileManagerModal: a.FileManagerModal,
|
|
606
672
|
allowedMimeTypes: a.allowedMimeTypes,
|
|
607
673
|
maxFileSizeBytes: a.maxFileSizeBytes,
|
|
608
|
-
labels:
|
|
674
|
+
labels: v?.avatarPicker ?? et
|
|
609
675
|
})] });
|
|
610
|
-
}),
|
|
676
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
611
677
|
return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
|
|
612
678
|
}({});
|
|
613
|
-
|
|
679
|
+
G.TooLong, G.ControlCharacters;
|
|
614
680
|
//#endregion
|
|
615
681
|
//#region src/constants/public-class-names.ts
|
|
616
|
-
var
|
|
682
|
+
var nt = {
|
|
617
683
|
root: "dial-skill-editor-root",
|
|
618
684
|
refineFeedback: "dial-skill-editor-refine-feedback"
|
|
619
685
|
}, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
|
|
620
686
|
return e.File = "file", e.Folder = "folder", e;
|
|
621
|
-
}({}),
|
|
622
|
-
return e.Header = "header", e.Child = "child", e
|
|
687
|
+
}({}), rt = /* @__PURE__ */ function(e) {
|
|
688
|
+
return e.Header = "header", e.Child = "child", e;
|
|
623
689
|
}({}), J = (e) => {
|
|
624
690
|
let t = e.lastIndexOf("/");
|
|
625
691
|
return t === -1 ? null : e.slice(0, t);
|
|
626
|
-
},
|
|
692
|
+
}, it = (e) => {
|
|
627
693
|
let t = e.lastIndexOf("/");
|
|
628
694
|
return t === -1 ? e : e.slice(t + 1);
|
|
629
|
-
},
|
|
695
|
+
}, at = (e) => {
|
|
630
696
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
631
697
|
let n = t.get(e);
|
|
632
698
|
if (n) return n;
|
|
633
699
|
let r = {
|
|
634
700
|
path: e,
|
|
635
|
-
name:
|
|
636
|
-
nodeType:
|
|
701
|
+
name: it(e),
|
|
702
|
+
nodeType: Oe.FOLDER,
|
|
637
703
|
parentPath: J(e),
|
|
638
704
|
folderId: e,
|
|
639
705
|
items: []
|
|
640
706
|
};
|
|
641
707
|
return t.set(e, r), r;
|
|
642
708
|
};
|
|
643
|
-
for (let r of e) {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
name: r.name,
|
|
651
|
-
nodeType: he.ITEM,
|
|
652
|
-
parentPath: J(r.path),
|
|
653
|
-
folderId: J(r.path) ?? ""
|
|
654
|
-
});
|
|
655
|
-
}
|
|
709
|
+
for (let r of e) r.kind === q.Folder ? n(r.path).name = r.name : t.set(r.path, {
|
|
710
|
+
path: r.path,
|
|
711
|
+
name: r.name,
|
|
712
|
+
nodeType: Oe.ITEM,
|
|
713
|
+
parentPath: J(r.path),
|
|
714
|
+
folderId: J(r.path) ?? ""
|
|
715
|
+
});
|
|
656
716
|
for (let t of [...e]) {
|
|
657
717
|
let e = J(t.path);
|
|
658
718
|
for (; e != null;) n(e), e = J(e);
|
|
@@ -667,44 +727,61 @@ var Re = {
|
|
|
667
727
|
n ? n.items = [...n.items ?? [], e] : r.push(e);
|
|
668
728
|
}
|
|
669
729
|
return r;
|
|
670
|
-
},
|
|
730
|
+
}, ot = (e, t) => e ? `${e}/${t}` : t, st = (e, t) => {
|
|
731
|
+
let n = e.lastIndexOf("/"), r = n === -1 ? "" : e.slice(0, n), i = e.slice(n + 1), a = i.lastIndexOf("."), o = a > 0, s = o ? i.slice(0, a) : i, c = o ? i.slice(a) : "", l = 1, u = ot(r, `${s} (${l})${c}`);
|
|
732
|
+
for (; t.has(u);) l += 1, u = ot(r, `${s} (${l})${c}`);
|
|
733
|
+
return u;
|
|
734
|
+
}, ct = (e, t) => {
|
|
671
735
|
if (!t) return "";
|
|
672
736
|
switch (e) {
|
|
673
|
-
case
|
|
674
|
-
case
|
|
675
|
-
case ze.Header: return t.kind === q.Folder ? t.path : "";
|
|
676
|
-
}
|
|
677
|
-
}, Ge = (e, t) => {
|
|
678
|
-
let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Set();
|
|
679
|
-
for (let { path: i } of e) {
|
|
680
|
-
if (!i.startsWith(n) || i === t) continue;
|
|
681
|
-
let e = i.slice(n.length);
|
|
682
|
-
r.add(e.split("/")[0]);
|
|
737
|
+
case rt.Child: return t.path;
|
|
738
|
+
case rt.Header: return t.kind === q.Folder ? t.path : "";
|
|
683
739
|
}
|
|
684
|
-
|
|
685
|
-
}, Ke = (e, t, n) => {
|
|
740
|
+
}, lt = (e, t) => new Set(dt(e, t).map((e) => e.name)), ut = (e, t, n) => {
|
|
686
741
|
let r = e.trim();
|
|
687
742
|
if (!r) return n.required;
|
|
688
743
|
if (/[/\\]/.test(r) || r === "." || r === "..") return n.invalid;
|
|
689
744
|
if (t.has(r)) return n.duplicate;
|
|
690
|
-
},
|
|
691
|
-
let
|
|
745
|
+
}, dt = (e, t) => {
|
|
746
|
+
let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
747
|
+
for (let a of e) {
|
|
748
|
+
if (!a.path.startsWith(n) || a.path === t) continue;
|
|
749
|
+
let e = a.path.slice(n.length), o = e.indexOf("/"), s = o === -1, c = s ? e : e.slice(0, o), l = `${n}${c}`, u = s && a.kind === q.File ? q.File : q.Folder;
|
|
750
|
+
if (r.has(l) || r.set(l, {
|
|
751
|
+
path: l,
|
|
752
|
+
name: c,
|
|
753
|
+
kind: u,
|
|
754
|
+
childCount: 0
|
|
755
|
+
}), !s) {
|
|
756
|
+
let t = o + 1, n = e.indexOf("/", t), r = e.slice(t, n === -1 ? void 0 : n);
|
|
757
|
+
i.set(l, (i.get(l) ?? /* @__PURE__ */ new Set()).add(r));
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return [...r.values()].map((e) => ({
|
|
761
|
+
...e,
|
|
762
|
+
childCount: i.get(e.path)?.size ?? 0
|
|
763
|
+
})).sort((e, t) => e.kind === t.kind ? e.name.localeCompare(t.name) : e.kind === q.Folder ? -1 : 1);
|
|
764
|
+
}, ft = (e) => {
|
|
765
|
+
let t = e.split("/").slice(0, -1);
|
|
766
|
+
return t.map((e, n) => t.slice(0, n + 1).join("/"));
|
|
767
|
+
}, pt = "\\new-folder", mt = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
|
|
768
|
+
let [o, s] = V(null), c = o?.parentPath ?? null, l = B([]), u = c == null ? void 0 : ot(c, pt), d = z(() => u == null ? void 0 : {
|
|
692
769
|
path: u,
|
|
693
770
|
name: n,
|
|
694
771
|
kind: q.Folder
|
|
695
|
-
}, [u, n]), f =
|
|
696
|
-
let a =
|
|
697
|
-
return i === "" && a.add(K),
|
|
772
|
+
}, [u, n]), f = R((n, i) => {
|
|
773
|
+
let a = lt(e, i);
|
|
774
|
+
return i === "" && a.add(K), ut(n, a, r) ?? t.validateFolderPath?.(ot(i, n.trim()));
|
|
698
775
|
}, [
|
|
699
776
|
e,
|
|
700
777
|
r,
|
|
701
778
|
t
|
|
702
|
-
]), p =
|
|
779
|
+
]), p = R((e, t) => {
|
|
703
780
|
l.current = [], s({
|
|
704
781
|
parentPath: e,
|
|
705
782
|
pane: t
|
|
706
783
|
}), e !== "" && i(e);
|
|
707
|
-
}, [i]), m =
|
|
784
|
+
}, [i]), m = R((e, t) => {
|
|
708
785
|
if (c == null || t.path !== u) return null;
|
|
709
786
|
let n = f(e, c);
|
|
710
787
|
return l.current = [...l.current.slice(-1), {
|
|
@@ -715,23 +792,24 @@ var Re = {
|
|
|
715
792
|
c,
|
|
716
793
|
u,
|
|
717
794
|
f
|
|
718
|
-
]), h =
|
|
795
|
+
]), h = R(() => {
|
|
719
796
|
l.current = [], s(null);
|
|
720
|
-
}, []), g =
|
|
797
|
+
}, []), g = R((e, n) => {
|
|
798
|
+
let r = ot(n, e.trim());
|
|
799
|
+
t.onCreateFolder?.(r), n !== "" && i(n), a(r);
|
|
800
|
+
}, [
|
|
801
|
+
t,
|
|
802
|
+
i,
|
|
803
|
+
a
|
|
804
|
+
]), _ = R((e) => {
|
|
721
805
|
if (c == null) return;
|
|
722
|
-
let [
|
|
723
|
-
|
|
724
|
-
h();
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
|
-
let r = He(c, e.trim());
|
|
728
|
-
h(), t.onCreateFolder?.(r), a(r);
|
|
806
|
+
let [t] = l.current;
|
|
807
|
+
l.current.length === 2 && t != null && !t.isValid && t.value !== e || f(e, c) != null ? h() : (h(), g(e, c));
|
|
729
808
|
}, [
|
|
730
809
|
c,
|
|
731
810
|
f,
|
|
732
811
|
h,
|
|
733
|
-
|
|
734
|
-
a
|
|
812
|
+
g
|
|
735
813
|
]);
|
|
736
814
|
return {
|
|
737
815
|
draftNode: d,
|
|
@@ -739,711 +817,1007 @@ var Re = {
|
|
|
739
817
|
draftPane: o?.pane,
|
|
740
818
|
startDraft: p,
|
|
741
819
|
handleValidate: m,
|
|
742
|
-
handleSave:
|
|
743
|
-
handleCancel: h
|
|
820
|
+
handleSave: _,
|
|
821
|
+
handleCancel: h,
|
|
822
|
+
validateNewFolder: f,
|
|
823
|
+
createFolder: g
|
|
744
824
|
};
|
|
745
|
-
},
|
|
746
|
-
let [t, n] =
|
|
825
|
+
}, ht = (e) => !!e.dataTransfer?.types.includes("Files"), gt = (e) => {
|
|
826
|
+
let [t, n] = V(!1), r = B(0);
|
|
747
827
|
return {
|
|
748
828
|
isDragActive: t,
|
|
749
829
|
dropZoneHandlers: {
|
|
750
|
-
onDragEnter:
|
|
751
|
-
|
|
830
|
+
onDragEnter: R((e) => {
|
|
831
|
+
ht(e) && (e.preventDefault(), r.current += 1, n(!0));
|
|
752
832
|
}, []),
|
|
753
|
-
onDragLeave:
|
|
754
|
-
|
|
833
|
+
onDragLeave: R((e) => {
|
|
834
|
+
ht(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
|
|
755
835
|
}, []),
|
|
756
|
-
onDragOver:
|
|
757
|
-
|
|
836
|
+
onDragOver: R((e) => {
|
|
837
|
+
ht(e) && e.preventDefault();
|
|
758
838
|
}, []),
|
|
759
|
-
onDrop:
|
|
760
|
-
if (!
|
|
839
|
+
onDrop: R((t) => {
|
|
840
|
+
if (!ht(t)) return;
|
|
761
841
|
t.preventDefault(), r.current = 0, n(!1);
|
|
762
842
|
let i = Array.from(t.dataTransfer?.files ?? []);
|
|
763
843
|
i.length > 0 && e(i);
|
|
764
844
|
}, [e])
|
|
765
845
|
}
|
|
766
846
|
};
|
|
767
|
-
},
|
|
847
|
+
}, _t = /* @__PURE__ */ function(e) {
|
|
768
848
|
return e.Files = "files", e.Archive = "archive", e;
|
|
769
849
|
}({}), Y = /* @__PURE__ */ function(e) {
|
|
770
850
|
return e.Mobile = "mobile", e.Desktop = "desktop", e;
|
|
771
|
-
}({}),
|
|
851
|
+
}({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ F(e, {
|
|
772
852
|
size: n,
|
|
773
853
|
className: t,
|
|
854
|
+
style: r,
|
|
774
855
|
"aria-hidden": !0,
|
|
775
|
-
stroke:
|
|
776
|
-
}),
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
856
|
+
stroke: x
|
|
857
|
+
}), yt = { footer: "_footer_hn1ri_7" }, bt = ({ isOpen: e, title: t, closeAriaLabel: n, onClose: r, confirmLabel: i, onConfirm: a, cancelLabel: s, onCancel: l, isConfirmDisabled: u = !1, isConfirming: f = !1, children: p, colors: h }) => {
|
|
858
|
+
let _ = d(), y = f ? /* @__PURE__ */ F(fe, {
|
|
859
|
+
size: 16,
|
|
860
|
+
ariaLabel: ""
|
|
861
|
+
}) : void 0;
|
|
862
|
+
if (_) {
|
|
863
|
+
let d = o({
|
|
864
|
+
"--se-dialog-footer-bg": h?.footerBackground,
|
|
865
|
+
"--se-dialog-footer-border": h?.footerBorder
|
|
866
|
+
});
|
|
867
|
+
return /* @__PURE__ */ I(m, {
|
|
868
|
+
open: e,
|
|
869
|
+
title: t,
|
|
870
|
+
closeAriaLabel: n,
|
|
871
|
+
onClose: r,
|
|
872
|
+
children: [p, /* @__PURE__ */ I("div", {
|
|
873
|
+
className: c("sticky bottom-0 flex gap-3 border-t p-4", yt.footer),
|
|
874
|
+
style: d,
|
|
875
|
+
children: [/* @__PURE__ */ F(ce, {
|
|
876
|
+
className: "flex-1",
|
|
877
|
+
label: i,
|
|
878
|
+
iconBefore: y,
|
|
879
|
+
disabled: u,
|
|
880
|
+
onClick: a
|
|
881
|
+
}), /* @__PURE__ */ F(ae, {
|
|
882
|
+
className: "flex-1",
|
|
883
|
+
label: s,
|
|
884
|
+
onClick: l
|
|
885
|
+
})]
|
|
886
|
+
})]
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
return /* @__PURE__ */ F(N, {
|
|
890
|
+
open: e,
|
|
891
|
+
header: t,
|
|
892
|
+
size: se.Sm,
|
|
893
|
+
closeAriaLabel: n,
|
|
894
|
+
onClose: r,
|
|
895
|
+
mainButtons: [{
|
|
896
|
+
label: s,
|
|
897
|
+
variant: v.Primary,
|
|
898
|
+
appearance: g.Ghost,
|
|
899
|
+
onClick: l
|
|
900
|
+
}, {
|
|
901
|
+
label: i,
|
|
902
|
+
variant: v.Primary,
|
|
903
|
+
iconBefore: y,
|
|
904
|
+
onClick: a,
|
|
905
|
+
disabled: u
|
|
906
|
+
}],
|
|
907
|
+
children: p
|
|
908
|
+
});
|
|
909
|
+
}, xt = ({ isOpen: e, onClose: t, validateName: n, onCreate: r, title: i, nameLabel: a, namePlaceholder: o, createLabel: s, cancelLabel: c, closeAriaLabel: l, dialogColors: u }) => {
|
|
910
|
+
let d = De(), [f, p] = V(""), [m, h] = V(!1);
|
|
911
|
+
Ee(() => {
|
|
912
|
+
e && (p(""), h(!1));
|
|
913
|
+
}, [e]);
|
|
914
|
+
let g = m ? n(f) : void 0, _ = () => {
|
|
915
|
+
h(!0), n(f) ?? (r(f), t());
|
|
916
|
+
};
|
|
917
|
+
return /* @__PURE__ */ F(bt, {
|
|
918
|
+
isOpen: e,
|
|
919
|
+
title: i,
|
|
920
|
+
closeAriaLabel: l,
|
|
921
|
+
onClose: t,
|
|
922
|
+
confirmLabel: s,
|
|
923
|
+
onConfirm: _,
|
|
924
|
+
cancelLabel: c,
|
|
925
|
+
onCancel: t,
|
|
926
|
+
colors: u,
|
|
927
|
+
children: /* @__PURE__ */ F("form", {
|
|
928
|
+
className: "px-4 py-4 desktop:px-6",
|
|
929
|
+
onSubmit: (e) => {
|
|
930
|
+
e.preventDefault(), _();
|
|
931
|
+
},
|
|
932
|
+
children: /* @__PURE__ */ F(j, {
|
|
933
|
+
id: d,
|
|
934
|
+
labelProps: {
|
|
935
|
+
label: a,
|
|
936
|
+
htmlFor: d,
|
|
937
|
+
required: !0
|
|
938
|
+
},
|
|
939
|
+
value: f,
|
|
940
|
+
placeholder: o,
|
|
941
|
+
error: g,
|
|
942
|
+
invalid: g != null,
|
|
943
|
+
onChange: (e) => p(e ?? "")
|
|
944
|
+
})
|
|
945
|
+
})
|
|
946
|
+
});
|
|
947
|
+
}, St = { icon: "_icon_1p1f5_1" }, Ct = ({ isVisible: e, labels: t, titleClassName: n = "dial-h3-text", subtitleClassName: r = "dial-small-text" }) => {
|
|
948
|
+
let i = t ?? {}, a = i.dropOverlayTitle ?? "Upload files", o = i.dropOverlaySubtitle ?? "Drop files here to add them to this skill", s = /* @__PURE__ */ F(re, {
|
|
949
|
+
visuallyHidden: !0,
|
|
950
|
+
as: ie.Span,
|
|
951
|
+
children: e ? `${a}. ${o}` : ""
|
|
952
|
+
});
|
|
953
|
+
return e ? /* @__PURE__ */ I(P, { children: [s, /* @__PURE__ */ F("div", {
|
|
954
|
+
className: c("pointer-events-none absolute inset-0 z-100 flex items-center justify-center backdrop-blur-sm"),
|
|
783
955
|
children: /* @__PURE__ */ I("div", {
|
|
956
|
+
"aria-hidden": !0,
|
|
784
957
|
className: "flex flex-col items-center text-center",
|
|
785
958
|
children: [
|
|
786
|
-
/* @__PURE__ */ F(
|
|
959
|
+
/* @__PURE__ */ F(Se, {
|
|
787
960
|
size: 100,
|
|
788
|
-
className:
|
|
961
|
+
className: St.icon,
|
|
789
962
|
"aria-hidden": !0,
|
|
790
|
-
stroke:
|
|
963
|
+
stroke: x
|
|
791
964
|
}),
|
|
792
965
|
/* @__PURE__ */ F("span", {
|
|
793
|
-
className: "
|
|
794
|
-
children:
|
|
966
|
+
className: c("mt-5", n),
|
|
967
|
+
children: a
|
|
795
968
|
}),
|
|
796
969
|
/* @__PURE__ */ F("span", {
|
|
797
|
-
className: "
|
|
798
|
-
children:
|
|
970
|
+
className: c("mt-4", r),
|
|
971
|
+
children: o
|
|
799
972
|
})
|
|
800
973
|
]
|
|
801
974
|
})
|
|
802
|
-
});
|
|
803
|
-
},
|
|
975
|
+
})] }) : s;
|
|
976
|
+
}, wt = {
|
|
977
|
+
card: "_card_1tr87_2",
|
|
978
|
+
label: "_label_1tr87_7",
|
|
979
|
+
fileName: "_fileName_1tr87_11",
|
|
980
|
+
header: "_header_1tr87_16"
|
|
981
|
+
}, Tt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ F(p, {
|
|
982
|
+
expanded: n,
|
|
983
|
+
onToggle: r,
|
|
984
|
+
title: /* @__PURE__ */ F("span", {
|
|
985
|
+
className: c("block", wt.label, a),
|
|
986
|
+
children: e
|
|
987
|
+
}),
|
|
988
|
+
description: /* @__PURE__ */ F(k, {
|
|
989
|
+
name: t,
|
|
990
|
+
nameClassName: c(wt.fileName, o)
|
|
991
|
+
}),
|
|
992
|
+
className: c("rounded-lg border py-0 shadow-xs", wt.card),
|
|
993
|
+
headerClassName: c("gap-4 rounded-lg py-2 ps-3 pe-2 text-start [&>span]:flex-1 [&>span]:gap-1 [&>svg]:size-6", n ? "[&>svg]:-rotate-90" : "[&>svg]:rotate-90", wt.header),
|
|
994
|
+
contentClassName: "max-h-[416px] overflow-y-auto pt-4 pb-2 ps-3 pe-2",
|
|
995
|
+
children: i
|
|
996
|
+
}), Et = /* @__PURE__ */ function(e) {
|
|
804
997
|
return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
|
|
805
|
-
}({}),
|
|
998
|
+
}({}), Dt = /* @__PURE__ */ function(e) {
|
|
806
999
|
return e.Valid = "valid", e.Invalid = "invalid", e;
|
|
807
|
-
}({}),
|
|
808
|
-
|
|
1000
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
1001
|
+
return e.Replace = "replace", e.Duplicate = "duplicate", e;
|
|
1002
|
+
}({}), Z = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), Q = {
|
|
1003
|
+
invalidDropZone: "_invalidDropZone_j9j9q_1",
|
|
1004
|
+
row: "_row_j9j9q_5"
|
|
1005
|
+
}, $ = ".zip,application/zip", Ot = [], kt = 0, At = () => `skill-file-candidate-${++kt}`, jt = (e, t, n) => ({
|
|
1006
|
+
id: At(),
|
|
809
1007
|
file: e,
|
|
810
|
-
path:
|
|
811
|
-
}),
|
|
812
|
-
let
|
|
813
|
-
|
|
814
|
-
|
|
1008
|
+
path: ot(n, t.replace(/\\/g, "/"))
|
|
1009
|
+
}), Mt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = Ot, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
|
|
1010
|
+
let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), E = z(() => new Set(u), [u]), [A, j] = V(/* @__PURE__ */ new Map()), [te, ne] = V([]), [ae, oe] = V(!1), [N, se] = V(), [ce, ue] = V(!1), [de, pe] = V(), [me, he] = V(0), ge = B(0), L = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
|
|
1011
|
+
Ee(() => {
|
|
1012
|
+
e && (we == null ? Ce.current && (Ce.current = !1, document.getElementById(ye)?.focus()) : (Ce.current = !0, Se.current?.focus()));
|
|
1013
|
+
}, [
|
|
1014
|
+
we,
|
|
1015
|
+
e,
|
|
1016
|
+
ye
|
|
1017
|
+
]);
|
|
1018
|
+
let Te = (e) => e.path !== "SKILL.md" && E.has(e.path), R = (e) => {
|
|
1019
|
+
se(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
|
|
1020
|
+
}, Oe = (e) => {
|
|
1021
|
+
let [t, ...n] = S;
|
|
1022
|
+
t && (C(n), T(X.Replace), e != null && (se(void 0), b((r) => {
|
|
1023
|
+
if (e === X.Replace) return [...r, {
|
|
1024
|
+
...t,
|
|
1025
|
+
replacesExisting: !0
|
|
1026
|
+
}];
|
|
1027
|
+
let i = /* @__PURE__ */ new Set([
|
|
1028
|
+
...u,
|
|
1029
|
+
...r.map((e) => e.path),
|
|
1030
|
+
...n.map((e) => e.path)
|
|
1031
|
+
]);
|
|
1032
|
+
return [...r, {
|
|
1033
|
+
...t,
|
|
1034
|
+
path: st(t.path, i)
|
|
1035
|
+
}];
|
|
1036
|
+
})));
|
|
1037
|
+
}, ke = async (e) => {
|
|
815
1038
|
let { extractArchive: t } = n;
|
|
816
1039
|
if (!t) return;
|
|
817
|
-
let r =
|
|
818
|
-
|
|
1040
|
+
let r = ge.current;
|
|
1041
|
+
pe(void 0), he((e) => e + 1);
|
|
819
1042
|
try {
|
|
820
1043
|
let n = await Promise.all(e.map((e) => t(e)));
|
|
821
|
-
if (r !==
|
|
1044
|
+
if (r !== ge.current) return;
|
|
822
1045
|
let a = n.flat();
|
|
823
1046
|
if (a.length === 0) {
|
|
824
|
-
|
|
1047
|
+
pe(_.uploadArchiveEmptyMessage ?? "This archive has no files");
|
|
825
1048
|
return;
|
|
826
1049
|
}
|
|
827
|
-
|
|
1050
|
+
R(a.map((e) => jt(e.file, e.path, i)));
|
|
828
1051
|
} catch {
|
|
829
|
-
if (r !==
|
|
830
|
-
|
|
1052
|
+
if (r !== ge.current) return;
|
|
1053
|
+
pe(_e);
|
|
831
1054
|
} finally {
|
|
832
|
-
r ===
|
|
833
|
-
}
|
|
834
|
-
}, se = (e) => {
|
|
835
|
-
if (N) {
|
|
836
|
-
oe(e);
|
|
837
|
-
return;
|
|
1055
|
+
r === ge.current && he((e) => e - 1);
|
|
838
1056
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
1057
|
+
}, Ae = (e) => {
|
|
1058
|
+
L ? ke(e) : R(e.map((e) => jt(e, Z(e), i)));
|
|
1059
|
+
}, H = (e) => {
|
|
1060
|
+
b((t) => t.filter((t) => t.id !== e));
|
|
842
1061
|
};
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1062
|
+
Ee(() => {
|
|
1063
|
+
if (!e) return;
|
|
1064
|
+
ge.current += 1;
|
|
1065
|
+
let t = [...(a ?? []).map((e) => jt(e, Z(e), i)), ...(l ?? []).map((e) => jt(e.file, e.path, i))];
|
|
1066
|
+
b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), j(/* @__PURE__ */ new Map()), ne([]), se(void 0), pe(void 0), he(0);
|
|
1067
|
+
}, [e]), Ee(() => {
|
|
846
1068
|
if (!e) return;
|
|
847
1069
|
let t = !1;
|
|
848
|
-
if (
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
return b(!0), n.validateBatch(u).then(({ results: e, batchErrors: n }) => {
|
|
853
|
-
t || (h(new Map(e.map((e) => [e.candidateId, e]))), v(n.map((e) => e.message)));
|
|
1070
|
+
if (v.length === 0) j(/* @__PURE__ */ new Map()), ne([]);
|
|
1071
|
+
else return oe(!0), n.validateBatch(v).then(({ results: e, batchErrors: n }) => {
|
|
1072
|
+
t || (j(new Map(e.map((e) => [e.candidateId, e]))), ne(n.map((e) => e.message)));
|
|
854
1073
|
}).finally(() => {
|
|
855
|
-
t ||
|
|
1074
|
+
t || oe(!1);
|
|
856
1075
|
}), () => {
|
|
857
1076
|
t = !0;
|
|
858
1077
|
};
|
|
859
|
-
}, [
|
|
860
|
-
let
|
|
861
|
-
|
|
1078
|
+
}, [v, e]);
|
|
1079
|
+
let je = v.some((e) => A.get(e.id)?.status === Dt.Invalid), Me = v.length > 0 && v.every((e) => A.get(e.id)?.status === Dt.Invalid), Ne = [...te, ...v.flatMap((e) => {
|
|
1080
|
+
let t = A.get(e.id);
|
|
1081
|
+
return t?.status === Dt.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
|
|
1082
|
+
})], U = v.length > 0 && !je && te.length === 0 && !ae && !ce && me === 0, Pe = async () => {
|
|
1083
|
+
ue(!0), se(void 0);
|
|
862
1084
|
try {
|
|
863
|
-
let { results: e, batchErrors: r } = await n.validateBatch(
|
|
864
|
-
if (
|
|
865
|
-
let a = await n.commitBatch(
|
|
1085
|
+
let { results: e, batchErrors: r } = await n.validateBatch(v), i = new Map(e.map((e) => [e.candidateId, e]));
|
|
1086
|
+
if (j(i), ne(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Dt.Invalid) || r.length > 0) return;
|
|
1087
|
+
let a = await n.commitBatch(v);
|
|
866
1088
|
if (a.error) {
|
|
867
|
-
|
|
1089
|
+
se(a.error);
|
|
868
1090
|
return;
|
|
869
1091
|
}
|
|
870
|
-
t();
|
|
1092
|
+
d?.(v), t();
|
|
871
1093
|
} finally {
|
|
872
|
-
|
|
1094
|
+
ue(!1);
|
|
873
1095
|
}
|
|
874
|
-
};
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1096
|
+
}, Fe = _.uploadDialogCloseAriaLabel ?? "Close", Ie = _.uploadCancelLabel ?? "Cancel", [Le] = S;
|
|
1097
|
+
if (Le) {
|
|
1098
|
+
let t = _.uploadConflictTitle ?? "Replace or duplicate it?";
|
|
1099
|
+
return /* @__PURE__ */ F(bt, {
|
|
1100
|
+
isOpen: e,
|
|
1101
|
+
title: t,
|
|
1102
|
+
closeAriaLabel: Fe,
|
|
1103
|
+
onClose: () => Oe(null),
|
|
1104
|
+
confirmLabel: _.uploadConflictConfirmLabel ?? "Confirm",
|
|
1105
|
+
onConfirm: () => Oe(w),
|
|
1106
|
+
cancelLabel: Ie,
|
|
1107
|
+
onCancel: () => Oe(null),
|
|
1108
|
+
colors: h,
|
|
1109
|
+
children: /* @__PURE__ */ I("div", {
|
|
1110
|
+
className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
|
|
1111
|
+
children: [/* @__PURE__ */ F("p", {
|
|
1112
|
+
ref: Se,
|
|
1113
|
+
tabIndex: -1,
|
|
1114
|
+
className: c("outline-hidden", f),
|
|
1115
|
+
children: _.uploadConflictMessage?.(Le.path) ?? `Item with the same name "${Le.path}" already exists.`
|
|
1116
|
+
}), /* @__PURE__ */ F(le, {
|
|
1117
|
+
ariaLabel: t,
|
|
1118
|
+
value: w,
|
|
1119
|
+
onChange: (e) => T(e === X.Duplicate ? X.Duplicate : X.Replace),
|
|
1120
|
+
items: [{
|
|
1121
|
+
value: X.Replace,
|
|
1122
|
+
label: _.uploadConflictReplaceLabel ?? "Replace"
|
|
1123
|
+
}, {
|
|
1124
|
+
value: X.Duplicate,
|
|
1125
|
+
label: _.uploadConflictDuplicateLabel ?? "Duplicate"
|
|
1126
|
+
}]
|
|
1127
|
+
})]
|
|
1128
|
+
})
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
return /* @__PURE__ */ F(bt, {
|
|
1132
|
+
isOpen: e,
|
|
1133
|
+
title: L ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
|
|
1134
|
+
closeAriaLabel: Fe,
|
|
880
1135
|
onClose: t,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
variant: m.Primary,
|
|
889
|
-
iconBefore: E ? /* @__PURE__ */ F(ne, {
|
|
890
|
-
size: 16,
|
|
891
|
-
ariaLabel: ""
|
|
892
|
-
}) : void 0,
|
|
893
|
-
onClick: () => void fe(),
|
|
894
|
-
disabled: !R
|
|
895
|
-
}],
|
|
1136
|
+
confirmLabel: _.uploadConfirmLabel ?? "Add",
|
|
1137
|
+
onConfirm: () => void Pe(),
|
|
1138
|
+
isConfirmDisabled: !U,
|
|
1139
|
+
isConfirming: ce,
|
|
1140
|
+
cancelLabel: Ie,
|
|
1141
|
+
onCancel: t,
|
|
1142
|
+
colors: h,
|
|
896
1143
|
children: /* @__PURE__ */ I("div", {
|
|
897
|
-
className: "flex flex-col gap-4 px-
|
|
1144
|
+
className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
|
|
1145
|
+
style: o({
|
|
1146
|
+
"--se-upload-invalid-dropzone-border": g?.invalidDropZoneBorder,
|
|
1147
|
+
"--se-upload-row-border": g?.rowBorder
|
|
1148
|
+
}),
|
|
898
1149
|
children: [
|
|
899
|
-
/* @__PURE__ */ F(
|
|
1150
|
+
/* @__PURE__ */ F(O, {
|
|
900
1151
|
label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
|
|
901
1152
|
className: "desktop:hidden",
|
|
902
|
-
children:
|
|
1153
|
+
children: L ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
|
|
903
1154
|
}), /* @__PURE__ */ F("span", {
|
|
904
1155
|
className: "hidden desktop:inline",
|
|
905
|
-
children:
|
|
1156
|
+
children: L ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
|
|
906
1157
|
})] }),
|
|
907
|
-
|
|
1158
|
+
description: L ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
|
|
1159
|
+
id: ye,
|
|
1160
|
+
ariaLabel: _.uploadDropZoneAriaLabel ?? "Upload files",
|
|
908
1161
|
multiple: !0,
|
|
909
|
-
accept:
|
|
910
|
-
className:
|
|
911
|
-
onChange:
|
|
912
|
-
onReject:
|
|
1162
|
+
accept: L ? $ : void 0,
|
|
1163
|
+
className: Me ? Q.invalidDropZone : void 0,
|
|
1164
|
+
onChange: Ae,
|
|
1165
|
+
onReject: L ? () => pe(_e) : void 0
|
|
913
1166
|
}),
|
|
914
|
-
|
|
915
|
-
/* @__PURE__ */ F(
|
|
916
|
-
|
|
917
|
-
|
|
1167
|
+
me > 0 && /* @__PURE__ */ F(fe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
|
|
1168
|
+
/* @__PURE__ */ F(D, {
|
|
1169
|
+
text: de,
|
|
1170
|
+
announce: M.Assertive
|
|
918
1171
|
}),
|
|
919
|
-
/* @__PURE__ */ F(
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
children: g.map((e) => `${l.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
|
|
1172
|
+
/* @__PURE__ */ F(re, {
|
|
1173
|
+
visuallyHidden: !0,
|
|
1174
|
+
as: ie.Span,
|
|
1175
|
+
id: ve,
|
|
1176
|
+
children: Ne.map((e) => `${_.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
|
|
925
1177
|
}),
|
|
926
|
-
|
|
927
|
-
|
|
1178
|
+
te.map((e) => /* @__PURE__ */ F(D, { text: e }, e)),
|
|
1179
|
+
v.length > 0 && /* @__PURE__ */ F("ul", {
|
|
928
1180
|
className: "flex flex-col gap-2",
|
|
929
|
-
children:
|
|
930
|
-
let t =
|
|
1181
|
+
children: v.map((e) => {
|
|
1182
|
+
let t = A.get(e.id), n = t?.kind === Et.Manifest, r = t?.status === Dt.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
|
|
931
1183
|
return /* @__PURE__ */ I("li", {
|
|
932
|
-
className: "flex items-center gap-2 rounded-lg border
|
|
933
|
-
children: [
|
|
934
|
-
|
|
935
|
-
|
|
1184
|
+
className: c("flex items-center gap-2 rounded-lg border p-2", Q.row),
|
|
1185
|
+
children: [/* @__PURE__ */ F(k, {
|
|
1186
|
+
name: e.path,
|
|
1187
|
+
className: "min-w-0 flex-1",
|
|
1188
|
+
details: /* @__PURE__ */ I(P, { children: [
|
|
1189
|
+
/* @__PURE__ */ F(y, {
|
|
1190
|
+
className: p,
|
|
1191
|
+
text: s(e.file.size)
|
|
1192
|
+
}),
|
|
1193
|
+
/* @__PURE__ */ F(D, {
|
|
1194
|
+
id: a,
|
|
1195
|
+
text: i
|
|
1196
|
+
}),
|
|
1197
|
+
n && !r && /* @__PURE__ */ F(y, {
|
|
1198
|
+
className: p,
|
|
1199
|
+
text: _.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
|
|
1200
|
+
}),
|
|
1201
|
+
e.replacesExisting && !r && /* @__PURE__ */ F(y, {
|
|
1202
|
+
className: p,
|
|
1203
|
+
text: _.uploadReplaceRowNote ?? "Will replace the existing file"
|
|
1204
|
+
})
|
|
1205
|
+
] })
|
|
1206
|
+
}), /* @__PURE__ */ F(ee, {
|
|
1207
|
+
icon: /* @__PURE__ */ F(xe, {
|
|
1208
|
+
size: 16,
|
|
936
1209
|
"aria-hidden": !0,
|
|
937
|
-
stroke:
|
|
938
|
-
}),
|
|
939
|
-
/* @__PURE__ */ I("div", {
|
|
940
|
-
className: "flex min-w-0 flex-1 flex-col",
|
|
941
|
-
children: [
|
|
942
|
-
/* @__PURE__ */ F("span", {
|
|
943
|
-
className: "dial-small-text truncate",
|
|
944
|
-
children: e.path
|
|
945
|
-
}),
|
|
946
|
-
/* @__PURE__ */ F("span", {
|
|
947
|
-
className: "dial-tiny-text text-secondary",
|
|
948
|
-
children: s(e.file.size)
|
|
949
|
-
}),
|
|
950
|
-
r && t?.error && /* @__PURE__ */ F(x, { text: t.error }),
|
|
951
|
-
n && !r && /* @__PURE__ */ F("span", {
|
|
952
|
-
className: "dial-tiny-text text-secondary",
|
|
953
|
-
children: l.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
|
|
954
|
-
})
|
|
955
|
-
]
|
|
1210
|
+
stroke: x
|
|
956
1211
|
}),
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
stroke: _
|
|
962
|
-
}),
|
|
963
|
-
"aria-label": l.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
|
|
964
|
-
onClick: () => ce(e.id)
|
|
965
|
-
})
|
|
966
|
-
]
|
|
1212
|
+
"aria-label": _.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
|
|
1213
|
+
"aria-describedby": i ? a : void 0,
|
|
1214
|
+
onClick: () => H(e.id)
|
|
1215
|
+
})]
|
|
967
1216
|
}, e.id);
|
|
968
1217
|
})
|
|
969
1218
|
}),
|
|
970
|
-
|
|
1219
|
+
/* @__PURE__ */ F(D, {
|
|
1220
|
+
text: N,
|
|
1221
|
+
announce: M.Assertive
|
|
1222
|
+
})
|
|
971
1223
|
]
|
|
972
1224
|
})
|
|
973
1225
|
});
|
|
974
|
-
},
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1226
|
+
}, Nt = {
|
|
1227
|
+
list: "_list_1hpyi_1",
|
|
1228
|
+
row: "_row_1hpyi_5",
|
|
1229
|
+
count: "_count_1hpyi_14"
|
|
1230
|
+
}, Pt = (e) => e === 1 ? "1 item" : `${e} items`, Ft = ({ folderPath: e, entries: t, onOpen: n, rootLabel: r = "Skill", breadcrumbAriaLabel: i = "Folder path", overflowAriaLabel: a = "Show hidden path segments", listAriaLabel: o = "Folder content", emptyTitle: s = "This folder is empty", emptyDescription: l = "Use Add to upload files or create a subfolder.", itemCountLabel: u = Pt, itemCountClassName: d = "dial-tiny-text" }) => {
|
|
1231
|
+
let f = e.split("/"), p = [{
|
|
1232
|
+
label: r,
|
|
1233
|
+
onClick: () => n("", q.Folder)
|
|
1234
|
+
}, ...f.map((e, t) => {
|
|
1235
|
+
let r = f.slice(0, t + 1).join("/");
|
|
1236
|
+
return t === f.length - 1 ? { label: e } : {
|
|
1237
|
+
label: e,
|
|
1238
|
+
onClick: () => n(r, q.Folder)
|
|
1239
|
+
};
|
|
1240
|
+
})];
|
|
1241
|
+
return /* @__PURE__ */ I("div", {
|
|
1242
|
+
className: "flex min-h-0 flex-1 flex-col gap-4",
|
|
1243
|
+
children: [/* @__PURE__ */ F(h, {
|
|
1244
|
+
items: p,
|
|
1245
|
+
ariaLabel: i,
|
|
1246
|
+
overflowAriaLabel: a
|
|
1247
|
+
}), t.length === 0 ? /* @__PURE__ */ F(oe, {
|
|
1248
|
+
title: s,
|
|
1249
|
+
description: l,
|
|
1250
|
+
live: !0
|
|
1251
|
+
}) : /* @__PURE__ */ F("ul", {
|
|
1252
|
+
"aria-label": o,
|
|
1253
|
+
className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Nt.list),
|
|
1254
|
+
children: t.map((e) => {
|
|
1255
|
+
let t = e.kind === q.Folder;
|
|
1256
|
+
return /* @__PURE__ */ F("li", {
|
|
1257
|
+
className: "m-0 p-0",
|
|
1258
|
+
children: /* @__PURE__ */ I("button", {
|
|
1259
|
+
type: "button",
|
|
1260
|
+
onClick: () => n(e.path, e.kind),
|
|
1261
|
+
className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Nt.row),
|
|
1262
|
+
children: [/* @__PURE__ */ F(k, {
|
|
1263
|
+
name: e.name,
|
|
1264
|
+
type: t ? C.Folder : C.File,
|
|
1265
|
+
className: "min-w-0 flex-1"
|
|
1266
|
+
}), t && /* @__PURE__ */ F("span", {
|
|
1267
|
+
className: c("shrink-0", Nt.count, d),
|
|
1268
|
+
children: u(e.childCount)
|
|
1269
|
+
})]
|
|
1270
|
+
})
|
|
1271
|
+
}, e.path);
|
|
1272
|
+
})
|
|
1273
|
+
})]
|
|
1274
|
+
});
|
|
1275
|
+
}, It = {
|
|
1276
|
+
title: "_title_lgmx6_1",
|
|
1277
|
+
helperText: "_helperText_lgmx6_5",
|
|
1278
|
+
refineFeedback: "_refineFeedback_lgmx6_9",
|
|
1279
|
+
refineError: "_refineError_lgmx6_13",
|
|
1280
|
+
menuIcon: "_menuIcon_lgmx6_17"
|
|
1281
|
+
}, Lt = {
|
|
1282
|
+
mode: _t.Files,
|
|
981
1283
|
targetFolderPath: ""
|
|
982
|
-
},
|
|
983
|
-
let { MarkdownEditor: e } = await
|
|
1284
|
+
}, Rt = [W.Name, W.Description], zt = 24, Bt = 300, Vt = "pb-0 desktop:px-8 desktop:py-6", Ht = "desktop:px-8 desktop:py-6", Ut = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Wt = we(async () => {
|
|
1285
|
+
let { MarkdownEditor: e } = await Ae();
|
|
984
1286
|
return { default: e };
|
|
985
|
-
}),
|
|
986
|
-
let [
|
|
1287
|
+
}), Gt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: O, submitError: k, conflict: j, onReloadLatest: ne, isNameReadOnly: re = !1, onDirtyChange: ie, onValuesChange: M, onRefineDescription: ae, onRefineInstructions: oe, fileActions: N, supportingFileContent: se, asideData: le, onSubmit: ue, onCancel: de, onBack: pe, backAriaLabel: me, title: he, onRetry: ge, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
|
|
1288
|
+
let [H, je] = V({
|
|
987
1289
|
name: r?.name ?? "",
|
|
988
1290
|
description: r?.description ?? "",
|
|
989
1291
|
instructions: r?.instructions ?? ""
|
|
990
|
-
}),
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1292
|
+
}), Me = De(), Ne = De();
|
|
1293
|
+
u(() => document.getElementById(Me), Ne, !!O?.instructions);
|
|
1294
|
+
let U = B(void 0), Pe = l({
|
|
1295
|
+
bottomGap: zt,
|
|
1296
|
+
minHeight: Bt
|
|
1297
|
+
}), Fe = B(H), Ie = (e) => {
|
|
994
1298
|
let t = {
|
|
995
|
-
...
|
|
1299
|
+
...Fe.current,
|
|
996
1300
|
...e
|
|
997
1301
|
};
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
1302
|
+
Fe.current = t, je(t), M?.(t);
|
|
1303
|
+
}, Le = (e) => e ? async (t, n) => {
|
|
1304
|
+
if (U.current && !U.current.aborted) throw new DOMException("Busy", "AbortError");
|
|
1305
|
+
U.current = n;
|
|
1002
1306
|
try {
|
|
1003
1307
|
return await e(t, n);
|
|
1004
1308
|
} finally {
|
|
1005
|
-
|
|
1309
|
+
U.current === n && (U.current = void 0);
|
|
1006
1310
|
}
|
|
1007
|
-
} : void 0,
|
|
1008
|
-
value:
|
|
1009
|
-
onChange: (e) =>
|
|
1010
|
-
onRefine:
|
|
1011
|
-
disabled:
|
|
1311
|
+
} : void 0, Re = f({
|
|
1312
|
+
value: H.description,
|
|
1313
|
+
onChange: (e) => Ie({ description: e }),
|
|
1314
|
+
onRefine: Le(ae),
|
|
1315
|
+
disabled: C || h || S,
|
|
1012
1316
|
resetKey: r
|
|
1013
|
-
}),
|
|
1014
|
-
value:
|
|
1015
|
-
onChange: (e) =>
|
|
1016
|
-
onRefine:
|
|
1017
|
-
disabled:
|
|
1317
|
+
}), W = f({
|
|
1318
|
+
value: H.instructions,
|
|
1319
|
+
onChange: (e) => Ie({ instructions: e }),
|
|
1320
|
+
onRefine: Le(oe),
|
|
1321
|
+
disabled: C || h || S,
|
|
1018
1322
|
resetKey: r
|
|
1019
|
-
}),
|
|
1020
|
-
|
|
1323
|
+
}), ze = Re.isPending || W.isPending, Be = () => {
|
|
1324
|
+
Re.reset(), W.reset();
|
|
1325
|
+
}, Ve = () => {
|
|
1326
|
+
Be(), de();
|
|
1327
|
+
}, He = () => {
|
|
1328
|
+
Be(), pe();
|
|
1021
1329
|
}, Ue = () => {
|
|
1022
|
-
|
|
1023
|
-
}, Ge = ()
|
|
1024
|
-
|
|
1025
|
-
|
|
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;
|
|
1330
|
+
C || h || S || U.current && !U.current.aborted || ue(H);
|
|
1331
|
+
}, We = B(r), Ge = We.current !== r, Ke = B(i), [qe, Je] = V(!1);
|
|
1332
|
+
Ee(() => {
|
|
1333
|
+
We.current = r;
|
|
1030
1334
|
let e = {
|
|
1031
1335
|
name: r?.name ?? "",
|
|
1032
1336
|
description: r?.description ?? "",
|
|
1033
1337
|
instructions: r?.instructions ?? ""
|
|
1034
1338
|
};
|
|
1035
|
-
|
|
1339
|
+
Fe.current = e, je(e), Ke.current = i, Je(!1);
|
|
1036
1340
|
}, [r]);
|
|
1037
|
-
let
|
|
1038
|
-
|
|
1039
|
-
if (
|
|
1341
|
+
let Ye = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), Xe = B(!1);
|
|
1342
|
+
Ee(() => {
|
|
1343
|
+
if (Ge) return;
|
|
1040
1344
|
let e = {
|
|
1041
1345
|
name: r?.name ?? "",
|
|
1042
1346
|
description: r?.description ?? "",
|
|
1043
1347
|
instructions: r?.instructions ?? ""
|
|
1044
|
-
}, t = JSON.stringify(
|
|
1045
|
-
t !==
|
|
1348
|
+
}, t = JSON.stringify(H) !== JSON.stringify(e) || Ye(i) !== Ye(Ke.current) || qe;
|
|
1349
|
+
t !== Xe.current && (Xe.current = t, ie?.(t));
|
|
1046
1350
|
}, [
|
|
1047
|
-
|
|
1351
|
+
H,
|
|
1048
1352
|
i,
|
|
1049
1353
|
r,
|
|
1050
|
-
|
|
1051
|
-
|
|
1354
|
+
Ge,
|
|
1355
|
+
qe,
|
|
1356
|
+
ie
|
|
1052
1357
|
]);
|
|
1053
|
-
let [
|
|
1054
|
-
|
|
1055
|
-
}, [
|
|
1358
|
+
let [Ze, et] = V(K), G = s ?? Ze, J = R((e) => {
|
|
1359
|
+
et(e), d?.(e);
|
|
1360
|
+
}, [d]), [it, ot] = V([]), st = p ?? it, lt = z(() => new Set(st), [st]), ut = R((e) => {
|
|
1056
1361
|
let t = [...e];
|
|
1057
|
-
|
|
1058
|
-
}, [
|
|
1059
|
-
|
|
1060
|
-
}, []), [
|
|
1061
|
-
|
|
1062
|
-
...
|
|
1362
|
+
ot(t), m?.(t);
|
|
1363
|
+
}, [m]), [pt, ht] = V(!1), [yt, bt] = V(Lt), St = R((e) => {
|
|
1364
|
+
bt(e), ht(!0);
|
|
1365
|
+
}, []), [wt, Et] = V(!1), { isDragActive: Dt, dropZoneHandlers: X } = gt(R((e) => {
|
|
1366
|
+
pt || St({
|
|
1367
|
+
...Lt,
|
|
1063
1368
|
initialFiles: e
|
|
1064
1369
|
});
|
|
1065
|
-
}, [
|
|
1066
|
-
"--se-title-color":
|
|
1067
|
-
"--se-helper-text-color":
|
|
1068
|
-
"--se-refine-action-text":
|
|
1069
|
-
"--se-refine-error-text":
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1370
|
+
}, [pt, St])), Z = be ?? {}, Q = we?.colors, $ = we?.typography ?? {}, Ot = $.titleClassName ?? "dial-body-semi-text", kt = $.helperTextClassName ?? "dial-tiny-semi-text", At = $.removeIconClassName, jt = z(() => o({ "--se-menu-icon": Q?.menuIcon }), [Q?.menuIcon]), Nt = o({
|
|
1371
|
+
"--se-title-color": Q?.title,
|
|
1372
|
+
"--se-helper-text-color": Q?.helperText,
|
|
1373
|
+
"--se-refine-action-text": Q?.refineActionText,
|
|
1374
|
+
"--se-refine-error-text": Q?.refineErrorText,
|
|
1375
|
+
"--se-files-card-bg": Q?.filesCardBackground,
|
|
1376
|
+
"--se-files-card-border": Q?.filesCardBorder,
|
|
1377
|
+
"--se-folder-row-border": Q?.folderRowBorder,
|
|
1378
|
+
"--se-folder-row-hover-bg": Q?.folderRowHoverBackground,
|
|
1379
|
+
"--se-drop-overlay-icon": Q?.dropOverlayIcon
|
|
1380
|
+
}), Pt = {
|
|
1381
|
+
footerBackground: Q?.dialogFooterBackground,
|
|
1382
|
+
footerBorder: Q?.dialogFooterBorder
|
|
1383
|
+
}, Gt = {
|
|
1384
|
+
feedbackClassName: c(Q?.refineActionText && It.refineFeedback, $.refineFeedbackClassName, nt.refineFeedback),
|
|
1385
|
+
errorClassName: It.refineError
|
|
1386
|
+
}, Kt = {
|
|
1387
|
+
layout: Q?.border ? { colors: {
|
|
1388
|
+
headerBorderColor: Q.border,
|
|
1389
|
+
sidebarBorderColor: Q.border
|
|
1077
1390
|
} } : void 0,
|
|
1078
|
-
section:
|
|
1079
|
-
},
|
|
1080
|
-
required:
|
|
1081
|
-
invalid:
|
|
1082
|
-
duplicate:
|
|
1391
|
+
section: Q?.title ? { colors: { titleColor: Q.title } } : void 0
|
|
1392
|
+
}, qt = z(() => ({
|
|
1393
|
+
required: Z.folderNameRequiredError ?? "Enter a folder name",
|
|
1394
|
+
invalid: Z.folderNameInvalidError ?? "Folder name can't contain / or \\, or be . or ..",
|
|
1395
|
+
duplicate: Z.folderNameDuplicateError ?? "An item with this name already exists here"
|
|
1396
|
+
}), [
|
|
1397
|
+
Z.folderNameRequiredError,
|
|
1398
|
+
Z.folderNameInvalidError,
|
|
1399
|
+
Z.folderNameDuplicateError
|
|
1400
|
+
]), Jt = R((e) => {
|
|
1401
|
+
lt.has(e) || ut(/* @__PURE__ */ new Set([...lt, e]));
|
|
1402
|
+
}, [lt, ut]), Yt = yt.targetFolderPath, Xt = z(() => ({
|
|
1403
|
+
...N,
|
|
1404
|
+
commitBatch: async (e) => {
|
|
1405
|
+
let t = await N.commitBatch(e);
|
|
1406
|
+
return !t.error && Yt !== "" && Jt(Yt), t;
|
|
1407
|
+
}
|
|
1083
1408
|
}), [
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
]),
|
|
1088
|
-
vt.has(e) || yt(new Set([...vt, e]));
|
|
1089
|
-
}, [vt, yt]), zt = Je({
|
|
1409
|
+
N,
|
|
1410
|
+
Yt,
|
|
1411
|
+
Jt
|
|
1412
|
+
]), Zt = mt({
|
|
1090
1413
|
files: i,
|
|
1091
|
-
fileActions:
|
|
1092
|
-
defaultName:
|
|
1093
|
-
messages:
|
|
1094
|
-
onRevealFolder:
|
|
1095
|
-
onCreated:
|
|
1096
|
-
}), { draftNode:
|
|
1414
|
+
fileActions: N,
|
|
1415
|
+
defaultName: Z.newFolderDefaultName ?? "New folder",
|
|
1416
|
+
messages: qt,
|
|
1417
|
+
onRevealFolder: Jt,
|
|
1418
|
+
onCreated: J
|
|
1419
|
+
}), { draftNode: Qt, draftPath: $t, draftPane: en } = Zt, tn = z(() => at([{
|
|
1097
1420
|
path: K,
|
|
1098
1421
|
name: K,
|
|
1099
1422
|
kind: q.File
|
|
1100
|
-
}, ...i]), [i]),
|
|
1423
|
+
}, ...i]), [i]), nn = z(() => Qt ? at([
|
|
1101
1424
|
{
|
|
1102
1425
|
path: K,
|
|
1103
1426
|
name: K,
|
|
1104
1427
|
kind: q.File
|
|
1105
1428
|
},
|
|
1106
1429
|
...i,
|
|
1107
|
-
|
|
1108
|
-
]) :
|
|
1430
|
+
Qt
|
|
1431
|
+
]) : tn, [
|
|
1109
1432
|
i,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
]),
|
|
1113
|
-
e.path !==
|
|
1114
|
-
}, [
|
|
1115
|
-
|
|
1433
|
+
Qt,
|
|
1434
|
+
tn
|
|
1435
|
+
]), rn = z(() => i.find((e) => e.path === G), [i, G]), an = z(() => dt(i, G), [i, G]), on = rn?.kind === q.Folder || an.length > 0, sn = R((e) => {
|
|
1436
|
+
e.path !== $t && J(e.path);
|
|
1437
|
+
}, [J, $t]), cn = R((e, t) => {
|
|
1438
|
+
if (e === "") {
|
|
1439
|
+
J(K);
|
|
1440
|
+
return;
|
|
1441
|
+
}
|
|
1442
|
+
let n = [...ft(e), ...t === q.Folder ? [e] : []].filter((e) => !lt.has(e));
|
|
1443
|
+
n.length > 0 && ut(/* @__PURE__ */ new Set([...lt, ...n])), J(e);
|
|
1116
1444
|
}, [
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
]),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1445
|
+
lt,
|
|
1446
|
+
ut,
|
|
1447
|
+
J
|
|
1448
|
+
]), ln = R((e) => {
|
|
1449
|
+
N.onRemoveNode(e), (G === e || G.startsWith(`${e}/`)) && J(K);
|
|
1450
|
+
}, [
|
|
1451
|
+
N,
|
|
1452
|
+
G,
|
|
1453
|
+
J
|
|
1454
|
+
]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = N, [mn, hn] = V(null), gn = R((e, t) => {
|
|
1455
|
+
t === Y.Mobile ? hn(e) : un(e, t);
|
|
1456
|
+
}, [un]), _n = z(() => i.filter((e) => e.kind === q.File).map((e) => e.path), [i]), vn = R(async (e) => {
|
|
1457
|
+
if (!pn) return;
|
|
1458
|
+
let t = await pn();
|
|
1459
|
+
t?.length && St({
|
|
1460
|
+
mode: _t.Files,
|
|
1125
1461
|
targetFolderPath: e,
|
|
1126
1462
|
initialEntries: t
|
|
1127
1463
|
});
|
|
1128
|
-
}, [
|
|
1129
|
-
let n = (e) =>
|
|
1130
|
-
return
|
|
1464
|
+
}, [pn, St]), yn = R((e, t) => {
|
|
1465
|
+
let n = (e) => vt(e, It.menuIcon, void 0, jt), r = [];
|
|
1466
|
+
return dn && r.push({
|
|
1131
1467
|
key: "create-folder",
|
|
1132
|
-
label:
|
|
1133
|
-
icon: n(
|
|
1134
|
-
onClick: () =>
|
|
1468
|
+
label: Z.createFolderLabel ?? "Create folder",
|
|
1469
|
+
icon: n(ve),
|
|
1470
|
+
onClick: () => gn(e, t)
|
|
1135
1471
|
}), r.push({
|
|
1136
1472
|
key: "upload-files",
|
|
1137
|
-
label:
|
|
1138
|
-
icon: n(
|
|
1139
|
-
onClick: () =>
|
|
1140
|
-
mode:
|
|
1473
|
+
label: Z.uploadFilesLabel ?? "Upload files from device",
|
|
1474
|
+
icon: n(Se),
|
|
1475
|
+
onClick: () => St({
|
|
1476
|
+
mode: _t.Files,
|
|
1141
1477
|
targetFolderPath: e
|
|
1142
1478
|
})
|
|
1143
|
-
}),
|
|
1479
|
+
}), fn && r.push({
|
|
1144
1480
|
key: "upload-archive",
|
|
1145
|
-
label:
|
|
1146
|
-
icon: n(
|
|
1147
|
-
onClick: () =>
|
|
1148
|
-
mode:
|
|
1481
|
+
label: Z.uploadArchiveLabel ?? "Upload archive from device",
|
|
1482
|
+
icon: n(_e),
|
|
1483
|
+
onClick: () => St({
|
|
1484
|
+
mode: _t.Archive,
|
|
1149
1485
|
targetFolderPath: e
|
|
1150
1486
|
})
|
|
1151
|
-
}),
|
|
1487
|
+
}), pn && r.push({
|
|
1152
1488
|
key: "open-file-system",
|
|
1153
|
-
label:
|
|
1154
|
-
icon: n(
|
|
1155
|
-
onClick: () => void
|
|
1489
|
+
label: Z.openFileSystemLabel ?? "Open DIAL file system",
|
|
1490
|
+
icon: n(L),
|
|
1491
|
+
onClick: () => void vn(e)
|
|
1156
1492
|
}), r;
|
|
1157
1493
|
}, [
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
]),
|
|
1170
|
-
let e =
|
|
1494
|
+
jt,
|
|
1495
|
+
dn,
|
|
1496
|
+
fn,
|
|
1497
|
+
pn,
|
|
1498
|
+
Z.createFolderLabel,
|
|
1499
|
+
Z.uploadFilesLabel,
|
|
1500
|
+
Z.uploadArchiveLabel,
|
|
1501
|
+
Z.openFileSystemLabel,
|
|
1502
|
+
gn,
|
|
1503
|
+
St,
|
|
1504
|
+
vn
|
|
1505
|
+
]), bn = z(() => {
|
|
1506
|
+
let e = ct(rt.Header, i.find((e) => e.path === G));
|
|
1171
1507
|
return {
|
|
1172
|
-
[Y.Mobile]:
|
|
1173
|
-
[Y.Desktop]:
|
|
1508
|
+
[Y.Mobile]: yn(e, Y.Mobile),
|
|
1509
|
+
[Y.Desktop]: yn(e, Y.Desktop)
|
|
1174
1510
|
};
|
|
1175
1511
|
}, [
|
|
1176
|
-
|
|
1512
|
+
yn,
|
|
1177
1513
|
i,
|
|
1178
|
-
|
|
1179
|
-
]),
|
|
1180
|
-
if (e.path ===
|
|
1514
|
+
G
|
|
1515
|
+
]), xn = R((e, t) => {
|
|
1516
|
+
if (e.path === $t || e.nodeType !== Oe.FOLDER) return [];
|
|
1181
1517
|
let n = {
|
|
1182
1518
|
path: e.path,
|
|
1183
1519
|
name: e.name,
|
|
1184
1520
|
kind: q.Folder
|
|
1185
|
-
}, r =
|
|
1521
|
+
}, r = yn(ct(rt.Child, n), t);
|
|
1186
1522
|
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
1523
|
key: "delete",
|
|
1193
|
-
label:
|
|
1524
|
+
label: Z.deleteLabel ?? "Delete",
|
|
1194
1525
|
danger: !0,
|
|
1195
|
-
icon:
|
|
1196
|
-
onClick: () =>
|
|
1526
|
+
icon: vt(xe, At),
|
|
1527
|
+
onClick: () => ln(e.path)
|
|
1197
1528
|
}), r;
|
|
1198
1529
|
}, [
|
|
1199
|
-
Vt,
|
|
1200
|
-
Q.addSiblingLabel,
|
|
1201
|
-
Q.deleteLabel,
|
|
1202
|
-
Mt,
|
|
1203
1530
|
$t,
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1531
|
+
Z.deleteLabel,
|
|
1532
|
+
At,
|
|
1533
|
+
yn,
|
|
1534
|
+
ln
|
|
1535
|
+
]), Sn = z(() => ({
|
|
1536
|
+
[Y.Mobile]: (e) => xn(e, Y.Mobile),
|
|
1537
|
+
[Y.Desktop]: (e) => xn(e, Y.Desktop)
|
|
1538
|
+
}), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(ee, {
|
|
1539
|
+
size: T.Small,
|
|
1540
|
+
icon: vt(xe, At, b.SM),
|
|
1541
|
+
"aria-label": Z.deleteLabel ?? "Delete",
|
|
1542
|
+
onClick: () => ln(e.path)
|
|
1213
1543
|
}), [
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
]),
|
|
1544
|
+
Z.deleteLabel,
|
|
1545
|
+
At,
|
|
1546
|
+
ln
|
|
1547
|
+
]), wn = (e) => /* @__PURE__ */ I("div", {
|
|
1218
1548
|
className: "flex flex-col gap-2 desktop:gap-5",
|
|
1219
1549
|
children: [/* @__PURE__ */ I("div", {
|
|
1220
1550
|
className: "flex items-center justify-between",
|
|
1221
1551
|
children: [/* @__PURE__ */ F("span", {
|
|
1222
|
-
className: c(
|
|
1223
|
-
children:
|
|
1224
|
-
}), /* @__PURE__ */ F(
|
|
1225
|
-
label:
|
|
1226
|
-
variant:
|
|
1227
|
-
appearance:
|
|
1228
|
-
size:
|
|
1229
|
-
items:
|
|
1552
|
+
className: c(It.title, Ot),
|
|
1553
|
+
children: Z.filesHeading ?? "Files"
|
|
1554
|
+
}), /* @__PURE__ */ F(_, {
|
|
1555
|
+
label: Z.addLabel ?? "Add",
|
|
1556
|
+
variant: v.Neutral,
|
|
1557
|
+
appearance: g.Solid,
|
|
1558
|
+
size: T.Small,
|
|
1559
|
+
items: bn[e]
|
|
1230
1560
|
})]
|
|
1231
1561
|
}), /* @__PURE__ */ F("div", {
|
|
1232
1562
|
role: "tree",
|
|
1233
|
-
"aria-label":
|
|
1234
|
-
children: /* @__PURE__ */ F(
|
|
1235
|
-
items:
|
|
1563
|
+
"aria-label": Z.filesTreeAriaLabel ?? "Skill files",
|
|
1564
|
+
children: /* @__PURE__ */ F(ke, {
|
|
1565
|
+
items: en === e ? nn : tn,
|
|
1236
1566
|
showFiles: !0,
|
|
1237
|
-
selectedPath:
|
|
1238
|
-
expandedPaths:
|
|
1239
|
-
onExpandedPathsChange:
|
|
1240
|
-
onItemClick:
|
|
1241
|
-
getContextMenuItems:
|
|
1242
|
-
renderItemActions:
|
|
1243
|
-
renamedPath:
|
|
1244
|
-
onRenameSave:
|
|
1245
|
-
onRenameCancel:
|
|
1246
|
-
onRenameValidate:
|
|
1567
|
+
selectedPath: G,
|
|
1568
|
+
expandedPaths: lt,
|
|
1569
|
+
onExpandedPathsChange: ut,
|
|
1570
|
+
onItemClick: sn,
|
|
1571
|
+
getContextMenuItems: Sn[e],
|
|
1572
|
+
renderItemActions: Cn,
|
|
1573
|
+
renamedPath: en === e ? $t : void 0,
|
|
1574
|
+
onRenameSave: Zt.handleSave,
|
|
1575
|
+
onRenameCancel: Zt.handleCancel,
|
|
1576
|
+
onRenameValidate: Zt.handleValidate,
|
|
1247
1577
|
rootItemPath: ""
|
|
1248
1578
|
})
|
|
1249
1579
|
})]
|
|
1250
|
-
}),
|
|
1251
|
-
name:
|
|
1252
|
-
description:
|
|
1580
|
+
}), Tn = z(() => ({
|
|
1581
|
+
name: H.name,
|
|
1582
|
+
description: H.description,
|
|
1253
1583
|
iconUrl: "",
|
|
1254
1584
|
version: "",
|
|
1255
1585
|
topics: [],
|
|
1256
1586
|
otherLocales: []
|
|
1257
|
-
}), [
|
|
1258
|
-
name:
|
|
1259
|
-
description:
|
|
1260
|
-
}), [
|
|
1261
|
-
|
|
1587
|
+
}), [H.name, H.description]), En = z(() => ({
|
|
1588
|
+
name: O?.name,
|
|
1589
|
+
description: O?.description
|
|
1590
|
+
}), [O?.name, O?.description]), Dn = z(() => ({ form: {
|
|
1591
|
+
...$e,
|
|
1262
1592
|
name: {
|
|
1263
|
-
label:
|
|
1264
|
-
placeholder:
|
|
1593
|
+
label: Z.nameLabel ?? "Name",
|
|
1594
|
+
placeholder: Z.namePlaceholder ?? "good-morning-breakfast"
|
|
1265
1595
|
},
|
|
1266
1596
|
description: {
|
|
1267
|
-
label:
|
|
1268
|
-
placeholder:
|
|
1597
|
+
label: Z.descriptionLabel ?? "Description",
|
|
1598
|
+
placeholder: Z.descriptionPlaceholder ?? "What this skill does and when to use it"
|
|
1269
1599
|
},
|
|
1270
1600
|
ariaLabel: void 0
|
|
1271
1601
|
} }), [
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
]),
|
|
1277
|
-
e.name !== void 0 &&
|
|
1278
|
-
},
|
|
1602
|
+
Z.nameLabel,
|
|
1603
|
+
Z.namePlaceholder,
|
|
1604
|
+
Z.descriptionLabel,
|
|
1605
|
+
Z.descriptionPlaceholder
|
|
1606
|
+
]), On = (e) => {
|
|
1607
|
+
e.name !== void 0 && Ie({ name: e.name }), e.description !== void 0 && (Re.reset(), Ie({ description: e.description }));
|
|
1608
|
+
}, kn = ae ? (e, t) => /* @__PURE__ */ F(a, {
|
|
1279
1609
|
isEnabled: !0,
|
|
1280
1610
|
fieldId: t,
|
|
1281
1611
|
required: !0,
|
|
1282
|
-
label:
|
|
1283
|
-
labels:
|
|
1284
|
-
refinement:
|
|
1285
|
-
disabled:
|
|
1286
|
-
...
|
|
1612
|
+
label: Z.descriptionLabel ?? "Description",
|
|
1613
|
+
labels: Z,
|
|
1614
|
+
refinement: Re,
|
|
1615
|
+
disabled: ze || C,
|
|
1616
|
+
...Gt,
|
|
1287
1617
|
children: e
|
|
1288
|
-
}) : void 0,
|
|
1289
|
-
title:
|
|
1290
|
-
onBack:
|
|
1291
|
-
onCancel:
|
|
1292
|
-
onSubmit:
|
|
1293
|
-
submitLabel:
|
|
1294
|
-
isSubmitDisabled:
|
|
1618
|
+
}) : void 0, An = {
|
|
1619
|
+
title: he,
|
|
1620
|
+
onBack: He,
|
|
1621
|
+
onCancel: Ve,
|
|
1622
|
+
onSubmit: Ue,
|
|
1623
|
+
submitLabel: Z.createLabel ?? "Create",
|
|
1624
|
+
isSubmitDisabled: ze || h || S,
|
|
1295
1625
|
labels: {
|
|
1296
|
-
cancelLabel:
|
|
1297
|
-
backAriaLabel:
|
|
1298
|
-
savingStatusLabel:
|
|
1626
|
+
cancelLabel: Z.cancelLabel ?? "Cancel",
|
|
1627
|
+
backAriaLabel: me ?? "Back",
|
|
1628
|
+
savingStatusLabel: Z.savingStatusLabel ?? "Saving"
|
|
1299
1629
|
},
|
|
1300
|
-
styles:
|
|
1630
|
+
styles: Kt,
|
|
1301
1631
|
metadataTitle: null
|
|
1302
1632
|
};
|
|
1303
|
-
if (
|
|
1304
|
-
dir:
|
|
1633
|
+
if (h) return /* @__PURE__ */ F("div", {
|
|
1634
|
+
dir: Te,
|
|
1305
1635
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
1306
|
-
children: /* @__PURE__ */ F(
|
|
1307
|
-
...
|
|
1636
|
+
children: /* @__PURE__ */ F(Qe, {
|
|
1637
|
+
...An,
|
|
1308
1638
|
metadata: /* @__PURE__ */ F("div", {
|
|
1309
|
-
role: "status",
|
|
1310
|
-
"aria-label": Q.loadingAriaLabel ?? "Loading skill",
|
|
1311
1639
|
className: "flex flex-1 items-center justify-center p-8",
|
|
1312
|
-
children: /* @__PURE__ */ F(
|
|
1640
|
+
children: /* @__PURE__ */ F(fe, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
|
|
1313
1641
|
})
|
|
1314
1642
|
})
|
|
1315
1643
|
});
|
|
1316
|
-
if (
|
|
1317
|
-
dir:
|
|
1644
|
+
if (S) return /* @__PURE__ */ F("div", {
|
|
1645
|
+
dir: Te,
|
|
1318
1646
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
1319
|
-
children: /* @__PURE__ */ F(
|
|
1320
|
-
...
|
|
1321
|
-
metadata: /* @__PURE__ */
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1647
|
+
children: /* @__PURE__ */ F(Qe, {
|
|
1648
|
+
...An,
|
|
1649
|
+
metadata: /* @__PURE__ */ F("div", {
|
|
1650
|
+
className: "p-8",
|
|
1651
|
+
children: /* @__PURE__ */ F(E, {
|
|
1652
|
+
message: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again.",
|
|
1653
|
+
iconStroke: x,
|
|
1654
|
+
action: /* @__PURE__ */ F(ce, {
|
|
1655
|
+
label: Z.retryLabel ?? "Retry",
|
|
1656
|
+
onClick: ge
|
|
1657
|
+
})
|
|
1658
|
+
})
|
|
1328
1659
|
})
|
|
1329
1660
|
})
|
|
1330
1661
|
});
|
|
1331
|
-
let
|
|
1662
|
+
let jn = G === K, Mn = rn?.name ?? G.slice(G.lastIndexOf("/") + 1), Nn = jn ? K : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = k != null || j != null ? /* @__PURE__ */ I("div", {
|
|
1332
1663
|
className: "flex flex-col gap-2",
|
|
1333
|
-
children: [
|
|
1664
|
+
children: [k != null && /* @__PURE__ */ I("div", {
|
|
1334
1665
|
className: "flex items-center gap-2",
|
|
1335
|
-
children: [/* @__PURE__ */ F(
|
|
1336
|
-
label:
|
|
1337
|
-
onClick:
|
|
1666
|
+
children: [/* @__PURE__ */ F(D, { text: k }), ye != null && /* @__PURE__ */ F(A, {
|
|
1667
|
+
label: Z.retryLabel ?? "Retry",
|
|
1668
|
+
onClick: ye
|
|
1338
1669
|
})]
|
|
1339
|
-
}),
|
|
1670
|
+
}), j != null && /* @__PURE__ */ I("div", {
|
|
1340
1671
|
className: "flex items-center gap-2",
|
|
1341
|
-
children: [/* @__PURE__ */ F(
|
|
1342
|
-
label:
|
|
1343
|
-
onClick:
|
|
1672
|
+
children: [/* @__PURE__ */ F(D, { text: j.message }), /* @__PURE__ */ F(A, {
|
|
1673
|
+
label: Z.reloadLatestLabel ?? "Reload latest",
|
|
1674
|
+
onClick: ne
|
|
1344
1675
|
})]
|
|
1345
1676
|
})]
|
|
1346
|
-
}) : void 0,
|
|
1347
|
-
isEnabled: !!
|
|
1348
|
-
fieldId:
|
|
1677
|
+
}) : void 0, Fn = /* @__PURE__ */ F(a, {
|
|
1678
|
+
isEnabled: !!oe,
|
|
1679
|
+
fieldId: Me,
|
|
1349
1680
|
required: !0,
|
|
1350
|
-
labelClassName: c(
|
|
1351
|
-
label:
|
|
1352
|
-
labels:
|
|
1353
|
-
refinement:
|
|
1354
|
-
disabled:
|
|
1355
|
-
...
|
|
1681
|
+
labelClassName: c(It.helperText, kt),
|
|
1682
|
+
label: Z.instructionsLabel ?? "Instructions",
|
|
1683
|
+
labels: Z,
|
|
1684
|
+
refinement: W,
|
|
1685
|
+
disabled: ze || C,
|
|
1686
|
+
...Gt,
|
|
1356
1687
|
children: /* @__PURE__ */ I("div", {
|
|
1357
1688
|
className: "flex flex-1 flex-col gap-2",
|
|
1358
1689
|
children: [
|
|
1359
|
-
!
|
|
1360
|
-
htmlFor:
|
|
1361
|
-
className: c(
|
|
1362
|
-
label:
|
|
1690
|
+
!oe && /* @__PURE__ */ F(te, {
|
|
1691
|
+
htmlFor: Me,
|
|
1692
|
+
className: c(It.helperText, kt),
|
|
1693
|
+
label: Z.instructionsLabel ?? "Instructions",
|
|
1363
1694
|
required: !0
|
|
1364
1695
|
}),
|
|
1365
1696
|
/* @__PURE__ */ F("div", {
|
|
1366
|
-
ref:
|
|
1697
|
+
ref: Pe,
|
|
1367
1698
|
className: c(t, e, n),
|
|
1368
|
-
children: /* @__PURE__ */ F(
|
|
1369
|
-
fallback: /* @__PURE__ */ F(
|
|
1370
|
-
children: /* @__PURE__ */ F(
|
|
1371
|
-
id:
|
|
1372
|
-
ariaLabel:
|
|
1373
|
-
value:
|
|
1699
|
+
children: /* @__PURE__ */ F(Ce, {
|
|
1700
|
+
fallback: /* @__PURE__ */ F(fe, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
|
|
1701
|
+
children: /* @__PURE__ */ F(Wt, {
|
|
1702
|
+
id: Me,
|
|
1703
|
+
ariaLabel: Z.instructionsLabel ?? "Instructions",
|
|
1704
|
+
value: H.instructions,
|
|
1374
1705
|
onChange: (e) => {
|
|
1375
|
-
|
|
1706
|
+
W.reset(), Ie({ instructions: e });
|
|
1376
1707
|
},
|
|
1377
|
-
theme:
|
|
1708
|
+
theme: Ae,
|
|
1378
1709
|
showDragbar: !1,
|
|
1379
|
-
placeholder:
|
|
1710
|
+
placeholder: Z.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
|
|
1380
1711
|
})
|
|
1381
1712
|
})
|
|
1382
1713
|
}),
|
|
1383
|
-
|
|
1714
|
+
O?.instructions != null && /* @__PURE__ */ F(D, {
|
|
1715
|
+
id: Ne,
|
|
1716
|
+
text: O.instructions
|
|
1717
|
+
})
|
|
1384
1718
|
]
|
|
1385
1719
|
})
|
|
1386
1720
|
});
|
|
1387
1721
|
return /* @__PURE__ */ I("div", {
|
|
1388
|
-
dir:
|
|
1389
|
-
className: c("relative flex min-h-0 flex-1 flex-col",
|
|
1390
|
-
style:
|
|
1391
|
-
...
|
|
1722
|
+
dir: Te,
|
|
1723
|
+
className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", nt.root),
|
|
1724
|
+
style: Nt,
|
|
1725
|
+
...X,
|
|
1392
1726
|
children: [
|
|
1393
|
-
/* @__PURE__ */ F(
|
|
1394
|
-
isVisible: Dt && !
|
|
1395
|
-
labels:
|
|
1727
|
+
/* @__PURE__ */ F(Ct, {
|
|
1728
|
+
isVisible: Dt && !pt,
|
|
1729
|
+
labels: be,
|
|
1730
|
+
titleClassName: $.dropOverlayTitleClassName,
|
|
1731
|
+
subtitleClassName: $.dropOverlaySubtitleClassName
|
|
1396
1732
|
}),
|
|
1397
|
-
/* @__PURE__ */ F(
|
|
1398
|
-
...
|
|
1399
|
-
asideData:
|
|
1400
|
-
asideSectionClassName:
|
|
1401
|
-
isSubmitting:
|
|
1402
|
-
metadataSectionClassName:
|
|
1733
|
+
/* @__PURE__ */ F(Qe, {
|
|
1734
|
+
...An,
|
|
1735
|
+
asideData: le,
|
|
1736
|
+
asideSectionClassName: Ht,
|
|
1737
|
+
isSubmitting: C,
|
|
1738
|
+
metadataSectionClassName: Vt,
|
|
1403
1739
|
metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
|
|
1404
1740
|
className: "desktop:hidden",
|
|
1405
|
-
children: /* @__PURE__ */ F(
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1741
|
+
children: /* @__PURE__ */ F(Tt, {
|
|
1742
|
+
label: Z.editingFileLabel ?? "Editing file",
|
|
1743
|
+
fileName: jn ? K : Mn,
|
|
1744
|
+
isExpanded: wt,
|
|
1409
1745
|
onToggle: Et,
|
|
1410
|
-
|
|
1411
|
-
|
|
1746
|
+
labelClassName: $.editingFileLabelClassName,
|
|
1747
|
+
fileNameClassName: $.editingFileNameClassName,
|
|
1748
|
+
children: wn(Y.Mobile)
|
|
1412
1749
|
})
|
|
1413
1750
|
}), /* @__PURE__ */ F("div", {
|
|
1414
1751
|
className: "hidden desktop:block",
|
|
1415
|
-
children:
|
|
1752
|
+
children: wn(Y.Desktop)
|
|
1416
1753
|
})] }),
|
|
1417
|
-
alert:
|
|
1418
|
-
setupTitle:
|
|
1419
|
-
setupSectionClassName:
|
|
1420
|
-
setup:
|
|
1421
|
-
values:
|
|
1422
|
-
errors:
|
|
1423
|
-
onChange:
|
|
1424
|
-
fields:
|
|
1754
|
+
alert: Pn,
|
|
1755
|
+
setupTitle: Nn,
|
|
1756
|
+
setupSectionClassName: Ut,
|
|
1757
|
+
setup: jn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(tt, {
|
|
1758
|
+
values: Tn,
|
|
1759
|
+
errors: En,
|
|
1760
|
+
onChange: On,
|
|
1761
|
+
fields: Rt,
|
|
1425
1762
|
isDescriptionRequired: !0,
|
|
1426
|
-
isNameReadOnly:
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1763
|
+
isNameReadOnly: re,
|
|
1764
|
+
nameReadOnlyTooltip: Z.nameReadOnlyTooltip ?? "The skill name can't be changed after creation",
|
|
1765
|
+
nameCaption: O?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
|
|
1766
|
+
renderDescription: kn,
|
|
1767
|
+
labels: Dn
|
|
1768
|
+
}), Fn] }) : /* @__PURE__ */ I(P, { children: [on && G !== $t && /* @__PURE__ */ F(Ft, {
|
|
1769
|
+
folderPath: G,
|
|
1770
|
+
entries: an,
|
|
1771
|
+
onOpen: cn,
|
|
1772
|
+
rootLabel: Z.folderPreviewRootLabel,
|
|
1773
|
+
breadcrumbAriaLabel: Z.folderPreviewBreadcrumbAriaLabel,
|
|
1774
|
+
overflowAriaLabel: Z.folderPreviewOverflowAriaLabel,
|
|
1775
|
+
listAriaLabel: Z.folderPreviewListAriaLabel,
|
|
1776
|
+
emptyTitle: Z.folderEmptyTitle,
|
|
1777
|
+
emptyDescription: Z.folderEmptyDescription,
|
|
1778
|
+
itemCountLabel: Z.folderItemCountLabel,
|
|
1779
|
+
itemCountClassName: $.folderItemCountClassName
|
|
1780
|
+
}), rn?.kind === q.File && /* @__PURE__ */ F("div", {
|
|
1781
|
+
className: "flex h-[max(320px,60dvh)] min-h-0 min-w-0 flex-none flex-col desktop:h-auto desktop:flex-1",
|
|
1782
|
+
children: se ?? /* @__PURE__ */ F(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
|
|
1783
|
+
})] })
|
|
1784
|
+
}),
|
|
1785
|
+
/* @__PURE__ */ F(Mt, {
|
|
1786
|
+
isOpen: pt,
|
|
1787
|
+
onClose: () => ht(!1),
|
|
1788
|
+
fileActions: Xt,
|
|
1789
|
+
mode: yt.mode,
|
|
1790
|
+
targetFolderPath: yt.targetFolderPath,
|
|
1791
|
+
initialFiles: yt.initialFiles,
|
|
1792
|
+
initialEntries: yt.initialEntries,
|
|
1793
|
+
existingFilePaths: _n,
|
|
1794
|
+
onCommitted: (e) => {
|
|
1795
|
+
e.some((e) => e.replacesExisting) && Je(!0);
|
|
1796
|
+
},
|
|
1797
|
+
messageClassName: $.uploadMessageClassName,
|
|
1798
|
+
rowCaptionClassName: $.uploadRowCaptionClassName,
|
|
1799
|
+
labels: be,
|
|
1800
|
+
dialogColors: Pt,
|
|
1801
|
+
colors: {
|
|
1802
|
+
invalidDropZoneBorder: Q?.uploadInvalidDropZoneBorder,
|
|
1803
|
+
rowBorder: Q?.uploadRowBorder
|
|
1804
|
+
}
|
|
1434
1805
|
}),
|
|
1435
|
-
/* @__PURE__ */ F(
|
|
1436
|
-
isOpen:
|
|
1437
|
-
onClose: () =>
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1806
|
+
/* @__PURE__ */ F(xt, {
|
|
1807
|
+
isOpen: mn != null,
|
|
1808
|
+
onClose: () => hn(null),
|
|
1809
|
+
validateName: (e) => Zt.validateNewFolder(e, mn ?? ""),
|
|
1810
|
+
onCreate: (e) => Zt.createFolder(e, mn ?? ""),
|
|
1811
|
+
title: Z.createFolderLabel ?? "Create folder",
|
|
1812
|
+
nameLabel: Z.createFolderNameLabel ?? "Name",
|
|
1813
|
+
namePlaceholder: Z.createFolderNamePlaceholder ?? "Enter folder name",
|
|
1814
|
+
createLabel: Z.createFolderConfirmLabel ?? "Create",
|
|
1815
|
+
cancelLabel: Z.cancelLabel ?? "Cancel",
|
|
1816
|
+
closeAriaLabel: Z.createFolderCloseAriaLabel ?? "Close",
|
|
1817
|
+
dialogColors: Pt
|
|
1444
1818
|
})
|
|
1445
1819
|
]
|
|
1446
1820
|
});
|
|
1447
1821
|
};
|
|
1448
1822
|
//#endregion
|
|
1449
|
-
export {
|
|
1823
|
+
export { nt as SKILL_EDITOR_CLASS, Gt as SkillEditor, Et as SkillFileCandidateKind, q as SkillFileNodeKind, _t as SkillFileUploadMode, Dt as SkillFileValidationStatus };
|