@quiltt/react 2.1.0 → 2.1.2

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +482 -0
  2. package/README.md +110 -75
  3. package/dist/{QuilttSettingsProvider-6904aa95.d.ts → QuilttSettingsProvider-d1d44353.d.ts} +0 -1
  4. package/dist/components/index.cjs +1 -1
  5. package/dist/components/index.cjs.map +1 -1
  6. package/dist/components/index.js +1 -1
  7. package/dist/components/index.js.map +1 -1
  8. package/dist/hooks/index.cjs +1 -1
  9. package/dist/hooks/index.cjs.map +1 -1
  10. package/dist/hooks/index.d.ts +1 -1
  11. package/dist/hooks/index.js +1 -1
  12. package/dist/hooks/index.js.map +1 -1
  13. package/dist/hooks/session/index.d.ts +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/providers/index.cjs +1 -1
  20. package/dist/providers/index.cjs.map +1 -1
  21. package/dist/providers/index.d.ts +1 -1
  22. package/dist/providers/index.js +1 -1
  23. package/dist/providers/index.js.map +1 -1
  24. package/dist/{useRevokeSession-d988b7ad.d.ts → useRevokeSession-37aa05cb.d.ts} +1 -1
  25. package/package.json +13 -3
  26. package/src/components/QuilttButton.tsx +24 -0
  27. package/src/components/QuilttContainer.tsx +30 -0
  28. package/src/components/index.ts +2 -0
  29. package/src/hooks/helpers/index.ts +2 -0
  30. package/src/hooks/helpers/useEventListener.ts +84 -0
  31. package/src/hooks/helpers/useIsomorphicLayoutEffect.ts +11 -0
  32. package/src/hooks/index.ts +8 -0
  33. package/src/hooks/session/index.ts +4 -0
  34. package/src/hooks/session/useAuthenticateSession.ts +54 -0
  35. package/src/hooks/session/useIdentifySession.ts +55 -0
  36. package/src/hooks/session/useImportSession.ts +43 -0
  37. package/src/hooks/session/useRevokeSession.ts +27 -0
  38. package/src/hooks/useQuilttClient.ts +5 -0
  39. package/src/hooks/useQuilttConnector.ts +39 -0
  40. package/src/hooks/useQuilttSession.ts +45 -0
  41. package/src/hooks/useQuilttSettings.ts +17 -0
  42. package/src/hooks/useSession.ts +69 -0
  43. package/src/hooks/useStorage.ts +73 -0
  44. package/src/index.ts +4 -0
  45. package/src/providers/QuilttAuthProvider.tsx +43 -0
  46. package/src/providers/QuilttProvider.tsx +19 -0
  47. package/src/providers/QuilttSettingsProvider.tsx +20 -0
  48. package/src/providers/index.ts +3 -0
  49. package/src/types.ts +9 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,482 @@
1
+ # @quiltt/react
2
+
3
+ ## 2.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 541c809: `@quiltt/react`: Add support for using a custom storage key in the `useSession` hook
8
+ - Updated dependencies [541c809]
9
+ - @quiltt/core@2.1.2
10
+
11
+ ## 2.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 43131d5: - Add code examples to README
16
+ - Auto-create Github Releases
17
+ - Misc cleanups
18
+ - Updated dependencies [43131d5]
19
+ - @quiltt/core@2.1.1
20
+
21
+ ## 2.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 7debd45: Add support for custom components 'as' props
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [7debd45]
30
+ - @quiltt/core@2.1.0
31
+
32
+ ## 2.0.0
33
+
34
+ ### Major Changes
35
+
36
+ - bc6fd8c: Create new React Connector SDK helper components supported by refactored hook
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [bc6fd8c]
41
+ - @quiltt/core@2.0.0
42
+
43
+ ## 1.3.0
44
+
45
+ ### Minor Changes
46
+
47
+ - 6936687: - Fix transpilation issues caused by importing React components
48
+ - Add CI via Github Action
49
+ - Add test Next.js app
50
+ - Misc cleanups
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [6936687]
55
+ - @quiltt/core@1.3.0
56
+
57
+ ## 1.2.8
58
+
59
+ ### Patch Changes
60
+
61
+ - fa07b6a: Add READMEs
62
+ - Updated dependencies [fa07b6a]
63
+ - @quiltt/core@1.2.8
64
+
65
+ ## 1.2.7
66
+
67
+ ### Patch Changes
68
+
69
+ - 0321f3e: Filter packages to publish
70
+ - Updated dependencies [0321f3e]
71
+ - @quiltt/core@1.2.7
72
+
73
+ ## 1.2.6
74
+
75
+ ### Patch Changes
76
+
77
+ - 1594b4a: Pass NPM_TOKEN for publishing
78
+ - Updated dependencies [1594b4a]
79
+ - @quiltt/core@1.2.6
80
+
81
+ ## 1.2.5
82
+
83
+ ### Patch Changes
84
+
85
+ - ba18907: Publish to npm registry
86
+ - Updated dependencies [ba18907]
87
+ - @quiltt/core@1.2.5
88
+
89
+ ## 1.2.4
90
+
91
+ ### Patch Changes
92
+
93
+ - a05ccfc: Revert types/react and tsup
94
+ - Updated dependencies [a05ccfc]
95
+ - @quiltt/core@1.2.4
96
+
97
+ ## 1.2.3
98
+
99
+ ### Patch Changes
100
+
101
+ - 71ba4d9: Add react and react-dom as devDependency
102
+ - Updated dependencies [71ba4d9]
103
+ - @quiltt/core@1.2.3
104
+
105
+ ## 1.2.2
106
+
107
+ ### Patch Changes
108
+
109
+ - 89fca3b: Add useQuilttConnector hook
110
+ - Updated dependencies [89fca3b]
111
+ - @quiltt/core@1.2.2
112
+
113
+ ## 1.2.1
114
+
115
+ ### Patch Changes
116
+
117
+ - 01e1247: Update packages
118
+ - Updated dependencies [01e1247]
119
+ - @quiltt/core@1.2.1
120
+
121
+ ## 1.2.0
122
+
123
+ ### Minor Changes
124
+
125
+ - 215662a: Update deps
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [215662a]
130
+ - @quiltt/core@1.2.0
131
+
132
+ ## 1.1.5
133
+
134
+ ### Patch Changes
135
+
136
+ - 4e237ce: Expose useEventListener
137
+ - Updated dependencies [4e237ce]
138
+ - @quiltt/core@1.1.5
139
+
140
+ ## 1.1.4
141
+
142
+ ### Patch Changes
143
+
144
+ - c67e98d: Revert attempt to force reset through renders
145
+ - Updated dependencies [c67e98d]
146
+ - @quiltt/core@1.1.4
147
+
148
+ ## 1.1.3
149
+
150
+ ### Patch Changes
151
+
152
+ - d8fdcaa: Add option to set QuilttProvider to reset on session change
153
+ - Updated dependencies [d8fdcaa]
154
+ - @quiltt/core@1.1.3
155
+
156
+ ## 1.1.2
157
+
158
+ ### Patch Changes
159
+
160
+ - dcf2c5c: Improve session yanking after getting a 401
161
+ - Updated dependencies [dcf2c5c]
162
+ - @quiltt/core@1.1.2
163
+
164
+ ## 1.1.1
165
+
166
+ ### Patch Changes
167
+
168
+ - 0a78cd2: Move session revoking to be directly to storage
169
+ - Updated dependencies [0a78cd2]
170
+ - @quiltt/core@1.1.1
171
+
172
+ ## 1.1.0
173
+
174
+ ### Minor Changes
175
+
176
+ - 7a1e387: Attempt to reduce race conditions with session changes by pulling token changing logic directly into the respective apollo links
177
+
178
+ ### Patch Changes
179
+
180
+ - Updated dependencies [7a1e387]
181
+ - @quiltt/core@1.1.0
182
+
183
+ ## 1.0.37
184
+
185
+ ### Patch Changes
186
+
187
+ - 9169fde: Reduce complexity of useSession by replacing useState with useMemo
188
+ - Updated dependencies [9169fde]
189
+ - @quiltt/core@1.0.37
190
+
191
+ ## 1.0.36
192
+
193
+ ### Patch Changes
194
+
195
+ - 9f34730: Remove redundant initializeState logic from useSession
196
+ - Updated dependencies [9f34730]
197
+ - @quiltt/core@1.0.36
198
+
199
+ ## 1.0.35
200
+
201
+ ### Patch Changes
202
+
203
+ - 14309ed: Update deps
204
+ - 6b8d7a4: Reduce the risk of race conditions double subscribing to localstorage changes
205
+ - Updated dependencies [14309ed]
206
+ - Updated dependencies [6b8d7a4]
207
+ - @quiltt/core@1.0.35
208
+
209
+ ## 1.0.34
210
+
211
+ ### Patch Changes
212
+
213
+ - 54a6574: Save localstorage before memorystorage to give localstorage more time to flush
214
+ - Updated dependencies [54a6574]
215
+ - @quiltt/core@1.0.34
216
+
217
+ ## 1.0.33
218
+
219
+ ### Patch Changes
220
+
221
+ - f0c60dd: Update useSession hook to memoize initialSession
222
+ - Updated dependencies [f0c60dd]
223
+ - @quiltt/core@1.0.33
224
+
225
+ ## 1.0.32
226
+
227
+ ### Patch Changes
228
+
229
+ - 97aa921: Revert adding loading state to graphql as it causes unexpected resets to subcomponents
230
+ - Updated dependencies [97aa921]
231
+ - @quiltt/core@1.0.32
232
+
233
+ ## 1.0.31
234
+
235
+ ### Patch Changes
236
+
237
+ - 18cb0a2: Add loading state to graphql provider to reduce unauthd requests
238
+ - Updated dependencies [18cb0a2]
239
+ - @quiltt/core@1.0.31
240
+
241
+ ## 1.0.30
242
+
243
+ ### Patch Changes
244
+
245
+ - 5d6027b: Fix issue with useSession setSession not being wrapped in useCallback, causing invalidations every render
246
+ - Updated dependencies [5d6027b]
247
+ - @quiltt/core@1.0.30
248
+
249
+ ## 1.0.29
250
+
251
+ ### Patch Changes
252
+
253
+ - 098710f: Fix useEffect and useState looping hell
254
+ - Updated dependencies [098710f]
255
+ - @quiltt/core@1.0.29
256
+
257
+ ## 1.0.28
258
+
259
+ ### Patch Changes
260
+
261
+ - 3877274: Fix issues with graphql client not being updated with new sessions
262
+ - Updated dependencies [3877274]
263
+ - @quiltt/core@1.0.28
264
+
265
+ ## 1.0.27
266
+
267
+ ### Patch Changes
268
+
269
+ - 1b073ea: - Fix potential bugs and memory leaks in `Storage`
270
+ - Add helper hooks to compose other hooks
271
+ - Update useStorage hook
272
+ - Updated dependencies [1b073ea]
273
+ - @quiltt/core@1.0.27
274
+
275
+ ## 1.0.26
276
+
277
+ ### Patch Changes
278
+
279
+ - 4a03bc8: Update types & fix linting
280
+ - Updated dependencies [4a03bc8]
281
+ - @quiltt/core@1.0.26
282
+
283
+ ## 1.0.25
284
+
285
+ ### Patch Changes
286
+
287
+ - 2ffea2f: Fix issue with this being undefined for ActionCableLink
288
+ - Updated dependencies [2ffea2f]
289
+ - @quiltt/core@1.0.25
290
+
291
+ ## 1.0.24
292
+
293
+ ### Patch Changes
294
+
295
+ - d9d234b: Switch to using globalThis for actioncable self
296
+ - Updated dependencies [d9d234b]
297
+ - @quiltt/core@1.0.24
298
+
299
+ ## 1.0.23
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [9fb69ae]
304
+ - @quiltt/core@1.0.23
305
+
306
+ ## 1.0.22
307
+
308
+ ### Patch Changes
309
+
310
+ - 4a06719: Revert back to upstream packages
311
+ - Updated dependencies [4a06719]
312
+ - @quiltt/core@1.0.22
313
+
314
+ ## 1.0.21
315
+
316
+ ### Patch Changes
317
+
318
+ - 49f108a: Fix graphql subscriptions from not working due to channel name mismatch
319
+ - Updated dependencies [49f108a]
320
+ - @quiltt/core@1.0.21
321
+
322
+ ## 1.0.20
323
+
324
+ ### Patch Changes
325
+
326
+ - 7e0d314: Set cable to be a singleton to reduce the chance of having multiple trying to run
327
+ - Updated dependencies [7e0d314]
328
+ - @quiltt/core@1.0.20
329
+
330
+ ## 1.0.19
331
+
332
+ ### Patch Changes
333
+
334
+ - 866407c: Improve websocket subscriptions lifecycle handling
335
+ - Updated dependencies [866407c]
336
+ - @quiltt/core@1.0.19
337
+
338
+ ## 1.0.18
339
+
340
+ ### Patch Changes
341
+
342
+ - bf25cc4: Prevent websockets from attempting to connect without a token
343
+ - Updated dependencies [bf25cc4]
344
+ - @quiltt/core@1.0.18
345
+
346
+ ## 1.0.17
347
+
348
+ ### Patch Changes
349
+
350
+ - 190df4d: Fix issue with ActionCableLink calling the wrong #perform
351
+ - Updated dependencies [190df4d]
352
+ - @quiltt/core@1.0.17
353
+
354
+ ## 1.0.16
355
+
356
+ ### Patch Changes
357
+
358
+ - c284002: Add some types to actioncable and connect logging to config
359
+ - Updated dependencies [c284002]
360
+ - @quiltt/core@1.0.16
361
+
362
+ ## 1.0.15
363
+
364
+ ### Patch Changes
365
+
366
+ - 2f6f903: Fix issue with importing sessions and cache resetting causing request cancelations during race conditions
367
+ - Updated dependencies [2f6f903]
368
+ - @quiltt/core@1.0.15
369
+
370
+ ## 1.0.14
371
+
372
+ ### Patch Changes
373
+
374
+ - a97e9c8: Pin Dependencies & Update Linting
375
+ - 6d35bae: Remove unused global declares
376
+ - Updated dependencies [a97e9c8]
377
+ - Updated dependencies [6d35bae]
378
+ - @quiltt/core@1.0.14
379
+
380
+ ## 1.0.13
381
+
382
+ ### Patch Changes
383
+
384
+ - 24d28f3: Add missing apollo esms
385
+ - Updated dependencies [24d28f3]
386
+ - @quiltt/core@1.0.13
387
+
388
+ ## 1.0.12
389
+
390
+ ### Patch Changes
391
+
392
+ - 3eb86ce: Force load all of apollo esms
393
+ - Updated dependencies [3eb86ce]
394
+ - @quiltt/core@1.0.12
395
+
396
+ ## 1.0.11
397
+
398
+ ### Patch Changes
399
+
400
+ - 2932555: Load ActionLinkCable Apollo esms
401
+ - Updated dependencies [2932555]
402
+ - @quiltt/core@1.0.11
403
+
404
+ ## 1.0.10
405
+
406
+ ### Patch Changes
407
+
408
+ - f014a84: Set apollo links to load esm from .js
409
+ - Updated dependencies [f014a84]
410
+ - @quiltt/core@1.0.10
411
+
412
+ ## 1.0.9
413
+
414
+ ### Patch Changes
415
+
416
+ - be8e696: Attempt to improve esm loading of apollo links
417
+ - Updated dependencies [be8e696]
418
+ - @quiltt/core@1.0.9
419
+
420
+ ## 1.0.8
421
+
422
+ ### Patch Changes
423
+
424
+ - 250f817: Refactor AuthLink to improve compiling
425
+ - Updated dependencies [250f817]
426
+ - @quiltt/core@1.0.8
427
+
428
+ ## 1.0.7
429
+
430
+ ### Patch Changes
431
+
432
+ - 9e78757: Fix issues with QuilttClient/Link not working
433
+ - Updated dependencies [9e78757]
434
+ - @quiltt/core@1.0.7
435
+
436
+ ## 1.0.6
437
+
438
+ ### Patch Changes
439
+
440
+ - 882b229: Set default forwardlink within quiltt link
441
+ - Updated dependencies [882b229]
442
+ - @quiltt/core@1.0.6
443
+
444
+ ## 1.0.5
445
+
446
+ ### Patch Changes
447
+
448
+ - 795bf20: Improve how graphql client is loaded
449
+ - Updated dependencies [795bf20]
450
+ - @quiltt/core@1.0.5
451
+
452
+ ## 1.0.4
453
+
454
+ ### Patch Changes
455
+
456
+ - 9bc26d1: Import action cable code to help with building
457
+ - Updated dependencies [9bc26d1]
458
+ - @quiltt/core@1.0.4
459
+
460
+ ## 1.0.3
461
+
462
+ ### Patch Changes
463
+
464
+ - 19a5f41: Allow client id to be optional for token based apps
465
+ - Updated dependencies [19a5f41]
466
+ - @quiltt/core@1.0.3
467
+
468
+ ## 1.0.2
469
+
470
+ ### Patch Changes
471
+
472
+ - 3f06262: Update build config
473
+ - Updated dependencies [3f06262]
474
+ - @quiltt/core@1.0.2
475
+
476
+ ## 1.0.1
477
+
478
+ ### Patch Changes
479
+
480
+ - 86d6689: Fix issue with react not reexporting core
481
+ - Updated dependencies [86d6689]
482
+ - @quiltt/core@1.0.1