gotcha-feedback 1.1.12 → 1.2.1

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,115 @@
1
+ ===============================================================================
2
+ MODIFICATION NOTICE (per OFL §4)
3
+ ===============================================================================
4
+
5
+ gotcha-feedback ships a modified subset of the Fraunces typeface. The subset
6
+ is limited to printable ASCII (U+0020-007E), optical size 9pt, weight 400
7
+ (Regular), with kern and liga features retained and hinting removed. It is
8
+ produced from the original Fraunces source using pyftsubset (fonttools).
9
+
10
+ The subset is exposed under the CSS font-family name "Gotcha Fraunces" to
11
+ satisfy OFL §1's Reserved Font Name requirement — we do not claim to
12
+ distribute "Fraunces" itself.
13
+
14
+ The original, unmodified Fraunces source is available at:
15
+ https://github.com/undercasetype/Fraunces
16
+
17
+ Upstream commit pinned: 7ccdec31c6028118dce3e47fe864e3744460371d
18
+
19
+ The unabridged SIL Open Font License 1.1 follows below.
20
+
21
+ ===============================================================================
22
+
23
+ Copyright 2018 The Fraunces Project Authors (https://github.com/undercasetype/Fraunces)
24
+
25
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
26
+ This license is copied below, and is also available with a FAQ at:
27
+ http://scripts.sil.org/OFL
28
+
29
+
30
+ -----------------------------------------------------------
31
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
32
+ -----------------------------------------------------------
33
+
34
+ PREAMBLE
35
+ The goals of the Open Font License (OFL) are to stimulate worldwide
36
+ development of collaborative font projects, to support the font creation
37
+ efforts of academic and linguistic communities, and to provide a free and
38
+ open framework in which fonts may be shared and improved in partnership
39
+ with others.
40
+
41
+ The OFL allows the licensed fonts to be used, studied, modified and
42
+ redistributed freely as long as they are not sold by themselves. The
43
+ fonts, including any derivative works, can be bundled, embedded,
44
+ redistributed and/or sold with any software provided that any reserved
45
+ names are not used by derivative works. The fonts and derivatives,
46
+ however, cannot be released under any other type of license. The
47
+ requirement for fonts to remain under this license does not apply
48
+ to any document created using the fonts or their derivatives.
49
+
50
+ DEFINITIONS
51
+ "Font Software" refers to the set of files released by the Copyright
52
+ Holder(s) under this license and clearly marked as such. This may
53
+ include source files, build scripts and documentation.
54
+
55
+ "Reserved Font Name" refers to any names specified as such after the
56
+ copyright statement(s).
57
+
58
+ "Original Version" refers to the collection of Font Software components as
59
+ distributed by the Copyright Holder(s).
60
+
61
+ "Modified Version" refers to any derivative made by adding to, deleting,
62
+ or substituting -- in part or in whole -- any of the components of the
63
+ Original Version, by changing formats or by porting the Font Software to a
64
+ new environment.
65
+
66
+ "Author" refers to any designer, engineer, programmer, technical
67
+ writer or other person who contributed to the Font Software.
68
+
69
+ PERMISSION & CONDITIONS
70
+ Permission is hereby granted, free of charge, to any person obtaining
71
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
72
+ redistribute, and sell modified and unmodified copies of the Font
73
+ Software, subject to the following conditions:
74
+
75
+ 1) Neither the Font Software nor any of its individual components,
76
+ in Original or Modified Versions, may be sold by itself.
77
+
78
+ 2) Original or Modified Versions of the Font Software may be bundled,
79
+ redistributed and/or sold with any software, provided that each copy
80
+ contains the above copyright notice and this license. These can be
81
+ included either as stand-alone text files, human-readable headers or
82
+ in the appropriate machine-readable metadata fields within text or
83
+ binary files as long as those fields can be easily viewed by the user.
84
+
85
+ 3) No Modified Version of the Font Software may use the Reserved Font
86
+ Name(s) unless explicit written permission is granted by the corresponding
87
+ Copyright Holder. This restriction only applies to the primary font name as
88
+ presented to the users.
89
+
90
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
91
+ Software shall not be used to promote, endorse or advertise any
92
+ Modified Version, except to acknowledge the contribution(s) of the
93
+ Copyright Holder(s) and the Author(s) or with their explicit written
94
+ permission.
95
+
96
+ 5) The Font Software, modified or unmodified, in part or in whole,
97
+ must be distributed entirely under this license, and must not be
98
+ distributed under any other license. The requirement for fonts to
99
+ remain under this license does not apply to any document created
100
+ using the Font Software.
101
+
102
+ TERMINATION
103
+ This license becomes null and void if any of the above conditions are
104
+ not met.
105
+
106
+ DISCLAIMER
107
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
108
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
109
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
110
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
111
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
112
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
113
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
114
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
115
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/README.md CHANGED
@@ -57,6 +57,22 @@ function FeatureCard() {
57
57
  - **Accessible** - Full keyboard navigation and screen reader support
58
58
  - **Animated** - Smooth enter/exit animations with CSS transitions
59
59
 
60
+ ## Content Security Policy
61
+
62
+ The SDK injects its stylesheet as an inline `<style>` tag and embeds its
63
+ display font as a `data:` URL inside that stylesheet. If your site runs
64
+ a strict CSP, you will need the following directives:
65
+
66
+ - `style-src 'unsafe-inline'` (or a matching nonce) — the SDK injects
67
+ its own stylesheet at runtime.
68
+ - `font-src data:` (or `font-src 'self' data:`) — the branded serif font
69
+ is embedded as a base64 data URL so the SDK makes **zero** third-party
70
+ font requests.
71
+
72
+ The SDK makes no other external requests for fonts, analytics, or
73
+ tracking. See `LICENSE.FRAUNCES.txt` for the bundled Fraunces subset
74
+ license (OFL 1.1).
75
+
60
76
  ## Props
61
77
 
62
78
  ### GotchaProvider
package/dist/index.d.mts CHANGED
@@ -65,6 +65,7 @@ interface SubmitResponsePayload {
65
65
  isBug?: boolean;
66
66
  screenshot?: string;
67
67
  user?: GotchaUser;
68
+ userEmail?: string;
68
69
  context?: SubmissionContext;
69
70
  }
70
71
  interface GotchaResponse {
@@ -172,6 +173,7 @@ interface GotchaThemeColors {
172
173
  }
173
174
  interface GotchaThemeTypography {
174
175
  fontFamily: string;
176
+ fontFamilyDisplay: string;
175
177
  fontSize: {
176
178
  xs: number;
177
179
  sm: number;
@@ -220,7 +222,7 @@ interface GotchaThemeConfig {
220
222
  animation?: Partial<GotchaThemeAnimation>;
221
223
  }
222
224
  /** Create a custom theme by merging partial overrides onto a preset */
223
- declare function createTheme(base: 'light' | 'dark', overrides: GotchaThemeConfig): GotchaThemeConfig;
225
+ declare function createTheme(base: "light" | "dark", overrides: GotchaThemeConfig): GotchaThemeConfig;
224
226
 
225
227
  interface GotchaProviderProps {
226
228
  /** Your Gotcha API key */
@@ -235,16 +237,29 @@ interface GotchaProviderProps {
235
237
  disabled?: boolean;
236
238
  /** Default user metadata applied to all submissions */
237
239
  defaultUser?: GotchaUser;
240
+ /**
241
+ * Default submitter email applied to all <Gotcha /> instances under this
242
+ * provider. Per-instance `userEmail` prop wins when both are set. Used
243
+ * by the dashboard to send "we shipped what you asked for" notify-back.
244
+ */
245
+ defaultUserEmail?: string;
238
246
  /** Theme configuration overrides applied to all instances */
239
247
  themeConfig?: GotchaThemeConfig;
240
248
  }
241
- declare function GotchaProvider({ apiKey, children, baseUrl, debug, disabled, defaultUser, themeConfig, }: GotchaProviderProps): react_jsx_runtime.JSX.Element;
249
+ declare function GotchaProvider({ apiKey, children, baseUrl, debug, disabled, defaultUser, defaultUserEmail, themeConfig, }: GotchaProviderProps): react_jsx_runtime.JSX.Element;
242
250
 
243
251
  interface GotchaProps {
244
252
  /** Unique identifier for this element */
245
253
  elementId: string;
246
254
  /** User metadata for segmentation */
247
255
  user?: GotchaUser;
256
+ /**
257
+ * Submitter's email address. When set, the dashboard can email the user
258
+ * a "we shipped what you asked for" note when their feedback hits the
259
+ * SHIPPED status. Pass only with explicit user consent — store no other
260
+ * PII in this field.
261
+ */
262
+ userEmail?: string;
248
263
  /** Feedback mode */
249
264
  mode?: ResponseMode;
250
265
  /** Show the text input in feedback mode (default: true) */
@@ -333,7 +348,7 @@ interface GotchaProps {
333
348
  /** Called on error */
334
349
  onError?: (error: GotchaError) => void;
335
350
  }
336
- declare function Gotcha({ elementId, user, mode, showText, showRating, voteLabels, options, allowMultiple, npsQuestion, npsFollowUp, npsFollowUpPlaceholder, npsLowLabel, npsHighLabel, enableBugFlag, bugFlagLabel, enableScreenshot, onePerUser, cooldownDays, hideAfterSubmitDays, showAfterSeconds, showAfterScrollPercent, showAfterVisits, followUp, animated, position, size, theme, customStyles, visible, showOnHover, touchBehavior, promptText, placeholder, submitText, thankYouMessage, onSubmit, onOpen, onClose, onError, }: GotchaProps): react_jsx_runtime.JSX.Element | null;
351
+ declare function Gotcha({ elementId, user, userEmail, mode, showText, showRating, voteLabels, options, allowMultiple, npsQuestion, npsFollowUp, npsFollowUpPlaceholder, npsLowLabel, npsHighLabel, enableBugFlag, bugFlagLabel, enableScreenshot, onePerUser, cooldownDays, hideAfterSubmitDays, showAfterSeconds, showAfterScrollPercent, showAfterVisits, followUp, animated, position, size, theme, customStyles, visible, showOnHover, touchBehavior, promptText, placeholder, submitText, thankYouMessage, onSubmit, onOpen, onClose, onError, }: GotchaProps): react_jsx_runtime.JSX.Element | null;
337
352
 
338
353
  type ScoreVariant = 'stars' | 'number' | 'compact' | 'votes';
339
354
  interface GotchaScoreProps {
package/dist/index.d.ts CHANGED
@@ -65,6 +65,7 @@ interface SubmitResponsePayload {
65
65
  isBug?: boolean;
66
66
  screenshot?: string;
67
67
  user?: GotchaUser;
68
+ userEmail?: string;
68
69
  context?: SubmissionContext;
69
70
  }
70
71
  interface GotchaResponse {
@@ -172,6 +173,7 @@ interface GotchaThemeColors {
172
173
  }
173
174
  interface GotchaThemeTypography {
174
175
  fontFamily: string;
176
+ fontFamilyDisplay: string;
175
177
  fontSize: {
176
178
  xs: number;
177
179
  sm: number;
@@ -220,7 +222,7 @@ interface GotchaThemeConfig {
220
222
  animation?: Partial<GotchaThemeAnimation>;
221
223
  }
222
224
  /** Create a custom theme by merging partial overrides onto a preset */
223
- declare function createTheme(base: 'light' | 'dark', overrides: GotchaThemeConfig): GotchaThemeConfig;
225
+ declare function createTheme(base: "light" | "dark", overrides: GotchaThemeConfig): GotchaThemeConfig;
224
226
 
225
227
  interface GotchaProviderProps {
226
228
  /** Your Gotcha API key */
@@ -235,16 +237,29 @@ interface GotchaProviderProps {
235
237
  disabled?: boolean;
236
238
  /** Default user metadata applied to all submissions */
237
239
  defaultUser?: GotchaUser;
240
+ /**
241
+ * Default submitter email applied to all <Gotcha /> instances under this
242
+ * provider. Per-instance `userEmail` prop wins when both are set. Used
243
+ * by the dashboard to send "we shipped what you asked for" notify-back.
244
+ */
245
+ defaultUserEmail?: string;
238
246
  /** Theme configuration overrides applied to all instances */
239
247
  themeConfig?: GotchaThemeConfig;
240
248
  }
241
- declare function GotchaProvider({ apiKey, children, baseUrl, debug, disabled, defaultUser, themeConfig, }: GotchaProviderProps): react_jsx_runtime.JSX.Element;
249
+ declare function GotchaProvider({ apiKey, children, baseUrl, debug, disabled, defaultUser, defaultUserEmail, themeConfig, }: GotchaProviderProps): react_jsx_runtime.JSX.Element;
242
250
 
243
251
  interface GotchaProps {
244
252
  /** Unique identifier for this element */
245
253
  elementId: string;
246
254
  /** User metadata for segmentation */
247
255
  user?: GotchaUser;
256
+ /**
257
+ * Submitter's email address. When set, the dashboard can email the user
258
+ * a "we shipped what you asked for" note when their feedback hits the
259
+ * SHIPPED status. Pass only with explicit user consent — store no other
260
+ * PII in this field.
261
+ */
262
+ userEmail?: string;
248
263
  /** Feedback mode */
249
264
  mode?: ResponseMode;
250
265
  /** Show the text input in feedback mode (default: true) */
@@ -333,7 +348,7 @@ interface GotchaProps {
333
348
  /** Called on error */
334
349
  onError?: (error: GotchaError) => void;
335
350
  }
336
- declare function Gotcha({ elementId, user, mode, showText, showRating, voteLabels, options, allowMultiple, npsQuestion, npsFollowUp, npsFollowUpPlaceholder, npsLowLabel, npsHighLabel, enableBugFlag, bugFlagLabel, enableScreenshot, onePerUser, cooldownDays, hideAfterSubmitDays, showAfterSeconds, showAfterScrollPercent, showAfterVisits, followUp, animated, position, size, theme, customStyles, visible, showOnHover, touchBehavior, promptText, placeholder, submitText, thankYouMessage, onSubmit, onOpen, onClose, onError, }: GotchaProps): react_jsx_runtime.JSX.Element | null;
351
+ declare function Gotcha({ elementId, user, userEmail, mode, showText, showRating, voteLabels, options, allowMultiple, npsQuestion, npsFollowUp, npsFollowUpPlaceholder, npsLowLabel, npsHighLabel, enableBugFlag, bugFlagLabel, enableScreenshot, onePerUser, cooldownDays, hideAfterSubmitDays, showAfterSeconds, showAfterScrollPercent, showAfterVisits, followUp, animated, position, size, theme, customStyles, visible, showOnHover, touchBehavior, promptText, placeholder, submitText, thankYouMessage, onSubmit, onOpen, onClose, onError, }: GotchaProps): react_jsx_runtime.JSX.Element | null;
337
352
 
338
353
  type ScoreVariant = 'stars' | 'number' | 'compact' | 'votes';
339
354
  interface GotchaScoreProps {