This commit is contained in:
streamich 2018-11-06 17:45:47 +00:00
parent 88cdd0a3c6
commit fdd3e1b380
112 changed files with 257 additions and 439 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,27 +1,60 @@
<!DOCTYPE html>
<html>
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><base target="_parent"><style>:not(.sb-show-main) > .sb-main,
:not(.sb-show-nopreview) > .sb-nopreview,
:not(.sb-show-errordisplay) > .sb-errordisplay {
display: none;
}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<base target="_parent">
<script>
if (window.parent !== window) {
try {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
} catch (error) {
// The above line can throw if we do not have access to the parent frame -- i.e. cross origin
}
}
</script>
<title>Storybook</title>
</head>
.sb-wrapper {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
-webkit-font-smoothing: antialiased;
}
<body>
<div id="root"></div>
<div id="error-display"></div>
<script type="text/javascript" src="static/preview.43a4ea63792739e6dc1a.bundle.js"></script></body>
.sb-heading {
font-size: 20px;
font-weight: 600;
letter-spacing: 0.2px;
margin: 10px 0;
}
</html>
.sb-nopreview {
display: flex;
align-content: center;
justify-content: center;
}
.sb-nopreview_main {
margin: auto;
padding: 30px;
border-radius: 10px;
background: rgba(0,0,0,0.03);
}
.sb-nopreview_heading {
text-align: center;
}
.sb-errordisplay {
background-color: rgb(187, 49, 49);
color: #FFF;
}
.sb-errordisplay_code {
font-size: 14px;
width: 100vw;
overflow: auto;
}</style><script>try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the storybook config.</li><li>Try reloading the page.</li></ul></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code">
<code id="error-stack"></code>
</pre></div><div id="root"></div><script src="static/runtime~iframe.36305751f78a2d599ec4.bundle.js"></script><script src="static/vendors~iframe.6a84322de27234ee85a7.bundle.js"></script><script src="static/iframe.72b7a4602dc99f613727.bundle.js"></script></body></html>

View File

@ -1,44 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="storybook-version" content="3.4.11">
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<title>Storybook</title>
<style>
/*
When resizing panels, the drag event breaks if the cursor
moves over the iframe. Add the 'dragging' class to the body
at drag start and remove it when the drag ends.
*/
.dragging iframe {
pointer-events: none;
}
/* Styling the fuzzy search box placeholders */
.searchBox::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #ddd;
font-size: 16px;
}
.searchBox::-moz-placeholder { /* Firefox 19+ */
color: #ddd;
font-size: 16px;
}
.searchBox:focus{
border-color: #EEE !important;
}
.btn:hover{
background-color: #eee
}
</style>
</head>
<body style="margin: 0;">
<div id="root"></div>
<script type="text/javascript" src="static/manager.1f5adb20f50c718f61cb.bundle.js"></script></body>
</html>
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><style>html, body {
overflow: hidden;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}</style><script>try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div id="root"></div><script src="static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js"></script><script src="static/manager.b1c6c1f9dbc1f004a222.bundle.js"></script></body></html>

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

View File

@ -1 +0,0 @@
export {};

2
lib/createMemo.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const createMemo: (fn: any) => (...args: any[]) => {};
export default createMemo;

View File

@ -1,7 +0,0 @@
export interface RouterProviderProps {
route: string;
fullRoute?: string;
parent?: any;
}
declare const createRouter: () => void;
export default createRouter;

46
lib/index.d.ts vendored
View File

@ -1,46 +0,0 @@
import createMemo from './createMemo';
import useAdopt from './useAdopt';
import useAsync from './useAsync';
import useAudio from './useAudio';
import useBattery from './useBattery';
import useBoolean from './useBoolean';
import useCallbag from './useCallbag';
import useCounter from './useCounter';
import useCss from './useCss';
import useFavicon from './useFavicon';
import useGeolocation from './useGeolocation';
import useGetSet from './useGetSet';
import useGetSetState from './useGetSetState';
import useHover from './useHover';
import useHoverDirty from './useHoverDirty';
import useIdle from './useIdle';
import useLifecycles from './useLifecycles';
import useList from './useList';
import useLocalStorage from './useLocalStorage';
import useLocation from './useLocation';
import useLogger from './useLogger';
import useMap from './useMap';
import useMedia from './useMedia';
import useMediaDevices from './useMediaDevices';
import useMotion from './useMotion';
import useMount from './useMount';
import useNetwork from './useNetwork';
import useNumber from './useNumber';
import useObservable from './useObservable';
import useOrientation from './useOrientation';
import useOutsideClick from './useOutsideClick';
import useRaf from './useRaf';
import useRenderProp from './useRenderProp';
import useSetState from './useSetState';
import useSize from './useSize';
import useSpeech from './useSpeech';
import useSpring from './useSpring';
import useTimeout from './useTimeout';
import useTitle from './useTitle';
import useToggle from './useToggle';
import useTween from './useTween';
import useUnmount from './useUnmount';
import useUpdate from './useUpdate';
import useVideo from './useVideo';
import useWindowSize from './useWindowSize';
export { createMemo, useAdopt, useAsync, useAudio, useBattery, useBoolean, useCallbag, useCounter, useCss, useFavicon, useGeolocation, useGetSet, useGetSetState, useHover, useHoverDirty, useIdle, useLifecycles, useList, useLocalStorage, useLocation, useLogger, useMap, useMedia, useMediaDevices, useMotion, useMount, useNetwork, useNumber, useObservable, useOrientation, useOutsideClick, useRaf, useRenderProp, useSetState, useSize, useSpeech, useSpring, useTimeout, useTitle, useToggle, useTween, useUnmount, useUpdate, useVideo, useWindowSize, };

13
lib/react.d.ts vendored
View File

@ -1,13 +0,0 @@
export declare type UseState = <T>(initialState: T | (() => T)) => [T, (newState: T | ((newState: any) => T)) => void];
export declare const useState: UseState;
export declare type UseEffect = (didUpdate: () => ((() => void) | void), params?: any[]) => void;
export declare const useEffect: UseEffect;
export interface ReactRef<T> {
current: T;
}
export declare type UseRef = <T>(initialValue: T) => ReactRef<T>;
export declare const useRef: UseRef;
export declare type UseCallback = <T extends ((...args: any[]) => any)>(callback: T, args: any[]) => T;
export declare const useCallback: UseCallback;
export declare type UseMemo = <T>(fn: Function, args: any[]) => T;
export declare const useMemo: UseMemo;

5
lib/useAdopt.d.ts vendored
View File

@ -1,5 +0,0 @@
import * as React from 'react';
declare const useAdopt: <T extends {
[key: string]: any[];
}>(map: { [key in keyof T]: React.ReactElement<any>; }) => [React.ReactElement<any>, T];
export default useAdopt;

7
lib/useAsync.d.ts vendored
View File

@ -1,7 +0,0 @@
export interface AsyncState<T> {
loading: boolean;
error?: Error | any;
value?: T;
}
declare const useAsync: <T>(fn: () => Promise<T>, args?: any) => AsyncState<T>;
export default useAsync;

3
lib/useAudio.d.ts vendored
View File

@ -1,3 +0,0 @@
/// <reference types="react" />
declare const useAudio: (elOrProps: import("./util/createHTMLMediaHook").HTMLMediaProps | import("react").ReactElement<import("./util/createHTMLMediaHook").HTMLMediaProps>) => [import("react").ReactElement<import("./util/createHTMLMediaHook").HTMLMediaProps>, import("./util/createHTMLMediaHook").HTMLMediaState, import("./util/createHTMLMediaHook").HTMLMediaControls, import("./react").ReactRef<HTMLAudioElement | null>];
export default useAudio;

8
lib/useBattery.d.ts vendored
View File

@ -1,8 +0,0 @@
export interface BatterySensorState {
charging: boolean;
level: number;
chargingTime: number;
dischargingTime: number;
}
declare const useBattery: () => {};
export default useBattery;

2
lib/useBoolean.d.ts vendored
View File

@ -1,2 +0,0 @@
import useBoolean from './useToggle';
export default useBoolean;

2
lib/useCallbag.d.ts vendored
View File

@ -1,2 +0,0 @@
import useCallbag from 'use-callbag';
export default useCallbag;

9
lib/useCounter.d.ts vendored
View File

@ -1,9 +0,0 @@
export interface CounterActions {
inc: (delta?: number) => void;
dec: (delta?: number) => void;
get: () => number;
set: (value: number) => void;
reset: (value?: number) => void;
}
declare const useCounter: (initialValue?: number) => [number, CounterActions];
export default useCounter;

7
lib/useCss.d.ts vendored
View File

@ -1,7 +0,0 @@
export interface CssPipe {
className: string;
css: (css: object) => void;
remove: () => void;
}
declare const useCss: (css: object) => string;
export default useCss;

View File

@ -1,3 +0,0 @@
import * as React from 'react';
declare const useDropArea: (el: React.ReactElement<any>) => void;
export default useDropArea;

2
lib/useFavicon.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useFavicon: (href: string) => void;
export default useFavicon;

View File

@ -1,21 +0,0 @@
export interface GeoLocationSensorState {
accuracy: number;
altitude: number;
altitudeAccuracy: number;
heading: number;
latitude: number;
longitude: number;
speed: number;
timestamp: number;
}
declare const useGeolocation: () => {
accuracy: null;
altitude: null;
altitudeAccuracy: null;
heading: null;
latitude: null;
longitude: null;
speed: null;
timestamp: number;
};
export default useGeolocation;

2
lib/useGetSet.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useGetSet: <T>(initialValue: T) => [() => T, (value: T) => void];
export default useGetSet;

View File

@ -1,2 +0,0 @@
declare const useGetSetState: <T extends object>(initialState?: T) => [() => T, (patch: Partial<T>) => void];
export default useGetSetState;

4
lib/useHover.d.ts vendored
View File

@ -1,4 +0,0 @@
import * as React from 'react';
export declare type Element = ((state: boolean) => React.ReactElement<any>) | React.ReactElement<any>;
declare const useHover: (element: Element) => [React.ReactElement<any>, boolean];
export default useHover;

View File

@ -1,2 +0,0 @@
declare const useHoverDirty: (ref: any) => boolean;
export default useHoverDirty;

2
lib/useIdle.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useIdle: (ms?: number, initialState?: boolean, events?: string[]) => boolean;
export default useIdle;

View File

@ -1,2 +0,0 @@
declare const useLifecycles: (mount: any, unmount?: any) => void;
export default useLifecycles;

8
lib/useList.d.ts vendored
View File

@ -1,8 +0,0 @@
export interface Actions<T> {
set: (list: T[]) => void;
push: (item: T) => void;
filter: (fn: (value: T) => boolean) => void;
sort: (fn?: (a: T, b: T) => number) => void;
}
declare const useList: <T>(initialList?: T[]) => [T[], Actions<T>];
export default useList;

View File

@ -1,2 +0,0 @@
declare const useLocalStorage: <T>(key: string, initialValue?: T | undefined, raw?: boolean | undefined) => [T, (value: T) => void];
export default useLocalStorage;

16
lib/useLocation.d.ts vendored
View File

@ -1,16 +0,0 @@
export interface LocationSensorState {
trigger: string;
state?: any;
length?: number;
hash?: string;
host?: string;
hostname?: string;
href?: string;
origin?: string;
pathname?: string;
port?: string;
protocol?: string;
search?: string;
}
declare const useLocation: () => LocationSensorState;
export default useLocation;

2
lib/useLogger.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useLogger: (name: any, props: any) => void;
export default useLogger;

10
lib/useMap.d.ts vendored
View File

@ -1,10 +0,0 @@
export interface Actions<K, V> {
get: (key: K) => any;
set: (key: K, value: V) => void;
remove: (key: K) => void;
reset: () => void;
}
declare const useMap: <T extends {
[key: string]: any;
}>(initialMap?: any) => [T, Actions<string, any>];
export default useMap;

2
lib/useMedia.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useMedia: (query: string, defaultState?: boolean) => boolean;
export default useMedia;

View File

@ -1,2 +0,0 @@
declare const useMediaDevices: () => {};
export default useMediaDevices;

20
lib/useMotion.d.ts vendored
View File

@ -1,20 +0,0 @@
export interface MotionSensorState {
acceleration: {
x: number | null;
y: number | null;
z: number | null;
};
accelerationIncludingGravity: {
x: number | null;
y: number | null;
z: number | null;
};
rotationRate: {
alpha: number | null;
beta: number | null;
gamma: number | null;
};
interval: number | null;
}
declare const useMotion: (initialState?: MotionSensorState) => MotionSensorState;
export default useMotion;

2
lib/useMount.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useMount: (mount: any) => void;
export default useMount;

11
lib/useNetwork.d.ts vendored
View File

@ -1,11 +0,0 @@
export interface NetworkState {
online?: boolean;
since?: Date;
downlink?: number;
downlinkMax?: number;
effectiveType?: string;
rtt?: number;
type?: string;
}
declare const useNetwork: (initialState?: NetworkState) => NetworkState;
export default useNetwork;

2
lib/useNumber.d.ts vendored
View File

@ -1,2 +0,0 @@
import useNumber from './useCounter';
export default useNumber;

View File

@ -1,2 +0,0 @@
declare const useObservable: <T>(observable$: any, initialValue?: T | undefined) => T | undefined;
export default useObservable;

View File

@ -1,6 +0,0 @@
export interface OrientationState {
angle: number;
type: string;
}
declare const useOrientation: (initialState?: OrientationState) => OrientationState;
export default useOrientation;

View File

@ -1,2 +0,0 @@
import useOutsideClick from 'use-onclickoutside';
export default useOutsideClick;

2
lib/useRaf.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useRaf: (ms?: number, delay?: number) => number;
export default useRaf;

View File

@ -1,3 +0,0 @@
import * as React from 'react';
declare const useRenderProp: (element: React.ReactElement<any>) => [React.ReactElement<any>, any[]];
export default useRenderProp;

View File

@ -1,2 +0,0 @@
declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Function | Partial<T>) => void];
export default useSetState;

8
lib/useSize.d.ts vendored
View File

@ -1,8 +0,0 @@
import * as React from 'react';
export declare type Element = ((state: State) => React.ReactElement<any>) | React.ReactElement<any>;
export interface State {
width: number;
height: number;
}
declare const useSize: (element: Element, { width, height }?: Partial<State>) => [React.ReactElement<any>, State];
export default useSize;

13
lib/useSpeech.d.ts vendored
View File

@ -1,13 +0,0 @@
export interface SpeechState {
isPlaying: boolean;
volume: number;
}
export interface SpeechOptions {
lang?: any;
pitch?: number;
rate?: number;
voice?: any;
volume?: number;
}
declare const useSpeech: (text: string, opts?: SpeechOptions) => SpeechState;
export default useSpeech;

2
lib/useSpring.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useSpring: (targetValue?: number, tension?: number, friction?: number) => number;
export default useSpring;

2
lib/useTimeout.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useTimeout: (ms?: number) => boolean;
export default useTimeout;

2
lib/useTitle.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useTitle: (title: string) => void;
export default useTitle;

4
lib/useToggle.d.ts vendored
View File

@ -1,4 +0,0 @@
export declare type UseToggle = (state: boolean) => [boolean, // state
(nextValue?: boolean) => void];
declare const useToggle: UseToggle;
export default useToggle;

3
lib/useTween.d.ts vendored
View File

@ -1,3 +0,0 @@
export declare type Easing = (t: number) => number;
declare const useTween: (easingName?: string, ms?: number, delay?: number) => number;
export default useTween;

2
lib/useUnmount.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useUnmount: (unmount: any) => void;
export default useUnmount;

2
lib/useUpdate.d.ts vendored
View File

@ -1,2 +0,0 @@
declare const useUpdate: () => () => void;
export default useUpdate;

3
lib/useVideo.d.ts vendored
View File

@ -1,3 +0,0 @@
/// <reference types="react" />
declare const useVideo: (elOrProps: import("./util/createHTMLMediaHook").HTMLMediaProps | import("react").ReactElement<import("./util/createHTMLMediaHook").HTMLMediaProps>) => [import("react").ReactElement<import("./util/createHTMLMediaHook").HTMLMediaProps>, import("./util/createHTMLMediaHook").HTMLMediaState, import("./util/createHTMLMediaHook").HTMLMediaControls, import("./react").ReactRef<HTMLAudioElement | null>];
export default useVideo;

View File

@ -1,5 +0,0 @@
declare const useWindowSize: (initialWidth?: number, initialHeight?: number) => {
width: number;
height: number;
};
export default useWindowSize;

3
lib/util.d.ts vendored
View File

@ -1,3 +0,0 @@
export declare const isClient: boolean;
export declare const on: (obj: any, ...args: any[]) => any;
export declare const off: (obj: any, ...args: any[]) => any;

View File

@ -1,3 +0,0 @@
import * as React from 'react';
declare const ShowDocs: (props: any) => React.DetailedReactHTMLElement<{}, HTMLElement>;
export default ShowDocs;

View File

@ -1,23 +0,0 @@
import * as React from 'react';
import { ReactRef } from '../react';
export interface HTMLMediaProps extends React.AudioHTMLAttributes<any>, React.VideoHTMLAttributes<any> {
src: string;
}
export interface HTMLMediaState {
buffered: any[];
duration: number;
isPlaying: boolean;
muted: boolean;
time: number;
volume: number;
}
export interface HTMLMediaControls {
play: () => Promise<void> | void;
pause: () => void;
mute: () => void;
unmute: () => void;
volume: (volume: number) => void;
seek: (time: number) => void;
}
declare const createHTMLMediaHook: (tag: "audio" | "video") => (elOrProps: HTMLMediaProps | React.ReactElement<HTMLMediaProps>) => [React.ReactElement<HTMLMediaProps>, HTMLMediaState, HTMLMediaControls, ReactRef<HTMLAudioElement | null>];
export default createHTMLMediaHook;

View File

@ -1,5 +0,0 @@
declare const parseTimeRanges: (ranges: any) => {
start: number;
end: number;
}[];
export default parseTimeRanges;

Some files were not shown because too many files have changed in this diff Show More