feedback-vos 1.0.9 → 1.0.11

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/README.md CHANGED
@@ -35,7 +35,8 @@ export default function RootLayout({ children }: { children: React.ReactNode })
35
35
  owner: process.env.NEXT_PUBLIC_GITHUB_OWNER!,
36
36
  repo: process.env.NEXT_PUBLIC_GITHUB_REPO!,
37
37
  }}
38
- position="bottom-right"
38
+ position={process.env.NEXT_PUBLIC_FEEDBACK_POSITION as 'bottom-right' | 'bottom-left' | undefined}
39
+ language={process.env.NEXT_PUBLIC_FEEDBACK_LANG as 'en' | 'nl' | undefined}
39
40
  />
40
41
  </body>
41
42
  </html>
@@ -53,7 +54,8 @@ export default function RootLayout({ children }: { children: React.ReactNode })
53
54
  NEXT_PUBLIC_GITHUB_TOKEN=your_github_token_here
54
55
  NEXT_PUBLIC_GITHUB_OWNER=your-username
55
56
  NEXT_PUBLIC_GITHUB_REPO=your-repo-name
56
- NEXT_PUBLIC_FEEDBACK_POSITION=bottom-right # optional: bottom-left
57
+ NEXT_PUBLIC_FEEDBACK_POSITION=bottom-right # optional: bottom-left, top-right, top-left
58
+ NEXT_PUBLIC_FEEDBACK_LANG=nl # optional: 'nl' for Dutch, 'en' for English (default)
57
59
  ```
58
60
 
59
61
  **Important:** `owner` and `repo` are case-sensitive. Ensure Issues are enabled in your repository.
@@ -69,7 +71,8 @@ interface WidgetProps {
69
71
  repo: string;
70
72
  screenshotPath?: string; // default: '.feedback-vos'
71
73
  };
72
- position?: 'bottom-right' | 'bottom-left';
74
+ position?: 'bottom-right' | 'bottom-left'; // or use NEXT_PUBLIC_FEEDBACK_POSITION env var
75
+ language?: 'en' | 'nl'; // defaults to 'en', or use NEXT_PUBLIC_FEEDBACK_LANG env var
73
76
  }
74
77
  ```
75
78
 
package/dist/index.d.mts CHANGED
@@ -10,8 +10,9 @@ interface WidgetProps {
10
10
  integration: 'github';
11
11
  githubConfig: GitHubConfig;
12
12
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
13
+ language?: 'en' | 'nl';
13
14
  }
14
15
 
15
- declare function Widget({ integration, githubConfig, position }: WidgetProps): react_jsx_runtime.JSX.Element;
16
+ declare function Widget({ integration, githubConfig, position, language, }: WidgetProps): react_jsx_runtime.JSX.Element;
16
17
 
17
18
  export { type GitHubConfig, Widget, type WidgetProps };
package/dist/index.d.ts CHANGED
@@ -10,8 +10,9 @@ interface WidgetProps {
10
10
  integration: 'github';
11
11
  githubConfig: GitHubConfig;
12
12
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
13
+ language?: 'en' | 'nl';
13
14
  }
14
15
 
15
- declare function Widget({ integration, githubConfig, position }: WidgetProps): react_jsx_runtime.JSX.Element;
16
+ declare function Widget({ integration, githubConfig, position, language, }: WidgetProps): react_jsx_runtime.JSX.Element;
16
17
 
17
18
  export { type GitHubConfig, Widget, type WidgetProps };
package/dist/index.js CHANGED
@@ -14,14 +14,69 @@ var html2canvas__default = /*#__PURE__*/_interopDefault(html2canvas);
14
14
  var bugImageUrl = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNzUwMDcgNEM4Ljc1MDA3IDMgOC4wMDAwNyAwIDYuMzEyMDcgMEM0LjYyNDA3IDAgNC43NTAwNyAyIDUuNzUwMDcgMkM2Ljc1MDA3IDIgNi43NTAwNyA0IDYuNzUwMDcgNUM2Ljc1MDA3IDYgNy43NTAwNyA0IDcuNzUwMDcgNFpNMy41NjcwNyA1LjcyQzQuNTY3MDcgNC43MiAzLjgxNzA3IDEuNzIgMi4xMjkwNyAxLjcyQzAuNDQxMDY4IDEuNzIgMC41NjcwNjggMy43MiAxLjU2NzA3IDMuNzJDMi41NjcwNyAzLj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Ljg3NUMxLjE2NjYzIDMxLjUzMTkgMi41MDk3NyAzMi44NzUgNC4xNjY2MyAzMi44NzVaIiBmaWxsPSIjODVDOEY4Ii8+Cjwvc3ZnPg==";
17
- function CloseButton({ className = "" }) {
18
- return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Button, { className: `text-zinc-400 hover:text-zinc-100 ${className}`, title: "Close feedback form", children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-4 h-4" }) });
17
+ function CloseButton({ className = "", title = "Close feedback form" }) {
18
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Button, { className: `text-zinc-400 hover:text-zinc-100 ${className}`, title, children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-4 h-4" }) });
19
19
  }
20
- function FeedbackTypeStep({ onFeedbackTypeChanged }) {
20
+
21
+ // src/lib/translations.ts
22
+ var translations = {
23
+ en: {
24
+ widget: {
25
+ button: "Feedback"
26
+ },
27
+ form: {
28
+ header: "Please give us your feedback!",
29
+ closeButton: "Close feedback form"
30
+ },
31
+ types: {
32
+ bug: "Bug",
33
+ idea: "Idea",
34
+ other: "Other"
35
+ },
36
+ content: {
37
+ placeholder: "Tell in detail what is happening",
38
+ sendButton: "Send feedback",
39
+ error: "Failed to send feedback. Please try again."
40
+ },
41
+ success: {
42
+ message: "We appreciate the feedback",
43
+ sendAnother: "I want to send another"
44
+ }
45
+ },
46
+ nl: {
47
+ widget: {
48
+ button: "Feedback"
49
+ },
50
+ form: {
51
+ header: "Geef ons je feedback!",
52
+ closeButton: "Feedback formulier sluiten"
53
+ },
54
+ types: {
55
+ bug: "Bug",
56
+ idea: "Idee",
57
+ other: "Anders"
58
+ },
59
+ content: {
60
+ placeholder: "Vertel in detail wat er gebeurt",
61
+ sendButton: "Feedback versturen",
62
+ error: "Feedback versturen mislukt. Probeer het opnieuw."
63
+ },
64
+ success: {
65
+ message: "Bedankt voor je feedback",
66
+ sendAnother: "Ik wil nog een sturen"
67
+ }
68
+ }
69
+ };
70
+ function getTranslations(lang = "en") {
71
+ return translations[lang];
72
+ }
73
+ function FeedbackTypeStep({ onFeedbackTypeChanged, language }) {
74
+ const t = getTranslations(language);
75
+ const feedbackTypes = getFeedbackTypes(language);
21
76
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
22
77
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between w-full gap-2", children: [
23
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl leading-6", children: "Please give us your feedback!" }),
24
- /* @__PURE__ */ jsxRuntime.jsx(CloseButton, {})
78
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl leading-6", children: t.form.header }),
79
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton })
25
80
  ] }),
26
81
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex py-8 gap-2 w-full", children: Object.entries(feedbackTypes).map(([key, value]) => {
27
82
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -460,8 +515,11 @@ function FeedbackContentStep({
460
515
  onFeedbackRestartRequest,
461
516
  onFeedbackSent,
462
517
  integration,
463
- githubConfig
518
+ githubConfig,
519
+ language
464
520
  }) {
521
+ const t = getTranslations(language);
522
+ const feedbackTypes = getFeedbackTypes(language);
465
523
  const [screenshot, setScreenshot] = react$1.useState(null);
466
524
  const feedbackTypeData = feedbackTypes[feedbackType];
467
525
  const [comment, setComment] = react$1.useState("");
@@ -485,7 +543,7 @@ function FeedbackContentStep({
485
543
  } catch (error) {
486
544
  console.error("Error sending feedback:", error);
487
545
  setIsSendingFeedback(false);
488
- alert("Failed to send feedback. Please try again.");
546
+ alert(t.content.error);
489
547
  }
490
548
  }
491
549
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -510,14 +568,14 @@ function FeedbackContentStep({
510
568
  ),
511
569
  feedbackTypeData.title
512
570
  ] }),
513
- /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { className: "absolute top-5 right-5" })
571
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { className: "absolute top-5 right-5", title: t.form.closeButton })
514
572
  ] }),
515
573
  /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmitFeedback, className: "my-4 w-full", children: [
516
574
  /* @__PURE__ */ jsxRuntime.jsx(
517
575
  "textarea",
518
576
  {
519
577
  className: "min-w-[384px] w-full min-h-[112px] text-sm \n placeholder-zinc-400 text-zinc-100 border-zinc-600 bg-transparent rounded-md \n focus:border-brand-500 focus:ring-brand-500 focus:ring-1 resize-none focus:outline-none\n scrollbar-thumb-zinc-700 scrollbar-track-transparent scrollbar-thin",
520
- placeholder: "Tell in detail what is happening",
578
+ placeholder: t.content.placeholder,
521
579
  onChange: (e) => setComment(e.target.value)
522
580
  }
523
581
  ),
@@ -535,58 +593,62 @@ function FeedbackContentStep({
535
593
  type: "submit",
536
594
  disabled: comment.length === 0 || isSendingFeedback,
537
595
  className: "p-2 bg-brand-500 rounded-md border-transparent flex-1 justify-center\n items-center text-sm hover:bg-brand-300 focus:outline-none focus:ring-2\n focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500\n transition-colors disabled:opacity-50 disabled:cursor-not-allowed\n disabled:hover:bg-brand-500",
538
- children: isSendingFeedback ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : "Send feedback"
596
+ children: isSendingFeedback ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : t.content.sendButton
539
597
  }
540
598
  )
541
599
  ] })
542
600
  ] })
543
601
  ] });
544
602
  }
545
- function FeedbackSuccessStep({ onFeedbackRestartRequest }) {
603
+ function FeedbackSuccessStep({ onFeedbackRestartRequest, language }) {
604
+ const t = getTranslations(language);
546
605
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
547
- /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, {}) }),
606
+ /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton }) }),
548
607
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center py-10 w-[304px]", children: [
549
608
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "41", height: "40", viewBox: "0 0 41 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
550
609
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M38.5 34C38.5 36.209 36.709 38 34.5 38H6.5C4.291 38 2.5 36.209 2.5 34V6C2.5 3.791 4.291 2 6.5 2H34.5C36.709 2 38.5 3.791 38.5 6V34Z", fill: "#77B255" }),
551
610
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M31.78 8.36202C30.624 7.61102 29.076 7.94002 28.322 9.09802L17.436 25.877L12.407 21.227C11.393 20.289 9.81103 20.352 8.87403 21.365C7.93703 22.379 7.99903 23.961 9.01303 24.898L16.222 31.564C16.702 32.009 17.312 32.229 17.918 32.229C18.591 32.229 19.452 31.947 20.017 31.09C20.349 30.584 32.517 11.82 32.517 11.82C33.268 10.661 32.938 9.11302 31.78 8.36202Z", fill: "white" })
552
611
  ] }),
553
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl mt-2", children: "We appreciate the feedback" }),
612
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl mt-2", children: t.success.message }),
554
613
  /* @__PURE__ */ jsxRuntime.jsx(
555
614
  "button",
556
615
  {
557
616
  type: "button",
558
617
  onClick: onFeedbackRestartRequest,
559
618
  className: "py-2 px-6 mt-6 bg-zinc-800 rounded-md border-transparent text-sm leading-6 hover:bg-zinc-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500 transition-colors",
560
- children: "I want to send another"
619
+ children: t.success.sendAnother
561
620
  }
562
621
  )
563
622
  ] })
564
623
  ] });
565
624
  }
566
- var feedbackTypes = {
567
- BUG: {
568
- title: "Bug",
569
- image: {
570
- source: bugImageUrl,
571
- alt: "A purple caterpillar image"
572
- }
573
- },
574
- IDEA: {
575
- title: "Idea",
576
- image: {
577
- source: ideaImageUrl,
578
- alt: "A Lamp image"
579
- }
580
- },
581
- OTHER: {
582
- title: "Other",
583
- image: {
584
- source: thoughtImageUrl,
585
- alt: "A thought balloon image"
625
+ function getFeedbackTypes(language = "en") {
626
+ const t = getTranslations(language);
627
+ return {
628
+ BUG: {
629
+ title: t.types.bug,
630
+ image: {
631
+ source: bugImageUrl,
632
+ alt: "A purple caterpillar image"
633
+ }
634
+ },
635
+ IDEA: {
636
+ title: t.types.idea,
637
+ image: {
638
+ source: ideaImageUrl,
639
+ alt: "A Lamp image"
640
+ }
641
+ },
642
+ OTHER: {
643
+ title: t.types.other,
644
+ image: {
645
+ source: thoughtImageUrl,
646
+ alt: "A thought balloon image"
647
+ }
586
648
  }
587
- }
588
- };
589
- function WidgetForm({ integration, githubConfig }) {
649
+ };
650
+ }
651
+ function WidgetForm({ integration, githubConfig, language }) {
590
652
  const [feedbackType, setFeedbackType] = react$1.useState(null);
591
653
  const [feedbackSent, setFeedbackSent] = react$1.useState(false);
592
654
  function handleRestartFeedback() {
@@ -594,14 +656,15 @@ function WidgetForm({ integration, githubConfig }) {
594
656
  setFeedbackType(null);
595
657
  }
596
658
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-zinc-900 p-4 relative rounded-2xl mb-4 flex flex-col items-center shadow-lg w-[calc(100vw-2rem)] md:w-auto", children: [
597
- feedbackSent ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackSuccessStep, { onFeedbackRestartRequest: handleRestartFeedback }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !feedbackType ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackTypeStep, { onFeedbackTypeChanged: setFeedbackType }) : /* @__PURE__ */ jsxRuntime.jsx(
659
+ feedbackSent ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackSuccessStep, { onFeedbackRestartRequest: handleRestartFeedback, language }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !feedbackType ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackTypeStep, { onFeedbackTypeChanged: setFeedbackType, language }) : /* @__PURE__ */ jsxRuntime.jsx(
598
660
  FeedbackContentStep,
599
661
  {
600
662
  feedbackType,
601
663
  onFeedbackRestartRequest: handleRestartFeedback,
602
664
  onFeedbackSent: () => setFeedbackSent(true),
603
665
  integration,
604
- githubConfig
666
+ githubConfig,
667
+ language
605
668
  }
606
669
  ) }),
607
670
  /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "text-xs text-neutral-400", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -616,11 +679,20 @@ function WidgetForm({ integration, githubConfig }) {
616
679
  ) })
617
680
  ] });
618
681
  }
682
+ function getDefaultLanguage() {
683
+ if (typeof process !== "undefined" && process.env.NEXT_PUBLIC_FEEDBACK_LANG === "nl") {
684
+ return "nl";
685
+ }
686
+ return "en";
687
+ }
619
688
  function Widget({
620
689
  integration,
621
690
  githubConfig,
622
- position = "bottom-right"
691
+ position = "bottom-right",
692
+ language
623
693
  }) {
694
+ const finalLanguage = language || getDefaultLanguage();
695
+ const t = getTranslations(finalLanguage);
624
696
  const positionClasses = {
625
697
  "bottom-right": "bottom-4 right-4 md:bottom-8 md:right-8",
626
698
  "bottom-left": "bottom-4 left-4 md:bottom-8 md:left-8",
@@ -633,14 +705,15 @@ function Widget({
633
705
  WidgetForm,
634
706
  {
635
707
  integration,
636
- githubConfig
708
+ githubConfig,
709
+ language: finalLanguage
637
710
  }
638
711
  ) }),
639
712
  /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Button, { className: "bg-brand-500 rounded-full px-3 h-12 text-white flex items-center group focus:outline-none", children: [
640
713
  /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ChatTeardropDots, { className: "w-6 h-6" }),
641
714
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "max-w-0 overflow-hidden group-hover:max-w-xs transition-all duration-500 ease-linear", children: [
642
715
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pl-2" }),
643
- "Feedback"
716
+ t.widget.button
644
717
  ] })
645
718
  ] })
646
719
  ] });