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