@artsy/reaction 29.2.0 โ†’ 29.4.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,3 +1,75 @@
1
+ # v29.4.0 (Fri Apr 08 2022)
2
+
3
+ #### ๐Ÿš€ Enhancement
4
+
5
+ - chore: update renovate assignee [#3722](https://github.com/artsy/reaction/pull/3722) ([@ovasdi](https://github.com/ovasdi))
6
+
7
+ #### ๐Ÿ  Internal
8
+
9
+ - Bump handlebars from 4.5.3 to 4.7.7 [#3682](https://github.com/artsy/reaction/pull/3682) ([@dependabot[bot]](https://github.com/dependabot[bot]))
10
+
11
+ #### Authors: 2
12
+
13
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
14
+ - Ozzie Vasdi ([@ovasdi](https://github.com/ovasdi))
15
+
16
+ ---
17
+
18
+ # v29.3.0 (Thu Apr 07 2022)
19
+
20
+ #### ๐Ÿš€ Enhancement
21
+
22
+ - fix: formating [#3723](https://github.com/artsy/reaction/pull/3723) ([@mc-jones](https://github.com/mc-jones))
23
+
24
+ #### ๐Ÿ› Bug Fix
25
+
26
+ - chore(inclusive-language): Rename master to main [#3716](https://github.com/artsy/reaction/pull/3716) ([@damassi](https://github.com/damassi))
27
+ - chore: Adopt inclusive language [#3715](https://github.com/artsy/reaction/pull/3715) ([@sonecabr](https://github.com/sonecabr))
28
+
29
+ #### ๐Ÿ  Internal
30
+
31
+ - chore(deps): update dep @artsy/lint-changed from 3.4.0 to v5 [#3693](https://github.com/artsy/reaction/pull/3693) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
32
+ - chore(deps): update dep vscode-apollo-relay from 1.5.1 to v1.5.2 [#3713](https://github.com/artsy/reaction/pull/3713) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
33
+ - Bump lodash from 4.17.11 to 4.17.21 [#3684](https://github.com/artsy/reaction/pull/3684) ([@dependabot[bot]](https://github.com/dependabot[bot]))
34
+ - Bump path-parse from 1.0.6 to 1.0.7 [#3696](https://github.com/artsy/reaction/pull/3696) ([@dependabot[bot]](https://github.com/dependabot[bot]))
35
+ - chore(deps): update dep @artsy/lint-changed from 3.1.0 to v3.4.0 [#3689](https://github.com/artsy/reaction/pull/3689) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
36
+ - Bump ssri from 6.0.1 to 6.0.2 [#3680](https://github.com/artsy/reaction/pull/3680) ([@dependabot[bot]](https://github.com/dependabot[bot]))
37
+ - Bump y18n from 3.2.1 to 3.2.2 [#3679](https://github.com/artsy/reaction/pull/3679) ([@dependabot[bot]](https://github.com/dependabot[bot]))
38
+ - Bump tmpl from 1.0.4 to 1.0.5 [#3706](https://github.com/artsy/reaction/pull/3706) ([@dependabot[bot]](https://github.com/dependabot[bot]))
39
+ - chore(deps): update dep @artsy/auto-config from 1.0.2 to v1.1.0 [#3708](https://github.com/artsy/reaction/pull/3708) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
40
+ - chore(deps): update auto orb from 1.3.2 to v2 [#3711](https://github.com/artsy/reaction/pull/3711) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
41
+ - chore: Update Rennovate [#3712](https://github.com/artsy/reaction/pull/3712) ([@icirellik](https://github.com/icirellik))
42
+ - chore: (PLATFORM-3528) update node version to 14LTS, update README [#3705](https://github.com/artsy/reaction/pull/3705) ([@ovasdi](https://github.com/ovasdi))
43
+
44
+ #### ๐Ÿ”ฉ Dependency Updates
45
+
46
+ - Bump ini from 1.3.5 to 1.3.8 [#3668](https://github.com/artsy/reaction/pull/3668) ([@dependabot[bot]](https://github.com/dependabot[bot]))
47
+
48
+ #### Authors: 8
49
+
50
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
51
+ - [@renovate[bot]](https://github.com/renovate[bot])
52
+ - Andre Rocha ([@sonecabr](https://github.com/sonecabr))
53
+ - Cameron Rollheiser ([@icirellik](https://github.com/icirellik))
54
+ - Christopher Pappas ([@damassi](https://github.com/damassi))
55
+ - Matt Jones ([@mc-jones](https://github.com/mc-jones))
56
+ - Ozzie Vasdi ([@ovasdi](https://github.com/ovasdi))
57
+ - WhiteSource Renovate ([@renovate-bot](https://github.com/renovate-bot))
58
+
59
+ ---
60
+
61
+ # v29.2.1 (Thu Aug 12 2021)
62
+
63
+ #### ๐Ÿ› Bug Fix
64
+
65
+ - bugfix: Fix overflow text [#3697](https://github.com/artsy/reaction/pull/3697) ([@damassi](https://github.com/damassi))
66
+
67
+ #### Authors: 1
68
+
69
+ - Christopher Pappas ([@damassi](https://github.com/damassi))
70
+
71
+ ---
72
+
1
73
  # v29.2.0 (Fri Jun 11 2021)
2
74
 
3
75
  #### ๐Ÿš€ Enhancement
@@ -370,7 +442,7 @@
370
442
  - add "schedule:nonOfficeHours" [#3608](https://github.com/artsy/reaction/pull/3608) ([@eessex](https://github.com/eessex))
371
443
  - Reenable renovate [#3608](https://github.com/artsy/reaction/pull/3608) ([@eessex](https://github.com/eessex))
372
444
 
373
- #### โš ๏ธ Pushed to `master`
445
+ #### โš ๏ธ Pushed to `main`
374
446
 
375
447
  - Disable renovate ([@dblandin](https://github.com/dblandin))
376
448
 
@@ -397,7 +469,7 @@
397
469
 
398
470
  - Remove tracking calls for now [#3591](https://github.com/artsy/reaction/pull/3591) ([@sweir27](https://github.com/sweir27))
399
471
 
400
- #### โš ๏ธ Pushed to `master`
472
+ #### โš ๏ธ Pushed to `main`
401
473
 
402
474
  - Update renovate.json ([@damassi](https://github.com/damassi))
403
475
  - Update README ([@damassi](https://github.com/damassi))
@@ -611,7 +683,7 @@
611
683
 
612
684
  - 2FA enrollment responsive fix: switch to maxWidth [#3567](https://github.com/artsy/reaction/pull/3567) ([@dblandin](https://github.com/dblandin))
613
685
 
614
- #### โš ๏ธ Pushed to `master`
686
+ #### โš ๏ธ Pushed to `main`
615
687
 
616
688
  - Bump to trigger npm publish :rocket: ([@dblandin](https://github.com/dblandin))
617
689
 
@@ -627,7 +699,7 @@
627
699
 
628
700
  - Add responsive styles to 2FA Enrollment UI [#3566](https://github.com/artsy/reaction/pull/3566) ([@dblandin](https://github.com/dblandin))
629
701
 
630
- #### โš ๏ธ Pushed to `master`
702
+ #### โš ๏ธ Pushed to `main`
631
703
 
632
704
  - empty commit to trigger build ([@ds300](https://github.com/ds300))
633
705
 
@@ -1015,7 +1087,7 @@
1015
1087
  - Update metaphysics schema [#3500](https://github.com/artsy/reaction/pull/3500) ([@artsyit](https://github.com/artsyit))
1016
1088
  - Fallback to base route if no route found through index [#3504](https://github.com/artsy/reaction/pull/3504) ([@zephraph](https://github.com/zephraph))
1017
1089
 
1018
- #### โš ๏ธ Pushed to `master`
1090
+ #### โš ๏ธ Pushed to `main`
1019
1091
 
1020
1092
  - Force deploy ([@zephraph](https://github.com/zephraph))
1021
1093
 
@@ -1161,7 +1233,7 @@
1161
1233
  - Update metaphysics schema [#3483](https://github.com/artsy/reaction/pull/3483) ([@artsyit](https://github.com/artsyit))
1162
1234
  - Fix Formik boolean handling [#3481](https://github.com/artsy/reaction/pull/3481) ([@dblandin](https://github.com/dblandin))
1163
1235
 
1164
- #### โš ๏ธ Pushed to `master`
1236
+ #### โš ๏ธ Pushed to `main`
1165
1237
 
1166
1238
  - empty commit to trigger build ([@ds300](https://github.com/ds300))
1167
1239
 
@@ -1250,7 +1322,7 @@
1250
1322
  - [mWeb] Show OTP prompt during login when 2FA-enabled [#3472](https://github.com/artsy/reaction/pull/3472) ([@dblandin](https://github.com/dblandin))
1251
1323
  - [Chore] Turns on exhaustive-deps [#3473](https://github.com/artsy/reaction/pull/3473) ([@dzucconi](https://github.com/dzucconi))
1252
1324
 
1253
- #### โš ๏ธ Pushed to `master`
1325
+ #### โš ๏ธ Pushed to `main`
1254
1326
 
1255
1327
  - Fix @artsy/cohesion Intent.login reference ([@dblandin](https://github.com/dblandin))
1256
1328
 
@@ -1440,7 +1512,7 @@
1440
1512
  - Update metaphysics schema [#3452](https://github.com/artsy/reaction/pull/3452) ([@artsyit](https://github.com/artsyit))
1441
1513
  - [NavBar Drop Down QA] add a new prop to control background color [#3447](https://github.com/artsy/reaction/pull/3447) ([@xtina-starr](https://github.com/xtina-starr))
1442
1514
 
1443
- #### โš ๏ธ Pushed to `master`
1515
+ #### โš ๏ธ Pushed to `main`
1444
1516
 
1445
1517
  - Bump for force reaction release ([@zephraph](https://github.com/zephraph))
1446
1518
 
@@ -2467,7 +2539,7 @@ Cypress integration testing. [#3384](https://github.com/artsy/reaction/pull/3384
2467
2539
  - Organize MobileNav into folder [#3335](https://github.com/artsy/reaction/pull/3335) ([@damassi](https://github.com/damassi))
2468
2540
  - Display information about identity verification on credit card form [#3334](https://github.com/artsy/reaction/pull/3334) ([@bhoggard](https://github.com/bhoggard))
2469
2541
 
2470
- #### โš ๏ธ Pushed to master
2542
+ #### โš ๏ธ Pushed to main
2471
2543
 
2472
2544
  - Forcing a reaction release ([@zephraph](https://github.com/zephraph))
2473
2545
 
@@ -3844,7 +3916,7 @@ Cypress integration testing. [#3384](https://github.com/artsy/reaction/pull/3384
3844
3916
 
3845
3917
  - Fix conversation detail link [#3187](https://github.com/artsy/reaction/pull/3187) ([@ashkan18](https://github.com/ashkan18))
3846
3918
 
3847
- #### โš ๏ธ Pushed to master
3919
+ #### โš ๏ธ Pushed to main
3848
3920
 
3849
3921
  - [BundleSplitting] Comment out for now ([@damassi](https://github.com/damassi))
3850
3922
 
@@ -5059,7 +5131,7 @@ Paired with @abhitip @mikehrom on updates to these event payloads. [#3099](https
5059
5131
  - Bump down threshold for lazy-loading on artist artwork grid [#3053](https://github.com/artsy/reaction/pull/3053) ([@zephraph](https://github.com/zephraph))
5060
5132
  - Restore Artworks link to mobile nav [#3046](https://github.com/artsy/reaction/pull/3046) ([@xtina-starr](https://github.com/xtina-starr))
5061
5133
 
5062
- #### โš ๏ธ Pushed to master
5134
+ #### โš ๏ธ Pushed to main
5063
5135
 
5064
5136
  - Bump to 23.0.1 to get around issues with auto-release (steven.j.hicks@gmail.com)
5065
5137
 
@@ -5377,7 +5449,7 @@ addresses https://artsyproduct.atlassian.net/browse/AUCT-773 [#3034](https://git
5377
5449
 
5378
5450
  #### ๐Ÿš€ Enhancement
5379
5451
 
5380
- - Meta: Merge recent auctions team product work into master [#3022](https://github.com/artsy/reaction/pull/3022) ([@yuki24](https://github.com/yuki24) [@dleve123](https://github.com/dleve123))
5452
+ - Meta: Merge recent auctions team product work into main [#3022](https://github.com/artsy/reaction/pull/3022) ([@yuki24](https://github.com/yuki24) [@dleve123](https://github.com/dleve123))
5381
5453
 
5382
5454
  #### Authors: 2
5383
5455
 
@@ -6701,7 +6773,7 @@ Details
6701
6773
 
6702
6774
  # v20.0.9 (Mon Sep 30 2019)
6703
6775
 
6704
- #### โš ๏ธ Pushed to master
6776
+ #### โš ๏ธ Pushed to main
6705
6777
 
6706
6778
  - Remove Luc from point people (eve.essex@gmail.com)
6707
6779
 
@@ -8323,7 +8395,7 @@ Co-authored-by: Erik Stockmeier <erik.d.stock@gmail.com> [#2703](https://github.
8323
8395
 
8324
8396
  - update test [#2644](https://github.com/artsy/reaction/pull/2644) (jiahaodavid4040@gmail.com)
8325
8397
 
8326
- #### โš ๏ธ Pushed to master
8398
+ #### โš ๏ธ Pushed to main
8327
8399
 
8328
8400
  - resolve conflicting files (jiahaodavid4040@gmail.com)
8329
8401
 
@@ -9183,7 +9255,7 @@ Co-authored-by: Daniel Levenson <dleve123@gmail.com> [#2672](https://github.com/
9183
9255
  <details>
9184
9256
  <summary>artsy/palette</summary>
9185
9257
 
9186
- ### [`v4.14.23`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v41423-Thu-Jun-27-2019)
9258
+ ### [`v4.14.23`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41423-Thu-Jun-27-2019)
9187
9259
 
9188
9260
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.22...v4.14.23)
9189
9261
 
@@ -9290,7 +9362,7 @@ _From #2577_
9290
9362
  <details>
9291
9363
  <summary>artsy/palette</summary>
9292
9364
 
9293
- ### [`v4.14.22`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v41422-Mon-Jun-24-2019)
9365
+ ### [`v4.14.22`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41422-Mon-Jun-24-2019)
9294
9366
 
9295
9367
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.21...v4.14.22)
9296
9368
 
@@ -9358,7 +9430,7 @@ _From #2577_
9358
9430
  <details>
9359
9431
  <summary>artsy/palette</summary>
9360
9432
 
9361
- ### [`v4.14.21`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v41421-Fri-Jun-21-2019)
9433
+ ### [`v4.14.21`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41421-Fri-Jun-21-2019)
9362
9434
 
9363
9435
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.20...v4.14.21)
9364
9436
 
@@ -9571,7 +9643,7 @@ _From #2577_
9571
9643
  <details>
9572
9644
  <summary>artsy/palette</summary>
9573
9645
 
9574
- ### [`v4.14.16`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v41416-Thu-Jun-13-2019)
9646
+ ### [`v4.14.16`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41416-Thu-Jun-13-2019)
9575
9647
 
9576
9648
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.15...v4.14.16)
9577
9649
 
@@ -9903,7 +9975,7 @@ _From #2577_
9903
9975
  <details>
9904
9976
  <summary>artsy/palette</summary>
9905
9977
 
9906
- ### [`v4.14.9`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4149-Fri-Jun-07-2019)
9978
+ ### [`v4.14.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4149-Fri-Jun-07-2019)
9907
9979
 
9908
9980
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.8...v4.14.9)
9909
9981
 
@@ -10073,19 +10145,19 @@ _From #2577_
10073
10145
  <details>
10074
10146
  <summary>artsy/palette</summary>
10075
10147
 
10076
- ### [`v4.14.2`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4142-Mon-Jun-03-2019)
10148
+ ### [`v4.14.2`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4142-Mon-Jun-03-2019)
10077
10149
 
10078
10150
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.1...v4.14.2)
10079
10151
 
10080
10152
  * * *
10081
10153
 
10082
- ### [`v4.14.1`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4141-Mon-Jun-03-2019)
10154
+ ### [`v4.14.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4141-Mon-Jun-03-2019)
10083
10155
 
10084
10156
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.14.0...v4.14.1)
10085
10157
 
10086
10158
  * * *
10087
10159
 
10088
- ### [`v4.14.0`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4140-Sun-Jun-02-2019)
10160
+ ### [`v4.14.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4140-Sun-Jun-02-2019)
10089
10161
 
10090
10162
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.13.5...v4.14.0)
10091
10163
 
@@ -10138,7 +10210,7 @@ _From #2577_
10138
10210
  <details>
10139
10211
  <summary>artsy/palette</summary>
10140
10212
 
10141
- ### [`v4.13.5`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4135-Sat-Jun-01-2019)
10213
+ ### [`v4.13.5`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4135-Sat-Jun-01-2019)
10142
10214
 
10143
10215
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.13.4...v4.13.5)
10144
10216
 
@@ -10153,7 +10225,7 @@ _From #2577_
10153
10225
 
10154
10226
  * * *
10155
10227
 
10156
- ### [`v4.13.4`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4134-Sat-Jun-01-2019)
10228
+ ### [`v4.13.4`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4134-Sat-Jun-01-2019)
10157
10229
 
10158
10230
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.13.3...v4.13.4)
10159
10231
 
@@ -10264,7 +10336,7 @@ _From #2577_
10264
10336
  <details>
10265
10337
  <summary>artsy/palette</summary>
10266
10338
 
10267
- ### [`v4.13.2`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4132-Thu-May-30-2019)
10339
+ ### [`v4.13.2`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4132-Thu-May-30-2019)
10268
10340
 
10269
10341
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.13.1...v4.13.2)
10270
10342
 
@@ -10279,7 +10351,7 @@ _From #2577_
10279
10351
 
10280
10352
  * * *
10281
10353
 
10282
- ### [`v4.13.1`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4131-Thu-May-30-2019)
10354
+ ### [`v4.13.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4131-Thu-May-30-2019)
10283
10355
 
10284
10356
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.13.0...v4.13.1)
10285
10357
 
@@ -10294,7 +10366,7 @@ _From #2577_
10294
10366
 
10295
10367
  * * *
10296
10368
 
10297
- ### [`v4.13.0`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4130-Wed-May-29-2019)
10369
+ ### [`v4.13.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4130-Wed-May-29-2019)
10298
10370
 
10299
10371
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.9...v4.13.0)
10300
10372
 
@@ -10309,7 +10381,7 @@ _From #2577_
10309
10381
 
10310
10382
  * * *
10311
10383
 
10312
- ### [`v4.12.9`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4129-Wed-May-29-2019)
10384
+ ### [`v4.12.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4129-Wed-May-29-2019)
10313
10385
 
10314
10386
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.8...v4.12.9)
10315
10387
 
@@ -10370,7 +10442,7 @@ _From #2577_
10370
10442
  <details>
10371
10443
  <summary>artsy/palette</summary>
10372
10444
 
10373
- ### [`v4.12.8`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4128-Tue-May-28-2019)
10445
+ ### [`v4.12.8`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4128-Tue-May-28-2019)
10374
10446
 
10375
10447
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.7...v4.12.8)
10376
10448
 
@@ -10394,7 +10466,7 @@ _From #2471_
10394
10466
  <details>
10395
10467
  <summary>artsy/palette</summary>
10396
10468
 
10397
- ### [`v4.12.7`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4127-Tue-May-28-2019)
10469
+ ### [`v4.12.7`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4127-Tue-May-28-2019)
10398
10470
 
10399
10471
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.6...v4.12.7)
10400
10472
 
@@ -10418,7 +10490,7 @@ _From #2455_
10418
10490
  <details>
10419
10491
  <summary>artsy/palette</summary>
10420
10492
 
10421
- ### [`v4.12.6`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4126-Tue-May-28-2019)
10493
+ ### [`v4.12.6`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4126-Tue-May-28-2019)
10422
10494
 
10423
10495
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.5...v4.12.6)
10424
10496
 
@@ -10439,7 +10511,7 @@ _From #2455_
10439
10511
 
10440
10512
  * * *
10441
10513
 
10442
- ### [`v4.12.5`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4125-Thu-May-23-2019)
10514
+ ### [`v4.12.5`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4125-Thu-May-23-2019)
10443
10515
 
10444
10516
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.4...v4.12.5)
10445
10517
 
@@ -10453,7 +10525,7 @@ _From #2455_
10453
10525
 
10454
10526
  * * *
10455
10527
 
10456
- ### [`v4.12.4`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4124-Thu-May-23-2019)
10528
+ ### [`v4.12.4`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4124-Thu-May-23-2019)
10457
10529
 
10458
10530
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.3...v4.12.4)
10459
10531
 
@@ -10468,7 +10540,7 @@ _From #2455_
10468
10540
 
10469
10541
  * * *
10470
10542
 
10471
- ### [`v4.12.3`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4123-Thu-May-23-2019)
10543
+ ### [`v4.12.3`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4123-Thu-May-23-2019)
10472
10544
 
10473
10545
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.2...v4.12.3)
10474
10546
 
@@ -10634,7 +10706,7 @@ _From #2455_
10634
10706
  <details>
10635
10707
  <summary>webpack-contrib/webpack-bundle-analyzer</summary>
10636
10708
 
10637
- ### [`v3.3.2`](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md#&#8203;332)
10709
+ ### [`v3.3.2`](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/blob/main/CHANGELOG.md#&#8203;332)
10638
10710
 
10639
10711
  [Compare Source](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/compare/v2.13.1...v3.3.2)
10640
10712
 
@@ -10765,7 +10837,7 @@ _From #2455_
10765
10837
  <details>
10766
10838
  <summary>omakase-js/omakase</summary>
10767
10839
 
10768
- ### [`v0.0.9`](https://togithub.com/omakase-js/omakase/blob/master/CHANGELOG.md#&#8203;009-Tue-May-21-2019)
10840
+ ### [`v0.0.9`](https://togithub.com/omakase-js/omakase/blob/main/CHANGELOG.md#&#8203;009-Tue-May-21-2019)
10769
10841
 
10770
10842
  [Compare Source](https://togithub.com/omakase-js/omakase/compare/v0.0.8...v0.0.9)
10771
10843
 
@@ -10780,7 +10852,7 @@ _From #2455_
10780
10852
 
10781
10853
  * * *
10782
10854
 
10783
- ### [`v0.0.8`](https://togithub.com/omakase-js/omakase/blob/master/CHANGELOG.md#&#8203;008-Tue-May-21-2019)
10855
+ ### [`v0.0.8`](https://togithub.com/omakase-js/omakase/blob/main/CHANGELOG.md#&#8203;008-Tue-May-21-2019)
10784
10856
 
10785
10857
  [Compare Source](https://togithub.com/omakase-js/omakase/compare/v0.0.7...v0.0.8)
10786
10858
 
@@ -10804,7 +10876,7 @@ _From #2443_
10804
10876
  <details>
10805
10877
  <summary>artsy/palette</summary>
10806
10878
 
10807
- ### [`v4.12.1`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4121-Tue-May-21-2019)
10879
+ ### [`v4.12.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4121-Tue-May-21-2019)
10808
10880
 
10809
10881
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.12.0...v4.12.1)
10810
10882
 
@@ -10882,7 +10954,7 @@ _From #2443_
10882
10954
  <details>
10883
10955
  <summary>artsy/palette</summary>
10884
10956
 
10885
- ### [`v4.12.0`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4120-Fri-May-17-2019)
10957
+ ### [`v4.12.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4120-Fri-May-17-2019)
10886
10958
 
10887
10959
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.11.9...v4.12.0)
10888
10960
 
@@ -11223,7 +11295,7 @@ _From #2443_
11223
11295
  <details>
11224
11296
  <summary>artsy/palette</summary>
11225
11297
 
11226
- ### [`v4.11.9`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4119-Fri-May-10-2019)
11298
+ ### [`v4.11.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4119-Fri-May-10-2019)
11227
11299
 
11228
11300
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.11.8...v4.11.9)
11229
11301
 
@@ -11247,7 +11319,7 @@ _From #2399_
11247
11319
  <details>
11248
11320
  <summary>artsy/palette</summary>
11249
11321
 
11250
- ### [`v4.11.8`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4118-Fri-May-10-2019)
11322
+ ### [`v4.11.8`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4118-Fri-May-10-2019)
11251
11323
 
11252
11324
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.11.7...v4.11.8)
11253
11325
 
@@ -11321,7 +11393,7 @@ _From #2399_
11321
11393
  <details>
11322
11394
  <summary>artsy/palette</summary>
11323
11395
 
11324
- ### [`v4.11.7`](https://togithub.com/artsy/palette/blob/master/CHANGELOG.md#v4117-Fri-May-10-2019)
11396
+ ### [`v4.11.7`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4117-Fri-May-10-2019)
11325
11397
 
11326
11398
  [Compare Source](https://togithub.com/artsy/palette/compare/v4.11.6...v4.11.7)
11327
11399
 
@@ -14817,11 +14889,11 @@ Co-authored-by: Renovate Bot <bot@renovateapp.com> [#2297](https://github.com/ar
14817
14889
  - Revert "Refactor tests" [#1963](https://github.com/artsy/reaction/pull/1963) ([@ds300](https://github.com/ds300))
14818
14890
  - Refactor tests [#1899](https://github.com/artsy/reaction/pull/1899) ([@ds300](https://github.com/ds300) sweir27@gmail.com)
14819
14891
 
14820
- #### โš ๏ธ Pushed to master
14892
+ #### โš ๏ธ Pushed to main
14821
14893
 
14822
14894
  - remove --detectOpenHandles ([@ds300](https://github.com/ds300))
14823
14895
  - add --forceExit to jest invocation ([@ds300](https://github.com/ds300))
14824
- - Merge remote-tracking branch 'upstream/master' into refactor-tests ([@ds300](https://github.com/ds300))
14896
+ - Merge remote-tracking branch 'upstream/main' into refactor-tests ([@ds300](https://github.com/ds300))
14825
14897
  - don't re-calculate path array ([@ds300](https://github.com/ds300))
14826
14898
  - add todo comment context ([@ds300](https://github.com/ds300))
14827
14899
  - More sanity checks ([@ds300](https://github.com/ds300))
@@ -14830,8 +14902,8 @@ Co-authored-by: Renovate Bot <bot@renovateapp.com> [#2297](https://github.com/ar
14830
14902
  - abmiguous -> ambiguous ([@ds300](https://github.com/ds300))
14831
14903
  - Update src/DevTools/createMockNetworkLayer/index.ts ([@alloy](https://github.com/alloy))
14832
14904
  - Update src/DevTools/createMockNetworkLayer/index.ts ([@alloy](https://github.com/alloy))
14833
- - Merge remote-tracking branch 'upstream/master' into refactor-tests ([@ds300](https://github.com/ds300))
14834
- - Merge branch 'master' into refactor-tests ([@d.j.sheldrick@gmail.com](https://github.com/d.j.sheldrick@gmail.com))
14905
+ - Merge remote-tracking branch 'upstream/main' into refactor-tests ([@ds300](https://github.com/ds300))
14906
+ - Merge branch 'main' into refactor-tests ([@d.j.sheldrick@gmail.com](https://github.com/d.j.sheldrick@gmail.com))
14835
14907
  - bring countdown timer test fixtures closer to the tests ([@ds300](https://github.com/ds300))
14836
14908
 
14837
14909
  ---
@@ -15795,4 +15867,4 @@ Update dependency @artsy/palette to v2.34.0 [#1921](https://github.com/artsy/rea
15795
15867
  #### Authors: 2
15796
15868
 
15797
15869
  - Art.sy ([@artsyit](https://github.com/artsyit))
15798
- - Justin Bennett ([@zephraph](https://github.com/zephraph))
15870
+ - Justin Bennett ([@zephraph](https://github.com/zephraph))
package/README.md CHANGED
@@ -13,11 +13,9 @@
13
13
  ## Meta
14
14
 
15
15
  - **State:** production
16
- - **Demo:** <https://artsy.github.io/reaction>
17
16
  - **CI:** [![CircleCI](https://circleci.com/gh/artsy/reaction.svg?style=shield)](https://circleci.com/gh/artsy/reaction)
18
17
  - **NPM:** [![npm version](https://badge.fury.io/js/%40artsy%2Freaction.svg)](https://www.npmjs.com/package/@artsy/reaction)
19
- - **Coverage:** [![codecov](https://codecov.io/gh/artsy/reaction/branch/master/graph/badge.svg)](https://codecov.io/gh/artsy/reaction)
20
- - **Point People:** [@eessex](https://github.com/eessex)
18
+ - **Coverage:** [![codecov](https://codecov.io/gh/artsy/reaction/branch/main/graph/badge.svg)](https://codecov.io/gh/artsy/reaction)
21
19
 
22
20
  ## Installation
23
21
 
@@ -133,8 +131,8 @@ You can learn more about this work from [our blog][footer_blog] and by following
133
131
  our [job postings][footer_jobs]!
134
132
 
135
133
  [footer_website]: https://www.artsy.net/
136
- [footer_principles]: https://github.com/artsy/README/blob/master/culture/engineering-principles.md
137
- [footer_open]: https://github.com/artsy/README/blob/master/culture/engineering-principles.md#open-source-by-default
134
+ [footer_principles]: https://github.com/artsy/README/blob/main/culture/engineering-principles.md
135
+ [footer_open]: https://github.com/artsy/README/blob/main/culture/engineering-principles.md#open-source-by-default
138
136
  [footer_blog]: https://artsy.github.io/
139
137
  [footer_twitter]: https://twitter.com/ArtsyOpenSource
140
138
  [footer_api]: https://developers.artsy.net/
@@ -33,7 +33,7 @@ function metaphysicsExtensionsLoggerMiddleware() {
33
33
  return function (req) {
34
34
  return next(req).then(function (res) {
35
35
  if (res.json.extensions && console.groupCollapsed && res.json.extensions.requests) {
36
- // See: https://github.com/artsy/metaphysics/blob/master/src/lib/loaders/api/extensionsLogger.ts
36
+ // See: https://github.com/artsy/metaphysics/blob/main/src/lib/loaders/api/extensionsLogger.ts
37
37
  var requests = res.json.extensions.requests; // Pull out the stitching logs, e.g. what graphql requests
38
38
  // did stitching do for you under the hood
39
39
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.ts"],"names":["metaphysicsExtensionsLoggerMiddleware","next","req","then","res","json","extensions","console","groupCollapsed","requests","stitching","stitchCount","Object","keys","length","stitchSummary","apis","requestCount","map","k","reduce","a","c","colorForRequests","noBold","noColor","requestSummary","title","forEach","host","group","route","log","groupEnd","stitchedSchema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AP;AAyED,KA1EU;AAAA,GAAX;AA2ED","sourcesContent":["import _ from \"lodash\"\n\n/**\n * This takes the extra extension metadata that staging and dev metaphysics\n * sends about API requests it makes for you, and logs it out during dev\n * time into your console at the same places as the relay queries.\n */\nexport function metaphysicsExtensionsLoggerMiddleware() {\n return next => req => {\n return next(req).then(res => {\n if (\n res.json.extensions &&\n console.groupCollapsed &&\n res.json.extensions.requests\n ) {\n // See: https://github.com/artsy/metaphysics/blob/master/src/lib/loaders/api/extensionsLogger.ts\n const requests = res.json.extensions.requests\n\n // Pull out the stitching logs, e.g. what graphql requests\n // did stitching do for you under the hood\n const stitching = requests.stitching\n const stitchCount = stitching && Object.keys(stitching.requests).length\n const stitchSummary = stitchCount ? `${stitchCount} stitched` : \"\"\n\n // Grab the rest API requests (only ones that use DataLoader)\n // so this is kinda a sub-set but it's more or less everything\n const apis = _.omit(requests, [\"stitching\"])\n const requestCount = Object.keys(apis)\n .map(k => Object.keys(requests[k].requests).length) // API requests\n .reduce((a, c) => a + c, 0) // Add them all up\n\n // Not telling anyone off, but over 15 is probably a point\n // where you want that highlighted.\n const colorForRequests =\n requestCount >= 15 ? \"color: #F1AF1B;\" : \"color: #6E1EFF;\"\n\n // The way the console coloring works is you use %c as an inline span\n // sentinal to correlate style to the next set of characters\n //\n // So we'll need some styles to work with\n const noBold = \"font-weight: normal;\"\n const noColor = \"color: black; font-weight: normal;\"\n const requestSummary = requestCount\n ? `%c ${requestCount} %ccalls` // These need consistent amounts of %c\n : \"%c%c\"\n\n const title = `%cMetaphysics API -${requestSummary} ${stitchSummary}`\n\n // Make sure we have something to show\n if (requestCount || stitchCount) {\n // The main title for the metaphysics section\n console.groupCollapsed(title, noBold, colorForRequests, noColor)\n\n // Loop through all of the hosts, make a subsection for those\n // and show the raw request obj in-case we add new things to it\n if (requestCount) {\n Object.keys(apis).forEach(host => {\n console.group(host)\n Object.keys(apis[host].requests).forEach(route => {\n console.log(route, apis[host].requests[route])\n })\n console.groupEnd()\n })\n }\n\n // Show stitched queries inline. This will probably need work in\n // the future, because I bet it's ugly.\n\n if (stitchCount) {\n console.group(\"Stitched\")\n Object.keys(stitching.requests).forEach(stitchedSchema => {\n console.log(stitching.requests[stitchedSchema])\n })\n console.groupEnd()\n }\n\n // Wrap up the metaphysics section\n console.groupEnd()\n }\n }\n return res\n })\n }\n}\n"],"file":"metaphysicsExtensionsLoggerMiddleware.js"}
1
+ {"version":3,"sources":["../../../../src/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.ts"],"names":["metaphysicsExtensionsLoggerMiddleware","next","req","then","res","json","extensions","console","groupCollapsed","requests","stitching","stitchCount","Object","keys","length","stitchSummary","apis","requestCount","map","k","reduce","a","c","colorForRequests","noBold","noColor","requestSummary","title","forEach","host","group","route","log","groupEnd","stitchedSchema"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;AAKO,SAASA,qCAAT,GAAiD;AACtD,SAAO,UAAAC,IAAI;AAAA,WAAI,UAAAC,GAAG,EAAI;AACpB,aAAOD,IAAI,CAACC,GAAD,CAAJ,CAAUC,IAAV,CAAe,UAAAC,GAAG,EAAI;AAC3B,YACEA,GAAG,CAACC,IAAJ,CAASC,UAAT,IACAC,OAAO,CAACC,cADR,IAEAJ,GAAG,CAACC,IAAJ,CAASC,UAAT,CAAoBG,QAHtB,EAIE;AACA;AACA,cAAMA,QAAQ,GAAGL,GAAG,CAACC,IAAJ,CAASC,UAAT,CAAoBG,QAArC,CAFA,CAIA;AACA;;AACA,cAAMC,SAAS,GAAGD,QAAQ,CAACC,SAA3B;AACA,cAAMC,WAAW,GAAGD,SAAS,IAAIE,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACD,QAAtB,EAAgCK,MAAjE;AACA,cAAMC,aAAa,GAAGJ,WAAW,aAAMA,WAAN,iBAA+B,EAAhE,CARA,CAUA;AACA;;AACA,cAAMK,IAAI,GAAG,oBAAOP,QAAP,EAAiB,CAAC,WAAD,CAAjB,CAAb;AACA,cA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D,iBAFD;AAGAxB,gBAAAA,OAAO,CAAC0B,QAAR;AACD,eAND;AAOD,aAd8B,CAgB/B;AACA;;;AAEA,gBAAItB,WAAJ,EAAiB;AACfJ,cAAAA,OAAO,CAACuB,KAAR,CAAc,UAAd;AACAlB,cAAAA,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACD,QAAtB,EAAgCmB,OAAhC,CAAwC,UAAAM,cAAc,EAAI;AACxD3B,gBAAAA,OAAO,CAACyB,GAAR,CAAYtB,SAAS,CAACD,QAAV,CAAmByB,cAAnB,CAAZ;AACD,eAFD;AAGA3B,cAAAA,OAAO,CAAC0B,QAAR;AACD,aAzB8B,CA2B/B;;;AACA1B,YAAAA,OAAO,CAAC0B,QAAR;AACD;AACF;;AACD,eAAO7B,GAAP;AACD,OAxEM,CAAP;AAyED,KA1EU;AAAA,GAAX;AA2ED","sourcesContent":["import _ from \"lodash\"\n\n/**\n * This takes the extra extension metadata that staging and dev metaphysics\n * sends about API requests it makes for you, and logs it out during dev\n * time into your console at the same places as the relay queries.\n */\nexport function metaphysicsExtensionsLoggerMiddleware() {\n return next => req => {\n return next(req).then(res => {\n if (\n res.json.extensions &&\n console.groupCollapsed &&\n res.json.extensions.requests\n ) {\n // See: https://github.com/artsy/metaphysics/blob/main/src/lib/loaders/api/extensionsLogger.ts\n const requests = res.json.extensions.requests\n\n // Pull out the stitching logs, e.g. what graphql requests\n // did stitching do for you under the hood\n const stitching = requests.stitching\n const stitchCount = stitching && Object.keys(stitching.requests).length\n const stitchSummary = stitchCount ? `${stitchCount} stitched` : \"\"\n\n // Grab the rest API requests (only ones that use DataLoader)\n // so this is kinda a sub-set but it's more or less everything\n const apis = _.omit(requests, [\"stitching\"])\n const requestCount = Object.keys(apis)\n .map(k => Object.keys(requests[k].requests).length) // API requests\n .reduce((a, c) => a + c, 0) // Add them all up\n\n // Not telling anyone off, but over 15 is probably a point\n // where you want that highlighted.\n const colorForRequests =\n requestCount >= 15 ? \"color: #F1AF1B;\" : \"color: #6E1EFF;\"\n\n // The way the console coloring works is you use %c as an inline span\n // sentinal to correlate style to the next set of characters\n //\n // So we'll need some styles to work with\n const noBold = \"font-weight: normal;\"\n const noColor = \"color: black; font-weight: normal;\"\n const requestSummary = requestCount\n ? `%c ${requestCount} %ccalls` // These need consistent amounts of %c\n : \"%c%c\"\n\n const title = `%cMetaphysics API -${requestSummary} ${stitchSummary}`\n\n // Make sure we have something to show\n if (requestCount || stitchCount) {\n // The main title for the metaphysics section\n console.groupCollapsed(title, noBold, colorForRequests, noColor)\n\n // Loop through all of the hosts, make a subsection for those\n // and show the raw request obj in-case we add new things to it\n if (requestCount) {\n Object.keys(apis).forEach(host => {\n console.group(host)\n Object.keys(apis[host].requests).forEach(route => {\n console.log(route, apis[host].requests[route])\n })\n console.groupEnd()\n })\n }\n\n // Show stitched queries inline. This will probably need work in\n // the future, because I bet it's ugly.\n\n if (stitchCount) {\n console.group(\"Stitched\")\n Object.keys(stitching.requests).forEach(stitchedSchema => {\n console.log(stitching.requests[stitchedSchema])\n })\n console.groupEnd()\n }\n\n // Wrap up the metaphysics section\n console.groupEnd()\n }\n }\n return res\n })\n }\n}\n"],"file":"metaphysicsExtensionsLoggerMiddleware.js"}
@@ -148,7 +148,7 @@ var Img = _styledComponents.default.img.withConfig({
148
148
  var FeatureSplitHeaderContainer = (0, _styledComponents.default)(_palette.Flex).withConfig({
149
149
  displayName: "FeatureSplitHeader__FeatureSplitHeaderContainer",
150
150
  componentId: "sc-1y8c2x0-5"
151
- })(["height:", ";min-height:fit-content;", ";"], function (props) {
151
+ })(["height:", ";overflow:hidden;min-height:fit-content;", ";"], function (props) {
152
152
  return props.hasNav ? "100vh" : "calc(100vh - 61px)";
153
153
  }, function (props) {
154
154
  return !props.hasNav && "\n margin-top: 61px;\n ";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/Components/Publishing/Header/Layouts/Components/FeatureSplitHeader.tsx"],"names":["FeatureSplitHeader","props","article","hero_section","seriesArticle","editImage","url","isVideo","includes","src","length","width","HeaderTextContainer","Box","TextContainer","SubContentContainer","BylineContainer","media","md","Title","FeatureVideo","styled","video","FeatureAssetContainer","ImageContainer","div","Img","img","FeatureSplitHeaderContainer","Flex","hasNav"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAAMA,kBAAiD,GAAG,SAApDA,kBAAoD,CAAAC,KAAK,EAAI;AAAA,uBAIpEA,KAJoE,CAEtEC,OAFsE;AAAA,MAE3DC,YAF2D,kBAE3DA,YAF2D;AAAA,MAE7CC,aAF6C,kBAE7CA,aAF6C;AAAA,MAGtEC,SAHsE,GAIpEJ,KAJoE,CAGtEI,SAHsE;AAMxE,MAAMC,GAAG,GAAIH,YAAY,IAAIA,YAAY,CAACG,GAA9B,IAAsC,EAAlD;AACA,MAAMC,OAAO,GAAGD,GAAG,CAACE,QAAJ,CAAa,KAAb,CAAhB;AACA,MAAMC,GAAG,GAAG,CAACF,OAAD,IAAYD,GAAG,CAACI,MAAhB,IAA0B,qBAAOJ,GAAP,EAAY;AAAEK,IAAAA,KAAK,EAAE;AAAT,GAAZ,CAAtC;AAEA,SACE,6BAAC,2BAAD;AACE,IAAA,MAAM,EAAE,CAACP,aAAa,IAAIC,SAAlB,KAAgC,IAD1C;AAEE,IAAA,cAAc,EAAC,eAFjB;AAGE,IAAA,aAAa,EAAE,CAAC,QAAD,EAAW,QAAX,EAAqB,KAArB,EAA4B,KAA5B;AAHjB,KAKE,6BAAC,mBAAD;AAAqB,IAAA,KAAK,EAAE,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,KAAxB,CAA5B;AAA4D,IAAA,CAAC,EAAE;AAA/D,KACE,6BAAC,wCAAD,EAAyBJ,KAAzB,CADF,CALF,EASE,6BAAC,qBAAD;AACE,IAAA,KAAK,EAAE,CAAC,MAAD,EAAS,MAA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wCAEsBR,KAAK,CAACQ,GAF5B,WADK;AAAA,CADW,EAWhBQ,eAAMC,EAXU,qBAad,UAAAjB,KAAK;AAAA,SACLA,KAAK,CAACQ,GAAN,uEADK;AAAA,CAbS,EAApB;;AAsBA,IAAMiB,GAAG,GAAGL,0BAAOM,GAAV;AAAA;AAAA;AAAA,mBAAT;;AAIO,IAAMC,2BAA2B,GAAG,+BAAOC,aAAP,CAAH;AAAA;AAAA;AAAA,iDAG5B,UAAA5B,KAAK;AAAA,SAAKA,KAAK,CAAC6B,MAAN,GAAe,OAAf,GAAyB,oBAA9B;AAAA,CAHuB,EAMpC,UAAA7B,KAAK;AAAA,SACL,CAACA,KAAK,CAAC6B,MAAP,iCADK;AAAA,CAN+B,CAAjC","sourcesContent":["import { Box, Flex, media, space } from \"@artsy/palette\"\nimport { BylineContainer } from \"Components/Publishing/Byline/Byline\"\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { resize } from \"Utils/resizer\"\nimport { Media } from \"Utils/Responsive\"\nimport { EditImage, FeatureHeaderProps } from \"../FeatureHeader\"\nimport {\n FeatureInnerContent,\n FeatureInnerSubContent,\n SubContentContainer,\n TextContainer,\n Title,\n} from \"./FeatureInnerContent\"\n\nexport const FeatureSplitHeader: React.SFC<FeatureHeaderProps> = props => {\n const {\n article: { hero_section, seriesArticle },\n editImage,\n } = props\n\n const url = (hero_section && hero_section.url) || \"\"\n const isVideo = url.includes(\"mp4\")\n const src = !isVideo && url.length && resize(url, { width: 1600 })\n\n return (\n <FeatureSplitHeaderContainer\n hasNav={(seriesArticle || editImage) && true}\n justifyContent=\"space-between\"\n flexDirection={[\"column\", \"column\", \"row\", \"row\"]}\n >\n <HeaderTextContainer width={[\"100%\", \"100%\", \"50%\", \"50%\"]} p={20}>\n <FeatureInnerContent {...props} />\n </HeaderTextContainer>\n\n <FeatureAssetContainer\n width={[\"100%\", \"100%\", \"50%\", \"50%\"]}\n p={[0, 0, 20, 20]}\n >\n {editImage && <EditImage>{editImage}</EditImage>}\n {isVideo ? (\n <FeatureVideo\n src={url}\n autoPlay\n controls={false}\n loop\n muted\n playsInline\n />\n ) : (\n src && (\n <ImageContainer src={src}>\n <Img src={src} />\n </ImageContainer>\n )\n )}\n </FeatureAssetContainer>\n\n <Media lessThan=\"md\">\n <HeaderTextContainer width=\"100%\" px={20}>\n <FeatureInnerSubContent {...props} />\n </HeaderTextContainer>\n </Media>\n </FeatureSplitHeaderContainer>\n )\n}\n\nconst HeaderTextContainer = styled(Box)`\n ${TextContainer} {\n height: 100%;\n justify-content: space-between;\n }\n\n ${SubContentContainer} {\n display: block;\n }\n\n ${BylineContainer} {\n margin-top: ${space(3)}px;\n }\n\n ${media.md`\n ${Title} {\n margin-bottom: 20px;\n }\n ${TextContainer} {\n ${SubContentContainer} {\n display: none;\n }\n }\n `};\n`\n\nconst FeatureVideo = styled.video`\n width: 100%;\n height: 100%;\n object-fit: cover;\n\n ${media.md`\n height: auto;\n `};\n`\n\nexport const FeatureAssetContainer = styled(Box)`\n flex: 1;\n overflow: hidden;\n position: relative;\n\n img {\n display: none;\n }\n\n ${media.md`\n height: fit-content;\n overflow: inherit;\n\n img {\n display: block;\n }\n `};\n`\n\nconst ImageContainer = styled.div<{ src?: string }>`\n ${props =>\n props.src &&\n `\n background-image: url(${props.src});\n `};\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n height: 100%;\n\n ${media.md`\n height: fit-content;\n ${props =>\n props.src &&\n `\n background-image: none;\n height: fit-content;\n `}\n `};\n`\n\nconst Img = styled.img`\n width: 100%;\n`\n\nexport const FeatureSplitHeaderContainer = styled(Flex)<{\n hasNav?: boolean\n}>`\n height: ${props => (props.hasNav ? \"100vh\" : \"calc(100vh - 61px)\")};\n min-height: fit-content;\n\n ${props =>\n !props.hasNav &&\n `\n margin-top: 61px;\n `};\n`\n"],"file":"FeatureSplitHeader.js"}
1
+ {"version":3,"sources":["../../../../../../src/Components/Publishing/Header/Layouts/Components/FeatureSplitHeader.tsx"],"names":["FeatureSplitHeader","props","article","hero_section","seriesArticle","editImage","url","isVideo","includes","src","length","width","HeaderTextContainer","Box","TextContainer","SubContentContainer","BylineContainer","media","md","Title","FeatureVideo","styled","video","FeatureAssetContainer","ImageContainer","div","Img","img","FeatureSplitHeaderContainer","Flex","hasNav"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAAMA,kBAAiD,GAAG,SAApDA,kBAAoD,CAAAC,KAAK,EAAI;AAAA,uBAIpEA,KAJoE,CAEtEC,OAFsE;AAAA,MAE3DC,YAF2D,kBAE3DA,YAF2D;AAAA,MAE7CC,aAF6C,kBAE7CA,aAF6C;AAAA,MAGtEC,SAHsE,GAIpEJ,KAJoE,CAGtEI,SAHsE;AAMxE,MAAMC,GAAG,GAAIH,YAAY,IAAIA,YAAY,CAACG,GAA9B,IAAsC,EAAlD;AACA,MAAMC,OAAO,GAAGD,GAAG,CAACE,QAAJ,CAAa,KAAb,CAAhB;AACA,MAAMC,GAAG,GAAG,CAACF,OAAD,IAAYD,GAAG,CAACI,MAAhB,IAA0B,qBAAOJ,GAAP,EAAY;AAAEK,IAAAA,KAAK,EAAE;AAAT,GAAZ,CAAtC;AAEA,SACE,6BAAC,2BAAD;AACE,IAAA,MAAM,EAAE,CAACP,aAAa,IAAIC,SAAlB,KAAgC,IAD1C;AAEE,IAAA,cAAc,EAAC,eAFjB;AAGE,IAAA,aAAa,EAAE,CAAC,QAAD,EAAW,QAAX,EAAqB,KAArB,EAA4B,KAA5B;AAHjB,KAKE,6BAAC,mBAAD;AAAqB,IAAA,KAAK,EAAE,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,KAAxB,CAA5B;AAA4D,IAAA,CAAC,EAAE;AAA/D,KACE,6BAAC,wCAAD,EAAyBJ,KAAzB,CADF,CALF,EASE,6BAAC,qBAAD;AACE,IAAA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AK;AAAA,SACLA,KAAK,CAACQ,GAAN,wCAEsBR,KAAK,CAACQ,GAF5B,WADK;AAAA,CADW,EAWhBQ,eAAMC,EAXU,qBAad,UAAAjB,KAAK;AAAA,SACLA,KAAK,CAACQ,GAAN,uEADK;AAAA,CAbS,EAApB;;AAsBA,IAAMiB,GAAG,GAAGL,0BAAOM,GAAV;AAAA;AAAA;AAAA,mBAAT;;AAIO,IAAMC,2BAA2B,GAAG,+BAAOC,aAAP,CAAH;AAAA;AAAA;AAAA,iEAG5B,UAAA5B,KAAK;AAAA,SAAKA,KAAK,CAAC6B,MAAN,GAAe,OAAf,GAAyB,oBAA9B;AAAA,CAHuB,EAOpC,UAAA7B,KAAK;AAAA,SACL,CAACA,KAAK,CAAC6B,MAAP,iCADK;AAAA,CAP+B,CAAjC","sourcesContent":["import { Box, Flex, media, space } from \"@artsy/palette\"\nimport { BylineContainer } from \"Components/Publishing/Byline/Byline\"\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { resize } from \"Utils/resizer\"\nimport { Media } from \"Utils/Responsive\"\nimport { EditImage, FeatureHeaderProps } from \"../FeatureHeader\"\nimport {\n FeatureInnerContent,\n FeatureInnerSubContent,\n SubContentContainer,\n TextContainer,\n Title,\n} from \"./FeatureInnerContent\"\n\nexport const FeatureSplitHeader: React.SFC<FeatureHeaderProps> = props => {\n const {\n article: { hero_section, seriesArticle },\n editImage,\n } = props\n\n const url = (hero_section && hero_section.url) || \"\"\n const isVideo = url.includes(\"mp4\")\n const src = !isVideo && url.length && resize(url, { width: 1600 })\n\n return (\n <FeatureSplitHeaderContainer\n hasNav={(seriesArticle || editImage) && true}\n justifyContent=\"space-between\"\n flexDirection={[\"column\", \"column\", \"row\", \"row\"]}\n >\n <HeaderTextContainer width={[\"100%\", \"100%\", \"50%\", \"50%\"]} p={20}>\n <FeatureInnerContent {...props} />\n </HeaderTextContainer>\n\n <FeatureAssetContainer\n width={[\"100%\", \"100%\", \"50%\", \"50%\"]}\n p={[0, 0, 20, 20]}\n >\n {editImage && <EditImage>{editImage}</EditImage>}\n {isVideo ? (\n <FeatureVideo\n src={url}\n autoPlay\n controls={false}\n loop\n muted\n playsInline\n />\n ) : (\n src && (\n <ImageContainer src={src}>\n <Img src={src} />\n </ImageContainer>\n )\n )}\n </FeatureAssetContainer>\n\n <Media lessThan=\"md\">\n <HeaderTextContainer width=\"100%\" px={20}>\n <FeatureInnerSubContent {...props} />\n </HeaderTextContainer>\n </Media>\n </FeatureSplitHeaderContainer>\n )\n}\n\nconst HeaderTextContainer = styled(Box)`\n ${TextContainer} {\n height: 100%;\n justify-content: space-between;\n }\n\n ${SubContentContainer} {\n display: block;\n }\n\n ${BylineContainer} {\n margin-top: ${space(3)}px;\n }\n\n ${media.md`\n ${Title} {\n margin-bottom: 20px;\n }\n ${TextContainer} {\n ${SubContentContainer} {\n display: none;\n }\n }\n `};\n`\n\nconst FeatureVideo = styled.video`\n width: 100%;\n height: 100%;\n object-fit: cover;\n\n ${media.md`\n height: auto;\n `};\n`\n\nexport const FeatureAssetContainer = styled(Box)`\n flex: 1;\n overflow: hidden;\n position: relative;\n\n img {\n display: none;\n }\n\n ${media.md`\n height: fit-content;\n overflow: inherit;\n\n img {\n display: block;\n }\n `};\n`\n\nconst ImageContainer = styled.div<{ src?: string }>`\n ${props =>\n props.src &&\n `\n background-image: url(${props.src});\n `};\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n height: 100%;\n\n ${media.md`\n height: fit-content;\n ${props =>\n props.src &&\n `\n background-image: none;\n height: fit-content;\n `}\n `};\n`\n\nconst Img = styled.img`\n width: 100%;\n`\n\nexport const FeatureSplitHeaderContainer = styled(Flex)<{\n hasNav?: boolean\n}>`\n height: ${props => (props.hasNav ? \"100vh\" : \"calc(100vh - 61px)\")};\n overflow: hidden;\n min-height: fit-content;\n\n ${props =>\n !props.hasNav &&\n `\n margin-top: 61px;\n `};\n`\n"],"file":"FeatureSplitHeader.js"}
@@ -97,7 +97,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
97
97
 
98
98
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
99
99
 
100
- var BLACKLIST = ["gif", "jpg", "jpeg", "png"];
100
+ var DENYLIST = ["gif", "jpg", "jpeg", "png"];
101
101
  var QUERYSTRING = "?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5";
102
102
  var VIDEO_RATIO = 0.5625;
103
103
  exports.VIDEO_RATIO = VIDEO_RATIO;
@@ -209,7 +209,7 @@ function (_React$Component) {
209
209
 
210
210
  function isValidVideoUrl(url) {
211
211
  var urlExtension = url && url.split(".").pop();
212
- var isValid = BLACKLIST.every(function (bad) {
212
+ var isValid = DENYLIST.every(function (bad) {
213
213
  return urlExtension !== bad;
214
214
  });
215
215
  return isValid;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/Components/Publishing/Sections/Video.tsx"],"names":["BLACKLIST","QUERYSTRING","VIDEO_RATIO","VideoComponent","props","trackingData","dispatch","data","Events","postEvent","url","section","isValid","isValidVideoUrl","parsedUrl","urlParser","parse","playerUrl","getPlayerUrl","id","getId","playerSrc","state","src","hidden","console","error","playVideo","bind","tracking","trackEvent","action","label","setState","trackVideoClick","color","layout","caption","cover_image_url","width","size","showCaption","children","React","Component","x","urlExtension","split","pop","every","bad","hostname","indexOf","pathname","query","v","IFrame","styled","iframe","height","VideoContainer","div","p","breakpoint","md","xs","CoverImage","sizeMeOptions","refreshRate","SIZE_ME_REFRESH_RATE","noPlaceholder","Video"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,CAA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O1C,GAAG,CAAC4C,KAAJ,CAAUC,CAAjB;AACD,KAFD,MAEO;AACL,aAAO7C,GAAG,CAAC2C,QAAJ,CAAaN,KAAb,CAAmB,GAAnB,EAAwBC,GAAxB,EAAP;AACD;AACF,GAND,MAMO;AACL,WAAO,EAAP,CADK,CACK;AACX;AACF,C,CAED;;;AAEO,IAAMQ,MAAM,GAAGC,0BAAOC,MAAV;AAAA;AAAA;AAAA,gCAEP,UAAAtD,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CAFE,CAAZ;;;;AAWP,IAAMC,cAAc,GAAGH,0BAAOI,GAAV;AAAA;AAAA;AAAA,2CAIhB,UAAAC,CAAC,EAAI;AACL,MAAIA,CAAC,CAAC1B,MAAF,KAAa,SAAjB,EAA4B;AAC1B,gJAKI2B,gBAAWC,EALf,4CASID,gBAAWE,EATf;AAcD;AACF,CArBiB,CAApB;;AAwBO,IAAMC,UAAU,GAAGT,0BAAOI,GAAV;AAAA;AAAA;AAAA,2LACV,UAAAzD,KAAK;AAAA,SAAKA,KAAK,CAACoB,MAAN,IAAgB,CAACpB,KAAK,CAACmB,GAAvB,GAA6B,MAA7B,GAAsC,MAA3C;AAAA,CADK,EAKX,UAAAnB,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CALM,EAOH,UAAAvD,KAAK;AAAA,SAAIA,KAAK,CAACmB,GAAN,IAAa,EAAjB;AAAA,CAPF,CAAhB;;;AAYP,IAAM4C,aAAa,GAAG;AACpBC,EAAAA,WAAW,EAAEC,+BADO;AAEpBC,EAAAA,aAAa,EAAE;AAFK,CAAtB;AAKO,IAAMC,KAAK,GAAG,0BAAOJ,aAAP,EAAsBhE,cAAtB,CAAd","sourcesContent":["import React from \"react\"\nimport sizeMe from \"react-sizeme\"\nimport track, { TrackingProp } from \"react-tracking\"\nimport styled from \"styled-components\"\nimport urlParser from \"url\"\nimport Events from \"../../../Utils/Events\"\nimport { resize } from \"../../../Utils/resizer\"\nimport { pMedia as breakpoint } from \"../../Helpers\"\nimport { SIZE_ME_REFRESH_RATE } from \"../Constants\"\nimport { ArticleLayout } from \"../Typings\"\nimport { Caption } from \"./Caption\"\nimport { VideoControls } from \"./VideoControls\"\n\nconst BLACKLIST = [\"gif\", \"jpg\", \"jpeg\", \"png\"]\nconst QUERYSTRING =\n \"?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5\"\nexport const VIDEO_RATIO = 0.5625\n\ninterface VideoProps {\n color?: string\n section: {\n url: string\n caption?: string\n cover_image_url?: string\n }\n size?: any\n tracking?: TrackingProp\n trackingData?: any\n layout?: ArticleLayout\n}\n\ninterface VideoState {\n src?: string // FIXME: Coming from Positron, this can be empty / invalid\n hidden: boolean\n}\n\n@track(\n props => {\n return props.trackingData ? props.trackingData : {}\n },\n {\n dispatch: data => Events.postEvent(data),\n }\n)\nclass VideoComponent extends React.Component<VideoProps, VideoState> {\n static defaultProps = {\n size: {\n width: 500,\n },\n tracking: {\n trackEvent: x => x,\n },\n }\n\n constructor(props) {\n super(props)\n\n const { url } = this.props.section\n const isValid = url && isValidVideoUrl(url)\n\n if (isValid) {\n const parsedUrl = urlParser.parse(url, true)\n const playerUrl = getPlayerUrl(parsedUrl)\n const id = getId(parsedUrl)\n const playerSrc = playerUrl + id + QUERYSTRING\n\n this.state = {\n src: playerSrc,\n hidden: false,\n }\n } else {\n console.error(\n \"(@artsy/reaction) Video.tsx: A url is required for video.\",\n this.props\n )\n\n this.state = {\n hidden: true,\n }\n }\n this.playVideo = this.playVideo.bind(this)\n }\n\n trackVideoClick() {\n this.props.tracking.trackEvent({\n action: \"Click\",\n label: \"Play video\",\n })\n }\n\n playVideo() {\n const playerSrc = this.state.src + \"&autoplay=1\"\n this.setState({ src: playerSrc, hidden: true })\n this.trackVideoClick()\n }\n\n render() {\n const {\n color,\n layout,\n section: { caption, cover_image_url },\n size: { width },\n } = this.props\n const showCaption = layout !== \"feature\"\n\n return (\n <VideoContainer layout={layout} className=\"VideoContainer\">\n {cover_image_url && (\n <CoverImage\n className=\"VideoCover\"\n src={resize(cover_image_url, { width: 1200 })}\n height={width && width * VIDEO_RATIO}\n onClick={this.playVideo}\n hidden={this.state.hidden}\n >\n <VideoControls />\n </CoverImage>\n )}\n\n <IFrame\n src={this.state.src}\n frameBorder=\"0\"\n allowFullScreen\n height={width && width * VIDEO_RATIO}\n />\n\n {showCaption && (\n <Caption caption={caption} layout={layout} color={color}>\n {this.props.children}\n </Caption>\n )}\n </VideoContainer>\n )\n }\n}\n\n// Utils\nexport function isValidVideoUrl(url: string) {\n const urlExtension = url && url.split(\".\").pop()\n const isValid = BLACKLIST.every(bad => urlExtension !== bad)\n return isValid\n}\n\nexport function getPlayerUrl(url) {\n const { hostname } = url\n\n if (hostname) {\n if (hostname.indexOf(\"vimeo.com\") > -1) {\n return \"https://player.vimeo.com/video/\"\n } else if (hostname.indexOf(\"youtu\") > -1) {\n return \"https://www.youtube.com/embed/\"\n }\n } else {\n return \"\" // FIXME: check for errors\n }\n}\n\nfunction getId(url) {\n const { hostname, pathname } = url\n\n if (hostname && pathname) {\n if (url.hostname.indexOf(\"youtube.com\") > 0) {\n return url.query.v\n } else {\n return url.pathname.split(\"/\").pop()\n }\n } else {\n return \"\" // FIXME: error\n }\n}\n\n// Styles\n\nexport const IFrame = styled.iframe`\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n`\n\ninterface CoverImageProps {\n src?: string\n height?: number\n layout?: ArticleLayout\n}\n\nconst VideoContainer = styled.div<CoverImageProps>`\n width: 100%;\n position: relative;\n\n ${p => {\n if (p.layout === \"feature\") {\n return `\n text-align: center;\n padding-bottom: 53px;\n max-width: 1200px;\n margin: 0 auto;\n ${breakpoint.md`\n height: 450px;\n `}\n\n ${breakpoint.xs`\n height: 300px;\n padding-bottom: 20px;\n `}\n `\n }\n }};\n`\n\nexport const CoverImage = styled.div<CoverImageProps>`\n display: ${props => (props.hidden || !props.src ? \"none\" : \"flex\")};\n justify-content: center;\n align-items: center;\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n position: absolute;\n background: url(${props => props.src || \"\"}) no-repeat center center;\n background-size: cover;\n cursor: pointer;\n`\n\nconst sizeMeOptions = {\n refreshRate: SIZE_ME_REFRESH_RATE,\n noPlaceholder: true,\n}\n\nexport const Video = sizeMe(sizeMeOptions)(VideoComponent)\n"],"file":"Video.js"}
1
+ {"version":3,"sources":["../../../../src/Components/Publishing/Sections/Video.tsx"],"names":["DENYLIST","QUERYSTRING","VIDEO_RATIO","VideoComponent","props","trackingData","dispatch","data","Events","postEvent","url","section","isValid","isValidVideoUrl","parsedUrl","urlParser","parse","playerUrl","getPlayerUrl","id","getId","playerSrc","state","src","hidden","console","error","playVideo","bind","tracking","trackEvent","action","label","setState","trackVideoClick","color","layout","caption","cover_image_url","width","size","showCaption","children","React","Component","x","urlExtension","split","pop","every","bad","hostname","indexOf","pathname","query","v","IFrame","styled","iframe","height","VideoContainer","div","p","breakpoint","md","xs","CoverImage","sizeMeOptions","refreshRate","SIZE_ME_REFRESH_RATE","noPlaceholder","Video"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,GAAG,CAAC,KAAD,EAAQ,KAAR,EAAe,MAAf,EAAuB,KAAvB,CAAjB;AACA,IAAMC,WAAW,GACf,iHADF;AAEO,IAAMC,WAAW,GAAG,MAApB;;IA4BDC,c,WARL,4BACC,UAAAC,KAAK,EAAI;AACP,SAAOA,KAAK,CAACC,YAAN,GAAqBD,KAAK,CAACC,YAA3B,GAA0C,EAAjD;AACD,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,0BAAOC,MAAV;AAAA;AAAA;AAAA,gCAEP,UAAAtD,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CAFE,CAAZ;;;;AAWP,IAAMC,cAAc,GAAGH,0BAAOI,GAAV;AAAA;AAAA;AAAA,2CAIhB,UAAAC,CAAC,EAAI;AACL,MAAIA,CAAC,CAAC1B,MAAF,KAAa,SAAjB,EAA4B;AAC1B,gJAKI2B,gBAAWC,EALf,4CASID,gBAAWE,EATf;AAcD;AACF,CArBiB,CAApB;;AAwBO,IAAMC,UAAU,GAAGT,0BAAOI,GAAV;AAAA;AAAA;AAAA,2LACV,UAAAzD,KAAK;AAAA,SAAKA,KAAK,CAACoB,MAAN,IAAgB,CAACpB,KAAK,CAACmB,GAAvB,GAA6B,MAA7B,GAAsC,MAA3C;AAAA,CADK,EAKX,UAAAnB,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CALM,EAOH,UAAAvD,KAAK;AAAA,SAAIA,KAAK,CAACmB,GAAN,IAAa,EAAjB;AAAA,CAPF,CAAhB;;;AAYP,IAAM4C,aAAa,GAAG;AACpBC,EAAAA,WAAW,EAAEC,+BADO;AAEpBC,EAAAA,aAAa,EAAE;AAFK,CAAtB;AAKO,IAAMC,KAAK,GAAG,0BAAOJ,aAAP,EAAsBhE,cAAtB,CAAd","sourcesContent":["import React from \"react\"\nimport sizeMe from \"react-sizeme\"\nimport track, { TrackingProp } from \"react-tracking\"\nimport styled from \"styled-components\"\nimport urlParser from \"url\"\nimport Events from \"../../../Utils/Events\"\nimport { resize } from \"../../../Utils/resizer\"\nimport { pMedia as breakpoint } from \"../../Helpers\"\nimport { SIZE_ME_REFRESH_RATE } from \"../Constants\"\nimport { ArticleLayout } from \"../Typings\"\nimport { Caption } from \"./Caption\"\nimport { VideoControls } from \"./VideoControls\"\n\nconst DENYLIST = [\"gif\", \"jpg\", \"jpeg\", \"png\"]\nconst QUERYSTRING =\n \"?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5\"\nexport const VIDEO_RATIO = 0.5625\n\ninterface VideoProps {\n color?: string\n section: {\n url: string\n caption?: string\n cover_image_url?: string\n }\n size?: any\n tracking?: TrackingProp\n trackingData?: any\n layout?: ArticleLayout\n}\n\ninterface VideoState {\n src?: string // FIXME: Coming from Positron, this can be empty / invalid\n hidden: boolean\n}\n\n@track(\n props => {\n return props.trackingData ? props.trackingData : {}\n },\n {\n dispatch: data => Events.postEvent(data),\n }\n)\nclass VideoComponent extends React.Component<VideoProps, VideoState> {\n static defaultProps = {\n size: {\n width: 500,\n },\n tracking: {\n trackEvent: x => x,\n },\n }\n\n constructor(props) {\n super(props)\n\n const { url } = this.props.section\n const isValid = url && isValidVideoUrl(url)\n\n if (isValid) {\n const parsedUrl = urlParser.parse(url, true)\n const playerUrl = getPlayerUrl(parsedUrl)\n const id = getId(parsedUrl)\n const playerSrc = playerUrl + id + QUERYSTRING\n\n this.state = {\n src: playerSrc,\n hidden: false,\n }\n } else {\n console.error(\n \"(@artsy/reaction) Video.tsx: A url is required for video.\",\n this.props\n )\n\n this.state = {\n hidden: true,\n }\n }\n this.playVideo = this.playVideo.bind(this)\n }\n\n trackVideoClick() {\n this.props.tracking.trackEvent({\n action: \"Click\",\n label: \"Play video\",\n })\n }\n\n playVideo() {\n const playerSrc = this.state.src + \"&autoplay=1\"\n this.setState({ src: playerSrc, hidden: true })\n this.trackVideoClick()\n }\n\n render() {\n const {\n color,\n layout,\n section: { caption, cover_image_url },\n size: { width },\n } = this.props\n const showCaption = layout !== \"feature\"\n\n return (\n <VideoContainer layout={layout} className=\"VideoContainer\">\n {cover_image_url && (\n <CoverImage\n className=\"VideoCover\"\n src={resize(cover_image_url, { width: 1200 })}\n height={width && width * VIDEO_RATIO}\n onClick={this.playVideo}\n hidden={this.state.hidden}\n >\n <VideoControls />\n </CoverImage>\n )}\n\n <IFrame\n src={this.state.src}\n frameBorder=\"0\"\n allowFullScreen\n height={width && width * VIDEO_RATIO}\n />\n\n {showCaption && (\n <Caption caption={caption} layout={layout} color={color}>\n {this.props.children}\n </Caption>\n )}\n </VideoContainer>\n )\n }\n}\n\n// Utils\nexport function isValidVideoUrl(url: string) {\n const urlExtension = url && url.split(\".\").pop()\n const isValid = DENYLIST.every(bad => urlExtension !== bad)\n return isValid\n}\n\nexport function getPlayerUrl(url) {\n const { hostname } = url\n\n if (hostname) {\n if (hostname.indexOf(\"vimeo.com\") > -1) {\n return \"https://player.vimeo.com/video/\"\n } else if (hostname.indexOf(\"youtu\") > -1) {\n return \"https://www.youtube.com/embed/\"\n }\n } else {\n return \"\" // FIXME: check for errors\n }\n}\n\nfunction getId(url) {\n const { hostname, pathname } = url\n\n if (hostname && pathname) {\n if (url.hostname.indexOf(\"youtube.com\") > 0) {\n return url.query.v\n } else {\n return url.pathname.split(\"/\").pop()\n }\n } else {\n return \"\" // FIXME: error\n }\n}\n\n// Styles\n\nexport const IFrame = styled.iframe`\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n`\n\ninterface CoverImageProps {\n src?: string\n height?: number\n layout?: ArticleLayout\n}\n\nconst VideoContainer = styled.div<CoverImageProps>`\n width: 100%;\n position: relative;\n\n ${p => {\n if (p.layout === \"feature\") {\n return `\n text-align: center;\n padding-bottom: 53px;\n max-width: 1200px;\n margin: 0 auto;\n ${breakpoint.md`\n height: 450px;\n `}\n\n ${breakpoint.xs`\n height: 300px;\n padding-bottom: 20px;\n `}\n `\n }\n }};\n`\n\nexport const CoverImage = styled.div<CoverImageProps>`\n display: ${props => (props.hidden || !props.src ? \"none\" : \"flex\")};\n justify-content: center;\n align-items: center;\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n position: absolute;\n background: url(${props => props.src || \"\"}) no-repeat center center;\n background-size: cover;\n cursor: pointer;\n`\n\nconst sizeMeOptions = {\n refreshRate: SIZE_ME_REFRESH_RATE,\n noPlaceholder: true,\n}\n\nexport const Video = sizeMe(sizeMeOptions)(VideoComponent)\n"],"file":"Video.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/reaction",
3
- "version": "29.2.0",
3
+ "version": "29.4.0",
4
4
  "description": "Forceโ€™s React Components",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/artsy/reaction.git",
@@ -32,7 +32,7 @@
32
32
  "prettier-write": "yarn run prettier --write",
33
33
  "relay": "relay-compiler",
34
34
  "release": "auto shipit",
35
- "sync-schema": "curl https://raw.githubusercontent.com/artsy/metaphysics/master/_schemaV2.graphql -o data/schema.graphql; yarn prettier --write --parser graphql data/schema.graphql",
35
+ "sync-schema": "curl https://raw.githubusercontent.com/artsy/metaphysics/main/_schemaV2.graphql -o data/schema.graphql; yarn prettier --write --parser graphql data/schema.graphql",
36
36
  "sync-schema:localhost": "cd ../metaphysics && yarn dump-schema v2 ../reaction/data/",
37
37
  "test": "ALLOW_CONSOLE_LOGS=true jest",
38
38
  "test:watch": "jest --watch --runInBand",
@@ -46,8 +46,8 @@
46
46
  "chokidar": "^3.0.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@artsy/auto-config": "1.0.2",
50
- "@artsy/lint-changed": "3.1.0",
49
+ "@artsy/auto-config": "1.1.0",
50
+ "@artsy/lint-changed": "5.0.2",
51
51
  "@artsy/palette": "13.28.0",
52
52
  "@babel/cli": "7.0.0",
53
53
  "@babel/core": "7.7.2",
@@ -150,7 +150,7 @@
150
150
  "ts-node": "8.2.0",
151
151
  "typescript": "3.8.3",
152
152
  "typescript-styled-plugin": "0.13.0",
153
- "vscode-apollo-relay": "1.5.1",
153
+ "vscode-apollo-relay": "1.5.2",
154
154
  "webpack": "4.29.6",
155
155
  "webpack-bundle-analyzer": "3.4.1",
156
156
  "webpack-merge": "4.1.2",