@epam/ai-dial-projects 1.3.0-dev.290 → 1.3.0-dev.294
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/ProjectConversationsPanel/ProjectConversationsPanel.d.ts.map +1 -1
- package/components/ProjectOutputs/ProjectOutputs.d.ts +4 -0
- package/components/ProjectOutputs/ProjectOutputs.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +377 -310
- package/models/project-conversations-panel-props.d.ts +2 -0
- package/models/project-conversations-panel-props.d.ts.map +1 -1
- package/models/project-outputs-props.d.ts +66 -0
- package/models/project-outputs-props.d.ts.map +1 -0
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeleteConfirmationDialog as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, MarkdownRenderer as r, PROHIBITED_CONVERSATION_NAME_CHARS_RE as i, PanelEmptyState as a, RequestStatus as o, TextRefinementField as s, buildCssVars as c, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useIsMobile as p, useTextRefinement as m } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as
|
|
3
|
-
import { IconArrowNarrowLeft as
|
|
4
|
-
import { Suspense as
|
|
2
|
+
import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as j, Label as M, LinkButton as N, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as I, MenuItemMark as L, NeutralButton as R, Popup as ee, PopupSize as te, Search as ne, Spinner as z } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconArrowNarrowLeft as B, IconArrowsSort as V, IconDotsVertical as re, IconDownload as ie, IconPencilMinus as H, IconPin as ae, IconPinFilled as U, IconPlus as oe, IconShare as se, IconTrashX as ce, IconWorldShare as W, createReactComponent as le } from "@tabler/icons-react";
|
|
4
|
+
import { Suspense as ue, lazy as de, memo as G, useCallback as K, useEffect as fe, useId as q, useMemo as J, useRef as pe, useState as Y } from "react";
|
|
5
5
|
import { Fragment as me, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
6
6
|
import { AttachmentCard as he, FileDndOverlay as ge } from "@epam/ai-dial-attachment-input";
|
|
7
7
|
import { BuilderFormContainer as _e } from "@epam/ai-dial-builder-form";
|
|
@@ -49,7 +49,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
49
49
|
aboveLink: "_aboveLink_1gkfw_55",
|
|
50
50
|
interactive: "_interactive_1gkfw_60"
|
|
51
51
|
}, De = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Oe = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, ke = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: l, locale: u, updatedAtClassName: f, titleClassName: p, pathLabelClassName: m, pathLeafClassName: h }) => {
|
|
52
|
-
let g = /* @__PURE__ */ X(
|
|
52
|
+
let g = /* @__PURE__ */ X(A, {
|
|
53
53
|
text: e.name,
|
|
54
54
|
query: t,
|
|
55
55
|
maxLines: 1,
|
|
@@ -80,19 +80,19 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
80
80
|
children: g
|
|
81
81
|
}), o == null ? e.isPinned && /* @__PURE__ */ Z("span", {
|
|
82
82
|
className: d("absolute inset-e-5 top-5 flex", Q.pin),
|
|
83
|
-
children: [/* @__PURE__ */ X(
|
|
83
|
+
children: [/* @__PURE__ */ X(U, {
|
|
84
84
|
size: b.SM,
|
|
85
85
|
"aria-hidden": !0
|
|
86
86
|
}), /* @__PURE__ */ X("span", {
|
|
87
87
|
className: "sr-only",
|
|
88
88
|
children: i
|
|
89
89
|
})]
|
|
90
|
-
}) : /* @__PURE__ */ X(
|
|
90
|
+
}) : /* @__PURE__ */ X(k, {
|
|
91
91
|
size: C.Small,
|
|
92
|
-
icon: e.isPinned ? /* @__PURE__ */ X(
|
|
92
|
+
icon: e.isPinned ? /* @__PURE__ */ X(U, {
|
|
93
93
|
size: b.SM,
|
|
94
94
|
"aria-hidden": !0
|
|
95
|
-
}) : /* @__PURE__ */ X(
|
|
95
|
+
}) : /* @__PURE__ */ X(ae, {
|
|
96
96
|
size: b.SM,
|
|
97
97
|
"aria-hidden": !0,
|
|
98
98
|
stroke: x
|
|
@@ -103,7 +103,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
103
103
|
className: d("absolute inset-e-4 top-4", Q.pinToggle, !e.isPinned && Q.pinToggleIdle)
|
|
104
104
|
})]
|
|
105
105
|
}),
|
|
106
|
-
/* @__PURE__ */ X(
|
|
106
|
+
/* @__PURE__ */ X(D, {
|
|
107
107
|
segments: De(n, e.parentPath),
|
|
108
108
|
ariaLabel: r,
|
|
109
109
|
labelClassName: d(m, Q.path),
|
|
@@ -117,65 +117,65 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
117
117
|
container: "_container_4rer8_1",
|
|
118
118
|
subtitle: "_subtitle_4rer8_5",
|
|
119
119
|
sortButton: "_sortButton_4rer8_9"
|
|
120
|
-
}, je = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: o, onTogglePin: s, onOpenProject: l, getProjectHref: u, searchQuery: f, onSearchQueryChange: m, sortKey: y, onSortKeyChange: S, labels: w, locale: T, styles:
|
|
121
|
-
let { colors:
|
|
122
|
-
"--pr-bg":
|
|
123
|
-
"--pr-subtitle-text":
|
|
124
|
-
"--pr-sort-text":
|
|
125
|
-
"--pr-card-bg":
|
|
126
|
-
"--pr-card-title-text":
|
|
127
|
-
"--pr-updated-at-text":
|
|
128
|
-
"--pr-path-text":
|
|
129
|
-
"--pr-card-focus-outline":
|
|
130
|
-
}),
|
|
120
|
+
}, je = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: o, onTogglePin: s, onOpenProject: l, getProjectHref: u, searchQuery: f, onSearchQueryChange: m, sortKey: y, onSortKeyChange: S, labels: w, locale: T, styles: E }) => {
|
|
121
|
+
let { colors: D, typography: k } = E ?? {}, A = k?.titleClassName ?? "dial-h1-text", j = k?.subtitleClassName ?? "dial-body-text", M = k?.cardTitleClassName ?? "dial-body-semi-text", N = k?.pathLabelClassName ?? "dial-tiny-text", I = k?.pathLeafClassName ?? "dial-tiny-semi-text", R = k?.updatedAtClassName ?? "dial-tiny-text", ee = k?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", te = c({
|
|
122
|
+
"--pr-bg": D?.background,
|
|
123
|
+
"--pr-subtitle-text": D?.subtitleText,
|
|
124
|
+
"--pr-sort-text": D?.sortButtonText,
|
|
125
|
+
"--pr-card-bg": D?.cardBackground,
|
|
126
|
+
"--pr-card-title-text": D?.cardTitleText,
|
|
127
|
+
"--pr-updated-at-text": D?.updatedAtText,
|
|
128
|
+
"--pr-path-text": D?.pathText,
|
|
129
|
+
"--pr-card-focus-outline": D?.cardFocusOutline
|
|
130
|
+
}), B = p(), re = J(() => Date.now(), [e]), ie = f.trim(), H = r.length > 0, ae = H && e.length === 0, U = J(() => xe(be(e, f), y, T), [
|
|
131
131
|
e,
|
|
132
132
|
f,
|
|
133
133
|
y,
|
|
134
134
|
T
|
|
135
|
-
]),
|
|
135
|
+
]), se = w.sortOptions.find((e) => e.value === y)?.label ?? w.sortLabel, ce = J(() => w.sortOptions.map((e) => ({
|
|
136
136
|
key: e.value,
|
|
137
137
|
label: e.label,
|
|
138
|
-
mark:
|
|
138
|
+
mark: L.Check,
|
|
139
139
|
checked: e.value === y,
|
|
140
140
|
onClick: () => S(e.value)
|
|
141
141
|
})), [
|
|
142
142
|
w.sortOptions,
|
|
143
143
|
y,
|
|
144
144
|
S
|
|
145
|
-
]),
|
|
145
|
+
]), W = (e) => {
|
|
146
146
|
m(e ?? "");
|
|
147
|
-
},
|
|
148
|
-
if (!t) return n ? w.errorLabel :
|
|
149
|
-
},
|
|
147
|
+
}, le = () => {
|
|
148
|
+
if (!t) return n ? w.errorLabel : H ? w.incompleteLabel : e.length === 0 ? w.emptyStateLabel : U.length === 0 ? w.noResultsLabel : w.resultCountLabel(U.length);
|
|
149
|
+
}, ue = (e, t) => o ? /* @__PURE__ */ X(h, {
|
|
150
150
|
label: w.createProjectLabel,
|
|
151
151
|
variant: e,
|
|
152
152
|
onClick: o,
|
|
153
153
|
className: d("shrink-0", t)
|
|
154
|
-
}) : void 0,
|
|
154
|
+
}) : void 0, de = () => t ? /* @__PURE__ */ X(z, {}) : n || ae ? /* @__PURE__ */ Z("div", {
|
|
155
155
|
className: "flex flex-col items-center gap-3",
|
|
156
156
|
children: [/* @__PURE__ */ X("p", {
|
|
157
|
-
className: d(
|
|
157
|
+
className: d(j, Ae.subtitle),
|
|
158
158
|
children: n ? w.errorLabel : w.incompleteLabel
|
|
159
|
-
}), /* @__PURE__ */ X(
|
|
159
|
+
}), /* @__PURE__ */ X(O, {
|
|
160
160
|
label: w.retryLabel,
|
|
161
161
|
onClick: i
|
|
162
162
|
})]
|
|
163
163
|
}) : e.length === 0 ? /* @__PURE__ */ X(a, {
|
|
164
164
|
label: w.emptyStateLabel,
|
|
165
165
|
description: w.emptyStateDescription,
|
|
166
|
-
action:
|
|
166
|
+
action: ue(v.Secondary, "mt-2"),
|
|
167
167
|
containerClassName: K,
|
|
168
168
|
labelClassName: "mt-3",
|
|
169
|
-
descriptionClassName:
|
|
170
|
-
}) :
|
|
169
|
+
descriptionClassName: ee
|
|
170
|
+
}) : U.length === 0 ? /* @__PURE__ */ X(a, {
|
|
171
171
|
label: w.noResultsLabel,
|
|
172
172
|
containerClassName: K,
|
|
173
173
|
labelClassName: "mt-3"
|
|
174
174
|
}) : /* @__PURE__ */ X("ul", {
|
|
175
175
|
className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-4 p-0 desktop:grid-cols-3 desktop:gap-5",
|
|
176
|
-
children:
|
|
176
|
+
children: U.map((e) => /* @__PURE__ */ X(ke, {
|
|
177
177
|
project: e,
|
|
178
|
-
searchQuery:
|
|
178
|
+
searchQuery: ie,
|
|
179
179
|
sourceLabel: w.sourceLabels[e.source],
|
|
180
180
|
folderPathLabel: w.folderPathLabel,
|
|
181
181
|
pinnedLabel: w.pinnedLabel ?? "Pinned",
|
|
@@ -183,21 +183,21 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
183
183
|
onTogglePin: s,
|
|
184
184
|
href: u?.(e.id),
|
|
185
185
|
onOpen: l,
|
|
186
|
-
now:
|
|
186
|
+
now: re,
|
|
187
187
|
locale: T,
|
|
188
|
-
updatedAtClassName:
|
|
189
|
-
titleClassName:
|
|
190
|
-
pathLabelClassName:
|
|
191
|
-
pathLeafClassName:
|
|
188
|
+
updatedAtClassName: R,
|
|
189
|
+
titleClassName: M,
|
|
190
|
+
pathLabelClassName: N,
|
|
191
|
+
pathLeafClassName: I
|
|
192
192
|
}, e.id))
|
|
193
|
-
}), G = t || n ||
|
|
193
|
+
}), G = t || n || ae, K = "mt-6 p-3 desktop:mt-0";
|
|
194
194
|
return /* @__PURE__ */ Z("div", {
|
|
195
|
-
style:
|
|
195
|
+
style: te,
|
|
196
196
|
className: d("relative flex h-full w-full min-w-0 flex-col", Ae.container),
|
|
197
197
|
children: [/* @__PURE__ */ Z("div", {
|
|
198
198
|
className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
|
|
199
199
|
children: [
|
|
200
|
-
|
|
200
|
+
B ? /* @__PURE__ */ X("h1", {
|
|
201
201
|
className: "sr-only",
|
|
202
202
|
children: w.title
|
|
203
203
|
}) : /* @__PURE__ */ Z("div", {
|
|
@@ -205,39 +205,39 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
205
205
|
children: [/* @__PURE__ */ Z("div", {
|
|
206
206
|
className: "flex min-h-10 min-w-0 flex-1 flex-col justify-center gap-0.5",
|
|
207
207
|
children: [/* @__PURE__ */ X("h1", {
|
|
208
|
-
className: d("wrap-break-word",
|
|
208
|
+
className: d("wrap-break-word", A),
|
|
209
209
|
children: w.title
|
|
210
210
|
}), w.subtitle && /* @__PURE__ */ X("p", {
|
|
211
|
-
className: d(
|
|
211
|
+
className: d(j, Ae.subtitle),
|
|
212
212
|
children: w.subtitle
|
|
213
213
|
})]
|
|
214
|
-
}),
|
|
214
|
+
}), ue(v.Primary)]
|
|
215
215
|
}),
|
|
216
216
|
/* @__PURE__ */ Z("div", {
|
|
217
217
|
className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
|
|
218
218
|
children: [/* @__PURE__ */ X("div", {
|
|
219
219
|
role: "search",
|
|
220
220
|
className: "min-w-0 flex-1",
|
|
221
|
-
children: /* @__PURE__ */ X(
|
|
221
|
+
children: /* @__PURE__ */ X(ne, {
|
|
222
222
|
value: f,
|
|
223
|
-
onChange:
|
|
223
|
+
onChange: W,
|
|
224
224
|
placeholder: w.searchPlaceholder,
|
|
225
225
|
clearLabel: w.clearSearchLabel,
|
|
226
226
|
"aria-label": w.searchAriaLabel,
|
|
227
|
-
size:
|
|
227
|
+
size: B ? C.Standard : C.Large
|
|
228
228
|
})
|
|
229
229
|
}), w.sortOptions.length > 0 && /* @__PURE__ */ X("div", {
|
|
230
230
|
role: "group",
|
|
231
231
|
"aria-label": w.sortLabel,
|
|
232
232
|
className: "shrink-0",
|
|
233
233
|
children: /* @__PURE__ */ X(_, {
|
|
234
|
-
items:
|
|
235
|
-
label:
|
|
234
|
+
items: ce,
|
|
235
|
+
label: se,
|
|
236
236
|
variant: v.Primary,
|
|
237
237
|
appearance: g.Ghost,
|
|
238
|
-
size:
|
|
239
|
-
iconBefore: /* @__PURE__ */ X(
|
|
240
|
-
size:
|
|
238
|
+
size: B ? C.Small : C.Standard,
|
|
239
|
+
iconBefore: /* @__PURE__ */ X(V, {
|
|
240
|
+
size: B ? b.SM : b.MD,
|
|
241
241
|
"aria-hidden": !0,
|
|
242
242
|
stroke: x
|
|
243
243
|
}),
|
|
@@ -245,31 +245,31 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
245
245
|
})
|
|
246
246
|
})]
|
|
247
247
|
}),
|
|
248
|
-
/* @__PURE__ */ X(
|
|
248
|
+
/* @__PURE__ */ X(P, {
|
|
249
249
|
visuallyHidden: !0,
|
|
250
|
-
as:
|
|
251
|
-
children:
|
|
250
|
+
as: F.Span,
|
|
251
|
+
children: le()
|
|
252
252
|
}),
|
|
253
253
|
/* @__PURE__ */ Z("div", {
|
|
254
254
|
className: "flex w-full min-w-0 flex-1 flex-col items-center gap-4 px-4 pb-20 desktop:gap-5 desktop:px-8 desktop:pt-6 desktop:pb-8",
|
|
255
|
-
children: [
|
|
255
|
+
children: [H && !t && !n && !ae && /* @__PURE__ */ Z("div", {
|
|
256
256
|
className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
|
|
257
257
|
children: [/* @__PURE__ */ X("p", {
|
|
258
|
-
className: d(
|
|
258
|
+
className: d(j, Ae.subtitle),
|
|
259
259
|
children: w.incompleteLabel
|
|
260
|
-
}), /* @__PURE__ */ X(
|
|
260
|
+
}), /* @__PURE__ */ X(O, {
|
|
261
261
|
label: w.retryLabel,
|
|
262
262
|
onClick: i
|
|
263
263
|
})]
|
|
264
264
|
}), /* @__PURE__ */ X("div", {
|
|
265
265
|
className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", G && "flex-1 justify-center"),
|
|
266
|
-
children:
|
|
266
|
+
children: de()
|
|
267
267
|
})]
|
|
268
268
|
})
|
|
269
269
|
]
|
|
270
|
-
}),
|
|
270
|
+
}), B && o && /* @__PURE__ */ X(h, {
|
|
271
271
|
variant: v.Primary,
|
|
272
|
-
iconBefore: /* @__PURE__ */ X(
|
|
272
|
+
iconBefore: /* @__PURE__ */ X(oe, {
|
|
273
273
|
size: b.LG,
|
|
274
274
|
"aria-hidden": !0,
|
|
275
275
|
stroke: x
|
|
@@ -351,38 +351,38 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
351
351
|
dropZone: "_dropZone_ub3na_11",
|
|
352
352
|
label: "_label_ub3na_15",
|
|
353
353
|
link: "_link_ub3na_19"
|
|
354
|
-
}, et =
|
|
355
|
-
let
|
|
354
|
+
}, et = de(async () => ({ default: (await ve()).MarkdownEditor })), tt = (e) => `Preview ${e}`, nt = ({ values: e, errors: r, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: l, selectedContextFileId: u, allowedExtensions: p, maxFileBytes: h, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: S, onSubmit: C, isSubmitting: w = !1, labels: D, markdownEditorTheme: O, className: k, styles: A }) => {
|
|
355
|
+
let N = q(), L = q(), R = q(), ee = q(), te = pe(null), ne = f(), [V, re] = Y(!1), [ie, H] = Y([]), [ae, U] = Y(""), oe = m({
|
|
356
356
|
value: e.instructions,
|
|
357
357
|
onChange: (e) => i("instructions", e),
|
|
358
358
|
onRefine: v,
|
|
359
359
|
disabled: w
|
|
360
|
-
}),
|
|
360
|
+
}), se = oe.isPending, ce = He(e.name), W = r.name ?? (V && ce != null ? D.nameErrors[ce] : void 0), le = ce != null || w || se;
|
|
361
361
|
fe(() => {
|
|
362
|
-
r.name &&
|
|
362
|
+
r.name && te.current?.focus();
|
|
363
363
|
}, [r.name]);
|
|
364
|
-
let
|
|
364
|
+
let de = J(() => p.map((e) => `.${e}`).join(","), [p]), G = (e) => {
|
|
365
365
|
if (e.length === 0) return;
|
|
366
366
|
let { accepted: t, rejected: n } = Ze(e, a, {
|
|
367
367
|
allowedExtensions: p,
|
|
368
368
|
maxFileBytes: h,
|
|
369
369
|
maxTotalBytes: g
|
|
370
370
|
});
|
|
371
|
-
|
|
372
|
-
}, { isDragActive: K, handlers: me } = Pe(G), ve =
|
|
371
|
+
H(n), t.length > 0 && o([...a, ...t]), U([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
|
|
372
|
+
}, { isDragActive: K, handlers: me } = Pe(G), ve = D.openFileLabel ?? tt, ye = (e) => {
|
|
373
373
|
let t = a.find((t) => t.id === e);
|
|
374
|
-
o(a.filter((t) => t.id !== e)),
|
|
374
|
+
o(a.filter((t) => t.id !== e)), H([]), t && U(D.fileRemovedStatus(t.name));
|
|
375
375
|
}, be = async (e) => {
|
|
376
376
|
if (e.preventDefault(), e.stopPropagation(), _) try {
|
|
377
377
|
let e = await _();
|
|
378
378
|
e && G(e);
|
|
379
379
|
} catch {}
|
|
380
380
|
}, xe = () => {
|
|
381
|
-
|
|
382
|
-
}, { colors: Se, typography: Ce } =
|
|
381
|
+
le || C();
|
|
382
|
+
}, { colors: Se, typography: Ce } = A ?? {}, we = Ce?.titleClassName ?? "dial-h1-text", Te = d(Ce?.labelClassName ?? "dial-tiny-semi-text", $e.label), Ee = Ce?.helperClassName ?? "dial-tiny-text", Q = c({
|
|
383
383
|
"--pcf-label-text": Se?.labelText,
|
|
384
384
|
"--pcf-link-text": Se?.linkText
|
|
385
|
-
}), De =
|
|
385
|
+
}), De = D.refinement, Oe = r.context, ke = [...ie.map(({ name: e, reason: t }) => D.fileRejections[t](e)), Oe].filter(Boolean).join("\n"), Ae = D.dropZoneLabel({
|
|
386
386
|
fromDevice: /* @__PURE__ */ X("span", { className: $e.link }),
|
|
387
387
|
fileManager: _ ? /* @__PURE__ */ X("button", {
|
|
388
388
|
type: "button",
|
|
@@ -392,31 +392,31 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
392
392
|
}) : void 0
|
|
393
393
|
});
|
|
394
394
|
return /* @__PURE__ */ Z("div", {
|
|
395
|
-
className: d("relative flex h-full min-h-0 w-full",
|
|
395
|
+
className: d("relative flex h-full min-h-0 w-full", k),
|
|
396
396
|
...me,
|
|
397
397
|
children: [
|
|
398
398
|
/* @__PURE__ */ X(ge, {
|
|
399
399
|
isVisible: K,
|
|
400
400
|
labels: {
|
|
401
|
-
title:
|
|
402
|
-
subtitle:
|
|
401
|
+
title: D.dropOverlayTitle,
|
|
402
|
+
subtitle: D.dropOverlaySubtitle
|
|
403
403
|
}
|
|
404
404
|
}),
|
|
405
405
|
/* @__PURE__ */ X(_e, {
|
|
406
406
|
labels: {
|
|
407
|
-
title:
|
|
408
|
-
backButtonLabel:
|
|
409
|
-
cancelButtonLabel:
|
|
410
|
-
submitButtonLabel:
|
|
411
|
-
submittingLabel:
|
|
407
|
+
title: D.title,
|
|
408
|
+
backButtonLabel: D.backLabel,
|
|
409
|
+
cancelButtonLabel: D.cancelLabel,
|
|
410
|
+
submitButtonLabel: D.createLabel,
|
|
411
|
+
submittingLabel: D.submittingLabel ?? D.createLabel
|
|
412
412
|
},
|
|
413
413
|
onBack: y,
|
|
414
414
|
onCancel: S,
|
|
415
415
|
onSubmit: xe,
|
|
416
416
|
isCancelDisabled: w,
|
|
417
|
-
isSubmitDisabled:
|
|
417
|
+
isSubmitDisabled: le,
|
|
418
418
|
isSubmitting: w,
|
|
419
|
-
backIcon: /* @__PURE__ */ X(
|
|
419
|
+
backIcon: /* @__PURE__ */ X(B, {
|
|
420
420
|
size: b.LG,
|
|
421
421
|
stroke: x,
|
|
422
422
|
"aria-hidden": !0,
|
|
@@ -436,83 +436,83 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
436
436
|
/* @__PURE__ */ Z("div", {
|
|
437
437
|
className: "flex flex-col gap-1",
|
|
438
438
|
children: [
|
|
439
|
-
/* @__PURE__ */ X(
|
|
440
|
-
id:
|
|
441
|
-
inputRef:
|
|
439
|
+
/* @__PURE__ */ X(j, {
|
|
440
|
+
id: N,
|
|
441
|
+
inputRef: te,
|
|
442
442
|
value: e.name,
|
|
443
443
|
onChange: (e) => i("name", e ?? ""),
|
|
444
|
-
onBlur: () =>
|
|
445
|
-
placeholder:
|
|
444
|
+
onBlur: () => re(!0),
|
|
445
|
+
placeholder: D.namePlaceholder,
|
|
446
446
|
labelProps: {
|
|
447
|
-
label:
|
|
447
|
+
label: D.nameLabel,
|
|
448
448
|
required: !0
|
|
449
449
|
},
|
|
450
450
|
required: !0,
|
|
451
451
|
"aria-required": !0,
|
|
452
|
-
invalid: !!
|
|
453
|
-
"aria-invalid": !!
|
|
454
|
-
"aria-describedby":
|
|
452
|
+
invalid: !!W,
|
|
453
|
+
"aria-invalid": !!W,
|
|
454
|
+
"aria-describedby": W ? L : void 0
|
|
455
455
|
}),
|
|
456
456
|
/* @__PURE__ */ X(T, {
|
|
457
|
-
announce:
|
|
458
|
-
id:
|
|
457
|
+
announce: I.Assertive,
|
|
458
|
+
id: L,
|
|
459
459
|
className: Ee,
|
|
460
460
|
text: r.name ?? ""
|
|
461
461
|
}),
|
|
462
|
-
|
|
463
|
-
id:
|
|
462
|
+
W && !r.name && /* @__PURE__ */ X(T, {
|
|
463
|
+
id: L,
|
|
464
464
|
className: Ee,
|
|
465
|
-
text:
|
|
465
|
+
text: W
|
|
466
466
|
})
|
|
467
467
|
]
|
|
468
468
|
}),
|
|
469
469
|
/* @__PURE__ */ X(s, {
|
|
470
470
|
isEnabled: !!v,
|
|
471
|
-
fieldId:
|
|
472
|
-
label:
|
|
471
|
+
fieldId: R,
|
|
472
|
+
label: D.instructionsLabel,
|
|
473
473
|
labelClassName: Te,
|
|
474
474
|
labels: De,
|
|
475
|
-
refinement:
|
|
476
|
-
disabled: w ||
|
|
475
|
+
refinement: oe,
|
|
476
|
+
disabled: w || se,
|
|
477
477
|
children: /* @__PURE__ */ Z("div", {
|
|
478
478
|
className: "flex flex-1 flex-col gap-2",
|
|
479
|
-
children: [!v && /* @__PURE__ */ X(
|
|
480
|
-
htmlFor:
|
|
479
|
+
children: [!v && /* @__PURE__ */ X(M, {
|
|
480
|
+
htmlFor: R,
|
|
481
481
|
className: Te,
|
|
482
|
-
label:
|
|
482
|
+
label: D.instructionsLabel
|
|
483
483
|
}), /* @__PURE__ */ X("div", {
|
|
484
|
-
ref:
|
|
484
|
+
ref: ne,
|
|
485
485
|
className: d("w-full", t, n),
|
|
486
|
-
children: /* @__PURE__ */ X(
|
|
487
|
-
fallback: /* @__PURE__ */ X(
|
|
486
|
+
children: /* @__PURE__ */ X(ue, {
|
|
487
|
+
fallback: /* @__PURE__ */ X(z, {}),
|
|
488
488
|
children: /* @__PURE__ */ X(et, {
|
|
489
|
-
id:
|
|
489
|
+
id: R,
|
|
490
490
|
value: e.instructions,
|
|
491
491
|
onChange: (e) => {
|
|
492
|
-
|
|
492
|
+
oe.reset(), i("instructions", e);
|
|
493
493
|
},
|
|
494
494
|
height: 176,
|
|
495
|
-
theme:
|
|
496
|
-
placeholder:
|
|
495
|
+
theme: O,
|
|
496
|
+
placeholder: D.instructionsPlaceholder
|
|
497
497
|
})
|
|
498
498
|
})
|
|
499
499
|
})]
|
|
500
500
|
})
|
|
501
501
|
}),
|
|
502
502
|
/* @__PURE__ */ Z("section", {
|
|
503
|
-
"aria-labelledby":
|
|
503
|
+
"aria-labelledby": ee,
|
|
504
504
|
className: "flex flex-col gap-2",
|
|
505
505
|
children: [
|
|
506
506
|
/* @__PURE__ */ X("h2", {
|
|
507
|
-
id:
|
|
507
|
+
id: ee,
|
|
508
508
|
className: Te,
|
|
509
|
-
children:
|
|
509
|
+
children: D.contextLabel
|
|
510
510
|
}),
|
|
511
|
-
/* @__PURE__ */ X(
|
|
511
|
+
/* @__PURE__ */ X(E, {
|
|
512
512
|
label: Ae,
|
|
513
|
-
ariaLabel:
|
|
514
|
-
description:
|
|
515
|
-
accept:
|
|
513
|
+
ariaLabel: D.dropZoneAriaLabel,
|
|
514
|
+
description: D.dropZoneHint,
|
|
515
|
+
accept: de,
|
|
516
516
|
multiple: !0,
|
|
517
517
|
disabled: w,
|
|
518
518
|
onChange: G,
|
|
@@ -520,9 +520,9 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
520
520
|
errorText: ke || void 0,
|
|
521
521
|
className: $e.dropZone
|
|
522
522
|
}),
|
|
523
|
-
/* @__PURE__ */ X(
|
|
523
|
+
/* @__PURE__ */ X(P, {
|
|
524
524
|
visuallyHidden: !0,
|
|
525
|
-
politeness:
|
|
525
|
+
politeness: I.Assertive,
|
|
526
526
|
children: Oe
|
|
527
527
|
}),
|
|
528
528
|
a.length > 0 && /* @__PURE__ */ X("ul", {
|
|
@@ -535,7 +535,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
535
535
|
isSelected: l == null ? void 0 : e.id === u,
|
|
536
536
|
onRemove: ye,
|
|
537
537
|
labels: {
|
|
538
|
-
removeLabel:
|
|
538
|
+
removeLabel: D.removeFileLabel(e.name),
|
|
539
539
|
clickLabel: ve(e.name)
|
|
540
540
|
}
|
|
541
541
|
})
|
|
@@ -546,14 +546,14 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
546
546
|
]
|
|
547
547
|
})
|
|
548
548
|
}),
|
|
549
|
-
/* @__PURE__ */ X(
|
|
549
|
+
/* @__PURE__ */ X(P, {
|
|
550
550
|
visuallyHidden: !0,
|
|
551
|
-
as:
|
|
552
|
-
children: w ?
|
|
551
|
+
as: F.Span,
|
|
552
|
+
children: w ? D.creatingStatus : ae
|
|
553
553
|
})
|
|
554
554
|
]
|
|
555
555
|
});
|
|
556
|
-
}, rt =
|
|
556
|
+
}, rt = le("outline", "pin-off", "PinOff", [
|
|
557
557
|
["path", {
|
|
558
558
|
d: "M3 3l18 18",
|
|
559
559
|
key: "svg-0"
|
|
@@ -595,15 +595,15 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
595
595
|
contentType: e.contentType,
|
|
596
596
|
type: l(e.contentType),
|
|
597
597
|
status: o.Idle
|
|
598
|
-
}), at = G(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry:
|
|
599
|
-
let { colors:
|
|
600
|
-
"--pv-bg":
|
|
601
|
-
"--pv-border":
|
|
602
|
-
"--pv-heading-text":
|
|
603
|
-
"--pv-body-text":
|
|
604
|
-
"--pv-secondary-text":
|
|
605
|
-
}),
|
|
606
|
-
let e = d("mb-1 mt-3 first:mt-0",
|
|
598
|
+
}), at = G(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: D, mainContent: A, mainContentLabel: j = "Project content", labels: M, styles: N }) => {
|
|
599
|
+
let { colors: I, typography: L } = N ?? {}, ee = L?.titleClassName ?? "dial-h2-text", te = L?.panelTitleClassName ?? "dial-body-semi-text", V = L?.sectionTitleClassName ?? "dial-tiny-text", U = L?.bodyClassName ?? "dial-small-text", oe = L?.helperClassName ?? "dial-tiny-text", le = L?.instructionsHeadingClassName ?? "dial-small-semi-text", ue = c({
|
|
600
|
+
"--pv-bg": I?.background,
|
|
601
|
+
"--pv-border": I?.border,
|
|
602
|
+
"--pv-heading-text": I?.headingText,
|
|
603
|
+
"--pv-body-text": I?.bodyText,
|
|
604
|
+
"--pv-secondary-text": I?.secondaryText
|
|
605
|
+
}), de = J(() => e?.contextFiles ?? [], [e]), G = J(() => Qe(de, l), [de, l]), K = l.trim(), fe = q(), pe = J(() => {
|
|
606
|
+
let e = d("mb-1 mt-3 first:mt-0", le);
|
|
607
607
|
return {
|
|
608
608
|
h1: e,
|
|
609
609
|
h2: e,
|
|
@@ -611,11 +611,11 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
611
611
|
h4: e,
|
|
612
612
|
h5: e,
|
|
613
613
|
h6: e,
|
|
614
|
-
p:
|
|
615
|
-
ul:
|
|
616
|
-
ol:
|
|
614
|
+
p: U,
|
|
615
|
+
ul: U,
|
|
616
|
+
ol: U
|
|
617
617
|
};
|
|
618
|
-
}, [
|
|
618
|
+
}, [U, le]), Y = (e) => /* @__PURE__ */ X(e, {
|
|
619
619
|
size: b.SM,
|
|
620
620
|
"aria-hidden": !0,
|
|
621
621
|
stroke: x
|
|
@@ -623,28 +623,28 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
623
623
|
let t = [];
|
|
624
624
|
return e && m && t.push({
|
|
625
625
|
key: "publish",
|
|
626
|
-
label:
|
|
627
|
-
icon: Y(
|
|
626
|
+
label: M.publishLabel,
|
|
627
|
+
icon: Y(W),
|
|
628
628
|
onClick: m
|
|
629
629
|
}), e && h && t.push({
|
|
630
630
|
key: "edit",
|
|
631
|
-
label:
|
|
632
|
-
icon: Y(
|
|
631
|
+
label: M.editLabel,
|
|
632
|
+
icon: Y(H),
|
|
633
633
|
onClick: h
|
|
634
634
|
}), g && t.push({
|
|
635
635
|
key: "share",
|
|
636
|
-
label:
|
|
637
|
-
icon: Y(
|
|
636
|
+
label: M.shareLabel,
|
|
637
|
+
icon: Y(se),
|
|
638
638
|
onClick: g
|
|
639
639
|
}), t.push({
|
|
640
640
|
key: "download",
|
|
641
|
-
label:
|
|
642
|
-
icon: Y(
|
|
641
|
+
label: M.downloadLabel,
|
|
642
|
+
icon: Y(ie),
|
|
643
643
|
onClick: v
|
|
644
644
|
}), _ && t.push({
|
|
645
645
|
key: "delete",
|
|
646
|
-
label:
|
|
647
|
-
icon: Y(
|
|
646
|
+
label: M.deleteLabel,
|
|
647
|
+
icon: Y(ce),
|
|
648
648
|
danger: !0,
|
|
649
649
|
onClick: _
|
|
650
650
|
}), t;
|
|
@@ -654,62 +654,62 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
654
654
|
items: ge(e),
|
|
655
655
|
matchReferenceWidth: !1,
|
|
656
656
|
listClassName: "w-[200px]",
|
|
657
|
-
children: /* @__PURE__ */ X(
|
|
658
|
-
icon: /* @__PURE__ */ X(
|
|
657
|
+
children: /* @__PURE__ */ X(k, {
|
|
658
|
+
icon: /* @__PURE__ */ X(re, {
|
|
659
659
|
size: b.MD,
|
|
660
660
|
"aria-hidden": !0,
|
|
661
661
|
stroke: x
|
|
662
662
|
}),
|
|
663
|
-
"aria-label":
|
|
663
|
+
"aria-label": M.moreActionsLabel
|
|
664
664
|
})
|
|
665
665
|
})
|
|
666
666
|
});
|
|
667
667
|
return t || n || i || e == null ? /* @__PURE__ */ X("div", {
|
|
668
|
-
style:
|
|
668
|
+
style: ue,
|
|
669
669
|
className: d("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
|
|
670
|
-
children: t ? /* @__PURE__ */ X(
|
|
670
|
+
children: t ? /* @__PURE__ */ X(z, {}) : n ? /* @__PURE__ */ Z("div", {
|
|
671
671
|
className: "flex flex-col items-center gap-3",
|
|
672
672
|
children: [/* @__PURE__ */ X("p", {
|
|
673
673
|
role: "status",
|
|
674
|
-
className: d(
|
|
675
|
-
children:
|
|
676
|
-
}), /* @__PURE__ */ X(
|
|
677
|
-
label:
|
|
678
|
-
onClick:
|
|
674
|
+
className: d(U, $.body),
|
|
675
|
+
children: M.errorLabel
|
|
676
|
+
}), /* @__PURE__ */ X(O, {
|
|
677
|
+
label: M.retryLabel,
|
|
678
|
+
onClick: E
|
|
679
679
|
})]
|
|
680
680
|
}) : /* @__PURE__ */ Z("div", {
|
|
681
681
|
className: "flex flex-col items-center gap-3",
|
|
682
682
|
children: [/* @__PURE__ */ X("p", {
|
|
683
|
-
className: d(
|
|
684
|
-
children:
|
|
685
|
-
}), /* @__PURE__ */ X(
|
|
686
|
-
label:
|
|
687
|
-
onClick:
|
|
683
|
+
className: d(U, $.body),
|
|
684
|
+
children: M.notFoundLabel
|
|
685
|
+
}), /* @__PURE__ */ X(O, {
|
|
686
|
+
label: M.browseProjectsLabel,
|
|
687
|
+
onClick: D
|
|
688
688
|
})]
|
|
689
689
|
})
|
|
690
690
|
}) : /* @__PURE__ */ Z("div", {
|
|
691
|
-
style:
|
|
691
|
+
style: ue,
|
|
692
692
|
className: d("flex h-full w-full min-w-0 flex-col overflow-y-auto", $.container),
|
|
693
693
|
children: [/* @__PURE__ */ Z("header", {
|
|
694
694
|
className: d("flex min-w-0 items-center gap-2 px-4 py-3 desktop:px-8", $.header),
|
|
695
695
|
children: [
|
|
696
|
-
/* @__PURE__ */ X(
|
|
697
|
-
icon: /* @__PURE__ */ X(
|
|
696
|
+
/* @__PURE__ */ X(k, {
|
|
697
|
+
icon: /* @__PURE__ */ X(B, {
|
|
698
698
|
size: b.LG,
|
|
699
699
|
className: "rtl:scale-x-[-1]",
|
|
700
700
|
"aria-hidden": !0,
|
|
701
701
|
stroke: x
|
|
702
702
|
}),
|
|
703
|
-
"aria-label":
|
|
703
|
+
"aria-label": M.backLabel,
|
|
704
704
|
onClick: f
|
|
705
705
|
}),
|
|
706
706
|
/* @__PURE__ */ X("h1", {
|
|
707
|
-
className: d("min-w-0 flex-1",
|
|
707
|
+
className: d("min-w-0 flex-1", ee, $.title),
|
|
708
708
|
children: /* @__PURE__ */ X(w, { text: e.name })
|
|
709
709
|
}),
|
|
710
|
-
/* @__PURE__ */ X(
|
|
711
|
-
label: o ?
|
|
712
|
-
iconBefore: X(o ? rt :
|
|
710
|
+
/* @__PURE__ */ X(O, {
|
|
711
|
+
label: o ? M.unpinLabel : M.pinLabel,
|
|
712
|
+
iconBefore: X(o ? rt : ae, {
|
|
713
713
|
size: b.MD,
|
|
714
714
|
"aria-hidden": !0,
|
|
715
715
|
stroke: x
|
|
@@ -720,9 +720,9 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
720
720
|
},
|
|
721
721
|
className: "shrink-0"
|
|
722
722
|
}),
|
|
723
|
-
m && /* @__PURE__ */ X(
|
|
724
|
-
label:
|
|
725
|
-
iconBefore: /* @__PURE__ */ X(
|
|
723
|
+
m && /* @__PURE__ */ X(R, {
|
|
724
|
+
label: M.publishLabel,
|
|
725
|
+
iconBefore: /* @__PURE__ */ X(W, {
|
|
726
726
|
size: b.MD,
|
|
727
727
|
"aria-hidden": !0,
|
|
728
728
|
stroke: x
|
|
@@ -730,9 +730,9 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
730
730
|
onClick: m,
|
|
731
731
|
className: "hidden shrink-0 desktop:inline-flex"
|
|
732
732
|
}),
|
|
733
|
-
h && /* @__PURE__ */ X(
|
|
734
|
-
label:
|
|
735
|
-
iconBefore: /* @__PURE__ */ X(
|
|
733
|
+
h && /* @__PURE__ */ X(R, {
|
|
734
|
+
label: M.editLabel,
|
|
735
|
+
iconBefore: /* @__PURE__ */ X(H, {
|
|
736
736
|
size: b.MD,
|
|
737
737
|
"aria-hidden": !0,
|
|
738
738
|
stroke: x
|
|
@@ -744,37 +744,37 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
744
744
|
_e(!0, "desktop:hidden")
|
|
745
745
|
]
|
|
746
746
|
}), /* @__PURE__ */ Z("div", {
|
|
747
|
-
className: d("flex min-w-0 flex-1 flex-col", !T && "desktop:flex-row",
|
|
748
|
-
children: [
|
|
749
|
-
"aria-label":
|
|
747
|
+
className: d("flex min-w-0 flex-1 flex-col", !T && "desktop:flex-row", A == null && !T && "desktop:justify-end"),
|
|
748
|
+
children: [A != null && /* @__PURE__ */ X("section", {
|
|
749
|
+
"aria-label": j,
|
|
750
750
|
className: "flex min-w-0 flex-1 flex-col gap-6 px-4 py-6 desktop:px-8",
|
|
751
|
-
children:
|
|
751
|
+
children: A
|
|
752
752
|
}), /* @__PURE__ */ Z("aside", {
|
|
753
753
|
"aria-labelledby": fe,
|
|
754
754
|
className: d("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", !T && "desktop:w-[488px] desktop:shrink-0 desktop:border-s desktop:border-t-0", $.panel),
|
|
755
755
|
children: [
|
|
756
756
|
/* @__PURE__ */ X("h2", {
|
|
757
757
|
id: fe,
|
|
758
|
-
className: d(
|
|
759
|
-
children:
|
|
758
|
+
className: d(te, $.title),
|
|
759
|
+
children: M.detailsLabel
|
|
760
760
|
}),
|
|
761
761
|
e.description !== "" && /* @__PURE__ */ Z("section", {
|
|
762
762
|
className: "flex min-w-0 flex-col gap-1",
|
|
763
763
|
children: [/* @__PURE__ */ X("h3", {
|
|
764
|
-
className: d(
|
|
765
|
-
children:
|
|
764
|
+
className: d(V, $.secondary),
|
|
765
|
+
children: M.descriptionLabel
|
|
766
766
|
}), /* @__PURE__ */ X("p", {
|
|
767
|
-
className: d("wrap-break-word whitespace-pre-line",
|
|
767
|
+
className: d("wrap-break-word whitespace-pre-line", U, $.body),
|
|
768
768
|
children: e.description
|
|
769
769
|
})]
|
|
770
770
|
}),
|
|
771
771
|
e.instructions !== "" && /* @__PURE__ */ Z("section", {
|
|
772
772
|
className: "flex min-w-0 flex-col gap-1",
|
|
773
773
|
children: [/* @__PURE__ */ X("h3", {
|
|
774
|
-
className: d(
|
|
775
|
-
children:
|
|
774
|
+
className: d(V, $.secondary),
|
|
775
|
+
children: M.instructionsLabel
|
|
776
776
|
}), /* @__PURE__ */ X("div", {
|
|
777
|
-
className: d("min-w-0 wrap-break-word",
|
|
777
|
+
className: d("min-w-0 wrap-break-word", U, $.body),
|
|
778
778
|
children: /* @__PURE__ */ X(r, {
|
|
779
779
|
content: e.instructions,
|
|
780
780
|
classNames: pe
|
|
@@ -784,22 +784,22 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
784
784
|
/* @__PURE__ */ Z("section", {
|
|
785
785
|
className: "flex min-w-0 flex-col gap-2",
|
|
786
786
|
children: [/* @__PURE__ */ X("h3", {
|
|
787
|
-
className: d(
|
|
788
|
-
children:
|
|
789
|
-
}),
|
|
787
|
+
className: d(V, $.secondary),
|
|
788
|
+
children: M.contextLabel
|
|
789
|
+
}), de.length === 0 ? /* @__PURE__ */ X(a, { label: M.emptyContextLabel }) : /* @__PURE__ */ Z(me, { children: [
|
|
790
790
|
/* @__PURE__ */ X("div", {
|
|
791
791
|
role: "search",
|
|
792
|
-
children: /* @__PURE__ */ X(
|
|
792
|
+
children: /* @__PURE__ */ X(ne, {
|
|
793
793
|
value: l,
|
|
794
794
|
onChange: (e) => u(e ?? ""),
|
|
795
|
-
placeholder:
|
|
796
|
-
clearLabel:
|
|
797
|
-
"aria-label":
|
|
795
|
+
placeholder: M.contextSearchPlaceholder,
|
|
796
|
+
clearLabel: M.clearSearchLabel,
|
|
797
|
+
"aria-label": M.contextSearchAriaLabel
|
|
798
798
|
})
|
|
799
799
|
}),
|
|
800
800
|
G.length === 0 ? /* @__PURE__ */ X("p", {
|
|
801
|
-
className: d(
|
|
802
|
-
children:
|
|
801
|
+
className: d(oe, $.secondary),
|
|
802
|
+
children: M.noContextMatchesLabel
|
|
803
803
|
}) : /* @__PURE__ */ X("ul", {
|
|
804
804
|
className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
|
|
805
805
|
children: G.map((e) => /* @__PURE__ */ X("li", {
|
|
@@ -809,14 +809,14 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
809
809
|
searchQuery: K,
|
|
810
810
|
onClick: y,
|
|
811
811
|
isSelected: e.name === C,
|
|
812
|
-
labels: { clickLabel:
|
|
812
|
+
labels: { clickLabel: M.openFileLabel(e.name) }
|
|
813
813
|
})
|
|
814
814
|
}, e.name))
|
|
815
815
|
}),
|
|
816
|
-
/* @__PURE__ */ X(
|
|
816
|
+
/* @__PURE__ */ X(P, {
|
|
817
817
|
visuallyHidden: !0,
|
|
818
|
-
as:
|
|
819
|
-
children: K === "" ? "" :
|
|
818
|
+
as: F.Span,
|
|
819
|
+
children: K === "" ? "" : M.contextResultCountLabel(G.length)
|
|
820
820
|
})
|
|
821
821
|
] })]
|
|
822
822
|
})
|
|
@@ -871,11 +871,11 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
871
871
|
items: f,
|
|
872
872
|
placement: "bottom-end",
|
|
873
873
|
onOpenChange: l,
|
|
874
|
-
children: /* @__PURE__ */ X(
|
|
874
|
+
children: /* @__PURE__ */ X(k, {
|
|
875
875
|
"aria-label": t.moreActionsLabel(e.title),
|
|
876
876
|
size: C.Small,
|
|
877
877
|
className: d("me-2 shrink-0", !c && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
|
|
878
|
-
icon: /* @__PURE__ */ X(
|
|
878
|
+
icon: /* @__PURE__ */ X(re, {
|
|
879
879
|
"aria-hidden": !0,
|
|
880
880
|
size: b.SM,
|
|
881
881
|
stroke: x
|
|
@@ -903,7 +903,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
903
903
|
className: "flex justify-center py-6",
|
|
904
904
|
children: [/* @__PURE__ */ X("span", {
|
|
905
905
|
"aria-hidden": !0,
|
|
906
|
-
children: /* @__PURE__ */ X(
|
|
906
|
+
children: /* @__PURE__ */ X(z, {})
|
|
907
907
|
}), /* @__PURE__ */ X("span", {
|
|
908
908
|
className: "sr-only",
|
|
909
909
|
children: p.loadingLabel
|
|
@@ -914,7 +914,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
914
914
|
children: [/* @__PURE__ */ X("p", {
|
|
915
915
|
className: d("m-0", x),
|
|
916
916
|
children: p.errorLabel
|
|
917
|
-
}), /* @__PURE__ */ X(
|
|
917
|
+
}), /* @__PURE__ */ X(O, {
|
|
918
918
|
label: p.retryLabel,
|
|
919
919
|
onClick: r
|
|
920
920
|
})]
|
|
@@ -935,164 +935,231 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
935
935
|
onRename: u,
|
|
936
936
|
onDelete: f
|
|
937
937
|
}, e.id))
|
|
938
|
-
}), i && s && /* @__PURE__ */ X(
|
|
938
|
+
}), i && s && /* @__PURE__ */ X(N, {
|
|
939
939
|
className: "self-start",
|
|
940
940
|
label: p.loadMoreLabel ?? "See more",
|
|
941
941
|
disabled: o,
|
|
942
942
|
onClick: s
|
|
943
943
|
})] })]
|
|
944
944
|
});
|
|
945
|
-
}), lt = G(({ composer: t,
|
|
946
|
-
let
|
|
947
|
-
|
|
948
|
-
}, []),
|
|
949
|
-
let e =
|
|
950
|
-
|
|
951
|
-
}, []),
|
|
952
|
-
|
|
953
|
-
let t =
|
|
945
|
+
}), lt = G(({ composer: t, outputs: n, items: r, isLoading: i = !1, hasError: a = !1, onRetry: o, hasMore: s, isLoadingMore: c, onLoadMore: l, onOpen: u, onRename: d, onDelete: f, labels: p, listTypography: m, listColors: h }) => {
|
|
946
|
+
let _ = q(), y = pe(null), [b, x] = Y(null), [S, C] = Y(""), [w, T] = Y(), [E, D] = Y(!1), [O, k] = Y(null), [A, M] = Y(!1), N = pe(null), P = K(() => {
|
|
947
|
+
N.current = document.activeElement;
|
|
948
|
+
}, []), F = K(() => {
|
|
949
|
+
let e = N.current;
|
|
950
|
+
N.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
|
|
951
|
+
}, []), I = K((e) => {
|
|
952
|
+
N.current = null, window.setTimeout(() => {
|
|
953
|
+
let t = y.current;
|
|
954
954
|
if (!t) return;
|
|
955
955
|
let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
|
|
956
956
|
r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
|
|
957
957
|
}, 0);
|
|
958
|
-
}, []),
|
|
958
|
+
}, []), L = K((e) => r.find((t) => t.id === e) ?? null, [r]);
|
|
959
959
|
fe(() => {
|
|
960
|
-
let e = (e) => e != null &&
|
|
961
|
-
|
|
960
|
+
let e = (e) => e != null && r.some((t) => t.id === e.id);
|
|
961
|
+
b && !E && !e(b) && (x(null), I(0)), O && !A && !e(O) && (k(null), I(0));
|
|
962
962
|
}, [
|
|
963
|
-
E,
|
|
964
|
-
N,
|
|
965
963
|
O,
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
964
|
+
I,
|
|
965
|
+
A,
|
|
966
|
+
E,
|
|
967
|
+
r,
|
|
968
|
+
b
|
|
969
969
|
]);
|
|
970
|
-
let
|
|
971
|
-
|
|
972
|
-
let t =
|
|
973
|
-
|
|
974
|
-
}, [
|
|
975
|
-
|
|
976
|
-
}, [
|
|
977
|
-
|
|
978
|
-
}, [
|
|
979
|
-
|
|
980
|
-
}, [
|
|
981
|
-
if (!
|
|
982
|
-
let e =
|
|
983
|
-
if (!e)
|
|
970
|
+
let R = K((e) => {
|
|
971
|
+
P();
|
|
972
|
+
let t = L(e);
|
|
973
|
+
x(t), C(t?.title ?? ""), T(void 0);
|
|
974
|
+
}, [L, P]), ne = K((e) => {
|
|
975
|
+
P(), k(L(e));
|
|
976
|
+
}, [L, P]), z = K(() => {
|
|
977
|
+
E || (x(null), F());
|
|
978
|
+
}, [E, F]), B = K(() => {
|
|
979
|
+
A || (k(null), F());
|
|
980
|
+
}, [A, F]), V = K(async () => {
|
|
981
|
+
if (!b || !d || E) return;
|
|
982
|
+
let e = S.trim();
|
|
983
|
+
if (!e) T(p.renameEmptyError);
|
|
984
984
|
else {
|
|
985
|
-
|
|
985
|
+
D(!0);
|
|
986
986
|
try {
|
|
987
|
-
await
|
|
987
|
+
await d(b.id, e), x(null), F();
|
|
988
988
|
} catch {} finally {
|
|
989
|
-
|
|
989
|
+
D(!1);
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
}, [
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
]),
|
|
1000
|
-
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(),
|
|
1001
|
-
}, [
|
|
1002
|
-
if (!
|
|
1003
|
-
let e =
|
|
1004
|
-
|
|
993
|
+
E,
|
|
994
|
+
p.renameEmptyError,
|
|
995
|
+
d,
|
|
996
|
+
b,
|
|
997
|
+
S,
|
|
998
|
+
F
|
|
999
|
+
]), re = K((e) => {
|
|
1000
|
+
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), V());
|
|
1001
|
+
}, [V]), ie = K(async () => {
|
|
1002
|
+
if (!O || !f) return;
|
|
1003
|
+
let e = r.findIndex((e) => e.id === O.id);
|
|
1004
|
+
M(!0);
|
|
1005
1005
|
try {
|
|
1006
|
-
await
|
|
1006
|
+
await f(O.id), k(null), I(Math.max(e, 0));
|
|
1007
1007
|
} catch {} finally {
|
|
1008
|
-
|
|
1008
|
+
M(!1);
|
|
1009
1009
|
}
|
|
1010
1010
|
}, [
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
]),
|
|
1016
|
-
label:
|
|
1011
|
+
O,
|
|
1012
|
+
I,
|
|
1013
|
+
r,
|
|
1014
|
+
f
|
|
1015
|
+
]), H = J(() => [{
|
|
1016
|
+
label: p.renameCancelLabel ?? "Cancel",
|
|
1017
1017
|
variant: v.Primary,
|
|
1018
1018
|
appearance: g.Ghost,
|
|
1019
|
-
disabled:
|
|
1020
|
-
onClick:
|
|
1019
|
+
disabled: E,
|
|
1020
|
+
onClick: z
|
|
1021
1021
|
}, {
|
|
1022
|
-
label:
|
|
1022
|
+
label: p.renameSaveLabel,
|
|
1023
1023
|
variant: v.Primary,
|
|
1024
|
-
disabled:
|
|
1024
|
+
disabled: E,
|
|
1025
1025
|
onClick: () => {
|
|
1026
|
-
|
|
1026
|
+
V();
|
|
1027
1027
|
}
|
|
1028
1028
|
}], [
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1029
|
+
z,
|
|
1030
|
+
V,
|
|
1031
|
+
E,
|
|
1032
|
+
p.renameCancelLabel,
|
|
1033
|
+
p.renameSaveLabel
|
|
1034
1034
|
]);
|
|
1035
1035
|
return /* @__PURE__ */ Z(me, { children: [
|
|
1036
1036
|
t,
|
|
1037
|
+
n,
|
|
1037
1038
|
/* @__PURE__ */ X("div", {
|
|
1038
|
-
ref:
|
|
1039
|
+
ref: y,
|
|
1039
1040
|
className: "contents",
|
|
1040
1041
|
children: /* @__PURE__ */ X(ct, {
|
|
1041
|
-
items:
|
|
1042
|
-
isLoading:
|
|
1043
|
-
hasError:
|
|
1044
|
-
onRetry:
|
|
1045
|
-
hasMore:
|
|
1046
|
-
isLoadingMore:
|
|
1047
|
-
onLoadMore:
|
|
1048
|
-
onOpen:
|
|
1049
|
-
onRename:
|
|
1050
|
-
onDelete:
|
|
1051
|
-
labels:
|
|
1052
|
-
typography:
|
|
1053
|
-
colors:
|
|
1042
|
+
items: r,
|
|
1043
|
+
isLoading: i,
|
|
1044
|
+
hasError: a,
|
|
1045
|
+
onRetry: o,
|
|
1046
|
+
hasMore: s,
|
|
1047
|
+
isLoadingMore: c,
|
|
1048
|
+
onLoadMore: l,
|
|
1049
|
+
onOpen: u,
|
|
1050
|
+
onRename: d ? R : void 0,
|
|
1051
|
+
onDelete: f ? ne : void 0,
|
|
1052
|
+
labels: p.list,
|
|
1053
|
+
typography: m,
|
|
1054
|
+
colors: h
|
|
1054
1055
|
})
|
|
1055
1056
|
}),
|
|
1056
|
-
|
|
1057
|
+
b && /* @__PURE__ */ X(ee, {
|
|
1057
1058
|
open: !0,
|
|
1058
|
-
header:
|
|
1059
|
-
size:
|
|
1060
|
-
mainButtons:
|
|
1061
|
-
onClose:
|
|
1059
|
+
header: p.renameTitle,
|
|
1060
|
+
size: te.Sm,
|
|
1061
|
+
mainButtons: H,
|
|
1062
|
+
onClose: z,
|
|
1062
1063
|
children: /* @__PURE__ */ X("div", {
|
|
1063
1064
|
className: "px-6 py-4",
|
|
1064
|
-
children: /* @__PURE__ */ X(
|
|
1065
|
-
id:
|
|
1066
|
-
value:
|
|
1067
|
-
labelProps: { label:
|
|
1068
|
-
error:
|
|
1069
|
-
disabled:
|
|
1070
|
-
onKeyDown:
|
|
1065
|
+
children: /* @__PURE__ */ X(j, {
|
|
1066
|
+
id: _,
|
|
1067
|
+
value: S,
|
|
1068
|
+
labelProps: { label: p.renameInputLabel },
|
|
1069
|
+
error: w,
|
|
1070
|
+
disabled: E,
|
|
1071
|
+
onKeyDown: re,
|
|
1071
1072
|
onChange: (e) => {
|
|
1072
|
-
|
|
1073
|
+
C(e ?? ""), T(void 0);
|
|
1073
1074
|
}
|
|
1074
1075
|
})
|
|
1075
1076
|
})
|
|
1076
1077
|
}),
|
|
1077
|
-
|
|
1078
|
+
O && /* @__PURE__ */ X(e, {
|
|
1078
1079
|
open: !0,
|
|
1079
|
-
title:
|
|
1080
|
-
names: [
|
|
1081
|
-
message:
|
|
1082
|
-
labels:
|
|
1083
|
-
isLoading:
|
|
1080
|
+
title: p.deleteTitle(O.title),
|
|
1081
|
+
names: [O.title],
|
|
1082
|
+
message: p.deleteDescription,
|
|
1083
|
+
labels: p.deleteDialog,
|
|
1084
|
+
isLoading: A,
|
|
1084
1085
|
onConfirm: () => {
|
|
1085
|
-
|
|
1086
|
+
ie();
|
|
1086
1087
|
},
|
|
1087
|
-
onClose:
|
|
1088
|
+
onClose: B
|
|
1088
1089
|
})
|
|
1089
1090
|
] });
|
|
1090
|
-
}), ut =
|
|
1091
|
+
}), ut = {
|
|
1092
|
+
title: "_title_17sbf_1",
|
|
1093
|
+
secondary: "_secondary_17sbf_5"
|
|
1094
|
+
}, dt = 6, ft = (e) => ({
|
|
1095
|
+
id: e.name,
|
|
1096
|
+
name: e.name,
|
|
1097
|
+
contentType: e.contentType,
|
|
1098
|
+
type: l(e.contentType),
|
|
1099
|
+
status: o.Idle
|
|
1100
|
+
}), pt = G(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = dt, labels: o, styles: s }) => {
|
|
1101
|
+
let l = q(), u = q(), f = pe(null), p = pe(!1), [m, h] = Y(!1), { colors: g, typography: _ } = s ?? {}, v = _?.titleClassName ?? "dial-body-semi-text", y = _?.helperClassName ?? "dial-tiny-text", b = o?.title ?? "Outputs", x = o?.errorLabel ?? "Could not load outputs", S = J(() => c({
|
|
1102
|
+
"--po-heading-text": g?.headingText,
|
|
1103
|
+
"--po-secondary-text": g?.secondaryText
|
|
1104
|
+
}), [g?.headingText, g?.secondaryText]), C = K(() => h((e) => !e), []), w = K(() => {
|
|
1105
|
+
p.current = !0, i?.();
|
|
1106
|
+
}, [i]);
|
|
1107
|
+
fe(() => {
|
|
1108
|
+
!r && p.current && (p.current = !1, f.current?.focus());
|
|
1109
|
+
}, [r]);
|
|
1110
|
+
let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), k = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, j = o?.showLessLabel ?? "Show less";
|
|
1111
|
+
return /* @__PURE__ */ Z("div", {
|
|
1112
|
+
className: "contents",
|
|
1113
|
+
style: S,
|
|
1114
|
+
children: [T && /* @__PURE__ */ Z("section", {
|
|
1115
|
+
"aria-labelledby": l,
|
|
1116
|
+
className: "flex min-w-0 flex-col gap-2 pt-3",
|
|
1117
|
+
children: [/* @__PURE__ */ Z("div", {
|
|
1118
|
+
className: "flex min-w-0 items-center justify-between gap-2",
|
|
1119
|
+
children: [/* @__PURE__ */ X("h2", {
|
|
1120
|
+
ref: f,
|
|
1121
|
+
id: l,
|
|
1122
|
+
tabIndex: -1,
|
|
1123
|
+
className: d("m-0", ut.title, v),
|
|
1124
|
+
children: b
|
|
1125
|
+
}), !r && E && /* @__PURE__ */ X(N, {
|
|
1126
|
+
label: m ? j : A,
|
|
1127
|
+
"aria-expanded": m,
|
|
1128
|
+
"aria-controls": u,
|
|
1129
|
+
onClick: C
|
|
1130
|
+
})]
|
|
1131
|
+
}), r ? /* @__PURE__ */ Z(me, { children: [/* @__PURE__ */ X("p", {
|
|
1132
|
+
"aria-hidden": !0,
|
|
1133
|
+
className: d("m-0", ut.secondary, y),
|
|
1134
|
+
children: x
|
|
1135
|
+
}), i && /* @__PURE__ */ X(O, {
|
|
1136
|
+
className: "self-start",
|
|
1137
|
+
label: o?.retryLabel ?? "Retry",
|
|
1138
|
+
onClick: w
|
|
1139
|
+
})] }) : /* @__PURE__ */ X("ul", {
|
|
1140
|
+
id: u,
|
|
1141
|
+
className: d("m-0 flex min-w-0 list-none gap-2 p-0", m ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
|
|
1142
|
+
children: D.map((e) => /* @__PURE__ */ X("li", {
|
|
1143
|
+
className: "shrink-0",
|
|
1144
|
+
children: /* @__PURE__ */ X(he, {
|
|
1145
|
+
attachment: ft(e),
|
|
1146
|
+
onClick: t,
|
|
1147
|
+
isSelected: e.name === n,
|
|
1148
|
+
labels: { clickLabel: k(e.name) }
|
|
1149
|
+
})
|
|
1150
|
+
}, e.name))
|
|
1151
|
+
})]
|
|
1152
|
+
}), /* @__PURE__ */ X(P, {
|
|
1153
|
+
visuallyHidden: !0,
|
|
1154
|
+
children: r ? x : ""
|
|
1155
|
+
})]
|
|
1156
|
+
});
|
|
1157
|
+
}), mt = G(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Z("nav", {
|
|
1091
1158
|
"aria-label": i,
|
|
1092
1159
|
className: d("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
|
|
1093
|
-
children: [/* @__PURE__ */ X(
|
|
1160
|
+
children: [/* @__PURE__ */ X(k, {
|
|
1094
1161
|
"aria-label": i,
|
|
1095
|
-
icon: /* @__PURE__ */ X(
|
|
1162
|
+
icon: /* @__PURE__ */ X(B, {
|
|
1096
1163
|
"aria-hidden": !0,
|
|
1097
1164
|
size: b.MD,
|
|
1098
1165
|
stroke: x,
|
|
@@ -1110,4 +1177,4 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1110
1177
|
})]
|
|
1111
1178
|
}));
|
|
1112
1179
|
//#endregion
|
|
1113
|
-
export { Fe as ContextFileRejection, Le as PROJECT_NAME_MAX_BYTES,
|
|
1180
|
+
export { Fe as ContextFileRejection, Le as PROJECT_NAME_MAX_BYTES, mt as ProjectChatHeader, ct as ProjectConversationList, lt as ProjectConversationsPanel, nt as ProjectCreateForm, Ie as ProjectNameError, pt as ProjectOutputs, Me as ProjectSource, at as ProjectView, je as Projects, ye as ProjectsSortKey, Ze as checkContextFiles, Qe as filterContextFileItems, Ke as getContextFilesSize, We as isStoredContextFile, He as validateProjectName };
|