@epam/ai-dial-skill-editor 1.3.0-dev.98 → 1.3.0-rc.0
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 +2 -2
- package/index.js +1151 -779
- 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:pt-3 desktop:pb-3",
|
|
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,223 +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
|
-
y !== k.current && (k.current = y, e());
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
O && !C.current && e(), C.current = O;
|
|
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,
|
|
396
|
-
caption:
|
|
444
|
+
caption: x,
|
|
397
445
|
error: t.description || void 0,
|
|
398
446
|
invalid: !!t.description,
|
|
399
|
-
containerClassName:
|
|
447
|
+
containerClassName: S ? void 0 : d?.field,
|
|
400
448
|
className: r,
|
|
401
|
-
resize:
|
|
449
|
+
resize: he.Vertical
|
|
402
450
|
});
|
|
403
451
|
return /* @__PURE__ */ I("div", {
|
|
404
452
|
role: u.ariaLabel ? "group" : void 0,
|
|
405
453
|
"aria-label": u.ariaLabel,
|
|
406
454
|
className: c("flex flex-col gap-4", d?.root),
|
|
407
455
|
children: [
|
|
408
|
-
|
|
456
|
+
O(W.Avatar) && /* @__PURE__ */ F(Ie, {
|
|
409
457
|
label: u.iconUrl.label,
|
|
410
458
|
avatarUrl: s,
|
|
411
459
|
addAvatarLabel: u.iconUrl.addAvatarLabel,
|
|
@@ -413,54 +461,61 @@ var ve = {
|
|
|
413
461
|
onAddAvatarClick: l,
|
|
414
462
|
className: d?.field
|
|
415
463
|
}),
|
|
416
|
-
(
|
|
464
|
+
(k || A) && /* @__PURE__ */ I("div", {
|
|
417
465
|
className: c("flex items-start gap-4", d?.field),
|
|
418
|
-
children: [
|
|
466
|
+
children: [k && /* @__PURE__ */ F(j, {
|
|
419
467
|
id: "deployment-creation-form-name",
|
|
420
|
-
inputRef:
|
|
468
|
+
inputRef: w,
|
|
421
469
|
value: e.name,
|
|
422
470
|
onChange: (e) => n({ name: e ?? "" }),
|
|
423
471
|
onBlur: a,
|
|
424
|
-
|
|
472
|
+
disabled: h,
|
|
473
|
+
tooltipText: h ? g : void 0,
|
|
425
474
|
labelProps: {
|
|
426
475
|
label: u.name.label,
|
|
427
476
|
required: !0
|
|
428
477
|
},
|
|
429
478
|
placeholder: u.name.placeholder,
|
|
430
|
-
caption:
|
|
479
|
+
caption: y,
|
|
431
480
|
error: t.name || void 0,
|
|
432
481
|
invalid: !!t.name,
|
|
433
|
-
containerClassName:
|
|
434
|
-
}),
|
|
482
|
+
containerClassName: A ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
|
|
483
|
+
}), A && /* @__PURE__ */ F(j, {
|
|
435
484
|
id: "deployment-creation-form-version",
|
|
436
|
-
inputRef:
|
|
485
|
+
inputRef: T,
|
|
437
486
|
value: e.version,
|
|
438
|
-
onChange: (e) =>
|
|
439
|
-
|
|
487
|
+
onChange: (e) => {
|
|
488
|
+
_ || n({ version: e ?? "" });
|
|
489
|
+
},
|
|
490
|
+
onBlur: _ ? void 0 : o,
|
|
491
|
+
readOnly: _,
|
|
492
|
+
tooltipText: _ ? v : void 0,
|
|
440
493
|
labelProps: { label: u.version.label },
|
|
441
494
|
placeholder: u.version.placeholder,
|
|
442
495
|
error: t.version || void 0,
|
|
443
496
|
invalid: !!t.version,
|
|
444
|
-
containerClassName:
|
|
497
|
+
containerClassName: k ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
|
|
445
498
|
})]
|
|
446
499
|
}),
|
|
447
|
-
|
|
500
|
+
O(W.Description) && (S ? /* @__PURE__ */ F("div", {
|
|
448
501
|
className: d?.field,
|
|
449
|
-
children:
|
|
450
|
-
}) :
|
|
451
|
-
|
|
502
|
+
children: S(ne, Ke)
|
|
503
|
+
}) : ne),
|
|
504
|
+
O(W.Locales) && /* @__PURE__ */ F(Ue, {
|
|
452
505
|
value: e.otherLocales,
|
|
453
506
|
onChange: (e) => n({ otherLocales: e }),
|
|
454
507
|
availableLocaleOptions: f,
|
|
508
|
+
formatLocaleLabel: p,
|
|
455
509
|
labels: u.otherLocales,
|
|
456
|
-
className: d?.field
|
|
510
|
+
className: d?.field,
|
|
511
|
+
colors: d?.localesColors
|
|
457
512
|
}),
|
|
458
|
-
|
|
513
|
+
O(W.Tags) && /* @__PURE__ */ F("div", {
|
|
459
514
|
className: d?.field,
|
|
460
|
-
children: /* @__PURE__ */ F(
|
|
515
|
+
children: /* @__PURE__ */ F(pe, {
|
|
461
516
|
id: "deployment-creation-form-topics",
|
|
462
517
|
labelProps: { label: u.topics.label },
|
|
463
|
-
placeholder: u.topics.placeholder ??
|
|
518
|
+
placeholder: u.topics.placeholder ?? We,
|
|
464
519
|
value: e.topics,
|
|
465
520
|
onChange: (e) => n({ topics: e }),
|
|
466
521
|
tagClassName: i
|
|
@@ -468,53 +523,58 @@ var ve = {
|
|
|
468
523
|
})
|
|
469
524
|
]
|
|
470
525
|
});
|
|
471
|
-
},
|
|
472
|
-
let
|
|
473
|
-
|
|
474
|
-
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,
|
|
475
530
|
children: v
|
|
476
|
-
}),
|
|
477
|
-
return /* @__PURE__ */ F(
|
|
531
|
+
}), D = p != null;
|
|
532
|
+
return /* @__PURE__ */ F(Pe, {
|
|
478
533
|
title: e,
|
|
479
534
|
onBack: t,
|
|
480
|
-
backAriaLabel:
|
|
535
|
+
backAriaLabel: C?.backAriaLabel ?? "Back",
|
|
481
536
|
isSaving: a,
|
|
482
|
-
|
|
483
|
-
|
|
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, {
|
|
484
544
|
title: g,
|
|
485
|
-
styles:
|
|
486
|
-
className: c(
|
|
545
|
+
styles: w?.section,
|
|
546
|
+
className: c(Je, _, H.asideSection),
|
|
487
547
|
children: h
|
|
488
548
|
}),
|
|
489
|
-
styles:
|
|
490
|
-
dir:
|
|
491
|
-
actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(
|
|
492
|
-
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",
|
|
493
553
|
disabled: a,
|
|
494
554
|
onClick: n
|
|
495
|
-
}), /* @__PURE__ */ F(
|
|
555
|
+
}), /* @__PURE__ */ F(ce, {
|
|
496
556
|
label: i,
|
|
497
557
|
disabled: a || o,
|
|
498
558
|
onClick: r
|
|
499
559
|
})] })] }),
|
|
500
560
|
leftContent: /* @__PURE__ */ I(P, { children: [
|
|
501
|
-
!
|
|
502
|
-
/* @__PURE__ */ F(
|
|
503
|
-
title: d === null ? void 0 : d ??
|
|
504
|
-
styles:
|
|
505
|
-
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),
|
|
506
566
|
children: u
|
|
507
567
|
}),
|
|
508
568
|
f
|
|
509
569
|
] }),
|
|
510
|
-
centerContent:
|
|
511
|
-
title: m === null ? void 0 : m ??
|
|
512
|
-
styles:
|
|
513
|
-
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),
|
|
514
574
|
children: p
|
|
515
575
|
})] }) : void 0
|
|
516
576
|
});
|
|
517
|
-
}),
|
|
577
|
+
}), $e = {
|
|
518
578
|
name: {
|
|
519
579
|
label: "Name",
|
|
520
580
|
placeholder: "Enter name"
|
|
@@ -553,7 +613,7 @@ var ve = {
|
|
|
553
613
|
saveLabel: "Save"
|
|
554
614
|
},
|
|
555
615
|
ariaLabel: "Metadata"
|
|
556
|
-
},
|
|
616
|
+
}, et = {
|
|
557
617
|
title: "Add avatar",
|
|
558
618
|
attachLabel: "Attach",
|
|
559
619
|
emptyTitle: "This folder is empty",
|
|
@@ -577,84 +637,82 @@ var ve = {
|
|
|
577
637
|
deleteConfirmItemsLabel: "items?",
|
|
578
638
|
deleteConfirmLabel: "Delete",
|
|
579
639
|
deleteCancelLabel: "Cancel"
|
|
580
|
-
},
|
|
581
|
-
let [
|
|
582
|
-
let t =
|
|
583
|
-
t && n({ iconUrl: t }),
|
|
584
|
-
}, [n,
|
|
585
|
-
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, {
|
|
586
646
|
values: e,
|
|
587
647
|
errors: t,
|
|
588
648
|
onChange: n,
|
|
589
649
|
onNameBlur: r,
|
|
590
650
|
onVersionBlur: i,
|
|
591
|
-
iconPreviewUrl:
|
|
592
|
-
onAddAvatarClick:
|
|
593
|
-
labels:
|
|
651
|
+
iconPreviewUrl: w,
|
|
652
|
+
onAddAvatarClick: T,
|
|
653
|
+
labels: v?.form ?? $e,
|
|
594
654
|
availableLocaleOptions: o,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
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,
|
|
606
670
|
bucket: a.bucket,
|
|
607
671
|
FileManagerModal: a.FileManagerModal,
|
|
608
672
|
allowedMimeTypes: a.allowedMimeTypes,
|
|
609
673
|
maxFileSizeBytes: a.maxFileSizeBytes,
|
|
610
|
-
labels:
|
|
674
|
+
labels: v?.avatarPicker ?? et
|
|
611
675
|
})] });
|
|
612
|
-
}),
|
|
676
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
613
677
|
return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
|
|
614
678
|
}({});
|
|
615
|
-
|
|
679
|
+
G.TooLong, G.ControlCharacters;
|
|
616
680
|
//#endregion
|
|
617
681
|
//#region src/constants/public-class-names.ts
|
|
618
|
-
var
|
|
682
|
+
var nt = {
|
|
619
683
|
root: "dial-skill-editor-root",
|
|
620
684
|
refineFeedback: "dial-skill-editor-refine-feedback"
|
|
621
685
|
}, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
|
|
622
686
|
return e.File = "file", e.Folder = "folder", e;
|
|
623
|
-
}({}),
|
|
624
|
-
return e.Header = "header", e.Child = "child", e
|
|
687
|
+
}({}), rt = /* @__PURE__ */ function(e) {
|
|
688
|
+
return e.Header = "header", e.Child = "child", e;
|
|
625
689
|
}({}), J = (e) => {
|
|
626
690
|
let t = e.lastIndexOf("/");
|
|
627
691
|
return t === -1 ? null : e.slice(0, t);
|
|
628
|
-
},
|
|
692
|
+
}, it = (e) => {
|
|
629
693
|
let t = e.lastIndexOf("/");
|
|
630
694
|
return t === -1 ? e : e.slice(t + 1);
|
|
631
|
-
},
|
|
695
|
+
}, at = (e) => {
|
|
632
696
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
633
697
|
let n = t.get(e);
|
|
634
698
|
if (n) return n;
|
|
635
699
|
let r = {
|
|
636
700
|
path: e,
|
|
637
|
-
name:
|
|
638
|
-
nodeType:
|
|
701
|
+
name: it(e),
|
|
702
|
+
nodeType: Oe.FOLDER,
|
|
639
703
|
parentPath: J(e),
|
|
640
704
|
folderId: e,
|
|
641
705
|
items: []
|
|
642
706
|
};
|
|
643
707
|
return t.set(e, r), r;
|
|
644
708
|
};
|
|
645
|
-
for (let r of e) {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
name: r.name,
|
|
653
|
-
nodeType: he.ITEM,
|
|
654
|
-
parentPath: J(r.path),
|
|
655
|
-
folderId: J(r.path) ?? ""
|
|
656
|
-
});
|
|
657
|
-
}
|
|
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
|
+
});
|
|
658
716
|
for (let t of [...e]) {
|
|
659
717
|
let e = J(t.path);
|
|
660
718
|
for (; e != null;) n(e), e = J(e);
|
|
@@ -669,44 +727,61 @@ var Re = {
|
|
|
669
727
|
n ? n.items = [...n.items ?? [], e] : r.push(e);
|
|
670
728
|
}
|
|
671
729
|
return r;
|
|
672
|
-
},
|
|
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) => {
|
|
673
735
|
if (!t) return "";
|
|
674
736
|
switch (e) {
|
|
675
|
-
case
|
|
676
|
-
case
|
|
677
|
-
case ze.Header: return t.kind === q.Folder ? t.path : "";
|
|
678
|
-
}
|
|
679
|
-
}, Ge = (e, t) => {
|
|
680
|
-
let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Set();
|
|
681
|
-
for (let { path: i } of e) {
|
|
682
|
-
if (!i.startsWith(n) || i === t) continue;
|
|
683
|
-
let e = i.slice(n.length);
|
|
684
|
-
r.add(e.split("/")[0]);
|
|
737
|
+
case rt.Child: return t.path;
|
|
738
|
+
case rt.Header: return t.kind === q.Folder ? t.path : "";
|
|
685
739
|
}
|
|
686
|
-
|
|
687
|
-
}, Ke = (e, t, n) => {
|
|
740
|
+
}, lt = (e, t) => new Set(dt(e, t).map((e) => e.name)), ut = (e, t, n) => {
|
|
688
741
|
let r = e.trim();
|
|
689
742
|
if (!r) return n.required;
|
|
690
743
|
if (/[/\\]/.test(r) || r === "." || r === "..") return n.invalid;
|
|
691
744
|
if (t.has(r)) return n.duplicate;
|
|
692
|
-
},
|
|
693
|
-
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 : {
|
|
694
769
|
path: u,
|
|
695
770
|
name: n,
|
|
696
771
|
kind: q.Folder
|
|
697
|
-
}, [u, n]), f =
|
|
698
|
-
let a =
|
|
699
|
-
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()));
|
|
700
775
|
}, [
|
|
701
776
|
e,
|
|
702
777
|
r,
|
|
703
778
|
t
|
|
704
|
-
]), p =
|
|
779
|
+
]), p = R((e, t) => {
|
|
705
780
|
l.current = [], s({
|
|
706
781
|
parentPath: e,
|
|
707
782
|
pane: t
|
|
708
783
|
}), e !== "" && i(e);
|
|
709
|
-
}, [i]), m =
|
|
784
|
+
}, [i]), m = R((e, t) => {
|
|
710
785
|
if (c == null || t.path !== u) return null;
|
|
711
786
|
let n = f(e, c);
|
|
712
787
|
return l.current = [...l.current.slice(-1), {
|
|
@@ -717,23 +792,24 @@ var Re = {
|
|
|
717
792
|
c,
|
|
718
793
|
u,
|
|
719
794
|
f
|
|
720
|
-
]), h =
|
|
795
|
+
]), h = R(() => {
|
|
721
796
|
l.current = [], s(null);
|
|
722
|
-
}, []), 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) => {
|
|
723
805
|
if (c == null) return;
|
|
724
|
-
let [
|
|
725
|
-
|
|
726
|
-
h();
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
let r = He(c, e.trim());
|
|
730
|
-
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));
|
|
731
808
|
}, [
|
|
732
809
|
c,
|
|
733
810
|
f,
|
|
734
811
|
h,
|
|
735
|
-
|
|
736
|
-
a
|
|
812
|
+
g
|
|
737
813
|
]);
|
|
738
814
|
return {
|
|
739
815
|
draftNode: d,
|
|
@@ -741,711 +817,1007 @@ var Re = {
|
|
|
741
817
|
draftPane: o?.pane,
|
|
742
818
|
startDraft: p,
|
|
743
819
|
handleValidate: m,
|
|
744
|
-
handleSave:
|
|
745
|
-
handleCancel: h
|
|
820
|
+
handleSave: _,
|
|
821
|
+
handleCancel: h,
|
|
822
|
+
validateNewFolder: f,
|
|
823
|
+
createFolder: g
|
|
746
824
|
};
|
|
747
|
-
},
|
|
748
|
-
let [t, n] =
|
|
825
|
+
}, ht = (e) => !!e.dataTransfer?.types.includes("Files"), gt = (e) => {
|
|
826
|
+
let [t, n] = V(!1), r = B(0);
|
|
749
827
|
return {
|
|
750
828
|
isDragActive: t,
|
|
751
829
|
dropZoneHandlers: {
|
|
752
|
-
onDragEnter:
|
|
753
|
-
|
|
830
|
+
onDragEnter: R((e) => {
|
|
831
|
+
ht(e) && (e.preventDefault(), r.current += 1, n(!0));
|
|
754
832
|
}, []),
|
|
755
|
-
onDragLeave:
|
|
756
|
-
|
|
833
|
+
onDragLeave: R((e) => {
|
|
834
|
+
ht(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
|
|
757
835
|
}, []),
|
|
758
|
-
onDragOver:
|
|
759
|
-
|
|
836
|
+
onDragOver: R((e) => {
|
|
837
|
+
ht(e) && e.preventDefault();
|
|
760
838
|
}, []),
|
|
761
|
-
onDrop:
|
|
762
|
-
if (!
|
|
839
|
+
onDrop: R((t) => {
|
|
840
|
+
if (!ht(t)) return;
|
|
763
841
|
t.preventDefault(), r.current = 0, n(!1);
|
|
764
842
|
let i = Array.from(t.dataTransfer?.files ?? []);
|
|
765
843
|
i.length > 0 && e(i);
|
|
766
844
|
}, [e])
|
|
767
845
|
}
|
|
768
846
|
};
|
|
769
|
-
},
|
|
847
|
+
}, _t = /* @__PURE__ */ function(e) {
|
|
770
848
|
return e.Files = "files", e.Archive = "archive", e;
|
|
771
849
|
}({}), Y = /* @__PURE__ */ function(e) {
|
|
772
850
|
return e.Mobile = "mobile", e.Desktop = "desktop", e;
|
|
773
|
-
}({}),
|
|
851
|
+
}({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ F(e, {
|
|
774
852
|
size: n,
|
|
775
853
|
className: t,
|
|
854
|
+
style: r,
|
|
776
855
|
"aria-hidden": !0,
|
|
777
|
-
stroke:
|
|
778
|
-
}),
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
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"),
|
|
785
955
|
children: /* @__PURE__ */ I("div", {
|
|
956
|
+
"aria-hidden": !0,
|
|
786
957
|
className: "flex flex-col items-center text-center",
|
|
787
958
|
children: [
|
|
788
|
-
/* @__PURE__ */ F(
|
|
959
|
+
/* @__PURE__ */ F(Se, {
|
|
789
960
|
size: 100,
|
|
790
|
-
className:
|
|
961
|
+
className: St.icon,
|
|
791
962
|
"aria-hidden": !0,
|
|
792
|
-
stroke:
|
|
963
|
+
stroke: x
|
|
793
964
|
}),
|
|
794
965
|
/* @__PURE__ */ F("span", {
|
|
795
|
-
className: "
|
|
796
|
-
children:
|
|
966
|
+
className: c("mt-5", n),
|
|
967
|
+
children: a
|
|
797
968
|
}),
|
|
798
969
|
/* @__PURE__ */ F("span", {
|
|
799
|
-
className: "
|
|
800
|
-
children:
|
|
970
|
+
className: c("mt-4", r),
|
|
971
|
+
children: o
|
|
801
972
|
})
|
|
802
973
|
]
|
|
803
974
|
})
|
|
804
|
-
});
|
|
805
|
-
},
|
|
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) {
|
|
806
997
|
return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
|
|
807
|
-
}({}),
|
|
998
|
+
}({}), Dt = /* @__PURE__ */ function(e) {
|
|
808
999
|
return e.Valid = "valid", e.Invalid = "invalid", e;
|
|
809
|
-
}({}),
|
|
810
|
-
|
|
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(),
|
|
811
1007
|
file: e,
|
|
812
|
-
path:
|
|
813
|
-
}),
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
|
|
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) => {
|
|
817
1038
|
let { extractArchive: t } = n;
|
|
818
1039
|
if (!t) return;
|
|
819
|
-
let r =
|
|
820
|
-
|
|
1040
|
+
let r = ge.current;
|
|
1041
|
+
pe(void 0), he((e) => e + 1);
|
|
821
1042
|
try {
|
|
822
1043
|
let n = await Promise.all(e.map((e) => t(e)));
|
|
823
|
-
if (r !==
|
|
1044
|
+
if (r !== ge.current) return;
|
|
824
1045
|
let a = n.flat();
|
|
825
1046
|
if (a.length === 0) {
|
|
826
|
-
|
|
1047
|
+
pe(_.uploadArchiveEmptyMessage ?? "This archive has no files");
|
|
827
1048
|
return;
|
|
828
1049
|
}
|
|
829
|
-
|
|
1050
|
+
R(a.map((e) => jt(e.file, e.path, i)));
|
|
830
1051
|
} catch {
|
|
831
|
-
if (r !==
|
|
832
|
-
|
|
1052
|
+
if (r !== ge.current) return;
|
|
1053
|
+
pe(_e);
|
|
833
1054
|
} finally {
|
|
834
|
-
r ===
|
|
835
|
-
}
|
|
836
|
-
}, se = (e) => {
|
|
837
|
-
if (N) {
|
|
838
|
-
oe(e);
|
|
839
|
-
return;
|
|
1055
|
+
r === ge.current && he((e) => e - 1);
|
|
840
1056
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
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));
|
|
844
1061
|
};
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
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(() => {
|
|
848
1068
|
if (!e) return;
|
|
849
1069
|
let t = !1;
|
|
850
|
-
if (
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}
|
|
854
|
-
return b(!0), n.validateBatch(u).then(({ results: e, batchErrors: n }) => {
|
|
855
|
-
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)));
|
|
856
1073
|
}).finally(() => {
|
|
857
|
-
t ||
|
|
1074
|
+
t || oe(!1);
|
|
858
1075
|
}), () => {
|
|
859
1076
|
t = !0;
|
|
860
1077
|
};
|
|
861
|
-
}, [
|
|
862
|
-
let
|
|
863
|
-
|
|
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);
|
|
864
1084
|
try {
|
|
865
|
-
let { results: e, batchErrors: r } = await n.validateBatch(
|
|
866
|
-
if (
|
|
867
|
-
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);
|
|
868
1088
|
if (a.error) {
|
|
869
|
-
|
|
1089
|
+
se(a.error);
|
|
870
1090
|
return;
|
|
871
1091
|
}
|
|
872
|
-
t();
|
|
1092
|
+
d?.(v), t();
|
|
873
1093
|
} finally {
|
|
874
|
-
|
|
1094
|
+
ue(!1);
|
|
875
1095
|
}
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
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,
|
|
882
1135
|
onClose: t,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
variant: m.Primary,
|
|
891
|
-
iconBefore: E ? /* @__PURE__ */ F(ne, {
|
|
892
|
-
size: 16,
|
|
893
|
-
ariaLabel: ""
|
|
894
|
-
}) : void 0,
|
|
895
|
-
onClick: () => void fe(),
|
|
896
|
-
disabled: !R
|
|
897
|
-
}],
|
|
1136
|
+
confirmLabel: _.uploadConfirmLabel ?? "Add",
|
|
1137
|
+
onConfirm: () => void Pe(),
|
|
1138
|
+
isConfirmDisabled: !U,
|
|
1139
|
+
isConfirming: ce,
|
|
1140
|
+
cancelLabel: Ie,
|
|
1141
|
+
onCancel: t,
|
|
1142
|
+
colors: h,
|
|
898
1143
|
children: /* @__PURE__ */ I("div", {
|
|
899
|
-
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
|
+
}),
|
|
900
1149
|
children: [
|
|
901
|
-
/* @__PURE__ */ F(
|
|
1150
|
+
/* @__PURE__ */ F(O, {
|
|
902
1151
|
label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
|
|
903
1152
|
className: "desktop:hidden",
|
|
904
|
-
children:
|
|
1153
|
+
children: L ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
|
|
905
1154
|
}), /* @__PURE__ */ F("span", {
|
|
906
1155
|
className: "hidden desktop:inline",
|
|
907
|
-
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"
|
|
908
1157
|
})] }),
|
|
909
|
-
|
|
1158
|
+
description: L ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
|
|
1159
|
+
id: ye,
|
|
1160
|
+
ariaLabel: _.uploadDropZoneAriaLabel ?? "Upload files",
|
|
910
1161
|
multiple: !0,
|
|
911
|
-
accept:
|
|
912
|
-
className:
|
|
913
|
-
onChange:
|
|
914
|
-
onReject:
|
|
1162
|
+
accept: L ? $ : void 0,
|
|
1163
|
+
className: Me ? Q.invalidDropZone : void 0,
|
|
1164
|
+
onChange: Ae,
|
|
1165
|
+
onReject: L ? () => pe(_e) : void 0
|
|
915
1166
|
}),
|
|
916
|
-
|
|
917
|
-
/* @__PURE__ */ F(
|
|
918
|
-
|
|
919
|
-
|
|
1167
|
+
me > 0 && /* @__PURE__ */ F(fe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
|
|
1168
|
+
/* @__PURE__ */ F(D, {
|
|
1169
|
+
text: de,
|
|
1170
|
+
announce: M.Assertive
|
|
920
1171
|
}),
|
|
921
|
-
/* @__PURE__ */ F(
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
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(" ")
|
|
927
1177
|
}),
|
|
928
|
-
|
|
929
|
-
|
|
1178
|
+
te.map((e) => /* @__PURE__ */ F(D, { text: e }, e)),
|
|
1179
|
+
v.length > 0 && /* @__PURE__ */ F("ul", {
|
|
930
1180
|
className: "flex flex-col gap-2",
|
|
931
|
-
children:
|
|
932
|
-
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}`;
|
|
933
1183
|
return /* @__PURE__ */ I("li", {
|
|
934
|
-
className: "flex items-center gap-2 rounded-lg border
|
|
935
|
-
children: [
|
|
936
|
-
|
|
937
|
-
|
|
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,
|
|
938
1209
|
"aria-hidden": !0,
|
|
939
|
-
stroke:
|
|
940
|
-
}),
|
|
941
|
-
/* @__PURE__ */ I("div", {
|
|
942
|
-
className: "flex min-w-0 flex-1 flex-col",
|
|
943
|
-
children: [
|
|
944
|
-
/* @__PURE__ */ F("span", {
|
|
945
|
-
className: "dial-small-text truncate",
|
|
946
|
-
children: e.path
|
|
947
|
-
}),
|
|
948
|
-
/* @__PURE__ */ F("span", {
|
|
949
|
-
className: "dial-tiny-text text-secondary",
|
|
950
|
-
children: s(e.file.size)
|
|
951
|
-
}),
|
|
952
|
-
r && t?.error && /* @__PURE__ */ F(x, { text: t.error }),
|
|
953
|
-
n && !r && /* @__PURE__ */ F("span", {
|
|
954
|
-
className: "dial-tiny-text text-secondary",
|
|
955
|
-
children: l.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
|
|
956
|
-
})
|
|
957
|
-
]
|
|
1210
|
+
stroke: x
|
|
958
1211
|
}),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
stroke: _
|
|
964
|
-
}),
|
|
965
|
-
"aria-label": l.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
|
|
966
|
-
onClick: () => ce(e.id)
|
|
967
|
-
})
|
|
968
|
-
]
|
|
1212
|
+
"aria-label": _.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
|
|
1213
|
+
"aria-describedby": i ? a : void 0,
|
|
1214
|
+
onClick: () => H(e.id)
|
|
1215
|
+
})]
|
|
969
1216
|
}, e.id);
|
|
970
1217
|
})
|
|
971
1218
|
}),
|
|
972
|
-
|
|
1219
|
+
/* @__PURE__ */ F(D, {
|
|
1220
|
+
text: N,
|
|
1221
|
+
announce: M.Assertive
|
|
1222
|
+
})
|
|
973
1223
|
]
|
|
974
1224
|
})
|
|
975
1225
|
});
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
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,
|
|
983
1283
|
targetFolderPath: ""
|
|
984
|
-
},
|
|
985
|
-
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();
|
|
986
1286
|
return { default: e };
|
|
987
|
-
}),
|
|
988
|
-
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({
|
|
989
1289
|
name: r?.name ?? "",
|
|
990
1290
|
description: r?.description ?? "",
|
|
991
1291
|
instructions: r?.instructions ?? ""
|
|
992
|
-
}),
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
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) => {
|
|
996
1298
|
let t = {
|
|
997
|
-
...
|
|
1299
|
+
...Fe.current,
|
|
998
1300
|
...e
|
|
999
1301
|
};
|
|
1000
|
-
|
|
1001
|
-
},
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
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;
|
|
1004
1306
|
try {
|
|
1005
1307
|
return await e(t, n);
|
|
1006
1308
|
} finally {
|
|
1007
|
-
|
|
1309
|
+
U.current === n && (U.current = void 0);
|
|
1008
1310
|
}
|
|
1009
|
-
} : void 0,
|
|
1010
|
-
value:
|
|
1011
|
-
onChange: (e) =>
|
|
1012
|
-
onRefine:
|
|
1013
|
-
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,
|
|
1014
1316
|
resetKey: r
|
|
1015
|
-
}),
|
|
1016
|
-
value:
|
|
1017
|
-
onChange: (e) =>
|
|
1018
|
-
onRefine:
|
|
1019
|
-
disabled:
|
|
1317
|
+
}), W = f({
|
|
1318
|
+
value: H.instructions,
|
|
1319
|
+
onChange: (e) => Ie({ instructions: e }),
|
|
1320
|
+
onRefine: Le(oe),
|
|
1321
|
+
disabled: C || h || S,
|
|
1020
1322
|
resetKey: r
|
|
1021
|
-
}),
|
|
1022
|
-
|
|
1323
|
+
}), ze = Re.isPending || W.isPending, Be = () => {
|
|
1324
|
+
Re.reset(), W.reset();
|
|
1325
|
+
}, Ve = () => {
|
|
1326
|
+
Be(), de();
|
|
1327
|
+
}, He = () => {
|
|
1328
|
+
Be(), pe();
|
|
1023
1329
|
}, Ue = () => {
|
|
1024
|
-
|
|
1025
|
-
}, Ge = ()
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
O || T || D || G.current && !G.current.aborted || ve(W);
|
|
1029
|
-
}, qe = V(r), Ye = qe.current !== r, et = V(i);
|
|
1030
|
-
pe(() => {
|
|
1031
|
-
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;
|
|
1032
1334
|
let e = {
|
|
1033
1335
|
name: r?.name ?? "",
|
|
1034
1336
|
description: r?.description ?? "",
|
|
1035
1337
|
instructions: r?.instructions ?? ""
|
|
1036
1338
|
};
|
|
1037
|
-
|
|
1339
|
+
Fe.current = e, je(e), Ke.current = i, Je(!1);
|
|
1038
1340
|
}, [r]);
|
|
1039
|
-
let
|
|
1040
|
-
|
|
1041
|
-
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;
|
|
1042
1344
|
let e = {
|
|
1043
1345
|
name: r?.name ?? "",
|
|
1044
1346
|
description: r?.description ?? "",
|
|
1045
1347
|
instructions: r?.instructions ?? ""
|
|
1046
|
-
}, t = JSON.stringify(
|
|
1047
|
-
t !==
|
|
1348
|
+
}, t = JSON.stringify(H) !== JSON.stringify(e) || Ye(i) !== Ye(Ke.current) || qe;
|
|
1349
|
+
t !== Xe.current && (Xe.current = t, ie?.(t));
|
|
1048
1350
|
}, [
|
|
1049
|
-
|
|
1351
|
+
H,
|
|
1050
1352
|
i,
|
|
1051
1353
|
r,
|
|
1052
|
-
|
|
1053
|
-
|
|
1354
|
+
Ge,
|
|
1355
|
+
qe,
|
|
1356
|
+
ie
|
|
1054
1357
|
]);
|
|
1055
|
-
let [
|
|
1056
|
-
|
|
1057
|
-
}, [
|
|
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) => {
|
|
1058
1361
|
let t = [...e];
|
|
1059
|
-
|
|
1060
|
-
}, [
|
|
1061
|
-
|
|
1062
|
-
}, []), [
|
|
1063
|
-
|
|
1064
|
-
...
|
|
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,
|
|
1065
1368
|
initialFiles: e
|
|
1066
1369
|
});
|
|
1067
|
-
}, [
|
|
1068
|
-
"--se-title-color":
|
|
1069
|
-
"--se-helper-text-color":
|
|
1070
|
-
"--se-refine-action-text":
|
|
1071
|
-
"--se-refine-error-text":
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
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
|
|
1079
1390
|
} } : void 0,
|
|
1080
|
-
section:
|
|
1081
|
-
},
|
|
1082
|
-
required:
|
|
1083
|
-
invalid:
|
|
1084
|
-
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
|
+
}
|
|
1085
1408
|
}), [
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
]),
|
|
1090
|
-
vt.has(e) || yt(new Set([...vt, e]));
|
|
1091
|
-
}, [vt, yt]), zt = Je({
|
|
1409
|
+
N,
|
|
1410
|
+
Yt,
|
|
1411
|
+
Jt
|
|
1412
|
+
]), Zt = mt({
|
|
1092
1413
|
files: i,
|
|
1093
|
-
fileActions:
|
|
1094
|
-
defaultName:
|
|
1095
|
-
messages:
|
|
1096
|
-
onRevealFolder:
|
|
1097
|
-
onCreated:
|
|
1098
|
-
}), { 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([{
|
|
1099
1420
|
path: K,
|
|
1100
1421
|
name: K,
|
|
1101
1422
|
kind: q.File
|
|
1102
|
-
}, ...i]), [i]),
|
|
1423
|
+
}, ...i]), [i]), nn = z(() => Qt ? at([
|
|
1103
1424
|
{
|
|
1104
1425
|
path: K,
|
|
1105
1426
|
name: K,
|
|
1106
1427
|
kind: q.File
|
|
1107
1428
|
},
|
|
1108
1429
|
...i,
|
|
1109
|
-
|
|
1110
|
-
]) :
|
|
1430
|
+
Qt
|
|
1431
|
+
]) : tn, [
|
|
1111
1432
|
i,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
]),
|
|
1115
|
-
e.path !==
|
|
1116
|
-
}, [
|
|
1117
|
-
|
|
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);
|
|
1118
1444
|
}, [
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
]),
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
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,
|
|
1127
1461
|
targetFolderPath: e,
|
|
1128
1462
|
initialEntries: t
|
|
1129
1463
|
});
|
|
1130
|
-
}, [
|
|
1131
|
-
let n = (e) =>
|
|
1132
|
-
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({
|
|
1133
1467
|
key: "create-folder",
|
|
1134
|
-
label:
|
|
1135
|
-
icon: n(
|
|
1136
|
-
onClick: () =>
|
|
1468
|
+
label: Z.createFolderLabel ?? "Create folder",
|
|
1469
|
+
icon: n(ve),
|
|
1470
|
+
onClick: () => gn(e, t)
|
|
1137
1471
|
}), r.push({
|
|
1138
1472
|
key: "upload-files",
|
|
1139
|
-
label:
|
|
1140
|
-
icon: n(
|
|
1141
|
-
onClick: () =>
|
|
1142
|
-
mode:
|
|
1473
|
+
label: Z.uploadFilesLabel ?? "Upload files from device",
|
|
1474
|
+
icon: n(Se),
|
|
1475
|
+
onClick: () => St({
|
|
1476
|
+
mode: _t.Files,
|
|
1143
1477
|
targetFolderPath: e
|
|
1144
1478
|
})
|
|
1145
|
-
}),
|
|
1479
|
+
}), fn && r.push({
|
|
1146
1480
|
key: "upload-archive",
|
|
1147
|
-
label:
|
|
1148
|
-
icon: n(
|
|
1149
|
-
onClick: () =>
|
|
1150
|
-
mode:
|
|
1481
|
+
label: Z.uploadArchiveLabel ?? "Upload archive from device",
|
|
1482
|
+
icon: n(_e),
|
|
1483
|
+
onClick: () => St({
|
|
1484
|
+
mode: _t.Archive,
|
|
1151
1485
|
targetFolderPath: e
|
|
1152
1486
|
})
|
|
1153
|
-
}),
|
|
1487
|
+
}), pn && r.push({
|
|
1154
1488
|
key: "open-file-system",
|
|
1155
|
-
label:
|
|
1156
|
-
icon: n(
|
|
1157
|
-
onClick: () => void
|
|
1489
|
+
label: Z.openFileSystemLabel ?? "Open DIAL file system",
|
|
1490
|
+
icon: n(L),
|
|
1491
|
+
onClick: () => void vn(e)
|
|
1158
1492
|
}), r;
|
|
1159
1493
|
}, [
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
]),
|
|
1172
|
-
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));
|
|
1173
1507
|
return {
|
|
1174
|
-
[Y.Mobile]:
|
|
1175
|
-
[Y.Desktop]:
|
|
1508
|
+
[Y.Mobile]: yn(e, Y.Mobile),
|
|
1509
|
+
[Y.Desktop]: yn(e, Y.Desktop)
|
|
1176
1510
|
};
|
|
1177
1511
|
}, [
|
|
1178
|
-
|
|
1512
|
+
yn,
|
|
1179
1513
|
i,
|
|
1180
|
-
|
|
1181
|
-
]),
|
|
1182
|
-
if (e.path ===
|
|
1514
|
+
G
|
|
1515
|
+
]), xn = R((e, t) => {
|
|
1516
|
+
if (e.path === $t || e.nodeType !== Oe.FOLDER) return [];
|
|
1183
1517
|
let n = {
|
|
1184
1518
|
path: e.path,
|
|
1185
1519
|
name: e.name,
|
|
1186
1520
|
kind: q.Folder
|
|
1187
|
-
}, r =
|
|
1521
|
+
}, r = yn(ct(rt.Child, n), t);
|
|
1188
1522
|
return r.push({
|
|
1189
|
-
key: "add-sibling",
|
|
1190
|
-
icon: Qe(ce),
|
|
1191
|
-
label: Q.addSiblingLabel ?? "Add sibling",
|
|
1192
|
-
children: $t(We(ze.Sibling, n), t)
|
|
1193
|
-
}, {
|
|
1194
1523
|
key: "delete",
|
|
1195
|
-
label:
|
|
1524
|
+
label: Z.deleteLabel ?? "Delete",
|
|
1196
1525
|
danger: !0,
|
|
1197
|
-
icon:
|
|
1198
|
-
onClick: () =>
|
|
1526
|
+
icon: vt(xe, At),
|
|
1527
|
+
onClick: () => ln(e.path)
|
|
1199
1528
|
}), r;
|
|
1200
1529
|
}, [
|
|
1201
|
-
Vt,
|
|
1202
|
-
Q.addSiblingLabel,
|
|
1203
|
-
Q.deleteLabel,
|
|
1204
|
-
Mt,
|
|
1205
1530
|
$t,
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
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)
|
|
1215
1543
|
}), [
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
]),
|
|
1544
|
+
Z.deleteLabel,
|
|
1545
|
+
At,
|
|
1546
|
+
ln
|
|
1547
|
+
]), wn = (e) => /* @__PURE__ */ I("div", {
|
|
1220
1548
|
className: "flex flex-col gap-2 desktop:gap-5",
|
|
1221
1549
|
children: [/* @__PURE__ */ I("div", {
|
|
1222
1550
|
className: "flex items-center justify-between",
|
|
1223
1551
|
children: [/* @__PURE__ */ F("span", {
|
|
1224
|
-
className: c(
|
|
1225
|
-
children:
|
|
1226
|
-
}), /* @__PURE__ */ F(
|
|
1227
|
-
label:
|
|
1228
|
-
variant:
|
|
1229
|
-
appearance:
|
|
1230
|
-
size:
|
|
1231
|
-
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]
|
|
1232
1560
|
})]
|
|
1233
1561
|
}), /* @__PURE__ */ F("div", {
|
|
1234
1562
|
role: "tree",
|
|
1235
|
-
"aria-label":
|
|
1236
|
-
children: /* @__PURE__ */ F(
|
|
1237
|
-
items:
|
|
1563
|
+
"aria-label": Z.filesTreeAriaLabel ?? "Skill files",
|
|
1564
|
+
children: /* @__PURE__ */ F(ke, {
|
|
1565
|
+
items: en === e ? nn : tn,
|
|
1238
1566
|
showFiles: !0,
|
|
1239
|
-
selectedPath:
|
|
1240
|
-
expandedPaths:
|
|
1241
|
-
onExpandedPathsChange:
|
|
1242
|
-
onItemClick:
|
|
1243
|
-
getContextMenuItems:
|
|
1244
|
-
renderItemActions:
|
|
1245
|
-
renamedPath:
|
|
1246
|
-
onRenameSave:
|
|
1247
|
-
onRenameCancel:
|
|
1248
|
-
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,
|
|
1249
1577
|
rootItemPath: ""
|
|
1250
1578
|
})
|
|
1251
1579
|
})]
|
|
1252
|
-
}),
|
|
1253
|
-
name:
|
|
1254
|
-
description:
|
|
1580
|
+
}), Tn = z(() => ({
|
|
1581
|
+
name: H.name,
|
|
1582
|
+
description: H.description,
|
|
1255
1583
|
iconUrl: "",
|
|
1256
1584
|
version: "",
|
|
1257
1585
|
topics: [],
|
|
1258
1586
|
otherLocales: []
|
|
1259
|
-
}), [
|
|
1260
|
-
name:
|
|
1261
|
-
description:
|
|
1262
|
-
}), [
|
|
1263
|
-
|
|
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,
|
|
1264
1592
|
name: {
|
|
1265
|
-
label:
|
|
1266
|
-
placeholder:
|
|
1593
|
+
label: Z.nameLabel ?? "Name",
|
|
1594
|
+
placeholder: Z.namePlaceholder ?? "good-morning-breakfast"
|
|
1267
1595
|
},
|
|
1268
1596
|
description: {
|
|
1269
|
-
label:
|
|
1270
|
-
placeholder:
|
|
1597
|
+
label: Z.descriptionLabel ?? "Description",
|
|
1598
|
+
placeholder: Z.descriptionPlaceholder ?? "What this skill does and when to use it"
|
|
1271
1599
|
},
|
|
1272
1600
|
ariaLabel: void 0
|
|
1273
1601
|
} }), [
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
]),
|
|
1279
|
-
e.name !== void 0 &&
|
|
1280
|
-
},
|
|
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, {
|
|
1281
1609
|
isEnabled: !0,
|
|
1282
1610
|
fieldId: t,
|
|
1283
1611
|
required: !0,
|
|
1284
|
-
label:
|
|
1285
|
-
labels:
|
|
1286
|
-
refinement:
|
|
1287
|
-
disabled:
|
|
1288
|
-
...
|
|
1612
|
+
label: Z.descriptionLabel ?? "Description",
|
|
1613
|
+
labels: Z,
|
|
1614
|
+
refinement: Re,
|
|
1615
|
+
disabled: ze || C,
|
|
1616
|
+
...Gt,
|
|
1289
1617
|
children: e
|
|
1290
|
-
}) : void 0,
|
|
1291
|
-
title:
|
|
1292
|
-
onBack:
|
|
1293
|
-
onCancel:
|
|
1294
|
-
onSubmit:
|
|
1295
|
-
submitLabel:
|
|
1296
|
-
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,
|
|
1297
1625
|
labels: {
|
|
1298
|
-
cancelLabel:
|
|
1299
|
-
backAriaLabel:
|
|
1300
|
-
savingStatusLabel:
|
|
1626
|
+
cancelLabel: Z.cancelLabel ?? "Cancel",
|
|
1627
|
+
backAriaLabel: me ?? "Back",
|
|
1628
|
+
savingStatusLabel: Z.savingStatusLabel ?? "Saving"
|
|
1301
1629
|
},
|
|
1302
|
-
styles:
|
|
1630
|
+
styles: Kt,
|
|
1303
1631
|
metadataTitle: null
|
|
1304
1632
|
};
|
|
1305
|
-
if (
|
|
1306
|
-
dir:
|
|
1633
|
+
if (h) return /* @__PURE__ */ F("div", {
|
|
1634
|
+
dir: Te,
|
|
1307
1635
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
1308
|
-
children: /* @__PURE__ */ F(
|
|
1309
|
-
...
|
|
1636
|
+
children: /* @__PURE__ */ F(Qe, {
|
|
1637
|
+
...An,
|
|
1310
1638
|
metadata: /* @__PURE__ */ F("div", {
|
|
1311
|
-
role: "status",
|
|
1312
|
-
"aria-label": Q.loadingAriaLabel ?? "Loading skill",
|
|
1313
1639
|
className: "flex flex-1 items-center justify-center p-8",
|
|
1314
|
-
children: /* @__PURE__ */ F(
|
|
1640
|
+
children: /* @__PURE__ */ F(fe, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
|
|
1315
1641
|
})
|
|
1316
1642
|
})
|
|
1317
1643
|
});
|
|
1318
|
-
if (
|
|
1319
|
-
dir:
|
|
1644
|
+
if (S) return /* @__PURE__ */ F("div", {
|
|
1645
|
+
dir: Te,
|
|
1320
1646
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
1321
|
-
children: /* @__PURE__ */ F(
|
|
1322
|
-
...
|
|
1323
|
-
metadata: /* @__PURE__ */
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
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
|
+
})
|
|
1330
1659
|
})
|
|
1331
1660
|
})
|
|
1332
1661
|
});
|
|
1333
|
-
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", {
|
|
1334
1663
|
className: "flex flex-col gap-2",
|
|
1335
|
-
children: [
|
|
1664
|
+
children: [k != null && /* @__PURE__ */ I("div", {
|
|
1336
1665
|
className: "flex items-center gap-2",
|
|
1337
|
-
children: [/* @__PURE__ */ F(
|
|
1338
|
-
label:
|
|
1339
|
-
onClick:
|
|
1666
|
+
children: [/* @__PURE__ */ F(D, { text: k }), ye != null && /* @__PURE__ */ F(A, {
|
|
1667
|
+
label: Z.retryLabel ?? "Retry",
|
|
1668
|
+
onClick: ye
|
|
1340
1669
|
})]
|
|
1341
|
-
}),
|
|
1670
|
+
}), j != null && /* @__PURE__ */ I("div", {
|
|
1342
1671
|
className: "flex items-center gap-2",
|
|
1343
|
-
children: [/* @__PURE__ */ F(
|
|
1344
|
-
label:
|
|
1345
|
-
onClick:
|
|
1672
|
+
children: [/* @__PURE__ */ F(D, { text: j.message }), /* @__PURE__ */ F(A, {
|
|
1673
|
+
label: Z.reloadLatestLabel ?? "Reload latest",
|
|
1674
|
+
onClick: ne
|
|
1346
1675
|
})]
|
|
1347
1676
|
})]
|
|
1348
|
-
}) : void 0,
|
|
1349
|
-
isEnabled: !!
|
|
1350
|
-
fieldId:
|
|
1677
|
+
}) : void 0, Fn = /* @__PURE__ */ F(a, {
|
|
1678
|
+
isEnabled: !!oe,
|
|
1679
|
+
fieldId: Me,
|
|
1351
1680
|
required: !0,
|
|
1352
|
-
labelClassName: c(
|
|
1353
|
-
label:
|
|
1354
|
-
labels:
|
|
1355
|
-
refinement:
|
|
1356
|
-
disabled:
|
|
1357
|
-
...
|
|
1681
|
+
labelClassName: c(It.helperText, kt),
|
|
1682
|
+
label: Z.instructionsLabel ?? "Instructions",
|
|
1683
|
+
labels: Z,
|
|
1684
|
+
refinement: W,
|
|
1685
|
+
disabled: ze || C,
|
|
1686
|
+
...Gt,
|
|
1358
1687
|
children: /* @__PURE__ */ I("div", {
|
|
1359
1688
|
className: "flex flex-1 flex-col gap-2",
|
|
1360
1689
|
children: [
|
|
1361
|
-
!
|
|
1362
|
-
htmlFor:
|
|
1363
|
-
className: c(
|
|
1364
|
-
label:
|
|
1690
|
+
!oe && /* @__PURE__ */ F(te, {
|
|
1691
|
+
htmlFor: Me,
|
|
1692
|
+
className: c(It.helperText, kt),
|
|
1693
|
+
label: Z.instructionsLabel ?? "Instructions",
|
|
1365
1694
|
required: !0
|
|
1366
1695
|
}),
|
|
1367
1696
|
/* @__PURE__ */ F("div", {
|
|
1368
|
-
ref:
|
|
1697
|
+
ref: Pe,
|
|
1369
1698
|
className: c(t, e, n),
|
|
1370
|
-
children: /* @__PURE__ */ F(
|
|
1371
|
-
fallback: /* @__PURE__ */ F(
|
|
1372
|
-
children: /* @__PURE__ */ F(
|
|
1373
|
-
id:
|
|
1374
|
-
ariaLabel:
|
|
1375
|
-
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,
|
|
1376
1705
|
onChange: (e) => {
|
|
1377
|
-
|
|
1706
|
+
W.reset(), Ie({ instructions: e });
|
|
1378
1707
|
},
|
|
1379
|
-
theme:
|
|
1708
|
+
theme: Ae,
|
|
1380
1709
|
showDragbar: !1,
|
|
1381
|
-
placeholder:
|
|
1710
|
+
placeholder: Z.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
|
|
1382
1711
|
})
|
|
1383
1712
|
})
|
|
1384
1713
|
}),
|
|
1385
|
-
|
|
1714
|
+
O?.instructions != null && /* @__PURE__ */ F(D, {
|
|
1715
|
+
id: Ne,
|
|
1716
|
+
text: O.instructions
|
|
1717
|
+
})
|
|
1386
1718
|
]
|
|
1387
1719
|
})
|
|
1388
1720
|
});
|
|
1389
1721
|
return /* @__PURE__ */ I("div", {
|
|
1390
|
-
dir:
|
|
1391
|
-
className: c("relative flex min-h-0 flex-1 flex-col",
|
|
1392
|
-
style:
|
|
1393
|
-
...
|
|
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,
|
|
1394
1726
|
children: [
|
|
1395
|
-
/* @__PURE__ */ F(
|
|
1396
|
-
isVisible: Dt && !
|
|
1397
|
-
labels:
|
|
1727
|
+
/* @__PURE__ */ F(Ct, {
|
|
1728
|
+
isVisible: Dt && !pt,
|
|
1729
|
+
labels: be,
|
|
1730
|
+
titleClassName: $.dropOverlayTitleClassName,
|
|
1731
|
+
subtitleClassName: $.dropOverlaySubtitleClassName
|
|
1398
1732
|
}),
|
|
1399
|
-
/* @__PURE__ */ F(
|
|
1400
|
-
...
|
|
1401
|
-
asideData:
|
|
1402
|
-
asideSectionClassName:
|
|
1403
|
-
isSubmitting:
|
|
1404
|
-
metadataSectionClassName:
|
|
1733
|
+
/* @__PURE__ */ F(Qe, {
|
|
1734
|
+
...An,
|
|
1735
|
+
asideData: le,
|
|
1736
|
+
asideSectionClassName: Ht,
|
|
1737
|
+
isSubmitting: C,
|
|
1738
|
+
metadataSectionClassName: Vt,
|
|
1405
1739
|
metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
|
|
1406
1740
|
className: "desktop:hidden",
|
|
1407
|
-
children: /* @__PURE__ */ F(
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1741
|
+
children: /* @__PURE__ */ F(Tt, {
|
|
1742
|
+
label: Z.editingFileLabel ?? "Editing file",
|
|
1743
|
+
fileName: jn ? K : Mn,
|
|
1744
|
+
isExpanded: wt,
|
|
1411
1745
|
onToggle: Et,
|
|
1412
|
-
|
|
1413
|
-
|
|
1746
|
+
labelClassName: $.editingFileLabelClassName,
|
|
1747
|
+
fileNameClassName: $.editingFileNameClassName,
|
|
1748
|
+
children: wn(Y.Mobile)
|
|
1414
1749
|
})
|
|
1415
1750
|
}), /* @__PURE__ */ F("div", {
|
|
1416
1751
|
className: "hidden desktop:block",
|
|
1417
|
-
children:
|
|
1752
|
+
children: wn(Y.Desktop)
|
|
1418
1753
|
})] }),
|
|
1419
|
-
alert:
|
|
1420
|
-
setupTitle:
|
|
1421
|
-
setupSectionClassName:
|
|
1422
|
-
setup:
|
|
1423
|
-
values:
|
|
1424
|
-
errors:
|
|
1425
|
-
onChange:
|
|
1426
|
-
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,
|
|
1427
1762
|
isDescriptionRequired: !0,
|
|
1428
|
-
isNameReadOnly:
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
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
|
+
}
|
|
1436
1805
|
}),
|
|
1437
|
-
/* @__PURE__ */ F(
|
|
1438
|
-
isOpen:
|
|
1439
|
-
onClose: () =>
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
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
|
|
1446
1818
|
})
|
|
1447
1819
|
]
|
|
1448
1820
|
});
|
|
1449
1821
|
};
|
|
1450
1822
|
//#endregion
|
|
1451
|
-
export {
|
|
1823
|
+
export { nt as SKILL_EDITOR_CLASS, Gt as SkillEditor, Et as SkillFileCandidateKind, q as SkillFileNodeKind, _t as SkillFileUploadMode, Dt as SkillFileValidationStatus };
|