@getuserfeedback/react 0.1.0 → 0.1.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.
- package/README.md +126 -64
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -50,14 +50,14 @@ You can call flows imperatively, e.g., open a feedback form when the user clicks
|
|
|
50
50
|
```tsx
|
|
51
51
|
import { useFlow } from "@getuserfeedback/react";
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
const CONTACT_SUPPORT_FLOW_ID = "YOUR_FLOW_ID";
|
|
54
54
|
|
|
55
|
-
export function
|
|
56
|
-
const { open } = useFlow({ flowId:
|
|
55
|
+
export function ContactSupportMenuItem() {
|
|
56
|
+
const { open } = useFlow({ flowId: CONTACT_SUPPORT_FLOW_ID });
|
|
57
57
|
|
|
58
58
|
return (
|
|
59
59
|
<button type="button" onClick={() => open()}>
|
|
60
|
-
|
|
60
|
+
Contact support
|
|
61
61
|
</button>
|
|
62
62
|
);
|
|
63
63
|
}
|
|
@@ -147,23 +147,31 @@ import {
|
|
|
147
147
|
useGetUserFeedback,
|
|
148
148
|
} from "@getuserfeedback/react";
|
|
149
149
|
|
|
150
|
-
function
|
|
150
|
+
function LoadWidgetAfterConsent({
|
|
151
|
+
hasResolvedConsent,
|
|
152
|
+
}: {
|
|
153
|
+
hasResolvedConsent: boolean;
|
|
154
|
+
}) {
|
|
151
155
|
const client = useGetUserFeedback();
|
|
152
156
|
|
|
153
157
|
useEffect(() => {
|
|
158
|
+
if (!hasResolvedConsent) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
client.load();
|
|
155
|
-
}, [client]);
|
|
163
|
+
}, [client, hasResolvedConsent]);
|
|
156
164
|
|
|
157
165
|
return null;
|
|
158
166
|
}
|
|
159
167
|
|
|
160
|
-
export function App() {
|
|
168
|
+
export function App({ hasResolvedConsent }: { hasResolvedConsent: boolean }) {
|
|
161
169
|
return (
|
|
162
170
|
<GetUserFeedbackProvider
|
|
163
171
|
clientOptions={{ apiKey: "YOUR_API_KEY", disableAutoLoad: true }}
|
|
164
172
|
>
|
|
165
173
|
<AppRoutes />
|
|
166
|
-
<
|
|
174
|
+
<LoadWidgetAfterConsent hasResolvedConsent={hasResolvedConsent} />
|
|
167
175
|
</GetUserFeedbackProvider>
|
|
168
176
|
);
|
|
169
177
|
}
|
|
@@ -186,7 +194,7 @@ type User = {
|
|
|
186
194
|
lastName?: string;
|
|
187
195
|
};
|
|
188
196
|
|
|
189
|
-
export function
|
|
197
|
+
export function Identify({ user }: { user: User | null }) {
|
|
190
198
|
const client = useGetUserFeedback();
|
|
191
199
|
|
|
192
200
|
useEffect(() => {
|
|
@@ -211,12 +219,19 @@ Call this on logout to clear active identity state and auth (if you use auth):
|
|
|
211
219
|
|
|
212
220
|
```tsx
|
|
213
221
|
import { useGetUserFeedback } from "@getuserfeedback/react";
|
|
222
|
+
import { useAuth } from "./auth";
|
|
214
223
|
|
|
215
224
|
export function LogoutButton() {
|
|
216
|
-
const
|
|
225
|
+
const { signOut } = useAuth();
|
|
226
|
+
const { reset } = useGetUserFeedback();
|
|
227
|
+
|
|
228
|
+
const handleLogout = async () => {
|
|
229
|
+
await signOut();
|
|
230
|
+
await reset();
|
|
231
|
+
};
|
|
217
232
|
|
|
218
233
|
return (
|
|
219
|
-
<button type="button" onClick={
|
|
234
|
+
<button type="button" onClick={handleLogout}>
|
|
220
235
|
Log out
|
|
221
236
|
</button>
|
|
222
237
|
);
|
|
@@ -262,44 +277,52 @@ export function App() {
|
|
|
262
277
|
### Update color scheme at runtime
|
|
263
278
|
|
|
264
279
|
```tsx
|
|
280
|
+
import { useEffect } from "react";
|
|
265
281
|
import { useGetUserFeedback } from "@getuserfeedback/react";
|
|
266
282
|
|
|
267
|
-
|
|
283
|
+
type ThemePreference = "light" | "dark" | "system";
|
|
284
|
+
|
|
285
|
+
export function SyncWidgetTheme({
|
|
286
|
+
themePreference,
|
|
287
|
+
}: {
|
|
288
|
+
themePreference: ThemePreference;
|
|
289
|
+
}) {
|
|
268
290
|
const client = useGetUserFeedback();
|
|
269
291
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
Follow system
|
|
276
|
-
</button>
|
|
277
|
-
);
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
client.configure({ colorScheme: themePreference });
|
|
294
|
+
}, [client, themePreference]);
|
|
295
|
+
|
|
296
|
+
return null;
|
|
278
297
|
}
|
|
279
298
|
```
|
|
280
299
|
|
|
281
300
|
You can also switch runtime behavior back to host-driven auto-detection:
|
|
282
301
|
|
|
283
302
|
```tsx
|
|
303
|
+
import { useEffect } from "react";
|
|
284
304
|
import { useGetUserFeedback } from "@getuserfeedback/react";
|
|
285
305
|
|
|
286
|
-
export function
|
|
306
|
+
export function SyncWidgetToAppTheme({
|
|
307
|
+
useAppTheme,
|
|
308
|
+
}: {
|
|
309
|
+
useAppTheme: boolean;
|
|
310
|
+
}) {
|
|
287
311
|
const client = useGetUserFeedback();
|
|
288
312
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
);
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
if (!useAppTheme) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
client.configure({
|
|
319
|
+
colorScheme: {
|
|
320
|
+
autoDetectColorScheme: ["class", "data-theme"], // default
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
}, [client, useAppTheme]);
|
|
324
|
+
|
|
325
|
+
return null;
|
|
303
326
|
}
|
|
304
327
|
```
|
|
305
328
|
|
|
@@ -393,43 +416,78 @@ With `pending` consent set by default, all non-essential data scopes are conside
|
|
|
393
416
|
|
|
394
417
|
### Update consent at runtime
|
|
395
418
|
|
|
419
|
+
For example, sync consent from your cookie banner or CMP state:
|
|
420
|
+
|
|
396
421
|
```tsx
|
|
422
|
+
import { useEffect } from "react";
|
|
397
423
|
import { useGetUserFeedback } from "@getuserfeedback/react";
|
|
424
|
+
import { useCookieConsent } from "./cookie-consent";
|
|
398
425
|
|
|
399
|
-
export function
|
|
426
|
+
export function GetUserFeedbackConsentSync() {
|
|
400
427
|
const client = useGetUserFeedback();
|
|
428
|
+
const { hasAnswered, analyticsEnabled } = useCookieConsent();
|
|
401
429
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
430
|
+
useEffect(() => {
|
|
431
|
+
if (!hasAnswered) {
|
|
432
|
+
client.configure({ consent: "pending" });
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (!analyticsEnabled) {
|
|
437
|
+
client.configure({ consent: "denied" });
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
client.configure({
|
|
442
|
+
consent: ["analytics.measurement", "analytics.storage"],
|
|
443
|
+
});
|
|
444
|
+
}, [analyticsEnabled, client, hasAnswered]);
|
|
445
|
+
|
|
446
|
+
return null;
|
|
410
447
|
}
|
|
411
448
|
```
|
|
412
449
|
|
|
413
|
-
|
|
450
|
+
Or, when users save privacy settings, pass explicit granted scopes:
|
|
414
451
|
|
|
415
452
|
```tsx
|
|
416
453
|
import { useGetUserFeedback } from "@getuserfeedback/react";
|
|
417
454
|
|
|
418
|
-
|
|
455
|
+
type PrivacySettings = {
|
|
456
|
+
analyticsEnabled: boolean;
|
|
457
|
+
personalizedAdsEnabled: boolean;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
export function useSavePrivacySettings() {
|
|
419
461
|
const client = useGetUserFeedback();
|
|
420
462
|
|
|
421
|
-
return (
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
463
|
+
return async ({
|
|
464
|
+
analyticsEnabled,
|
|
465
|
+
personalizedAdsEnabled,
|
|
466
|
+
}: PrivacySettings) => {
|
|
467
|
+
const grantedScopes: Array<
|
|
468
|
+
| "analytics.measurement"
|
|
469
|
+
| "analytics.storage"
|
|
470
|
+
| "ads.storage"
|
|
471
|
+
| "ads.user_data"
|
|
472
|
+
| "ads.personalization"
|
|
473
|
+
> = [];
|
|
474
|
+
|
|
475
|
+
if (analyticsEnabled) {
|
|
476
|
+
grantedScopes.push("analytics.measurement", "analytics.storage");
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (personalizedAdsEnabled) {
|
|
480
|
+
grantedScopes.push(
|
|
481
|
+
"ads.storage",
|
|
482
|
+
"ads.user_data",
|
|
483
|
+
"ads.personalization",
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
await client.configure({
|
|
488
|
+
consent: grantedScopes.length > 0 ? grantedScopes : "denied",
|
|
489
|
+
});
|
|
490
|
+
};
|
|
433
491
|
}
|
|
434
492
|
|
|
435
493
|
```
|
|
@@ -451,12 +509,14 @@ export function ConsentScopesButton() {
|
|
|
451
509
|
```tsx
|
|
452
510
|
import { useFlow } from "@getuserfeedback/react";
|
|
453
511
|
|
|
454
|
-
|
|
455
|
-
|
|
512
|
+
const BUG_REPORT_FLOW_ID = "YOUR_FLOW_ID";
|
|
513
|
+
|
|
514
|
+
export function ReportBugButton() {
|
|
515
|
+
const { open } = useFlow({ flowId: BUG_REPORT_FLOW_ID });
|
|
456
516
|
|
|
457
517
|
return (
|
|
458
518
|
<button type="button" onClick={() => open()}>
|
|
459
|
-
|
|
519
|
+
Report a bug
|
|
460
520
|
</button>
|
|
461
521
|
);
|
|
462
522
|
}
|
|
@@ -469,9 +529,11 @@ Prefetching loads flow resources over the network, prerendering warms up the UI.
|
|
|
469
529
|
```tsx
|
|
470
530
|
import { useFlow } from "@getuserfeedback/react";
|
|
471
531
|
|
|
472
|
-
|
|
532
|
+
const FEEDBACK_FLOW_ID = "YOUR_FLOW_ID";
|
|
533
|
+
|
|
534
|
+
export function HelpMenuFeedbackItem() {
|
|
473
535
|
const { prerender, open } = useFlow({
|
|
474
|
-
flowId:
|
|
536
|
+
flowId: FEEDBACK_FLOW_ID,
|
|
475
537
|
prefetchOnMount: true,
|
|
476
538
|
});
|
|
477
539
|
|
|
@@ -482,7 +544,7 @@ export function FeedbackButton() {
|
|
|
482
544
|
onFocus={() => prerender()}
|
|
483
545
|
onClick={() => open()}
|
|
484
546
|
>
|
|
485
|
-
|
|
547
|
+
Share product feedback
|
|
486
548
|
</button>
|
|
487
549
|
);
|
|
488
550
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{createClient as M}from"@getuserfeedback/sdk";import{createContext as Q,useCallback as _,useContext as q,useEffect as O,useMemo as h,useRef as y,useState as z}from"react";import{jsx as r}from"react/jsx-runtime";var W={isOpen:!1,isLoading:!1,shouldRenderContainer:!1,width:void 0,height:void 0},T=Q(null);function X({children:G,clientOptions:U}){let p=M(U),A=y(null),P=y(0),[R,v]=z(()=>({...p.getFlowState()})),b=_((E)=>{if(A.current=E,P.current===0)return;p.setDefaultContainerPolicy({kind:"hostContainer",host:E,sharing:"perFlowRun"})},[p]),F=_(()=>{if(P.current+=1,P.current===1)p.setDefaultContainerPolicy({kind:"hostContainer",host:A.current,sharing:"perFlowRun"});return()=>{if(P.current=Math.max(0,P.current-1),P.current===0)p.setDefaultContainerPolicy({kind:"floating"})}},[p]);O(()=>p.subscribeFlowState((E)=>{v({isOpen:E.isOpen,isLoading:E.isLoading,width:E.width,height:E.height})},{emitInitial:!0}),[p]);let K=h(()=>{if(!R.isOpen&&!R.isLoading)return W;return{isOpen:R.isOpen,isLoading:R.isLoading,shouldRenderContainer:!0,width:R.width,height:R.height}},[R]),N=h(()=>({client:p,apiKey:U.apiKey,setDefaultFlowContainer:b,registerDefaultFlowContainerConsumer:F,defaultFlowContainerState:K}),[p,U.apiKey,K,F,b]);return r(T.Provider,{value:N,children:G})}var B=(G)=>{let U=q(T);if(!U)throw Error("useFlow must be used within a GetUserFeedbackProvider");let{client:p}=U,{flowId:A,prefetchOnMount:P=!1}=G.flow,R=h(()=>p.flow(A),[p,A]),v=G.mode==="container",[b,F]=z(()=>R.getFlowState()),K=_(()=>{return R.open(v?{containerRequirement:"hostOnly"}:void 0)},[R,v]),N=_(()=>R.close(),[R]),E=_((I)=>I?K():N(),[N,K]),J=_((I)=>{if(!v)return;R.setContainer(I)},[R,v]),L=v&&(b.isLoading||b.isOpen);return O(()=>R.subscribeFlowState((I)=>F({isOpen:I.isOpen,isLoading:I.isLoading,width:I.width,height:I.height}),{emitInitial:!1}),[R]),O(()=>{if(!P)return;R.prefetch()},[R,P]),{isOpen:b.isOpen,isLoading:b.isLoading,width:b.width,height:b.height,shouldRenderContainer:L,setOpen:E,open:K,close:N,prerender:()=>R.prerender(),containerRef:J}};function Y(G){let U=B({flow:G,mode:"default"});return{isOpen:U.isOpen,isLoading:U.isLoading,width:U.width,height:U.height,open:U.open,close:U.close,prerender:U.prerender}}function Z(G){let U=B({flow:G,mode:"container"});return{isOpen:U.isOpen,isLoading:U.isLoading,width:U.width,height:U.height,shouldRenderContainer:U.shouldRenderContainer,setOpen:U.setOpen,prerender:U.prerender,containerRef:U.containerRef}}function $(){let G=q(T);if(!G)throw Error("useDefaultFlowContainer must be used within a GetUserFeedbackProvider");let{client:U,defaultFlowContainerState:p,registerDefaultFlowContainerConsumer:A,setDefaultFlowContainer:P}=G;O(()=>A(),[A]);let R=_((F)=>{P(F)},[P]),v=_(()=>U.close(),[U]),b=_((F)=>{if(F)return Promise.resolve();return v()},[v]);return{isOpen:p.isOpen,isLoading:p.isLoading,shouldRenderContainer:p.shouldRenderContainer,width:p.width,height:p.height,setOpen:b,containerRef:R}}function j(){let G=q(T);if(!G)throw Error("useGetUserFeedback must be used within a GetUserFeedbackProvider");return G.client}var H="0.1.
|
|
2
|
+
import{createClient as M}from"@getuserfeedback/sdk";import{createContext as Q,useCallback as _,useContext as q,useEffect as O,useMemo as h,useRef as y,useState as z}from"react";import{jsx as r}from"react/jsx-runtime";var W={isOpen:!1,isLoading:!1,shouldRenderContainer:!1,width:void 0,height:void 0},T=Q(null);function X({children:G,clientOptions:U}){let p=M(U),A=y(null),P=y(0),[R,v]=z(()=>({...p.getFlowState()})),b=_((E)=>{if(A.current=E,P.current===0)return;p.setDefaultContainerPolicy({kind:"hostContainer",host:E,sharing:"perFlowRun"})},[p]),F=_(()=>{if(P.current+=1,P.current===1)p.setDefaultContainerPolicy({kind:"hostContainer",host:A.current,sharing:"perFlowRun"});return()=>{if(P.current=Math.max(0,P.current-1),P.current===0)p.setDefaultContainerPolicy({kind:"floating"})}},[p]);O(()=>p.subscribeFlowState((E)=>{v({isOpen:E.isOpen,isLoading:E.isLoading,width:E.width,height:E.height})},{emitInitial:!0}),[p]);let K=h(()=>{if(!R.isOpen&&!R.isLoading)return W;return{isOpen:R.isOpen,isLoading:R.isLoading,shouldRenderContainer:!0,width:R.width,height:R.height}},[R]),N=h(()=>({client:p,apiKey:U.apiKey,setDefaultFlowContainer:b,registerDefaultFlowContainerConsumer:F,defaultFlowContainerState:K}),[p,U.apiKey,K,F,b]);return r(T.Provider,{value:N,children:G})}var B=(G)=>{let U=q(T);if(!U)throw Error("useFlow must be used within a GetUserFeedbackProvider");let{client:p}=U,{flowId:A,prefetchOnMount:P=!1}=G.flow,R=h(()=>p.flow(A),[p,A]),v=G.mode==="container",[b,F]=z(()=>R.getFlowState()),K=_(()=>{return R.open(v?{containerRequirement:"hostOnly"}:void 0)},[R,v]),N=_(()=>R.close(),[R]),E=_((I)=>I?K():N(),[N,K]),J=_((I)=>{if(!v)return;R.setContainer(I)},[R,v]),L=v&&(b.isLoading||b.isOpen);return O(()=>R.subscribeFlowState((I)=>F({isOpen:I.isOpen,isLoading:I.isLoading,width:I.width,height:I.height}),{emitInitial:!1}),[R]),O(()=>{if(!P)return;R.prefetch()},[R,P]),{isOpen:b.isOpen,isLoading:b.isLoading,width:b.width,height:b.height,shouldRenderContainer:L,setOpen:E,open:K,close:N,prerender:()=>R.prerender(),containerRef:J}};function Y(G){let U=B({flow:G,mode:"default"});return{isOpen:U.isOpen,isLoading:U.isLoading,width:U.width,height:U.height,open:U.open,close:U.close,prerender:U.prerender}}function Z(G){let U=B({flow:G,mode:"container"});return{isOpen:U.isOpen,isLoading:U.isLoading,width:U.width,height:U.height,shouldRenderContainer:U.shouldRenderContainer,setOpen:U.setOpen,prerender:U.prerender,containerRef:U.containerRef}}function $(){let G=q(T);if(!G)throw Error("useDefaultFlowContainer must be used within a GetUserFeedbackProvider");let{client:U,defaultFlowContainerState:p,registerDefaultFlowContainerConsumer:A,setDefaultFlowContainer:P}=G;O(()=>A(),[A]);let R=_((F)=>{P(F)},[P]),v=_(()=>U.close(),[U]),b=_((F)=>{if(F)return Promise.resolve();return v()},[v]);return{isOpen:p.isOpen,isLoading:p.isLoading,shouldRenderContainer:p.shouldRenderContainer,width:p.width,height:p.height,setOpen:b,containerRef:R}}function j(){let G=q(T);if(!G)throw Error("useGetUserFeedback must be used within a GetUserFeedbackProvider");return G.client}var H="0.1.1".trim(),D=H.length>0?H:"0.0.0-local";export{j as useGetUserFeedback,Z as useFlowContainer,Y as useFlow,$ as useDefaultFlowContainer,D as REACT_SDK_VERSION,X as GetUserFeedbackProvider};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=761C78F464AD69F064756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"declare const __GX_REACT_SDK_VERSION__: string | undefined;\n\nconst reactSdkVersion =\n\ttypeof __GX_REACT_SDK_VERSION__ === \"string\"\n\t\t? __GX_REACT_SDK_VERSION__.trim()\n\t\t: \"\";\n\n// Build scripts inject __GX_REACT_SDK_VERSION__ for published artifacts.\n// Source-linked workspace usage may not inject defines, so keep a safe fallback.\nexport const REACT_SDK_VERSION =\n\treactSdkVersion.length > 0 ? reactSdkVersion : \"0.0.0-local\";\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";AAEA,uBAGC,6BAID,wBACC,iBACA,gBACA,eACA,aACA,YACA,cACA,sDA2FD,IAAM,EAA0D,CAC/D,OAAQ,GACR,UAAW,GACX,sBAAuB,GACvB,MAAO,OACP,OAAQ,MACT,EAUM,EACL,EAAkD,IAAI,EAoDhD,SAAS,CAAuB,EACtC,WACA,iBAC8C,CAC9C,IAAM,EAAS,EAAa,CAAa,EACnC,EAA0B,EAA2B,IAAI,EACzD,EAAuC,EAAO,CAAC,GAC9C,EAAmB,GACzB,EAAkC,KAAO,IACrC,EAAO,aAAa,CACxB,EAAE,EAEG,EAA0B,EAC/B,CAAC,IAAgC,CAEhC,GADA,EAAwB,QAAU,EAC9B,EAAqC,UAAY,EACpD,OAED,EAAO,0BAA0B,CAChC,KAAM,gBACN,KAAM,EACN,QAAS,YACV,CAAC,GAEF,CAAC,CAAM,CACR,EAEM,EAAuC,EAAY,IAAM,CAE9D,GADA,EAAqC,SAAW,EAC5C,EAAqC,UAAY,EACpD,EAAO,0BAA0B,CAChC,KAAM,gBACN,KAAM,EAAwB,QAC9B,QAAS,YACV,CAAC,EAEF,MAAO,IAAM,CAKZ,GAJA,EAAqC,QAAU,KAAK,IACnD,EACA,EAAqC,QAAU,CAChD,EACI,EAAqC,UAAY,EACpD,EAAO,0BAA0B,CAAE,KAAM,UAAW,CAAC,IAGrD,CAAC,CAAM,CAAC,EAEX,EACC,IACC,EAAO,mBACN,CAAC,IAAU,CACV,EAAqB,CACpB,OAAQ,EAAM,OACd,UAAW,EAAM,UACjB,MAAO,EAAM,MACb,OAAQ,EA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,EACf,CAAC,IAAiC,CACjC,GAAI,EACH,OAAO,QAAQ,QAAQ,EAExB,OAAO,EAAM,GAEd,CAAC,CAAK,CACP,EAEA,MAAO,CACN,OAAQ,EAA0B,OAClC,UAAW,EAA0B,UACrC,sBAAuB,EAA0B,sBACjD,MAAO,EAA0B,MACjC,OAAQ,EAA0B,OAClC,UACA,cACD,EAuBM,SAAS,CAAkB,EAAW,CAC5C,IAAM,EAAM,EAAW,CAAsB,EAC7C,GAAI,CAAC,EACJ,MAAU,MACT,kEACD,EAED,OAAO,EAAI,OChiBZ,IAAM,EAEF,QAAyB,KAAK,EAKrB,EACZ,EAAgB,OAAS,EAAI,EAAkB",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "761C78F464AD69F064756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "getuserfeedback React SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"prepack": "node scripts/prepack.cjs",
|
|
29
29
|
"postpack": "node scripts/postpack.cjs",
|
|
30
|
+
"pack:verify": "node scripts/verify-pack.cjs",
|
|
31
|
+
"publish:dry-run": "node scripts/publish.cjs --dry-run",
|
|
32
|
+
"publish:npm": "node scripts/publish.cjs",
|
|
30
33
|
"build": "bun x rimraf dist tsconfig.tsbuildinfo && bun run scripts/build.ts && bun x rollup -c rollup.dts.config.mjs",
|
|
31
34
|
"typecheck": "tsc -b tsconfig.json",
|
|
32
35
|
"test": "bun test"
|