Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: netlify-labs/react-netlify-identity-widget
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.19
Choose a base ref
...
head repository: netlify-labs/react-netlify-identity-widget
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.20
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Apr 29, 2019

  1. use code splitting

    sw-yx committed Apr 29, 2019
    Copy the full SHA
    93e2a51 View commit details
  2. 0.0.20

    sw-yx committed Apr 29, 2019
    Copy the full SHA
    e8cd070 View commit details
Showing with 141 additions and 25 deletions.
  1. +18 −18 .size-snapshot.json
  2. +6 −0 CHANGELOG.md
  3. +109 −3 example/yarn.lock
  4. +1 −1 package.json
  5. +1 −1 src/app.tsx
  6. +6 −2 src/index.tsx
36 changes: 18 additions & 18 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.development.js": {
"bundled": 11783,
"minified": 7629,
"gzipped": 1929
"bundled": 12030,
"minified": 7820,
"gzipped": 1999
},
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.production.js": {
"bundled": 11783,
"minified": 7629,
"gzipped": 1929
"bundled": 12030,
"minified": 7820,
"gzipped": 1999
},
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.development.js": {
"bundled": 12704,
"minified": 6636,
"gzipped": 1884
"bundled": 12961,
"minified": 6790,
"gzipped": 1950
},
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.production.js": {
"bundled": 12704,
"minified": 6636,
"gzipped": 1884
"bundled": 12961,
"minified": 6790,
"gzipped": 1950
},
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.es.production.js": {
"bundled": 11548,
"minified": 7397,
"gzipped": 1869,
"bundled": 11795,
"minified": 7588,
"gzipped": 1939,
"treeshaked": {
"rollup": {
"code": 548,
"import_statements": 125
"code": 5599,
"import_statements": 198
},
"webpack": {
"code": 1709
"code": 6907
}
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v0.0.20](https://github.com/sw-yx/react-netlify-identity-widget/compare/v0.0.19...v0.0.20) - 2019-04-29

### Commits

- use code splitting [`93e2a51`](https://github.com/sw-yx/react-netlify-identity-widget/commit/93e2a51b46163c5ea62355da8bdb082962f656f5)

## [v0.0.19](https://github.com/sw-yx/react-netlify-identity-widget/compare/v0.0.18...v0.0.19) - 2019-04-29

### Commits
112 changes: 109 additions & 3 deletions example/yarn.lock
Original file line number Diff line number Diff line change
@@ -1336,6 +1336,53 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==

"@reach/auto-id@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@reach/auto-id/-/auto-id-0.2.0.tgz#97f9e48fe736aa5c6f4f32cf73c1f19d005f8550"
integrity sha512-lVK/svL2HuQdp7jgvlrLkFsUx50Az9chAhxpiPwBqcS83I2pVWvXp98FOcSCCJCV++l115QmzHhFd+ycw1zLBg==

"@reach/component-component@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@reach/component-component/-/component-component-0.1.3.tgz#5d156319572dc38995b246f81878bc2577c517e5"
integrity sha512-a1USH7L3bEfDdPN4iNZGvMEFuBfkdG+QNybeyDv8RloVFgZYRoM+KGXyy2KOfEnTUM8QWDRSROwaL3+ts5Angg==

"@reach/dialog@^0.2.3":
version "0.2.7"
resolved "https://registry.yarnpkg.com/@reach/dialog/-/dialog-0.2.7.tgz#b0e1968a3df57471522bd7997c91ef81cd3a21a1"
integrity sha512-FY9qDA6H1TCUsoRNP7J+8y1hiBgIM58Yg5xvvayNOqD9BE7EodDLHrTqv6y6S9yre8aGu78jcuUinv2LeN/PRA==
dependencies:
"@reach/component-component" "^0.1.3"
"@reach/portal" "^0.2.1"
"@reach/utils" "^0.2.2"
react-focus-lock "^1.17.7"
react-remove-scroll "^1.0.2"

"@reach/portal@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@reach/portal/-/portal-0.2.1.tgz#07720b999e0063a9e179c14dbdc60fd991cfc9fa"
integrity sha512-pUQ0EtCcYm4ormEjJmdk4uzZCxOpaRHB8FDKJXy6q6GqRqQwZ4lAT1f2Tvw0DAmULmyZTpe1/heXY27Tdnct+Q==
dependencies:
"@reach/component-component" "^0.1.3"

"@reach/tabs@^0.1.3":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@reach/tabs/-/tabs-0.1.5.tgz#0a3a8c863cc50ac661b3a66afea0f9315c8d8b2b"
integrity sha512-thQKlbN7kN/YoFfBjTVxAlRlYor0dFg7QnZwUN9v1OYFLHMoPpmwaQkae8mAEibRb4BPGgjnoSpdfco2lzP37A==
dependencies:
"@reach/auto-id" "^0.2.0"
"@reach/utils" "^0.2.2"
warning "^4.0.2"

"@reach/utils@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@reach/utils/-/utils-0.2.2.tgz#c3a05ae9fd1f921988ae8a89b5a0d28d1a2b92df"
integrity sha512-jYeIi46AA5jh2gfdXD/nInUYfeLp3girRafiajP7AVHF6B4hpYAzUSx/ZH4xmPyf5alut5rml2DHxrv+X+Xu+A==

"@reach/visually-hidden@^0.1.3":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@reach/visually-hidden/-/visually-hidden-0.1.4.tgz#0dc4ecedf523004337214187db70a46183bd945b"
integrity sha512-QHbzXjflSlCvDd6vJwdwx16mSB+vUCCQMiU/wK/CgVNPibtpEiIbisyxkpZc55DyDFNUIqP91rSUsNae+ogGDQ==

"@svgr/babel-plugin-add-jsx-attribute@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.0.0.tgz#5acf239cd2747b1a36ec7e708de05d914cb9b948"
@@ -4409,6 +4456,11 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

focus-lock@^0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.6.3.tgz#ef0e82ebac0023f841039d60bf329725d6438028"
integrity sha512-EU6ePgEauhWrzJEN5RtG1d1ayrWXhEnfzTjnieHj+jG9tNHDEhKTAnCn1TN3gs9h6XWCDH6cpeX1VXY/lzLwZg==

follow-redirects@^1.0.0:
version "1.6.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.6.1.tgz#514973c44b5757368bad8bddfe52f81f015c94cb"
@@ -8283,6 +8335,14 @@ react-app-polyfill@^1.0.0:
regenerator-runtime "0.13.2"
whatwg-fetch "3.0.0"

react-clientside-effect@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.0.tgz#db823695f75e9616a5e4dd6d908e5ea627fb2516"
integrity sha512-cVIsGG7SNHsQsCP4+fw7KFUB0HiYiU8hbvL640XaLCbZ31aK8/lj0qOKJ2K+xRjuQz/IM4Q4qclI0aEqTtcXtA==
dependencies:
"@babel/runtime" "^7.0.0"
shallowequal "^1.1.0"

react-dev-utils@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.0.0.tgz#356d95db442441c5d4748e0e49f4fd1e71aecbbd"
@@ -8314,7 +8374,7 @@ react-dev-utils@^9.0.0:
strip-ansi "5.2.0"
text-table "0.2.0"

react-dom@16.8.6:
react-dom@^16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
@@ -8329,6 +8389,16 @@ react-error-overlay@^5.1.5:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.5.tgz#884530fd055476c764eaa8ab13b8ecf1f57bbf2c"
integrity sha512-O9JRum1Zq/qCPFH5qVEvDDrVun8Jv9vbHtZXCR1EuRj9sKg1xJTlHxBzU6AkCzpvxRLuiY4OKImy3cDLQ+UTdg==

react-focus-lock@^1.17.7:
version "1.19.1"
resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-1.19.1.tgz#2f3429793edaefe2d077121f973ce5a3c7a0651a"
integrity sha512-TPpfiack1/nF4uttySfpxPk4rGZTLXlaZl7ncZg/ELAk24Iq2B1UUaUioID8H8dneUXqznT83JTNDHDj+kwryw==
dependencies:
"@babel/runtime" "^7.0.0"
focus-lock "^0.6.3"
prop-types "^15.6.2"
react-clientside-effect "^1.2.0"

react-is@^16.8.1:
version "16.8.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb"
@@ -8339,6 +8409,22 @@ react-is@^16.8.4:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==

react-remove-scroll-bar@^1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-1.1.4.tgz#b035e973290fed6da0b479fe9e2bec296408fac8"
integrity sha512-I9oaQ1DC2Pn0pzfnRMW8Fo+4kRHq/OC9u8dC08JWBMS6ksE7bHpH45y2GhEY8ySC+PtlSVecqz+8mbuRwMSHUA==
dependencies:
react-style-singleton "^1.1.0"
tslib "^1.0.0"

react-remove-scroll@^1.0.2:
version "1.0.6"
resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-1.0.6.tgz#8c5573255b4c526f8006f8643bb55fa10c410da2"
integrity sha512-iB2ToQE0sujPU7UZvdvu4LimuWRs5Fp4XO6HFO4PO8ohm4sBUZ/WiRtESwQ9X4DdP7f7yYlEChZaPDzh9faoFQ==
dependencies:
react-remove-scroll-bar "^1.1.3"
tslib "^1.0.0"

react-scripts@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.0.0.tgz#a715613ef3eace025907b409cec8505096e0233e"
@@ -8397,7 +8483,15 @@ react-scripts@3.0.0:
optionalDependencies:
fsevents "2.0.6"

react@16.8.6:
react-style-singleton@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-1.1.1.tgz#b2b698765519da812b80f55ab3c5fc5d849a2e63"
integrity sha512-0JD+XC5veR3oxf7GzIXipr89sM8R3rWnOR/gpzIV0DnoRBrcTvvkqyMu9icDYqM/6CWJhYcH5Jdy6Nim7PmoTQ==
dependencies:
invariant "^2.2.4"
tslib "^1.0.0"

react@^16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
@@ -9021,6 +9115,11 @@ shallow-clone@^1.0.0:
kind-of "^5.0.0"
mixin-object "^2.0.1"

shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==

shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -9723,7 +9822,7 @@ ts-pnp@^1.0.0:
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.0.0.tgz#44a3a9e8c13fcb711bcda75d7b576c21af120c9d"
integrity sha512-qgwM7eBrxFvZSXLtSvjf3c2mXwJOOGD49VlE+KocUGX95DuMdLc/psZHBnPpZL5b2NU7VtQGHRCWF3cNfe5kxQ==

tslib@^1.8.1, tslib@^1.9.0:
tslib@^1.0.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
@@ -10057,6 +10156,13 @@ walker@^1.0.7, walker@~1.0.5:
dependencies:
makeerror "1.0.x"

warning@^4.0.2:
version "4.0.3"
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
dependencies:
loose-envify "^1.0.0"

watchpack@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-netlify-identity-widget",
"version": "0.0.19",
"version": "0.0.20",
"main": "dist/index.js",
"umd:main": "dist/reactNetlifyIdentityWidget.umd.production.js",
"module": "dist/reactNetlifyIdentityWidget.es.production.js",
2 changes: 1 addition & 1 deletion src/app.tsx
Original file line number Diff line number Diff line change
@@ -39,6 +39,6 @@ function Gate({ }: { onCloseDialog: Function }) {
return isLoggedIn ? <LoggedInScreen /> : <LoggedOutScreen />
}

export function Widget({ onCloseDialog }: { onCloseDialog: Function }) {
export default function Widget({ onCloseDialog }: { onCloseDialog: Function }) {
return <Gate onCloseDialog={onCloseDialog} />
}
8 changes: 6 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -4,7 +4,9 @@ import {
// DialogOverlay, DialogContent
} from "@reach/dialog"
import VisuallyHidden from "@reach/visually-hidden"
import { Widget } from "./app"

const Widget = React.lazy(() => import("./app"))

import { FormStateContextProvider, SettingContext } from "./context"

import { Settings, useNetlifyIdentity as _useNetlifyIdentity } from "react-netlify-identity"
@@ -50,7 +52,9 @@ export function IdentityModal({ showDialog, onCloseDialog }: ModalProps) {
<VisuallyHidden>Close</VisuallyHidden>
</button>
<FormStateContextProvider>
<Widget onCloseDialog={onCloseDialog} />
<React.Suspense fallback={<div>Loading...</div>}>
<Widget onCloseDialog={onCloseDialog} />
</React.Suspense>
</FormStateContextProvider>
</Dialog>
</SettingContext.Provider>