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