{"_id":"@washingtonpost/react-diff-viewer","_rev":"373-07d025afd67a0fad0421ca21467b0a3d","name":"@washingtonpost/react-diff-viewer","dist-tags":{"latest":"3.1.2"},"versions":{"3.1.2":{"name":"@washingtonpost/react-diff-viewer","version":"3.1.2","keywords":["review","code-review","diff","diff-viewer","github","react","react-component","ui"],"author":{"name":"Pranesh Ravi","email":"praneshpranesh@gmail.com"},"license":"MIT","_id":"@washingtonpost/react-diff-viewer@3.1.2","maintainers":[{"name":"agillespie","email":"adam.g.tpt@gmail.com"},{"name":"weathergrrl1103","email":"jc.reed@washpost.com"},{"name":"ani512","email":"anirudh.umarji@gmail.com"},{"name":"vonoehsene","email":"elizabeth.vonoehsen@washpost.com"},{"name":"emmakumer","email":"emma.kumer@washpost.com"},{"name":"aggyjlee","email":"agnes.lee@washpost.com"},{"name":"lavanderoi","email":"Isabelle.Lavandero@washpost.com"},{"name":"amyerz","email":"amyerz@gmail.com"},{"name":"emily.eng","email":"eng.emilym@gmail.com"},{"name":"lmelgar","email":"lcmelgar01@gmail.com"},{"name":"sadbumblebee","email":"sadbumblebee@gmail.com"},{"name":"sotojl","email":"jose.soto@washpost.com"},{"name":"janicekchen","email":"janicekchen@gmail.com"},{"name":"jamelhendricks","email":"jamel.hendricks@washpost.com"},{"name":"ryanpicou","email":"ryan.picou@washpost.com"},{"name":"crunchwrap78","email":"hayesapples78@gmail.com"},{"name":"welchk","email":"kyle.welch@washpost.com"},{"name":"val-l-hosler","email":"valerie.hosler@washpost.com"},{"name":"tylrfishr","email":"tyler@tylerjfisher.com"},{"name":"nick.mourtoupalas","email":"nikolas.mourtoupalas@washpost.com"},{"name":"benjaki","email":"benking4@gmail.com"},{"name":"battand","email":"abattaglia@ashlandchicago.com"},{"name":"jon.rosado","email":"jon.rosado@washpost.com"},{"name":"jacknugent27","email":"jack.nugent@washpost.com"},{"name":"walliby","email":"walliby84@gmail.com"},{"name":"asamireissa","email":"ahmed.shehata@washpost.com"},{"name":"courth","email":"courth@washpost.com"},{"name":"nguyenk2","email":"kenny.nguyen@washpost.com"},{"name":"mahig","email":"mahi.gulshan@washpost.com"},{"name":"jchaskell","email":"jhaskell@gmail.com"},{"name":"lorenzog","email":"Gabe.Lorenzo@washpost.com"},{"name":"cohenl","email":"lena.cohen@washpost.com"},{"name":"carlyle","email":"cjlicata@gmail.com"},{"name":"ln-washpost","email":"long.nguyen@washpost.com"},{"name":"chriszs","email":"chriszs@gmail.com"},{"name":"stericson","email":"Stericson.g1@gmail.com"},{"name":"alecredman","email":"alecredman@gmail.com"},{"name":"talpert022","email":"tommy.alpert@washpost.com"},{"name":"gengel","email":"gregory.engel@washpost.com"},{"name":"haileyhaymond","email":"haileyhay3@gmail.com"},{"name":"thomas-corrado","email":"tclax1246@gmail.com"},{"name":"rasengawd","email":"dontae.malone@washpost.com"},{"name":"smurthy221","email":"sidmurthy221@gmail.com"},{"name":"tuckabelle","email":"tucker.harris121@gmail.com"},{"name":"sharmas2","email":"shashank.sharma@washpost.com"},{"name":"aliaelkattan","email":"alia.elkattan@washpost.com"},{"name":"nauticaharvin","email":"nautica.harvin@washpost.com"},{"name":"aadittambe","email":"aadit.tambe@gmail.com"},{"name":"rachelanneorr","email":"rachel.orr@washpost.com"},{"name":"natalievineberg","email":"natalie.vineberg@washpost.com"},{"name":"krbrooks","email":"kathleen.rudell@washpost.com"},{"name":"katty-huertas","email":"katty.huertas@washpost.com"},{"name":"mariaalconadabrooks","email":"maria.alconada-brooks@washpost.com"},{"name":"juniorh28","email":"juniorh2897@gmail.com"},{"name":"atomictangerine","email":"mbeguiluz@gmail.com"},{"name":"emlorraine","email":"emma.baker@washpost.com"},{"name":"helmsc","email":"claire.helms@washpost.com"},{"name":"tritico","email":"matthew.tritico@washpost.com"},{"name":"pranavganore","email":"pranavbganore@gmail.com"},{"name":"danacasidy","email":"danacassidy1@gmail.com"},{"name":"terrywp","email":"terry.chen@washpost.com"},{"name":"ksemanur8","email":"semanur.karayaka@washpost.com"},{"name":"alejandro.resendiz.wp","email":"Alejandro.Resendiz@washpost.com"},{"name":"rwestwapo","email":"Robert.West@washpost.com"},{"name":"thomas-thepost","email":"thomas.chan@washpost.com"},{"name":"dreyvitser","email":"alla.dreyvitser@washpost.com"},{"name":"devinsharpe","email":"Devin.Sharpe@washpost.com"},{"name":"mvonesh","email":"marissa.vonesh@washpost.com"},{"name":"chelseaconrad","email":"chelsea.conrad@washpost.com"},{"name":"arnolda-wp","email":"alexis.arnold@washpost.com"},{"name":"hermionewy","email":"wuyan.sysu@gmail.com"},{"name":"wp-aberg","email":"andrew.berg@washpost.com"},{"name":"sheamus-hei","email":"dean.overflow@gmail.com"},{"name":"haysstephanie","email":"Stephanie.Hays@washpost.com"},{"name":"broadwaterne","email":"Nancy.Broadwater@washpost.com"},{"name":"andrevinc","email":"andrevncnt7@gmail.com"},{"name":"kat-alo","email":"katlyn.alo@washpost.com"},{"name":"daniellersaul","email":"danielle.saul@washpost.com"},{"name":"bantupallik","email":"Kshitij.Bantupalli@washpost.com"},{"name":"unconstruct","email":"victor322@gmail.com"},{"name":"stevefuenteswp","email":"steve.fuentes@washpost.com"},{"name":"bokanm","email":"mikiyas.bokan@washpost.com"},{"name":"rekha26","email":"rekha.tenjarla@gmail.com"},{"name":"marcnahed","email":"marcmnahed@gmail.com"},{"name":"amiemunoz","email":"amarilis.munoz@washpost.com"},{"name":"chloelangston","email":"chloealangston@gmail.com"},{"name":"nmargoliswp","email":"natalia.margolis@washpost.com"},{"name":"martinezy","email":"yoli.martinez@washpost.com"},{"name":"seanwapo","email":"sean.beck@washpost.com"},{"name":"ducroquet","email":"simon.ducroquet@gmail.com"},{"name":"abidis","email":"shajia.abidi@washpost.com"},{"name":"jakekara","email":"jake@jakekara.com"},{"name":"jtotoole","email":"jtotoole@gmail.com"},{"name":"mjperales","email":"mayra.perales@washpost.com"},{"name":"arturgalocha","email":"arturgalocha@gmail.com"},{"name":"ebgranger","email":"edward.granger@washpost.com"},{"name":"christian-wp","email":"christian.stroh@washpost.com"},{"name":"ramyalamati","email":"yvrk99@gmail.com"},{"name":"adamsrobw","email":"adamsrobw@gmail.com"},{"name":"obentham","email":"oliverbentham@gmail.com"},{"name":"luke.connors","email":"luke.connors@gmail.com"},{"name":"wrneff","email":"william.neff@washpost.com"},{"name":"mcdoh","email":"gavinmcdoh@gmail.com"},{"name":"floresa","email":"alanna.flores@washpost.com"},{"name":"taliatrackim","email":"talia.trackim@washpost.com"},{"name":"mirzaa","email":"atthar.mirza@washpost.com"},{"name":"lennybronner","email":"lenny.bronner@gmail.com"},{"name":"bitsoglass","email":"p.elizabeth.m@gmail.com"},{"name":"it_procurement","email":"ITProcurement@washpost.com"},{"name":"erikreyna","email":"erik@erikreyna.com"},{"name":"davidchaiwapo","email":"david.chai@washpost.com"},{"name":"maddoxnelson","email":"maddoxnelson@gmail.com"},{"name":"juliebacon","email":"julie.bacon@washpost.com"},{"name":"stephanie.clark","email":"stephanie.clark@washpost.com"},{"name":"bernertj","email":"Jason.Bernert@washpost.com"},{"name":"simongle","email":"simongle@pm.me"},{"name":"jasonvuong","email":"jason.vuong@washpost.com"},{"name":"andrew.frye","email":"a.frye4@gmail.com"},{"name":"jkoo87","email":"junghoone17@gmail.com"},{"name":"kankelcr","email":"christopher.kankel@washpost.com"},{"name":"erikawhiteshoes","email":"erikawhiteshoes@gmail.com"},{"name":"gregoryauld2014","email":"gregoryauld2014@gmail.com"},{"name":"uncompiled","email":"chris@uncompiled.org"},{"name":"jbrown4","email":"CAVA.JOSHUA@GMAIL.COM"},{"name":"st421","email":"susan.tyler@washpost.com"},{"name":"scarothers","email":"saracarothers@gmail.com"},{"name":"khan.salauddin","email":"khan.salauddin@hotmail.com"},{"name":"rowhawn","email":"rowhawn@gmail.com"},{"name":"subs-npm-builder","email":"andrew.frye@washpost.com"},{"name":"littlemsbozzi","email":"amanda.bozzi@washpost.com"},{"name":"nealhumphreywapo","email":"neal.humphrey@washpost.com"},{"name":"gabrielflorit","email":"gabrielflorit@gmail.com"},{"name":"ashlynstill","email":"ashlyn.still@gmail.com"},{"name":"ptnielsen","email":"ptnielsen55@gmail.com"},{"name":"leslie-s","email":"leslie.shapiro@washpost.com"},{"name":"courtney-kan","email":"courtney.kan@washpost.com"},{"name":"kevin.schaul","email":"kevin.schaul@gmail.com"},{"name":"jakecrump","email":"crumps589@gmail.com"},{"name":"macallah","email":"matthewgcallahan@gmail.com"},{"name":"jmuyskens","email":"jmuyskens@gmail.com"},{"name":"sbanks","email":"skylarcbanks@gmail.com"},{"name":"madisonwalls","email":"madison.walls@washpost.com"},{"name":"brianaa","email":"brian.alfaro@washpost.com"},{"name":"dsantamarina","email":"daniela.santamarina@washpost.com"},{"name":"artmsilva","email":"artmsilva@gmail.com"},{"name":"robpc","email":"developer@robpc.com"},{"name":"ashtol","email":"ashley.tolen@washpost.com"},{"name":"sberhanu","email":"salem.berhanu@washpost.com"},{"name":"joannejoolee","email":"joannejoolee@gmail.com"},{"name":"jjalcantara","email":"jj.alcantara@washpost.com"},{"name":"alyssa.fowers","email":"alyssa.fowers@washpost.com"},{"name":"brmayes","email":"brittany.mayes@washpost.com"},{"name":"joemfox","email":"joe.m.fox@gmail.com"},{"name":"reubenfb","email":"reuben.fischerbaum@gmail.com"},{"name":"calcantara","email":"chris.alcantara@washpost.com"},{"name":"meggonagul","email":"meggonagul@gmail.com"},{"name":"adrianblanco","email":"abrddj@gmail.com"},{"name":"chiquiesteban","email":"chiqui.esteban@washpost.com"},{"name":"iuraizee","email":"iuraizee@gmail.com"},{"name":"bdgross","email":"brian.gross@washpost.com"},{"name":"ulmonica","email":"ulmonica@gmail.com"},{"name":"bmferrill","email":"brandon.ferrill@washpost.com"},{"name":"dankeating","email":"dan.keating@washpost.com"},{"name":"emamd","email":"armand.emamdjomeh@washpost.com"},{"name":"timmeko","email":"tim.meko@washpost.com"},{"name":"kevinuhrmacher","email":"kevin.uhrmacher@gmail.com"},{"name":"shellytan","email":"SHELLYTAN2010@GMAIL.COM"},{"name":"harrystevens","email":"harryjosephstevens@gmail.com"},{"name":"chrisrukan","email":"chris.rukan@washpost.com"},{"name":"allisonnmann","email":"allison.mann@washpost.com"},{"name":"aaronsteckelberg","email":"aaron.steckelberg@washpost.com"},{"name":"shruthagandla","email":"shrutaradhika@gmail.com"},{"name":"braforda","email":"andrew.braford@washpost.com"},{"name":"hannahmahon","email":"hannah.mahon@washpost.com"},{"name":"adityajain15","email":"aditya.jain1993@gmail.com"},{"name":"linorabolini","email":"linorabolini@gmail.com"},{"name":"liue","email":"emily.liu@washpost.com"},{"name":"anthonyjpesce","email":"anthonyjpesce@gmail.com"},{"name":"1313davidlee","email":"1313davidlee@gmail.com"},{"name":"kutyadog","email":"kutyadog@gmail.com"},{"name":"kate.rabinowitz","email":"kate.rabinowitz@washpost.com"},{"name":"fontc","email":"christian.font@washpost.com"},{"name":"cecepascual","email":"cece.pascual@gmail.com"},{"name":"vsingarayar","email":"virginia.singarayar@washpost.com"},{"name":"aramzs","email":"aramzs@hacktext.com"},{"name":"ruxk","email":"kevin.rux@washpost.com"},{"name":"nader_heidari","email":"nader.heidari@washpost.com"},{"name":"thompsond3","email":"daniel.thompson@washpost.com"},{"name":"judesfernando","email":"judesfernando@gmail.com"},{"name":"mlemieuxwp","email":"matthew.lemieux@washpost.com"},{"name":"tylerremmel","email":"tyler.remmel@washpost.com"},{"name":"dwuanjune","email":"dwuan.june@washpost.com"},{"name":"cashack","email":"christine.ashack@washpost.com"},{"name":"clareramirez","email":"clare.ramirez@washpost.com"},{"name":"rcoughlin","email":"ryan.coughlin@washpost.com"},{"name":"tmac0201","email":"tara.mccarty@washpost.com"},{"name":"joemoore-post","email":"joseph.moore@washpost.com"},{"name":"hs4man21","email":"hsforeman98@gmail.com"},{"name":"kamari","email":"kamari.aykes@washpost.com"},{"name":"ealvarez79","email":"ealvarez79@gmail.com"},{"name":"hdormido","email":"hannah.dormido@washpost.com"},{"name":"lobenichou","email":"lobenichou@pm.me"},{"name":"sgpotts","email":"garland.potts@washpost.com"},{"name":"yutaochen","email":"yutaochen95@gmail.com"},{"name":"nwalker_wp","email":"nathan.walker@washpost.com"},{"name":"apbest","email":"apbest@gmail.com"},{"name":"briannaschroer","email":"brianna.schroer@washpost.com"},{"name":"shikha-sub","email":"shikha.subramaniam@washpost.com"},{"name":"naema","email":"naema.ahmed@washpost.com"},{"name":"chloemeister","email":"chloe.meister@washpost.com"},{"name":"julia.ledur","email":"julia.ledurguimaraes@washpost.com"},{"name":"solomonsscott","email":"solomon.s.scott@gmail.com"},{"name":"betchavarria","email":"bettyv.chavarria@gmail.com"},{"name":"eewright","email":"emily.wright@washpost.com"},{"name":"mariaaguilar","email":"mxa1709@miami.edu"},{"name":"nickkirkpatrick","email":"nick.kirkpatrick@washpost.com"},{"name":"trann_wapo","email":"nhi.tran@washpost.com"},{"name":"jlsoto","email":"sotojl374@gmail.com"},{"name":"tobefrankhj","email":"hello@tobefrank.co.uk"},{"name":"tierneyl","email":"lauren.tierney@washpost.com"},{"name":"essiekim","email":"estheryskim@gmail.com"},{"name":"styonsk","email":"styonsk@gmail.com"},{"name":"sergio.pecanha","email":"sergio.pecanha@washpost.com"},{"name":"meganwalter","email":"megan.elizabeth.walter@gmail.com"},{"name":"alyssabartuch","email":"alyssabartuch@gmail.com"},{"name":"alexisbarnes","email":"alexis.barnes@washpost.com"},{"name":"cullenrombach","email":"cullen.rombach@washpost.com"},{"name":"foggva","email":"victoria.fogg@washpost.com"},{"name":"dmoriarty6","email":"dylan.moriarty@washpost.com"},{"name":"mokhtar.ali","email":"JoeMokhtarAli@gmail.com"},{"name":"dpham5","email":"david.pham@washpost.com"},{"name":"klimenkovd","email":"dennis.klimenkov@washpost.com"},{"name":"davisshaver","email":"davisshaver@gmail.com"},{"name":"aaronbrezel","email":"aaron.brezel@washpost.com"},{"name":"moodypaige.e","email":"moodypaige.e@gmail.com"},{"name":"caveat","email":"kavya.sukumar@gmail.com"},{"name":"kastningj","email":"jennifer.kastning@washpost.com"},{"name":"freedmand","email":"freedmand@gmail.com"},{"name":"washpostdavis","email":"Davis.Shaver@washpost.com"}],"homepage":"https://github.com/praneshr/react-diff-viewer#readme","bugs":{"url":"https://github.com/praneshr/react-diff-viewer/issues"},"dist":{"shasum":"48cad3c01269277ea4cc0d76a2d8538470bf2694","tarball":"https://registry.npmjs.org/@washingtonpost/react-diff-viewer/-/react-diff-viewer-3.1.2.tgz","fileCount":19,"integrity":"sha512-W9NNwuUpCN+WUABcRkE8vs6ud1R1uHY9eSfZQViIloHN/W1QKT97L1oYBBoORoZ7hja0iWNVdZ6eFXINKnAFcA==","signatures":[{"sig":"MEQCIFecFxgBh/QU4aqxwQVMAAJ6//Lq6kr8EcqIL9k4ht2zAiBnxLh2gpBOgTr6r4jXjX4kyxvVp1+mAha9yp+OYk4eAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMvDzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopQA//dvCP0iqZb3TRfBp563Ji/4rimHUuBtZN/7ZoxJbRwM3Qwo1t\r\n7yQZd68TSNCWQRQwvk02vEYmm598UqkPb9MZQ+aCB/3iZz0S+AgSfNC+LMgN\r\n4D5J3gLFpRFKIwZ43QQVK/GGpQCUJS0XDx103gIH6vkzLMW2Ri6BX8vk/YU/\r\nBIVAaN6rDBV9hUXTOql249BM+bU87XEDpp5Cj6WJ48T0kiGf4qqoC/R7RpCL\r\nI4lhGC13mj88+j9WILVH7bQE/mv9oLiUE1TJw3jd+fjuD56ewt+TVhtOUIjK\r\nXWhdps7eu+xcOVr2yy2ZklJ4AWpwLxBP7gZVY/BNBvVSHWtfmgQ0sT4oLmJ8\r\n2D2MmSzhWvIhVZeeRE+PcshJPZBWvDDxbAw4n9V9h0rO91L389qufhnkByO5\r\n0aOF4f2ZcZkqIIRyf1MF0g9LRVw1RCDgqVRZxpm24ZInFf6XoXyJBDSrYQGM\r\n47EqyWgCUwmjek76PIQp0K6hhj0COLFXgzHrhljLWs1ezxojke+YVfLbbG+C\r\n8TVdPbEdZ/mRUff7+kN+M9PhWnmpnUZ2Udxifz9m7FFfWqfe4jZiVMsnN1t1\r\nAjIQK+lq1gxv184RA+7hNoNex8wTN9jmx0QbJdJJrzwi3XvepeRa4KFrlBx2\r\nBxiWhovJmDsW/2vkkvuUkr3MsI0yrCJ3Q0s=\r\n=+2i5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index","engines":{"node":">= 8"},"gitHead":"a50a6e49c40d7f05bdb93fce78b38ebb256ce37e","private":false,"scripts":{"test":"mocha --require ts-node/register --require enzyme.ts ./test/**","build":"tsc --outDir lib/","test:watch":"mocha --require ts-node/register --require enzyme.ts --watch-extensions ts,tsx --watch ./test/**","build:watch":"tsc --outDir lib/ -w","build:examples":"webpack --progress --colors","start:examples":"webpack-dev-server --open --hot --inline","publish:examples":"NODE_ENV=production yarn build:examples && gh-pages -d examples/dist -r $GITHUB_REPO_URL","publish:examples:local":"NODE_ENV=production yarn build:examples && gh-pages -d examples/dist"},"typings":"lib/index","_npmUser":{"name":"ani512","email":"anirudh.umarji@gmail.com"},"repository":{"url":"git+ssh://git@github.com/praneshr/react-diff-viewer.git","type":"git"},"_npmVersion":"8.15.0","description":"A simple and beautiful text diff viewer component made with diff and React","directories":{},"_nodeVersion":"16.17.0","dependencies":{"diff":"^4.0.1","emotion":"^10.0.14","classnames":"^2.2.6","prop-types":"^15.6.2","memoize-one":"^5.0.4","create-emotion":"^10.0.14"},"_hasShrinkwrap":false,"devDependencies":{"spy":"^1.0.0","mocha":"^6.1.4","react":"^16.5.2","enzyme":"^3.7.0","eslint":"6.0.1","expect":"^24.8.0","ts-node":"^8.3.0","webpack":"^4.20.2","gh-pages":"^2.0.1","node-sass":"^7.0.0","react-dom":"^16.5.2","ts-loader":"^6.0.4","css-loader":"^3.0.0","raw-loader":"^3.0.0","typescript":"^3.5.2","@types/diff":"^4.0.2","@types/node":"^12.0.12","file-loader":"^4.0.0","sass-loader":"^7.1.0","webpack-cli":"^3.1.1","@types/mocha":"^5.2.5","@types/react":"^16.4.14","@types/enzyme":"^3.1.14","@types/expect":"^1.20.3","@types/webpack":"^4.4.13","@types/react-dom":"^16.0.8","@types/classnames":"^2.2.6","@types/memoize-one":"^4.1.1","webpack-dev-server":"^3.1.9","eslint-plugin-react":"^7.14.2","html-webpack-plugin":"^3.2.0","eslint-config-airbnb":"17.1.1","eslint-plugin-import":"^2.18.0","eslint-plugin-jsx-a11y":"^6.2.3","enzyme-adapter-react-16":"^1.6.0","favicons-webpack-plugin":"^0.0.9","mini-css-extract-plugin":"^0.7.0","@typescript-eslint/parser":"^1.11.0","@types/enzyme-adapter-react-16":"^1.0.3","@typescript-eslint/eslint-plugin":"^1.11.0"},"peerDependencies":{"react":"^15.3.0 || ^16.0.0 || ^17.0.0","react-dom":"^15.3.0 || ^16.0.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-diff-viewer_3.1.2_1664282867720_0.09989634050513141","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-09-27T12:47:47.719Z","modified":"2026-09-16T19:55:59.878Z","3.1.2":"2022-09-27T12:47:47.892Z"},"bugs":{"url":"https://github.com/praneshr/react-diff-viewer/issues"},"author":{"name":"Pranesh Ravi","email":"praneshpranesh@gmail.com"},"license":"MIT","homepage":"https://github.com/praneshr/react-diff-viewer#readme","keywords":["review","code-review","diff","diff-viewer","github","react","react-component","ui"],"repository":{"url":"git+ssh://git@github.com/praneshr/react-diff-viewer.git","type":"git"},"description":"A simple and beautiful text diff viewer component made with diff and React","maintainers":[{"email":"luke.connors@gmail.com","name":"luke.connors"},{"email":"alanna.flores@washpost.com","name":"floresa"},{"email":"Isabelle.Lavandero@washpost.com","name":"lavanderoi"},{"email":"tomkachun.zhang@washpost.com","name":"tomkaz-wapo"},{"email":"anirudh.umarji@gmail.com","name":"ani512"},{"email":"miguel.hernandez@wizeline.com","name":"jorgemhc-dev"},{"email":"chloe.coleman@washpost.com","name":"colemanc4"},{"email":"maddoxnelson@gmail.com","name":"maddoxnelson"},{"email":"junghoone17@gmail.com","name":"jkoo87"},{"email":"gregoryauld2014@gmail.com","name":"gregoryauld2014"},{"email":"CAVA.JOSHUA@GMAIL.COM","name":"jbrown4"},{"email":"khan.salauddin@hotmail.com","name":"khan.salauddin"},{"email":"subscriptionsfe@washpost.com","name":"subs-npm-builder"},{"email":"ptnielsen55@gmail.com","name":"ptnielsen"},{"email":"leslie.shapiro@washpost.com","name":"leslie-s"},{"email":"kevin.schaul@gmail.com","name":"kevin.schaul"},{"email":"crumps589@gmail.com","name":"jakecrump"},{"email":"matthewgcallahan@gmail.com","name":"macallah"},{"email":"jmuyskens@gmail.com","name":"jmuyskens"},{"email":"daniela.santamarina@washpost.com","name":"dsantamarina"},{"email":"ashley.tolen@washpost.com","name":"ashtol"},{"email":"salem.berhanu@washpost.com","name":"sberhanu"},{"email":"jj.alcantara@washpost.com","name":"jjalcantara"},{"email":"joe.m.fox@gmail.com","name":"joemfox"},{"email":"allison.mann@washpost.com","name":"allisonnmann"},{"email":"aaron.steckelberg@washpost.com","name":"aaronsteckelberg"},{"email":"fernando.gg@wizeline.com","name":"fernandowz"},{"email":"linorabolini@gmail.com","name":"linorabolini"},{"email":"virginia.singarayar@washpost.com","name":"vsingarayar"},{"email":"aramzs@hacktext.com","name":"aramzs"},{"email":"tyler.remmel@washpost.com","name":"tylerremmel"},{"email":"yutaochen95@gmail.com","name":"yutaochen"},{"email":"naema.ahmed@washpost.com","name":"naema"},{"email":"chloe.meister@washpost.com","name":"chloemeister"},{"email":"julia.ledurguimaraes@washpost.com","name":"julia.ledur"},{"email":"bettyv.chavarria@gmail.com","name":"betchavarria"},{"email":"nick.kirkpatrick@washpost.com","name":"nickkirkpatrick"},{"email":"megan.elizabeth.walter@gmail.com","name":"meganwalter"},{"email":"alexis.barnes@washpost.com","name":"alexisbarnes"},{"email":"karensiqiwang@gmail.com","name":"karenwang"},{"email":"dylan.moriarty@washpost.com","name":"dmoriarty6"},{"email":"davisshaver@gmail.com","name":"davisshaver"},{"email":"ahmed.shehata@washpost.com","name":"asamireissa"},{"email":"jennifer.kastning@washpost.com","name":"kastningj"},{"email":"pranavbganore@gmail.com","name":"pranavganore"},{"email":"wuyan.sysu@gmail.com","name":"hermionewy"},{"email":"shrddhathakker@gmail.com","name":"shrddhawashpost"},{"email":"alla.dreyvitser@washpost.com","name":"dreyvitser"},{"email":"adamsrobw@gmail.com","name":"adamsrobw"},{"email":"yvrk99@gmail.com","name":"ramyalamati"},{"email":"Nancy.Broadwater@washpost.com","name":"broadwaterne"},{"email":"Stephanie.Hays@washpost.com","name":"haysstephanie"},{"email":"steven.pelley@washpost.com","name":"pelleys"},{"email":"tim.borisenko@washpost.com","name":"timborisenko"},{"email":"matthew.tritico@washpost.com","name":"tritico"},{"email":"luis.melgar@washpost.com","name":"lmelgar"},{"email":"katty.huertas@washpost.com","name":"katty-huertas"},{"email":"natalie.vineberg@washpost.com","name":"natalievineberg"},{"email":"aadit.tambe@gmail.com","name":"aadittambe"},{"email":"angad.matharoo@washpost.com","name":"matharooa"},{"email":"tucker.harris121@gmail.com","name":"tuckabelle"},{"email":"eng.emilym@gmail.com","name":"emily.eng"},{"email":"laura.padillacastellanos@washpost.com","name":"lpadillac4s"},{"email":"gregory.engel@washpost.com","name":"gengel"},{"email":"Stericson.g1@gmail.com","name":"stericson"},{"email":"harman.dhillon@washpost.com","name":"harmanwapo"},{"email":"jose.soto@washpost.com","name":"sotojl"},{"email":"carlos.gomez@washpost.com","name":"cagh_wapo"},{"email":"joey.marburger@washpost.com","name":"josephjames"},{"email":"alvaro.rodriguez@washpost.com","name":"alvaror2w"},{"email":"andrade8a@gmail.com","name":"clau8a"},{"email":"twila.waddy@washpost.com","name":"tawaddy"},{"email":"ernesto.lopezmoreno@washpost.com","name":"netolm-wp"},{"email":"tiara.allidina@washpost.com","name":"allidinat"},{"email":"giomar.osorio@wizeline.com","name":"giomarwize"},{"email":"vidya.viswanathan@washpost.com","name":"vviswa"},{"email":"christine.ashack@washpost.com","name":"cashack"},{"email":"dhruvparmar91@gmail.com","name":"dnparmar"},{"email":"malocuevi@gmail.com","name":"malocuevi"},{"email":"ericlau@umich.edu","name":"ericlau"},{"email":"randhir.kumar@washpost.com","name":"rrandhirr"},{"email":"joshhoegen@gmail.com","name":"joshhoegen"},{"email":"klara.auerbach@washpost.com","name":"klaraauerbach"},{"email":"natalievineberg@gmail.com","name":"natalieavineberg"},{"email":"developerdiego0@gmail.com","name":"diegodisant"},{"email":"fransandi@gmail.com","name":"fransandi"},{"email":"zhoyoyo@hotmail.com","name":"zhoyoyo"},{"email":"chakravarthy.garimella@washpost.com","name":"cgarimella_npm"},{"email":"ivladimirjuarez@outlook.com","name":"vladimirjv"},{"email":"saradvr@outlook.com","name":"saradvr"},{"email":"maureen.linke@washpost.com","name":"maureenlinke"},{"email":"srinivasan.gopalaswamy@washpost.com","name":"gopalaswamys"},{"email":"linh.nguyen2@washpost.com","name":"linh-nguyen-wapo"},{"email":"hoang.tran@washpost.com","name":"hoang-tran-washpost"},{"email":"jose.castrejon@washpost.com","name":"josecastrejon-wp"},{"email":"jordan.lindo@washpost.com","name":"lindoj"},{"email":"clarelynne.ramirez@washpost.com","name":"clarelynne.ramirez"},{"email":"tristan.soliven@washpost.com","name":"tristansoliven"},{"email":"ramcharan.suresh@washpost.com","name":"ramcharan-wp"},{"email":"rafael.olivas@washpost.com","name":"rafael.olivas.wapo"},{"email":"sang.han@washpost.com","name":"sangkyunhan"},{"email":"kevin.benavente@washpost.com","name":"kbenavente-washpost"},{"email":"duong.le@washpost.com","name":"duongatwp"},{"email":"ryan.asher@washpost.com","name":"ryandasher"},{"email":"hauph@hotmail.com","name":"howfam"},{"email":"jyothi.kanta@washpost.com","name":"kantaj"},{"email":"adam.bartkowiak@washpost.com","name":"abar3"},{"email":"kadar.hall@washpost.com","name":"wapokadar"},{"email":"matthew.fusco@washpost.com","name":"matthewfusco"},{"email":"michelle.kondrich@washpost.com","name":"mkondrich"},{"email":"a.frye4@gmail.com","name":"andrew.frye"},{"email":"anil.talaharla@washpost.com","name":"anil-talaharla"},{"email":"matthew.nelson@washpost.com","name":"svcgithubcreatorxp"},{"email":"svcSiteEngineeringFE@washpost.com","name":"wapo_svc_site_eng_fe"},{"email":"joseph.tuffnell@washpost.com","name":"tuffnellj"},{"email":"nandini.sen@washpost.com","name":"nandini-sen"},{"email":"junedd@washpost.com","name":"junedwuan"},{"email":"manuel.curiel@washpost.com","name":"manuel-curiel"},{"email":"meghan.hoyer@washpost.com","name":"meghanhoyer"},{"email":"Daniel.Ospina@washpost.com","name":"ospinad-wapo"},{"email":"jade.gregoire2021@gmail.com","name":"leafyjade"},{"email":"daniel.zapata@washpost.com","name":"danizagra-wapo"},{"email":"matt.jakes@washpost.com","name":"mjakes-wp"},{"email":"jatin.mistry@washpost.com","name":"jmistry-washpost"}],"readme":"\n<p align=\"center\">\n  <img src='https://i.ibb.co/DKrGhVQ/Frame-1-1.png' width=\"100%\" alt='React Diff Viewer' />\n</p>\n<br/>\n\n[![Build Status](https://travis-ci.com/praneshr/react-diff-viewer.svg?branch=master)](https://travis-ci.com/praneshr/react-diff-viewer)\n[![npm version](https://badge.fury.io/js/react-diff-viewer.svg)](https://badge.fury.io/js/react-diff-viewer)\n[![GitHub license](https://img.shields.io/github/license/praneshr/react-diff-viewer.svg)](https://github.com/praneshr/react-diff-viewer/blob/master/LICENSE)\n\nA simple and beautiful text diff viewer component made with [Diff](https://github.com/kpdecker/jsdiff) and [React](https://reactjs.org).\n\nInspired from Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.\n\nCheck [here](https://github.com/praneshr/react-diff-viewer/tree/v2.0) for v2.0\n\n## Install\n\n```bash\nyarn add react-diff-viewer\n\n# or\n\nnpm i react-diff-viewer\n```\n\n## Usage\n\n```javascript\nimport React, { PureComponent } from 'react';\nimport ReactDiffViewer from 'react-diff-viewer';\n\nconst oldCode = `\nconst a = 10\nconst b = 10\nconst c = () => console.log('foo')\n\nif(a > 10) {\n  console.log('bar')\n}\n\nconsole.log('done')\n`;\nconst newCode = `\nconst a = 10\nconst boo = 10\n\nif(a === 10) {\n  console.log('bar')\n}\n`;\n\nclass Diff extends PureComponent {\n  render = () => {\n    return (\n      <ReactDiffViewer oldValue={oldCode} newValue={newCode} splitView={true} />\n    );\n  };\n}\n```\n\n## Props\n\n| Prop                      | Type            | Default                        | Description                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ------------------------- | --------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| oldValue                  | `string`        | `''`                           | Old value as string.                                                                                                                                                                                                                                                                                                                                                                                             |\n| newValue                  | `string`        | `''`                           | New value as string.                                                                                                                                                                                                                                                                                                                                                                                             |\n| splitView                 | `boolean`       | `true`                         | Switch between `unified` and `split` view.                                                                                                                                                                                                                                                                                                                                                                       |\n| disableWordDiff           | `boolean`       | `false`                        | Show and hide word diff in a diff line.                                                                                                                                                                                                                                                                                                                                                                          |\n| compareMethod             | `DiffMethod`    | `DiffMethod.CHARS`             | JsDiff text diff method used for diffing strings. Check out the [guide](https://github.com/praneshr/react-diff-viewer/tree/v3.0.0#text-block-diff-comparison) to use different methods.                                                                                                                                                                                                                          |\n| hideLineNumbers           | `boolean`       | `false`                        | Show and hide line numbers.                                                                                                                                                                                                                                                                                                                                                                                      |\n| renderContent             | `function`      | `undefined`                    | Render Prop API to render code in the diff viewer. Helpful for [syntax highlighting](#syntax-highlighting)                                                                                                                                                                                                                                                                                                       |\n| onLineNumberClick         | `function`      | `undefined`                    | Event handler for line number click. `(lineId: string) => void`                                                                                                                                                                                                                                                                                                                                                  |\n| highlightLines            | `array[string]` | `[]`                           | List of lines to be highlighted. Works together with `onLineNumberClick`. Line number are prefixed with `L` and `R` for the left and right section of the diff viewer, respectively. For example, `L-20` means 20th line in the left pane. To highlight a range of line numbers, pass the prefixed line number as an array. For example, `[L-2, L-3, L-4, L-5]` will highlight the lines `2-5` in the left pane. |\n| showDiffOnly              | `boolean`       | `true`                         | Shows only the diffed lines and folds the unchanged lines                                                                                                                                                                                                                                                                                                                                                        |\n| extraLinesSurroundingDiff | `number`        | `3`                            | Number of extra unchanged lines surrounding the diff. Works along with `showDiffOnly`.                                                                                                                                                                                                                                                                                                                           |\n| codeFoldMessageRenderer   | `function`      | `Expand {number} of lines ...` | Render Prop API to render code fold message.                                                                                                                                                                                                                                                                                                                                                                     |\n| styles                    | `object`        | `{}`                           | To override style variables and styles. Learn more about [overriding styles](#overriding-styles)                                                                                                                                                                                                                                                                                                                 |\n| useDarkTheme              | `boolean`       | `true`                         | To enable/disable dark theme.                                                                                                                                                                                                                                                                                                                                                                                    |\n| leftTitle                 | `string`        | `undefined`                    | Column title for left section of the diff in split view. This will be used as the only title in inline view.                                                                                                                                                                                                                                                                                                     |\n| rightTitle                | `string`        | `undefined`                    | Column title for right section of the diff in split view. This will be ignored in inline view.                                                                                                                                                                                                                                                                                                                   |\n| linesOffset               | `number`        | `0`                            | Number to start count code lines from.                                                                                                                                                                                                                                                                                                                                                                           |\n\n## Instance Methods\n\n`resetCodeBlocks()` - Resets the expanded code blocks to it's initial state. Return `true` on successful reset and `false` during unsuccessful reset.\n\n## Syntax Highlighting\n\nSyntax highlighting is a bit tricky when combined with diff. Here, React Diff Viewer provides a simple render prop API to handle syntax highlighting. Use `renderContent(content: string) => JSX.Element` and your favorite syntax highlighting library to achieve this.\n\nAn example using [Prism JS](https://prismjs.com)\n\n```html\n// Load Prism CSS\n<link\n  href=\"https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.css\"\n/>\n\n// Load Prism JS\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.js\"></script>\n```\n\n```javascript\nimport React, { PureComponent } from 'react';\nimport ReactDiffViewer from 'react-diff-viewer';\n\nconst oldCode = `\nconst a = 10\nconst b = 10\nconst c = () => console.log('foo')\n\nif(a > 10) {\n  console.log('bar')\n}\n\nconsole.log('done')\n`;\nconst newCode = `\nconst a = 10\nconst boo = 10\n\nif(a === 10) {\n  console.log('bar')\n}\n`;\n\nclass Diff extends PureComponent {\n  highlightSyntax = str => (\n    <pre\n      style={{ display: 'inline' }}\n      dangerouslySetInnerHTML={{\n        __html: Prism.highlight(str, Prism.languages.javascript),\n      }}\n    />\n  );\n\n  render = () => {\n    return (\n      <ReactDiffViewer\n        oldValue={oldCode}\n        newValue={newCode}\n        splitView={true}\n        renderContent={this.highlightSyntax}\n      />\n    );\n  };\n}\n```\n\n## Text block diff comparison\n\nDifferent styles of text block diffing are possible by using the enums corresponding to variou JsDiff methods ([learn more](https://github.com/kpdecker/jsdiff/tree/v4.0.1#api)). The supported methods are as follows.\n\n```javascript\nenum DiffMethod {\n  CHARS = 'diffChars',\n  WORDS = 'diffWords',\n  WORDS_WITH_SPACE = 'diffWordsWithSpace',\n  LINES = 'diffLines',\n  TRIMMED_LINES = 'diffTrimmedLines',\n  SENTENCES = 'diffSentences',\n  CSS = 'diffCss',\n}\n```\n\n```javascript\nimport React, { PureComponent } from 'react';\nimport ReactDiffViewer, { DiffMethod } from 'react-diff-viewer';\n\nconst oldCode = `\n{\n  \"name\": \"Original name\",\n  \"description\": null\n}\n`;\nconst newCode = `\n{\n  \"name\": \"My updated name\",\n  \"description\": \"Brand new description\",\n  \"status\": \"running\"\n}\n`;\n\nclass Diff extends PureComponent {\n  render = () => {\n    return (\n      <ReactDiffViewer\n        oldValue={oldCode}\n        newValue={newCode}\n        compareMethod={DiffMethod.WORDS}\n        splitView={true}\n      />\n    );\n  };\n}\n```\n\n## Overriding Styles\n\nReact Diff Viewer uses [emotion](https://emotion.sh/) for styling. It also offers a simple way to override styles and style variables. You can supply different variables for both light and dark themes. Styles will be common for both themes.\n\nBelow are the default style variables and style object keys.\n\n```javascript\n\n// Default variables and style keys\n\nconst defaultStyles = {\n  variables: {\n    light: {\n      diffViewerBackground: '#fff',\n      diffViewerColor: '#212529',\n      addedBackground: '#e6ffed',\n      addedColor: '#24292e',\n      removedBackground: '#ffeef0',\n      removedColor: '#24292e',\n      wordAddedBackground: '#acf2bd',\n      wordRemovedBackground: '#fdb8c0',\n      addedGutterBackground: '#cdffd8',\n      removedGutterBackground: '#ffdce0',\n      gutterBackground: '#f7f7f7',\n      gutterBackgroundDark: '#f3f1f1',\n      highlightBackground: '#fffbdd',\n      highlightGutterBackground: '#fff5b1',\n      codeFoldGutterBackground: '#dbedff',\n      codeFoldBackground: '#f1f8ff',\n      emptyLineBackground: '#fafbfc',\n      gutterColor: '#212529',\n      addedGutterColor: '#212529',\n      removedGutterColor: '#212529',\n      codeFoldContentColor: '#212529',\n      diffViewerTitleBackground: '#fafbfc',\n      diffViewerTitleColor: '#212529',\n      diffViewerTitleBorderColor: '#eee',\n    },\n    dark: {\n      diffViewerBackground: '#2e303c',\n      diffViewerColor: '#FFF',\n      addedBackground: '#044B53',\n      addedColor: 'white',\n      removedBackground: '#632F34',\n      removedColor: 'white',\n      wordAddedBackground: '#055d67',\n      wordRemovedBackground: '#7d383f',\n      addedGutterBackground: '#034148',\n      removedGutterBackground: '#632b30',\n      gutterBackground: '#2c2f3a',\n      gutterBackgroundDark: '#262933',\n      highlightBackground: '#2a3967',\n      highlightGutterBackground: '#2d4077',\n      codeFoldGutterBackground: '#21232b',\n      codeFoldBackground: '#262831',\n      emptyLineBackground: '#363946',\n      gutterColor: '#464c67',\n      addedGutterColor: '#8c8c8c',\n      removedGutterColor: '#8c8c8c',\n      codeFoldContentColor: '#555a7b',\n      diffViewerTitleBackground: '#2f323e',\n      diffViewerTitleColor: '#555a7b',\n      diffViewerTitleBorderColor: '#353846',\n    }\n  },\n  diffContainer?: {}, // style object\n  diffRemoved?: {}, // style object\n  diffAdded?: {}, // style object\n  marker?: {}, // style object\n  emptyGutter?: {}, // style object\n  highlightedLine?: {}, // style object\n  lineNumber?: {}, // style object\n  highlightedGutter?: {}, // style object\n  contentText?: {}, // style object\n  gutter?: {}, // style object\n  line?: {}, // style object\n  wordDiff?: {}, // style object\n  wordAdded?: {}, // style object\n  wordRemoved?: {}, // style object\n  codeFoldGutter?: {}, // style object\n  codeFold?: {}, // style object\n  emptyLine?: {}, // style object\n  content?: {}, // style object\n  titleBlock?: {}, // style object\n  splitView?: {}, // style object\n}\n```\n\nTo override any style, just pass the new style object to the `styles` prop. New style will be computed using `Object.assign(default, override)`.\n\nFor keys other than `variables`, the value can either be an object or string interpolation.\n\n```javascript\nimport React, { PureComponent } from 'react';\nimport ReactDiffViewer from 'react-diff-viewer';\n\nconst oldCode = `\nconst a = 10\nconst b = 10\nconst c = () => console.log('foo')\n\nif(a > 10) {\n  console.log('bar')\n}\n\nconsole.log('done')\n`;\nconst newCode = `\nconst a = 10\nconst boo = 10\n\nif(a === 10) {\n  console.log('bar')\n}\n`;\n\nclass Diff extends PureComponent {\n  highlightSyntax = str => (\n    <span\n      style={{ display: 'inline' }}\n      dangerouslySetInnerHTML={{\n        __html: Prism.highlight(str, Prism.languages.javascript),\n      }}\n    />\n  );\n\n  render = () => {\n    const newStyles = {\n      variables: {\n        dark: {\n          highlightBackground: '#fefed5',\n          highlightGutterBackground: '#ffcd3c',\n        },\n      },\n      line: {\n        padding: '10px 2px',\n        '&:hover': {\n          background: '#a26ea1',\n        },\n      },\n    };\n\n    return (\n      <ReactDiffViewer\n        styles={newStyles}\n        oldValue={oldCode}\n        newValue={newCode}\n        splitView={true}\n        renderContent={this.highlightSyntax}\n      />\n    );\n  };\n}\n```\n\n## Local Development\n\n```bash\nyarn install\nyarn build # or use yarn build:watch\nyarn start:examples\n```\n\nCheck package.json for more build scripts.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}