@graphcommerce/magento-compare 9.0.0-canary.99 → 9.0.0

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/CHANGELOG.md CHANGED
@@ -1,82 +1,52 @@
1
1
  # @graphcommerce/magento-compare
2
2
 
3
- ## 9.0.0-canary.99
3
+ ## 9.0.0
4
4
 
5
- ## 9.0.0-canary.98
6
-
7
- ## 9.0.0-canary.97
8
-
9
- ## 9.0.0-canary.96
10
-
11
- ## 9.0.0-canary.95
12
-
13
- ## 9.0.0-canary.94
14
-
15
- ## 9.0.0-canary.93
16
-
17
- ## 9.0.0-canary.92
18
-
19
- ## 9.0.0-canary.91
20
-
21
- ## 9.0.0-canary.90
22
-
23
- ## 9.0.0-canary.89
24
-
25
- ## 9.0.0-canary.88
26
-
27
- ## 9.0.0-canary.87
28
-
29
- ## 9.0.0-canary.86
30
-
31
- ## 9.0.0-canary.85
32
-
33
- ## 9.0.0-canary.84
34
-
35
- ## 9.0.0-canary.83
5
+ ### Patch Changes
36
6
 
37
- ## 9.0.0-canary.82
7
+ - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of `useFormPersist` to the `<FormPersist/>` component to prevent rerenders. ([@FrankHarland](https://github.com/FrankHarland))
38
8
 
39
- ## 9.0.0-canary.81
9
+ - [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
40
10
 
41
- ## 9.0.0-canary.80
11
+ - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving `<FromPersist/>` below the form components. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
42
12
 
43
- ## 9.0.0-canary.79
13
+ - [#2438](https://github.com/graphcommerce-org/graphcommerce/pull/2438) [`cb8d2f0`](https://github.com/graphcommerce-org/graphcommerce/commit/cb8d2f0059d64242260e30ce34655868f204ef4c) - Made all component prop types exported ([@bramvanderholst](https://github.com/bramvanderholst))
44
14
 
45
- ## 9.0.0-canary.78
15
+ ## 9.0.0-canary.118
46
16
 
47
- ## 9.0.0-canary.77
17
+ ## 9.0.0-canary.117
48
18
 
49
- ## 9.0.0-canary.76
19
+ ## 9.0.0-canary.116
50
20
 
51
- ## 9.0.0-canary.75
21
+ ## 9.0.0-canary.115
52
22
 
53
- ## 9.0.0-canary.74
23
+ ## 9.0.0-canary.114
54
24
 
55
- ## 9.0.0-canary.73
25
+ ## 9.0.0-canary.113
56
26
 
57
- ## 9.0.0-canary.72
27
+ ## 9.0.0-canary.112
58
28
 
59
- ## 9.0.0-canary.71
29
+ ## 9.0.0-canary.111
60
30
 
61
- ## 9.0.0-canary.70
31
+ ## 9.0.0-canary.110
62
32
 
63
- ## 9.0.0-canary.69
33
+ ## 9.0.0-canary.109
64
34
 
65
- ## 9.0.0-canary.68
35
+ ## 9.0.0-canary.108
66
36
 
67
- ## 9.0.0-canary.67
37
+ ### Patch Changes
68
38
 
69
- ## 9.0.0-canary.66
39
+ - [#2438](https://github.com/graphcommerce-org/graphcommerce/pull/2438) [`cb8d2f0`](https://github.com/graphcommerce-org/graphcommerce/commit/cb8d2f0059d64242260e30ce34655868f204ef4c) - Made all component prop types exported ([@bramvanderholst](https://github.com/bramvanderholst))
70
40
 
71
- ## 9.0.0-canary.65
41
+ ## 9.0.0-canary.107
72
42
 
73
- ## 9.0.0-canary.64
43
+ ## 9.0.0-canary.106
74
44
 
75
- ## 9.0.0-canary.63
45
+ ## 9.0.0-canary.105
76
46
 
77
- ## 9.0.0-canary.62
47
+ ## 9.0.0-canary.104
78
48
 
79
- ## 9.0.0-canary.61
49
+ ## 9.0.0-canary.103
80
50
 
81
51
  ## 9.0.0-canary.60
82
52
 
@@ -84,426 +54,24 @@
84
54
 
85
55
  - [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
86
56
 
87
- ## 9.0.0-canary.59
88
-
89
- ## 9.0.0-canary.58
90
-
91
- ## 9.0.0-canary.57
92
-
93
- ## 9.0.0-canary.56
94
-
95
- ## 9.0.0-canary.55
96
-
97
- ## 9.0.0-canary.54
98
-
99
- ## 8.1.0-canary.53
100
-
101
- ## 8.1.0-canary.52
102
-
103
- ## 8.1.0-canary.51
104
-
105
- ## 8.1.0-canary.50
106
-
107
- ## 8.1.0-canary.49
108
-
109
- ## 8.1.0-canary.48
110
-
111
- ## 8.1.0-canary.47
112
-
113
- ## 8.1.0-canary.46
114
-
115
- ## 8.1.0-canary.45
116
-
117
- ## 8.1.0-canary.44
118
-
119
- ## 8.1.0-canary.43
120
-
121
- ## 8.1.0-canary.42
122
-
123
- ## 8.1.0-canary.41
124
-
125
- ## 8.1.0-canary.40
126
-
127
- ## 8.1.0-canary.39
128
-
129
57
  ## 8.1.0-canary.38
130
58
 
131
59
  ### Patch Changes
132
60
 
133
61
  - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving <FromPersist/> below the form components ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
134
62
 
135
- ## 8.1.0-canary.37
136
-
137
- ## 8.1.0-canary.36
138
-
139
- ## 8.1.0-canary.35
140
-
141
- ## 8.1.0-canary.34
142
-
143
- ## 8.1.0-canary.33
144
-
145
- ## 8.1.0-canary.32
146
-
147
- ## 8.1.0-canary.31
148
-
149
- ## 8.1.0-canary.30
150
-
151
- ## 8.1.0-canary.29
152
-
153
- ## 8.1.0-canary.28
154
-
155
- ## 8.1.0-canary.27
156
-
157
- ## 8.1.0-canary.26
158
-
159
- ## 8.1.0-canary.25
160
-
161
- ## 8.1.0-canary.24
162
-
163
- ## 8.1.0-canary.23
164
-
165
- ## 8.1.0-canary.22
166
-
167
- ## 8.1.0-canary.21
168
-
169
- ## 8.1.0-canary.20
170
-
171
- ## 8.1.0-canary.19
172
-
173
- ## 8.1.0-canary.18
174
-
175
- ## 8.1.0-canary.17
176
-
177
- ## 8.1.0-canary.16
178
-
179
- ## 8.1.0-canary.15
180
-
181
- ## 8.1.0-canary.14
182
-
183
- ## 8.1.0-canary.13
184
-
185
- ## 8.1.0-canary.12
186
-
187
- ## 8.1.0-canary.11
188
-
189
- ## 8.1.0-canary.10
190
-
191
- ## 8.1.0-canary.9
192
-
193
- ## 8.1.0-canary.8
194
-
195
- ## 8.1.0-canary.7
196
-
197
- ## 8.1.0-canary.6
198
-
199
- ## 8.1.0-canary.5
200
-
201
- ## 8.0.6-canary.4
202
-
203
- ## 8.0.6-canary.3
204
-
205
63
  ## 8.0.6-canary.2
206
64
 
207
65
  ### Patch Changes
208
66
 
209
67
  - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders. ([@FrankHarland](https://github.com/FrankHarland))
210
68
 
211
- ## 8.0.6-canary.1
212
-
213
- ## 8.0.6-canary.0
214
-
215
- ## 8.0.5
216
-
217
- ## 8.0.5-canary.10
218
-
219
- ## 8.0.5-canary.9
220
-
221
- ## 8.0.5-canary.8
222
-
223
- ## 8.0.5-canary.7
224
-
225
- ## 8.0.5-canary.6
226
-
227
- ## 8.0.5-canary.5
228
-
229
- ## 8.0.5-canary.4
230
-
231
- ## 8.0.5-canary.3
232
-
233
- ## 8.0.5-canary.2
234
-
235
- ## 8.0.5-canary.1
236
-
237
- ## 8.0.5-canary.0
238
-
239
- ## 8.0.4
240
-
241
- ## 8.0.4-canary.1
242
-
243
- ## 8.0.4-canary.0
244
-
245
- ## 8.0.3
246
-
247
- ## 8.0.3-canary.6
248
-
249
- ## 8.0.3-canary.5
250
-
251
- ## 8.0.3-canary.4
252
-
253
- ## 8.0.3-canary.3
254
-
255
- ## 8.0.3-canary.2
256
-
257
- ## 8.0.3-canary.1
258
-
259
- ## 8.0.3-canary.0
260
-
261
- ## 8.0.2
262
-
263
- ## 8.0.2-canary.3
264
-
265
- ## 8.0.2-canary.2
266
-
267
- ## 8.0.2-canary.1
268
-
269
- ## 8.0.2-canary.0
270
-
271
- ## 8.0.1
272
-
273
- ## 8.0.1-canary.4
274
-
275
- ## 8.0.1-canary.3
276
-
277
- ## 8.0.1-canary.2
278
-
279
- ## 8.0.1-canary.1
280
-
281
- ## 8.0.1-canary.0
282
-
283
69
  ## 8.0.0
284
70
 
285
71
  ### Patch Changes
286
72
 
287
73
  - [#2132](https://github.com/graphcommerce-org/graphcommerce/pull/2132) [`993f655`](https://github.com/graphcommerce-org/graphcommerce/commit/993f6559226f0ce2b63f372ccfc1409805b06a8d) - Compare button didn't have a proper hover state on the product page. ([@action-simon](https://github.com/action-simon))
288
74
 
289
- ## 8.0.0-canary.100
290
-
291
- ## 8.0.0-canary.99
292
-
293
- ## 8.0.0-canary.98
294
-
295
- ## 8.0.0-canary.97
296
-
297
- ## 8.0.0-canary.96
298
-
299
- ## 8.0.0-canary.95
300
-
301
- ## 8.0.0-canary.94
302
-
303
- ## 8.0.0-canary.93
304
-
305
- ## 8.0.0-canary.92
306
-
307
- ## 8.0.0-canary.91
308
-
309
- ## 8.0.0-canary.90
310
-
311
- ## 8.0.0-canary.89
312
-
313
- ## 8.0.0-canary.88
314
-
315
- ## 8.0.0-canary.87
316
-
317
- ## 8.0.0-canary.86
318
-
319
- ## 8.0.0-canary.85
320
-
321
- ## 8.0.0-canary.84
322
-
323
- ## 8.0.0-canary.83
324
-
325
- ## 8.0.0-canary.82
326
-
327
- ## 8.0.0-canary.81
328
-
329
- ## 8.0.0-canary.80
330
-
331
- ## 8.0.0-canary.79
332
-
333
- ## 8.0.0-canary.78
334
-
335
- ## 8.0.0-canary.77
336
-
337
- ## 8.0.0-canary.76
338
-
339
- ## 8.0.0-canary.75
340
-
341
- ## 8.0.0-canary.74
342
-
343
- ## 8.0.0-canary.73
344
-
345
- ### Patch Changes
346
-
347
- - [#2132](https://github.com/graphcommerce-org/graphcommerce/pull/2132) [`993f655`](https://github.com/graphcommerce-org/graphcommerce/commit/993f6559226f0ce2b63f372ccfc1409805b06a8d) - Fix compare button hover state on product page ([@action-simon](https://github.com/action-simon))
348
-
349
- ## 8.0.0-canary.72
350
-
351
- ## 8.0.0-canary.71
352
-
353
- ## 8.0.0-canary.70
354
-
355
- ## 8.0.0-canary.69
356
-
357
- ## 7.1.0-canary.68
358
-
359
- ## 7.1.0-canary.67
360
-
361
- ## 7.1.0-canary.66
362
-
363
- ## 7.1.0-canary.65
364
-
365
- ## 7.1.0-canary.64
366
-
367
- ## 7.1.0-canary.63
368
-
369
- ## 7.1.0-canary.62
370
-
371
- ## 7.1.0-canary.61
372
-
373
- ## 7.1.0-canary.60
374
-
375
- ## 7.1.0-canary.59
376
-
377
- ## 7.1.0-canary.58
378
-
379
- ## 7.1.0-canary.57
380
-
381
- ## 7.1.0-canary.56
382
-
383
- ## 7.1.0-canary.55
384
-
385
- ## 7.1.0-canary.54
386
-
387
- ## 7.1.0-canary.53
388
-
389
- ## 7.1.0-canary.52
390
-
391
- ## 7.1.0-canary.51
392
-
393
- ## 7.1.0-canary.50
394
-
395
- ## 7.1.0-canary.49
396
-
397
- ## 7.1.0-canary.48
398
-
399
- ## 7.1.0-canary.47
400
-
401
- ## 7.1.0-canary.46
402
-
403
- ## 7.1.0-canary.45
404
-
405
- ## 7.1.0-canary.38
406
-
407
- ## 7.1.0-canary.37
408
-
409
- ## 7.1.0-canary.36
410
-
411
- ## 7.1.0-canary.35
412
-
413
- ## 7.1.0-canary.34
414
-
415
- ## 7.1.0-canary.33
416
-
417
- ## 7.1.0-canary.32
418
-
419
- ## 7.1.0-canary.31
420
-
421
- ## 7.1.0-canary.30
422
-
423
- ## 7.1.0-canary.29
424
-
425
- ## 7.1.0-canary.28
426
-
427
- ## 7.1.0-canary.27
428
-
429
- ## 7.1.0-canary.26
430
-
431
- ## 7.1.0-canary.25
432
-
433
- ## 7.1.0-canary.24
434
-
435
- ## 7.1.0-canary.23
436
-
437
- ## 7.1.0-canary.22
438
-
439
- ## 7.1.0-canary.21
440
-
441
- ## 7.1.0-canary.20
442
-
443
- ## 7.1.0-canary.19
444
-
445
- ## 7.1.0-canary.18
446
-
447
- ## 7.1.0-canary.17
448
-
449
- ## 7.1.0-canary.16
450
-
451
- ## 7.1.0-canary.15
452
-
453
- ## 7.1.0-canary.14
454
-
455
- ## 7.1.0-canary.13
456
-
457
- ## 7.1.0-canary.12
458
-
459
- ## 7.1.0-canary.11
460
-
461
- ## 7.1.0-canary.10
462
-
463
- ## 7.1.0-canary.9
464
-
465
- ## 7.1.0-canary.8
466
-
467
- ## 7.0.2-canary.7
468
-
469
- ## 7.0.2-canary.6
470
-
471
- ## 7.0.2-canary.5
472
-
473
- ## 7.0.1
474
-
475
- ## 7.0.1-canary.15
476
-
477
- ## 7.0.1-canary.14
478
-
479
- ## 7.0.1-canary.13
480
-
481
- ## 7.0.1-canary.12
482
-
483
- ## 7.0.1-canary.11
484
-
485
- ## 7.0.1-canary.10
486
-
487
- ## 7.0.1-canary.9
488
-
489
- ## 7.0.1-canary.8
490
-
491
- ## 7.0.1-canary.7
492
-
493
- ## 7.0.1-canary.6
494
-
495
- ## 7.0.1-canary.5
496
-
497
- ## 7.0.1-canary.4
498
-
499
- ## 7.0.1-canary.3
500
-
501
- ## 7.0.1-canary.2
502
-
503
- ## 7.0.1-canary.1
504
-
505
- ## 7.0.1-canary.0
506
-
507
75
  ## 7.0.0
508
76
 
509
77
  ### Major Changes
@@ -515,195 +83,3 @@
515
83
  ### Patch Changes
516
84
 
517
85
  - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
518
-
519
- ## 6.2.0-canary.98
520
-
521
- ## 6.2.0-canary.97
522
-
523
- ## 6.2.0-canary.96
524
-
525
- ## 6.2.0-canary.95
526
-
527
- ## 6.2.0-canary.94
528
-
529
- ## 6.2.0-canary.93
530
-
531
- ## 6.2.0-canary.92
532
-
533
- ## 6.2.0-canary.91
534
-
535
- ## 6.2.0-canary.90
536
-
537
- ## 6.2.0-canary.89
538
-
539
- ## 6.2.0-canary.88
540
-
541
- ## 6.2.0-canary.87
542
-
543
- ## 6.2.0-canary.86
544
-
545
- ## 6.2.0-canary.85
546
-
547
- ## 6.2.0-canary.84
548
-
549
- ## 6.2.0-canary.83
550
-
551
- ## 6.2.0-canary.82
552
-
553
- ## 6.2.0-canary.81
554
-
555
- ## 6.2.0-canary.80
556
-
557
- ## 6.2.0-canary.79
558
-
559
- ## 6.2.0-canary.78
560
-
561
- ## 6.2.0-canary.77
562
-
563
- ## 6.2.0-canary.76
564
-
565
- ## 6.2.0-canary.75
566
-
567
- ## 6.2.0-canary.74
568
-
569
- ## 6.2.0-canary.73
570
-
571
- ## 6.2.0-canary.72
572
-
573
- ## 6.2.0-canary.71
574
-
575
- ## 6.2.0-canary.70
576
-
577
- ## 6.2.0-canary.69
578
-
579
- ## 6.2.0-canary.68
580
-
581
- ## 6.2.0-canary.67
582
-
583
- ## 6.2.0-canary.66
584
-
585
- ## 6.2.0-canary.65
586
-
587
- ## 6.2.0-canary.64
588
-
589
- ## 6.2.0-canary.63
590
-
591
- ## 6.2.0-canary.62
592
-
593
- ## 6.2.0-canary.61
594
-
595
- ## 6.2.0-canary.60
596
-
597
- ## 6.2.0-canary.59
598
-
599
- ## 6.2.0-canary.58
600
-
601
- ## 6.2.0-canary.57
602
-
603
- ## 6.2.0-canary.56
604
-
605
- ## 6.2.0-canary.55
606
-
607
- ## 6.2.0-canary.54
608
-
609
- ## 6.2.0-canary.53
610
-
611
- ## 6.2.0-canary.52
612
-
613
- ## 6.2.0-canary.51
614
-
615
- ## 6.2.0-canary.50
616
-
617
- ### Minor Changes
618
-
619
- - [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
620
-
621
- ## 6.2.0-canary.49
622
-
623
- ### Patch Changes
624
-
625
- - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
626
-
627
- ## 6.2.0-canary.48
628
-
629
- ## 6.2.0-canary.47
630
-
631
- ## 6.2.0-canary.46
632
-
633
- ## 6.2.0-canary.45
634
-
635
- ## 6.2.0-canary.44
636
-
637
- ## 6.2.0-canary.43
638
-
639
- ## 6.2.0-canary.42
640
-
641
- ## 6.2.0-canary.41
642
-
643
- ## 6.2.0-canary.40
644
-
645
- ## 6.2.0-canary.39
646
-
647
- ## 6.2.0-canary.38
648
-
649
- ## 6.2.0-canary.37
650
-
651
- ## 6.2.0-canary.36
652
-
653
- ## 6.2.0-canary.35
654
-
655
- ## 6.2.0-canary.34
656
-
657
- ## 6.2.0-canary.33
658
-
659
- ## 6.2.0-canary.32
660
-
661
- ## 6.2.0-canary.31
662
-
663
- ## 6.2.0-canary.30
664
-
665
- ## 6.2.0-canary.29
666
-
667
- ## 6.2.0-canary.28
668
-
669
- ## 6.2.0-canary.27
670
-
671
- ## 6.2.0-canary.26
672
-
673
- ## 6.2.0-canary.25
674
-
675
- ## 6.2.0-canary.24
676
-
677
- ## 6.2.0-canary.23
678
-
679
- ## 6.2.0-canary.22
680
-
681
- ## 6.2.0-canary.21
682
-
683
- ## 6.2.0-canary.20
684
-
685
- ## 6.2.0-canary.19
686
-
687
- ## 6.2.0-canary.18
688
-
689
- ## 6.2.0-canary.17
690
-
691
- ## 6.2.0-canary.16
692
-
693
- ## 6.2.0-canary.15
694
-
695
- ## 6.2.0-canary.14
696
-
697
- ## 6.2.0-canary.13
698
-
699
- ## 6.2.0-canary.12
700
-
701
- ## 6.2.0-canary.11
702
-
703
- ## 6.2.0-canary.10
704
-
705
- ### Minor Changes
706
-
707
- - [#1918](https://github.com/graphcommerce-org/graphcommerce/pull/1918) [`7dcf350c6`](https://github.com/graphcommerce-org/graphcommerce/commit/7dcf350c674dfe6dbf192ecfb5af3ee8180eb2f9) - Magento product compare functionality added ([@paales](https://github.com/paales))
708
-
709
- ## 6.2.0-canary.9
@@ -1,13 +1,14 @@
1
1
  import {
2
- extendableComponent,
3
2
  IconSvg,
4
- useFabSize,
3
+ extendableComponent,
5
4
  iconCompare,
5
+ useFabSize,
6
6
  useScrollY,
7
7
  } from '@graphcommerce/next-ui'
8
8
  import { i18n } from '@lingui/core'
9
9
  import { Trans } from '@lingui/react'
10
- import { styled, Box, SxProps, Theme, NoSsr, Badge, Button, ButtonProps } from '@mui/material'
10
+ import type { ButtonProps, SxProps, Theme } from '@mui/material'
11
+ import { Badge, Box, Button, NoSsr, styled } from '@mui/material'
11
12
  import { m, useTransform } from 'framer-motion'
12
13
  import React from 'react'
13
14
  import { useCompareSummary } from '../hooks'
@@ -17,11 +18,11 @@ export type CompareFabProps = {
17
18
  sx?: SxProps<Theme>
18
19
  } & Pick<ButtonProps, 'color' | 'size' | 'variant'>
19
20
 
20
- type CompareFabContentProps = CompareFabProps & { total_quantity: number }
21
+ export type CompareFabContentProps = CompareFabProps & { total_quantity: number }
21
22
 
22
23
  const MotionDiv = styled(m.div)({})
23
24
 
24
- const MotionFab = m(
25
+ const MotionFab = m.create(
25
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
27
  React.forwardRef<any, Omit<ButtonProps, 'style' | 'onDrag'>>((props, ref) => (
27
28
  <Button variant='pill' {...props} ref={ref} />
@@ -1,5 +1,6 @@
1
1
  import { filterNonNullableKeys } from '@graphcommerce/next-ui'
2
- import { Box, SxProps, Theme } from '@mui/material'
2
+ import type { SxProps, Theme } from '@mui/material'
3
+ import { Box } from '@mui/material'
3
4
  import { useCompareList } from '../hooks/useCompareList'
4
5
  import { useCompareVisibleItems } from './CompareListForm'
5
6
  import { CompareListRow } from './CompareListRow'
@@ -1,9 +1,10 @@
1
- import { FormPersist, useForm, UseFormReturn, useWatch } from '@graphcommerce/ecommerce-ui'
1
+ import type { UseFormReturn } from '@graphcommerce/ecommerce-ui'
2
+ import { FormPersist, useForm, useWatch } from '@graphcommerce/ecommerce-ui'
2
3
  import { filterNonNullableKeys, nonNullable } from '@graphcommerce/next-ui'
3
4
  import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react'
4
5
  import { useCompareList } from '../hooks'
5
6
 
6
- type CompareListFormProps = { children?: React.ReactNode }
7
+ export type CompareListFormProps = { children?: React.ReactNode }
7
8
 
8
9
  type FormFields = { selected: number[] }
9
10
 
@@ -48,12 +49,12 @@ export function CompareListForm(props: CompareListFormProps) {
48
49
 
49
50
  // if there are less items in the compare list than in our selectedState
50
51
  if (compareListCount < selectedState.length) {
51
- form.setValue(`selected`, [...Array(compareListCount).keys()])
52
+ form.setValue('selected', [...Array(compareListCount).keys()])
52
53
  }
53
54
 
54
55
  // if there are less items in our selectedState than we have columns
55
56
  if (selectedState.length < gridColumns) {
56
- form.setValue(`selected`, [...Array(gridColumns).keys()])
57
+ form.setValue('selected', [...Array(gridColumns).keys()])
57
58
  }
58
59
  }
59
60
  }, [compareAbleItems?.length, compareListCount, form, gridColumns, selectedState])
@@ -1,6 +1,6 @@
1
1
  import { Box, Container } from '@mui/material'
2
2
 
3
- type CompareListIntroTextProps = {
3
+ export type CompareListIntroTextProps = {
4
4
  children: React.ReactNode
5
5
  }
6
6
 
@@ -1,8 +1,5 @@
1
- import {
2
- AddProductsToCartForm,
3
- ProductItemsGridProps,
4
- ProductListItemsBase,
5
- } from '@graphcommerce/magento-product'
1
+ import type { ProductItemsGridProps } from '@graphcommerce/magento-product'
2
+ import { AddProductsToCartForm, ProductListItemsBase } from '@graphcommerce/magento-product'
6
3
  import { useCompareListStyles } from '../hooks/useCompareListStyles'
7
4
  import { useCompareVisibleItems } from './CompareListForm'
8
5
 
@@ -1,6 +1,6 @@
1
1
  import { SectionContainer } from '@graphcommerce/next-ui'
2
2
  import { Box } from '@mui/material'
3
- import { ComparableItemFragment } from '../graphql'
3
+ import type { ComparableItemFragment } from '../graphql'
4
4
  import { useCompareListStyles } from '../hooks/useCompareListStyles'
5
5
 
6
6
  export type CompareRowProps = {
@@ -1,9 +1,9 @@
1
1
  import { productLink } from '@graphcommerce/magento-product'
2
- import { Button, iconChevronRight, IconSvg, SectionContainer } from '@graphcommerce/next-ui'
2
+ import { Button, IconSvg, SectionContainer, iconChevronRight } from '@graphcommerce/next-ui'
3
3
  import { Trans } from '@lingui/react'
4
4
  import { Box } from '@mui/material'
5
5
  import { useCompareListStyles } from '../hooks/useCompareListStyles'
6
- import { CompareRowProps } from './CompareListRow'
6
+ import type { CompareRowProps } from './CompareListRow'
7
7
 
8
8
  export type CompareListRowMoreInformationProps = Pick<CompareRowProps, 'compareAbleItems'>
9
9
 
@@ -1,7 +1,8 @@
1
1
  import { SelectElement } from '@graphcommerce/ecommerce-ui'
2
2
  import { useMotionValueValue } from '@graphcommerce/framer-utils'
3
3
  import { useScrollY } from '@graphcommerce/next-ui'
4
- import { Box, Container, FormControl, SxProps, Theme, useTheme } from '@mui/material'
4
+ import type { SxProps, Theme } from '@mui/material'
5
+ import { Box, Container, FormControl, useTheme } from '@mui/material'
5
6
  import { useCompareList, useCompareListStyles } from '../hooks'
6
7
  import { useCompareForm } from './CompareListForm'
7
8
 
@@ -1,8 +1,8 @@
1
- import { Button, iconChevronRight, IconSvg, MessageSnackbar } from '@graphcommerce/next-ui'
1
+ import { Button, IconSvg, MessageSnackbar, iconChevronRight } from '@graphcommerce/next-ui'
2
2
  import { Trans } from '@lingui/react'
3
- import { SetStateAction } from 'react'
3
+ import type { SetStateAction } from 'react'
4
4
 
5
- type CompareMessageSnackbarProps = {
5
+ export type CompareMessageSnackbarProps = {
6
6
  count: number | undefined
7
7
  name: string | null | undefined
8
8
  displayMessageBar: boolean
@@ -1,22 +1,21 @@
1
1
  import { useMutation } from '@graphcommerce/graphql'
2
2
  import { Trans } from '@lingui/react'
3
3
  // eslint-disable-next-line @typescript-eslint/no-restricted-imports
4
- import { Badge, Box, Button, Checkbox, SxProps, Theme } from '@mui/material'
4
+ import type { SxProps, Theme } from '@mui/material'
5
+ import { Badge, Box, Button, Checkbox } from '@mui/material'
5
6
  import { useState } from 'react'
6
- import {
7
- AddProductsToCompareListDocument,
8
- CompareProductIdInternalFragment,
9
- RemoveProductsFromCompareListDocument,
10
- } from '../graphql'
7
+ import type { CompareProductIdInternalFragment } from '../graphql'
8
+ import { AddProductsToCompareListDocument, RemoveProductsFromCompareListDocument } from '../graphql'
11
9
  import { useCompareSummary } from '../hooks'
12
10
  import { useCompareListUidCreate } from '../hooks/useCompareListUidCreate'
13
11
  import { CompareMessageSnackbar } from './CompareMessageSnackbar'
14
12
 
15
- type CompareProductButtonProps = CompareProductIdInternalFragment & { sx?: SxProps<Theme> }
13
+ export type CompareProductButtonProps = CompareProductIdInternalFragment & { sx?: SxProps<Theme> }
16
14
 
15
+ /** @public */
17
16
  export function CompareProductButton(props: CompareProductButtonProps) {
18
- const { compare_product_id, name, sx } = props
19
- const idString = String(compare_product_id)
17
+ const { id, name, sx } = props
18
+ const idString = String(id)
20
19
  const create = useCompareListUidCreate()
21
20
  const compareList = useCompareSummary()
22
21
  const inCompareList =
@@ -1,18 +1,20 @@
1
1
  import { useMutation } from '@graphcommerce/graphql'
2
- import { iconCompare, Button, Fab, FabProps } from '@graphcommerce/next-ui'
2
+ import type { FabProps } from '@graphcommerce/next-ui'
3
+ import { Button, Fab, iconCompare } from '@graphcommerce/next-ui'
3
4
  import { i18n } from '@lingui/core'
4
5
  import { Trans } from '@lingui/react'
5
6
  // eslint-disable-next-line @typescript-eslint/no-restricted-imports
6
- import { alpha, Checkbox, NoSsr, SxProps, Theme, useTheme } from '@mui/material'
7
+ import type { SxProps, Theme } from '@mui/material'
8
+ import { alpha, Checkbox, NoSsr, useTheme } from '@mui/material'
7
9
  import { useState } from 'react'
8
- import { CompareProductIdInternalFragment } from '../graphql'
10
+ import type { CompareProductIdInternalFragment } from '../graphql'
9
11
  import { AddProductsToCompareListDocument } from '../graphql/AddProductsToCompareList.gql'
10
12
  import { RemoveProductsFromCompareListDocument } from '../graphql/RemoveProductsFromCompareList.gql'
11
13
  import { useCompareSummary } from '../hooks'
12
14
  import { useCompareListUidCreate } from '../hooks/useCompareListUidCreate'
13
15
  import { CompareMessageSnackbar } from './CompareMessageSnackbar'
14
16
 
15
- type CompareProductToggleProps = {
17
+ export type CompareProductToggleProps = {
16
18
  sx?: SxProps<Theme>
17
19
  product: CompareProductIdInternalFragment
18
20
  } & Pick<FabProps, 'color'>
@@ -108,7 +110,7 @@ function CompareProductToggleBase(
108
110
  (theme) => ({
109
111
  backgroundColor:
110
112
  theme.palette.mode === 'light' ? theme.palette.background.paper : 'transparent',
111
- flex: `0 0 auto`,
113
+ flex: '0 0 auto',
112
114
  '& svg': {
113
115
  stroke: strokeColorPlp,
114
116
  },
@@ -146,7 +148,7 @@ function CompareProductToggleBase(
146
148
  export function CompareProductToggle(props: CompareProductToggleProps) {
147
149
  const { product } = props
148
150
  const compareList = useCompareSummary()
149
- const idString = String(product.compare_product_id)
151
+ const idString = String(product.id)
150
152
  const inCompareList =
151
153
  compareList.data?.compareList?.items?.some((i) => i?.uid === idString) ?? false
152
154
 
@@ -1,12 +1,13 @@
1
- import { usePageContext, useGo } from '@graphcommerce/framer-next-pages'
1
+ import { useGo, usePageContext } from '@graphcommerce/framer-next-pages'
2
2
  import { useMutation } from '@graphcommerce/graphql'
3
- import { LinkOrButton, LinkOrButtonProps } from '@graphcommerce/next-ui'
3
+ import type { LinkOrButtonProps } from '@graphcommerce/next-ui'
4
+ import { LinkOrButton } from '@graphcommerce/next-ui'
4
5
  import { Trans } from '@lingui/react'
5
6
  import { DeleteCompareListDocument } from '../graphql/DeleteCompareList.gql'
6
7
  import { useCompareList } from '../hooks'
7
8
  import { useClearCurrentCompareListUid } from '../hooks/useClearCurrentCompareListUid'
8
9
 
9
- type EmptyCompareListButtonProps = Omit<LinkOrButtonProps, 'onClick' | 'children'>
10
+ export type EmptyCompareListButtonProps = Omit<LinkOrButtonProps, 'onClick' | 'children'>
10
11
 
11
12
  export function EmptyCompareListButton(props: EmptyCompareListButtonProps) {
12
13
  const { button = {}, link = {} } = props
@@ -1,6 +1,6 @@
1
1
  fragment CompareProductIdInternal on ProductInterface
2
2
  @inject(into: ["UseAddProductsToCartAction", "ProductListItem"]) {
3
3
  __typename
4
- compare_product_id: id
4
+ id
5
5
  name
6
6
  }
@@ -1,4 +1,5 @@
1
- import { ApolloCache, useApolloClient } from '@graphcommerce/graphql'
1
+ import type { ApolloCache } from '@graphcommerce/graphql'
2
+ import { useApolloClient } from '@graphcommerce/graphql'
2
3
  import { useCallback } from 'react'
3
4
  import { CurrentCompareUidDocument } from '../graphql'
4
5
 
@@ -8,8 +8,8 @@ export function useCompareListStyles() {
8
8
  gap: theme.spacings.md,
9
9
  '& > *': {
10
10
  width: {
11
- md: `calc(100% / 3)`,
12
- xs: `calc(100% / 2)`,
11
+ md: 'calc(100% / 3)',
12
+ xs: 'calc(100% / 2)',
13
13
  },
14
14
  },
15
15
  [theme.breakpoints.down('md')]: {
@@ -1,5 +1,5 @@
1
1
  import { useQuery } from '@graphcommerce/graphql'
2
- import { CurrentCompareUidDocument, CompareSummaryDocument } from '../graphql'
2
+ import { CompareSummaryDocument, CurrentCompareUidDocument } from '../graphql'
3
3
 
4
4
  export function useCompareSummary() {
5
5
  const currentCompareUid = useQuery(CurrentCompareUidDocument)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-compare",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.99",
5
+ "version": "9.0.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,21 +12,21 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.0.0-canary.99",
16
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.99",
17
- "@graphcommerce/framer-next-pages": "^9.0.0-canary.99",
18
- "@graphcommerce/framer-utils": "^9.0.0-canary.99",
19
- "@graphcommerce/graphql": "^9.0.0-canary.99",
20
- "@graphcommerce/magento-cart": "^9.0.0-canary.99",
21
- "@graphcommerce/magento-product": "^9.0.0-canary.99",
22
- "@graphcommerce/next-ui": "^9.0.0-canary.99",
23
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.99",
24
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.99",
15
+ "@graphcommerce/ecommerce-ui": "^9.0.0",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0",
17
+ "@graphcommerce/framer-next-pages": "^9.0.0",
18
+ "@graphcommerce/framer-utils": "^9.0.0",
19
+ "@graphcommerce/graphql": "^9.0.0",
20
+ "@graphcommerce/magento-cart": "^9.0.0",
21
+ "@graphcommerce/magento-product": "^9.0.0",
22
+ "@graphcommerce/next-ui": "^9.0.0",
23
+ "@graphcommerce/prettier-config-pwa": "^9.0.0",
24
+ "@graphcommerce/typescript-config-pwa": "^9.0.0",
25
25
  "@lingui/core": "^4.2.1",
26
26
  "@lingui/macro": "^4.2.1",
27
27
  "@lingui/react": "^4.2.1",
28
28
  "@mui/material": "^5.10.16",
29
- "framer-motion": "^10.0.0",
29
+ "framer-motion": "^11.0.0",
30
30
  "graphql": "^16.0.0",
31
31
  "next": "*",
32
32
  "react": "^18.2.0",
@@ -1,4 +1,4 @@
1
- import { CartFabProps } from '@graphcommerce/magento-cart'
1
+ import type { CartFabProps } from '@graphcommerce/magento-cart'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { CompareFab } from '../components'
4
4
 
@@ -1,4 +1,4 @@
1
- import { ProductPageAddToCartRowProps } from '@graphcommerce/magento-product'
1
+ import type { ProductPageAddToCartRowProps } from '@graphcommerce/magento-product'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { CompareProductToggle } from '../components'
4
4
 
@@ -1,4 +1,4 @@
1
- import { GraphQLProviderProps } from '@graphcommerce/graphql'
1
+ import type { GraphQLProviderProps } from '@graphcommerce/graphql'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { compareTypePolicies } from '../typePolicies'
4
4
 
@@ -1,8 +1,8 @@
1
- import { ProductListItemProps } from '@graphcommerce/magento-product'
1
+ import type { ProductListItemProps } from '@graphcommerce/magento-product'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { Box } from '@mui/material'
4
4
  import { CompareProductToggle } from '../components'
5
- import { CompareProductIdInternalFragment } from '../graphql'
5
+ import type { CompareProductIdInternalFragment } from '../graphql'
6
6
 
7
7
  export const config: PluginConfig = {
8
8
  type: 'component',