diff --git a/.docz/app/db.json b/.docz/app/db.json index e190635..b56eb84 100644 --- a/.docz/app/db.json +++ b/.docz/app/db.json @@ -4,7 +4,7 @@ "description": "A flexible and responsive carousel component for react", "themeConfig": { "logo": { - "src": "http://cdn.onlinewebfonts.com/svg/img_569227.png", + "src": "//cdn.onlinewebfonts.com/svg/img_569227.png", "width": 50 }, "mode": "light", @@ -24,15 +24,17 @@ } } }, - "ordering": "descending", + "ordering": "ascending", "version": "1.0.0", "repository": "https://github.com/sag1v/react-elastic-carousel", + "hashRouter": true, + "base": "/react-elastic-carousel/", "htmlContext": { "head": { "links": [ { "rel": "stylesheet", - "href": "https://codemirror.net/theme/dracula.css" + "href": "//codemirror.net/theme/dracula.css" } ] } @@ -52,7 +54,7 @@ { "depth": 2, "slug": "install", - "value": "Install" + "value": "install" }, { "depth": 2, @@ -62,7 +64,7 @@ { "depth": 2, "slug": "play", - "value": "Play" + "value": "play" }, { "depth": 2, @@ -71,6 +73,17 @@ } ] }, + "src/docs/components/mdx/easing.mdx": { + "name": "easing", + "order": 7, + "route": "/easing", + "menu": "Examples", + "id": "78888c6e0beacced3b7b973b66223dce", + "filepath": "src/docs/components/mdx/easing.mdx", + "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/easing.mdx", + "slug": "src-docs-components-mdx-easing", + "headings": [] + }, "src/docs/components/mdx/breakpoints.mdx": { "name": "breakPoints", "order": 3, @@ -82,15 +95,15 @@ "slug": "src-docs-components-mdx-breakpoints", "headings": [] }, - "src/docs/components/mdx/easing.mdx": { - "name": "easing", + "src/docs/components/mdx/enableAutoPlay.mdx": { + "name": "enableAutoPlay", "order": 7, - "route": "/easing", + "route": "/enableAutoPlay", "menu": "Examples", - "id": "78888c6e0beacced3b7b973b66223dce", - "filepath": "src/docs/components/mdx/easing.mdx", - "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/easing.mdx", - "slug": "src-docs-components-mdx-easing", + "id": "e5ed8a42173892b88aa17a4b5b18ed5e", + "filepath": "src/docs/components/mdx/enableAutoPlay.mdx", + "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/enableAutoPlay.mdx", + "slug": "src-docs-components-mdx-enable-auto-play", "headings": [] }, "src/docs/components/mdx/initialFirstItem.mdx": { @@ -115,15 +128,15 @@ "slug": "src-docs-components-mdx-focus-on-select", "headings": [] }, - "src/docs/components/mdx/isRTL.mdx": { - "name": "isRTL", - "order": 6, - "route": "/isRTL", + "src/docs/components/mdx/itemPadding.mdx": { + "name": "itemPadding", + "order": 8, + "route": "/itemPadding", "menu": "Examples", - "id": "9bc60693fd682815630e5e523056aeb2", - "filepath": "src/docs/components/mdx/isRTL.mdx", - "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/isRTL.mdx", - "slug": "src-docs-components-mdx-is-rtl", + "id": "e7b229c12d81372bc77c79253aff52b9", + "filepath": "src/docs/components/mdx/itemPadding.mdx", + "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemPadding.mdx", + "slug": "src-docs-components-mdx-item-padding", "headings": [] }, "src/docs/components/mdx/itemsToScroll.mdx": { @@ -137,22 +150,33 @@ "slug": "src-docs-components-mdx-items-to-scroll", "headings": [] }, - "src/docs/components/mdx/itemPadding.mdx": { - "name": "itemPadding", - "order": 2, - "route": "/itemPadding", + "src/docs/components/mdx/isRTL.mdx": { + "name": "isRTL", + "order": 6, + "route": "/isRTL", "menu": "Examples", - "id": "e7b229c12d81372bc77c79253aff52b9", - "filepath": "src/docs/components/mdx/itemPadding.mdx", - "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemPadding.mdx", - "slug": "src-docs-components-mdx-item-padding", + "id": "9bc60693fd682815630e5e523056aeb2", + "filepath": "src/docs/components/mdx/isRTL.mdx", + "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/isRTL.mdx", + "slug": "src-docs-components-mdx-is-rtl", + "headings": [] + }, + "src/docs/components/mdx/onUserNext.mdx": { + "name": "onUserNext", + "order": 9, + "route": "/onUserNext", + "menu": "Examples", + "id": "60dbc989aa6f0edfc7d189f0815b4484", + "filepath": "src/docs/components/mdx/onUserNext.mdx", + "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/onUserNext.mdx", + "slug": "src-docs-components-mdx-on-user-next", "headings": [] }, "src/docs/components/mdx/itemsToShow.mdx": { "name": "itemsToShow", + "order": 1, "route": "/itemsToShow", "menu": "Examples", - "order": 1, "id": "98c52d751af6a05ed757dec7408e238f", "filepath": "src/docs/components/mdx/itemsToShow.mdx", "link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemsToShow.mdx", diff --git a/.docz/app/imports.js b/.docz/app/imports.js index d93b367..dd56a8c 100644 --- a/.docz/app/imports.js +++ b/.docz/app/imports.js @@ -11,14 +11,14 @@ export const imports = { import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-initial-first-item" */ 'src/docs/components/mdx/initialFirstItem.mdx'), 'src/docs/components/mdx/focusOnSelect.mdx': () => import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-focus-on-select" */ 'src/docs/components/mdx/focusOnSelect.mdx'), - 'src/docs/components/mdx/isRTL.mdx': () => - import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-is-rtl" */ 'src/docs/components/mdx/isRTL.mdx'), 'src/docs/components/mdx/itemPadding.mdx': () => import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-item-padding" */ 'src/docs/components/mdx/itemPadding.mdx'), 'src/docs/components/mdx/itemsToScroll.mdx': () => import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-scroll" */ 'src/docs/components/mdx/itemsToScroll.mdx'), - 'src/docs/components/mdx/itemsToShow.mdx': () => - import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-show" */ 'src/docs/components/mdx/itemsToShow.mdx'), + 'src/docs/components/mdx/isRTL.mdx': () => + import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-is-rtl" */ 'src/docs/components/mdx/isRTL.mdx'), 'src/docs/components/mdx/onUserNext.mdx': () => import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-on-user-next" */ 'src/docs/components/mdx/onUserNext.mdx'), + 'src/docs/components/mdx/itemsToShow.mdx': () => + import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-show" */ 'src/docs/components/mdx/itemsToShow.mdx'), } diff --git a/.docz/app/index.jsx b/.docz/app/index.jsx index 02e4710..c96277d 100644 --- a/.docz/app/index.jsx +++ b/.docz/app/index.jsx @@ -1,4 +1,3 @@ -import 'webpack-serve-overlay' import React from 'react' import ReactDOM from 'react-dom' import Root from './root' diff --git a/.docz/app/root.jsx b/.docz/app/root.jsx index a617318..214d405 100644 --- a/.docz/app/root.jsx +++ b/.docz/app/root.jsx @@ -5,13 +5,6 @@ import Theme from 'docz-theme-default' import { imports } from './imports' import db from './db.json' -const Root = () => ( - -) +const Root = () => export default hot(module)(Root) diff --git a/doczrc.js b/doczrc.js index 1e03852..dc5415f 100644 --- a/doczrc.js +++ b/doczrc.js @@ -1,11 +1,15 @@ import path from 'path' +import libName from './libName'; + export default { + hashRouter: true, + base: `/${libName}/`, ordering: "ascending", modifyBundlerConfig: config => { config.resolve.alias = { ...config.resolve.alias, - "react-elastic-carousel":path.join(__dirname, "/src/react-elastic-carousel/index.js") + [libName]:path.join(__dirname, `/src/${libName}/index.js`) } return config; }, @@ -13,13 +17,13 @@ export default { head: { links: [{ rel: 'stylesheet', - href: 'https://codemirror.net/theme/dracula.css' + href: '//codemirror.net/theme/dracula.css' }] } }, themeConfig: { logo: { - src: "http://cdn.onlinewebfonts.com/svg/img_569227.png", + src: "//cdn.onlinewebfonts.com/svg/img_569227.png", width: 50 }, mode: 'light', diff --git a/libName.js b/libName.js new file mode 100644 index 0000000..355ea31 --- /dev/null +++ b/libName.js @@ -0,0 +1,2 @@ +import pkg from './package.json'; +export default pkg.name; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index aae9bb8..42572eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1242,18 +1242,18 @@ "dev": true }, "@mdx-js/loader": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@mdx-js/loader/-/loader-0.15.0.tgz", - "integrity": "sha512-5waqmYa3SffBpIYocQBfyygV/AyLodmchmiYFaeEdsk5L+rQXm7ey+/PWOFqEvIOLcPoNLVmgegjREf2tayuwQ==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@mdx-js/loader/-/loader-0.15.2.tgz", + "integrity": "sha512-n7NUvsP7T9s+Ee1u/Xx3ZHvcf4zbTjNCi0wGzN68HRah8LMskNSyUHTyIOSfyJhOnf6pChG5NAOV///TtN5Jiw==", "dev": true, "requires": { "@mdx-js/tag": "^0.15.0" } }, "@mdx-js/mdx": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-0.15.0.tgz", - "integrity": "sha512-z+nzITlNdDZ6KAHIE0F8WpU9bcDm8N928yzjMy9Lmm1u+hMyPS6VPYnJU895Y0CXjpVyvAZfZv4MIhfIkJxCsQ==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-0.15.2.tgz", + "integrity": "sha512-ZFJ2vE9jD81iO54xSutIrPBxNgylNgZ2KPxx1HjN5e+fszsbGjjNUwVlknPz53cbiwVO3cxloWmcnN1cODKNgQ==", "dev": true, "requires": { "mdast-util-to-hast": "^3.0.0", @@ -2641,13 +2641,13 @@ } }, "babel-plugin-react-docgen": { - "version": "2.0.0-babel7.0", - "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-2.0.0-babel7.0.tgz", - "integrity": "sha512-X8nck/5cpzYKieh8KjJtXg07n2/yEctTxMjiZOylJpVaU4DAxtij81wA25TB2Js7CvAj1pNTFw5Uw5divk5cjg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-2.0.0.tgz", + "integrity": "sha512-AaA6IPxCF1EkzpFG41GkVh/VGdoBejPF6oIub2K8E6AD3kwnTZ0DIKG7f20a7zmqBEeO8GkFWdM7tYd9Owkc+Q==", "dev": true, "requires": { "lodash": "^4.17.10", - "react-docgen": "^3.0.0-rc.0" + "react-docgen": "^3.0.0-rc.1" } }, "babel-plugin-syntax-async-functions": { @@ -3159,9 +3159,9 @@ } }, "babel-preset-docz": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/babel-preset-docz/-/babel-preset-docz-0.11.0.tgz", - "integrity": "sha512-I/Kx2laAj8jHS5a4BafzUvRTyYqsZBddYfRxcZQPVypRGRlBmB7NzSzI7WQaOpbht0Nv3pCasNZ3PqQ9Lgi5mw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/babel-preset-docz/-/babel-preset-docz-0.11.1.tgz", + "integrity": "sha512-LaM07uhzV2wjC9Dql3pRuEAbGWGPkySuAsPvFd+WjJRSbjqCLR2v4y3gNHuA+4aVLddznFacFPn2Rk0NkEUcHg==", "dev": true, "requires": { "@babel/core": "7.0.0", @@ -3176,7 +3176,7 @@ "@babel/preset-react": "7.0.0", "@babel/preset-typescript": "7.0.0", "babel-plugin-macros": "^2.4.0", - "babel-plugin-react-docgen": "^2.0.0-babel7.0", + "babel-plugin-react-docgen": "^2.0.0", "babel-plugin-transform-dynamic-import": "^2.0.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.15" } @@ -3406,6 +3406,12 @@ } } }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, "bail": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz", @@ -5702,9 +5708,9 @@ } }, "docz": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/docz/-/docz-0.11.0.tgz", - "integrity": "sha512-pkeRULjsL6Kq1KUUabxldO/avcpE+uEgDKxjXacKvzQOHNtJVT9nBggOf/1MNXY6IR7BVUdBE5kHqJGyfEA58g==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/docz/-/docz-0.11.1.tgz", + "integrity": "sha512-tjS0803LozSOtfKb6juHe2633pqLct0IUV6lUkdVXrJ5KI2cHwnz4yN2eZk54ZncP2Ul2FDOEnajd7dG9B+lzw==", "dev": true, "requires": { "@mdx-js/tag": "^0.15.0", @@ -5713,23 +5719,49 @@ "capitalize": "^1.0.0", "create-react-context": "^0.2.3", "deepmerge": "^2.1.1", - "docz-core": "^0.11.0", - "docz-theme-default": "^0.11.0", + "docz-core": "^0.11.1", + "docz-theme-default": "^0.11.1", "prop-types": "^15.6.2", - "react": "^16.4.2", + "react": "^16.5.0", "react-copy-write": "^0.8.0", - "react-dom": "^16.4.2", + "react-dom": "^16.5.0", "react-imported-component": "^4.6.2", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", "react-router-hash-link": "^1.2.0", "yargs": "^12.0.1" + }, + "dependencies": { + "react": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.5.0.tgz", + "integrity": "sha512-nw/yB/L51kA9PsAy17T1JrzzGRk+BlFCJwFF7p+pwVxgqwPjYNeZEkkH7LXn9dmflolrYMXLWMTkQ77suKPTNQ==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.3.0" + } + }, + "react-dom": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.0.tgz", + "integrity": "sha512-qgsQdjFH54pQ1AGLCBKsqjPxib4Pnp+cOsNxGPlkHn5YnsSt43sBvHSif6FheY7NMMS6HPeSJOxXf6ECanjacA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.3.0" + } + } } }, "docz-core": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/docz-core/-/docz-core-0.11.0.tgz", - "integrity": "sha512-67KTcKfP1der8auOjhyYIlOSZvSTLgD7/Qv5ptCv5Sz+oylLyqr130HaQj0zhuDFN4mC3IaRj2deMbxewaKf0g==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/docz-core/-/docz-core-0.11.1.tgz", + "integrity": "sha512-u6riWQYjtDRVmGwvCdAh/mVpoPOTFXzK0/104EsL3fxZnq/xMuxtCsLbOix7viq3cFhO6oPoLeBJBk5+RMjbVw==", "dev": true, "requires": { "@babel/core": "7.0.0", @@ -5740,8 +5772,8 @@ "@mdx-js/mdxast": "^0.15.0", "@sindresorhus/slugify": "^0.3.0", "art-template": "^4.13.0", - "babel-loader": "^8.0.0", - "babel-preset-docz": "^0.11.0", + "babel-loader": "^8.0.2", + "babel-preset-docz": "^0.11.1", "babylon": "^6.18.0", "cache-loader": "^1.2.2", "chalk": "^2.4.1", @@ -5768,13 +5800,13 @@ "koa-mount": "^3.0.0", "koa-range": "^0.3.0", "koa-static": "^5.0.0", - "load-cfg": "^0.11.0", + "load-cfg": "^0.11.1", "lodash.get": "^4.4.2", "mini-html-webpack-plugin": "^0.2.3", "prettier": "^1.14.2", "react-dev-utils": "^5.0.2", "react-docgen-typescript-loader": "^3.0.0-rc.0", - "react-hot-loader": "4.3.5", + "react-hot-loader": "4.3.6", "rehype-autolink-headings": "^2.0.3", "rehype-docz": "^0.11.0", "rehype-slug": "^2.0.1", @@ -5793,8 +5825,8 @@ "unist-util-is": "^2.1.2", "unist-util-visit": "^1.4.0", "url-loader": "^1.1.1", - "webpack": "^4.17.1", - "webpack-chain": "^4.9.0", + "webpack": "^4.17.2", + "webpack-chain": "^4.10.0", "webpack-hot-client": "^4.1.1", "webpack-manifest-plugin": "^2.0.3", "webpack-serve": "^2.0.2", @@ -5803,25 +5835,17 @@ "webpackbar": "^2.6.3", "ws": "^6.0.0", "yargs": "^12.0.1" - }, - "dependencies": { - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - } } }, "docz-theme-default": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/docz-theme-default/-/docz-theme-default-0.11.0.tgz", - "integrity": "sha512-qW8pdbYdsTZcNzt9etIaDhzllKAAIU7rw6RMgeYhvd48BuUu2HnItOpNgdiKGkH22vmmC8XNm6B1X0YwDtf15Q==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/docz-theme-default/-/docz-theme-default-0.11.1.tgz", + "integrity": "sha512-0KqjcQprQDLGWwVSFDLtRflTXz1mGA6G0K9csSzpR/dPZuqui+cMjPAOl3wbBA5O185hzzVNvF3Jo3PgzBPluw==", "dev": true, "requires": { "codemirror": "^5.40.0", "copy-text-to-clipboard": "^1.0.4", - "docz": "^0.11.0", + "docz": "^0.11.1", "emotion": "^9.2.8", "emotion-theming": "^9.2.6", "facepaint": "^1.2.1", @@ -5832,16 +5856,43 @@ "pretty": "^2.0.0", "prop-types": "15.6.2", "re-resizable": "^4.8.1", - "react": "^16.4.2", + "react": "^16.5.0", "react-codemirror2": "^5.1.0", - "react-dom": "^16.4.2", + "react-dom": "^16.5.0", "react-emotion": "^9.2.8", - "react-feather": "^1.1.1", + "react-feather": "^1.1.3", "react-lightweight-tooltip": "^1.0.0", "react-live": "^1.11.0", "react-perfect-scrollbar": "^1.2.0", "react-powerplug": "^1.0.0-rc.1", + "react-sizes": "^1.0.4", "webfontloader": "^1.6.28" + }, + "dependencies": { + "react": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.5.0.tgz", + "integrity": "sha512-nw/yB/L51kA9PsAy17T1JrzzGRk+BlFCJwFF7p+pwVxgqwPjYNeZEkkH7LXn9dmflolrYMXLWMTkQ77suKPTNQ==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.3.0" + } + }, + "react-dom": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.0.tgz", + "integrity": "sha512-qgsQdjFH54pQ1AGLCBKsqjPxib4Pnp+cOsNxGPlkHn5YnsSt43sBvHSif6FheY7NMMS6HPeSJOxXf6ECanjacA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.3.0" + } + } } }, "dom-converter": { @@ -8939,9 +8990,9 @@ "dev": true }, "hotkeys-js": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.3.7.tgz", - "integrity": "sha512-t0ueDa1C1FcvXLRbnlMfnrf99G4djutK+/TfCy6L7KZMTzAxmEetEC/KYTW9cJSphIU2kG6ru5XMomHTD9lehw==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.3.8.tgz", + "integrity": "sha512-bRQQQ+wga5JZW5gqUP/B3NJTpOumGie3w5HvjfBW15PrE7agFe5Bewj5RdJSHa2zoeRLHV2OTK1+dNk+i9H1lA==", "dev": true }, "hpack.js": { @@ -11849,13 +11900,13 @@ } }, "load-cfg": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/load-cfg/-/load-cfg-0.11.0.tgz", - "integrity": "sha512-3AsjbdaENUo9MONnyMjmz4B/RE81a8i9PpFGuUq5H5EFr/O69bvt9aPnj+7z4oUyR18+lrTFRKmHWKZPA/gFVw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/load-cfg/-/load-cfg-0.11.1.tgz", + "integrity": "sha512-+TiP12m5IVUVrZBSMSXJllSZIHjnM3yovN9hK7G1i1/mYlUmmMw8GsrTv9vMKtpvwl0NF+U9J7VOHSVKFLlrmA==", "dev": true, "requires": { "deepmerge": "^2.1.1", - "esm": "^3.0.80", + "esm": "^3.0.82", "find-up": "^3.0.0", "fs-extra": "^7.0.0" } @@ -12059,6 +12110,12 @@ "lodash._reinterpolate": "~3.0.0" } }, + "lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", + "dev": true + }, "lodash.unescape": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", @@ -12244,6 +12301,15 @@ "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", "dev": true }, + "map-age-cleaner": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz", + "integrity": "sha512-UN1dNocxQq44IhJyMI4TU8phc2m9BddacHRPRjKGLYaF0jqd3xLz0jS0skpAU9WgYyoR4gHtUpzytNBS385FWQ==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -12288,8 +12354,7 @@ "dependencies": { "diacritic": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/diacritic/-/diacritic-0.0.2.tgz", - "integrity": "sha1-/CqIe1pbwKCoVPthTHwvIJBh7gQ=", + "bundled": true, "dev": true } } @@ -16443,9 +16508,9 @@ "dev": true }, "react-hot-loader": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.5.tgz", - "integrity": "sha512-6kKabumYl0rYaG9ynZMb7Wq+aR8BO9cctveYuDZJIjwXrfsABrkRGvN3QiQfUL42dh8GllkxhRFXOty+vr4aSA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.6.tgz", + "integrity": "sha512-iuBeBkLz7tdkKmKduNww9o5JY4ZH1XI0TWwkWToHIqfOSh1xMCqLMSYXUasWfgZWykWWa9IkueYab+cDq2jyWg==", "dev": true, "requires": { "fast-levenshtein": "^2.0.6", @@ -17399,6 +17464,16 @@ } } }, + "react-sizes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/react-sizes/-/react-sizes-1.0.4.tgz", + "integrity": "sha512-lGSerZk5EA6zPI/44Smq+EkLeU0Nn+JaRxbbxkGMXYmTSs8sq7DvHJDA7GbjUdgi3gKq4omW6vpHIgQO5ekebg==", + "dev": true, + "requires": { + "lodash.throttle": "^4.1.1", + "prop-types": "^15.6.0" + } + }, "react-swipeable": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-4.3.0.tgz", @@ -18587,6 +18662,15 @@ "integrity": "sha512-StSp3ahu7EE1oqVfemF9nV7DVusIaVRuZVa4CZX5rzCUwspqO21wWdNshxZuFIQD7zj/HvvglBoycIizZbTBdw==", "dev": true }, + "schedule": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.3.0.tgz", + "integrity": "sha512-20+1KVo517sR7Nt+bYBN8a+bEJDKLPEx7Ohtts1kX05E4/HY53YUNuhfkVNItmWAnBYHcpG9vsd2/CJxG+aPCQ==", + "dev": true, + "requires": { + "object-assign": "^4.1.1" + } + }, "schema-utils": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", @@ -20901,9 +20985,9 @@ } }, "webpack-chain": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.9.0.tgz", - "integrity": "sha512-DQbqFAVEQg1+u9kXDMNyA4yZzQIf/tZD34GQ4ev97G3DrKtGYMyUyyUYZxt50qBPG1MMlKG12PwMrUjlth3uxg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.10.0.tgz", + "integrity": "sha512-Cdfkmah2gmE4jlBZWL733hkVcDyBRGCI+nnCP1Cl8NMHvBFpj1v1Voku7gs9Cf+I08BOqq0vtacsCBCyNxQ7Jw==", "dev": true, "requires": { "deepmerge": "^1.5.2", @@ -21689,16 +21773,16 @@ "dev": true }, "yargs": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.1.tgz", - "integrity": "sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", + "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", "dev": true, "requires": { "cliui": "^4.0.0", "decamelize": "^2.0.0", "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", @@ -21716,6 +21800,58 @@ "requires": { "xregexp": "4.0.0" } + }, + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "mem": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" + } + }, + "os-locale": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", + "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==", + "dev": true, + "requires": { + "execa": "^0.10.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } } } }, diff --git a/package.json b/package.json index ee4281d..54b2239 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,7 @@ "prebuild": "npm run lint:fix", "build": "rollup -c", "prepare": "npm run build", - "predeploy": "npm run lint:fix && cd example && npm install && npm run build", - "deploy": "gh-pages -d example/build", + "deploy": "gh-pages -d .docz/dist", "docz:dev": "docz dev && npm run lint:watch", "docz:build": "docz build" }, @@ -56,7 +55,7 @@ "babel-eslint": "^9.0.0", "classnames": "^2.2.6", "cross-env": "^5.1.4", - "docz": "^0.11.0", + "docz": "^0.11.1", "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.1", "eslint-config-standard": "^12.0.0", diff --git a/rollup.config.js b/rollup.config.js index 13f3bba..27ddcf3 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -8,6 +8,8 @@ import alias from 'rollup-plugin-alias'; import pkg from './package.json' +import libName from './libName'; + export default { input: 'src/index.js', output: [ @@ -24,7 +26,7 @@ export default { ], plugins: [ alias({ - "react-elastic-carousel": './src/react-elastic-carousel/index.js' + [libName]: `./src/${libName}/index.js` }), external(), postcss({ diff --git a/src/docs/index.mdx b/src/docs/index.mdx index 65e9caa..acc4a4c 100644 --- a/src/docs/index.mdx +++ b/src/docs/index.mdx @@ -1,3 +1,4 @@ + --- name: Getting started route: /