@epam/ai-dial-projects 1.3.0-dev.294 → 1.3.0-dev.304

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { DeleteConfirmationDialog as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, MarkdownRenderer as r, PROHIBITED_CONVERSATION_NAME_CHARS_RE as i, PanelEmptyState as a, RequestStatus as o, TextRefinementField as s, buildCssVars as c, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useIsMobile as p, useTextRefinement as m } from "@epam/ai-dial-chat-shared";
2
- import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as j, Label as M, LinkButton as N, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as I, MenuItemMark as L, NeutralButton as R, Popup as ee, PopupSize as te, Search as ne, Spinner as z } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowNarrowLeft as B, IconArrowsSort as V, IconDotsVertical as re, IconDownload as ie, IconPencilMinus as H, IconPin as ae, IconPinFilled as U, IconPlus as oe, IconShare as se, IconTrashX as ce, IconWorldShare as W, createReactComponent as le } from "@tabler/icons-react";
4
- import { Suspense as ue, lazy as de, memo as G, useCallback as K, useEffect as fe, useId as q, useMemo as J, useRef as pe, useState as Y } from "react";
2
+ import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as j, Label as M, LinkButton as N, LiveRegion as P, LiveRegionElement as ee, LiveRegionPoliteness as F, MenuItemMark as I, NeutralButton as L, Popup as te, PopupSize as ne, Search as re, Spinner as ie } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowNarrowLeft as R, IconArrowsSort as ae, IconDotsVertical as z, IconDownload as oe, IconPencilMinus as B, IconPin as V, IconPinFilled as H, IconPlus as se, IconShare as ce, IconTrashX as le, IconWorldShare as U, createReactComponent as ue } from "@tabler/icons-react";
4
+ import { Suspense as de, lazy as fe, memo as W, useCallback as G, useEffect as pe, useId as K, useMemo as q, useRef as J, useState as Y } from "react";
5
5
  import { Fragment as me, jsx as X, jsxs as Z } from "react/jsx-runtime";
6
6
  import { AttachmentCard as he, FileDndOverlay as ge } from "@epam/ai-dial-attachment-input";
7
7
  import { BuilderFormContainer as _e } from "@epam/ai-dial-builder-form";
@@ -54,7 +54,12 @@ var ye = /* @__PURE__ */ function(e) {
54
54
  query: t,
55
55
  maxLines: 1,
56
56
  className: d("min-w-0", p, Q.title, s != null && Q.aboveLink)
57
- });
57
+ }), _ = /* @__PURE__ */ X(D, {
58
+ segments: De(n, e.parentPath),
59
+ ariaLabel: r,
60
+ labelClassName: d(m, Q.path),
61
+ leafClassName: d(h, Q.path)
62
+ }), v = J(null);
58
63
  return /* @__PURE__ */ X("li", {
59
64
  className: "flex min-w-0",
60
65
  children: /* @__PURE__ */ Z(y, {
@@ -72,6 +77,7 @@ var ye = /* @__PURE__ */ function(e) {
72
77
  className: "min-w-0 flex-1",
73
78
  children: g
74
79
  }) : /* @__PURE__ */ X("a", {
80
+ ref: v,
75
81
  href: s,
76
82
  onClick: (t) => {
77
83
  c != null && Oe(t) && (t.preventDefault(), c(e.id));
@@ -80,7 +86,7 @@ var ye = /* @__PURE__ */ function(e) {
80
86
  children: g
81
87
  }), o == null ? e.isPinned && /* @__PURE__ */ Z("span", {
82
88
  className: d("absolute inset-e-5 top-5 flex", Q.pin),
83
- children: [/* @__PURE__ */ X(U, {
89
+ children: [/* @__PURE__ */ X(H, {
84
90
  size: b.SM,
85
91
  "aria-hidden": !0
86
92
  }), /* @__PURE__ */ X("span", {
@@ -89,10 +95,10 @@ var ye = /* @__PURE__ */ function(e) {
89
95
  })]
90
96
  }) : /* @__PURE__ */ X(k, {
91
97
  size: C.Small,
92
- icon: e.isPinned ? /* @__PURE__ */ X(U, {
98
+ icon: e.isPinned ? /* @__PURE__ */ X(H, {
93
99
  size: b.SM,
94
100
  "aria-hidden": !0
95
- }) : /* @__PURE__ */ X(ae, {
101
+ }) : /* @__PURE__ */ X(V, {
96
102
  size: b.SM,
97
103
  "aria-hidden": !0,
98
104
  stroke: x
@@ -103,12 +109,20 @@ var ye = /* @__PURE__ */ function(e) {
103
109
  className: d("absolute inset-e-4 top-4", Q.pinToggle, !e.isPinned && Q.pinToggleIdle)
104
110
  })]
105
111
  }),
106
- /* @__PURE__ */ X(D, {
107
- segments: De(n, e.parentPath),
108
- ariaLabel: r,
109
- labelClassName: d(m, Q.path),
110
- leafClassName: d(h, Q.path),
111
- className: d(s != null && Q.aboveLink)
112
+ s == null ? _ : /* @__PURE__ */ X("div", {
113
+ className: Q.aboveLink,
114
+ onClick: (e) => {
115
+ v.current?.dispatchEvent(new window.MouseEvent("click", {
116
+ bubbles: !0,
117
+ cancelable: !0,
118
+ button: e.button,
119
+ ctrlKey: e.ctrlKey,
120
+ metaKey: e.metaKey,
121
+ shiftKey: e.shiftKey,
122
+ altKey: e.altKey
123
+ }));
124
+ },
125
+ children: _
112
126
  })
113
127
  ]
114
128
  })
@@ -118,7 +132,7 @@ var ye = /* @__PURE__ */ function(e) {
118
132
  subtitle: "_subtitle_4rer8_5",
119
133
  sortButton: "_sortButton_4rer8_9"
120
134
  }, je = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: o, onTogglePin: s, onOpenProject: l, getProjectHref: u, searchQuery: f, onSearchQueryChange: m, sortKey: y, onSortKeyChange: S, labels: w, locale: T, styles: E }) => {
121
- let { colors: D, typography: k } = E ?? {}, A = k?.titleClassName ?? "dial-h1-text", j = k?.subtitleClassName ?? "dial-body-text", M = k?.cardTitleClassName ?? "dial-body-semi-text", N = k?.pathLabelClassName ?? "dial-tiny-text", I = k?.pathLeafClassName ?? "dial-tiny-semi-text", R = k?.updatedAtClassName ?? "dial-tiny-text", ee = k?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", te = c({
135
+ let { colors: D, typography: k } = E ?? {}, A = k?.titleClassName ?? "dial-h1-text", j = k?.subtitleClassName ?? "dial-body-text", M = k?.cardTitleClassName ?? "dial-body-semi-text", N = k?.pathLabelClassName ?? "dial-tiny-text", F = k?.pathLeafClassName ?? "dial-tiny-semi-text", L = k?.updatedAtClassName ?? "dial-tiny-text", te = k?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", ne = c({
122
136
  "--pr-bg": D?.background,
123
137
  "--pr-subtitle-text": D?.subtitleText,
124
138
  "--pr-sort-text": D?.sortButtonText,
@@ -127,31 +141,31 @@ var ye = /* @__PURE__ */ function(e) {
127
141
  "--pr-updated-at-text": D?.updatedAtText,
128
142
  "--pr-path-text": D?.pathText,
129
143
  "--pr-card-focus-outline": D?.cardFocusOutline
130
- }), B = p(), re = J(() => Date.now(), [e]), ie = f.trim(), H = r.length > 0, ae = H && e.length === 0, U = J(() => xe(be(e, f), y, T), [
144
+ }), R = p(), z = q(() => Date.now(), [e]), oe = f.trim(), B = r.length > 0, V = B && e.length === 0, H = q(() => xe(be(e, f), y, T), [
131
145
  e,
132
146
  f,
133
147
  y,
134
148
  T
135
- ]), se = w.sortOptions.find((e) => e.value === y)?.label ?? w.sortLabel, ce = J(() => w.sortOptions.map((e) => ({
149
+ ]), ce = w.sortOptions.find((e) => e.value === y)?.label ?? w.sortLabel, le = q(() => w.sortOptions.map((e) => ({
136
150
  key: e.value,
137
151
  label: e.label,
138
- mark: L.Check,
152
+ mark: I.Check,
139
153
  checked: e.value === y,
140
154
  onClick: () => S(e.value)
141
155
  })), [
142
156
  w.sortOptions,
143
157
  y,
144
158
  S
145
- ]), W = (e) => {
159
+ ]), U = (e) => {
146
160
  m(e ?? "");
147
- }, le = () => {
148
- if (!t) return n ? w.errorLabel : H ? w.incompleteLabel : e.length === 0 ? w.emptyStateLabel : U.length === 0 ? w.noResultsLabel : w.resultCountLabel(U.length);
149
- }, ue = (e, t) => o ? /* @__PURE__ */ X(h, {
161
+ }, ue = () => {
162
+ if (!t) return n ? w.errorLabel : B ? w.incompleteLabel : e.length === 0 ? w.emptyStateLabel : H.length === 0 ? w.noResultsLabel : w.resultCountLabel(H.length);
163
+ }, de = (e, t) => o ? /* @__PURE__ */ X(h, {
150
164
  label: w.createProjectLabel,
151
165
  variant: e,
152
166
  onClick: o,
153
167
  className: d("shrink-0", t)
154
- }) : void 0, de = () => t ? /* @__PURE__ */ X(z, {}) : n || ae ? /* @__PURE__ */ Z("div", {
168
+ }) : void 0, fe = () => t ? /* @__PURE__ */ X(ie, {}) : n || V ? /* @__PURE__ */ Z("div", {
155
169
  className: "flex flex-col items-center gap-3",
156
170
  children: [/* @__PURE__ */ X("p", {
157
171
  className: d(j, Ae.subtitle),
@@ -163,19 +177,19 @@ var ye = /* @__PURE__ */ function(e) {
163
177
  }) : e.length === 0 ? /* @__PURE__ */ X(a, {
164
178
  label: w.emptyStateLabel,
165
179
  description: w.emptyStateDescription,
166
- action: ue(v.Secondary, "mt-2"),
167
- containerClassName: K,
180
+ action: de(v.Secondary, "mt-2"),
181
+ containerClassName: G,
168
182
  labelClassName: "mt-3",
169
- descriptionClassName: ee
170
- }) : U.length === 0 ? /* @__PURE__ */ X(a, {
183
+ descriptionClassName: te
184
+ }) : H.length === 0 ? /* @__PURE__ */ X(a, {
171
185
  label: w.noResultsLabel,
172
- containerClassName: K,
186
+ containerClassName: G,
173
187
  labelClassName: "mt-3"
174
188
  }) : /* @__PURE__ */ X("ul", {
175
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",
176
- children: U.map((e) => /* @__PURE__ */ X(ke, {
190
+ children: H.map((e) => /* @__PURE__ */ X(ke, {
177
191
  project: e,
178
- searchQuery: ie,
192
+ searchQuery: oe,
179
193
  sourceLabel: w.sourceLabels[e.source],
180
194
  folderPathLabel: w.folderPathLabel,
181
195
  pinnedLabel: w.pinnedLabel ?? "Pinned",
@@ -183,21 +197,21 @@ var ye = /* @__PURE__ */ function(e) {
183
197
  onTogglePin: s,
184
198
  href: u?.(e.id),
185
199
  onOpen: l,
186
- now: re,
200
+ now: z,
187
201
  locale: T,
188
- updatedAtClassName: R,
202
+ updatedAtClassName: L,
189
203
  titleClassName: M,
190
204
  pathLabelClassName: N,
191
- pathLeafClassName: I
205
+ pathLeafClassName: F
192
206
  }, e.id))
193
- }), G = t || n || ae, K = "mt-6 p-3 desktop:mt-0";
207
+ }), W = t || n || V, G = "mt-6 p-3 desktop:mt-0";
194
208
  return /* @__PURE__ */ Z("div", {
195
- style: te,
209
+ style: ne,
196
210
  className: d("relative flex h-full w-full min-w-0 flex-col", Ae.container),
197
211
  children: [/* @__PURE__ */ Z("div", {
198
212
  className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
199
213
  children: [
200
- B ? /* @__PURE__ */ X("h1", {
214
+ R ? /* @__PURE__ */ X("h1", {
201
215
  className: "sr-only",
202
216
  children: w.title
203
217
  }) : /* @__PURE__ */ Z("div", {
@@ -211,33 +225,33 @@ var ye = /* @__PURE__ */ function(e) {
211
225
  className: d(j, Ae.subtitle),
212
226
  children: w.subtitle
213
227
  })]
214
- }), ue(v.Primary)]
228
+ }), de(v.Primary)]
215
229
  }),
216
230
  /* @__PURE__ */ Z("div", {
217
231
  className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
218
232
  children: [/* @__PURE__ */ X("div", {
219
233
  role: "search",
220
234
  className: "min-w-0 flex-1",
221
- children: /* @__PURE__ */ X(ne, {
235
+ children: /* @__PURE__ */ X(re, {
222
236
  value: f,
223
- onChange: W,
237
+ onChange: U,
224
238
  placeholder: w.searchPlaceholder,
225
239
  clearLabel: w.clearSearchLabel,
226
240
  "aria-label": w.searchAriaLabel,
227
- size: B ? C.Standard : C.Large
241
+ size: R ? C.Standard : C.Large
228
242
  })
229
243
  }), w.sortOptions.length > 0 && /* @__PURE__ */ X("div", {
230
244
  role: "group",
231
245
  "aria-label": w.sortLabel,
232
246
  className: "shrink-0",
233
247
  children: /* @__PURE__ */ X(_, {
234
- items: ce,
235
- label: se,
248
+ items: le,
249
+ label: ce,
236
250
  variant: v.Primary,
237
251
  appearance: g.Ghost,
238
- size: B ? C.Small : C.Standard,
239
- iconBefore: /* @__PURE__ */ X(V, {
240
- size: B ? b.SM : b.MD,
252
+ size: R ? C.Small : C.Standard,
253
+ iconBefore: /* @__PURE__ */ X(ae, {
254
+ size: R ? b.SM : b.MD,
241
255
  "aria-hidden": !0,
242
256
  stroke: x
243
257
  }),
@@ -247,12 +261,12 @@ var ye = /* @__PURE__ */ function(e) {
247
261
  }),
248
262
  /* @__PURE__ */ X(P, {
249
263
  visuallyHidden: !0,
250
- as: F.Span,
251
- children: le()
264
+ as: ee.Span,
265
+ children: ue()
252
266
  }),
253
267
  /* @__PURE__ */ Z("div", {
254
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",
255
- children: [H && !t && !n && !ae && /* @__PURE__ */ Z("div", {
269
+ children: [B && !t && !n && !V && /* @__PURE__ */ Z("div", {
256
270
  className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
257
271
  children: [/* @__PURE__ */ X("p", {
258
272
  className: d(j, Ae.subtitle),
@@ -262,14 +276,14 @@ var ye = /* @__PURE__ */ function(e) {
262
276
  onClick: i
263
277
  })]
264
278
  }), /* @__PURE__ */ X("div", {
265
- className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", G && "flex-1 justify-center"),
266
- children: de()
279
+ className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", W && "flex-1 justify-center"),
280
+ children: fe()
267
281
  })]
268
282
  })
269
283
  ]
270
- }), B && o && /* @__PURE__ */ X(h, {
284
+ }), R && o && /* @__PURE__ */ X(h, {
271
285
  variant: v.Primary,
272
- iconBefore: /* @__PURE__ */ X(oe, {
286
+ iconBefore: /* @__PURE__ */ X(se, {
273
287
  size: b.LG,
274
288
  "aria-hidden": !0,
275
289
  stroke: x
@@ -282,20 +296,20 @@ var ye = /* @__PURE__ */ function(e) {
282
296
  }, Me = /* @__PURE__ */ function(e) {
283
297
  return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
284
298
  }({}), Ne = (e) => !!e.dataTransfer?.types.includes("Files"), Pe = (e) => {
285
- let [t, n] = Y(!1), r = pe(0);
299
+ let [t, n] = Y(!1), r = J(0);
286
300
  return {
287
301
  isDragActive: t,
288
302
  handlers: {
289
- onDragEnter: K((e) => {
303
+ onDragEnter: G((e) => {
290
304
  Ne(e) && (e.preventDefault(), r.current += 1, n(!0));
291
305
  }, []),
292
- onDragLeave: K((e) => {
306
+ onDragLeave: G((e) => {
293
307
  Ne(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
294
308
  }, []),
295
- onDragOver: K((e) => {
309
+ onDragOver: G((e) => {
296
310
  Ne(e) && e.preventDefault();
297
311
  }, []),
298
- onDrop: K((t) => {
312
+ onDrop: G((t) => {
299
313
  if (!Ne(t)) return;
300
314
  t.preventDefault(), r.current = 0, n(!1);
301
315
  let i = Array.from(t.dataTransfer?.files ?? []);
@@ -351,38 +365,38 @@ var ye = /* @__PURE__ */ function(e) {
351
365
  dropZone: "_dropZone_ub3na_11",
352
366
  label: "_label_ub3na_15",
353
367
  link: "_link_ub3na_19"
354
- }, et = de(async () => ({ default: (await ve()).MarkdownEditor })), tt = (e) => `Preview ${e}`, nt = ({ values: e, errors: r, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: l, selectedContextFileId: u, allowedExtensions: p, maxFileBytes: h, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: S, onSubmit: C, isSubmitting: w = !1, labels: D, markdownEditorTheme: O, className: k, styles: A }) => {
355
- let N = q(), L = q(), R = q(), ee = q(), te = pe(null), ne = f(), [V, re] = Y(!1), [ie, H] = Y([]), [ae, U] = Y(""), oe = m({
368
+ }, et = fe(async () => ({ default: (await ve()).MarkdownEditor })), tt = (e) => `Preview ${e}`, nt = ({ values: e, errors: r, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: l, selectedContextFileId: u, allowedExtensions: p, maxFileBytes: h, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: S, onSubmit: C, isSubmitting: w = !1, labels: D, markdownEditorTheme: O, className: k, styles: A }) => {
369
+ let N = K(), I = K(), L = K(), te = K(), ne = J(null), re = f(), [ae, z] = Y(!1), [oe, B] = Y([]), [V, H] = Y(""), se = m({
356
370
  value: e.instructions,
357
371
  onChange: (e) => i("instructions", e),
358
372
  onRefine: v,
359
373
  disabled: w
360
- }), se = oe.isPending, ce = He(e.name), W = r.name ?? (V && ce != null ? D.nameErrors[ce] : void 0), le = ce != null || w || se;
361
- fe(() => {
362
- r.name && te.current?.focus();
374
+ }), ce = se.isPending, le = He(e.name), U = r.name ?? (ae && le != null ? D.nameErrors[le] : void 0), ue = le != null || w || ce;
375
+ pe(() => {
376
+ r.name && ne.current?.focus();
363
377
  }, [r.name]);
364
- let de = J(() => p.map((e) => `.${e}`).join(","), [p]), G = (e) => {
378
+ let fe = q(() => p.map((e) => `.${e}`).join(","), [p]), W = (e) => {
365
379
  if (e.length === 0) return;
366
380
  let { accepted: t, rejected: n } = Ze(e, a, {
367
381
  allowedExtensions: p,
368
382
  maxFileBytes: h,
369
383
  maxTotalBytes: g
370
384
  });
371
- H(n), t.length > 0 && o([...a, ...t]), U([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
372
- }, { isDragActive: K, handlers: me } = Pe(G), ve = D.openFileLabel ?? tt, ye = (e) => {
385
+ B(n), t.length > 0 && o([...a, ...t]), H([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
386
+ }, { isDragActive: G, handlers: me } = Pe(W), ve = D.openFileLabel ?? tt, ye = (e) => {
373
387
  let t = a.find((t) => t.id === e);
374
- o(a.filter((t) => t.id !== e)), H([]), t && U(D.fileRemovedStatus(t.name));
388
+ o(a.filter((t) => t.id !== e)), B([]), t && H(D.fileRemovedStatus(t.name));
375
389
  }, be = async (e) => {
376
390
  if (e.preventDefault(), e.stopPropagation(), _) try {
377
391
  let e = await _();
378
- e && G(e);
392
+ e && W(e);
379
393
  } catch {}
380
394
  }, xe = () => {
381
- le || C();
395
+ ue || C();
382
396
  }, { colors: Se, typography: Ce } = A ?? {}, we = Ce?.titleClassName ?? "dial-h1-text", Te = d(Ce?.labelClassName ?? "dial-tiny-semi-text", $e.label), Ee = Ce?.helperClassName ?? "dial-tiny-text", Q = c({
383
397
  "--pcf-label-text": Se?.labelText,
384
398
  "--pcf-link-text": Se?.linkText
385
- }), De = D.refinement, Oe = r.context, ke = [...ie.map(({ name: e, reason: t }) => D.fileRejections[t](e)), Oe].filter(Boolean).join("\n"), Ae = D.dropZoneLabel({
399
+ }), De = D.refinement, Oe = r.context, ke = [...oe.map(({ name: e, reason: t }) => D.fileRejections[t](e)), Oe].filter(Boolean).join("\n"), Ae = D.dropZoneLabel({
386
400
  fromDevice: /* @__PURE__ */ X("span", { className: $e.link }),
387
401
  fileManager: _ ? /* @__PURE__ */ X("button", {
388
402
  type: "button",
@@ -396,7 +410,7 @@ var ye = /* @__PURE__ */ function(e) {
396
410
  ...me,
397
411
  children: [
398
412
  /* @__PURE__ */ X(ge, {
399
- isVisible: K,
413
+ isVisible: G,
400
414
  labels: {
401
415
  title: D.dropOverlayTitle,
402
416
  subtitle: D.dropOverlaySubtitle
@@ -414,9 +428,9 @@ var ye = /* @__PURE__ */ function(e) {
414
428
  onCancel: S,
415
429
  onSubmit: xe,
416
430
  isCancelDisabled: w,
417
- isSubmitDisabled: le,
431
+ isSubmitDisabled: ue,
418
432
  isSubmitting: w,
419
- backIcon: /* @__PURE__ */ X(B, {
433
+ backIcon: /* @__PURE__ */ X(R, {
420
434
  size: b.LG,
421
435
  stroke: x,
422
436
  "aria-hidden": !0,
@@ -438,10 +452,10 @@ var ye = /* @__PURE__ */ function(e) {
438
452
  children: [
439
453
  /* @__PURE__ */ X(j, {
440
454
  id: N,
441
- inputRef: te,
455
+ inputRef: ne,
442
456
  value: e.name,
443
457
  onChange: (e) => i("name", e ?? ""),
444
- onBlur: () => re(!0),
458
+ onBlur: () => z(!0),
445
459
  placeholder: D.namePlaceholder,
446
460
  labelProps: {
447
461
  label: D.nameLabel,
@@ -449,47 +463,47 @@ var ye = /* @__PURE__ */ function(e) {
449
463
  },
450
464
  required: !0,
451
465
  "aria-required": !0,
452
- invalid: !!W,
453
- "aria-invalid": !!W,
454
- "aria-describedby": W ? L : void 0
466
+ invalid: !!U,
467
+ "aria-invalid": !!U,
468
+ "aria-describedby": U ? I : void 0
455
469
  }),
456
470
  /* @__PURE__ */ X(T, {
457
- announce: I.Assertive,
458
- id: L,
471
+ announce: F.Assertive,
472
+ id: I,
459
473
  className: Ee,
460
474
  text: r.name ?? ""
461
475
  }),
462
- W && !r.name && /* @__PURE__ */ X(T, {
463
- id: L,
476
+ U && !r.name && /* @__PURE__ */ X(T, {
477
+ id: I,
464
478
  className: Ee,
465
- text: W
479
+ text: U
466
480
  })
467
481
  ]
468
482
  }),
469
483
  /* @__PURE__ */ X(s, {
470
484
  isEnabled: !!v,
471
- fieldId: R,
485
+ fieldId: L,
472
486
  label: D.instructionsLabel,
473
487
  labelClassName: Te,
474
488
  labels: De,
475
- refinement: oe,
476
- disabled: w || se,
489
+ refinement: se,
490
+ disabled: w || ce,
477
491
  children: /* @__PURE__ */ Z("div", {
478
492
  className: "flex flex-1 flex-col gap-2",
479
493
  children: [!v && /* @__PURE__ */ X(M, {
480
- htmlFor: R,
494
+ htmlFor: L,
481
495
  className: Te,
482
496
  label: D.instructionsLabel
483
497
  }), /* @__PURE__ */ X("div", {
484
- ref: ne,
498
+ ref: re,
485
499
  className: d("w-full", t, n),
486
- children: /* @__PURE__ */ X(ue, {
487
- fallback: /* @__PURE__ */ X(z, {}),
500
+ children: /* @__PURE__ */ X(de, {
501
+ fallback: /* @__PURE__ */ X(ie, {}),
488
502
  children: /* @__PURE__ */ X(et, {
489
- id: R,
503
+ id: L,
490
504
  value: e.instructions,
491
505
  onChange: (e) => {
492
- oe.reset(), i("instructions", e);
506
+ se.reset(), i("instructions", e);
493
507
  },
494
508
  height: 176,
495
509
  theme: O,
@@ -500,11 +514,11 @@ var ye = /* @__PURE__ */ function(e) {
500
514
  })
501
515
  }),
502
516
  /* @__PURE__ */ Z("section", {
503
- "aria-labelledby": ee,
517
+ "aria-labelledby": te,
504
518
  className: "flex flex-col gap-2",
505
519
  children: [
506
520
  /* @__PURE__ */ X("h2", {
507
- id: ee,
521
+ id: te,
508
522
  className: Te,
509
523
  children: D.contextLabel
510
524
  }),
@@ -512,17 +526,17 @@ var ye = /* @__PURE__ */ function(e) {
512
526
  label: Ae,
513
527
  ariaLabel: D.dropZoneAriaLabel,
514
528
  description: D.dropZoneHint,
515
- accept: de,
529
+ accept: fe,
516
530
  multiple: !0,
517
531
  disabled: w,
518
- onChange: G,
519
- onReject: G,
532
+ onChange: W,
533
+ onReject: W,
520
534
  errorText: ke || void 0,
521
535
  className: $e.dropZone
522
536
  }),
523
537
  /* @__PURE__ */ X(P, {
524
538
  visuallyHidden: !0,
525
- politeness: I.Assertive,
539
+ politeness: F.Assertive,
526
540
  children: Oe
527
541
  }),
528
542
  a.length > 0 && /* @__PURE__ */ X("ul", {
@@ -548,12 +562,12 @@ var ye = /* @__PURE__ */ function(e) {
548
562
  }),
549
563
  /* @__PURE__ */ X(P, {
550
564
  visuallyHidden: !0,
551
- as: F.Span,
552
- children: w ? D.creatingStatus : ae
565
+ as: ee.Span,
566
+ children: w ? D.creatingStatus : V
553
567
  })
554
568
  ]
555
569
  });
556
- }, rt = le("outline", "pin-off", "PinOff", [
570
+ }, rt = ue("outline", "pin-off", "PinOff", [
557
571
  ["path", {
558
572
  d: "M3 3l18 18",
559
573
  key: "svg-0"
@@ -595,15 +609,15 @@ var ye = /* @__PURE__ */ function(e) {
595
609
  contentType: e.contentType,
596
610
  type: l(e.contentType),
597
611
  status: o.Idle
598
- }), at = G(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: D, mainContent: A, mainContentLabel: j = "Project content", labels: M, styles: N }) => {
599
- let { colors: I, typography: L } = N ?? {}, ee = L?.titleClassName ?? "dial-h2-text", te = L?.panelTitleClassName ?? "dial-body-semi-text", V = L?.sectionTitleClassName ?? "dial-tiny-text", U = L?.bodyClassName ?? "dial-small-text", oe = L?.helperClassName ?? "dial-tiny-text", le = L?.instructionsHeadingClassName ?? "dial-small-semi-text", ue = c({
600
- "--pv-bg": I?.background,
601
- "--pv-border": I?.border,
602
- "--pv-heading-text": I?.headingText,
603
- "--pv-body-text": I?.bodyText,
604
- "--pv-secondary-text": I?.secondaryText
605
- }), de = J(() => e?.contextFiles ?? [], [e]), G = J(() => Qe(de, l), [de, l]), K = l.trim(), fe = q(), pe = J(() => {
606
- let e = d("mb-1 mt-3 first:mt-0", le);
612
+ }), at = W(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: D, mainContent: A, mainContentLabel: j = "Project content", labels: M, styles: N }) => {
613
+ let { colors: F, typography: I } = N ?? {}, te = I?.titleClassName ?? "dial-h1-text", ne = I?.panelTitleClassName ?? "dial-body-semi-text", ae = I?.sectionTitleClassName ?? "dial-tiny-text", H = I?.bodyClassName ?? "dial-small-text", se = I?.helperClassName ?? "dial-tiny-text", ue = I?.instructionsHeadingClassName ?? "dial-small-semi-text", de = c({
614
+ "--pv-bg": F?.background,
615
+ "--pv-border": F?.border,
616
+ "--pv-heading-text": F?.headingText,
617
+ "--pv-body-text": F?.bodyText,
618
+ "--pv-secondary-text": F?.secondaryText
619
+ }), fe = q(() => e?.contextFiles ?? [], [e]), W = q(() => Qe(fe, l), [fe, l]), G = l.trim(), pe = K(), J = q(() => {
620
+ let e = d("mb-1 mt-3 first:mt-0", ue);
607
621
  return {
608
622
  h1: e,
609
623
  h2: e,
@@ -611,11 +625,11 @@ var ye = /* @__PURE__ */ function(e) {
611
625
  h4: e,
612
626
  h5: e,
613
627
  h6: e,
614
- p: U,
615
- ul: U,
616
- ol: U
628
+ p: H,
629
+ ul: H,
630
+ ol: H
617
631
  };
618
- }, [U, le]), Y = (e) => /* @__PURE__ */ X(e, {
632
+ }, [H, ue]), Y = (e) => /* @__PURE__ */ X(e, {
619
633
  size: b.SM,
620
634
  "aria-hidden": !0,
621
635
  stroke: x
@@ -624,27 +638,27 @@ var ye = /* @__PURE__ */ function(e) {
624
638
  return e && m && t.push({
625
639
  key: "publish",
626
640
  label: M.publishLabel,
627
- icon: Y(W),
641
+ icon: Y(U),
628
642
  onClick: m
629
643
  }), e && h && t.push({
630
644
  key: "edit",
631
645
  label: M.editLabel,
632
- icon: Y(H),
646
+ icon: Y(B),
633
647
  onClick: h
634
648
  }), g && t.push({
635
649
  key: "share",
636
650
  label: M.shareLabel,
637
- icon: Y(se),
651
+ icon: Y(ce),
638
652
  onClick: g
639
653
  }), t.push({
640
654
  key: "download",
641
655
  label: M.downloadLabel,
642
- icon: Y(ie),
656
+ icon: Y(oe),
643
657
  onClick: v
644
658
  }), _ && t.push({
645
659
  key: "delete",
646
660
  label: M.deleteLabel,
647
- icon: Y(ce),
661
+ icon: Y(le),
648
662
  danger: !0,
649
663
  onClick: _
650
664
  }), t;
@@ -655,7 +669,7 @@ var ye = /* @__PURE__ */ function(e) {
655
669
  matchReferenceWidth: !1,
656
670
  listClassName: "w-[200px]",
657
671
  children: /* @__PURE__ */ X(k, {
658
- icon: /* @__PURE__ */ X(re, {
672
+ icon: /* @__PURE__ */ X(z, {
659
673
  size: b.MD,
660
674
  "aria-hidden": !0,
661
675
  stroke: x
@@ -663,38 +677,74 @@ var ye = /* @__PURE__ */ function(e) {
663
677
  "aria-label": M.moreActionsLabel
664
678
  })
665
679
  })
680
+ }), ve = () => {
681
+ s || p();
682
+ }, ye = () => t ? /* @__PURE__ */ X(ie, {}) : n ? /* @__PURE__ */ Z("div", {
683
+ className: "flex flex-col items-center gap-3",
684
+ children: [/* @__PURE__ */ X("p", {
685
+ role: "status",
686
+ className: d(H, $.body),
687
+ children: M.errorLabel
688
+ }), /* @__PURE__ */ X(O, {
689
+ label: M.retryLabel,
690
+ onClick: E
691
+ })]
692
+ }) : /* @__PURE__ */ Z("div", {
693
+ className: "flex flex-col items-center gap-3",
694
+ children: [/* @__PURE__ */ X("p", {
695
+ className: d(H, $.body),
696
+ children: M.notFoundLabel
697
+ }), /* @__PURE__ */ X(O, {
698
+ label: M.browseProjectsLabel,
699
+ onClick: D
700
+ })]
666
701
  });
667
- return t || n || i || e == null ? /* @__PURE__ */ X("div", {
668
- style: ue,
702
+ if (t || n || i || e == null) return /* @__PURE__ */ X("div", {
703
+ style: de,
669
704
  className: d("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
670
- children: t ? /* @__PURE__ */ X(z, {}) : n ? /* @__PURE__ */ Z("div", {
671
- className: "flex flex-col items-center gap-3",
672
- children: [/* @__PURE__ */ X("p", {
673
- role: "status",
674
- className: d(U, $.body),
675
- children: M.errorLabel
676
- }), /* @__PURE__ */ X(O, {
677
- label: M.retryLabel,
678
- onClick: E
679
- })]
680
- }) : /* @__PURE__ */ Z("div", {
681
- className: "flex flex-col items-center gap-3",
682
- children: [/* @__PURE__ */ X("p", {
683
- className: d(U, $.body),
684
- children: M.notFoundLabel
685
- }), /* @__PURE__ */ X(O, {
686
- label: M.browseProjectsLabel,
687
- onClick: D
688
- })]
705
+ children: ye()
706
+ });
707
+ let be = () => fe.length === 0 ? /* @__PURE__ */ X(a, { label: M.emptyContextLabel }) : /* @__PURE__ */ Z(me, { children: [
708
+ /* @__PURE__ */ X("div", {
709
+ role: "search",
710
+ children: /* @__PURE__ */ X(re, {
711
+ value: l,
712
+ onChange: (e) => u(e ?? ""),
713
+ placeholder: M.contextSearchPlaceholder,
714
+ clearLabel: M.clearSearchLabel,
715
+ "aria-label": M.contextSearchAriaLabel
716
+ })
717
+ }),
718
+ W.length === 0 ? /* @__PURE__ */ X("p", {
719
+ className: d(se, $.secondary),
720
+ children: M.noContextMatchesLabel
721
+ }) : /* @__PURE__ */ X("ul", {
722
+ className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
723
+ children: W.map((e) => /* @__PURE__ */ X("li", {
724
+ className: "min-w-0",
725
+ children: /* @__PURE__ */ X(he, {
726
+ attachment: it(e),
727
+ searchQuery: G,
728
+ onClick: y,
729
+ isSelected: e.name === C,
730
+ labels: { clickLabel: M.openFileLabel(e.name) }
731
+ })
732
+ }, e.name))
733
+ }),
734
+ /* @__PURE__ */ X(P, {
735
+ visuallyHidden: !0,
736
+ as: ee.Span,
737
+ children: G === "" ? "" : M.contextResultCountLabel(W.length)
689
738
  })
690
- }) : /* @__PURE__ */ Z("div", {
691
- style: ue,
692
- className: d("flex h-full w-full min-w-0 flex-col overflow-y-auto", $.container),
739
+ ] }), xe = !T;
740
+ return /* @__PURE__ */ Z("div", {
741
+ style: de,
742
+ className: d("flex h-full w-full min-w-0 flex-col", $.container),
693
743
  children: [/* @__PURE__ */ Z("header", {
694
- className: d("flex min-w-0 items-center gap-2 px-4 py-3 desktop:px-8", $.header),
744
+ className: d("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
695
745
  children: [
696
746
  /* @__PURE__ */ X(k, {
697
- icon: /* @__PURE__ */ X(B, {
747
+ icon: /* @__PURE__ */ X(R, {
698
748
  size: b.LG,
699
749
  className: "rtl:scale-x-[-1]",
700
750
  "aria-hidden": !0,
@@ -704,25 +754,23 @@ var ye = /* @__PURE__ */ function(e) {
704
754
  onClick: f
705
755
  }),
706
756
  /* @__PURE__ */ X("h1", {
707
- className: d("min-w-0 flex-1", ee, $.title),
757
+ className: d("min-w-0 flex-1", te, $.title),
708
758
  children: /* @__PURE__ */ X(w, { text: e.name })
709
759
  }),
710
760
  /* @__PURE__ */ X(O, {
711
761
  label: o ? M.unpinLabel : M.pinLabel,
712
- iconBefore: X(o ? rt : ae, {
762
+ iconBefore: X(o ? rt : V, {
713
763
  size: b.MD,
714
764
  "aria-hidden": !0,
715
765
  stroke: x
716
766
  }),
717
767
  "aria-disabled": s || void 0,
718
- onClick: () => {
719
- s || p();
720
- },
768
+ onClick: ve,
721
769
  className: "shrink-0"
722
770
  }),
723
- m && /* @__PURE__ */ X(R, {
771
+ m && /* @__PURE__ */ X(L, {
724
772
  label: M.publishLabel,
725
- iconBefore: /* @__PURE__ */ X(W, {
773
+ iconBefore: /* @__PURE__ */ X(U, {
726
774
  size: b.MD,
727
775
  "aria-hidden": !0,
728
776
  stroke: x
@@ -730,9 +778,9 @@ var ye = /* @__PURE__ */ function(e) {
730
778
  onClick: m,
731
779
  className: "hidden shrink-0 desktop:inline-flex"
732
780
  }),
733
- h && /* @__PURE__ */ X(R, {
781
+ h && /* @__PURE__ */ X(L, {
734
782
  label: M.editLabel,
735
- iconBefore: /* @__PURE__ */ X(H, {
783
+ iconBefore: /* @__PURE__ */ X(B, {
736
784
  size: b.MD,
737
785
  "aria-hidden": !0,
738
786
  stroke: x
@@ -744,91 +792,63 @@ var ye = /* @__PURE__ */ function(e) {
744
792
  _e(!0, "desktop:hidden")
745
793
  ]
746
794
  }), /* @__PURE__ */ Z("div", {
747
- className: d("flex min-w-0 flex-1 flex-col", !T && "desktop:flex-row", A == null && !T && "desktop:justify-end"),
795
+ className: d("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", xe && "desktop:flex-row desktop:overflow-hidden", A == null && xe && "desktop:justify-end"),
748
796
  children: [A != null && /* @__PURE__ */ X("section", {
749
797
  "aria-label": j,
750
- className: "flex min-w-0 flex-1 flex-col gap-6 px-4 py-6 desktop:px-8",
751
- children: A
798
+ className: d("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", xe && "desktop:overflow-y-auto"),
799
+ children: /* @__PURE__ */ X("div", {
800
+ className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
801
+ children: A
802
+ })
752
803
  }), /* @__PURE__ */ Z("aside", {
753
- "aria-labelledby": fe,
754
- className: d("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", !T && "desktop:w-[488px] desktop:shrink-0 desktop:border-s desktop:border-t-0", $.panel),
804
+ "aria-labelledby": pe,
805
+ className: d("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", xe && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
755
806
  children: [
756
807
  /* @__PURE__ */ X("h2", {
757
- id: fe,
758
- className: d(te, $.title),
808
+ id: pe,
809
+ className: d(ne, $.title),
759
810
  children: M.detailsLabel
760
811
  }),
761
812
  e.description !== "" && /* @__PURE__ */ Z("section", {
762
813
  className: "flex min-w-0 flex-col gap-1",
763
814
  children: [/* @__PURE__ */ X("h3", {
764
- className: d(V, $.secondary),
815
+ className: d(ae, $.secondary),
765
816
  children: M.descriptionLabel
766
817
  }), /* @__PURE__ */ X("p", {
767
- className: d("wrap-break-word whitespace-pre-line", U, $.body),
818
+ className: d("wrap-break-word whitespace-pre-line", H, $.body),
768
819
  children: e.description
769
820
  })]
770
821
  }),
771
822
  e.instructions !== "" && /* @__PURE__ */ Z("section", {
772
823
  className: "flex min-w-0 flex-col gap-1",
773
824
  children: [/* @__PURE__ */ X("h3", {
774
- className: d(V, $.secondary),
825
+ className: d(ae, $.secondary),
775
826
  children: M.instructionsLabel
776
827
  }), /* @__PURE__ */ X("div", {
777
- className: d("min-w-0 wrap-break-word", U, $.body),
828
+ className: d("min-w-0 wrap-break-word", H, $.body),
778
829
  children: /* @__PURE__ */ X(r, {
779
830
  content: e.instructions,
780
- classNames: pe
831
+ classNames: J
781
832
  })
782
833
  })]
783
834
  }),
784
835
  /* @__PURE__ */ Z("section", {
785
836
  className: "flex min-w-0 flex-col gap-2",
786
837
  children: [/* @__PURE__ */ X("h3", {
787
- className: d(V, $.secondary),
838
+ className: d(ae, $.secondary),
788
839
  children: M.contextLabel
789
- }), de.length === 0 ? /* @__PURE__ */ X(a, { label: M.emptyContextLabel }) : /* @__PURE__ */ Z(me, { children: [
790
- /* @__PURE__ */ X("div", {
791
- role: "search",
792
- children: /* @__PURE__ */ X(ne, {
793
- value: l,
794
- onChange: (e) => u(e ?? ""),
795
- placeholder: M.contextSearchPlaceholder,
796
- clearLabel: M.clearSearchLabel,
797
- "aria-label": M.contextSearchAriaLabel
798
- })
799
- }),
800
- G.length === 0 ? /* @__PURE__ */ X("p", {
801
- className: d(oe, $.secondary),
802
- children: M.noContextMatchesLabel
803
- }) : /* @__PURE__ */ X("ul", {
804
- className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
805
- children: G.map((e) => /* @__PURE__ */ X("li", {
806
- className: "min-w-0",
807
- children: /* @__PURE__ */ X(he, {
808
- attachment: it(e),
809
- searchQuery: K,
810
- onClick: y,
811
- isSelected: e.name === C,
812
- labels: { clickLabel: M.openFileLabel(e.name) }
813
- })
814
- }, e.name))
815
- }),
816
- /* @__PURE__ */ X(P, {
817
- visuallyHidden: !0,
818
- as: F.Span,
819
- children: K === "" ? "" : M.contextResultCountLabel(G.length)
820
- })
821
- ] })]
840
+ }), be()]
822
841
  })
823
842
  ]
824
843
  })]
825
844
  })]
826
845
  });
827
846
  }), ot = {
828
- readDot: "_readDot_1pbwn_1",
829
- unreadDot: "_unreadDot_1pbwn_5"
847
+ row: "_row_1030u_1",
848
+ readDot: "_readDot_1030u_6",
849
+ unreadDot: "_unreadDot_1030u_10"
830
850
  }, st = ({ item: e, labels: t, rowTitleClassName: n, unreadRowTitleClassName: r, onOpen: i, onRename: a, onDelete: o }) => {
831
- let s = q(), [c, l] = Y(!1), u = e.isUnread === !0, f = J(() => [...a ? [{
851
+ let s = K(), [c, l] = Y(!1), u = e.isUnread === !0, f = q(() => [...a ? [{
832
852
  key: "rename",
833
853
  label: t.renameLabel,
834
854
  onClick: () => a(e.id)
@@ -845,7 +865,7 @@ var ye = /* @__PURE__ */ function(e) {
845
865
  a
846
866
  ]);
847
867
  return /* @__PURE__ */ Z("li", {
848
- className: "group/row flex min-w-0 items-center gap-1 rounded-xl focus-within:bg-(--bg-accent-primary-alpha,rgba(92,141,234,0.15)) hover:bg-(--bg-accent-primary-alpha,rgba(92,141,234,0.15))",
868
+ className: d("group/row flex min-w-0 items-center gap-1 rounded-xl", ot.row),
849
869
  children: [
850
870
  /* @__PURE__ */ Z("button", {
851
871
  type: "button",
@@ -875,7 +895,7 @@ var ye = /* @__PURE__ */ function(e) {
875
895
  "aria-label": t.moreActionsLabel(e.title),
876
896
  size: C.Small,
877
897
  className: d("me-2 shrink-0", !c && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
878
- icon: /* @__PURE__ */ X(re, {
898
+ icon: /* @__PURE__ */ X(z, {
879
899
  "aria-hidden": !0,
880
900
  size: b.SM,
881
901
  stroke: x
@@ -884,208 +904,214 @@ var ye = /* @__PURE__ */ function(e) {
884
904
  })
885
905
  ]
886
906
  });
887
- }, ct = G(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: o = !1, onLoadMore: s, onOpen: l, onRename: u, onDelete: f, labels: p, typography: m, colors: h }) => {
888
- let g = q(), _ = m?.titleClassName ?? "dial-body-semi-text", v = m?.rowTitleClassName ?? "dial-body-text", y = m?.unreadRowTitleClassName ?? "dial-body-semi-text", b = J(() => c({
889
- "--pcl-read-dot": h?.readDot,
890
- "--pcl-unread-dot": h?.unreadDot
891
- }), [h?.readDot, h?.unreadDot]), x = m?.messageClassName ?? "dial-small-text", S = !t && !n && e.length === 0;
892
- return /* @__PURE__ */ Z("section", {
893
- "aria-labelledby": S ? void 0 : g,
894
- "aria-label": S ? p.title : void 0,
907
+ }, ct = W(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: o = !1, onLoadMore: s, isEmptyStateShown: l = !0, onOpen: u, onRename: f, onDelete: p, labels: m, typography: h, colors: g }) => {
908
+ let _ = K(), v = h?.titleClassName ?? "dial-body-semi-text", y = h?.rowTitleClassName ?? "dial-body-text", b = h?.unreadRowTitleClassName ?? "dial-body-semi-text", x = q(() => c({
909
+ "--pcl-read-dot": g?.readDot,
910
+ "--pcl-unread-dot": g?.unreadDot,
911
+ "--pcl-row-hover": g?.rowHoverBackground
912
+ }), [
913
+ g?.readDot,
914
+ g?.unreadDot,
915
+ g?.rowHoverBackground
916
+ ]), S = h?.messageClassName ?? "dial-small-text", C = !t && !n && e.length === 0;
917
+ return C && !l ? null : /* @__PURE__ */ Z("section", {
918
+ "aria-labelledby": C ? void 0 : _,
919
+ "aria-label": C ? m.title : void 0,
895
920
  className: "flex min-w-0 flex-col gap-2 pt-3",
896
- style: b,
897
- children: [!S && /* @__PURE__ */ X("h2", {
898
- id: g,
899
- className: d("m-0", _),
900
- children: p.title
921
+ style: x,
922
+ children: [!C && /* @__PURE__ */ X("h2", {
923
+ id: _,
924
+ className: d("m-0", v),
925
+ children: m.title
901
926
  }), t ? /* @__PURE__ */ Z("div", {
902
927
  role: "status",
903
928
  className: "flex justify-center py-6",
904
929
  children: [/* @__PURE__ */ X("span", {
905
930
  "aria-hidden": !0,
906
- children: /* @__PURE__ */ X(z, {})
931
+ children: /* @__PURE__ */ X(ie, {})
907
932
  }), /* @__PURE__ */ X("span", {
908
933
  className: "sr-only",
909
- children: p.loadingLabel
934
+ children: m.loadingLabel
910
935
  })]
911
936
  }) : n ? /* @__PURE__ */ Z("div", {
912
937
  role: "status",
913
938
  className: "flex flex-col items-center gap-3 py-6 text-center",
914
939
  children: [/* @__PURE__ */ X("p", {
915
- className: d("m-0", x),
916
- children: p.errorLabel
940
+ className: d("m-0", S),
941
+ children: m.errorLabel
917
942
  }), /* @__PURE__ */ X(O, {
918
- label: p.retryLabel,
943
+ label: m.retryLabel,
919
944
  onClick: r
920
945
  })]
921
- }) : S ? /* @__PURE__ */ X("div", {
946
+ }) : C ? /* @__PURE__ */ X("div", {
922
947
  role: "status",
923
948
  children: /* @__PURE__ */ X(a, {
924
- label: p.emptyTitle,
925
- description: p.emptyDescription
949
+ label: m.emptyTitle,
950
+ description: m.emptyDescription
926
951
  })
927
952
  }) : /* @__PURE__ */ Z(me, { children: [/* @__PURE__ */ X("ul", {
928
953
  className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
929
954
  children: e.map((e) => /* @__PURE__ */ X(st, {
930
955
  item: e,
931
- labels: p,
932
- rowTitleClassName: v,
933
- unreadRowTitleClassName: y,
934
- onOpen: l,
935
- onRename: u,
936
- onDelete: f
956
+ labels: m,
957
+ rowTitleClassName: y,
958
+ unreadRowTitleClassName: b,
959
+ onOpen: u,
960
+ onRename: f,
961
+ onDelete: p
937
962
  }, e.id))
938
963
  }), i && s && /* @__PURE__ */ X(N, {
939
964
  className: "self-start",
940
- label: p.loadMoreLabel ?? "See more",
965
+ label: m.loadMoreLabel ?? "See more",
941
966
  disabled: o,
942
967
  onClick: s
943
968
  })] })]
944
969
  });
945
- }), lt = G(({ composer: t, outputs: n, items: r, isLoading: i = !1, hasError: a = !1, onRetry: o, hasMore: s, isLoadingMore: c, onLoadMore: l, onOpen: u, onRename: d, onDelete: f, labels: p, listTypography: m, listColors: h }) => {
946
- let _ = q(), y = pe(null), [b, x] = Y(null), [S, C] = Y(""), [w, T] = Y(), [E, D] = Y(!1), [O, k] = Y(null), [A, M] = Y(!1), N = pe(null), P = K(() => {
947
- N.current = document.activeElement;
948
- }, []), F = K(() => {
949
- let e = N.current;
950
- N.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
951
- }, []), I = K((e) => {
952
- N.current = null, window.setTimeout(() => {
953
- let t = y.current;
970
+ }), lt = W(({ composer: t, 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: _ }) => {
971
+ let y = K(), b = J(null), [x, S] = Y(null), [C, w] = Y(""), [T, E] = Y(), [D, O] = Y(!1), [k, A] = Y(null), [M, N] = Y(!1), P = J(null), ee = G(() => {
972
+ P.current = document.activeElement;
973
+ }, []), F = G(() => {
974
+ let e = P.current;
975
+ P.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
976
+ }, []), I = G((e) => {
977
+ P.current = null, window.setTimeout(() => {
978
+ let t = b.current;
954
979
  if (!t) return;
955
980
  let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
956
981
  r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
957
982
  }, 0);
958
- }, []), L = K((e) => r.find((t) => t.id === e) ?? null, [r]);
959
- fe(() => {
960
- let e = (e) => e != null && r.some((t) => t.id === e.id);
961
- b && !E && !e(b) && (x(null), I(0)), O && !A && !e(O) && (k(null), I(0));
983
+ }, []), L = G((e) => i.find((t) => t.id === e) ?? null, [i]);
984
+ pe(() => {
985
+ let e = (e) => e != null && i.some((t) => t.id === e.id);
986
+ x && !D && !e(x) && (S(null), I(0)), k && !M && !e(k) && (A(null), I(0));
962
987
  }, [
963
- O,
988
+ k,
964
989
  I,
965
- A,
966
- E,
967
- r,
968
- b
990
+ M,
991
+ D,
992
+ i,
993
+ x
969
994
  ]);
970
- let R = K((e) => {
971
- P();
995
+ let re = G((e) => {
996
+ ee();
972
997
  let t = L(e);
973
- x(t), C(t?.title ?? ""), T(void 0);
974
- }, [L, P]), ne = K((e) => {
975
- P(), k(L(e));
976
- }, [L, P]), z = K(() => {
977
- E || (x(null), F());
978
- }, [E, F]), B = K(() => {
979
- A || (k(null), F());
980
- }, [A, F]), V = K(async () => {
981
- if (!b || !d || E) return;
982
- let e = S.trim();
983
- if (!e) T(p.renameEmptyError);
998
+ S(t), w(t?.title ?? ""), E(void 0);
999
+ }, [L, ee]), ie = G((e) => {
1000
+ ee(), A(L(e));
1001
+ }, [L, ee]), R = G(() => {
1002
+ D || (S(null), F());
1003
+ }, [D, F]), ae = G(() => {
1004
+ M || (A(null), F());
1005
+ }, [M, F]), z = G(async () => {
1006
+ if (!x || !f || D) return;
1007
+ let e = C.trim();
1008
+ if (!e) E(m.renameEmptyError);
984
1009
  else {
985
- D(!0);
1010
+ O(!0);
986
1011
  try {
987
- await d(b.id, e), x(null), F();
1012
+ await f(x.id, e), S(null), F();
988
1013
  } catch {} finally {
989
- D(!1);
1014
+ O(!1);
990
1015
  }
991
1016
  }
992
1017
  }, [
993
- E,
994
- p.renameEmptyError,
995
- d,
996
- b,
997
- S,
1018
+ D,
1019
+ m.renameEmptyError,
1020
+ f,
1021
+ x,
1022
+ C,
998
1023
  F
999
- ]), re = K((e) => {
1000
- e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), V());
1001
- }, [V]), ie = K(async () => {
1002
- if (!O || !f) return;
1003
- let e = r.findIndex((e) => e.id === O.id);
1004
- M(!0);
1024
+ ]), oe = G((e) => {
1025
+ e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), z());
1026
+ }, [z]), B = G(async () => {
1027
+ if (!k || !p) return;
1028
+ let e = i.findIndex((e) => e.id === k.id);
1029
+ N(!0);
1005
1030
  try {
1006
- await f(O.id), k(null), I(Math.max(e, 0));
1031
+ await p(k.id), A(null), I(Math.max(e, 0));
1007
1032
  } catch {} finally {
1008
- M(!1);
1033
+ N(!1);
1009
1034
  }
1010
1035
  }, [
1011
- O,
1036
+ k,
1012
1037
  I,
1013
- r,
1014
- f
1015
- ]), H = J(() => [{
1016
- label: p.renameCancelLabel ?? "Cancel",
1038
+ i,
1039
+ p
1040
+ ]), V = q(() => [{
1041
+ label: m.renameCancelLabel ?? "Cancel",
1017
1042
  variant: v.Primary,
1018
1043
  appearance: g.Ghost,
1019
- disabled: E,
1020
- onClick: z
1044
+ disabled: D,
1045
+ onClick: R
1021
1046
  }, {
1022
- label: p.renameSaveLabel,
1047
+ label: m.renameSaveLabel,
1023
1048
  variant: v.Primary,
1024
- disabled: E,
1049
+ disabled: D,
1025
1050
  onClick: () => {
1026
- V();
1051
+ z();
1027
1052
  }
1028
1053
  }], [
1054
+ R,
1029
1055
  z,
1030
- V,
1031
- E,
1032
- p.renameCancelLabel,
1033
- p.renameSaveLabel
1056
+ D,
1057
+ m.renameCancelLabel,
1058
+ m.renameSaveLabel
1034
1059
  ]);
1035
1060
  return /* @__PURE__ */ Z(me, { children: [
1036
1061
  t,
1037
1062
  n,
1038
1063
  /* @__PURE__ */ X("div", {
1039
- ref: y,
1064
+ ref: b,
1040
1065
  className: "contents",
1041
1066
  children: /* @__PURE__ */ X(ct, {
1042
- items: r,
1043
- isLoading: i,
1044
- hasError: a,
1045
- onRetry: o,
1046
- hasMore: s,
1047
- isLoadingMore: c,
1048
- onLoadMore: l,
1049
- onOpen: u,
1050
- onRename: d ? R : void 0,
1051
- onDelete: f ? ne : void 0,
1052
- labels: p.list,
1053
- typography: m,
1054
- colors: h
1067
+ items: i,
1068
+ isLoading: a,
1069
+ hasError: o,
1070
+ onRetry: s,
1071
+ hasMore: c,
1072
+ isLoadingMore: l,
1073
+ onLoadMore: u,
1074
+ isEmptyStateShown: !r,
1075
+ onOpen: d,
1076
+ onRename: f ? re : void 0,
1077
+ onDelete: p ? ie : void 0,
1078
+ labels: m.list,
1079
+ typography: h,
1080
+ colors: _
1055
1081
  })
1056
1082
  }),
1057
- b && /* @__PURE__ */ X(ee, {
1083
+ x && /* @__PURE__ */ X(te, {
1058
1084
  open: !0,
1059
- header: p.renameTitle,
1060
- size: te.Sm,
1061
- mainButtons: H,
1062
- onClose: z,
1085
+ header: m.renameTitle,
1086
+ size: ne.Sm,
1087
+ mainButtons: V,
1088
+ onClose: R,
1063
1089
  children: /* @__PURE__ */ X("div", {
1064
1090
  className: "px-6 py-4",
1065
1091
  children: /* @__PURE__ */ X(j, {
1066
- id: _,
1067
- value: S,
1068
- labelProps: { label: p.renameInputLabel },
1069
- error: w,
1070
- disabled: E,
1071
- onKeyDown: re,
1092
+ id: y,
1093
+ value: C,
1094
+ labelProps: { label: m.renameInputLabel },
1095
+ error: T,
1096
+ disabled: D,
1097
+ onKeyDown: oe,
1072
1098
  onChange: (e) => {
1073
- C(e ?? ""), T(void 0);
1099
+ w(e ?? ""), E(void 0);
1074
1100
  }
1075
1101
  })
1076
1102
  })
1077
1103
  }),
1078
- O && /* @__PURE__ */ X(e, {
1104
+ k && /* @__PURE__ */ X(e, {
1079
1105
  open: !0,
1080
- title: p.deleteTitle(O.title),
1081
- names: [O.title],
1082
- message: p.deleteDescription,
1083
- labels: p.deleteDialog,
1084
- isLoading: A,
1106
+ title: m.deleteTitle(k.title),
1107
+ names: [k.title],
1108
+ message: m.deleteDescription,
1109
+ labels: m.deleteDialog,
1110
+ isLoading: M,
1085
1111
  onConfirm: () => {
1086
- ie();
1112
+ B();
1087
1113
  },
1088
- onClose: B
1114
+ onClose: ae
1089
1115
  })
1090
1116
  ] });
1091
1117
  }), ut = {
@@ -1097,14 +1123,14 @@ var ye = /* @__PURE__ */ function(e) {
1097
1123
  contentType: e.contentType,
1098
1124
  type: l(e.contentType),
1099
1125
  status: o.Idle
1100
- }), pt = G(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = dt, labels: o, styles: s }) => {
1101
- let l = q(), u = q(), f = pe(null), p = pe(!1), [m, h] = Y(!1), { colors: g, typography: _ } = s ?? {}, v = _?.titleClassName ?? "dial-body-semi-text", y = _?.helperClassName ?? "dial-tiny-text", b = o?.title ?? "Outputs", x = o?.errorLabel ?? "Could not load outputs", S = J(() => c({
1126
+ }), pt = W(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = dt, labels: o, styles: s }) => {
1127
+ let l = K(), u = K(), f = J(null), p = J(!1), [m, h] = Y(!1), { colors: g, typography: _ } = s ?? {}, v = _?.titleClassName ?? "dial-body-semi-text", y = _?.helperClassName ?? "dial-tiny-text", b = o?.title ?? "Outputs", x = o?.errorLabel ?? "Could not load outputs", S = q(() => c({
1102
1128
  "--po-heading-text": g?.headingText,
1103
1129
  "--po-secondary-text": g?.secondaryText
1104
- }), [g?.headingText, g?.secondaryText]), C = K(() => h((e) => !e), []), w = K(() => {
1130
+ }), [g?.headingText, g?.secondaryText]), C = G(() => h((e) => !e), []), w = G(() => {
1105
1131
  p.current = !0, i?.();
1106
1132
  }, [i]);
1107
- fe(() => {
1133
+ pe(() => {
1108
1134
  !r && p.current && (p.current = !1, f.current?.focus());
1109
1135
  }, [r]);
1110
1136
  let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), k = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, j = o?.showLessLabel ?? "Show less";
@@ -1154,12 +1180,12 @@ var ye = /* @__PURE__ */ function(e) {
1154
1180
  children: r ? x : ""
1155
1181
  })]
1156
1182
  });
1157
- }), mt = G(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Z("nav", {
1183
+ }), mt = W(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Z("nav", {
1158
1184
  "aria-label": i,
1159
1185
  className: d("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1160
1186
  children: [/* @__PURE__ */ X(k, {
1161
1187
  "aria-label": i,
1162
- icon: /* @__PURE__ */ X(B, {
1188
+ icon: /* @__PURE__ */ X(R, {
1163
1189
  "aria-hidden": !0,
1164
1190
  size: b.MD,
1165
1191
  stroke: x,