@epam/ai-dial-projects 1.4.0-dev.132 → 1.4.0-dev.133

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,10 +1,10 @@
1
1
  import { ActionMenu as e, ConfirmationDialog as t, ConfirmationIdentityRow as n, DeleteConfirmationDialog as r, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as i, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as a, MarkdownRenderer as o, PROHIBITED_CONVERSATION_NAME_CHARS_RE as s, PanelEmptyState as c, RequestStatus as l, ResourceSummary as u, TextRefinementField as d, buildCssVars as f, getAttachmentTypeFromMime as p, inferMimeTypeFromPath as m, mergeClasses as h, useAvailableHeightCap as g, useIsMobile as _, useTextRefinement as v } from "@epam/ai-dial-chat-shared";
2
- import { Button as y, ButtonAppearance as ee, ButtonDropdown as b, ButtonVariant as x, CaptionText as S, CardShell as C, ConfirmationPopupVariant as w, DIAL_ICON_SIZE as T, DIAL_KIT_ICON_STROKE as E, ElementSize as D, EllipsisTooltip as O, ErrorText as k, FileDropzone as te, FolderPath as ne, GhostButton as A, GhostIconButton as re, Highlight as j, Input as ie, Label as M, LinkButton as N, LiveRegion as P, LiveRegionElement as ae, LiveRegionPoliteness as F, MenuItemMark as I, NeutralButton as L, Popup as oe, PopupSize as se, Search as ce, Spinner as le } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowNarrowLeft as R, IconArrowsSort as ue, IconDotsVertical as de, IconDownload as fe, IconPencilMinus as pe, IconPin as z, IconPinFilled as B, IconPlus as V, IconShare as me, IconSparkles as he, IconTrashX as ge, IconUserOff as _e, IconWorldOff as ve, IconWorldShare as ye, createReactComponent as be } from "@tabler/icons-react";
2
+ import { Button as y, ButtonAppearance as ee, ButtonDropdown as b, ButtonVariant as x, CaptionText as S, CardShell as C, ConfirmationPopupVariant as w, DIAL_ICON_SIZE as T, DIAL_KIT_ICON_STROKE as E, ElementSize as D, EllipsisTooltip as O, ErrorText as k, FileDropzone as te, FolderPath as A, GhostButton as j, GhostIconButton as ne, Highlight as M, Input as re, Label as N, LinkButton as P, LiveRegion as F, LiveRegionElement as ie, LiveRegionPoliteness as I, MenuItemMark as L, NeutralButton as R, Popup as ae, PopupSize as oe, Search as se, Spinner as ce } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowNarrowLeft as z, IconArrowsSort as le, IconDotsVertical as ue, IconDownload as de, IconPencilMinus as fe, IconPin as pe, IconPinFilled as B, IconPlus as me, IconShare as he, IconSparkles as V, IconTrashX as ge, IconUserOff as _e, IconWorldOff as ve, IconWorldShare as ye, createReactComponent as be } from "@tabler/icons-react";
4
4
  import { Suspense as xe, lazy as Se, memo as H, useCallback as U, useEffect as Ce, useId as W, useMemo as G, useRef as K, useState as q } from "react";
5
5
  import { Fragment as we, jsx as J, jsxs as Y } from "react/jsx-runtime";
6
6
  import { AttachmentCard as Te, FileDndOverlay as Ee } from "@epam/ai-dial-attachment-input";
7
- import { BuilderFormActionsOrder as X, BuilderFormContainer as De } from "@epam/ai-dial-builder-form";
7
+ import { BuilderFormActionsOrder as De, BuilderFormContainer as X } from "@epam/ai-dial-builder-form";
8
8
  import { LazyMarkdownEditor as Oe } from "@epam/ai-dial-ui-kit/editors";
9
9
  //#region src/types/projects-sort-key.ts
10
10
  var ke = /* @__PURE__ */ function(e) {
@@ -49,12 +49,12 @@ var ke = /* @__PURE__ */ function(e) {
49
49
  aboveLink: "_aboveLink_13sy6_57",
50
50
  interactive: "_interactive_13sy6_62"
51
51
  }, Ie = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Le = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Re = ({ 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: f, pathLabelClassName: p, pathLeafClassName: m }) => {
52
- let g = /* @__PURE__ */ J(j, {
52
+ let g = /* @__PURE__ */ J(M, {
53
53
  text: e.name,
54
54
  query: t,
55
55
  maxLines: 1,
56
56
  className: h("min-w-0", f, Q.title, s != null && Q.aboveLink)
57
- }), _ = /* @__PURE__ */ J(ne, {
57
+ }), _ = /* @__PURE__ */ J(A, {
58
58
  segments: Ie(n, e.parentPath),
59
59
  ariaLabel: r,
60
60
  labelClassName: h(p, Q.path),
@@ -93,12 +93,12 @@ var ke = /* @__PURE__ */ function(e) {
93
93
  className: "sr-only",
94
94
  children: i
95
95
  })]
96
- }) : /* @__PURE__ */ J(re, {
96
+ }) : /* @__PURE__ */ J(ne, {
97
97
  size: D.Small,
98
98
  icon: e.isPinned ? /* @__PURE__ */ J(B, {
99
99
  size: T.SM,
100
100
  "aria-hidden": !0
101
- }) : /* @__PURE__ */ J(z, {
101
+ }) : /* @__PURE__ */ J(pe, {
102
102
  size: T.SM,
103
103
  "aria-hidden": !0,
104
104
  stroke: E
@@ -132,7 +132,7 @@ var ke = /* @__PURE__ */ function(e) {
132
132
  subtitle: "_subtitle_4rer8_5",
133
133
  sortButton: "_sortButton_4rer8_9"
134
134
  }, Be = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: o, onOpenProject: s, getProjectHref: l, searchQuery: u, onSearchQueryChange: d, sortKey: p, onSortKeyChange: m, labels: g, locale: v, styles: S }) => {
135
- let { colors: C, typography: w } = S ?? {}, O = w?.titleClassName ?? "dial-h1-text", k = w?.subtitleClassName ?? "dial-body-text", te = w?.cardTitleClassName ?? "dial-body-semi-text", ne = w?.pathLabelClassName ?? "dial-tiny-text", re = w?.pathLeafClassName ?? "dial-tiny-semi-text", j = w?.updatedAtClassName ?? "dial-tiny-text", ie = w?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", M = f({
135
+ let { colors: C, typography: w } = S ?? {}, O = w?.titleClassName ?? "dial-h1-text", k = w?.subtitleClassName ?? "dial-body-text", te = w?.cardTitleClassName ?? "dial-body-semi-text", A = w?.pathLabelClassName ?? "dial-tiny-text", ne = w?.pathLeafClassName ?? "dial-tiny-semi-text", M = w?.updatedAtClassName ?? "dial-tiny-text", re = w?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", N = f({
136
136
  "--pr-bg": C?.background,
137
137
  "--pr-subtitle-text": C?.subtitleText,
138
138
  "--pr-sort-text": C?.sortButtonText,
@@ -141,36 +141,36 @@ var ke = /* @__PURE__ */ function(e) {
141
141
  "--pr-updated-at-text": C?.updatedAtText,
142
142
  "--pr-path-text": C?.pathText,
143
143
  "--pr-card-focus-outline": C?.cardFocusOutline
144
- }), N = _(), F = G(() => Date.now(), [e]), L = u.trim(), oe = r.length > 0, se = oe && e.length === 0, R = G(() => je(Ae(e, u), p, v), [
144
+ }), P = _(), I = G(() => Date.now(), [e]), R = u.trim(), ae = r.length > 0, oe = ae && e.length === 0, z = G(() => je(Ae(e, u), p, v), [
145
145
  e,
146
146
  u,
147
147
  p,
148
148
  v
149
- ]), de = g.sortOptions.find((e) => e.value === p)?.label ?? g.sortLabel, fe = G(() => g.sortOptions.map((e) => ({
149
+ ]), ue = g.sortOptions.find((e) => e.value === p)?.label ?? g.sortLabel, de = G(() => g.sortOptions.map((e) => ({
150
150
  key: e.value,
151
151
  label: e.label,
152
- mark: I.Check,
152
+ mark: L.Check,
153
153
  checked: e.value === p,
154
154
  onClick: () => m(e.value)
155
155
  })), [
156
156
  g.sortOptions,
157
157
  p,
158
158
  m
159
- ]), pe = (e) => {
159
+ ]), fe = (e) => {
160
160
  d(e ?? "");
161
- }, z = () => {
162
- if (!t) return n ? g.errorLabel : oe ? g.incompleteLabel : e.length === 0 ? g.emptyStateLabel : R.length === 0 ? g.noResultsLabel : g.resultCountLabel(R.length);
161
+ }, pe = () => {
162
+ if (!t) return n ? g.errorLabel : ae ? g.incompleteLabel : e.length === 0 ? g.emptyStateLabel : z.length === 0 ? g.noResultsLabel : g.resultCountLabel(z.length);
163
163
  }, B = (e, t) => a ? /* @__PURE__ */ J(y, {
164
164
  label: g.createProjectLabel,
165
165
  variant: e,
166
166
  onClick: a,
167
167
  className: h("shrink-0", t)
168
- }) : void 0, me = () => t ? /* @__PURE__ */ J(le, { ariaLabel: g.loadingAriaLabel ?? "Loading projects" }) : n || se ? /* @__PURE__ */ Y("div", {
168
+ }) : void 0, he = () => t ? /* @__PURE__ */ J(ce, { ariaLabel: g.loadingAriaLabel ?? "Loading projects" }) : n || oe ? /* @__PURE__ */ Y("div", {
169
169
  className: "flex flex-col items-center gap-3",
170
170
  children: [/* @__PURE__ */ J("p", {
171
171
  className: h(k, ze.subtitle),
172
172
  children: n ? g.errorLabel : g.incompleteLabel
173
- }), /* @__PURE__ */ J(A, {
173
+ }), /* @__PURE__ */ J(j, {
174
174
  label: g.retryLabel,
175
175
  onClick: i
176
176
  })]
@@ -180,16 +180,16 @@ var ke = /* @__PURE__ */ function(e) {
180
180
  action: B(x.Secondary, "mt-2"),
181
181
  containerClassName: ge,
182
182
  labelClassName: "mt-3",
183
- descriptionClassName: ie
184
- }) : R.length === 0 ? /* @__PURE__ */ J(c, {
183
+ descriptionClassName: re
184
+ }) : z.length === 0 ? /* @__PURE__ */ J(c, {
185
185
  label: g.noResultsLabel,
186
186
  containerClassName: ge,
187
187
  labelClassName: "mt-3"
188
188
  }) : /* @__PURE__ */ J("ul", {
189
189
  className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-4 p-0 desktop:grid-cols-3 desktop:gap-5",
190
- children: R.map((e) => /* @__PURE__ */ J(Re, {
190
+ children: z.map((e) => /* @__PURE__ */ J(Re, {
191
191
  project: e,
192
- searchQuery: L,
192
+ searchQuery: R,
193
193
  sourceLabel: g.sourceLabels[e.source],
194
194
  folderPathLabel: g.folderPathLabel,
195
195
  pinnedLabel: g.pinnedLabel ?? "Pinned",
@@ -197,21 +197,21 @@ var ke = /* @__PURE__ */ function(e) {
197
197
  onTogglePin: o,
198
198
  href: l?.(e.id),
199
199
  onOpen: s,
200
- now: F,
200
+ now: I,
201
201
  locale: v,
202
- updatedAtClassName: j,
202
+ updatedAtClassName: M,
203
203
  titleClassName: te,
204
- pathLabelClassName: ne,
205
- pathLeafClassName: re
204
+ pathLabelClassName: A,
205
+ pathLeafClassName: ne
206
206
  }, e.id))
207
- }), he = t || n || se, ge = "mt-6 p-3 desktop:mt-0";
207
+ }), V = t || n || oe, ge = "mt-6 p-3 desktop:mt-0";
208
208
  return /* @__PURE__ */ Y("div", {
209
- style: M,
209
+ style: N,
210
210
  className: h("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", ze.container),
211
211
  children: [/* @__PURE__ */ Y("div", {
212
212
  className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
213
213
  children: [
214
- N ? /* @__PURE__ */ J("h1", {
214
+ P ? /* @__PURE__ */ J("h1", {
215
215
  className: "sr-only",
216
216
  children: g.title
217
217
  }) : /* @__PURE__ */ Y("div", {
@@ -232,26 +232,26 @@ var ke = /* @__PURE__ */ function(e) {
232
232
  children: [/* @__PURE__ */ J("div", {
233
233
  role: "search",
234
234
  className: "min-w-0 flex-1",
235
- children: /* @__PURE__ */ J(ce, {
235
+ children: /* @__PURE__ */ J(se, {
236
236
  value: u,
237
- onChange: pe,
237
+ onChange: fe,
238
238
  placeholder: g.searchPlaceholder,
239
239
  clearLabel: g.clearSearchLabel,
240
240
  "aria-label": g.searchAriaLabel,
241
- size: N ? D.Standard : D.Large
241
+ size: P ? D.Standard : D.Large
242
242
  })
243
243
  }), g.sortOptions.length > 0 && /* @__PURE__ */ J("div", {
244
244
  role: "group",
245
245
  "aria-label": g.sortLabel,
246
246
  className: "shrink-0",
247
247
  children: /* @__PURE__ */ J(b, {
248
- items: fe,
249
- label: de,
248
+ items: de,
249
+ label: ue,
250
250
  variant: x.Primary,
251
251
  appearance: ee.Ghost,
252
- size: N ? D.Small : D.Standard,
253
- iconBefore: /* @__PURE__ */ J(ue, {
254
- size: N ? T.SM : T.MD,
252
+ size: P ? D.Small : D.Standard,
253
+ iconBefore: /* @__PURE__ */ J(le, {
254
+ size: P ? T.SM : T.MD,
255
255
  "aria-hidden": !0,
256
256
  stroke: E
257
257
  }),
@@ -259,31 +259,31 @@ var ke = /* @__PURE__ */ function(e) {
259
259
  })
260
260
  })]
261
261
  }),
262
- /* @__PURE__ */ J(P, {
262
+ /* @__PURE__ */ J(F, {
263
263
  visuallyHidden: !0,
264
- as: ae.Span,
265
- children: z()
264
+ as: ie.Span,
265
+ children: pe()
266
266
  }),
267
267
  /* @__PURE__ */ Y("div", {
268
268
  className: "flex w-full min-w-0 flex-1 flex-col items-center gap-4 px-4 pb-20 desktop:gap-5 desktop:px-8 desktop:pt-6 desktop:pb-8",
269
- children: [oe && !t && !n && !se && /* @__PURE__ */ Y("div", {
269
+ children: [ae && !t && !n && !oe && /* @__PURE__ */ Y("div", {
270
270
  className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
271
271
  children: [/* @__PURE__ */ J("p", {
272
272
  className: h(k, ze.subtitle),
273
273
  children: g.incompleteLabel
274
- }), /* @__PURE__ */ J(A, {
274
+ }), /* @__PURE__ */ J(j, {
275
275
  label: g.retryLabel,
276
276
  onClick: i
277
277
  })]
278
278
  }), /* @__PURE__ */ J("div", {
279
- className: h("flex w-full max-w-[1116px] min-w-0 flex-col items-center", he && "flex-1 justify-center"),
280
- children: me()
279
+ className: h("flex w-full max-w-[1116px] min-w-0 flex-col items-center", V && "flex-1 justify-center"),
280
+ children: he()
281
281
  })]
282
282
  })
283
283
  ]
284
- }), N && a && /* @__PURE__ */ J(y, {
284
+ }), P && a && /* @__PURE__ */ J(y, {
285
285
  variant: x.Primary,
286
- iconBefore: /* @__PURE__ */ J(V, {
286
+ iconBefore: /* @__PURE__ */ J(me, {
287
287
  size: T.LG,
288
288
  "aria-hidden": !0,
289
289
  stroke: E
@@ -365,17 +365,17 @@ var ke = /* @__PURE__ */ function(e) {
365
365
  dropZone: "_dropZone_ru73x_11",
366
366
  label: "_label_ru73x_20",
367
367
  link: "_link_ru73x_24"
368
- }, lt = Se(async () => ({ default: (await Oe()).MarkdownEditor })), ut = (e) => `Preview ${e}`, dt = (e) => `Download ${e}`, ft = "The project name can't be changed after creation", pt = ({ values: e, errors: t, onFieldChange: n, contextFiles: r, onContextFilesChange: o, onContextFileClick: s, onContextFileDownload: c, selectedContextFileId: l, allowedExtensions: u, maxFileBytes: p, maxTotalBytes: m, onPickFromFileManager: _, onRefineInstructions: y, onBack: ee, onCancel: b, onSubmit: x, isSubmitting: C = !1, isNameReadOnly: w = !1, labels: D, markdownEditorTheme: O, className: ne, styles: A }) => {
369
- let re = W(), j = W(), N = W(), I = W(), L = W(), oe = W(), se = K(null), ce = g(), [ue, de] = q(!1), [fe, pe] = q([]), [z, B] = q(""), V = v({
368
+ }, lt = Se(async () => ({ default: (await Oe()).MarkdownEditor })), ut = (e) => `Preview ${e}`, dt = (e) => `Download ${e}`, ft = "The project name can't be changed after creation", pt = ({ values: e, errors: t, onFieldChange: n, contextFiles: r, onContextFilesChange: o, onContextFileClick: s, onContextFileDownload: c, selectedContextFileId: l, allowedExtensions: u, maxFileBytes: p, maxTotalBytes: m, onPickFromFileManager: _, onRefineInstructions: y, onBack: ee, onCancel: b, onSubmit: x, isSubmitting: C = !1, isNameReadOnly: w = !1, labels: D, markdownEditorTheme: O, className: A, styles: j }) => {
369
+ let ne = W(), M = W(), P = W(), L = W(), R = W(), ae = W(), oe = K(null), se = g(), [le, ue] = q(!1), [de, fe] = q([]), [pe, B] = q(""), me = v({
370
370
  value: e.instructions,
371
371
  onChange: (e) => n("instructions", e),
372
372
  onRefine: y,
373
373
  disabled: C
374
- }), me = V.isPending, he = Ze(e.name), ge = D.nameReadOnlyHint ?? ft, _e = t.name ?? (ue && he != null ? D.nameErrors[he] : void 0), ve = !w && !!t.name, ye = he != null || ve || C || me, be;
375
- t.name ? be = j : _e && (be = N);
376
- let Se = [w && I, be].filter(Boolean).join(" ") || void 0;
374
+ }), he = me.isPending, V = Ze(e.name), ge = D.nameReadOnlyHint ?? ft, _e = t.name ?? (le && V != null ? D.nameErrors[V] : void 0), ve = !w && !!t.name, ye = V != null || ve || C || he, be;
375
+ t.name ? be = M : _e && (be = P);
376
+ let Se = [w && L, be].filter(Boolean).join(" ") || void 0;
377
377
  Ce(() => {
378
- t.name && !w && se.current?.focus();
378
+ t.name && !w && oe.current?.focus();
379
379
  }, [t.name, w]);
380
380
  let H = G(() => u.map((e) => `.${e}`).join(","), [u]), U = (e) => {
381
381
  if (e.length === 0) return;
@@ -384,10 +384,10 @@ var ke = /* @__PURE__ */ function(e) {
384
384
  maxFileBytes: p,
385
385
  maxTotalBytes: m
386
386
  });
387
- pe(n), t.length > 0 && o([...r, ...t]), B([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
387
+ fe(n), t.length > 0 && o([...r, ...t]), B([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
388
388
  }, { isDragActive: we, handlers: Oe } = Ue(U), ke = D.openFileLabel ?? ut, Ae = D.downloadFileLabel ?? dt, je = (e) => {
389
389
  let t = r.find((t) => t.id === e);
390
- o(r.filter((t) => t.id !== e)), pe([]), t && B(D.fileRemovedStatus(t.name));
390
+ o(r.filter((t) => t.id !== e)), fe([]), t && B(D.fileRemovedStatus(t.name));
391
391
  }, Me = async (e) => {
392
392
  if (e.preventDefault(), e.stopPropagation(), _) try {
393
393
  let e = await _();
@@ -395,11 +395,11 @@ var ke = /* @__PURE__ */ function(e) {
395
395
  } catch {}
396
396
  }, Ne = () => {
397
397
  ye || x();
398
- }, { colors: Z, typography: Pe } = A ?? {}, Fe = Pe?.titleClassName ?? "dial-h1-text", Q = h(Pe?.labelClassName ?? "dial-tiny-semi-text", ct.label), Ie = Pe?.helperClassName ?? "dial-tiny-text", Le = f({
398
+ }, { colors: Z, typography: Pe, contextListClassName: Fe } = j ?? {}, Q = Pe?.titleClassName ?? "dial-h1-text", Ie = h(Pe?.labelClassName ?? "dial-tiny-semi-text", ct.label), Le = Pe?.helperClassName ?? "dial-tiny-text", Re = f({
399
399
  "--pcf-label-text": Z?.labelText,
400
400
  "--pcf-link-text": Z?.linkText,
401
401
  "--pcf-dropzone-bg": Z?.dropZoneBackground
402
- }), Re = D.refinement, ze = t.context, Be = [...fe.map(({ name: e, reason: t }) => D.fileRejections[t](e)), ze].filter(Boolean).join("\n"), Ve = D.dropZoneLabel({
402
+ }), ze = D.refinement, Be = t.context, Ve = [...de.map(({ name: e, reason: t }) => D.fileRejections[t](e)), Be].filter(Boolean).join("\n"), He = D.dropZoneLabel({
403
403
  fromDevice: /* @__PURE__ */ J("span", { className: ct.link }),
404
404
  fileManager: _ ? /* @__PURE__ */ J("button", {
405
405
  type: "button",
@@ -409,7 +409,7 @@ var ke = /* @__PURE__ */ function(e) {
409
409
  }) : void 0
410
410
  });
411
411
  return /* @__PURE__ */ Y("div", {
412
- className: h("relative flex h-full min-h-0 w-full", ne),
412
+ className: h("relative flex h-full min-h-0 w-full", A),
413
413
  ...Oe,
414
414
  children: [
415
415
  /* @__PURE__ */ J(Ee, {
@@ -419,7 +419,7 @@ var ke = /* @__PURE__ */ function(e) {
419
419
  subtitle: D.dropOverlaySubtitle
420
420
  }
421
421
  }),
422
- /* @__PURE__ */ J(De, {
422
+ /* @__PURE__ */ J(X, {
423
423
  labels: {
424
424
  title: D.title,
425
425
  backButtonLabel: D.backLabel,
@@ -433,8 +433,8 @@ var ke = /* @__PURE__ */ function(e) {
433
433
  isCancelDisabled: C,
434
434
  isSubmitDisabled: ye,
435
435
  isSubmitting: C,
436
- footerActionsOrder: X.SubmitFirst,
437
- backIcon: /* @__PURE__ */ J(R, {
436
+ footerActionsOrder: De.SubmitFirst,
437
+ backIcon: /* @__PURE__ */ J(z, {
438
438
  size: T.LG,
439
439
  stroke: E,
440
440
  "aria-hidden": !0,
@@ -444,9 +444,9 @@ var ke = /* @__PURE__ */ function(e) {
444
444
  colors: { background: Z?.background },
445
445
  header: {
446
446
  colors: { borderColor: Z?.headerBorder },
447
- typography: { fontClassName: Fe }
447
+ typography: { fontClassName: Q }
448
448
  },
449
- cssVars: Le
449
+ cssVars: Re
450
450
  },
451
451
  children: /* @__PURE__ */ Y("div", {
452
452
  className: h("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6", ct.formColumn),
@@ -454,14 +454,14 @@ var ke = /* @__PURE__ */ function(e) {
454
454
  /* @__PURE__ */ Y("div", {
455
455
  className: "flex flex-col gap-1",
456
456
  children: [
457
- /* @__PURE__ */ J(ie, {
458
- id: re,
459
- inputRef: se,
457
+ /* @__PURE__ */ J(re, {
458
+ id: ne,
459
+ inputRef: oe,
460
460
  value: e.name,
461
461
  onChange: (e) => {
462
462
  w || n("name", e ?? "");
463
463
  },
464
- onBlur: () => de(!0),
464
+ onBlur: () => ue(!0),
465
465
  placeholder: D.namePlaceholder,
466
466
  labelProps: {
467
467
  label: D.nameLabel,
@@ -477,47 +477,47 @@ var ke = /* @__PURE__ */ function(e) {
477
477
  "aria-describedby": Se
478
478
  }),
479
479
  w && /* @__PURE__ */ J(S, {
480
- id: I,
481
- className: Ie,
480
+ id: L,
481
+ className: Le,
482
482
  text: ge
483
483
  }),
484
484
  /* @__PURE__ */ J(k, {
485
- announce: F.Assertive,
486
- id: j,
487
- className: Ie,
485
+ announce: I.Assertive,
486
+ id: M,
487
+ className: Le,
488
488
  text: t.name ?? ""
489
489
  }),
490
490
  _e && !t.name && /* @__PURE__ */ J(k, {
491
- id: N,
492
- className: Ie,
491
+ id: P,
492
+ className: Le,
493
493
  text: _e
494
494
  })
495
495
  ]
496
496
  }),
497
497
  /* @__PURE__ */ J(d, {
498
498
  isEnabled: !!y,
499
- fieldId: L,
499
+ fieldId: R,
500
500
  label: D.instructionsLabel,
501
- labelClassName: Q,
502
- labels: Re,
503
- refinement: V,
504
- disabled: C || me,
501
+ labelClassName: Ie,
502
+ labels: ze,
503
+ refinement: me,
504
+ disabled: C || he,
505
505
  children: /* @__PURE__ */ Y("div", {
506
506
  className: "flex flex-1 flex-col gap-2",
507
- children: [!y && /* @__PURE__ */ J(M, {
508
- htmlFor: L,
509
- className: Q,
507
+ children: [!y && /* @__PURE__ */ J(N, {
508
+ htmlFor: R,
509
+ className: Ie,
510
510
  label: D.instructionsLabel
511
511
  }), /* @__PURE__ */ J("div", {
512
- ref: ce,
512
+ ref: se,
513
513
  className: h("w-full", i, a),
514
514
  children: /* @__PURE__ */ J(xe, {
515
- fallback: /* @__PURE__ */ J(le, { ariaLabel: D.editorLoadingAriaLabel ?? "Loading editor" }),
515
+ fallback: /* @__PURE__ */ J(ce, { ariaLabel: D.editorLoadingAriaLabel ?? "Loading editor" }),
516
516
  children: /* @__PURE__ */ J(lt, {
517
- id: L,
517
+ id: R,
518
518
  value: e.instructions,
519
519
  onChange: (e) => {
520
- V.reset(), n("instructions", e);
520
+ me.reset(), n("instructions", e);
521
521
  },
522
522
  height: 176,
523
523
  theme: O,
@@ -528,16 +528,16 @@ var ke = /* @__PURE__ */ function(e) {
528
528
  })
529
529
  }),
530
530
  /* @__PURE__ */ Y("section", {
531
- "aria-labelledby": oe,
531
+ "aria-labelledby": ae,
532
532
  className: "flex flex-col gap-2",
533
533
  children: [
534
534
  /* @__PURE__ */ J("h2", {
535
- id: oe,
536
- className: Q,
535
+ id: ae,
536
+ className: Ie,
537
537
  children: D.contextLabel
538
538
  }),
539
539
  /* @__PURE__ */ J(te, {
540
- label: Ve,
540
+ label: He,
541
541
  ariaLabel: D.dropZoneAriaLabel,
542
542
  description: D.dropZoneHint,
543
543
  accept: H,
@@ -545,16 +545,16 @@ var ke = /* @__PURE__ */ function(e) {
545
545
  disabled: C,
546
546
  onChange: U,
547
547
  onReject: U,
548
- errorText: Be || void 0,
548
+ errorText: Ve || void 0,
549
549
  className: ct.dropZone
550
550
  }),
551
- /* @__PURE__ */ J(P, {
551
+ /* @__PURE__ */ J(F, {
552
552
  visuallyHidden: !0,
553
- politeness: F.Assertive,
554
- children: ze
553
+ politeness: I.Assertive,
554
+ children: Be
555
555
  }),
556
556
  r.length > 0 && /* @__PURE__ */ J("ul", {
557
- className: "flex min-w-0 flex-wrap gap-2 pt-3",
557
+ className: h("flex min-w-0 flex-wrap gap-2 pt-3", Fe),
558
558
  children: r.map((e) => /* @__PURE__ */ J("li", {
559
559
  className: "min-w-0",
560
560
  children: /* @__PURE__ */ J(Te, {
@@ -576,10 +576,10 @@ var ke = /* @__PURE__ */ function(e) {
576
576
  ]
577
577
  })
578
578
  }),
579
- /* @__PURE__ */ J(P, {
579
+ /* @__PURE__ */ J(F, {
580
580
  visuallyHidden: !0,
581
- as: ae.Span,
582
- children: C ? D.creatingStatus : z
581
+ as: ie.Span,
582
+ children: C ? D.creatingStatus : pe
583
583
  })
584
584
  ]
585
585
  });
@@ -625,15 +625,15 @@ var ke = /* @__PURE__ */ function(e) {
625
625
  contentType: e.contentType,
626
626
  type: p(e.contentType),
627
627
  status: l.Idle
628
- }), gt = (e) => `Download ${e}`, _t = H(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: i = !1, isPinned: a, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: d, onTogglePin: p, onPublish: m, onUnpublish: g, onEdit: _, onShare: v, onRevokeAccess: y, onActionMenuOpenChange: ee, onDelete: b, onRemoveFromMyList: x, onDownload: S, onContextFileClick: C, onContextFileDownload: w, selectedContextFileId: D, isDetailsStacked: k = !1, onRetry: te, onBrowseProjects: ne, mainContent: j, mainContentLabel: ie = "Project content", labels: M, styles: N }) => {
629
- let { colors: F, typography: I } = N ?? {}, oe = M.downloadFileLabel ?? gt, se = I?.titleClassName ?? "dial-h1-text", ue = I?.panelTitleClassName ?? "dial-body-semi-text", B = I?.sectionTitleClassName ?? "dial-tiny-text", V = I?.bodyClassName ?? "dial-small-text", he = I?.helperClassName ?? "dial-tiny-text", be = I?.instructionsHeadingClassName ?? "dial-small-semi-text", xe = f({
630
- "--pv-bg": F?.background,
631
- "--pv-border": F?.border,
632
- "--pv-heading-text": F?.headingText,
633
- "--pv-body-text": F?.bodyText,
634
- "--pv-secondary-text": F?.secondaryText
635
- }), Se = G(() => t?.contextFiles ?? [], [t]), H = G(() => st(Se, l), [Se, l]), U = l.trim(), Ce = W(), K = G(() => {
636
- let e = h("mb-1 mt-3 first:mt-0", be);
628
+ }), gt = (e) => `Download ${e}`, _t = H(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: i = !1, isPinned: a, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: d, onTogglePin: p, onPublish: m, onUnpublish: g, onEdit: _, onShare: v, onRevokeAccess: y, onActionMenuOpenChange: ee, onDelete: b, onRemoveFromMyList: x, onDownload: S, onContextFileClick: C, onContextFileDownload: w, selectedContextFileId: D, isDetailsStacked: k = !1, onRetry: te, onBrowseProjects: A, mainContent: M, mainContentLabel: re = "Project content", labels: N, styles: P }) => {
629
+ let { colors: I, typography: L, contextListClassName: ae } = P ?? {}, oe = N.downloadFileLabel ?? gt, le = L?.titleClassName ?? "dial-h1-text", B = L?.panelTitleClassName ?? "dial-body-semi-text", me = L?.sectionTitleClassName ?? "dial-tiny-text", V = L?.bodyClassName ?? "dial-small-text", be = L?.helperClassName ?? "dial-tiny-text", xe = L?.instructionsHeadingClassName ?? "dial-small-semi-text", Se = f({
630
+ "--pv-bg": I?.background,
631
+ "--pv-border": I?.border,
632
+ "--pv-heading-text": I?.headingText,
633
+ "--pv-body-text": I?.bodyText,
634
+ "--pv-secondary-text": I?.secondaryText
635
+ }), H = G(() => t?.contextFiles ?? [], [t]), U = G(() => st(H, l), [H, l]), Ce = l.trim(), K = W(), q = G(() => {
636
+ let e = h("mb-1 mt-3 first:mt-0", xe);
637
637
  return {
638
638
  h1: e,
639
639
  h2: e,
@@ -645,177 +645,177 @@ var ke = /* @__PURE__ */ function(e) {
645
645
  ul: V,
646
646
  ol: V
647
647
  };
648
- }, [V, be]), q = M.unpublishLabel ?? "Unpublish", Ee = () => {
648
+ }, [V, xe]), Ee = N.unpublishLabel ?? "Unpublish", De = () => {
649
649
  s || p();
650
650
  }, X = (e) => /* @__PURE__ */ J(e, {
651
651
  size: T.SM,
652
652
  "aria-hidden": !0,
653
653
  stroke: E
654
- }), De = (e) => {
654
+ }), Oe = (e) => {
655
655
  let t = [];
656
656
  return e && t.push({
657
657
  key: "pin",
658
- label: a ? M.unpinLabel : M.pinLabel,
659
- icon: X(a ? mt : z),
660
- onClick: Ee
658
+ label: a ? N.unpinLabel : N.pinLabel,
659
+ icon: X(a ? mt : pe),
660
+ onClick: De
661
661
  }), e && g ? t.push({
662
662
  key: "unpublish",
663
- label: q,
663
+ label: Ee,
664
664
  icon: X(ve),
665
665
  onClick: g
666
666
  }) : e && m && t.push({
667
667
  key: "publish",
668
- label: M.publishLabel,
668
+ label: N.publishLabel,
669
669
  icon: X(ye),
670
670
  onClick: m
671
671
  }), e && _ && t.push({
672
672
  key: "edit",
673
- label: M.editLabel,
674
- icon: X(pe),
673
+ label: N.editLabel,
674
+ icon: X(fe),
675
675
  onClick: _
676
676
  }), v && t.push({
677
677
  key: "share",
678
- label: M.shareLabel,
679
- icon: X(me),
678
+ label: N.shareLabel,
679
+ icon: X(he),
680
680
  onClick: v
681
681
  }), t.push({
682
682
  key: "download",
683
- label: M.downloadLabel,
684
- icon: X(fe),
683
+ label: N.downloadLabel,
684
+ icon: X(de),
685
685
  onClick: S
686
686
  }), y && t.push({
687
687
  key: "revokeAccess",
688
- label: M.revokeAccessLabel ?? "Revoke access",
688
+ label: N.revokeAccessLabel ?? "Revoke access",
689
689
  icon: X(_e),
690
690
  onClick: y
691
691
  }), x && t.push({
692
692
  key: "removeFromMyList",
693
- label: M.removeFromMyListLabel ?? "Remove from My List",
693
+ label: N.removeFromMyListLabel ?? "Remove from My List",
694
694
  icon: X(ge),
695
695
  onClick: x
696
696
  }), b && t.push({
697
697
  key: "delete",
698
- label: M.deleteLabel,
698
+ label: N.deleteLabel,
699
699
  icon: X(ge),
700
700
  danger: !0,
701
701
  onClick: b
702
702
  }), t;
703
- }, Oe = (n, r) => /* @__PURE__ */ J("div", {
703
+ }, ke = (n, r) => /* @__PURE__ */ J("div", {
704
704
  className: r,
705
705
  children: /* @__PURE__ */ J(e, {
706
706
  onOpenChange: ee,
707
- items: De(n),
708
- title: n ? t?.name ?? M.moreActionsLabel : M.moreActionsLabel,
709
- closeLabel: M.closeLabel,
707
+ items: Oe(n),
708
+ title: n ? t?.name ?? N.moreActionsLabel : N.moreActionsLabel,
709
+ closeLabel: N.closeLabel,
710
710
  matchReferenceWidth: !1,
711
711
  listClassName: "w-[200px]",
712
- children: /* @__PURE__ */ J(re, {
713
- icon: /* @__PURE__ */ J(de, {
712
+ children: /* @__PURE__ */ J(ne, {
713
+ icon: /* @__PURE__ */ J(ue, {
714
714
  size: T.MD,
715
715
  "aria-hidden": !0,
716
716
  stroke: E
717
717
  }),
718
- "aria-label": M.moreActionsLabel
718
+ "aria-label": N.moreActionsLabel
719
719
  })
720
720
  })
721
- }), ke = () => n ? /* @__PURE__ */ J(le, { ariaLabel: M.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Y("div", {
721
+ }), Ae = () => n ? /* @__PURE__ */ J(ce, { ariaLabel: N.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Y("div", {
722
722
  className: "flex flex-col items-center gap-3",
723
723
  children: [/* @__PURE__ */ J("p", {
724
724
  "aria-hidden": !0,
725
725
  className: h(V, $.body),
726
- children: M.errorLabel
727
- }), /* @__PURE__ */ J(A, {
728
- label: M.retryLabel,
726
+ children: N.errorLabel
727
+ }), /* @__PURE__ */ J(j, {
728
+ label: N.retryLabel,
729
729
  onClick: te
730
730
  })]
731
731
  }) : /* @__PURE__ */ Y("div", {
732
732
  className: "flex flex-col items-center gap-3",
733
733
  children: [/* @__PURE__ */ J("p", {
734
734
  className: h(V, $.body),
735
- children: M.notFoundLabel
736
- }), /* @__PURE__ */ J(A, {
737
- label: M.browseProjectsLabel,
738
- onClick: ne
735
+ children: N.notFoundLabel
736
+ }), /* @__PURE__ */ J(j, {
737
+ label: N.browseProjectsLabel,
738
+ onClick: A
739
739
  })]
740
740
  });
741
741
  if (n || r || i || t == null) return /* @__PURE__ */ Y("div", {
742
- style: xe,
742
+ style: Se,
743
743
  className: h("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
744
- children: [/* @__PURE__ */ J(P, {
744
+ children: [/* @__PURE__ */ J(F, {
745
745
  visuallyHidden: !0,
746
- children: !n && r && M.errorLabel
747
- }), ke()]
746
+ children: !n && r && N.errorLabel
747
+ }), Ae()]
748
748
  });
749
- let Ae = () => Se.length === 0 ? /* @__PURE__ */ J(c, { label: M.emptyContextLabel }) : /* @__PURE__ */ Y(we, { children: [
749
+ let je = () => H.length === 0 ? /* @__PURE__ */ J(c, { label: N.emptyContextLabel }) : /* @__PURE__ */ Y(we, { children: [
750
750
  /* @__PURE__ */ J("div", {
751
751
  role: "search",
752
- children: /* @__PURE__ */ J(ce, {
752
+ children: /* @__PURE__ */ J(se, {
753
753
  value: l,
754
754
  onChange: (e) => u(e ?? ""),
755
- placeholder: M.contextSearchPlaceholder,
756
- clearLabel: M.clearSearchLabel,
757
- "aria-label": M.contextSearchAriaLabel
755
+ placeholder: N.contextSearchPlaceholder,
756
+ clearLabel: N.clearSearchLabel,
757
+ "aria-label": N.contextSearchAriaLabel
758
758
  })
759
759
  }),
760
- H.length === 0 ? /* @__PURE__ */ J("p", {
761
- className: h(he, $.secondary),
762
- children: M.noContextMatchesLabel
760
+ U.length === 0 ? /* @__PURE__ */ J("p", {
761
+ className: h(be, $.secondary),
762
+ children: N.noContextMatchesLabel
763
763
  }) : /* @__PURE__ */ J("ul", {
764
- className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
765
- children: H.map((e) => /* @__PURE__ */ J("li", {
764
+ className: h("m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2", ae),
765
+ children: U.map((e) => /* @__PURE__ */ J("li", {
766
766
  className: "min-w-0",
767
767
  children: /* @__PURE__ */ J(Te, {
768
768
  attachment: ht(e),
769
- searchQuery: U,
769
+ searchQuery: Ce,
770
770
  onClick: C,
771
771
  onDownload: w,
772
772
  isSelected: e.name === D,
773
773
  labels: {
774
- clickLabel: M.openFileLabel(e.name),
774
+ clickLabel: N.openFileLabel(e.name),
775
775
  downloadLabel: oe(e.name)
776
776
  }
777
777
  })
778
778
  }, e.name))
779
779
  }),
780
- /* @__PURE__ */ J(P, {
780
+ /* @__PURE__ */ J(F, {
781
781
  visuallyHidden: !0,
782
- as: ae.Span,
783
- children: U === "" ? "" : M.contextResultCountLabel(H.length)
782
+ as: ie.Span,
783
+ children: Ce === "" ? "" : N.contextResultCountLabel(U.length)
784
784
  })
785
- ] }), je = !k;
785
+ ] }), Me = !k;
786
786
  return /* @__PURE__ */ Y("div", {
787
- style: xe,
787
+ style: Se,
788
788
  className: h("flex size-full min-h-0 min-w-0 flex-1 flex-col", $.container),
789
789
  children: [/* @__PURE__ */ Y("header", {
790
790
  className: h("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
791
791
  children: [
792
- /* @__PURE__ */ J(re, {
793
- icon: /* @__PURE__ */ J(R, {
792
+ /* @__PURE__ */ J(ne, {
793
+ icon: /* @__PURE__ */ J(z, {
794
794
  size: T.LG,
795
795
  className: "rtl:scale-x-[-1]",
796
796
  "aria-hidden": !0,
797
797
  stroke: E
798
798
  }),
799
- "aria-label": M.backLabel,
799
+ "aria-label": N.backLabel,
800
800
  onClick: d
801
801
  }),
802
802
  /* @__PURE__ */ J("h1", {
803
- className: h("min-w-0 flex-1", se, $.title),
803
+ className: h("min-w-0 flex-1", le, $.title),
804
804
  children: /* @__PURE__ */ J(O, { text: t.name })
805
805
  }),
806
- /* @__PURE__ */ J(A, {
807
- label: a ? M.unpinLabel : M.pinLabel,
808
- iconBefore: J(a ? mt : z, {
806
+ /* @__PURE__ */ J(j, {
807
+ label: a ? N.unpinLabel : N.pinLabel,
808
+ iconBefore: J(a ? mt : pe, {
809
809
  size: T.MD,
810
810
  "aria-hidden": !0,
811
811
  stroke: E
812
812
  }),
813
813
  "aria-disabled": s || void 0,
814
- onClick: Ee,
814
+ onClick: De,
815
815
  className: "hidden shrink-0 desktop:inline-flex"
816
816
  }),
817
- g && /* @__PURE__ */ J(L, {
818
- label: q,
817
+ g && /* @__PURE__ */ J(R, {
818
+ label: Ee,
819
819
  iconBefore: /* @__PURE__ */ J(ve, {
820
820
  size: T.MD,
821
821
  "aria-hidden": !0,
@@ -824,8 +824,8 @@ var ke = /* @__PURE__ */ function(e) {
824
824
  onClick: g,
825
825
  className: "hidden shrink-0 desktop:inline-flex"
826
826
  }),
827
- !g && m && /* @__PURE__ */ J(L, {
828
- label: M.publishLabel,
827
+ !g && m && /* @__PURE__ */ J(R, {
828
+ label: N.publishLabel,
829
829
  iconBefore: /* @__PURE__ */ J(ye, {
830
830
  size: T.MD,
831
831
  "aria-hidden": !0,
@@ -834,9 +834,9 @@ var ke = /* @__PURE__ */ function(e) {
834
834
  onClick: m,
835
835
  className: "hidden shrink-0 desktop:inline-flex"
836
836
  }),
837
- _ && /* @__PURE__ */ J(L, {
838
- label: M.editLabel,
839
- iconBefore: /* @__PURE__ */ J(pe, {
837
+ _ && /* @__PURE__ */ J(R, {
838
+ label: N.editLabel,
839
+ iconBefore: /* @__PURE__ */ J(fe, {
840
840
  size: T.MD,
841
841
  "aria-hidden": !0,
842
842
  stroke: E
@@ -844,32 +844,32 @@ var ke = /* @__PURE__ */ function(e) {
844
844
  onClick: _,
845
845
  className: "hidden shrink-0 desktop:inline-flex"
846
846
  }),
847
- Oe(!1, "hidden desktop:block"),
848
- Oe(!0, "desktop:hidden")
847
+ ke(!1, "hidden desktop:block"),
848
+ ke(!0, "desktop:hidden")
849
849
  ]
850
850
  }), /* @__PURE__ */ Y("div", {
851
- className: h("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", je && "desktop:flex-row desktop:overflow-hidden", j == null && je && "desktop:justify-end"),
852
- children: [j != null && /* @__PURE__ */ J("section", {
853
- "aria-label": ie,
854
- className: h("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", je && "desktop:overflow-y-auto"),
851
+ className: h("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", Me && "desktop:flex-row desktop:overflow-hidden", M == null && Me && "desktop:justify-end"),
852
+ children: [M != null && /* @__PURE__ */ J("section", {
853
+ "aria-label": re,
854
+ className: h("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", Me && "desktop:overflow-y-auto"),
855
855
  children: /* @__PURE__ */ J("div", {
856
856
  className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
857
- children: j
857
+ children: M
858
858
  })
859
859
  }), /* @__PURE__ */ Y("aside", {
860
- "aria-labelledby": Ce,
861
- className: h("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", je && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
860
+ "aria-labelledby": K,
861
+ className: h("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", Me && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
862
862
  children: [
863
863
  /* @__PURE__ */ J("h2", {
864
- id: Ce,
865
- className: h(ue, $.title),
866
- children: M.detailsLabel
864
+ id: K,
865
+ className: h(B, $.title),
866
+ children: N.detailsLabel
867
867
  }),
868
868
  t.description !== "" && /* @__PURE__ */ Y("section", {
869
869
  className: "flex min-w-0 flex-col gap-1",
870
870
  children: [/* @__PURE__ */ J("h3", {
871
- className: h(B, $.secondary),
872
- children: M.descriptionLabel
871
+ className: h(me, $.secondary),
872
+ children: N.descriptionLabel
873
873
  }), /* @__PURE__ */ J("p", {
874
874
  className: h("wrap-break-word whitespace-pre-line", V, $.body),
875
875
  children: t.description
@@ -878,22 +878,22 @@ var ke = /* @__PURE__ */ function(e) {
878
878
  t.instructions !== "" && /* @__PURE__ */ Y("section", {
879
879
  className: "flex min-w-0 flex-col gap-1",
880
880
  children: [/* @__PURE__ */ J("h3", {
881
- className: h(B, $.secondary),
882
- children: M.instructionsLabel
881
+ className: h(me, $.secondary),
882
+ children: N.instructionsLabel
883
883
  }), /* @__PURE__ */ J("div", {
884
884
  className: h("min-w-0 wrap-break-word", V, $.body),
885
885
  children: /* @__PURE__ */ J(o, {
886
886
  content: t.instructions,
887
- classNames: K
887
+ classNames: q
888
888
  })
889
889
  })]
890
890
  }),
891
891
  /* @__PURE__ */ Y("section", {
892
892
  className: "flex min-w-0 flex-col gap-2",
893
893
  children: [/* @__PURE__ */ J("h3", {
894
- className: h(B, $.secondary),
895
- children: M.contextLabel
896
- }), Ae()]
894
+ className: h(me, $.secondary),
895
+ children: N.contextLabel
896
+ }), je()]
897
897
  })
898
898
  ]
899
899
  })]
@@ -957,11 +957,11 @@ var ke = /* @__PURE__ */ function(e) {
957
957
  closeLabel: n.closeLabel,
958
958
  placement: "bottom-end",
959
959
  onOpenChange: u,
960
- children: /* @__PURE__ */ J(re, {
960
+ children: /* @__PURE__ */ J(ne, {
961
961
  "aria-label": n.moreActionsLabel(t.title),
962
962
  size: D.Small,
963
963
  className: h("me-2 shrink-0", !l && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
964
- icon: /* @__PURE__ */ J(de, {
964
+ icon: /* @__PURE__ */ J(ue, {
965
965
  "aria-hidden": !0,
966
966
  size: T.SM,
967
967
  stroke: E
@@ -991,7 +991,7 @@ var ke = /* @__PURE__ */ function(e) {
991
991
  className: h("m-0", v),
992
992
  children: p.title
993
993
  }),
994
- /* @__PURE__ */ J(P, {
994
+ /* @__PURE__ */ J(F, {
995
995
  visuallyHidden: !0,
996
996
  children: t ? p.loadingLabel : n ? p.errorLabel : S ? /* @__PURE__ */ Y(we, { children: [
997
997
  /* @__PURE__ */ J("span", { children: p.emptyTitle }),
@@ -1003,7 +1003,7 @@ var ke = /* @__PURE__ */ function(e) {
1003
1003
  className: "flex justify-center py-6",
1004
1004
  children: /* @__PURE__ */ J("span", {
1005
1005
  "aria-hidden": !0,
1006
- children: /* @__PURE__ */ J(le, {})
1006
+ children: /* @__PURE__ */ J(ce, {})
1007
1007
  })
1008
1008
  }) : n ? /* @__PURE__ */ Y("div", {
1009
1009
  className: "flex flex-col items-center gap-3 py-6 text-center",
@@ -1011,7 +1011,7 @@ var ke = /* @__PURE__ */ function(e) {
1011
1011
  "aria-hidden": !0,
1012
1012
  className: h("m-0", x),
1013
1013
  children: p.errorLabel
1014
- }), /* @__PURE__ */ J(A, {
1014
+ }), /* @__PURE__ */ J(j, {
1015
1015
  label: p.retryLabel,
1016
1016
  onClick: r
1017
1017
  })]
@@ -1032,7 +1032,7 @@ var ke = /* @__PURE__ */ function(e) {
1032
1032
  onRename: u,
1033
1033
  onDelete: d
1034
1034
  }, e.id))
1035
- }), i && o && /* @__PURE__ */ J(N, {
1035
+ }), i && o && /* @__PURE__ */ J(P, {
1036
1036
  className: "self-start",
1037
1037
  label: p.loadMoreLabel ?? "See more",
1038
1038
  disabled: a,
@@ -1041,93 +1041,93 @@ var ke = /* @__PURE__ */ function(e) {
1041
1041
  ]
1042
1042
  });
1043
1043
  }), xt = H(({ composer: e, outputs: t, hasOutputs: n = !1, items: i, isLoading: a = !1, hasError: o = !1, onRetry: s, hasMore: c, isLoadingMore: l, onLoadMore: u, onOpen: d, onRename: f, onGenerateTitle: p, onDelete: m, labels: h, listTypography: g, listColors: _ }) => {
1044
- let v = W(), y = K(null), [b, S] = q(null), [C, w] = q(""), [D, O] = q(), [k, te] = q(!1), [ne, A] = q(!1), j = K(0), [M, N] = q(null), [P, ae] = q(!1), F = K(null), I = U(() => {
1045
- F.current = document.activeElement;
1046
- }, []), L = U(() => {
1047
- let e = F.current;
1048
- F.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
1049
- }, []), ce = U((e) => {
1050
- F.current = null, window.setTimeout(() => {
1044
+ let v = W(), y = K(null), [b, S] = q(null), [C, w] = q(""), [D, O] = q(), [k, te] = q(!1), [A, j] = q(!1), M = K(0), [N, P] = q(null), [F, ie] = q(!1), I = K(null), L = U(() => {
1045
+ I.current = document.activeElement;
1046
+ }, []), R = U(() => {
1047
+ let e = I.current;
1048
+ I.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
1049
+ }, []), se = U((e) => {
1050
+ I.current = null, window.setTimeout(() => {
1051
1051
  let t = y.current;
1052
1052
  if (!t) return;
1053
1053
  let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
1054
1054
  r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
1055
1055
  }, 0);
1056
- }, []), R = U((e) => i.find((t) => t.id === e) ?? null, [i]);
1056
+ }, []), z = U((e) => i.find((t) => t.id === e) ?? null, [i]);
1057
1057
  Ce(() => {
1058
1058
  let e = (e) => e != null && i.some((t) => t.id === e.id);
1059
- b && !k && !e(b) && (S(null), ce(0)), M && !P && !e(M) && (N(null), ce(0));
1059
+ b && !k && !e(b) && (S(null), se(0)), N && !F && !e(N) && (P(null), se(0));
1060
1060
  }, [
1061
- M,
1062
- ce,
1063
- P,
1061
+ N,
1062
+ se,
1063
+ F,
1064
1064
  k,
1065
1065
  i,
1066
1066
  b
1067
1067
  ]);
1068
- let ue = U((e) => {
1069
- I();
1070
- let t = R(e);
1071
- j.current += 1, A(!1), S(t), w(t?.title ?? ""), O(void 0);
1072
- }, [R, I]), de = U((e) => {
1073
- I(), N(R(e));
1074
- }, [R, I]), fe = U(() => {
1075
- k || (j.current += 1, A(!1), S(null), L());
1076
- }, [k, L]), pe = U(() => {
1077
- P || (N(null), L());
1078
- }, [P, L]), z = b != null && C.trim() === b.title.trim(), B = U(async () => {
1079
- if (!b || !f || k || z) return;
1068
+ let le = U((e) => {
1069
+ L();
1070
+ let t = z(e);
1071
+ M.current += 1, j(!1), S(t), w(t?.title ?? ""), O(void 0);
1072
+ }, [z, L]), ue = U((e) => {
1073
+ L(), P(z(e));
1074
+ }, [z, L]), de = U(() => {
1075
+ k || (M.current += 1, j(!1), S(null), R());
1076
+ }, [k, R]), fe = U(() => {
1077
+ F || (P(null), R());
1078
+ }, [F, R]), pe = b != null && C.trim() === b.title.trim(), B = U(async () => {
1079
+ if (!b || !f || k || pe) return;
1080
1080
  let e = C.trim();
1081
1081
  if (!e) O(h.renameEmptyError);
1082
1082
  else {
1083
1083
  te(!0);
1084
1084
  try {
1085
- await f(b.id, e), S(null), L();
1085
+ await f(b.id, e), S(null), R();
1086
1086
  } catch {} finally {
1087
1087
  te(!1);
1088
1088
  }
1089
1089
  }
1090
1090
  }, [
1091
1091
  k,
1092
- z,
1092
+ pe,
1093
1093
  h.renameEmptyError,
1094
1094
  f,
1095
1095
  b,
1096
1096
  C,
1097
- L
1098
- ]), V = U(async () => {
1099
- if (!b || !p || ne) return;
1100
- let e = ++j.current;
1101
- A(!0), O(void 0);
1097
+ R
1098
+ ]), me = U(async () => {
1099
+ if (!b || !p || A) return;
1100
+ let e = ++M.current;
1101
+ j(!0), O(void 0);
1102
1102
  try {
1103
1103
  let t = await p(b.id);
1104
- if (e !== j.current) return;
1104
+ if (e !== M.current) return;
1105
1105
  w(t);
1106
1106
  } catch {
1107
- if (e !== j.current) return;
1107
+ if (e !== M.current) return;
1108
1108
  O(h.renameWithAiError ?? "Could not generate a name. Try again.");
1109
1109
  } finally {
1110
- e === j.current && A(!1);
1110
+ e === M.current && j(!1);
1111
1111
  }
1112
1112
  }, [
1113
- ne,
1113
+ A,
1114
1114
  h.renameWithAiError,
1115
1115
  p,
1116
1116
  b
1117
- ]), me = U((e) => {
1117
+ ]), he = U((e) => {
1118
1118
  e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), B());
1119
1119
  }, [B]), ge = U(async () => {
1120
- if (!M || !m) return;
1121
- let e = i.findIndex((e) => e.id === M.id);
1122
- ae(!0);
1120
+ if (!N || !m) return;
1121
+ let e = i.findIndex((e) => e.id === N.id);
1122
+ ie(!0);
1123
1123
  try {
1124
- await m(M.id), N(null), ce(Math.max(e, 0));
1124
+ await m(N.id), P(null), se(Math.max(e, 0));
1125
1125
  } catch {} finally {
1126
- ae(!1);
1126
+ ie(!1);
1127
1127
  }
1128
1128
  }, [
1129
- M,
1130
- ce,
1129
+ N,
1130
+ se,
1131
1131
  i,
1132
1132
  m
1133
1133
  ]), _e = G(() => [{
@@ -1135,18 +1135,18 @@ var ke = /* @__PURE__ */ function(e) {
1135
1135
  variant: x.Primary,
1136
1136
  appearance: ee.Ghost,
1137
1137
  disabled: k,
1138
- onClick: fe
1138
+ onClick: de
1139
1139
  }, {
1140
1140
  label: h.renameSaveLabel,
1141
1141
  variant: x.Primary,
1142
- disabled: k || z || C.trim() === "",
1142
+ disabled: k || pe || C.trim() === "",
1143
1143
  onClick: () => {
1144
1144
  B();
1145
1145
  }
1146
1146
  }], [
1147
- fe,
1147
+ de,
1148
1148
  B,
1149
- z,
1149
+ pe,
1150
1150
  k,
1151
1151
  C,
1152
1152
  h.renameCancelLabel,
@@ -1168,47 +1168,47 @@ var ke = /* @__PURE__ */ function(e) {
1168
1168
  onLoadMore: u,
1169
1169
  isEmptyStateShown: !n,
1170
1170
  onOpen: d,
1171
- onRename: f ? ue : void 0,
1172
- onDelete: m ? de : void 0,
1171
+ onRename: f ? le : void 0,
1172
+ onDelete: m ? ue : void 0,
1173
1173
  labels: h.list,
1174
1174
  typography: g,
1175
1175
  colors: _
1176
1176
  })
1177
1177
  }),
1178
- b && /* @__PURE__ */ J(oe, {
1178
+ b && /* @__PURE__ */ J(ae, {
1179
1179
  open: !0,
1180
1180
  header: h.renameTitle,
1181
- size: se.Sm,
1181
+ size: oe.Sm,
1182
1182
  mainButtons: _e,
1183
- onClose: fe,
1183
+ onClose: de,
1184
1184
  children: /* @__PURE__ */ Y("div", {
1185
1185
  className: "flex items-end gap-2 px-6 py-4",
1186
1186
  children: [/* @__PURE__ */ J("div", {
1187
1187
  className: "min-w-0 flex-1",
1188
- children: /* @__PURE__ */ J(ie, {
1188
+ children: /* @__PURE__ */ J(re, {
1189
1189
  id: v,
1190
1190
  value: C,
1191
1191
  labelProps: { label: h.renameInputLabel },
1192
1192
  error: D,
1193
1193
  disabled: k,
1194
- onKeyDown: me,
1194
+ onKeyDown: he,
1195
1195
  onChange: (e) => {
1196
1196
  w(e ?? ""), O(void 0);
1197
1197
  }
1198
1198
  })
1199
- }), p && /* @__PURE__ */ J(re, {
1199
+ }), p && /* @__PURE__ */ J(ne, {
1200
1200
  "aria-label": h.renameWithAiLabel ?? "Rename with AI",
1201
1201
  tooltipProps: { tooltip: h.renameWithAiLabel ?? "Rename with AI" },
1202
- disabled: ne || k,
1203
- "aria-busy": ne,
1202
+ disabled: A || k,
1203
+ "aria-busy": A,
1204
1204
  onClick: () => {
1205
- V();
1205
+ me();
1206
1206
  },
1207
- icon: ne ? /* @__PURE__ */ J("span", {
1207
+ icon: A ? /* @__PURE__ */ J("span", {
1208
1208
  className: "flex",
1209
1209
  "aria-hidden": !0,
1210
- children: /* @__PURE__ */ J(le, { size: T.MD })
1211
- }) : /* @__PURE__ */ J(he, {
1210
+ children: /* @__PURE__ */ J(ce, { size: T.MD })
1211
+ }) : /* @__PURE__ */ J(V, {
1212
1212
  size: T.MD,
1213
1213
  stroke: E,
1214
1214
  "aria-hidden": !0
@@ -1216,17 +1216,17 @@ var ke = /* @__PURE__ */ function(e) {
1216
1216
  })]
1217
1217
  })
1218
1218
  }),
1219
- M && /* @__PURE__ */ J(r, {
1219
+ N && /* @__PURE__ */ J(r, {
1220
1220
  open: !0,
1221
- title: h.deleteTitle(M.title),
1222
- names: [M.title],
1221
+ title: h.deleteTitle(N.title),
1222
+ names: [N.title],
1223
1223
  message: h.deleteDescription,
1224
1224
  labels: h.deleteDialog,
1225
- isLoading: P,
1225
+ isLoading: F,
1226
1226
  onConfirm: () => {
1227
1227
  ge();
1228
1228
  },
1229
- onClose: pe
1229
+ onClose: fe
1230
1230
  })
1231
1231
  ] });
1232
1232
  }), St = {
@@ -1239,20 +1239,20 @@ var ke = /* @__PURE__ */ function(e) {
1239
1239
  type: p(e.contentType),
1240
1240
  status: l.Idle
1241
1241
  }), Tt = H(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = Ct, labels: o, styles: s }) => {
1242
- let c = W(), l = W(), u = K(null), d = K(!1), [p, m] = q(!1), { colors: g, typography: _ } = s ?? {}, v = _?.titleClassName ?? "dial-body-semi-text", y = _?.helperClassName ?? "dial-tiny-text", ee = o?.title ?? "Outputs", b = o?.errorLabel ?? "Could not load outputs", x = G(() => f({
1242
+ let c = W(), l = W(), u = K(null), d = K(!1), [p, m] = q(!1), { colors: g, typography: _, listClassName: v } = s ?? {}, y = _?.titleClassName ?? "dial-body-semi-text", ee = _?.helperClassName ?? "dial-tiny-text", b = o?.title ?? "Outputs", x = o?.errorLabel ?? "Could not load outputs", S = G(() => f({
1243
1243
  "--po-heading-text": g?.headingText,
1244
1244
  "--po-secondary-text": g?.secondaryText
1245
- }), [g?.headingText, g?.secondaryText]), S = U(() => m((e) => !e), []), C = U(() => {
1245
+ }), [g?.headingText, g?.secondaryText]), C = U(() => m((e) => !e), []), w = U(() => {
1246
1246
  d.current = !0, i?.();
1247
1247
  }, [i]);
1248
1248
  Ce(() => {
1249
1249
  !r && d.current && (d.current = !1, u.current?.focus());
1250
1250
  }, [r]);
1251
- let w = r || e.length > 0, T = e.length > a, E = p || !T ? e : e.slice(0, a), D = o?.openOutputLabel ?? ((e) => `Preview ${e}`), O = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, k = o?.showLessLabel ?? "Show less";
1251
+ let T = r || e.length > 0, E = e.length > a, D = p || !E ? e : e.slice(0, a), O = o?.openOutputLabel ?? ((e) => `Preview ${e}`), k = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, te = o?.showLessLabel ?? "Show less";
1252
1252
  return /* @__PURE__ */ Y("div", {
1253
1253
  className: "contents",
1254
- style: x,
1255
- children: [w && /* @__PURE__ */ Y("section", {
1254
+ style: S,
1255
+ children: [T && /* @__PURE__ */ Y("section", {
1256
1256
  "aria-labelledby": c,
1257
1257
  className: "flex min-w-0 flex-col gap-2 pt-3",
1258
1258
  children: [/* @__PURE__ */ Y("div", {
@@ -1261,38 +1261,38 @@ var ke = /* @__PURE__ */ function(e) {
1261
1261
  ref: u,
1262
1262
  id: c,
1263
1263
  tabIndex: -1,
1264
- className: h("m-0", St.title, v),
1265
- children: ee
1266
- }), !r && T && /* @__PURE__ */ J(N, {
1267
- label: p ? k : O,
1264
+ className: h("m-0", St.title, y),
1265
+ children: b
1266
+ }), !r && E && /* @__PURE__ */ J(P, {
1267
+ label: p ? te : k,
1268
1268
  "aria-expanded": p,
1269
1269
  "aria-controls": l,
1270
- onClick: S
1270
+ onClick: C
1271
1271
  })]
1272
1272
  }), r ? /* @__PURE__ */ Y(we, { children: [/* @__PURE__ */ J("p", {
1273
1273
  "aria-hidden": !0,
1274
- className: h("m-0", St.secondary, y),
1275
- children: b
1276
- }), i && /* @__PURE__ */ J(A, {
1274
+ className: h("m-0", St.secondary, ee),
1275
+ children: x
1276
+ }), i && /* @__PURE__ */ J(j, {
1277
1277
  className: "self-start",
1278
1278
  label: o?.retryLabel ?? "Retry",
1279
- onClick: C
1279
+ onClick: w
1280
1280
  })] }) : /* @__PURE__ */ J("ul", {
1281
1281
  id: l,
1282
- className: h("m-0 flex min-w-0 list-none gap-2 p-0", p ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
1283
- children: E.map((e) => /* @__PURE__ */ J("li", {
1282
+ className: h("m-0 flex min-w-0 list-none gap-2 p-0", p ? "flex-wrap" : "flex-nowrap overflow-x-auto", v),
1283
+ children: D.map((e) => /* @__PURE__ */ J("li", {
1284
1284
  className: "shrink-0",
1285
1285
  children: /* @__PURE__ */ J(Te, {
1286
1286
  attachment: wt(e),
1287
1287
  onClick: t,
1288
1288
  isSelected: e.name === n,
1289
- labels: { clickLabel: D(e.name) }
1289
+ labels: { clickLabel: O(e.name) }
1290
1290
  })
1291
1291
  }, e.name))
1292
1292
  })]
1293
- }), /* @__PURE__ */ J(P, {
1293
+ }), /* @__PURE__ */ J(F, {
1294
1294
  visuallyHidden: !0,
1295
- children: r ? b : ""
1295
+ children: r ? x : ""
1296
1296
  })]
1297
1297
  });
1298
1298
  }), Et = "Remove from My List", Dt = [
@@ -1319,9 +1319,9 @@ var ke = /* @__PURE__ */ function(e) {
1319
1319
  })), kt = H(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Y("nav", {
1320
1320
  "aria-label": i,
1321
1321
  className: h("flex max-w-full min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1322
- children: [/* @__PURE__ */ J(re, {
1322
+ children: [/* @__PURE__ */ J(ne, {
1323
1323
  "aria-label": i,
1324
- icon: /* @__PURE__ */ J(R, {
1324
+ icon: /* @__PURE__ */ J(z, {
1325
1325
  "aria-hidden": !0,
1326
1326
  size: T.MD,
1327
1327
  stroke: E,