mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Merge branch 'next' into dependabot/npm_and_yarn/simplebar-react-0.1.5
This commit is contained in:
commit
dc89f3ffe4
57
CHANGELOG.md
57
CHANGELOG.md
@ -1,3 +1,50 @@
|
||||
## 5.0.5 (March 25, 2019)
|
||||
|
||||
Bump version number (same as 5.0.4, but need to make this `latest` again!)
|
||||
|
||||
## 3.4.12 (March 24, 2019)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* UI: Workaround broken treebeard animations ([#6249](https://github.com/storybooks/storybook/pull/6249))
|
||||
|
||||
## 5.0.4 (March 24, 2019)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* UI: Fix tooltip event bindings, logger import ([#6238](https://github.com/storybooks/storybook/pull/6238))
|
||||
* CLI: Fix stories regexp in config.js ([#6180](https://github.com/storybooks/storybook/pull/6180))
|
||||
* Accessibilty: Add missing button titles ([#6124](https://github.com/storybooks/storybook/pull/6124))
|
||||
* React: Fix forked CRA support on Windows ([#6236](https://github.com/storybooks/storybook/pull/6236))
|
||||
* Addon-knkobs: Fix color type button z-index ([#6203](https://github.com/storybooks/storybook/pull/6203))
|
||||
* Angular: Fix typo in demo example ([#6193](https://github.com/storybooks/storybook/pull/6193))
|
||||
* Addon-Info: Restore fonts and color styling ([#6186](https://github.com/storybooks/storybook/pull/6186))
|
||||
* Addon-knobs: Fix ObjectType knob react warning ([#6159](https://github.com/storybooks/storybook/pull/6159))
|
||||
* Core: Add core-js as a dep to client-api ([#6209](https://github.com/storybooks/storybook/pull/6209))
|
||||
* React: Fix logging in cra-config ([#6245](https://github.com/storybooks/storybook/pull/6245))
|
||||
|
||||
## 4.1.16 (March 24, 2019)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* UI: Workaround broken treebeard animations ([#6249](https://github.com/storybooks/storybook/pull/6249))
|
||||
|
||||
## 4.1.15 (March 24, 2019)
|
||||
|
||||
NPM publish failed
|
||||
|
||||
## 5.1.0-alpha.13 (March 23, 2019)
|
||||
|
||||
### Features
|
||||
|
||||
* Svelte: add svelte cli generator ([#6132](https://github.com/storybooks/storybook/pull/6132))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Addon-knobs: Fix ObjectType knob react warning ([#6159](https://github.com/storybooks/storybook/pull/6159))
|
||||
* React: Fix forked CRA support on Windows ([#6236](https://github.com/storybooks/storybook/pull/6236))
|
||||
* UI: Fix tooltip event bindings, logger import ([#6238](https://github.com/storybooks/storybook/pull/6238))
|
||||
|
||||
## 5.1.0-alpha.12 (March 22, 2019)
|
||||
|
||||
### Bug Fixes
|
||||
@ -51,6 +98,16 @@
|
||||
* Bump ember-cli from 3.7.1 to 3.8.1 ([#6142](https://github.com/storybooks/storybook/pull/6142))
|
||||
* Bump markdown-to-jsx from 6.9.1 to 6.9.3 ([#6139](https://github.com/storybooks/storybook/pull/6139))
|
||||
|
||||
## 5.0.3 (March 18, 2019)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Accessibility: Add missing button titles ([#6124](https://github.com/storybooks/storybook/pull/6124))
|
||||
|
||||
### Maintenance
|
||||
|
||||
* UI: Make update notifications much less aggressive ([#6143](https://github.com/storybooks/storybook/pull/6143))
|
||||
|
||||
## 5.1.0-alpha.9 (March 18, 2019)
|
||||
|
||||
### Maintenance
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "a11y addon for storybook",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -26,12 +26,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"axe-core": "^3.2.2",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Action Logger addon for storybook",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,11 +21,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -25,12 +25,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"memoizerific": "^1.11.3",
|
||||
"react": "^16.8.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-centered",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook decorator to center components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-cssresources",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A storybook addon to switch between css resources at runtime for your story",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -25,10 +25,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.4"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-events",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Add events to your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,9 +24,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"format-json": "^1.0.3",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-google-analytics",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook addon for google analytics",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -20,8 +20,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"react-ga": "^2.5.7"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-graphql",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook addon to display the GraphiQL IDE",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-info",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A Storybook addon to show additional information for your stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,10 +22,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"marksy": "^6.1.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,10 +28,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-knobs",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook Addon Prop Editor Component",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,10 +22,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"copy-to-clipboard": "^3.0.8",
|
||||
"core-js": "^2.6.5",
|
||||
"escape-html": "^1.0.3",
|
||||
|
@ -5,8 +5,14 @@ import { polyfill } from 'react-lifecycles-compat';
|
||||
import { Form } from '@storybook/components';
|
||||
|
||||
class ObjectType extends Component {
|
||||
state = {
|
||||
value: {},
|
||||
failed: false,
|
||||
json: '',
|
||||
};
|
||||
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
if (!state || !deepEqual(props.knob.value, state.json)) {
|
||||
if (!deepEqual(props.knob.value, state.json)) {
|
||||
try {
|
||||
return {
|
||||
value: JSON.stringify(props.knob.value, null, 2),
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Story Links addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -17,14 +17,14 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"jsnext:main": "src/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -2,4 +2,6 @@ export const ADDON_ID = 'storybook/links';
|
||||
|
||||
export default {
|
||||
NAVIGATE: `${ADDON_ID}/navigate`,
|
||||
REQUEST: `${ADDON_ID}/request`,
|
||||
RECEIVE: `${ADDON_ID}/receive`,
|
||||
};
|
@ -3,7 +3,7 @@ import { linkTo, hrefTo, withLinks } from './preview';
|
||||
|
||||
let hasWarned = false;
|
||||
|
||||
export function LinkTo() {
|
||||
export function LinkTo(): null {
|
||||
if (!hasWarned) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(stripIndents`
|
@ -1,11 +1,18 @@
|
||||
import { SyntheticEvent } from 'react';
|
||||
import { document } from 'global';
|
||||
import qs from 'qs';
|
||||
import addons from '@storybook/addons';
|
||||
import { SELECT_STORY, STORY_CHANGED } from '@storybook/core-events';
|
||||
import { toId } from '@storybook/router/utils';
|
||||
import { toId } from '@storybook/router';
|
||||
|
||||
export const navigate = params => addons.getChannel().emit(SELECT_STORY, params);
|
||||
const generateUrl = id => {
|
||||
interface Params {
|
||||
kind: string;
|
||||
story: string;
|
||||
}
|
||||
|
||||
export const navigate = (params: Params) => addons.getChannel().emit(SELECT_STORY, params);
|
||||
|
||||
const generateUrl = (id: string) => {
|
||||
const { location } = document;
|
||||
const query = qs.parse(location.search, { ignoreQueryPrefix: true });
|
||||
return `${location.origin + location.pathname}?${qs.stringify(
|
||||
@ -14,9 +21,10 @@ const generateUrl = id => {
|
||||
)}`;
|
||||
};
|
||||
|
||||
const valueOrCall = args => value => (typeof value === 'function' ? value(...args) : value);
|
||||
const valueOrCall = (args: string[]) => (value: string | ((...args: string[]) => string)) =>
|
||||
typeof value === 'function' ? value(...args) : value;
|
||||
|
||||
export const linkTo = (kind, story) => (...args) => {
|
||||
export const linkTo = (kind: string, story?: string) => (...args: string[]) => {
|
||||
const resolver = valueOrCall(args);
|
||||
navigate({
|
||||
kind: resolver(kind),
|
||||
@ -24,13 +32,13 @@ export const linkTo = (kind, story) => (...args) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const hrefTo = (kind, name) =>
|
||||
export const hrefTo = (kind: string, name: string): Promise<string> =>
|
||||
new Promise(resolve => {
|
||||
resolve(generateUrl(toId(kind, name)));
|
||||
});
|
||||
|
||||
const linksListener = e => {
|
||||
const { sbKind: kind, sbStory: story } = e.target.dataset;
|
||||
const linksListener = (e: SyntheticEvent<HTMLLinkElement>) => {
|
||||
const { sbKind: kind, sbStory: story } = e.currentTarget.dataset;
|
||||
if (kind || story) {
|
||||
e.preventDefault();
|
||||
navigate({ kind, story });
|
||||
@ -52,7 +60,7 @@ const off = () => {
|
||||
}
|
||||
};
|
||||
|
||||
export const withLinks = storyFn => {
|
||||
export const withLinks = (storyFn: () => void) => {
|
||||
on();
|
||||
addons.getChannel().once(STORY_CHANGED, off);
|
||||
return storyFn();
|
@ -4,7 +4,7 @@ import addons from '@storybook/addons';
|
||||
|
||||
import { SELECT_STORY } from '@storybook/core-events';
|
||||
import { mockChannel } from '../../preview.test';
|
||||
import LinkTo from './link';
|
||||
import LinkTo from './link.tsx';
|
||||
|
||||
jest.mock('@storybook/addons');
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { navigate, hrefTo } from '../../preview';
|
||||
|
||||
@ -9,32 +8,42 @@ import { navigate, hrefTo } from '../../preview';
|
||||
// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
|
||||
const LEFT_BUTTON = 0;
|
||||
|
||||
const isPlainLeftClick = e =>
|
||||
const isPlainLeftClick = (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) =>
|
||||
e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
|
||||
|
||||
const cancelled = (e, cb = () => {}) => {
|
||||
const cancelled = (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, cb = (_e: any) => {}) => {
|
||||
if (isPlainLeftClick(e)) {
|
||||
e.preventDefault();
|
||||
cb(e);
|
||||
}
|
||||
};
|
||||
|
||||
export default class LinkTo extends PureComponent {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
interface Props {
|
||||
kind: string;
|
||||
story: string;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
this.state = {
|
||||
href: '/',
|
||||
};
|
||||
interface State {
|
||||
href: string;
|
||||
}
|
||||
|
||||
this.handleClick = this.handleClick.bind(this);
|
||||
}
|
||||
export default class LinkTo extends PureComponent<Props, State> {
|
||||
defaultProps: Props = {
|
||||
kind: null,
|
||||
story: null,
|
||||
children: undefined,
|
||||
};
|
||||
|
||||
state: State = {
|
||||
href: '/',
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.updateHref();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
const { kind, story } = this.props;
|
||||
|
||||
if (prevProps.kind !== kind || prevProps.story !== story) {
|
||||
@ -42,15 +51,15 @@ export default class LinkTo extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
async updateHref() {
|
||||
updateHref = async () => {
|
||||
const { kind, story } = this.props;
|
||||
const href = await hrefTo(kind, story);
|
||||
this.setState({ href });
|
||||
}
|
||||
};
|
||||
|
||||
handleClick() {
|
||||
handleClick = () => {
|
||||
navigate(this.props);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { kind, story, children, ...rest } = this.props;
|
||||
@ -63,15 +72,3 @@ export default class LinkTo extends PureComponent {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
LinkTo.defaultProps = {
|
||||
kind: null,
|
||||
story: null,
|
||||
children: undefined,
|
||||
};
|
||||
|
||||
LinkTo.propTypes = {
|
||||
kind: PropTypes.string,
|
||||
story: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
};
|
@ -1 +0,0 @@
|
||||
export default from './components/link';
|
2
addons/links/src/react/index.ts
Normal file
2
addons/links/src/react/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
import LinkTo from './components/link';
|
||||
export default LinkTo;
|
1
addons/links/src/typings.d.ts
vendored
Normal file
1
addons/links/src/typings.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
declare module 'global';
|
13
addons/links/tsconfig.json
Normal file
13
addons/links/tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"types": ["webpack-env"]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"src/__tests__/**/*"
|
||||
]
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-notes",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,12 +23,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"markdown-to-jsx": "^6.9.3",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-backgrounds",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,7 +24,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-knobs",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Display storybook story knobs on your deviced.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,8 +21,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"deep-equal": "^1.0.1",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-notes",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -19,7 +19,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-native-simple-markdown": "^1.1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-options",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Options addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,7 +21,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -25,7 +25,7 @@
|
||||
"storybook": "start-storybook -p 6006"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"glob": "^7.1.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -16,7 +16,7 @@ function integrityTest(integrityOptions, stories2snapsConverter) {
|
||||
const possibleStoriesFiles = stories2snapsConverter.getPossibleStoriesFiles(fileName);
|
||||
return !possibleStoriesFiles.some(fs.existsSync);
|
||||
});
|
||||
expect(abandonedStoryshots).toHaveLength(0);
|
||||
expect(abandonedStoryshots.length).toBe(0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots-puppeteer",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Image snappshots addition to StoryShots base on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,8 +22,8 @@
|
||||
"prepare": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/node-logger": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/node-logger": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"jest-image-snapshot": "^2.8.1",
|
||||
"puppeteer": "^1.12.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Stories addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,10 +22,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"estraverse": "^4.2.0",
|
||||
"loader-utils": "^1.2.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook addon to change the viewport size to mobile",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,11 +21,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"memoizerific": "^1.11.3",
|
||||
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import memoize from 'memoizerific';
|
||||
import deprecate from 'util-deprecate';
|
||||
|
||||
import { Global } from '@storybook/theming';
|
||||
import { styled, Global } from '@storybook/theming';
|
||||
|
||||
import { Icons, IconButton, WithTooltip, TooltipLinkList } from '@storybook/components';
|
||||
import { SET_STORIES } from '@storybook/core-events';
|
||||
@ -88,6 +88,34 @@ const getState = memoize(10)((props, state, change) => {
|
||||
};
|
||||
});
|
||||
|
||||
const ActiveViewportSize = styled.div(() => ({
|
||||
display: 'inline-flex',
|
||||
}));
|
||||
|
||||
const ActiveViewportLabel = styled.div(({ theme }) => ({
|
||||
display: 'inline-block',
|
||||
textDecoration: 'none',
|
||||
padding: '10px',
|
||||
fontWeight: theme.typography.weight.bold,
|
||||
fontSize: theme.typography.size.s2 - 1,
|
||||
lineHeight: 1,
|
||||
height: 40,
|
||||
border: 'none',
|
||||
borderTop: '3px solid transparent',
|
||||
borderBottom: '3px solid transparent',
|
||||
background: 'transparent',
|
||||
}));
|
||||
|
||||
const IconButtonWithLabel = styled(IconButton)(() => ({
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
}));
|
||||
|
||||
const IconButtonLabel = styled.div(({ theme }) => ({
|
||||
fontSize: theme.typography.size.s2 - 1,
|
||||
marginLeft: '10px',
|
||||
}));
|
||||
|
||||
export default class ViewportTool extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -118,11 +146,34 @@ export default class ViewportTool extends Component {
|
||||
|
||||
change = (...args) => this.setState(...args);
|
||||
|
||||
flipViewport = () =>
|
||||
this.setState(({ isRotated }) => ({ isRotated: !isRotated, expanded: false }));
|
||||
|
||||
resetViewport = e => {
|
||||
e.stopPropagation();
|
||||
e.nativeEvent.stopImmediatePropagation();
|
||||
|
||||
this.setState({ selected: undefined, expanded: false });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { expanded } = this.state;
|
||||
const { items, selected, isRotated } = getState(this.props, this.state, this.change);
|
||||
const item = items.find(i => i.id === selected);
|
||||
|
||||
let viewportX = 0;
|
||||
let viewportY = 0;
|
||||
let viewportTitle = '';
|
||||
if (item) {
|
||||
const height = item.value.height.replace('px', '');
|
||||
const width = item.value.width.replace('px', '');
|
||||
|
||||
viewportX = isRotated ? height : width;
|
||||
viewportY = isRotated ? width : height;
|
||||
|
||||
viewportTitle = isRotated ? `${item.title} (L)` : `${item.title} (P)`;
|
||||
}
|
||||
|
||||
return items.length ? (
|
||||
<Fragment>
|
||||
{item ? (
|
||||
@ -150,10 +201,25 @@ export default class ViewportTool extends Component {
|
||||
tooltip={<TooltipLinkList links={items} />}
|
||||
closeOnClick
|
||||
>
|
||||
<IconButton key="viewport" title="Change the size of the preview" active={!!item}>
|
||||
<IconButtonWithLabel
|
||||
key="viewport"
|
||||
title="Change the size of the preview"
|
||||
active={!!item}
|
||||
onDoubleClick={e => this.resetViewport(e)}
|
||||
>
|
||||
<Icons icon="grow" />
|
||||
</IconButton>
|
||||
<IconButtonLabel>{viewportTitle}</IconButtonLabel>
|
||||
</IconButtonWithLabel>
|
||||
</WithTooltip>
|
||||
{item ? (
|
||||
<ActiveViewportSize>
|
||||
<ActiveViewportLabel title="Viewport width">{viewportX}</ActiveViewportLabel>
|
||||
<IconButton key="viewport-rotate" title="Rotate viewport" onClick={this.flipViewport}>
|
||||
<Icons icon="transfer" />
|
||||
</IconButton>
|
||||
<ActiveViewportLabel title="Viewport height">{viewportY}</ActiveViewportLabel>
|
||||
</ActiveViewportSize>
|
||||
) : null}
|
||||
</Fragment>
|
||||
) : null;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,8 +26,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/node-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"@storybook/node-logger": "5.1.0-alpha.13",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"core-js": "^2.6.5",
|
||||
"fork-ts-checker-webpack-plugin": "^0.5.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
||||
"homepage": "https://github.com/storybooks/storybook/tree/master/app/ember",
|
||||
"bugs": {
|
||||
@ -24,7 +24,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/test-helpers": "^1.5.0",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/marko",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,7 +26,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/mithril",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Mithril: Develop Mithril Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/polymer",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Polymer: Develop Polymer components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native-server",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"keywords": [
|
||||
"react",
|
||||
@ -24,12 +24,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/ui": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.13",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/ui": "5.1.0-alpha.13",
|
||||
"commander": "^2.19.0",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.6.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"keywords": [
|
||||
"react",
|
||||
@ -23,11 +23,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/client-api": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.13",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"@storybook/client-api": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-native-swipe-gestures": "^1.0.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -29,8 +29,8 @@
|
||||
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/node-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"@storybook/node-logger": "5.1.0-alpha.13",
|
||||
"@svgr/webpack": "^4.0.3",
|
||||
"babel-plugin-named-asset-import": "^0.3.1",
|
||||
"babel-plugin-react-docgen": "^2.0.2",
|
||||
|
@ -3,6 +3,7 @@ import path from 'path';
|
||||
import semver from 'semver';
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
import { normalizeCondition } from 'webpack/lib/RuleSet';
|
||||
import { logger } from '@storybook/node-logger';
|
||||
|
||||
const cssExtensions = ['.css', '.scss', '.sass'];
|
||||
const cssModuleExtensions = ['.module.css', '.module.scss', '.module.sass'];
|
||||
@ -14,10 +15,37 @@ export function getReactScriptsPath({ noCache } = {}) {
|
||||
if (reactScriptsPath && !noCache) return reactScriptsPath;
|
||||
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const reactScriptsScriptPath = fs.realpathSync(
|
||||
let reactScriptsScriptPath = fs.realpathSync(
|
||||
path.join(appDirectory, '/node_modules/.bin/react-scripts')
|
||||
);
|
||||
|
||||
try {
|
||||
// Note: Since there is no symlink for .bin/react-scripts on Windows
|
||||
// we'll parse react-scripts file to find actual package path.
|
||||
// This is important if you use fork of CRA.
|
||||
|
||||
const pathIsNotResolved = /node_modules[\\/]\.bin[\\/]react-scripts/i.test(
|
||||
reactScriptsScriptPath
|
||||
);
|
||||
|
||||
if (pathIsNotResolved) {
|
||||
const content = fs.readFileSync(reactScriptsScriptPath, 'utf8');
|
||||
const packagePathMatch = content.match(
|
||||
/"\$basedir[\\/]([^\s]+?[\\/]bin[\\/]react-scripts\.js")/i
|
||||
);
|
||||
|
||||
if (packagePathMatch && packagePathMatch.length > 1) {
|
||||
reactScriptsScriptPath = path.join(
|
||||
appDirectory,
|
||||
'/node_modules/.bin/',
|
||||
packagePathMatch[1]
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warn(`Error occured during react-scripts package path resolving: ${e}`);
|
||||
}
|
||||
|
||||
reactScriptsPath = path.join(reactScriptsScriptPath, '../..');
|
||||
const scriptsPkgJson = path.join(reactScriptsPath, 'package.json');
|
||||
|
||||
|
@ -6,6 +6,7 @@ import mockConfig from './__mocks__/mockConfig';
|
||||
|
||||
jest.mock('fs', () => ({
|
||||
realpathSync: jest.fn(),
|
||||
readFileSync: jest.fn(),
|
||||
existsSync: () => true,
|
||||
}));
|
||||
jest.mock('mini-css-extract-plugin', () => {});
|
||||
@ -46,6 +47,38 @@ describe('cra-config', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('when used with a custom react-scripts package without symlinks in .bin folder', () => {
|
||||
beforeEach(() => {
|
||||
// In case of .bin/react-scripts is not symlink (like it happens on Windows),
|
||||
// realpathSync() method does not translate the path.
|
||||
fs.realpathSync.mockImplementationOnce(filePath => filePath);
|
||||
|
||||
fs.readFileSync.mockImplementationOnce(
|
||||
() => `#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case \`uname\` in
|
||||
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../custom-react-scripts/bin/react-scripts.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../custom-react-scripts/bin/react-scripts.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret`
|
||||
);
|
||||
});
|
||||
|
||||
it('should locate the react-scripts package', () => {
|
||||
expect(getReactScriptsPath({ noCache: true })).toEqual(
|
||||
'/test-project/node_modules/custom-react-scripts'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when used with TypeScript', () => {
|
||||
it('should return the correct config', () => {
|
||||
// Normalise the return, as we know our new rules object will be an array, whereas a string is expected.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/riot",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,7 +26,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,7 +26,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
|
@ -34,7 +34,7 @@ addParameters({
|
||||
showPanel: true,
|
||||
/**
|
||||
* where to show the addon panel
|
||||
* @type {String}
|
||||
* @type {('bottom'|'right')}
|
||||
*/
|
||||
panelPosition: 'bottom',
|
||||
/**
|
||||
|
@ -1 +1 @@
|
||||
{"version":"5.1.0-alpha.12","info":{"plain":"### Bug Fixes\n\n* CLI: Fix stories regexp in config.js ([#6180](https://github.com/storybooks/storybook/pull/6180))\n* Addon-Info: Restore fonts and color styling ([#6186](https://github.com/storybooks/storybook/pull/6186))\n* Core: Add core-js as a dep to client-api ([#6209](https://github.com/storybooks/storybook/pull/6209))\n\n### Dependency Upgrades\n\n* Bump eslint-plugin-jest from 22.3.2 to 22.4.1 ([#6168](https://github.com/storybooks/storybook/pull/6168))\n* Bump ember-cli-babel from 7.5.0 to 7.6.0 ([#6165](https://github.com/storybooks/storybook/pull/6165))\n* Bump danger from 7.0.14 to 7.0.15 ([#6164](https://github.com/storybooks/storybook/pull/6164))\n* Bump babel-preset-expo from 5.0.0 to 5.1.1 ([#6167](https://github.com/storybooks/storybook/pull/6167))\n* Bump @emotion/core from 10.0.7 to 10.0.9 ([#6169](https://github.com/storybooks/storybook/pull/6169))\n* Bump marko from 4.15.4 to 4.16.2 ([#6205](https://github.com/storybooks/storybook/pull/6205))"}}
|
||||
{"version":"5.1.0-alpha.13","info":{"plain":"### Features\n\n* Svelte: add svelte cli generator ([#6132](https://github.com/storybooks/storybook/pull/6132))\n\n### Bug Fixes\n\n* Addon-knobs: Fix ObjectType knob react warning ([#6159](https://github.com/storybooks/storybook/pull/6159))\n* React: Fix forked CRA support on Windows ([#6236](https://github.com/storybooks/storybook/pull/6236))\n* UI: Fix tooltip event bindings, logger import ([#6238](https://github.com/storybooks/storybook/pull/6238))"}}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "crna-kitchen-sink",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"main": "node_modules/expo/AppEntry.js",
|
||||
"scripts": {
|
||||
@ -24,11 +24,11 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-ondevice-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-ondevice-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/react-native": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-ondevice-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-ondevice-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/react-native": "5.1.0-alpha.13",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-module-resolver": "^3.2.0",
|
||||
"babel-preset-expo": "^5.1.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "angular-cli",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@ -34,18 +34,18 @@
|
||||
"@angular-devkit/build-angular": "^0.13.4",
|
||||
"@angular/cli": "^7.3.6",
|
||||
"@angular/compiler-cli": "^7.2.6",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/angular": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/angular": "5.1.0-alpha.13",
|
||||
"@types/core-js": "^2.5.0",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/node": "~11.11.0",
|
||||
|
@ -1,12 +1,11 @@
|
||||
import { configure, addParameters, addDecorator } from '@storybook/react';
|
||||
import { create } from '@storybook/theming';
|
||||
|
||||
import { withA11y } from '@storybook/addon-a11y';
|
||||
|
||||
addDecorator(withA11y);
|
||||
addParameters({
|
||||
options: {
|
||||
brandTitle: 'CRA Kitchen Sink',
|
||||
brandUrl: 'https://github.com/storybooks/storybook/tree/master/examples/cra-kitchen-sink',
|
||||
isFullscreen: false,
|
||||
showAddonsPanel: true,
|
||||
showSearchBox: false,
|
||||
@ -15,6 +14,12 @@ addParameters({
|
||||
hierarchySeparator: /\./,
|
||||
hierarchyRootSeparator: /\|/,
|
||||
enableShortcuts: true,
|
||||
theme: create({
|
||||
base: 'light',
|
||||
brandTitle: 'CRA Kitchen Sink',
|
||||
brandUrl: 'https://github.com/storybooks/storybook/tree/master/examples/cra-kitchen-sink',
|
||||
gridCellSize: 12,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-kitchen-sink",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
@ -19,21 +19,22 @@
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-events": "5.1.0-alpha.12",
|
||||
"@storybook/addon-info": "5.1.0-alpha.12",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/react": "5.1.0-alpha.12",
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.13",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-events": "5.1.0-alpha.13",
|
||||
"@storybook/addon-info": "5.1.0-alpha.13",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/react": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"enzyme": "^3.9.0",
|
||||
"enzyme-adapter-react-16": "^1.9.1",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-ts-kitchen-sink",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s public",
|
||||
@ -20,11 +20,11 @@
|
||||
"react-dom": "^16.8.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-info": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/react": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-info": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/react": "5.1.0-alpha.13",
|
||||
"@types/enzyme": "^3.9.0",
|
||||
"@types/react": "^16.8.4",
|
||||
"@types/react-dom": "^16.8.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ember-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ember build",
|
||||
@ -15,18 +15,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/ember": "5.1.0-alpha.12",
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.13",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/ember": "5.1.0-alpha.13",
|
||||
"babel-loader": "^8",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"cross-env": "^5.2.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html-kitchen-sink",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@ -14,23 +14,23 @@
|
||||
"storybook": "start-storybook -p 9006"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-events": "5.1.0-alpha.12",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/core": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/html": "5.1.0-alpha.12",
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.13",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-events": "5.1.0-alpha.13",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/core": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/html": "5.1.0-alpha.13",
|
||||
"eventemitter3": "^3.1.0",
|
||||
"format-json": "^1.0.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "marko-cli",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"description": "Demo of how to build an app using marko-starter",
|
||||
"repository": {
|
||||
@ -24,12 +24,12 @@
|
||||
"marko-starter": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/marko": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/marko": "5.1.0-alpha.13",
|
||||
"prettier": "^1.16.4",
|
||||
"webpack": "^4.29.6"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mithril-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -11,18 +11,18 @@
|
||||
"mithril": "^1.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/mithril": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/mithril": "5.1.0-alpha.13",
|
||||
"webpack": "^4.29.6"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "official-storybook",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -c ./ -s built-storybooks",
|
||||
@ -13,29 +13,29 @@
|
||||
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ -s built-storybooks --no-dll"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-cssresources": "5.1.0-alpha.12",
|
||||
"@storybook/addon-events": "5.1.0-alpha.12",
|
||||
"@storybook/addon-graphql": "5.1.0-alpha.12",
|
||||
"@storybook/addon-info": "5.1.0-alpha.12",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots-puppeteer": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/node-logger": "5.1.0-alpha.12",
|
||||
"@storybook/react": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addon-a11y": "5.1.0-alpha.13",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-cssresources": "5.1.0-alpha.13",
|
||||
"@storybook/addon-events": "5.1.0-alpha.13",
|
||||
"@storybook/addon-graphql": "5.1.0-alpha.13",
|
||||
"@storybook/addon-info": "5.1.0-alpha.13",
|
||||
"@storybook/addon-jest": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots-puppeteer": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/node-logger": "5.1.0-alpha.13",
|
||||
"@storybook/react": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"cors": "^2.8.5",
|
||||
"cross-env": "^5.2.0",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "polymer-cli",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -10,15 +10,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@polymer/polymer": "^2.6.0",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/polymer": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/polymer": "5.1.0-alpha.13",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"global": "^4.3.2",
|
||||
"lit-html": "^1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "preact-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -16,18 +16,18 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/preact": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/preact": "5.1.0-alpha.13",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^5.2.0",
|
||||
"file-loader": "^3.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riot-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -16,18 +16,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/riot": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/riot": "5.1.0-alpha.13",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^5.2.0",
|
||||
"file-loader": "^3.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "svelte-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s public",
|
||||
@ -11,17 +11,17 @@
|
||||
"global": "^4.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/svelte": "5.1.0-alpha.12"
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/svelte": "5.1.0-alpha.13"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-example",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -15,18 +15,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.12",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/vue": "5.1.0-alpha.12",
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-backgrounds": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storysource": "5.1.0-alpha.13",
|
||||
"@storybook/addon-viewport": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/vue": "5.1.0-alpha.13",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"cross-env": "^5.2.0",
|
||||
|
@ -11,5 +11,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"registry": "https://registry.npmjs.org",
|
||||
"version": "5.1.0-alpha.12"
|
||||
"version": "5.1.0-alpha.13"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook addons store",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,9 +21,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"util-deprecate": "^1.0.2"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/api",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Core Storybook API & Context",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -20,11 +20,11 @@
|
||||
"prepare": "node ./scripts/generateVersion.js && node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1 +1 @@
|
||||
export const version = '5.1.0-alpha.10';
|
||||
export const version = '5.1.0-alpha.13';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,8 +21,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"telejson": "^2.1.1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,7 +21,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"json-fn": "^1.1.1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@ -30,7 +30,7 @@
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"@babel/register": "^7.0.0",
|
||||
"@storybook/codemod": "5.1.0-alpha.12",
|
||||
"@storybook/codemod": "5.1.0-alpha.13",
|
||||
"chalk": "^2.4.1",
|
||||
"commander": "^2.19.0",
|
||||
"core-js": "^2.6.5",
|
||||
@ -44,32 +44,32 @@
|
||||
"update-notifier": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.1.0-alpha.12",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.12",
|
||||
"@storybook/addon-graphql": "5.1.0-alpha.12",
|
||||
"@storybook/addon-info": "5.1.0-alpha.12",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.12",
|
||||
"@storybook/addon-links": "5.1.0-alpha.12",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.12",
|
||||
"@storybook/addon-options": "5.1.0-alpha.12",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/angular": "5.1.0-alpha.12",
|
||||
"@storybook/channel-postmessage": "5.1.0-alpha.12",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.12",
|
||||
"@storybook/channels": "5.1.0-alpha.12",
|
||||
"@storybook/ember": "5.1.0-alpha.12",
|
||||
"@storybook/html": "5.1.0-alpha.12",
|
||||
"@storybook/marko": "5.1.0-alpha.12",
|
||||
"@storybook/mithril": "5.1.0-alpha.12",
|
||||
"@storybook/polymer": "5.1.0-alpha.12",
|
||||
"@storybook/preact": "5.1.0-alpha.12",
|
||||
"@storybook/react": "5.1.0-alpha.12",
|
||||
"@storybook/react-native": "5.1.0-alpha.12",
|
||||
"@storybook/riot": "5.1.0-alpha.12",
|
||||
"@storybook/svelte": "5.1.0-alpha.12",
|
||||
"@storybook/ui": "5.1.0-alpha.12",
|
||||
"@storybook/vue": "5.1.0-alpha.12"
|
||||
"@storybook/addon-actions": "5.1.0-alpha.13",
|
||||
"@storybook/addon-centered": "5.1.0-alpha.13",
|
||||
"@storybook/addon-graphql": "5.1.0-alpha.13",
|
||||
"@storybook/addon-info": "5.1.0-alpha.13",
|
||||
"@storybook/addon-knobs": "5.1.0-alpha.13",
|
||||
"@storybook/addon-links": "5.1.0-alpha.13",
|
||||
"@storybook/addon-notes": "5.1.0-alpha.13",
|
||||
"@storybook/addon-options": "5.1.0-alpha.13",
|
||||
"@storybook/addon-storyshots": "5.1.0-alpha.13",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/angular": "5.1.0-alpha.13",
|
||||
"@storybook/channel-postmessage": "5.1.0-alpha.13",
|
||||
"@storybook/channel-websocket": "5.1.0-alpha.13",
|
||||
"@storybook/channels": "5.1.0-alpha.13",
|
||||
"@storybook/ember": "5.1.0-alpha.13",
|
||||
"@storybook/html": "5.1.0-alpha.13",
|
||||
"@storybook/marko": "5.1.0-alpha.13",
|
||||
"@storybook/mithril": "5.1.0-alpha.13",
|
||||
"@storybook/polymer": "5.1.0-alpha.13",
|
||||
"@storybook/preact": "5.1.0-alpha.13",
|
||||
"@storybook/react": "5.1.0-alpha.13",
|
||||
"@storybook/react-native": "5.1.0-alpha.13",
|
||||
"@storybook/riot": "5.1.0-alpha.13",
|
||||
"@storybook/svelte": "5.1.0-alpha.13",
|
||||
"@storybook/ui": "5.1.0-alpha.13",
|
||||
"@storybook/vue": "5.1.0-alpha.13"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/client-api",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook Client API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -20,10 +20,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"eventemitter3": "^3.1.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/client-logger",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/codemod",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/components",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Core Storybook Components",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,11 +21,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"js-beautify": "^1.8.9",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { styled } from '@storybook/theming';
|
||||
import logger from '@storybook/client-logger';
|
||||
import { logger } from '@storybook/client-logger';
|
||||
import { withState, lifecycle } from 'recompose';
|
||||
import { document } from 'global';
|
||||
|
||||
@ -107,16 +107,18 @@ const WithTooltip = lifecycle({
|
||||
iframes.forEach(iframe => {
|
||||
const bind = () => {
|
||||
try {
|
||||
iframe.contentDocument.addEventListener('click', hide);
|
||||
unbinders.push(() => {
|
||||
try {
|
||||
iframe.contentDocument.removeEventListener('click', hide);
|
||||
} catch (e) {
|
||||
logger.log('tried to remove listeners from iframe, but failed. whatever');
|
||||
}
|
||||
});
|
||||
if (iframe.contentWindow.document) {
|
||||
iframe.contentWindow.document.addEventListener('click', hide);
|
||||
unbinders.push(() => {
|
||||
try {
|
||||
iframe.contentWindow.document.removeEventListener('click', hide);
|
||||
} catch (e) {
|
||||
logger.warn('Removing a click listener from iframe failed: ', e);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
logger.log('tried to remove listeners from iframe, but failed. whatever');
|
||||
logger.warn('Adding a click listener to iframe failed: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-events",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Event names used in storybook core",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,14 +25,14 @@
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/channel-postmessage": "5.1.0-alpha.12",
|
||||
"@storybook/client-api": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/node-logger": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/ui": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/channel-postmessage": "5.1.0-alpha.13",
|
||||
"@storybook/client-api": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/node-logger": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"@storybook/ui": "5.1.0-alpha.13",
|
||||
"airbnb-js-shims": "^1 || ^2",
|
||||
"autoprefixer": "^9.4.9",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/node-logger",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/router",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Core Storybook Router",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@reach/router": "^1.2.1",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"global": "^4.3.2",
|
||||
"memoizerific": "^1.11.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/theming",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Core Storybook Components",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -23,7 +23,7 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.9",
|
||||
"@emotion/styled": "^10.0.7",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.6.5",
|
||||
"deep-object-diff": "^1.1.0",
|
||||
|
@ -42,6 +42,7 @@ export const background = {
|
||||
app: '#F6F9FC',
|
||||
bar: '#FFFFFF',
|
||||
content: color.lightest,
|
||||
gridCellSize: 10,
|
||||
hoverable: 'rgba(0,0,0,.05)', // hover state for items in a list
|
||||
|
||||
// Notification, error, and warning backgrounds
|
||||
@ -129,6 +130,8 @@ export interface ThemeVars {
|
||||
brandTitle?: string;
|
||||
brandUrl?: string;
|
||||
brandImage?: string;
|
||||
|
||||
gridCellSize?: number;
|
||||
}
|
||||
|
||||
export type Color = typeof color;
|
||||
|
@ -119,6 +119,7 @@ export const convert = (inherit: ThemeVars = lightThemeVars): Theme => {
|
||||
brandTitle,
|
||||
brandUrl,
|
||||
brandImage,
|
||||
gridCellSize,
|
||||
...rest
|
||||
} = inherit;
|
||||
|
||||
@ -131,6 +132,7 @@ export const convert = (inherit: ThemeVars = lightThemeVars): Theme => {
|
||||
app: appBg,
|
||||
bar: background.bar,
|
||||
content: appContentBg,
|
||||
gridCellSize: gridCellSize || background.gridCellSize,
|
||||
hoverable:
|
||||
base === 'light' ? 'rgba(0,0,0,.05)' : 'rgba(250,250,252,.1)' || background.hoverable,
|
||||
|
||||
|
@ -81,6 +81,31 @@ describe('create brand', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('create grid', () => {
|
||||
it('should have default', () => {
|
||||
const result = create({ base: 'light' });
|
||||
|
||||
expect(result.gridCellSize).not.toBeDefined();
|
||||
});
|
||||
it('should accept null', () => {
|
||||
const result = create({ base: 'light', gridCellSize: null });
|
||||
|
||||
expect(result).toMatchObject({
|
||||
gridCellSize: null,
|
||||
});
|
||||
});
|
||||
it('should accept values', () => {
|
||||
const result = create({
|
||||
base: 'light',
|
||||
gridCellSize: 12,
|
||||
});
|
||||
|
||||
expect(result).toMatchObject({
|
||||
gridCellSize: 12,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('create extend', () => {
|
||||
it('should allow custom props', () => {
|
||||
const result = create(
|
||||
@ -142,4 +167,22 @@ describe('convert', () => {
|
||||
}),
|
||||
});
|
||||
});
|
||||
it('should map optional vars', () => {
|
||||
const customVars = create({
|
||||
base: 'light',
|
||||
brandTitle: 'my custom storybook',
|
||||
gridCellSize: 12,
|
||||
});
|
||||
|
||||
const result = convert(customVars);
|
||||
expect(result.base).toEqual('light');
|
||||
expect(result).toMatchObject({
|
||||
background: expect.objectContaining({
|
||||
gridCellSize: 12,
|
||||
}),
|
||||
brand: expect.objectContaining({
|
||||
title: 'my custom storybook',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ui",
|
||||
"version": "5.1.0-alpha.12",
|
||||
"version": "5.1.0-alpha.13",
|
||||
"description": "Core Storybook UI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,16 +22,16 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.1.0-alpha.12",
|
||||
"@storybook/api": "5.1.0-alpha.12",
|
||||
"@storybook/client-logger": "5.1.0-alpha.12",
|
||||
"@storybook/components": "5.1.0-alpha.12",
|
||||
"@storybook/core-events": "5.1.0-alpha.12",
|
||||
"@storybook/router": "5.1.0-alpha.12",
|
||||
"@storybook/theming": "5.1.0-alpha.12",
|
||||
"@storybook/addons": "5.1.0-alpha.13",
|
||||
"@storybook/api": "5.1.0-alpha.13",
|
||||
"@storybook/client-logger": "5.1.0-alpha.13",
|
||||
"@storybook/components": "5.1.0-alpha.13",
|
||||
"@storybook/core-events": "5.1.0-alpha.13",
|
||||
"@storybook/router": "5.1.0-alpha.13",
|
||||
"@storybook/theming": "5.1.0-alpha.13",
|
||||
"core-js": "^2.6.5",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fuzzy-search": "^3.0.1",
|
||||
"fuse.js": "^3.4.4",
|
||||
"global": "^4.3.2",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import { renderToStaticMarkup } from 'react-dom/server';
|
||||
import PropTypes from 'prop-types';
|
||||
import { styled } from '@storybook/theming';
|
||||
|
||||
@ -31,14 +32,49 @@ class Provider extends Component {
|
||||
|
||||
const { Consumer } = Context;
|
||||
|
||||
const defaults = {
|
||||
grid: {
|
||||
backgroundImage: `url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='smallGrid' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 10 0 L 0 0 0 10' fill='none' stroke='gray' stroke-width='0.5'/%3E%3C/pattern%3E%3Cpattern id='grid' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Crect width='100' height='100' fill='url(%23smallGrid)'/%3E%3Cpath d='M 100 0 L 0 0 0 100' fill='none' stroke='gray' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)' /%3E%3C/svg%3E")`,
|
||||
backgroundSize: '100px 100px, 100px 100px, 20px 20px, 20px 20px',
|
||||
function createGridStyles(cellSize) {
|
||||
const cellSizeDoubled = cellSize * 2;
|
||||
const cellSizeSquared = cellSize ** 2;
|
||||
|
||||
const gridSVGEncoded = encodeURIComponent(
|
||||
renderToStaticMarkup(
|
||||
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<pattern id="smallGrid" width={cellSize} height={cellSize} patternUnits="userSpaceOnUse">
|
||||
<path
|
||||
d={`M ${cellSize} 0 L 0 0 0 ${cellSize}`}
|
||||
fill="none"
|
||||
stroke="gray"
|
||||
strokeWidth="0.5"
|
||||
/>
|
||||
</pattern>
|
||||
<pattern
|
||||
id="grid"
|
||||
width={cellSizeSquared}
|
||||
height={cellSizeSquared}
|
||||
patternUnits="userSpaceOnUse"
|
||||
>
|
||||
<rect width={cellSizeSquared} height={cellSizeSquared} fill="url(#smallGrid)" />
|
||||
<path
|
||||
d={`M ${cellSizeSquared} 0 L 0 0 0 ${cellSizeSquared}`}
|
||||
fill="none"
|
||||
stroke="gray"
|
||||
strokeWidth="1"
|
||||
/>
|
||||
</pattern>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="url(#grid)" />
|
||||
</svg>
|
||||
)
|
||||
);
|
||||
|
||||
return {
|
||||
backgroundImage: `url("data:image/svg+xml,${gridSVGEncoded}")`,
|
||||
backgroundSize: `${cellSizeSquared}px ${cellSizeSquared}px, ${cellSizeSquared}px ${cellSizeSquared}px, ${cellSizeDoubled}px ${cellSizeDoubled}px, ${cellSizeDoubled}px ${cellSizeDoubled}px`,
|
||||
backgroundPosition: '-2px -2px',
|
||||
mixBlendMode: 'difference',
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const Grid = styled.div(
|
||||
{
|
||||
@ -48,7 +84,7 @@ const Grid = styled.div(
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
},
|
||||
defaults.grid
|
||||
({ theme }) => createGridStyles(theme.background.gridCellSize)
|
||||
);
|
||||
|
||||
const Background = styled.div(
|
||||
|
@ -1,5 +1,7 @@
|
||||
import memoize from 'memoizerific';
|
||||
import FuzzySearch from 'fuzzy-search';
|
||||
import Fuse from 'fuse.js';
|
||||
|
||||
const FUZZY_SEARCH_THRESHOLD = 0.4;
|
||||
|
||||
export const prevent = e => e.preventDefault();
|
||||
|
||||
@ -163,9 +165,12 @@ export const getNext = ({ id, dataset, expanded }) => {
|
||||
return next.result;
|
||||
};
|
||||
|
||||
const toHayStack = memoize(2)(
|
||||
const fuse = memoize(5)(
|
||||
dataset =>
|
||||
new FuzzySearch(toList(dataset), ['kind', 'name', 'parameters.fileName', 'parameters.notes'])
|
||||
new Fuse(toList(dataset), {
|
||||
threshold: FUZZY_SEARCH_THRESHOLD,
|
||||
keys: ['kind', 'name', 'parameters.fileName', 'parameters.notes'],
|
||||
})
|
||||
);
|
||||
|
||||
const exactMatch = memoize(1)(filter => i =>
|
||||
@ -179,7 +184,7 @@ export const toId = (base, addition) => (base === '' ? `${addition}` : `${base}-
|
||||
export const toFiltered = (dataset, filter) => {
|
||||
let found;
|
||||
if (filter.length && filter.length > 2) {
|
||||
found = toHayStack(dataset).search(filter);
|
||||
found = fuse(dataset).search(filter);
|
||||
} else {
|
||||
found = toList(dataset).filter(exactMatch(filter));
|
||||
}
|
||||
|
@ -12144,10 +12144,10 @@ functional-red-black-tree@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
|
||||
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
|
||||
|
||||
fuzzy-search@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fuzzy-search/-/fuzzy-search-3.0.1.tgz#14a4964508a9607d6e9a88818e7ff634108260b6"
|
||||
integrity sha512-rjUvzdsMlOyarm0oD5k6zVQwgvt4Tb5Xe3YdIGU+Vogw54+ueAGPUTMU2B9jfPQEie5cD11i/S9J9d+MNBSQ3Q==
|
||||
fuse.js@^3.4.4:
|
||||
version "3.4.4"
|
||||
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.4.4.tgz#f98f55fcb3b595cf6a3e629c5ffaf10982103e95"
|
||||
integrity sha512-pyLQo/1oR5Ywf+a/tY8z4JygnIglmRxVUOiyFAbd11o9keUDpUJSMGRWJngcnkURj30kDHPmhoKY8ChJiz3EpQ==
|
||||
|
||||
g-status@^2.0.2:
|
||||
version "2.0.2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user