@e-llm-studio/feedback-flow 0.1.33 → 0.1.35

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.
@@ -363,10 +363,8 @@ function FeedbackModalContent({ flow, copy: copyOverrides, theme, onSubmit, onPr
363
363
  }
364
364
  }
365
365
  else if (flow.step === 'useful' && isGapFirstFlow) {
366
- if (showLowRatingTime)
367
- setShowLowRatingTime(false);
368
- else
369
- flow.setStep('gap');
366
+ setShowLowRatingTime(false);
367
+ flow.setStep('gap');
370
368
  }
371
369
  };
372
370
  const captureTabScreenshot = async (gapIndex) => {
@@ -105,7 +105,7 @@ function FeedbackPrompt({ flow, copy: copyOverrides, theme, compact = false, com
105
105
  setPendingStar(null);
106
106
  onBeforeOpen?.();
107
107
  flow.setStep(flow.completed ? (flow.ratingBase >= 3 && flow.ratingBase < 5 ? 'rating' : flow.ratingBase === 5 ? 'time' : 'gap') : flow.resumeStep);
108
- }, children: flow.completed ? copy.reviewLabel : copy.continueLabel })), flow.rating !== null && pendingStar !== null && (0, jsx_runtime_1.jsx)("span", { className: "cw-feedback-prompt__change-hint", role: "alert", children: "Click the star again to change your rating" }), tooltipVisible && typeof document !== 'undefined' && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { ref: tooltipRef, role: "tooltip", className: ['cw-feedback-tooltip', classNames?.tooltip].filter(Boolean).join(' '), style: { ...(0, feedbackTheme_1.feedbackThemeStyle)(theme), ...styles?.tooltip, display: 'block', position: 'fixed', zIndex: 2147483647, top: tooltipPosition?.top ?? -1000, left: tooltipPosition?.left ?? -1000, right: 'auto' }, children: hovered === 5 && !copy.starTooltipLabel
108
+ }, children: flow.completed ? copy.reviewLabel : copy.continueLabel })), flow.rating !== null && pendingStar !== null && (0, jsx_runtime_1.jsx)("span", { className: "cw-feedback-prompt__change-hint", role: "alert", style: { gridColumn: '1 / -1', gridRow: 3, display: 'block', width: '100%', maxWidth: 240, margin: '2px auto 0', textAlign: 'center', whiteSpace: 'normal', overflowWrap: 'anywhere' }, children: "Click the star again to change your rating" }), tooltipVisible && typeof document !== 'undefined' && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { ref: tooltipRef, role: "tooltip", className: ['cw-feedback-tooltip', classNames?.tooltip].filter(Boolean).join(' '), style: { ...(0, feedbackTheme_1.feedbackThemeStyle)(theme), ...styles?.tooltip, display: 'block', position: 'fixed', zIndex: 2147483647, top: tooltipPosition?.top ?? -1000, left: tooltipPosition?.left ?? -1000, right: 'auto' }, children: hovered === 5 && !copy.starTooltipLabel
109
109
  ? copy.fiveStarTooltip
110
110
  : copy.starTooltipLabel?.(hovered) ?? copy.starLabel(hovered) }), document.body), extraContent && ((0, jsx_runtime_1.jsx)("div", { className: classNames?.extraContent, style: styles?.extraContent, children: extraContent })), loading && (0, jsx_runtime_1.jsxs)("div", { className: "cw-feedback-prompt__loading", role: "status", children: [(0, jsx_runtime_1.jsx)("span", { className: "cw-feedback-prompt__spinner" }), " Loading feedback\u2026"] })] }));
111
111
  }
package/dist/types.js CHANGED
@@ -10,11 +10,11 @@ exports.defaultFeedbackCopy = {
10
10
  reviewLabel: "Review",
11
11
  fiveStarTooltip: "5 · Next Level Useful – Enhances my Life",
12
12
  starTooltipLabel: (star) => ({
13
- 1: "1 · Not useful — missed what I needed",
14
- 2: "2 · Slightly useful — needs improvement",
15
- 3: "3 · Somewhat useful — helped in part",
16
- 4: "4 · Very useful — saved me effort",
17
- 5: "5 · Next Level Useful — Enhances my Life",
13
+ 1: "1 · Not useful",
14
+ 2: "2 · Slightly useful",
15
+ 3: "3 · Somewhat useful",
16
+ 4: "4 · Very useful",
17
+ 5: "5 · Next Level Useful",
18
18
  }[star] ?? `${star} stars`),
19
19
  starGroupLabel: "Rate this response",
20
20
  starLabel: (star) => `${star} star${star === 1 ? "" : "s"}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/feedback-flow",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "private": false,
5
5
  "description": "Reusable configurable feedback rating and progressive feedback screens",
6
6
  "main": "./dist/index.js",