@epam/ai-dial-projects 1.3.0-dev.342 → 1.3.0-dev.348
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/ProjectCreateForm/ProjectCreateForm.d.ts.map +1 -1
- package/index.js +543 -533
- package/models/project-create-form-props.d.ts +5 -1
- package/models/project-create-form-props.d.ts.map +1 -1
- package/models/projects-props.d.ts +1 -1
- package/models/projects-props.d.ts.map +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { ActionMenu as e, DeleteConfirmationDialog as t, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as n, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as r, MarkdownRenderer as i, PROHIBITED_CONVERSATION_NAME_CHARS_RE as a, PanelEmptyState as o, RequestStatus as s, TextRefinementField as c, buildCssVars as l, getAttachmentTypeFromMime as u, inferMimeTypeFromPath as d, mergeClasses as f, useAvailableHeightCap as p, useIsMobile as m, useTextRefinement as h } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { Button as g, ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y,
|
|
3
|
-
import { IconArrowNarrowLeft as
|
|
4
|
-
import { Suspense as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { AttachmentCard as
|
|
7
|
-
import { BuilderFormActionsOrder as
|
|
8
|
-
import { LazyMarkdownEditor as
|
|
2
|
+
import { Button as g, ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y, CaptionText as b, CardShell as x, DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, EllipsisTooltip as T, ErrorText as E, FileDropzone as D, FolderPath as O, GhostButton as k, GhostIconButton as A, Highlight as j, Input as M, Label as ee, LinkButton as N, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as I, MenuItemMark as te, NeutralButton as ne, Popup as re, PopupSize as L, Search as ie, Spinner as ae } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconArrowNarrowLeft as oe, IconArrowsSort as R, IconDotsVertical as se, IconDownload as ce, IconPencilMinus as le, IconPin as z, IconPinFilled as ue, IconPlus as de, IconShare as fe, IconTrashX as pe, IconWorldShare as me, createReactComponent as he } from "@tabler/icons-react";
|
|
4
|
+
import { Suspense as ge, lazy as B, memo as V, useCallback as H, useEffect as _e, useId as U, useMemo as W, useRef as G, useState as K } from "react";
|
|
5
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
6
|
+
import { AttachmentCard as ve, FileDndOverlay as ye } from "@epam/ai-dial-attachment-input";
|
|
7
|
+
import { BuilderFormActionsOrder as be, BuilderFormContainer as xe } from "@epam/ai-dial-builder-form";
|
|
8
|
+
import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
|
|
9
9
|
//#region src/types/projects-sort-key.ts
|
|
10
|
-
var
|
|
10
|
+
var X = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.Newest = "newest", e.Oldest = "oldest", e.NameAsc = "name-asc", e;
|
|
12
|
-
}({}),
|
|
12
|
+
}({}), Ce = (e, t) => {
|
|
13
13
|
let n = t.trim().toLocaleLowerCase();
|
|
14
14
|
return n ? e.filter((e) => e.name.toLocaleLowerCase().includes(n)) : e;
|
|
15
|
-
},
|
|
15
|
+
}, we = (e, t, n) => {
|
|
16
16
|
let r = new Intl.Collator(n, {
|
|
17
17
|
sensitivity: "base",
|
|
18
18
|
numeric: !0
|
|
19
19
|
}), i = (e, t) => r.compare(e.name, t.name), a = (e, t) => Number(t.isPinned ?? !1) - Number(e.isPinned ?? !1);
|
|
20
|
-
if (t ===
|
|
21
|
-
let o = t ===
|
|
20
|
+
if (t === X.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
|
|
21
|
+
let o = t === X.Oldest ? 1 : -1;
|
|
22
22
|
return [...e].sort((e, t) => {
|
|
23
23
|
let n = a(e, t);
|
|
24
24
|
return n === 0 ? e.updatedAt == null && t.updatedAt == null ? i(e, t) : e.updatedAt == null ? 1 : t.updatedAt == null ? -1 : (e.updatedAt - t.updatedAt) * o || i(e, t) : n;
|
|
25
25
|
});
|
|
26
|
-
},
|
|
27
|
-
["year", 365 *
|
|
28
|
-
["month", 30 *
|
|
29
|
-
["week", 7 *
|
|
30
|
-
["day",
|
|
31
|
-
["hour",
|
|
32
|
-
["minute",
|
|
33
|
-
],
|
|
26
|
+
}, Te = 60, Ee = 3600, De = 24 * Ee, Oe = [
|
|
27
|
+
["year", 365 * De],
|
|
28
|
+
["month", 30 * De],
|
|
29
|
+
["week", 7 * De],
|
|
30
|
+
["day", De],
|
|
31
|
+
["hour", Ee],
|
|
32
|
+
["minute", Te]
|
|
33
|
+
], ke = (e, t, n) => {
|
|
34
34
|
let r = (t - e) / 1e3;
|
|
35
|
-
for (let [e, t] of
|
|
35
|
+
for (let [e, t] of Oe) {
|
|
36
36
|
let i = Math.floor(r / t);
|
|
37
37
|
if (i >= 1) return new Intl.RelativeTimeFormat(n).format(-i, e);
|
|
38
38
|
}
|
|
39
39
|
return new Intl.RelativeTimeFormat(n, { numeric: "auto" }).format(0, "second");
|
|
40
|
-
},
|
|
40
|
+
}, Z = {
|
|
41
41
|
card: "_card_1gkfw_1",
|
|
42
42
|
title: "_title_1gkfw_5",
|
|
43
43
|
updatedAt: "_updatedAt_1gkfw_9",
|
|
@@ -48,69 +48,69 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
48
48
|
link: "_link_1gkfw_39",
|
|
49
49
|
aboveLink: "_aboveLink_1gkfw_55",
|
|
50
50
|
interactive: "_interactive_1gkfw_60"
|
|
51
|
-
},
|
|
52
|
-
let g = /* @__PURE__ */
|
|
51
|
+
}, Ae = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], je = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Me = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: l, locale: u, updatedAtClassName: d, titleClassName: p, pathLabelClassName: m, pathLeafClassName: h }) => {
|
|
52
|
+
let g = /* @__PURE__ */ J(j, {
|
|
53
53
|
text: e.name,
|
|
54
54
|
query: t,
|
|
55
55
|
maxLines: 1,
|
|
56
|
-
className: f("min-w-0", p,
|
|
57
|
-
}), _ = /* @__PURE__ */
|
|
58
|
-
segments:
|
|
56
|
+
className: f("min-w-0", p, Z.title, s != null && Z.aboveLink)
|
|
57
|
+
}), _ = /* @__PURE__ */ J(O, {
|
|
58
|
+
segments: Ae(n, e.parentPath),
|
|
59
59
|
ariaLabel: r,
|
|
60
|
-
labelClassName: f(m,
|
|
61
|
-
leafClassName: f(h,
|
|
62
|
-
}), v =
|
|
63
|
-
return /* @__PURE__ */
|
|
60
|
+
labelClassName: f(m, Z.path),
|
|
61
|
+
leafClassName: f(h, Z.path)
|
|
62
|
+
}), v = G(null);
|
|
63
|
+
return /* @__PURE__ */ J("li", {
|
|
64
64
|
className: "flex min-w-0",
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ Y(x, {
|
|
66
66
|
"aria-label": e.name,
|
|
67
|
-
className: f("relative flex w-full min-w-0 flex-col gap-2",
|
|
67
|
+
className: f("relative flex w-full min-w-0 flex-col gap-2", Z.card, s != null && "has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", s != null && Z.interactive),
|
|
68
68
|
children: [
|
|
69
|
-
e.updatedAt != null && /* @__PURE__ */
|
|
69
|
+
e.updatedAt != null && /* @__PURE__ */ J("time", {
|
|
70
70
|
dateTime: new Date(e.updatedAt).toISOString(),
|
|
71
|
-
className: f(d,
|
|
72
|
-
children:
|
|
71
|
+
className: f(d, Z.updatedAt, (e.isPinned || o != null) && "pe-6"),
|
|
72
|
+
children: ke(e.updatedAt, l, u)
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ Y("div", {
|
|
75
75
|
className: f("flex min-w-0 items-center", (e.isPinned || o != null) && "pe-6"),
|
|
76
|
-
children: [s == null ? /* @__PURE__ */
|
|
76
|
+
children: [s == null ? /* @__PURE__ */ J("div", {
|
|
77
77
|
className: "min-w-0 flex-1",
|
|
78
78
|
children: g
|
|
79
|
-
}) : /* @__PURE__ */
|
|
79
|
+
}) : /* @__PURE__ */ J("a", {
|
|
80
80
|
ref: v,
|
|
81
81
|
href: s,
|
|
82
82
|
onClick: (t) => {
|
|
83
|
-
c != null &&
|
|
83
|
+
c != null && je(t) && (t.preventDefault(), c(e.id));
|
|
84
84
|
},
|
|
85
|
-
className: f("min-w-0 flex-1",
|
|
85
|
+
className: f("min-w-0 flex-1", Z.link),
|
|
86
86
|
children: g
|
|
87
|
-
}), o == null ? e.isPinned && /* @__PURE__ */
|
|
88
|
-
className: f("absolute inset-e-5 top-5 flex",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
-
size:
|
|
87
|
+
}), o == null ? e.isPinned && /* @__PURE__ */ Y("span", {
|
|
88
|
+
className: f("absolute inset-e-5 top-5 flex", Z.pin),
|
|
89
|
+
children: [/* @__PURE__ */ J(ue, {
|
|
90
|
+
size: S.SM,
|
|
91
91
|
"aria-hidden": !0
|
|
92
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ J("span", {
|
|
93
93
|
className: "sr-only",
|
|
94
94
|
children: i
|
|
95
95
|
})]
|
|
96
|
-
}) : /* @__PURE__ */
|
|
97
|
-
size:
|
|
98
|
-
icon: e.isPinned ? /* @__PURE__ */
|
|
99
|
-
size:
|
|
96
|
+
}) : /* @__PURE__ */ J(A, {
|
|
97
|
+
size: w.Small,
|
|
98
|
+
icon: e.isPinned ? /* @__PURE__ */ J(ue, {
|
|
99
|
+
size: S.SM,
|
|
100
100
|
"aria-hidden": !0
|
|
101
|
-
}) : /* @__PURE__ */
|
|
102
|
-
size:
|
|
101
|
+
}) : /* @__PURE__ */ J(z, {
|
|
102
|
+
size: S.SM,
|
|
103
103
|
"aria-hidden": !0,
|
|
104
|
-
stroke:
|
|
104
|
+
stroke: C
|
|
105
105
|
}),
|
|
106
106
|
"aria-label": a,
|
|
107
107
|
"aria-pressed": e.isPinned === !0,
|
|
108
108
|
onClick: () => o(e.id, !e.isPinned),
|
|
109
|
-
className: f("absolute inset-e-4 top-4",
|
|
109
|
+
className: f("absolute inset-e-4 top-4", Z.pinToggle, !e.isPinned && Z.pinToggleIdle)
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
|
-
s == null ? _ : /* @__PURE__ */
|
|
113
|
-
className:
|
|
112
|
+
s == null ? _ : /* @__PURE__ */ J("div", {
|
|
113
|
+
className: Z.aboveLink,
|
|
114
114
|
onClick: (e) => {
|
|
115
115
|
v.current?.dispatchEvent(new window.MouseEvent("click", {
|
|
116
116
|
bubbles: !0,
|
|
@@ -127,12 +127,12 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
127
127
|
]
|
|
128
128
|
})
|
|
129
129
|
});
|
|
130
|
-
},
|
|
130
|
+
}, Q = {
|
|
131
131
|
container: "_container_4rer8_1",
|
|
132
132
|
subtitle: "_subtitle_4rer8_5",
|
|
133
133
|
sortButton: "_sortButton_4rer8_9"
|
|
134
|
-
},
|
|
135
|
-
let { colors: D, typography:
|
|
134
|
+
}, Ne = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: s, onOpenProject: c, getProjectHref: u, searchQuery: d, onSearchQueryChange: p, sortKey: h, onSortKeyChange: b, labels: x, locale: T, styles: E }) => {
|
|
135
|
+
let { colors: D, typography: O } = E ?? {}, A = O?.titleClassName ?? "dial-h1-text", j = O?.subtitleClassName ?? "dial-body-text", M = O?.cardTitleClassName ?? "dial-body-semi-text", ee = O?.pathLabelClassName ?? "dial-tiny-text", N = O?.pathLeafClassName ?? "dial-tiny-semi-text", I = O?.updatedAtClassName ?? "dial-tiny-text", ne = O?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", re = l({
|
|
136
136
|
"--pr-bg": D?.background,
|
|
137
137
|
"--pr-subtitle-text": D?.subtitleText,
|
|
138
138
|
"--pr-sort-text": D?.sortButtonText,
|
|
@@ -141,214 +141,214 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
141
141
|
"--pr-updated-at-text": D?.updatedAtText,
|
|
142
142
|
"--pr-path-text": D?.pathText,
|
|
143
143
|
"--pr-card-focus-outline": D?.cardFocusOutline
|
|
144
|
-
}),
|
|
144
|
+
}), L = m(), oe = W(() => Date.now(), [e]), se = d.trim(), ce = r.length > 0, le = ce && e.length === 0, z = W(() => we(Ce(e, d), h, T), [
|
|
145
145
|
e,
|
|
146
146
|
d,
|
|
147
147
|
h,
|
|
148
148
|
T
|
|
149
|
-
]), ue =
|
|
149
|
+
]), ue = x.sortOptions.find((e) => e.value === h)?.label ?? x.sortLabel, fe = W(() => x.sortOptions.map((e) => ({
|
|
150
150
|
key: e.value,
|
|
151
151
|
label: e.label,
|
|
152
|
-
mark:
|
|
152
|
+
mark: te.Check,
|
|
153
153
|
checked: e.value === h,
|
|
154
154
|
onClick: () => b(e.value)
|
|
155
155
|
})), [
|
|
156
|
-
|
|
156
|
+
x.sortOptions,
|
|
157
157
|
h,
|
|
158
158
|
b
|
|
159
|
-
]),
|
|
159
|
+
]), pe = (e) => {
|
|
160
160
|
p(e ?? "");
|
|
161
|
-
},
|
|
162
|
-
if (!t) return n ?
|
|
163
|
-
},
|
|
164
|
-
label:
|
|
161
|
+
}, me = () => {
|
|
162
|
+
if (!t) return n ? x.errorLabel : ce ? x.incompleteLabel : e.length === 0 ? x.emptyStateLabel : z.length === 0 ? x.noResultsLabel : x.resultCountLabel(z.length);
|
|
163
|
+
}, he = (e, t) => a ? /* @__PURE__ */ J(g, {
|
|
164
|
+
label: x.createProjectLabel,
|
|
165
165
|
variant: e,
|
|
166
166
|
onClick: a,
|
|
167
167
|
className: f("shrink-0", t)
|
|
168
|
-
}) : void 0,
|
|
168
|
+
}) : void 0, ge = () => t ? /* @__PURE__ */ J(ae, { ariaLabel: x.loadingAriaLabel ?? "Loading projects" }) : n || le ? /* @__PURE__ */ Y("div", {
|
|
169
169
|
className: "flex flex-col items-center gap-3",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
-
className: f(
|
|
172
|
-
children: n ?
|
|
173
|
-
}), /* @__PURE__ */
|
|
174
|
-
label:
|
|
170
|
+
children: [/* @__PURE__ */ J("p", {
|
|
171
|
+
className: f(j, Q.subtitle),
|
|
172
|
+
children: n ? x.errorLabel : x.incompleteLabel
|
|
173
|
+
}), /* @__PURE__ */ J(k, {
|
|
174
|
+
label: x.retryLabel,
|
|
175
175
|
onClick: i
|
|
176
176
|
})]
|
|
177
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
178
|
-
label:
|
|
179
|
-
description:
|
|
180
|
-
action:
|
|
181
|
-
containerClassName:
|
|
177
|
+
}) : e.length === 0 ? /* @__PURE__ */ J(o, {
|
|
178
|
+
label: x.emptyStateLabel,
|
|
179
|
+
description: x.emptyStateDescription,
|
|
180
|
+
action: he(y.Secondary, "mt-2"),
|
|
181
|
+
containerClassName: V,
|
|
182
182
|
labelClassName: "mt-3",
|
|
183
|
-
descriptionClassName:
|
|
184
|
-
}) :
|
|
185
|
-
label:
|
|
186
|
-
containerClassName:
|
|
183
|
+
descriptionClassName: ne
|
|
184
|
+
}) : z.length === 0 ? /* @__PURE__ */ J(o, {
|
|
185
|
+
label: x.noResultsLabel,
|
|
186
|
+
containerClassName: V,
|
|
187
187
|
labelClassName: "mt-3"
|
|
188
|
-
}) : /* @__PURE__ */
|
|
188
|
+
}) : /* @__PURE__ */ J("ul", {
|
|
189
189
|
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",
|
|
190
|
-
children:
|
|
190
|
+
children: z.map((e) => /* @__PURE__ */ J(Me, {
|
|
191
191
|
project: e,
|
|
192
|
-
searchQuery:
|
|
193
|
-
sourceLabel:
|
|
194
|
-
folderPathLabel:
|
|
195
|
-
pinnedLabel:
|
|
196
|
-
pinLabel:
|
|
192
|
+
searchQuery: se,
|
|
193
|
+
sourceLabel: x.sourceLabels[e.source],
|
|
194
|
+
folderPathLabel: x.folderPathLabel,
|
|
195
|
+
pinnedLabel: x.pinnedLabel ?? "Pinned",
|
|
196
|
+
pinLabel: x.pinLabel ?? "Pin",
|
|
197
197
|
onTogglePin: s,
|
|
198
198
|
href: u?.(e.id),
|
|
199
199
|
onOpen: c,
|
|
200
|
-
now:
|
|
200
|
+
now: oe,
|
|
201
201
|
locale: T,
|
|
202
|
-
updatedAtClassName:
|
|
203
|
-
titleClassName:
|
|
204
|
-
pathLabelClassName:
|
|
202
|
+
updatedAtClassName: I,
|
|
203
|
+
titleClassName: M,
|
|
204
|
+
pathLabelClassName: ee,
|
|
205
205
|
pathLeafClassName: N
|
|
206
206
|
}, e.id))
|
|
207
|
-
}),
|
|
208
|
-
return /* @__PURE__ */
|
|
209
|
-
style:
|
|
210
|
-
className: f("relative flex size-full min-h-0 min-w-0 flex-1 flex-col",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
207
|
+
}), B = t || n || le, V = "mt-6 p-3 desktop:mt-0";
|
|
208
|
+
return /* @__PURE__ */ Y("div", {
|
|
209
|
+
style: re,
|
|
210
|
+
className: f("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", Q.container),
|
|
211
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
212
212
|
className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
|
|
213
213
|
children: [
|
|
214
|
-
|
|
214
|
+
L ? /* @__PURE__ */ J("h1", {
|
|
215
215
|
className: "sr-only",
|
|
216
|
-
children:
|
|
217
|
-
}) : /* @__PURE__ */
|
|
216
|
+
children: x.title
|
|
217
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
218
218
|
className: "flex min-w-0 items-start gap-2 px-8 py-4",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
220
220
|
className: "flex min-h-10 min-w-0 flex-1 flex-col justify-center gap-0.5",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ J("h1", {
|
|
222
222
|
className: f("wrap-break-word", A),
|
|
223
|
-
children:
|
|
224
|
-
}),
|
|
225
|
-
className: f(
|
|
226
|
-
children:
|
|
223
|
+
children: x.title
|
|
224
|
+
}), x.subtitle && /* @__PURE__ */ J("p", {
|
|
225
|
+
className: f(j, Q.subtitle),
|
|
226
|
+
children: x.subtitle
|
|
227
227
|
})]
|
|
228
|
-
}),
|
|
228
|
+
}), he(y.Primary)]
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ Y("div", {
|
|
231
231
|
className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ J("div", {
|
|
233
233
|
role: "search",
|
|
234
234
|
className: "min-w-0 flex-1",
|
|
235
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ J(ie, {
|
|
236
236
|
value: d,
|
|
237
|
-
onChange:
|
|
238
|
-
placeholder:
|
|
239
|
-
clearLabel:
|
|
240
|
-
"aria-label":
|
|
241
|
-
size:
|
|
237
|
+
onChange: pe,
|
|
238
|
+
placeholder: x.searchPlaceholder,
|
|
239
|
+
clearLabel: x.clearSearchLabel,
|
|
240
|
+
"aria-label": x.searchAriaLabel,
|
|
241
|
+
size: L ? w.Standard : w.Large
|
|
242
242
|
})
|
|
243
|
-
}),
|
|
243
|
+
}), x.sortOptions.length > 0 && /* @__PURE__ */ J("div", {
|
|
244
244
|
role: "group",
|
|
245
|
-
"aria-label":
|
|
245
|
+
"aria-label": x.sortLabel,
|
|
246
246
|
className: "shrink-0",
|
|
247
|
-
children: /* @__PURE__ */
|
|
248
|
-
items:
|
|
247
|
+
children: /* @__PURE__ */ J(v, {
|
|
248
|
+
items: fe,
|
|
249
249
|
label: ue,
|
|
250
250
|
variant: y.Primary,
|
|
251
251
|
appearance: _.Ghost,
|
|
252
|
-
size:
|
|
253
|
-
iconBefore: /* @__PURE__ */
|
|
254
|
-
size:
|
|
252
|
+
size: L ? w.Small : w.Standard,
|
|
253
|
+
iconBefore: /* @__PURE__ */ J(R, {
|
|
254
|
+
size: L ? S.SM : S.MD,
|
|
255
255
|
"aria-hidden": !0,
|
|
256
|
-
stroke:
|
|
256
|
+
stroke: C
|
|
257
257
|
}),
|
|
258
|
-
className: f("desktop:px-3",
|
|
258
|
+
className: f("desktop:px-3", Q.sortButton)
|
|
259
259
|
})
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ J(P, {
|
|
263
263
|
visuallyHidden: !0,
|
|
264
|
-
as:
|
|
265
|
-
children:
|
|
264
|
+
as: F.Span,
|
|
265
|
+
children: me()
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ Y("div", {
|
|
268
268
|
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",
|
|
269
|
-
children: [
|
|
269
|
+
children: [ce && !t && !n && !le && /* @__PURE__ */ Y("div", {
|
|
270
270
|
className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
-
className: f(
|
|
273
|
-
children:
|
|
274
|
-
}), /* @__PURE__ */
|
|
275
|
-
label:
|
|
271
|
+
children: [/* @__PURE__ */ J("p", {
|
|
272
|
+
className: f(j, Q.subtitle),
|
|
273
|
+
children: x.incompleteLabel
|
|
274
|
+
}), /* @__PURE__ */ J(k, {
|
|
275
|
+
label: x.retryLabel,
|
|
276
276
|
onClick: i
|
|
277
277
|
})]
|
|
278
|
-
}), /* @__PURE__ */
|
|
279
|
-
className: f("flex w-full max-w-[1116px] min-w-0 flex-col items-center",
|
|
280
|
-
children:
|
|
278
|
+
}), /* @__PURE__ */ J("div", {
|
|
279
|
+
className: f("flex w-full max-w-[1116px] min-w-0 flex-col items-center", B && "flex-1 justify-center"),
|
|
280
|
+
children: ge()
|
|
281
281
|
})]
|
|
282
282
|
})
|
|
283
283
|
]
|
|
284
|
-
}),
|
|
284
|
+
}), L && a && /* @__PURE__ */ J(g, {
|
|
285
285
|
variant: y.Primary,
|
|
286
|
-
iconBefore: /* @__PURE__ */
|
|
287
|
-
size:
|
|
286
|
+
iconBefore: /* @__PURE__ */ J(de, {
|
|
287
|
+
size: S.LG,
|
|
288
288
|
"aria-hidden": !0,
|
|
289
|
-
stroke:
|
|
289
|
+
stroke: C
|
|
290
290
|
}),
|
|
291
|
-
"aria-label":
|
|
291
|
+
"aria-label": x.createProjectLabel,
|
|
292
292
|
onClick: a,
|
|
293
293
|
className: "absolute inset-e-4 bottom-4 z-10 size-10 rounded-full px-0"
|
|
294
294
|
})]
|
|
295
295
|
});
|
|
296
|
-
},
|
|
296
|
+
}, Pe = /* @__PURE__ */ function(e) {
|
|
297
297
|
return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
|
|
298
|
-
}({}),
|
|
299
|
-
let [t, n] =
|
|
298
|
+
}({}), Fe = (e) => !!e.dataTransfer?.types.includes("Files"), Ie = (e) => {
|
|
299
|
+
let [t, n] = K(!1), r = G(0);
|
|
300
300
|
return {
|
|
301
301
|
isDragActive: t,
|
|
302
302
|
handlers: {
|
|
303
|
-
onDragEnter:
|
|
304
|
-
|
|
303
|
+
onDragEnter: H((e) => {
|
|
304
|
+
Fe(e) && (e.preventDefault(), r.current += 1, n(!0));
|
|
305
305
|
}, []),
|
|
306
|
-
onDragLeave:
|
|
307
|
-
|
|
306
|
+
onDragLeave: H((e) => {
|
|
307
|
+
Fe(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
|
|
308
308
|
}, []),
|
|
309
|
-
onDragOver:
|
|
310
|
-
|
|
309
|
+
onDragOver: H((e) => {
|
|
310
|
+
Fe(e) && e.preventDefault();
|
|
311
311
|
}, []),
|
|
312
|
-
onDrop:
|
|
313
|
-
if (!
|
|
312
|
+
onDrop: H((t) => {
|
|
313
|
+
if (!Fe(t)) return;
|
|
314
314
|
t.preventDefault(), r.current = 0, n(!1);
|
|
315
315
|
let i = Array.from(t.dataTransfer?.files ?? []);
|
|
316
316
|
i.length > 0 && e(i);
|
|
317
317
|
}, [e])
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
},
|
|
320
|
+
}, Le = /* @__PURE__ */ function(e) {
|
|
321
321
|
return e.UnsupportedType = "unsupported-type", e.TooLarge = "too-large", e.CapacityExceeded = "capacity-exceeded", e.Duplicate = "duplicate", e.InvalidName = "invalid-name", e;
|
|
322
|
-
}({}),
|
|
322
|
+
}({}), Re = /* @__PURE__ */ function(e) {
|
|
323
323
|
return e.Required = "required", e.InvalidCharacters = "invalid-characters", e.Reserved = "reserved", e.TooLong = "too-long", e;
|
|
324
|
-
}({}),
|
|
324
|
+
}({}), ze = 255, Be = new RegExp(a.source, "u"), Ve = /[\p{Cc}--]/u, He = /* @__PURE__ */ new Set([
|
|
325
325
|
".",
|
|
326
326
|
"..",
|
|
327
327
|
"v",
|
|
328
328
|
"files",
|
|
329
329
|
".dial-resource",
|
|
330
330
|
".dial-folder"
|
|
331
|
-
]),
|
|
331
|
+
]), Ue = (e) => new TextEncoder().encode(e).length, We = (e) => {
|
|
332
332
|
let t = e.trim();
|
|
333
|
-
return t.length === 0 ?
|
|
334
|
-
},
|
|
333
|
+
return t.length === 0 ? Re.Required : Ue(t) > 255 ? Re.TooLong : Be.test(t) || Ve.test(t) ? Re.InvalidCharacters : He.has(t) ? Re.Reserved : null;
|
|
334
|
+
}, Ge = (e) => {
|
|
335
335
|
let t = e.lastIndexOf(".");
|
|
336
336
|
return t > 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
337
|
-
},
|
|
337
|
+
}, Ke = (e) => "isStored" in e && e.isStored, qe = (e) => Ke(e) ? e.size : e.file.size, Je = (e) => e.reduce((e, t) => e + qe(t), 0), Ye = 0, Xe = () => (Ye += 1, `project-context-${Date.now()}-${Ye}`), Ze = (e) => {
|
|
338
338
|
let t = e.type || d(e.name) || "application/octet-stream";
|
|
339
339
|
return {
|
|
340
|
-
id:
|
|
340
|
+
id: Xe(),
|
|
341
341
|
name: e.name,
|
|
342
342
|
contentType: t,
|
|
343
343
|
type: u(t),
|
|
344
344
|
status: s.Idle,
|
|
345
345
|
file: e
|
|
346
346
|
};
|
|
347
|
-
},
|
|
348
|
-
let r = new Set(t.map((e) => e.name)), i =
|
|
347
|
+
}, Qe = (e, t, n, r) => We(e.name) != null || e.name.trim() !== e.name ? Le.InvalidName : r.allowedExtensions.includes(Ge(e.name)) ? t.has(e.name) ? Le.Duplicate : e.size > r.maxFileBytes ? Le.TooLarge : n + e.size > r.maxTotalBytes ? Le.CapacityExceeded : null : Le.UnsupportedType, $e = (e, t, n) => {
|
|
348
|
+
let r = new Set(t.map((e) => e.name)), i = Je(t), a = [], o = [];
|
|
349
349
|
for (let t of e) {
|
|
350
|
-
let e =
|
|
351
|
-
e == null ? (r.add(t.name), i += t.size, a.push(
|
|
350
|
+
let e = Qe(t, r, i, n);
|
|
351
|
+
e == null ? (r.add(t.name), i += t.size, a.push(Ze(t))) : o.push({
|
|
352
352
|
name: t.name,
|
|
353
353
|
reason: e
|
|
354
354
|
});
|
|
@@ -357,84 +357,86 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
357
357
|
accepted: a,
|
|
358
358
|
rejected: o
|
|
359
359
|
};
|
|
360
|
-
},
|
|
360
|
+
}, et = (e, t) => {
|
|
361
361
|
let n = t.trim().toLowerCase();
|
|
362
362
|
return n === "" ? e : e.filter((e) => e.name.toLowerCase().includes(n));
|
|
363
|
-
},
|
|
363
|
+
}, tt = {
|
|
364
364
|
formColumn: "_formColumn_ru73x_1",
|
|
365
365
|
dropZone: "_dropZone_ru73x_11",
|
|
366
366
|
label: "_label_ru73x_20",
|
|
367
367
|
link: "_link_ru73x_24"
|
|
368
|
-
},
|
|
369
|
-
let te =
|
|
368
|
+
}, nt = B(async () => ({ default: (await Se()).MarkdownEditor })), rt = (e) => `Preview ${e}`, it = "Only the project owner can rename it.", at = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: s, selectedContextFileId: u, allowedExtensions: d, maxFileBytes: m, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: x, onSubmit: w, isSubmitting: T = !1, isNameReadOnly: O = !1, labels: k, markdownEditorTheme: A, className: j, styles: N }) => {
|
|
369
|
+
let te = U(), ne = U(), re = U(), L = U(), ie = U(), R = U(), se = G(null), ce = p(), [le, z] = K(!1), [ue, de] = K([]), [fe, pe] = K(""), me = h({
|
|
370
370
|
value: e.instructions,
|
|
371
371
|
onChange: (e) => i("instructions", e),
|
|
372
372
|
onRefine: v,
|
|
373
|
-
disabled:
|
|
374
|
-
}),
|
|
375
|
-
t.name ?
|
|
376
|
-
|
|
373
|
+
disabled: T
|
|
374
|
+
}), he = me.isPending, B = We(e.name), V = t.name ?? (le && B != null ? k.nameErrors[B] : void 0), H = B != null || T || he, q;
|
|
375
|
+
t.name ? q = ne : V && (q = re);
|
|
376
|
+
let Se = [O && L, q].filter(Boolean).join(" ") || void 0;
|
|
377
|
+
_e(() => {
|
|
378
|
+
t.name && se.current?.focus();
|
|
377
379
|
}, [t.name]);
|
|
378
|
-
let
|
|
380
|
+
let X = W(() => d.map((e) => `.${e}`).join(","), [d]), Ce = (e) => {
|
|
379
381
|
if (e.length === 0) return;
|
|
380
|
-
let { accepted: t, rejected: n } =
|
|
382
|
+
let { accepted: t, rejected: n } = $e(e, a, {
|
|
381
383
|
allowedExtensions: d,
|
|
382
384
|
maxFileBytes: m,
|
|
383
385
|
maxTotalBytes: g
|
|
384
386
|
});
|
|
385
|
-
|
|
386
|
-
}, { isDragActive:
|
|
387
|
+
de(n), t.length > 0 && o([...a, ...t]), pe([t.length > 0 ? k.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => k.fileRejections[t](e))].filter(Boolean).join(" "));
|
|
388
|
+
}, { isDragActive: we, handlers: Te } = Ie(Ce), Ee = k.openFileLabel ?? rt, De = (e) => {
|
|
387
389
|
let t = a.find((t) => t.id === e);
|
|
388
|
-
o(a.filter((t) => t.id !== e)),
|
|
389
|
-
},
|
|
390
|
+
o(a.filter((t) => t.id !== e)), de([]), t && pe(k.fileRemovedStatus(t.name));
|
|
391
|
+
}, Oe = async (e) => {
|
|
390
392
|
if (e.preventDefault(), e.stopPropagation(), _) try {
|
|
391
393
|
let e = await _();
|
|
392
|
-
e &&
|
|
394
|
+
e && Ce(e);
|
|
393
395
|
} catch {}
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
}, { colors: Z, typography:
|
|
396
|
+
}, ke = () => {
|
|
397
|
+
H || w();
|
|
398
|
+
}, { colors: Z, typography: Ae } = N ?? {}, je = Ae?.titleClassName ?? "dial-h1-text", Me = f(Ae?.labelClassName ?? "dial-tiny-semi-text", tt.label), Q = Ae?.helperClassName ?? "dial-tiny-text", Ne = l({
|
|
397
399
|
"--pcf-label-text": Z?.labelText,
|
|
398
400
|
"--pcf-link-text": Z?.linkText,
|
|
399
401
|
"--pcf-dropzone-bg": Z?.dropZoneBackground
|
|
400
|
-
}),
|
|
401
|
-
fromDevice: /* @__PURE__ */
|
|
402
|
-
fileManager: _ ? /* @__PURE__ */
|
|
402
|
+
}), Pe = k.refinement, Fe = t.context, Le = [...ue.map(({ name: e, reason: t }) => k.fileRejections[t](e)), Fe].filter(Boolean).join("\n"), Re = k.dropZoneLabel({
|
|
403
|
+
fromDevice: /* @__PURE__ */ J("span", { className: tt.link }),
|
|
404
|
+
fileManager: _ ? /* @__PURE__ */ J("button", {
|
|
403
405
|
type: "button",
|
|
404
|
-
className:
|
|
405
|
-
disabled:
|
|
406
|
-
onClick: (e) => void
|
|
406
|
+
className: tt.link,
|
|
407
|
+
disabled: T,
|
|
408
|
+
onClick: (e) => void Oe(e)
|
|
407
409
|
}) : void 0
|
|
408
410
|
});
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
className: f("relative flex h-full min-h-0 w-full",
|
|
411
|
-
...
|
|
411
|
+
return /* @__PURE__ */ Y("div", {
|
|
412
|
+
className: f("relative flex h-full min-h-0 w-full", j),
|
|
413
|
+
...Te,
|
|
412
414
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
isVisible:
|
|
415
|
+
/* @__PURE__ */ J(ye, {
|
|
416
|
+
isVisible: we,
|
|
415
417
|
labels: {
|
|
416
|
-
title:
|
|
417
|
-
subtitle:
|
|
418
|
+
title: k.dropOverlayTitle,
|
|
419
|
+
subtitle: k.dropOverlaySubtitle
|
|
418
420
|
}
|
|
419
421
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ J(xe, {
|
|
421
423
|
labels: {
|
|
422
|
-
title:
|
|
423
|
-
backButtonLabel:
|
|
424
|
-
cancelButtonLabel:
|
|
425
|
-
submitButtonLabel:
|
|
426
|
-
submittingLabel:
|
|
424
|
+
title: k.title,
|
|
425
|
+
backButtonLabel: k.backLabel,
|
|
426
|
+
cancelButtonLabel: k.cancelLabel,
|
|
427
|
+
submitButtonLabel: k.createLabel,
|
|
428
|
+
submittingLabel: k.submittingLabel ?? k.createLabel
|
|
427
429
|
},
|
|
428
430
|
onBack: y,
|
|
429
|
-
onCancel:
|
|
430
|
-
onSubmit:
|
|
431
|
-
isCancelDisabled:
|
|
432
|
-
isSubmitDisabled:
|
|
433
|
-
isSubmitting:
|
|
434
|
-
footerActionsOrder:
|
|
435
|
-
backIcon: /* @__PURE__ */
|
|
436
|
-
size:
|
|
437
|
-
stroke:
|
|
431
|
+
onCancel: x,
|
|
432
|
+
onSubmit: ke,
|
|
433
|
+
isCancelDisabled: T,
|
|
434
|
+
isSubmitDisabled: H,
|
|
435
|
+
isSubmitting: T,
|
|
436
|
+
footerActionsOrder: be.SubmitFirst,
|
|
437
|
+
backIcon: /* @__PURE__ */ J(oe, {
|
|
438
|
+
size: S.LG,
|
|
439
|
+
stroke: C,
|
|
438
440
|
"aria-hidden": !0,
|
|
439
441
|
className: "rtl:scale-x-[-1]"
|
|
440
442
|
}),
|
|
@@ -442,117 +444,125 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
442
444
|
colors: { background: Z?.background },
|
|
443
445
|
header: {
|
|
444
446
|
colors: { borderColor: Z?.headerBorder },
|
|
445
|
-
typography: { fontClassName:
|
|
447
|
+
typography: { fontClassName: je }
|
|
446
448
|
},
|
|
447
|
-
cssVars:
|
|
449
|
+
cssVars: Ne
|
|
448
450
|
},
|
|
449
|
-
children: /* @__PURE__ */
|
|
450
|
-
className: f("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6",
|
|
451
|
+
children: /* @__PURE__ */ Y("div", {
|
|
452
|
+
className: f("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6", tt.formColumn),
|
|
451
453
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ Y("div", {
|
|
453
455
|
className: "flex flex-col gap-1",
|
|
454
456
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ J(M, {
|
|
456
458
|
id: te,
|
|
457
|
-
inputRef:
|
|
459
|
+
inputRef: se,
|
|
458
460
|
value: e.name,
|
|
459
|
-
onChange: (e) =>
|
|
460
|
-
|
|
461
|
-
|
|
461
|
+
onChange: (e) => {
|
|
462
|
+
O || i("name", e ?? "");
|
|
463
|
+
},
|
|
464
|
+
onBlur: () => z(!0),
|
|
465
|
+
placeholder: k.namePlaceholder,
|
|
462
466
|
labelProps: {
|
|
463
|
-
label:
|
|
467
|
+
label: k.nameLabel,
|
|
464
468
|
required: !0
|
|
465
469
|
},
|
|
466
470
|
required: !0,
|
|
467
471
|
"aria-required": !0,
|
|
472
|
+
readOnly: O,
|
|
468
473
|
invalid: !!V,
|
|
469
474
|
"aria-invalid": !!V,
|
|
470
|
-
"aria-describedby":
|
|
475
|
+
"aria-describedby": Se
|
|
476
|
+
}),
|
|
477
|
+
O && /* @__PURE__ */ J(b, {
|
|
478
|
+
id: L,
|
|
479
|
+
className: Q,
|
|
480
|
+
text: k.nameReadOnlyHint ?? it
|
|
471
481
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
announce:
|
|
474
|
-
id:
|
|
475
|
-
className:
|
|
482
|
+
/* @__PURE__ */ J(E, {
|
|
483
|
+
announce: I.Assertive,
|
|
484
|
+
id: ne,
|
|
485
|
+
className: Q,
|
|
476
486
|
text: t.name ?? ""
|
|
477
487
|
}),
|
|
478
|
-
V && !t.name && /* @__PURE__ */
|
|
479
|
-
id:
|
|
480
|
-
className:
|
|
488
|
+
V && !t.name && /* @__PURE__ */ J(E, {
|
|
489
|
+
id: re,
|
|
490
|
+
className: Q,
|
|
481
491
|
text: V
|
|
482
492
|
})
|
|
483
493
|
]
|
|
484
494
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ J(c, {
|
|
486
496
|
isEnabled: !!v,
|
|
487
|
-
fieldId:
|
|
488
|
-
label:
|
|
489
|
-
labelClassName:
|
|
490
|
-
labels:
|
|
491
|
-
refinement:
|
|
492
|
-
disabled:
|
|
493
|
-
children: /* @__PURE__ */
|
|
497
|
+
fieldId: ie,
|
|
498
|
+
label: k.instructionsLabel,
|
|
499
|
+
labelClassName: Me,
|
|
500
|
+
labels: Pe,
|
|
501
|
+
refinement: me,
|
|
502
|
+
disabled: T || he,
|
|
503
|
+
children: /* @__PURE__ */ Y("div", {
|
|
494
504
|
className: "flex flex-1 flex-col gap-2",
|
|
495
|
-
children: [!v && /* @__PURE__ */
|
|
496
|
-
htmlFor:
|
|
497
|
-
className:
|
|
498
|
-
label:
|
|
499
|
-
}), /* @__PURE__ */
|
|
500
|
-
ref:
|
|
505
|
+
children: [!v && /* @__PURE__ */ J(ee, {
|
|
506
|
+
htmlFor: ie,
|
|
507
|
+
className: Me,
|
|
508
|
+
label: k.instructionsLabel
|
|
509
|
+
}), /* @__PURE__ */ J("div", {
|
|
510
|
+
ref: ce,
|
|
501
511
|
className: f("w-full", n, r),
|
|
502
|
-
children: /* @__PURE__ */
|
|
503
|
-
fallback: /* @__PURE__ */
|
|
504
|
-
children: /* @__PURE__ */
|
|
505
|
-
id:
|
|
512
|
+
children: /* @__PURE__ */ J(ge, {
|
|
513
|
+
fallback: /* @__PURE__ */ J(ae, { ariaLabel: k.editorLoadingAriaLabel ?? "Loading editor" }),
|
|
514
|
+
children: /* @__PURE__ */ J(nt, {
|
|
515
|
+
id: ie,
|
|
506
516
|
value: e.instructions,
|
|
507
517
|
onChange: (e) => {
|
|
508
|
-
|
|
518
|
+
me.reset(), i("instructions", e);
|
|
509
519
|
},
|
|
510
520
|
height: 176,
|
|
511
|
-
theme:
|
|
512
|
-
placeholder:
|
|
521
|
+
theme: A,
|
|
522
|
+
placeholder: k.instructionsPlaceholder
|
|
513
523
|
})
|
|
514
524
|
})
|
|
515
525
|
})]
|
|
516
526
|
})
|
|
517
527
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
"aria-labelledby":
|
|
528
|
+
/* @__PURE__ */ Y("section", {
|
|
529
|
+
"aria-labelledby": R,
|
|
520
530
|
className: "flex flex-col gap-2",
|
|
521
531
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
id:
|
|
524
|
-
className:
|
|
525
|
-
children:
|
|
532
|
+
/* @__PURE__ */ J("h2", {
|
|
533
|
+
id: R,
|
|
534
|
+
className: Me,
|
|
535
|
+
children: k.contextLabel
|
|
526
536
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
label:
|
|
529
|
-
ariaLabel:
|
|
530
|
-
description:
|
|
531
|
-
accept:
|
|
537
|
+
/* @__PURE__ */ J(D, {
|
|
538
|
+
label: Re,
|
|
539
|
+
ariaLabel: k.dropZoneAriaLabel,
|
|
540
|
+
description: k.dropZoneHint,
|
|
541
|
+
accept: X,
|
|
532
542
|
multiple: !0,
|
|
533
|
-
disabled:
|
|
534
|
-
onChange:
|
|
535
|
-
onReject:
|
|
536
|
-
errorText:
|
|
537
|
-
className:
|
|
543
|
+
disabled: T,
|
|
544
|
+
onChange: Ce,
|
|
545
|
+
onReject: Ce,
|
|
546
|
+
errorText: Le || void 0,
|
|
547
|
+
className: tt.dropZone
|
|
538
548
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ J(P, {
|
|
540
550
|
visuallyHidden: !0,
|
|
541
|
-
politeness:
|
|
542
|
-
children:
|
|
551
|
+
politeness: I.Assertive,
|
|
552
|
+
children: Fe
|
|
543
553
|
}),
|
|
544
|
-
a.length > 0 && /* @__PURE__ */
|
|
554
|
+
a.length > 0 && /* @__PURE__ */ J("ul", {
|
|
545
555
|
className: "flex min-w-0 flex-wrap gap-2 pt-3",
|
|
546
|
-
children: a.map((e) => /* @__PURE__ */
|
|
556
|
+
children: a.map((e) => /* @__PURE__ */ J("li", {
|
|
547
557
|
className: "min-w-0",
|
|
548
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ J(ve, {
|
|
549
559
|
attachment: e,
|
|
550
560
|
onClick: s,
|
|
551
561
|
isSelected: s == null ? void 0 : e.id === u,
|
|
552
|
-
onRemove:
|
|
562
|
+
onRemove: De,
|
|
553
563
|
labels: {
|
|
554
|
-
removeLabel:
|
|
555
|
-
clickLabel:
|
|
564
|
+
removeLabel: k.removeFileLabel(e.name),
|
|
565
|
+
clickLabel: Ee(e.name)
|
|
556
566
|
}
|
|
557
567
|
})
|
|
558
568
|
}, e.id))
|
|
@@ -562,14 +572,14 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
562
572
|
]
|
|
563
573
|
})
|
|
564
574
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ J(P, {
|
|
566
576
|
visuallyHidden: !0,
|
|
567
|
-
as:
|
|
568
|
-
children:
|
|
577
|
+
as: F.Span,
|
|
578
|
+
children: T ? k.creatingStatus : fe
|
|
569
579
|
})
|
|
570
580
|
]
|
|
571
581
|
});
|
|
572
|
-
},
|
|
582
|
+
}, ot = he("outline", "pin-off", "PinOff", [
|
|
573
583
|
["path", {
|
|
574
584
|
d: "M3 3l18 18",
|
|
575
585
|
key: "svg-0"
|
|
@@ -605,21 +615,21 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
605
615
|
body: "_body_1j6j0_16",
|
|
606
616
|
secondary: "_secondary_1j6j0_20",
|
|
607
617
|
panel: "_panel_1j6j0_24"
|
|
608
|
-
},
|
|
618
|
+
}, st = (e) => ({
|
|
609
619
|
id: e.name,
|
|
610
620
|
name: e.name,
|
|
611
621
|
contentType: e.contentType,
|
|
612
622
|
type: u(e.contentType),
|
|
613
623
|
status: s.Idle
|
|
614
|
-
}),
|
|
615
|
-
let { colors: N, typography:
|
|
624
|
+
}), ct = V(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: a = !1, isPinned: s, isPinPending: c = !1, contextSearchQuery: u, onContextSearchQueryChange: d, onBack: p, onTogglePin: m, onPublish: h, onEdit: g, onShare: _, onDelete: v, onDownload: y, onContextFileClick: b, selectedContextFileId: x, isDetailsStacked: w = !1, onRetry: E, onBrowseProjects: D, mainContent: O, mainContentLabel: j = "Project content", labels: M, styles: ee }) => {
|
|
625
|
+
let { colors: N, typography: I } = ee ?? {}, te = I?.titleClassName ?? "dial-h1-text", re = I?.panelTitleClassName ?? "dial-body-semi-text", L = I?.sectionTitleClassName ?? "dial-tiny-text", R = I?.bodyClassName ?? "dial-small-text", ue = I?.helperClassName ?? "dial-tiny-text", de = I?.instructionsHeadingClassName ?? "dial-small-semi-text", he = l({
|
|
616
626
|
"--pv-bg": N?.background,
|
|
617
627
|
"--pv-border": N?.border,
|
|
618
628
|
"--pv-heading-text": N?.headingText,
|
|
619
629
|
"--pv-body-text": N?.bodyText,
|
|
620
630
|
"--pv-secondary-text": N?.secondaryText
|
|
621
|
-
}),
|
|
622
|
-
let e = f("mb-1 mt-3 first:mt-0",
|
|
631
|
+
}), ge = W(() => t?.contextFiles ?? [], [t]), B = W(() => et(ge, u), [ge, u]), V = u.trim(), H = U(), _e = W(() => {
|
|
632
|
+
let e = f("mb-1 mt-3 first:mt-0", de);
|
|
623
633
|
return {
|
|
624
634
|
h1: e,
|
|
625
635
|
h2: e,
|
|
@@ -627,235 +637,235 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
627
637
|
h4: e,
|
|
628
638
|
h5: e,
|
|
629
639
|
h6: e,
|
|
630
|
-
p:
|
|
631
|
-
ul:
|
|
632
|
-
ol:
|
|
640
|
+
p: R,
|
|
641
|
+
ul: R,
|
|
642
|
+
ol: R
|
|
633
643
|
};
|
|
634
|
-
}, [
|
|
635
|
-
size:
|
|
644
|
+
}, [R, de]), G = (e) => /* @__PURE__ */ J(e, {
|
|
645
|
+
size: S.SM,
|
|
636
646
|
"aria-hidden": !0,
|
|
637
|
-
stroke:
|
|
638
|
-
}),
|
|
647
|
+
stroke: C
|
|
648
|
+
}), K = (e) => {
|
|
639
649
|
let t = [];
|
|
640
650
|
return e && h && t.push({
|
|
641
651
|
key: "publish",
|
|
642
|
-
label:
|
|
643
|
-
icon:
|
|
652
|
+
label: M.publishLabel,
|
|
653
|
+
icon: G(me),
|
|
644
654
|
onClick: h
|
|
645
655
|
}), e && g && t.push({
|
|
646
656
|
key: "edit",
|
|
647
|
-
label:
|
|
648
|
-
icon:
|
|
657
|
+
label: M.editLabel,
|
|
658
|
+
icon: G(le),
|
|
649
659
|
onClick: g
|
|
650
660
|
}), _ && t.push({
|
|
651
661
|
key: "share",
|
|
652
|
-
label:
|
|
653
|
-
icon:
|
|
662
|
+
label: M.shareLabel,
|
|
663
|
+
icon: G(fe),
|
|
654
664
|
onClick: _
|
|
655
665
|
}), t.push({
|
|
656
666
|
key: "download",
|
|
657
|
-
label:
|
|
658
|
-
icon:
|
|
667
|
+
label: M.downloadLabel,
|
|
668
|
+
icon: G(ce),
|
|
659
669
|
onClick: y
|
|
660
670
|
}), v && t.push({
|
|
661
671
|
key: "delete",
|
|
662
|
-
label:
|
|
663
|
-
icon:
|
|
672
|
+
label: M.deleteLabel,
|
|
673
|
+
icon: G(pe),
|
|
664
674
|
danger: !0,
|
|
665
675
|
onClick: v
|
|
666
676
|
}), t;
|
|
667
|
-
},
|
|
677
|
+
}, ye = (t, n) => /* @__PURE__ */ J("div", {
|
|
668
678
|
className: n,
|
|
669
|
-
children: /* @__PURE__ */
|
|
670
|
-
items:
|
|
671
|
-
title:
|
|
672
|
-
closeLabel:
|
|
679
|
+
children: /* @__PURE__ */ J(e, {
|
|
680
|
+
items: K(t),
|
|
681
|
+
title: M.moreActionsLabel,
|
|
682
|
+
closeLabel: M.closeLabel,
|
|
673
683
|
matchReferenceWidth: !1,
|
|
674
684
|
listClassName: "w-[200px]",
|
|
675
|
-
children: /* @__PURE__ */
|
|
676
|
-
icon: /* @__PURE__ */
|
|
677
|
-
size:
|
|
685
|
+
children: /* @__PURE__ */ J(A, {
|
|
686
|
+
icon: /* @__PURE__ */ J(se, {
|
|
687
|
+
size: S.MD,
|
|
678
688
|
"aria-hidden": !0,
|
|
679
|
-
stroke:
|
|
689
|
+
stroke: C
|
|
680
690
|
}),
|
|
681
|
-
"aria-label":
|
|
691
|
+
"aria-label": M.moreActionsLabel
|
|
682
692
|
})
|
|
683
693
|
})
|
|
684
|
-
}),
|
|
694
|
+
}), be = () => {
|
|
685
695
|
c || m();
|
|
686
|
-
},
|
|
696
|
+
}, xe = () => n ? /* @__PURE__ */ J(ae, { ariaLabel: M.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Y("div", {
|
|
687
697
|
className: "flex flex-col items-center gap-3",
|
|
688
|
-
children: [/* @__PURE__ */
|
|
698
|
+
children: [/* @__PURE__ */ J("p", {
|
|
689
699
|
"aria-hidden": !0,
|
|
690
|
-
className: f(
|
|
691
|
-
children:
|
|
692
|
-
}), /* @__PURE__ */
|
|
693
|
-
label:
|
|
700
|
+
className: f(R, $.body),
|
|
701
|
+
children: M.errorLabel
|
|
702
|
+
}), /* @__PURE__ */ J(k, {
|
|
703
|
+
label: M.retryLabel,
|
|
694
704
|
onClick: E
|
|
695
705
|
})]
|
|
696
|
-
}) : /* @__PURE__ */
|
|
706
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
697
707
|
className: "flex flex-col items-center gap-3",
|
|
698
|
-
children: [/* @__PURE__ */
|
|
699
|
-
className: f(
|
|
700
|
-
children:
|
|
701
|
-
}), /* @__PURE__ */
|
|
702
|
-
label:
|
|
708
|
+
children: [/* @__PURE__ */ J("p", {
|
|
709
|
+
className: f(R, $.body),
|
|
710
|
+
children: M.notFoundLabel
|
|
711
|
+
}), /* @__PURE__ */ J(k, {
|
|
712
|
+
label: M.browseProjectsLabel,
|
|
703
713
|
onClick: D
|
|
704
714
|
})]
|
|
705
715
|
});
|
|
706
|
-
if (n || r || a || t == null) return /* @__PURE__ */
|
|
707
|
-
style:
|
|
716
|
+
if (n || r || a || t == null) return /* @__PURE__ */ Y("div", {
|
|
717
|
+
style: he,
|
|
708
718
|
className: f("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
|
|
709
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ J(P, {
|
|
710
720
|
visuallyHidden: !0,
|
|
711
|
-
children: !n && r &&
|
|
712
|
-
}),
|
|
721
|
+
children: !n && r && M.errorLabel
|
|
722
|
+
}), xe()]
|
|
713
723
|
});
|
|
714
|
-
let
|
|
715
|
-
/* @__PURE__ */
|
|
724
|
+
let Se = () => ge.length === 0 ? /* @__PURE__ */ J(o, { label: M.emptyContextLabel }) : /* @__PURE__ */ Y(q, { children: [
|
|
725
|
+
/* @__PURE__ */ J("div", {
|
|
716
726
|
role: "search",
|
|
717
|
-
children: /* @__PURE__ */
|
|
727
|
+
children: /* @__PURE__ */ J(ie, {
|
|
718
728
|
value: u,
|
|
719
729
|
onChange: (e) => d(e ?? ""),
|
|
720
|
-
placeholder:
|
|
721
|
-
clearLabel:
|
|
722
|
-
"aria-label":
|
|
730
|
+
placeholder: M.contextSearchPlaceholder,
|
|
731
|
+
clearLabel: M.clearSearchLabel,
|
|
732
|
+
"aria-label": M.contextSearchAriaLabel
|
|
723
733
|
})
|
|
724
734
|
}),
|
|
725
|
-
|
|
726
|
-
className: f(
|
|
727
|
-
children:
|
|
728
|
-
}) : /* @__PURE__ */
|
|
735
|
+
B.length === 0 ? /* @__PURE__ */ J("p", {
|
|
736
|
+
className: f(ue, $.secondary),
|
|
737
|
+
children: M.noContextMatchesLabel
|
|
738
|
+
}) : /* @__PURE__ */ J("ul", {
|
|
729
739
|
className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
|
|
730
|
-
children:
|
|
740
|
+
children: B.map((e) => /* @__PURE__ */ J("li", {
|
|
731
741
|
className: "min-w-0",
|
|
732
|
-
children: /* @__PURE__ */
|
|
733
|
-
attachment:
|
|
734
|
-
searchQuery:
|
|
742
|
+
children: /* @__PURE__ */ J(ve, {
|
|
743
|
+
attachment: st(e),
|
|
744
|
+
searchQuery: V,
|
|
735
745
|
onClick: b,
|
|
736
|
-
isSelected: e.name ===
|
|
737
|
-
labels: { clickLabel:
|
|
746
|
+
isSelected: e.name === x,
|
|
747
|
+
labels: { clickLabel: M.openFileLabel(e.name) }
|
|
738
748
|
})
|
|
739
749
|
}, e.name))
|
|
740
750
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ J(P, {
|
|
742
752
|
visuallyHidden: !0,
|
|
743
|
-
as:
|
|
744
|
-
children:
|
|
753
|
+
as: F.Span,
|
|
754
|
+
children: V === "" ? "" : M.contextResultCountLabel(B.length)
|
|
745
755
|
})
|
|
746
|
-
] }),
|
|
747
|
-
return /* @__PURE__ */
|
|
748
|
-
style:
|
|
756
|
+
] }), X = !w;
|
|
757
|
+
return /* @__PURE__ */ Y("div", {
|
|
758
|
+
style: he,
|
|
749
759
|
className: f("flex size-full min-h-0 min-w-0 flex-1 flex-col", $.container),
|
|
750
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ Y("header", {
|
|
751
761
|
className: f("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
|
|
752
762
|
children: [
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
icon: /* @__PURE__ */
|
|
755
|
-
size:
|
|
763
|
+
/* @__PURE__ */ J(A, {
|
|
764
|
+
icon: /* @__PURE__ */ J(oe, {
|
|
765
|
+
size: S.LG,
|
|
756
766
|
className: "rtl:scale-x-[-1]",
|
|
757
767
|
"aria-hidden": !0,
|
|
758
|
-
stroke:
|
|
768
|
+
stroke: C
|
|
759
769
|
}),
|
|
760
|
-
"aria-label":
|
|
770
|
+
"aria-label": M.backLabel,
|
|
761
771
|
onClick: p
|
|
762
772
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
className: f("min-w-0 flex-1",
|
|
765
|
-
children: /* @__PURE__ */
|
|
773
|
+
/* @__PURE__ */ J("h1", {
|
|
774
|
+
className: f("min-w-0 flex-1", te, $.title),
|
|
775
|
+
children: /* @__PURE__ */ J(T, { text: t.name })
|
|
766
776
|
}),
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
label: s ?
|
|
769
|
-
iconBefore:
|
|
770
|
-
size:
|
|
777
|
+
/* @__PURE__ */ J(k, {
|
|
778
|
+
label: s ? M.unpinLabel : M.pinLabel,
|
|
779
|
+
iconBefore: J(s ? ot : z, {
|
|
780
|
+
size: S.MD,
|
|
771
781
|
"aria-hidden": !0,
|
|
772
|
-
stroke:
|
|
782
|
+
stroke: C
|
|
773
783
|
}),
|
|
774
784
|
"aria-disabled": c || void 0,
|
|
775
|
-
onClick:
|
|
785
|
+
onClick: be,
|
|
776
786
|
className: "shrink-0"
|
|
777
787
|
}),
|
|
778
|
-
h && /* @__PURE__ */
|
|
779
|
-
label:
|
|
780
|
-
iconBefore: /* @__PURE__ */
|
|
781
|
-
size:
|
|
788
|
+
h && /* @__PURE__ */ J(ne, {
|
|
789
|
+
label: M.publishLabel,
|
|
790
|
+
iconBefore: /* @__PURE__ */ J(me, {
|
|
791
|
+
size: S.MD,
|
|
782
792
|
"aria-hidden": !0,
|
|
783
|
-
stroke:
|
|
793
|
+
stroke: C
|
|
784
794
|
}),
|
|
785
795
|
onClick: h,
|
|
786
796
|
className: "hidden shrink-0 desktop:inline-flex"
|
|
787
797
|
}),
|
|
788
|
-
g && /* @__PURE__ */
|
|
789
|
-
label:
|
|
790
|
-
iconBefore: /* @__PURE__ */
|
|
791
|
-
size:
|
|
798
|
+
g && /* @__PURE__ */ J(ne, {
|
|
799
|
+
label: M.editLabel,
|
|
800
|
+
iconBefore: /* @__PURE__ */ J(le, {
|
|
801
|
+
size: S.MD,
|
|
792
802
|
"aria-hidden": !0,
|
|
793
|
-
stroke:
|
|
803
|
+
stroke: C
|
|
794
804
|
}),
|
|
795
805
|
onClick: g,
|
|
796
806
|
className: "hidden shrink-0 desktop:inline-flex"
|
|
797
807
|
}),
|
|
798
|
-
|
|
799
|
-
|
|
808
|
+
ye(!1, "hidden desktop:block"),
|
|
809
|
+
ye(!0, "desktop:hidden")
|
|
800
810
|
]
|
|
801
|
-
}), /* @__PURE__ */
|
|
802
|
-
className: f("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",
|
|
803
|
-
children: [
|
|
804
|
-
"aria-label":
|
|
805
|
-
className: f("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8",
|
|
806
|
-
children: /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ Y("div", {
|
|
812
|
+
className: f("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", X && "desktop:flex-row desktop:overflow-hidden", O == null && X && "desktop:justify-end"),
|
|
813
|
+
children: [O != null && /* @__PURE__ */ J("section", {
|
|
814
|
+
"aria-label": j,
|
|
815
|
+
className: f("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", X && "desktop:overflow-y-auto"),
|
|
816
|
+
children: /* @__PURE__ */ J("div", {
|
|
807
817
|
className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
|
|
808
|
-
children:
|
|
818
|
+
children: O
|
|
809
819
|
})
|
|
810
|
-
}), /* @__PURE__ */
|
|
811
|
-
"aria-labelledby":
|
|
812
|
-
className: f("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8",
|
|
820
|
+
}), /* @__PURE__ */ Y("aside", {
|
|
821
|
+
"aria-labelledby": H,
|
|
822
|
+
className: f("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", X && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
|
|
813
823
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
id:
|
|
816
|
-
className: f(
|
|
817
|
-
children:
|
|
824
|
+
/* @__PURE__ */ J("h2", {
|
|
825
|
+
id: H,
|
|
826
|
+
className: f(re, $.title),
|
|
827
|
+
children: M.detailsLabel
|
|
818
828
|
}),
|
|
819
|
-
t.description !== "" && /* @__PURE__ */
|
|
829
|
+
t.description !== "" && /* @__PURE__ */ Y("section", {
|
|
820
830
|
className: "flex min-w-0 flex-col gap-1",
|
|
821
|
-
children: [/* @__PURE__ */
|
|
822
|
-
className: f(
|
|
823
|
-
children:
|
|
824
|
-
}), /* @__PURE__ */
|
|
825
|
-
className: f("wrap-break-word whitespace-pre-line",
|
|
831
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
832
|
+
className: f(L, $.secondary),
|
|
833
|
+
children: M.descriptionLabel
|
|
834
|
+
}), /* @__PURE__ */ J("p", {
|
|
835
|
+
className: f("wrap-break-word whitespace-pre-line", R, $.body),
|
|
826
836
|
children: t.description
|
|
827
837
|
})]
|
|
828
838
|
}),
|
|
829
|
-
t.instructions !== "" && /* @__PURE__ */
|
|
839
|
+
t.instructions !== "" && /* @__PURE__ */ Y("section", {
|
|
830
840
|
className: "flex min-w-0 flex-col gap-1",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
832
|
-
className: f(
|
|
833
|
-
children:
|
|
834
|
-
}), /* @__PURE__ */
|
|
835
|
-
className: f("min-w-0 wrap-break-word",
|
|
836
|
-
children: /* @__PURE__ */
|
|
841
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
842
|
+
className: f(L, $.secondary),
|
|
843
|
+
children: M.instructionsLabel
|
|
844
|
+
}), /* @__PURE__ */ J("div", {
|
|
845
|
+
className: f("min-w-0 wrap-break-word", R, $.body),
|
|
846
|
+
children: /* @__PURE__ */ J(i, {
|
|
837
847
|
content: t.instructions,
|
|
838
|
-
classNames:
|
|
848
|
+
classNames: _e
|
|
839
849
|
})
|
|
840
850
|
})]
|
|
841
851
|
}),
|
|
842
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ Y("section", {
|
|
843
853
|
className: "flex min-w-0 flex-col gap-2",
|
|
844
|
-
children: [/* @__PURE__ */
|
|
845
|
-
className: f(
|
|
846
|
-
children:
|
|
847
|
-
}),
|
|
854
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
855
|
+
className: f(L, $.secondary),
|
|
856
|
+
children: M.contextLabel
|
|
857
|
+
}), Se()]
|
|
848
858
|
})
|
|
849
859
|
]
|
|
850
860
|
})]
|
|
851
861
|
})]
|
|
852
862
|
});
|
|
853
|
-
}),
|
|
863
|
+
}), lt = {
|
|
854
864
|
row: "_row_1030u_1",
|
|
855
865
|
readDot: "_readDot_1030u_6",
|
|
856
866
|
unreadDot: "_unreadDot_1030u_10"
|
|
857
|
-
},
|
|
858
|
-
let c =
|
|
867
|
+
}, ut = ({ item: t, labels: n, rowTitleClassName: r, unreadRowTitleClassName: i, onOpen: a, onRename: o, onDelete: s }) => {
|
|
868
|
+
let c = U(), [l, u] = K(!1), d = t.isUnread === !0, p = W(() => [...o ? [{
|
|
859
869
|
key: "rename",
|
|
860
870
|
label: n.renameLabel,
|
|
861
871
|
onClick: () => o(t.id)
|
|
@@ -871,58 +881,58 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
871
881
|
s,
|
|
872
882
|
o
|
|
873
883
|
]);
|
|
874
|
-
return /* @__PURE__ */
|
|
875
|
-
className: f("group/row flex min-w-0 items-center gap-1 rounded-xl",
|
|
884
|
+
return /* @__PURE__ */ Y("li", {
|
|
885
|
+
className: f("group/row flex min-w-0 items-center gap-1 rounded-xl", lt.row),
|
|
876
886
|
children: [
|
|
877
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ Y("button", {
|
|
878
888
|
type: "button",
|
|
879
889
|
"aria-label": n.openLabel(t.title, t.authorName),
|
|
880
890
|
"aria-describedby": d ? c : void 0,
|
|
881
891
|
className: "flex min-w-0 flex-1 items-center gap-3 rounded-xl p-3 text-start focus-visible:outline-2 focus-visible:-outline-offset-2",
|
|
882
892
|
onClick: () => a(t.id),
|
|
883
893
|
children: [
|
|
884
|
-
t.leading ?? /* @__PURE__ */
|
|
894
|
+
t.leading ?? /* @__PURE__ */ J("span", {
|
|
885
895
|
"aria-hidden": !0,
|
|
886
896
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
887
|
-
children: /* @__PURE__ */
|
|
897
|
+
children: /* @__PURE__ */ J("span", { className: f("size-[7.11px] rounded-full", d ? lt.unreadDot : lt.readDot) })
|
|
888
898
|
}),
|
|
889
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ J(T, {
|
|
890
900
|
text: t.title,
|
|
891
901
|
className: f("min-w-0 flex-1", d ? i : r)
|
|
892
902
|
}),
|
|
893
|
-
t.trailing ?? (d && t.leading != null && /* @__PURE__ */
|
|
903
|
+
t.trailing ?? (d && t.leading != null && /* @__PURE__ */ J("span", {
|
|
894
904
|
"aria-hidden": !0,
|
|
895
905
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
896
|
-
children: /* @__PURE__ */
|
|
906
|
+
children: /* @__PURE__ */ J("span", { className: f("size-[7.11px] rounded-full", lt.unreadDot) })
|
|
897
907
|
}))
|
|
898
908
|
]
|
|
899
909
|
}),
|
|
900
|
-
d && /* @__PURE__ */
|
|
910
|
+
d && /* @__PURE__ */ J("span", {
|
|
901
911
|
id: c,
|
|
902
912
|
className: "sr-only",
|
|
903
913
|
children: n.unreadLabel ?? "Unread"
|
|
904
914
|
}),
|
|
905
|
-
p.length > 0 && /* @__PURE__ */
|
|
915
|
+
p.length > 0 && /* @__PURE__ */ J(e, {
|
|
906
916
|
items: p,
|
|
907
917
|
title: n.moreActionsLabel(t.title),
|
|
908
918
|
closeLabel: n.closeLabel,
|
|
909
919
|
placement: "bottom-end",
|
|
910
920
|
onOpenChange: u,
|
|
911
|
-
children: /* @__PURE__ */
|
|
921
|
+
children: /* @__PURE__ */ J(A, {
|
|
912
922
|
"aria-label": n.moreActionsLabel(t.title),
|
|
913
|
-
size:
|
|
923
|
+
size: w.Small,
|
|
914
924
|
className: f("me-2 shrink-0", !l && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
|
|
915
|
-
icon: /* @__PURE__ */
|
|
925
|
+
icon: /* @__PURE__ */ J(se, {
|
|
916
926
|
"aria-hidden": !0,
|
|
917
|
-
size:
|
|
918
|
-
stroke:
|
|
927
|
+
size: S.SM,
|
|
928
|
+
stroke: C
|
|
919
929
|
})
|
|
920
930
|
})
|
|
921
931
|
})
|
|
922
932
|
]
|
|
923
933
|
});
|
|
924
|
-
},
|
|
925
|
-
let _ =
|
|
934
|
+
}, dt = V(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: a = !1, onLoadMore: s, isEmptyStateShown: c = !0, onOpen: u, onRename: d, onDelete: p, labels: m, typography: h, colors: g }) => {
|
|
935
|
+
let _ = U(), v = h?.titleClassName ?? "dial-body-semi-text", y = h?.rowTitleClassName ?? "dial-body-text", b = h?.unreadRowTitleClassName ?? "dial-body-semi-text", x = W(() => l({
|
|
926
936
|
"--pcl-read-dot": g?.readDot,
|
|
927
937
|
"--pcl-unread-dot": g?.unreadDot,
|
|
928
938
|
"--pcl-row-hover": g?.rowHoverBackground
|
|
@@ -931,50 +941,50 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
931
941
|
g?.unreadDot,
|
|
932
942
|
g?.rowHoverBackground
|
|
933
943
|
]), S = h?.messageClassName ?? "dial-small-text", C = !t && !n && e.length === 0;
|
|
934
|
-
return C && !c ? null : /* @__PURE__ */
|
|
944
|
+
return C && !c ? null : /* @__PURE__ */ Y("section", {
|
|
935
945
|
"aria-labelledby": C ? void 0 : _,
|
|
936
946
|
"aria-label": C ? m.title : void 0,
|
|
937
947
|
className: "flex min-w-0 flex-col gap-2 pt-3",
|
|
938
948
|
style: x,
|
|
939
949
|
children: [
|
|
940
|
-
!C && /* @__PURE__ */
|
|
950
|
+
!C && /* @__PURE__ */ J("h2", {
|
|
941
951
|
id: _,
|
|
942
952
|
className: f("m-0", v),
|
|
943
953
|
children: m.title
|
|
944
954
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ J(P, {
|
|
946
956
|
visuallyHidden: !0,
|
|
947
|
-
children: t ? m.loadingLabel : n ? m.errorLabel : C ? /* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
957
|
+
children: t ? m.loadingLabel : n ? m.errorLabel : C ? /* @__PURE__ */ Y(q, { children: [
|
|
958
|
+
/* @__PURE__ */ J("span", { children: m.emptyTitle }),
|
|
949
959
|
" ",
|
|
950
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ J("span", { children: m.emptyDescription })
|
|
951
961
|
] }) : null
|
|
952
962
|
}),
|
|
953
|
-
t ? /* @__PURE__ */
|
|
963
|
+
t ? /* @__PURE__ */ J("div", {
|
|
954
964
|
className: "flex justify-center py-6",
|
|
955
|
-
children: /* @__PURE__ */
|
|
965
|
+
children: /* @__PURE__ */ J("span", {
|
|
956
966
|
"aria-hidden": !0,
|
|
957
|
-
children: /* @__PURE__ */
|
|
967
|
+
children: /* @__PURE__ */ J(ae, {})
|
|
958
968
|
})
|
|
959
|
-
}) : n ? /* @__PURE__ */
|
|
969
|
+
}) : n ? /* @__PURE__ */ Y("div", {
|
|
960
970
|
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
961
|
-
children: [/* @__PURE__ */
|
|
971
|
+
children: [/* @__PURE__ */ J("p", {
|
|
962
972
|
"aria-hidden": !0,
|
|
963
973
|
className: f("m-0", S),
|
|
964
974
|
children: m.errorLabel
|
|
965
|
-
}), /* @__PURE__ */
|
|
975
|
+
}), /* @__PURE__ */ J(k, {
|
|
966
976
|
label: m.retryLabel,
|
|
967
977
|
onClick: r
|
|
968
978
|
})]
|
|
969
|
-
}) : C ? /* @__PURE__ */
|
|
979
|
+
}) : C ? /* @__PURE__ */ J("div", {
|
|
970
980
|
"aria-hidden": !0,
|
|
971
|
-
children: /* @__PURE__ */
|
|
981
|
+
children: /* @__PURE__ */ J(o, {
|
|
972
982
|
label: m.emptyTitle,
|
|
973
983
|
description: m.emptyDescription
|
|
974
984
|
})
|
|
975
|
-
}) : /* @__PURE__ */
|
|
985
|
+
}) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("ul", {
|
|
976
986
|
className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
|
|
977
|
-
children: e.map((e) => /* @__PURE__ */
|
|
987
|
+
children: e.map((e) => /* @__PURE__ */ J(ut, {
|
|
978
988
|
item: e,
|
|
979
989
|
labels: m,
|
|
980
990
|
rowTitleClassName: y,
|
|
@@ -983,7 +993,7 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
983
993
|
onRename: d,
|
|
984
994
|
onDelete: p
|
|
985
995
|
}, e.id))
|
|
986
|
-
}), i && s && /* @__PURE__ */
|
|
996
|
+
}), i && s && /* @__PURE__ */ J(N, {
|
|
987
997
|
className: "self-start",
|
|
988
998
|
label: m.loadMoreLabel ?? "See more",
|
|
989
999
|
disabled: a,
|
|
@@ -991,49 +1001,49 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
991
1001
|
})] })
|
|
992
1002
|
]
|
|
993
1003
|
});
|
|
994
|
-
}),
|
|
995
|
-
let v =
|
|
996
|
-
|
|
997
|
-
}, []),
|
|
998
|
-
let e =
|
|
999
|
-
|
|
1000
|
-
}, []),
|
|
1001
|
-
|
|
1004
|
+
}), ft = V(({ composer: e, outputs: n, hasOutputs: r = !1, items: i, isLoading: a = !1, hasError: o = !1, onRetry: s, hasMore: c, isLoadingMore: l, onLoadMore: u, onOpen: d, onRename: f, onDelete: p, labels: m, listTypography: h, listColors: g }) => {
|
|
1005
|
+
let v = U(), b = G(null), [x, S] = K(null), [C, w] = K(""), [T, E] = K(), [D, O] = K(!1), [k, A] = K(null), [j, ee] = K(!1), N = G(null), P = H(() => {
|
|
1006
|
+
N.current = document.activeElement;
|
|
1007
|
+
}, []), F = H(() => {
|
|
1008
|
+
let e = N.current;
|
|
1009
|
+
N.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
|
|
1010
|
+
}, []), I = H((e) => {
|
|
1011
|
+
N.current = null, window.setTimeout(() => {
|
|
1002
1012
|
let t = b.current;
|
|
1003
1013
|
if (!t) return;
|
|
1004
1014
|
let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
|
|
1005
1015
|
r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
|
|
1006
1016
|
}, 0);
|
|
1007
|
-
}, []),
|
|
1008
|
-
|
|
1017
|
+
}, []), te = H((e) => i.find((t) => t.id === e) ?? null, [i]);
|
|
1018
|
+
_e(() => {
|
|
1009
1019
|
let e = (e) => e != null && i.some((t) => t.id === e.id);
|
|
1010
|
-
x && !D && !e(x) && (S(null),
|
|
1020
|
+
x && !D && !e(x) && (S(null), I(0)), k && !j && !e(k) && (A(null), I(0));
|
|
1011
1021
|
}, [
|
|
1012
1022
|
k,
|
|
1013
|
-
|
|
1023
|
+
I,
|
|
1014
1024
|
j,
|
|
1015
1025
|
D,
|
|
1016
1026
|
i,
|
|
1017
1027
|
x
|
|
1018
1028
|
]);
|
|
1019
|
-
let
|
|
1020
|
-
|
|
1021
|
-
let t =
|
|
1029
|
+
let ne = H((e) => {
|
|
1030
|
+
P();
|
|
1031
|
+
let t = te(e);
|
|
1022
1032
|
S(t), w(t?.title ?? ""), E(void 0);
|
|
1023
|
-
}, [
|
|
1024
|
-
|
|
1025
|
-
}, [
|
|
1026
|
-
D || (S(null),
|
|
1027
|
-
}, [D,
|
|
1028
|
-
j || (A(null),
|
|
1029
|
-
}, [j,
|
|
1033
|
+
}, [te, P]), ie = H((e) => {
|
|
1034
|
+
P(), A(te(e));
|
|
1035
|
+
}, [te, P]), ae = H(() => {
|
|
1036
|
+
D || (S(null), F());
|
|
1037
|
+
}, [D, F]), oe = H(() => {
|
|
1038
|
+
j || (A(null), F());
|
|
1039
|
+
}, [j, F]), R = H(async () => {
|
|
1030
1040
|
if (!x || !f || D) return;
|
|
1031
1041
|
let e = C.trim();
|
|
1032
1042
|
if (!e) E(m.renameEmptyError);
|
|
1033
1043
|
else {
|
|
1034
1044
|
O(!0);
|
|
1035
1045
|
try {
|
|
1036
|
-
await f(x.id, e), S(null),
|
|
1046
|
+
await f(x.id, e), S(null), F();
|
|
1037
1047
|
} catch {} finally {
|
|
1038
1048
|
O(!1);
|
|
1039
1049
|
}
|
|
@@ -1044,50 +1054,50 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
1044
1054
|
f,
|
|
1045
1055
|
x,
|
|
1046
1056
|
C,
|
|
1047
|
-
|
|
1048
|
-
]),
|
|
1049
|
-
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(),
|
|
1050
|
-
}, [
|
|
1057
|
+
F
|
|
1058
|
+
]), se = H((e) => {
|
|
1059
|
+
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), R());
|
|
1060
|
+
}, [R]), ce = H(async () => {
|
|
1051
1061
|
if (!k || !p) return;
|
|
1052
1062
|
let e = i.findIndex((e) => e.id === k.id);
|
|
1053
|
-
|
|
1063
|
+
ee(!0);
|
|
1054
1064
|
try {
|
|
1055
|
-
await p(k.id), A(null),
|
|
1065
|
+
await p(k.id), A(null), I(Math.max(e, 0));
|
|
1056
1066
|
} catch {} finally {
|
|
1057
|
-
|
|
1067
|
+
ee(!1);
|
|
1058
1068
|
}
|
|
1059
1069
|
}, [
|
|
1060
1070
|
k,
|
|
1061
|
-
|
|
1071
|
+
I,
|
|
1062
1072
|
i,
|
|
1063
1073
|
p
|
|
1064
|
-
]),
|
|
1074
|
+
]), le = W(() => [{
|
|
1065
1075
|
label: m.renameCancelLabel ?? "Cancel",
|
|
1066
1076
|
variant: y.Primary,
|
|
1067
1077
|
appearance: _.Ghost,
|
|
1068
1078
|
disabled: D,
|
|
1069
|
-
onClick:
|
|
1079
|
+
onClick: ae
|
|
1070
1080
|
}, {
|
|
1071
1081
|
label: m.renameSaveLabel,
|
|
1072
1082
|
variant: y.Primary,
|
|
1073
1083
|
disabled: D,
|
|
1074
1084
|
onClick: () => {
|
|
1075
|
-
|
|
1085
|
+
R();
|
|
1076
1086
|
}
|
|
1077
1087
|
}], [
|
|
1078
|
-
|
|
1079
|
-
|
|
1088
|
+
ae,
|
|
1089
|
+
R,
|
|
1080
1090
|
D,
|
|
1081
1091
|
m.renameCancelLabel,
|
|
1082
1092
|
m.renameSaveLabel
|
|
1083
1093
|
]);
|
|
1084
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ Y(q, { children: [
|
|
1085
1095
|
e,
|
|
1086
1096
|
n,
|
|
1087
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ J("div", {
|
|
1088
1098
|
ref: b,
|
|
1089
1099
|
className: "contents",
|
|
1090
|
-
children: /* @__PURE__ */
|
|
1100
|
+
children: /* @__PURE__ */ J(dt, {
|
|
1091
1101
|
items: i,
|
|
1092
1102
|
isLoading: a,
|
|
1093
1103
|
hasError: o,
|
|
@@ -1097,35 +1107,35 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
1097
1107
|
onLoadMore: u,
|
|
1098
1108
|
isEmptyStateShown: !r,
|
|
1099
1109
|
onOpen: d,
|
|
1100
|
-
onRename: f ?
|
|
1101
|
-
onDelete: p ?
|
|
1110
|
+
onRename: f ? ne : void 0,
|
|
1111
|
+
onDelete: p ? ie : void 0,
|
|
1102
1112
|
labels: m.list,
|
|
1103
1113
|
typography: h,
|
|
1104
1114
|
colors: g
|
|
1105
1115
|
})
|
|
1106
1116
|
}),
|
|
1107
|
-
x && /* @__PURE__ */
|
|
1117
|
+
x && /* @__PURE__ */ J(re, {
|
|
1108
1118
|
open: !0,
|
|
1109
1119
|
header: m.renameTitle,
|
|
1110
|
-
size:
|
|
1111
|
-
mainButtons:
|
|
1112
|
-
onClose:
|
|
1113
|
-
children: /* @__PURE__ */
|
|
1120
|
+
size: L.Sm,
|
|
1121
|
+
mainButtons: le,
|
|
1122
|
+
onClose: ae,
|
|
1123
|
+
children: /* @__PURE__ */ J("div", {
|
|
1114
1124
|
className: "px-6 py-4",
|
|
1115
|
-
children: /* @__PURE__ */
|
|
1125
|
+
children: /* @__PURE__ */ J(M, {
|
|
1116
1126
|
id: v,
|
|
1117
1127
|
value: C,
|
|
1118
1128
|
labelProps: { label: m.renameInputLabel },
|
|
1119
1129
|
error: T,
|
|
1120
1130
|
disabled: D,
|
|
1121
|
-
onKeyDown:
|
|
1131
|
+
onKeyDown: se,
|
|
1122
1132
|
onChange: (e) => {
|
|
1123
1133
|
w(e ?? ""), E(void 0);
|
|
1124
1134
|
}
|
|
1125
1135
|
})
|
|
1126
1136
|
})
|
|
1127
1137
|
}),
|
|
1128
|
-
k && /* @__PURE__ */
|
|
1138
|
+
k && /* @__PURE__ */ J(t, {
|
|
1129
1139
|
open: !0,
|
|
1130
1140
|
title: m.deleteTitle(k.title),
|
|
1131
1141
|
names: [k.title],
|
|
@@ -1133,98 +1143,98 @@ var xe = /* @__PURE__ */ function(e) {
|
|
|
1133
1143
|
labels: m.deleteDialog,
|
|
1134
1144
|
isLoading: j,
|
|
1135
1145
|
onConfirm: () => {
|
|
1136
|
-
|
|
1146
|
+
ce();
|
|
1137
1147
|
},
|
|
1138
|
-
onClose:
|
|
1148
|
+
onClose: oe
|
|
1139
1149
|
})
|
|
1140
1150
|
] });
|
|
1141
|
-
}),
|
|
1151
|
+
}), pt = {
|
|
1142
1152
|
title: "_title_17sbf_1",
|
|
1143
1153
|
secondary: "_secondary_17sbf_5"
|
|
1144
|
-
},
|
|
1154
|
+
}, mt = 6, ht = (e) => ({
|
|
1145
1155
|
id: e.name,
|
|
1146
1156
|
name: e.name,
|
|
1147
1157
|
contentType: e.contentType,
|
|
1148
1158
|
type: u(e.contentType),
|
|
1149
1159
|
status: s.Idle
|
|
1150
|
-
}),
|
|
1151
|
-
let c =
|
|
1160
|
+
}), gt = V(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = mt, labels: o, styles: s }) => {
|
|
1161
|
+
let c = U(), u = U(), d = G(null), p = G(!1), [m, h] = K(!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 = W(() => l({
|
|
1152
1162
|
"--po-heading-text": g?.headingText,
|
|
1153
1163
|
"--po-secondary-text": g?.secondaryText
|
|
1154
|
-
}), [g?.headingText, g?.secondaryText]), C =
|
|
1164
|
+
}), [g?.headingText, g?.secondaryText]), C = H(() => h((e) => !e), []), w = H(() => {
|
|
1155
1165
|
p.current = !0, i?.();
|
|
1156
1166
|
}, [i]);
|
|
1157
|
-
|
|
1167
|
+
_e(() => {
|
|
1158
1168
|
!r && p.current && (p.current = !1, d.current?.focus());
|
|
1159
1169
|
}, [r]);
|
|
1160
|
-
let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a),
|
|
1161
|
-
return /* @__PURE__ */
|
|
1170
|
+
let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), O = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, j = o?.showLessLabel ?? "Show less";
|
|
1171
|
+
return /* @__PURE__ */ Y("div", {
|
|
1162
1172
|
className: "contents",
|
|
1163
1173
|
style: S,
|
|
1164
|
-
children: [T && /* @__PURE__ */
|
|
1174
|
+
children: [T && /* @__PURE__ */ Y("section", {
|
|
1165
1175
|
"aria-labelledby": c,
|
|
1166
1176
|
className: "flex min-w-0 flex-col gap-2 pt-3",
|
|
1167
|
-
children: [/* @__PURE__ */
|
|
1177
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1168
1178
|
className: "flex min-w-0 items-center justify-between gap-2",
|
|
1169
|
-
children: [/* @__PURE__ */
|
|
1179
|
+
children: [/* @__PURE__ */ J("h2", {
|
|
1170
1180
|
ref: d,
|
|
1171
1181
|
id: c,
|
|
1172
1182
|
tabIndex: -1,
|
|
1173
|
-
className: f("m-0",
|
|
1183
|
+
className: f("m-0", pt.title, v),
|
|
1174
1184
|
children: b
|
|
1175
|
-
}), !r && E && /* @__PURE__ */
|
|
1176
|
-
label: m ?
|
|
1185
|
+
}), !r && E && /* @__PURE__ */ J(N, {
|
|
1186
|
+
label: m ? j : A,
|
|
1177
1187
|
"aria-expanded": m,
|
|
1178
1188
|
"aria-controls": u,
|
|
1179
1189
|
onClick: C
|
|
1180
1190
|
})]
|
|
1181
|
-
}), r ? /* @__PURE__ */
|
|
1191
|
+
}), r ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("p", {
|
|
1182
1192
|
"aria-hidden": !0,
|
|
1183
|
-
className: f("m-0",
|
|
1193
|
+
className: f("m-0", pt.secondary, y),
|
|
1184
1194
|
children: x
|
|
1185
|
-
}), i && /* @__PURE__ */
|
|
1195
|
+
}), i && /* @__PURE__ */ J(k, {
|
|
1186
1196
|
className: "self-start",
|
|
1187
1197
|
label: o?.retryLabel ?? "Retry",
|
|
1188
1198
|
onClick: w
|
|
1189
|
-
})] }) : /* @__PURE__ */
|
|
1199
|
+
})] }) : /* @__PURE__ */ J("ul", {
|
|
1190
1200
|
id: u,
|
|
1191
1201
|
className: f("m-0 flex min-w-0 list-none gap-2 p-0", m ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
|
|
1192
|
-
children: D.map((e) => /* @__PURE__ */
|
|
1202
|
+
children: D.map((e) => /* @__PURE__ */ J("li", {
|
|
1193
1203
|
className: "shrink-0",
|
|
1194
|
-
children: /* @__PURE__ */
|
|
1195
|
-
attachment:
|
|
1204
|
+
children: /* @__PURE__ */ J(ve, {
|
|
1205
|
+
attachment: ht(e),
|
|
1196
1206
|
onClick: t,
|
|
1197
1207
|
isSelected: e.name === n,
|
|
1198
|
-
labels: { clickLabel:
|
|
1208
|
+
labels: { clickLabel: O(e.name) }
|
|
1199
1209
|
})
|
|
1200
1210
|
}, e.name))
|
|
1201
1211
|
})]
|
|
1202
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ J(P, {
|
|
1203
1213
|
visuallyHidden: !0,
|
|
1204
1214
|
children: r ? x : ""
|
|
1205
1215
|
})]
|
|
1206
1216
|
});
|
|
1207
|
-
}),
|
|
1217
|
+
}), _t = V(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Y("nav", {
|
|
1208
1218
|
"aria-label": i,
|
|
1209
1219
|
className: f("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
|
|
1210
|
-
children: [/* @__PURE__ */
|
|
1220
|
+
children: [/* @__PURE__ */ J(A, {
|
|
1211
1221
|
"aria-label": i,
|
|
1212
|
-
icon: /* @__PURE__ */
|
|
1222
|
+
icon: /* @__PURE__ */ J(oe, {
|
|
1213
1223
|
"aria-hidden": !0,
|
|
1214
|
-
size:
|
|
1215
|
-
stroke:
|
|
1224
|
+
size: S.MD,
|
|
1225
|
+
stroke: C,
|
|
1216
1226
|
className: "rtl:scale-x-[-1]"
|
|
1217
1227
|
}),
|
|
1218
1228
|
onClick: n
|
|
1219
|
-
}), /* @__PURE__ */
|
|
1229
|
+
}), /* @__PURE__ */ J("a", {
|
|
1220
1230
|
href: t,
|
|
1221
1231
|
onClick: r,
|
|
1222
1232
|
className: "min-w-0 hover:underline focus-visible:underline",
|
|
1223
|
-
children: /* @__PURE__ */
|
|
1233
|
+
children: /* @__PURE__ */ J(T, {
|
|
1224
1234
|
text: e,
|
|
1225
1235
|
className: f("min-w-0", o)
|
|
1226
1236
|
})
|
|
1227
1237
|
})]
|
|
1228
1238
|
}));
|
|
1229
1239
|
//#endregion
|
|
1230
|
-
export {
|
|
1240
|
+
export { Le as ContextFileRejection, ze as PROJECT_NAME_MAX_BYTES, _t as ProjectChatHeader, dt as ProjectConversationList, ft as ProjectConversationsPanel, at as ProjectCreateForm, Re as ProjectNameError, gt as ProjectOutputs, Pe as ProjectSource, ct as ProjectView, Ne as Projects, X as ProjectsSortKey, $e as checkContextFiles, et as filterContextFileItems, Je as getContextFilesSize, Ke as isStoredContextFile, We as validateProjectName };
|