@epam/ai-dial-prompts 1.1.0-dev.286

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.
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { FavoritePromptsPanelProps } from '../../models/favorite-prompts-panel-props';
3
+ /**
4
+ * Second-level "My Collection" panel: the user's favorite prompts, or an
5
+ * empty-state hint, plus a "Browse" action.
6
+ */
7
+ export declare const FavoritePromptsPanel: FC<FavoritePromptsPanelProps>;
8
+ //# sourceMappingURL=FavoritePromptsPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FavoritePromptsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoritePromptsPanel/FavoritePromptsPanel.tsx"],"names":[],"mappings":"AAYA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAW3F;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA+L9D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { PromptParametersPopupProps } from '../../models/prompt-parameters-popup-props';
3
+ /**
4
+ * Popup that collects a value for every `{{param}}` token found in a prompt
5
+ * before it is inserted into the chat composer, showing the full prompt body
6
+ * read-only alongside the parameter fields.
7
+ */
8
+ export declare const PromptParametersPopup: FC<PromptParametersPopupProps>;
9
+ //# sourceMappingURL=PromptParametersPopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptParametersPopup.d.ts","sourceRoot":"","sources":["../../../src/components/PromptParametersPopup/PromptParametersPopup.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA4B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAG7F;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA8HhE,CAAC"}
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ ._row_fggl0_1:hover,._row_fggl0_1:focus-visible{background:var(--fp-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_fggl0_5{color:var(--fp-header-text,var(--text-tertiary,#848e9c))}._emptyHint_fggl0_9{color:var(--fp-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_fggl0_13{color:var(--fp-star-color,var(--text-warning-icon,#eec840))}._footer_fggl0_17{border-top-color:var(--fp-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_fggl0_25{animation:.2s ease-out _rowFadeIn_fggl0_1}._rowLeaving_fggl0_29{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_fggl0_1}@keyframes _rowFadeIn_fggl0_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_fggl0_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_fggl0_57{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_fggl0_25,._rowLeaving_fggl0_29{animation:none}._listContent_fggl0_57{transition:none}}._card_p8vwa_1{background:var(--pp-card-bg,var(--bg-layer-sunken,#eef1f7));border-color:var(--pp-card-border,var(--stroke-tertiary,#e0e6f0))}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { FavoritePromptsPanel } from './components/FavoritePromptsPanel/FavoritePromptsPanel';
2
+ export { PromptParametersPopup } from './components/PromptParametersPopup/PromptParametersPopup';
3
+ export type { FavoritePromptItem } from './models/favorite-prompt-item';
4
+ export type { FavoritePromptsPanelColors, FavoritePromptsPanelLabels, FavoritePromptsPanelProps, } from './models/favorite-prompts-panel-props';
5
+ export type { PromptParametersPopupColors, PromptParametersPopupLabels, PromptParametersPopupProps, } from './models/prompt-parameters-popup-props';
6
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,wCAAwC,CAAC"}
package/index.js ADDED
@@ -0,0 +1,207 @@
1
+ import { CatalogEntityType as e, DeploymentIcon as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
+ import { DIAL_ICON_SIZE as i, GhostButton as a, GhostIconButton as o, NeutralButton as s, Popup as c, PopupSize as l, PrimaryButton as u, Textarea as d, ToggleIconButton as f, Tooltip as p } from "@epam/ai-dial-ui-kit";
3
+ import { IconChevronLeft as m, IconStarFilled as h } from "@tabler/icons-react";
4
+ import { useEffect as g, useId as _, useLayoutEffect as v, useMemo as y, useRef as b, useState as x } from "react";
5
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
6
+ import { AppIdentity as w, ContentTab as T, DeploymentSize as E } from "@epam/ai-dial-catalog";
7
+ var D = {
8
+ row: "_row_fggl0_1",
9
+ header: "_header_fggl0_5",
10
+ emptyHint: "_emptyHint_fggl0_9",
11
+ star: "_star_fggl0_13",
12
+ footer: "_footer_fggl0_17",
13
+ rowEnter: "_rowEnter_fggl0_25",
14
+ rowFadeIn: "_rowFadeIn_fggl0_1",
15
+ rowLeaving: "_rowLeaving_fggl0_29",
16
+ rowFadeOut: "_rowFadeOut_fggl0_1",
17
+ listContent: "_listContent_fggl0_57"
18
+ }, O = "px-3 pb-0.5 pt-2", k = 180, A = 288, j = ({ favorites: e, onSelect: o, onToggleFavorite: s, onBrowse: c, labels: l = {}, colors: u, nameClassName: d = "dial-small-text", headerClassName: m = "dial-tiny-lead-semi-text", emptyHintClassName: _ = "dial-small-text" }) => {
19
+ let { myCollectionLabel: y = "My Collection", emptyHintLabel: w = "Star a prompt to pin it here", browseLabel: T = "Browse", removeFromFavoritesLabel: E = "Remove from favorites" } = l, j = n({
20
+ "--fp-row-hover-bg": u?.rowHoverBackground,
21
+ "--fp-header-text": u?.headerText,
22
+ "--fp-empty-hint-text": u?.emptyHintText,
23
+ "--fp-star-color": u?.starColor,
24
+ "--fp-footer-border": u?.footerBorder
25
+ }), [M, N] = x(/* @__PURE__ */ new Set()), P = b(/* @__PURE__ */ new Map());
26
+ g(() => {
27
+ let e = P.current;
28
+ return () => {
29
+ e.forEach((e) => clearTimeout(e)), e.clear();
30
+ };
31
+ }, []);
32
+ let F = b(null), [I, L] = x();
33
+ v(() => {
34
+ F.current && L(Math.min(F.current.scrollHeight, A));
35
+ }, [e]);
36
+ let R = (e, t) => {
37
+ e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o(t));
38
+ }, z = (e) => {
39
+ N((t) => new Set(t).add(e));
40
+ let t = setTimeout(() => {
41
+ s(e), N((t) => {
42
+ let n = new Set(t);
43
+ return n.delete(e), n;
44
+ }), P.current.delete(e);
45
+ }, k);
46
+ P.current.set(e, t);
47
+ };
48
+ return /* @__PURE__ */ C("div", {
49
+ className: "flex min-w-[240px] flex-col",
50
+ style: j,
51
+ children: [
52
+ /* @__PURE__ */ S("p", {
53
+ className: r(m, O, D.header),
54
+ children: y
55
+ }),
56
+ /* @__PURE__ */ S("div", {
57
+ className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", D.listContent),
58
+ style: { maxHeight: I },
59
+ children: /* @__PURE__ */ S("div", {
60
+ ref: F,
61
+ children: e.length > 0 ? /* @__PURE__ */ S("ul", {
62
+ className: "flex flex-col gap-1 px-1 pb-1",
63
+ children: e.map((e) => {
64
+ let n = /* @__PURE__ */ C("div", {
65
+ role: "button",
66
+ tabIndex: 0,
67
+ className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", D.row),
68
+ onClick: () => o(e),
69
+ onKeyDown: (t) => R(t, e),
70
+ children: [
71
+ /* @__PURE__ */ S(t, {
72
+ size: i.MD,
73
+ initialsName: e.name
74
+ }),
75
+ /* @__PURE__ */ S("span", {
76
+ className: r(d, "min-w-0 flex-1 truncate text-start"),
77
+ children: e.name
78
+ }),
79
+ /* @__PURE__ */ S(f, {
80
+ icon: /* @__PURE__ */ S(h, {
81
+ size: i.SM,
82
+ className: D.star,
83
+ "aria-hidden": !0
84
+ }),
85
+ "aria-label": E,
86
+ isSelected: !0,
87
+ onClick: (t) => {
88
+ t.stopPropagation(), z(e.id);
89
+ }
90
+ })
91
+ ]
92
+ }), a = e.description != null && e.description !== "";
93
+ return /* @__PURE__ */ S("li", {
94
+ className: M.has(e.id) ? D.rowLeaving : D.rowEnter,
95
+ children: a ? /* @__PURE__ */ S(p, {
96
+ tooltip: e.description,
97
+ triggerClassName: "block",
98
+ children: n
99
+ }) : n
100
+ }, e.id);
101
+ })
102
+ }) : /* @__PURE__ */ S("p", {
103
+ className: r(_, "px-4 py-4 text-start", D.emptyHint),
104
+ children: w
105
+ })
106
+ })
107
+ }),
108
+ /* @__PURE__ */ S("div", {
109
+ className: r("border-t px-2 py-3", D.footer),
110
+ children: /* @__PURE__ */ S(a, {
111
+ label: T,
112
+ className: "w-full justify-center",
113
+ onClick: c
114
+ })
115
+ })
116
+ ]
117
+ });
118
+ }, M = { card: "_card_p8vwa_1" }, N = ({ open: t, promptName: i, content: a, description: f, parameters: p, onBack: h, onClose: g, onSubmit: v, onCancel: b, labels: D = {}, colors: O, titleClassName: k = "dial-h2-text", parametersLabelClassName: A = "dial-h2-text", detailsLabelClassName: j = "dial-h2-text" }) => {
119
+ let { title: N = "Prompt parameters", closeLabel: P = "Close", backLabel: F = "Back", parametersLabel: I = "Parameters", detailsLabel: L = "Details", enterValuePlaceholder: R = "Enter value", cancelLabel: z = "Cancel", submitLabel: B = "Confirm" } = D, [V, H] = x({}), U = _(), W = n({
120
+ "--pp-card-bg": O?.cardBackground,
121
+ "--pp-card-border": O?.cardBorder
122
+ }), G = y(() => p.some((e) => !V[e]?.trim()), [p, V]);
123
+ return /* @__PURE__ */ S(c, {
124
+ open: t,
125
+ header: /* @__PURE__ */ C("div", {
126
+ className: "flex items-center gap-2",
127
+ children: [h != null && /* @__PURE__ */ S(o, {
128
+ icon: /* @__PURE__ */ S(m, {
129
+ className: "rtl:scale-x-[-1]",
130
+ "aria-hidden": !0
131
+ }),
132
+ "aria-label": F,
133
+ onClick: h
134
+ }), /* @__PURE__ */ S("span", {
135
+ className: k,
136
+ children: N
137
+ })]
138
+ }),
139
+ ariaLabel: N,
140
+ size: l.Lg,
141
+ closeAriaLabel: P,
142
+ onClose: g,
143
+ footer: /* @__PURE__ */ C("div", {
144
+ className: "flex justify-end gap-2 px-6 py-4",
145
+ children: [/* @__PURE__ */ S(s, {
146
+ label: z,
147
+ onClick: b
148
+ }), /* @__PURE__ */ S(u, {
149
+ label: B,
150
+ disabled: G,
151
+ onClick: () => {
152
+ G || v(V);
153
+ }
154
+ })]
155
+ }),
156
+ children: /* @__PURE__ */ C("div", {
157
+ className: "flex flex-col gap-4 px-6 pb-4 pt-2",
158
+ children: [/* @__PURE__ */ S("div", {
159
+ className: r("flex h-[72px] w-full items-center rounded-lg border px-3", M.card),
160
+ style: W,
161
+ children: /* @__PURE__ */ S(w, {
162
+ type: e.Prompt,
163
+ name: i,
164
+ size: E.LG,
165
+ className: "w-full"
166
+ })
167
+ }), /* @__PURE__ */ C("div", {
168
+ className: "grid grid-cols-2 gap-4",
169
+ children: [/* @__PURE__ */ C("div", {
170
+ className: "flex flex-col gap-3",
171
+ children: [/* @__PURE__ */ S("h2", {
172
+ className: r(A, "m-0"),
173
+ children: I
174
+ }), p.map((e) => {
175
+ let t = `${U}-${e}`;
176
+ return /* @__PURE__ */ S(d, {
177
+ id: t,
178
+ "aria-label": e,
179
+ value: V[e] ?? "",
180
+ labelProps: {
181
+ htmlFor: t,
182
+ label: e,
183
+ required: !0
184
+ },
185
+ placeholder: R,
186
+ onChange: (t) => H((n) => ({
187
+ ...n,
188
+ [e]: t
189
+ }))
190
+ }, e);
191
+ })]
192
+ }), /* @__PURE__ */ C("div", {
193
+ className: "flex min-h-0 flex-col gap-3",
194
+ children: [/* @__PURE__ */ S("h2", {
195
+ className: r(j, "m-0"),
196
+ children: L
197
+ }), /* @__PURE__ */ S(T, {
198
+ content: a,
199
+ description: f
200
+ })]
201
+ })]
202
+ })]
203
+ })
204
+ });
205
+ };
206
+ //#endregion
207
+ export { j as FavoritePromptsPanel, N as PromptParametersPopup };
@@ -0,0 +1,12 @@
1
+ /** A single favorited prompt as shown in {@link FavoritePromptsPanelProps}. */
2
+ export interface FavoritePromptItem {
3
+ /** Stable identifier for the prompt. */
4
+ id: string;
5
+ /** Display name. */
6
+ name: string;
7
+ /** Short description shown in a tooltip on hover. Omitted when empty. */
8
+ description?: string;
9
+ /** Full prompt body, including any `{{param}}` tokens. */
10
+ content: string;
11
+ }
12
+ //# sourceMappingURL=favorite-prompt-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorite-prompt-item.d.ts","sourceRoot":"","sources":["../../src/models/favorite-prompt-item.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,47 @@
1
+ import { FavoritePromptItem } from './favorite-prompt-item';
2
+ /** Localizable string labels for {@link FavoritePromptsPanelProps}'s component. */
3
+ export interface FavoritePromptsPanelLabels {
4
+ /** Header above the favorites list. Defaults to `'My Collection'`. */
5
+ myCollectionLabel?: string;
6
+ /** Hint shown when there are no favorites. Defaults to `'Star a prompt to pin it here'`. */
7
+ emptyHintLabel?: string;
8
+ /** Label for the footer action button. Defaults to `'Browse'`. */
9
+ browseLabel?: string;
10
+ /** Accessible label for a row's remove-from-favorites star button. Defaults to `'Remove from favorites'`. */
11
+ removeFromFavoritesLabel?: string;
12
+ }
13
+ /** CSS custom-property overrides for the favorites panel. */
14
+ export interface FavoritePromptsPanelColors {
15
+ /** Background color of a row on hover. Defaults to `--bg-layer-sunken`. */
16
+ rowHoverBackground?: string;
17
+ /** Text color of the "My Collection" header. Defaults to `--text-tertiary`. */
18
+ headerText?: string;
19
+ /** Text color of the empty-favorites hint. Defaults to `--text-icon-tertiary`. */
20
+ emptyHintText?: string;
21
+ /** Fill color of a row's star icon. Defaults to `--text-warning-icon`. */
22
+ starColor?: string;
23
+ /** Border color above the footer's Browse button. Defaults to `--stroke-tertiary`. */
24
+ footerBorder?: string;
25
+ }
26
+ /** Props for the favorites panel component. */
27
+ export interface FavoritePromptsPanelProps {
28
+ /** The user's favorited prompts, already resolved by the host. */
29
+ favorites: FavoritePromptItem[];
30
+ /** Called when a row is activated (click, Enter, or Space). */
31
+ onSelect: (item: FavoritePromptItem) => void;
32
+ /** Called with a prompt's id when its row's star button is clicked to remove it from favorites. */
33
+ onToggleFavorite: (id: string) => void;
34
+ /** Called when the "Browse" button is clicked. */
35
+ onBrowse: () => void;
36
+ /** Localizable string overrides. */
37
+ labels?: FavoritePromptsPanelLabels;
38
+ /** Color overrides applied as CSS custom properties. */
39
+ colors?: FavoritePromptsPanelColors;
40
+ /** CSS class applied to a row's prompt name. Defaults to `'dial-small-text'`. */
41
+ nameClassName?: string;
42
+ /** CSS class applied to the "My Collection" header. Defaults to `'dial-tiny-lead-semi-text'`, which uppercases the label itself. */
43
+ headerClassName?: string;
44
+ /** CSS class applied to the empty-favorites hint. Defaults to `'dial-small-text'`. */
45
+ emptyHintClassName?: string;
46
+ }
47
+ //# sourceMappingURL=favorite-prompts-panel-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorite-prompts-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-prompts-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,mFAAmF;AACnF,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,6DAA6D;AAC7D,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,mGAAmG;IACnG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,64 @@
1
+ /** Localizable string labels for the prompt-parameters popup component. */
2
+ export interface PromptParametersPopupLabels {
3
+ /** Dialog title. Defaults to `'Prompt parameters'`. */
4
+ title?: string;
5
+ /** Accessible label for the close button. Defaults to `'Close'`. */
6
+ closeLabel?: string;
7
+ /** Accessible label for the back chevron, shown only when `onBack` is provided. Defaults to `'Back'`. */
8
+ backLabel?: string;
9
+ /** Heading for the parameters column. Defaults to `'Parameters'`. */
10
+ parametersLabel?: string;
11
+ /** Heading for the details column. Defaults to `'Details'`. */
12
+ detailsLabel?: string;
13
+ /** Placeholder shown in each empty parameter field. Defaults to `'Enter value'`. */
14
+ enterValuePlaceholder?: string;
15
+ /** Label for the footer Cancel button. Defaults to `'Cancel'`. */
16
+ cancelLabel?: string;
17
+ /** Label for the footer Submit button. Defaults to `'Confirm'`. */
18
+ submitLabel?: string;
19
+ }
20
+ /** CSS custom-property overrides for the prompt-parameters popup component. */
21
+ export interface PromptParametersPopupColors {
22
+ /** Background color of the prompt summary card. Defaults to `--bg-layer-sunken`. */
23
+ cardBackground?: string;
24
+ /** Border color of the prompt summary card. Defaults to `--stroke-tertiary`. */
25
+ cardBorder?: string;
26
+ }
27
+ /** Props for the prompt-parameters popup component. */
28
+ export interface PromptParametersPopupProps {
29
+ /** Whether the popup is open. */
30
+ open: boolean;
31
+ /** The selected prompt's display name, shown in the summary card. */
32
+ promptName: string;
33
+ /** The selected prompt's full content, including `{{param}}` tokens — rendered read-only in the Details column. */
34
+ content: string;
35
+ /** Short summary shown above the divider in the Details column. Omitted when empty. */
36
+ description?: string;
37
+ /**
38
+ * Distinct `{{param}}` names found in `content`, in first-occurrence order.
39
+ * One required field is rendered per entry.
40
+ */
41
+ parameters: string[];
42
+ /**
43
+ * Called to return to the previous screen (the browse modal). When omitted,
44
+ * no back chevron is rendered — the popup was opened directly from a favorite.
45
+ */
46
+ onBack?: () => void;
47
+ /** Called when the popup is dismissed via the close button. */
48
+ onClose: () => void;
49
+ /** Called with the entered values, keyed by parameter name, when Submit is clicked. */
50
+ onSubmit: (values: Record<string, string>) => void;
51
+ /** Called when the Cancel button is clicked. */
52
+ onCancel: () => void;
53
+ /** Localizable string overrides. */
54
+ labels?: PromptParametersPopupLabels;
55
+ /** Color overrides applied as CSS custom properties. */
56
+ colors?: PromptParametersPopupColors;
57
+ /** CSS class applied to the popup title. Defaults to `'dial-h2-text'`. */
58
+ titleClassName?: string;
59
+ /** CSS class applied to the "Parameters" column heading. Defaults to `'dial-h2-text'`. */
60
+ parametersLabelClassName?: string;
61
+ /** CSS class applied to the "Details" column heading. Defaults to `'dial-h2-text'`. */
62
+ detailsLabelClassName?: string;
63
+ }
64
+ //# sourceMappingURL=prompt-parameters-popup-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-parameters-popup-props.d.ts","sourceRoot":"","sources":["../../src/models/prompt-parameters-popup-props.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yGAAyG;IACzG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,+EAA+E;AAC/E,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,OAAO,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uFAAuF;IACvF,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACnD,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@epam/ai-dial-prompts",
3
+ "description": "Host-agnostic UI for picking a favorite prompt and resolving its {{parameter}} placeholders before it is inserted into a chat message",
4
+ "version": "1.1.0-dev.286",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./index.js",
8
+ "module": "./index.js",
9
+ "types": "./index.d.ts",
10
+ "exports": {
11
+ "./package.json": "./package.json",
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js",
15
+ "default": "./index.js"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "@epam/ai-dial-catalog": "1.1.0-dev.286",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.286",
21
+ "@epam/ai-dial-ui-kit": "*",
22
+ "@tabler/icons-react": "^3.0.0",
23
+ "react": "^19.0.0"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/epam/ai-dial-chat.git",
28
+ "directory": "libs/prompts"
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":""}