MinJieLiu 5 yıl önce
ebeveyn
işleme
c4e1fdad1a

+ 1 - 1
example/.storybook/config.ts

@@ -1,6 +1,6 @@
 import { configure } from '@storybook/react';
 
 configure(
-  require.context('../stories', true, /\.stories\.(mdx|[tj]sx?)$/),
+  require.context('../src/stories', true, /\.stories\.(mdx|[tj]sx?)$/),
   module,
 );

+ 0 - 49
example/.storybook/webpack.config.js

@@ -1,49 +0,0 @@
-let foundCSSRule = false;
-
-function removeDuplicateCSSRule(rule) {
-  if (!rule || !rule.test) {
-    return;
-  }
-  if (rule.test.toString() !== '/\\.css$/') {
-    return;
-  }
-  if (!foundCSSRule) {
-    foundCSSRule = true;
-    return;
-  }
-  return false;
-}
-
-function updateRules(oldRules) {
-  const newRules = [];
-  if (!oldRules || !oldRules.length) {
-    return newRules;
-  }
-  for (let i = 0; i < oldRules.length; i++) {
-    const rule = oldRules[i];
-    if (rule.oneOf) {
-      rule.oneOf = updateRules(rule.oneOf);
-      newRules.push(rule);
-    } else {
-      const newRule = removeDuplicateCSSRule(oldRules[i]);
-      if (newRule) {
-        // If a new rule was returned, push it into the new rules list
-        newRules.push(newRule);
-      }
-      if (newRule !== false) {
-        // If any function returned false, it means remove it from the list of rules
-        // Otherwise, we just use the old rule that was there previously
-        newRules.push(oldRules[i]);
-      }
-    }
-  }
-  return newRules;
-}
-
-module.exports = async ({ config, mode }) => {
-  console.log('*** Custom webpack running ****');
-  config.module.rules = updateRules(config.module.rules);
-  // Uncomment this line if you would like to view the final webpack config so you can alter it.  Useful for debugging
-  // console.dir(config, { depth: null });
-  return config;
-};

+ 6 - 6
example/package.json

@@ -30,12 +30,12 @@
     ]
   },
   "devDependencies": {
-    "@storybook/addon-actions": "^5.3.0-beta.13",
-    "@storybook/addon-docs": "^5.3.0-beta.13",
-    "@storybook/addon-links": "^5.3.0-beta.13",
-    "@storybook/addons": "^5.3.0-beta.13",
-    "@storybook/preset-create-react-app": "^1.3.1",
-    "@storybook/react": "^5.3.0-beta.13",
+    "@storybook/addon-actions": "^5.3.0-beta.14",
+    "@storybook/addon-docs": "^5.3.0-beta.14",
+    "@storybook/addon-links": "^5.3.0-beta.14",
+    "@storybook/addons": "^5.3.0-beta.14",
+    "@storybook/preset-create-react-app": "^1.3.2",
+    "@storybook/react": "^5.3.0-beta.14",
     "@storybook/storybook-deployer": "^2.8.1"
   }
 }

+ 2 - 2
example/src/index.tsx

@@ -1,6 +1,6 @@
-import styled from 'styled-components';
 import * as React from 'react';
-import { PhotoSlider } from '../../dist';
+import styled from 'styled-components';
+import { PhotoSlider } from 'react-photo-view';
 
 export const photoImages = [
   '1.jpg',

+ 2 - 2
example/stories/Test.stories.mdx → example/src/stories/Test.stories.mdx

@@ -9,7 +9,7 @@ import {
   Button,
   DefaultImage,
   ControlledView,
-} from '../src';
+} from '../';
 
 <Meta title="React-photo-view" />
 
@@ -88,4 +88,4 @@ import {
 
 # Props
 
-<Props of={PhotoSlider} />
+<Props of={PhotoConsumer} />

+ 0 - 139
example/stories/Index.stories.js

@@ -1,139 +0,0 @@
-// import * as React from 'react';
-// import styled from 'styled-components';
-// import { storiesOf } from '@storybook/react';
-// import { PhotoProvider, PhotoConsumer, PhotoSlider } from 'react-photo-view';
-// import 'react-photo-view/dist/index.css';
-// import image1 from './static/1.jpg';
-// import image2 from './static/2.jpg';
-// import image3 from './static/3.jpg';
-// import image4 from './static/4.jpg';
-// import image5 from './static/5.jpg';
-// import image6 from './static/6.jpg';
-// import image7 from './static/7.jpg';
-// import image8 from './static/8.jpg';
-// import defaultPhoto from './static/default-photo.svg';
-//
-// const photoImages = [
-//   image1,
-//   image2,
-//   image3,
-//   image4,
-//   image5,
-//   image6,
-//   image7,
-//   image8,
-// ];
-//
-// const ImageList = styled.div`
-//   padding: 40px;
-//   display: flex;
-//   flex-wrap: wrap;
-//   align-items: center;
-// `;
-//
-// const ViewBox = styled.div`
-//   margin-right: 20px;
-//   margin-bottom: 20px;
-//   width: 100px;
-//   height: 100px;
-//   cursor: pointer;
-//   background: url('${props => props.viewImage}') no-repeat center;
-//   background-size: cover;
-// `;
-//
-// const Button = styled.button`
-//   padding: 6px 10px;
-//   border: 1px solid #ccc;
-//   border-radius: 2px;
-//   cursor: pointer;
-//
-//   &:not(:last-child) {
-//     margin-right: 12px;
-//   }
-//
-//   &[type='primary'] {
-//     background: deepskyblue;
-//     border-color: deepskyblue;
-//     color: white;
-//   }
-// `;
-//
-// const DefaultImage = styled.img`
-//   width: 100px;
-//   height: 100px;
-// `;
-//
-// storiesOf('react-photo-view', module)
-//   .add('默认展示', () => (
-//     <PhotoProvider>
-//       <ImageList>
-//         {photoImages.map((item, index) => (
-//           <PhotoConsumer key={index} src={item} intro={item}>
-//             <ViewBox viewImage={item} />
-//           </PhotoConsumer>
-//         ))}
-//       </ImageList>
-//     </PhotoProvider>
-//   ))
-//   .add('两张预览', () => (
-//     <PhotoProvider>
-//       <ImageList>
-//         {photoImages.map((item, index) => (
-//           <PhotoConsumer key={index} src={item}>
-//             {index < 2 ? <ViewBox viewImage={item} /> : undefined}
-//           </PhotoConsumer>
-//         ))}
-//       </ImageList>
-//     </PhotoProvider>
-//   ))
-//   .add('通过按钮触发', () => (
-//     <PhotoProvider>
-//       <ImageList>
-//         <PhotoConsumer src={image4}>
-//           <Button>打开预览</Button>
-//         </PhotoConsumer>
-//       </ImageList>
-//     </PhotoProvider>
-//   ))
-//   .add('自定义加载失败', () => (
-//     <ImageList>
-//       <PhotoProvider>
-//         <PhotoConsumer src={null}>
-//           <Button>无默认图</Button>
-//         </PhotoConsumer>
-//       </PhotoProvider>
-//       <PhotoProvider brokenElement={<DefaultImage src={defaultPhoto} />}>
-//         <PhotoConsumer src={null}>
-//           <Button>自定义默认图</Button>
-//         </PhotoConsumer>
-//       </PhotoProvider>
-//     </ImageList>
-//   ))
-//   .add('受控 PhotoSlider', () => {
-//     const [visible, setVisible] = React.useState(false);
-//     const [photoIndex, setPhotoIndex] = React.useState(0);
-//
-//     function handleShowSlider() {
-//       setVisible(true);
-//     }
-//     function handleCloseSlider() {
-//       setVisible(false);
-//     }
-//     return (
-//       <ImageList>
-//         <Button onClick={() => setPhotoIndex(2)}>setPhotoIndex(2)</Button>
-//         <Button onClick={() => setPhotoIndex(4)}>setPhotoIndex(4)</Button>
-//         <Button onClick={handleShowSlider} type="primary">
-//           打开 PhotoSlider
-//         </Button>
-//
-//         <PhotoSlider
-//           images={photoImages.map(item => ({ src: item }))}
-//           visible={visible}
-//           onClose={handleCloseSlider}
-//           index={photoIndex}
-//           onIndexChange={setPhotoIndex}
-//         />
-//       </ImageList>
-//     );
-//   });

+ 1 - 1
example/tsconfig.json

@@ -15,5 +15,5 @@
     "noEmit": true,
     "jsx": "react"
   },
-  "include": ["stories", "src"]
+  "include": ["src"]
 }

+ 153 - 130
example/yarn.lock

@@ -1330,16 +1330,17 @@
   version "0.7.0"
   resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
 
-"@storybook/addon-actions@^5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.3.0-beta.13.tgz#0dfcfb701167b5fad0d6a115525bf1079d18a2a4"
-  dependencies:
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/api" "5.3.0-beta.13"
-    "@storybook/client-api" "5.3.0-beta.13"
-    "@storybook/components" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
+"@storybook/addon-actions@^5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.3.0-beta.14.tgz#e3646ebf6ebbbafed3601b40877bdb6b1791b55b"
+  integrity sha512-zc7bEVVyMX+X2FnMBtbkvQPJIl231AIs4j4Jy/eTirXjQ8ReAePp3Yf6HGYoFsWj5ieTNW38oCACJ9m5zAVdng==
+  dependencies:
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/api" "5.3.0-beta.14"
+    "@storybook/client-api" "5.3.0-beta.14"
+    "@storybook/components" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
     core-js "^3.0.1"
     fast-deep-equal "^2.0.1"
     global "^4.3.2"
@@ -1349,9 +1350,10 @@
     react-inspector "^4.0.0"
     uuid "^3.3.2"
 
-"@storybook/addon-docs@^5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-5.3.0-beta.13.tgz#a8fa538efbec1008dcea2f7eab9b414163a1229e"
+"@storybook/addon-docs@^5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-5.3.0-beta.14.tgz#e4edf356d3bb796f9325e403cf10287dc1125875"
+  integrity sha512-R/i7rmab4lbEen8rb7vAN+DhsZtEAJAlkh6s5rxF+ZwtMuqXkQJknorMPaHPYTUlSXMiNes6JmTISITctZ3bOQ==
   dependencies:
     "@babel/generator" "^7.4.0"
     "@babel/parser" "^7.4.2"
@@ -1361,13 +1363,13 @@
     "@mdx-js/loader" "^1.5.1"
     "@mdx-js/mdx" "^1.5.1"
     "@mdx-js/react" "^1.5.1"
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/api" "5.3.0-beta.13"
-    "@storybook/components" "5.3.0-beta.13"
-    "@storybook/postinstall" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
-    "@storybook/source-loader" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/api" "5.3.0-beta.14"
+    "@storybook/components" "5.3.0-beta.14"
+    "@storybook/postinstall" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
+    "@storybook/source-loader" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
     acorn "^7.1.0"
     acorn-jsx "^5.1.0"
     acorn-walk "^7.0.0"
@@ -1385,41 +1387,44 @@
     vue-docgen-api "^3.26.0"
     vue-docgen-loader "^1.0.1"
 
-"@storybook/addon-links@^5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.3.0-beta.13.tgz#442ff1259febee13b0454353563bad420c7ac5dc"
+"@storybook/addon-links@^5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.3.0-beta.14.tgz#7cd893dc4c2fc6b00a033232e763e09f68f1f51c"
+  integrity sha512-bcAWK8tFRKYsP61iuhs/4FIzjBsNVzLLQQzzyf7gEmFQrWKRRSFnnU6WqN8M6xU3h/DJVCX3EUXBjY6SjWpb0A==
   dependencies:
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
     core-js "^3.0.1"
     global "^4.3.2"
     prop-types "^15.7.2"
     qs "^6.6.0"
     ts-dedent "^1.1.0"
 
-"@storybook/addons@5.3.0-beta.13", "@storybook/addons@^5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.0-beta.13.tgz#33592f10e9ccd2f18ec74920d9bc9817d5c3d274"
+"@storybook/addons@5.3.0-beta.14", "@storybook/addons@^5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.0-beta.14.tgz#ced58f171f5bb9a2a0963c6611d70c0a21a479cc"
+  integrity sha512-7o7hAVjDRvu0hQKaD1eoabYf8dR1IY+d5i1H4yriinowq7/70EfAtqlSKzwvZj4oEXRzeTXDdGPIZeV964gXdw==
   dependencies:
-    "@storybook/api" "5.3.0-beta.13"
-    "@storybook/channels" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
+    "@storybook/api" "5.3.0-beta.14"
+    "@storybook/channels" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
     core-js "^3.0.1"
     global "^4.3.2"
     util-deprecate "^1.0.2"
 
-"@storybook/api@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.0-beta.13.tgz#2aad5e805d13d5431f8e5a58648c75f8b2ad8ec2"
+"@storybook/api@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.0-beta.14.tgz#1cd1220a8af3c829def711ec16ea63ee528cc268"
+  integrity sha512-e0XsJyrQuhOqYmPvTwIoiiraecAm6JHcCyjmyIx+NcMAFxZXhyxg3RBmcvHjdAPH9FKHFrO1whduAO9KhL6TQg==
   dependencies:
-    "@storybook/channels" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
+    "@storybook/channels" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
     core-js "^3.0.1"
     fast-deep-equal "^2.0.1"
     global "^4.3.2"
@@ -1433,32 +1438,35 @@
     telejson "^3.2.0"
     util-deprecate "^1.0.2"
 
-"@storybook/channel-postmessage@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.3.0-beta.13.tgz#7c01a21c59b6ea5e592600a5ec91ef6d6a2ab442"
+"@storybook/channel-postmessage@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.3.0-beta.14.tgz#6fbad9bd982eca279c8b859606c53514577b8bd1"
+  integrity sha512-L36Q3ecLU4wrLco6tzGzobOr7lef2eQJ6+JUtBK5fjXIxVPAdsqDnQB6/GUXgzIshmNiGT8UHJ8grIrNyTGs/A==
   dependencies:
-    "@storybook/channels" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
+    "@storybook/channels" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
     core-js "^3.0.1"
     global "^4.3.2"
     telejson "^3.2.0"
 
-"@storybook/channels@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.0-beta.13.tgz#0915eb02fee0e292cedb7e2eec827f19fa0b30d0"
+"@storybook/channels@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.0-beta.14.tgz#4751f79f466be910833c6a30d6caf397ac7a1b22"
+  integrity sha512-YcEL975bBY2i+XK97z83BiEYj3EQ/SSdsuWHxqUrko7yTpevFwfckZKuHZEAUDepIDv3WG0HEo4pX2aAgy8Etw==
   dependencies:
     core-js "^3.0.1"
 
-"@storybook/client-api@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.3.0-beta.13.tgz#0307eb4a736cfba48037f2545ebbd952b9944be8"
-  dependencies:
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/channel-postmessage" "5.3.0-beta.13"
-    "@storybook/channels" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
+"@storybook/client-api@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.3.0-beta.14.tgz#a053af6af721921fe851b357549b13fbff041d44"
+  integrity sha512-TFRKNwEmEPDUbhio0Nz0VR4Yc4BWx842RX1Cs9WpaN3nF/5HFggFkC1HDXyO6ae0pPNTW5wC9ImjmW8aUMSp2Q==
+  dependencies:
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/channel-postmessage" "5.3.0-beta.14"
+    "@storybook/channels" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
     core-js "^3.0.1"
     eventemitter3 "^4.0.0"
     global "^4.3.2"
@@ -1470,18 +1478,20 @@
     ts-dedent "^1.1.0"
     util-deprecate "^1.0.2"
 
-"@storybook/client-logger@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.0-beta.13.tgz#25fb70906fcdecdcbdc0c35da1db766271618e64"
+"@storybook/client-logger@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.0-beta.14.tgz#af44cf906945967805527fbc70aa76e0af4e7df6"
+  integrity sha512-j53WoS+7DGWLD4KOb2fu0jjfyh4igWNneNuEWzugA7qx4O/3NXcywNkN+ZD7eLjzVeMBWMzRJDY5XAIdJBDGFA==
   dependencies:
     core-js "^3.0.1"
 
-"@storybook/components@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.0-beta.13.tgz#76a24b0811c6c3456e9bd5db64f0b700886d6fa8"
+"@storybook/components@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.0-beta.14.tgz#a28129620a6510ec0c25c97f984d2ba81478433a"
+  integrity sha512-muWPNZXQ6gwOnbLcDBnAQb00z0CcRp08dFTewpDMWzaD+uJDnbhboy8Z1V+5LpBh78pumOEv0u2yiXN5asbXqg==
   dependencies:
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
     "@types/react-syntax-highlighter" "11.0.2"
     "@types/react-textarea-autosize" "^4.3.3"
     core-js "^3.0.1"
@@ -1502,30 +1512,32 @@
     simplebar-react "^1.0.0-alpha.6"
     ts-dedent "^1.1.0"
 
-"@storybook/core-events@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.0-beta.13.tgz#08ab8dfa8fdda5f4438fc27928dcde859790826e"
+"@storybook/core-events@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.0-beta.14.tgz#acfc92fb539e7618983d537b213cc63046ac0635"
+  integrity sha512-l+gaX7mx73MI7YH4m2NlEWduHlxGCNfS4vdQo5ftwelo24jD72OgawkU3dg5aTiZ4zJivGqqSyZCYWPAkg+3jg==
   dependencies:
     core-js "^3.0.1"
 
-"@storybook/core@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.3.0-beta.13.tgz#27a4fc7b4f6d63e59256a175194beb80977aca55"
+"@storybook/core@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.3.0-beta.14.tgz#6d58c09e137814ae172289d54537e748c101e119"
+  integrity sha512-y+UBO1W7CmB4qG+ttNOyBcbo+tT9VGzl3eFrFQALf1AaF5/QkUcJKW4XU539etXzqC5vOT2LHIrXzi6jWgy5LA==
   dependencies:
     "@babel/plugin-proposal-class-properties" "^7.3.3"
     "@babel/plugin-proposal-object-rest-spread" "^7.3.2"
     "@babel/plugin-syntax-dynamic-import" "^7.2.0"
     "@babel/plugin-transform-react-constant-elements" "^7.2.0"
     "@babel/preset-env" "^7.4.5"
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/channel-postmessage" "5.3.0-beta.13"
-    "@storybook/client-api" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/node-logger" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
-    "@storybook/ui" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/channel-postmessage" "5.3.0-beta.14"
+    "@storybook/client-api" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/node-logger" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
+    "@storybook/ui" "5.3.0-beta.14"
     airbnb-js-shims "^2.2.1"
     ansi-to-html "^0.6.11"
     autoprefixer "^9.7.2"
@@ -1585,9 +1597,10 @@
     webpack-hot-middleware "^2.25.0"
     webpack-virtual-modules "^0.2.0"
 
-"@storybook/node-logger@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.3.0-beta.13.tgz#2809ead7389d1533ee46530fa811d24a05403006"
+"@storybook/node-logger@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.3.0-beta.14.tgz#64d76c8728b45387b28f853ed0ecb6a84e1f5687"
+  integrity sha512-e2qmSY20d9Llim8wUYfBn3KC3e24CQDRMymZC3K8NykkCpYpomCYHiImUbVuskw+nHnomsty/5ay7bieQxPAkQ==
   dependencies:
     chalk "^3.0.0"
     core-js "^3.0.1"
@@ -1595,9 +1608,10 @@
     pretty-hrtime "^1.0.3"
     regenerator-runtime "^0.13.3"
 
-"@storybook/node-logger@^5.2.6":
-  version "5.2.7"
-  resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.7.tgz#bdd5e9226790acd4a8280b74516d2b589e0c3a0b"
+"@storybook/node-logger@^5.2.7":
+  version "5.2.8"
+  resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.8.tgz#4a3df21d731014d54b9ca53d5b9a72dd350bb075"
+  integrity sha512-3TK5mx6VWbfJO+WUrqwPhTbTQ4qESTnwJY/02xPzOhvuC6tIG1QOxzi+Rq6rFlwxTpUuWh6iyDYnGIqFFQywkA==
   dependencies:
     chalk "^2.4.2"
     core-js "^3.0.1"
@@ -1605,30 +1619,33 @@
     pretty-hrtime "^1.0.3"
     regenerator-runtime "^0.12.1"
 
-"@storybook/postinstall@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-5.3.0-beta.13.tgz#aa3175d4072f650beb97f5f2e5205473113f42e5"
+"@storybook/postinstall@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-5.3.0-beta.14.tgz#a9d52c7b1b5e56806354272ccb7fd85c0af92539"
+  integrity sha512-/ATYbHZGsuM6MPgqo8Wy7vL0LX15omQVViTCEvR7R3r9NaIX1r3FN4dPPyHZof+m4ewfrRICkZzj1yqqdPtLkA==
   dependencies:
     core-js "^3.0.1"
 
-"@storybook/preset-create-react-app@^1.3.1":
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/@storybook/preset-create-react-app/-/preset-create-react-app-1.3.1.tgz#1a7cb7d58b64a2254c566f9907eab8340a531506"
+"@storybook/preset-create-react-app@^1.3.2":
+  version "1.3.2"
+  resolved "https://registry.yarnpkg.com/@storybook/preset-create-react-app/-/preset-create-react-app-1.3.2.tgz#b6ca0b36c15336565d8c6ce4477d3ae1f18a42a5"
+  integrity sha512-XLL8YWivDVNpv0cGrztEim6/2hVHqpHOc8f7ejbHLzZKttjDTMD+XFH/cOXImWka8V0A3qqT8WbPjExOsoz2CA==
   dependencies:
-    "@storybook/node-logger" "^5.2.6"
-    "@types/webpack" "^4.39.8"
-    react-docgen-typescript-loader "^3.3.0"
+    "@storybook/node-logger" "^5.2.7"
+    "@types/webpack" "^4.41.0"
+    react-docgen-typescript-loader "^3.6.0"
 
-"@storybook/react@^5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.3.0-beta.13.tgz#42838b2574accb4acdec58326c0ceeb4eb3726c8"
+"@storybook/react@^5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.3.0-beta.14.tgz#d4724c394948807e9c5156e7ff9cb4ee63d76d07"
+  integrity sha512-S/fBfLQ26zKvjeY2EDB2T0c/kaGszoL4SDqjCHWcDKjQXIN7E7T1lVz+7PzWcR4FD1fl85c3NbDstXA7WpXuFQ==
   dependencies:
     "@babel/plugin-transform-react-constant-elements" "^7.2.0"
     "@babel/preset-flow" "^7.0.0"
     "@babel/preset-react" "^7.0.0"
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/core" "5.3.0-beta.13"
-    "@storybook/node-logger" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/core" "5.3.0-beta.14"
+    "@storybook/node-logger" "5.3.0-beta.14"
     "@svgr/webpack" "^4.0.3"
     "@types/webpack-env" "^1.13.7"
     babel-plugin-add-react-displayname "^0.0.5"
@@ -1645,9 +1662,10 @@
     ts-dedent "^1.1.0"
     webpack "^4.33.0"
 
-"@storybook/router@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.0-beta.13.tgz#35607e7880ee0126fd3623ff374633b27f3e4f25"
+"@storybook/router@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.0-beta.14.tgz#7dbb5d9040eafb7c0550fce1ba580d1e8e4b4a22"
+  integrity sha512-LCROSpRMUhcu81z0nGynE5ot3OiMoQs9oO8w32bDqmAcNiNpEI/WTjiQx6NZzJGEYac+1cQlKpB5SJ33H4UX1A==
   dependencies:
     "@reach/router" "^1.2.1"
     "@types/reach__router" "^1.2.3"
@@ -1657,13 +1675,14 @@
     memoizerific "^1.11.3"
     qs "^6.6.0"
 
-"@storybook/source-loader@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.0-beta.13.tgz#78a68314710db5f641a999115f236f2a3e1d2357"
+"@storybook/source-loader@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.0-beta.14.tgz#045b981382fd88eca74622e476608d7b04219f46"
+  integrity sha512-g3z0hzm9KYwEjrYzRq4bBAtlz8AB2CW9mnhCkc8YGfdhSsVDPiuWJHyXRg0IjUqsRFMsB0EZLRjwWGU9PTr4GA==
   dependencies:
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
     core-js "^3.0.1"
     estraverse "^4.2.0"
     global "^4.3.2"
@@ -1682,13 +1701,14 @@
     shelljs "^0.8.1"
     yargs "^11.0.0"
 
-"@storybook/theming@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.0-beta.13.tgz#4d1ed90f546a7b4fb6625828996cb97095e0234b"
+"@storybook/theming@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.0-beta.14.tgz#2ef19dd41c17bc98766a92fe4502a432606288be"
+  integrity sha512-Youa90wxR0f2SSNrWikbysp3obddbvDm5cR+8WQlLH5kJFdqJyG1v3du4Ix6/R6480BVRl6keKu23sdkgzMtkg==
   dependencies:
     "@emotion/core" "^10.0.20"
     "@emotion/styled" "^10.0.17"
-    "@storybook/client-logger" "5.3.0-beta.13"
+    "@storybook/client-logger" "5.3.0-beta.14"
     core-js "^3.0.1"
     deep-object-diff "^1.1.0"
     emotion-theming "^10.0.19"
@@ -1699,19 +1719,20 @@
     resolve-from "^5.0.0"
     ts-dedent "^1.1.0"
 
-"@storybook/ui@5.3.0-beta.13":
-  version "5.3.0-beta.13"
-  resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.3.0-beta.13.tgz#453c106638b1cbb8810303e61323947c5867ee4c"
+"@storybook/ui@5.3.0-beta.14":
+  version "5.3.0-beta.14"
+  resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.3.0-beta.14.tgz#e5e7aac4fc16838b976d81d629f4017ed603298b"
+  integrity sha512-66bDZYWdx0MtGS5X7gqjmF8F3U+5V4WSsWDF7G8Jh0taGuUSl1A2FfKB1Gano8bPMeg1zwIwBceM26M7th410Q==
   dependencies:
     "@emotion/core" "^10.0.20"
-    "@storybook/addons" "5.3.0-beta.13"
-    "@storybook/api" "5.3.0-beta.13"
-    "@storybook/channels" "5.3.0-beta.13"
-    "@storybook/client-logger" "5.3.0-beta.13"
-    "@storybook/components" "5.3.0-beta.13"
-    "@storybook/core-events" "5.3.0-beta.13"
-    "@storybook/router" "5.3.0-beta.13"
-    "@storybook/theming" "5.3.0-beta.13"
+    "@storybook/addons" "5.3.0-beta.14"
+    "@storybook/api" "5.3.0-beta.14"
+    "@storybook/channels" "5.3.0-beta.14"
+    "@storybook/client-logger" "5.3.0-beta.14"
+    "@storybook/components" "5.3.0-beta.14"
+    "@storybook/core-events" "5.3.0-beta.14"
+    "@storybook/router" "5.3.0-beta.14"
+    "@storybook/theming" "5.3.0-beta.14"
     copy-to-clipboard "^3.0.8"
     core-js "^3.0.1"
     core-js-pure "^3.0.1"
@@ -1996,9 +2017,10 @@
     "@types/source-list-map" "*"
     source-map "^0.6.1"
 
-"@types/webpack@^4.39.8":
+"@types/webpack@^4.41.0":
   version "4.41.0"
   resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.0.tgz#b813a044d8b0dec7dfcd7622fdbe327bde06eb9a"
+  integrity sha512-tWkdf9nO0zFgAY/EumUKwrDUhraHKDqCPhwfFR/R8l0qnPdgb9le0Gzhvb7uzVpouuDGBgiE//ZdY+5jcZy2TA==
   dependencies:
     "@types/anymatch" "*"
     "@types/node" "*"
@@ -9902,9 +9924,10 @@ react-dev-utils@^9.0.0, react-dev-utils@^9.1.0:
     strip-ansi "5.2.0"
     text-table "0.2.0"
 
-react-docgen-typescript-loader@^3.3.0:
+react-docgen-typescript-loader@^3.6.0:
   version "3.6.0"
   resolved "https://registry.yarnpkg.com/react-docgen-typescript-loader/-/react-docgen-typescript-loader-3.6.0.tgz#5515f03f869e66d49e287c5f1e7ec10f2084f7bb"
+  integrity sha512-+uEsM3VYCdlcBGxF3tBqI5XWL1phvrh8dkiIfdpciKlM1BDHW+d82kKJI9hX6zk9H8TL+3Th/j/JAEaKb5FFNw==
   dependencies:
     "@webpack-contrib/schema-utils" "^1.0.0-beta.0"
     loader-utils "^1.2.3"

+ 5 - 3
src/index.ts

@@ -1,3 +1,5 @@
-export { default as PhotoProvider } from './PhotoProvider';
-export { default as PhotoConsumer } from './PhotoConsumer';
-export { default as PhotoSlider } from './PhotoSlider';
+import PhotoProvider from './PhotoProvider';
+import PhotoConsumer from './PhotoConsumer';
+import PhotoSlider from './PhotoSlider';
+
+export { PhotoProvider, PhotoConsumer, PhotoSlider };