diff --git a/README.md b/README.md index 155a30eb2..dd0789699 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,10 @@ npm install --save dockview ## Setup -You must import or reference the stylesheet at `dockview/dist/styles.css`. For example: +You must import or reference the stylesheet at `dockview/dist/styles/dockview.css`. For example: ```css -@import '~dockview/dist/styles.css'; +@import '~dockview/dist/styles/dockview.css'; ``` You should also attach a dockview theme to an element containing your components. For example: diff --git a/packages/splitview-demo/src/index.scss b/packages/splitview-demo/src/index.scss index 323d48bf4..ff2117e91 100644 --- a/packages/splitview-demo/src/index.scss +++ b/packages/splitview-demo/src/index.scss @@ -1,4 +1,4 @@ -@import '~dockview/dist/styles.css'; +@import '~dockview/dist/styles/dockview.css'; body { margin: 0; diff --git a/packages/splitview-demo/src/stories/dockview/dockview.iframe.stories.tsx b/packages/splitview-demo/src/stories/dockview/dockview.iframe.stories.tsx index 3a920c42e..07bce9df6 100644 --- a/packages/splitview-demo/src/stories/dockview/dockview.iframe.stories.tsx +++ b/packages/splitview-demo/src/stories/dockview/dockview.iframe.stories.tsx @@ -10,7 +10,6 @@ import { } from 'dockview'; import * as React from 'react'; import { Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { diff --git a/packages/splitview-demo/src/stories/dockview/dockview.simple.stories.tsx b/packages/splitview-demo/src/stories/dockview/dockview.simple.stories.tsx index 68f1506d8..0a02ac6ec 100644 --- a/packages/splitview-demo/src/stories/dockview/dockview.simple.stories.tsx +++ b/packages/splitview-demo/src/stories/dockview/dockview.simple.stories.tsx @@ -10,7 +10,6 @@ import { } from 'dockview'; import * as React from 'react'; import { Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { diff --git a/packages/splitview-demo/src/stories/dockview/dockview.stories.tsx b/packages/splitview-demo/src/stories/dockview/dockview.stories.tsx index e370aa1de..f94927c52 100644 --- a/packages/splitview-demo/src/stories/dockview/dockview.stories.tsx +++ b/packages/splitview-demo/src/stories/dockview/dockview.stories.tsx @@ -10,7 +10,6 @@ import { } from 'dockview'; import * as React from 'react'; import { Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { @@ -29,8 +28,6 @@ const components: PanelCollection = { }, }; - - const Watermark = (props: IWatermarkPanelProps) => { const [size, setSize] = React.useState(props.containerApi.size); const [panels, setPanels] = React.useState( diff --git a/packages/splitview-demo/src/stories/gridview/gridview.stories.tsx b/packages/splitview-demo/src/stories/gridview/gridview.stories.tsx index a4df15272..26727f4e9 100644 --- a/packages/splitview-demo/src/stories/gridview/gridview.stories.tsx +++ b/packages/splitview-demo/src/stories/gridview/gridview.stories.tsx @@ -8,7 +8,6 @@ import { } from 'dockview'; import * as React from 'react'; import { Story, Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { diff --git a/packages/splitview-demo/src/stories/paneview/paneview.deserialization.stories.tsx b/packages/splitview-demo/src/stories/paneview/paneview.deserialization.stories.tsx index 1420d90a7..9b6eaf544 100644 --- a/packages/splitview-demo/src/stories/paneview/paneview.deserialization.stories.tsx +++ b/packages/splitview-demo/src/stories/paneview/paneview.deserialization.stories.tsx @@ -14,19 +14,21 @@ import { } from 'dockview'; import * as React from 'react'; import { Story, Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { - const [constraints, setConstraints] = React.useState< - PanelConstraintChangeEvent - >(); - const [dimensions, setDimensions] = React.useState< - PanelDimensionChangeEvent - >(); - const [expansionState, setExpansionState] = React.useState< - ExpansionEvent - >(); + const [ + constraints, + setConstraints, + ] = React.useState(); + const [ + dimensions, + setDimensions, + ] = React.useState(); + const [ + expansionState, + setExpansionState, + ] = React.useState(); const [active, setActive] = React.useState(); const [focus, setFocus] = React.useState(); @@ -143,8 +145,6 @@ export const Deserialization = (props: { ); }; - - export default { title: 'Paneview/Deserialization', component: Deserialization, diff --git a/packages/splitview-demo/src/stories/paneview/paneview.localStorageSave.stories.tsx b/packages/splitview-demo/src/stories/paneview/paneview.localStorageSave.stories.tsx index ee4f39804..f0f3c474d 100644 --- a/packages/splitview-demo/src/stories/paneview/paneview.localStorageSave.stories.tsx +++ b/packages/splitview-demo/src/stories/paneview/paneview.localStorageSave.stories.tsx @@ -14,19 +14,21 @@ import { } from 'dockview'; import * as React from 'react'; import { Story, Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { - const [constraints, setConstraints] = React.useState< - PanelConstraintChangeEvent - >(); - const [dimensions, setDimensions] = React.useState< - PanelDimensionChangeEvent - >(); - const [expansionState, setExpansionState] = React.useState< - ExpansionEvent - >(); + const [ + constraints, + setConstraints, + ] = React.useState(); + const [ + dimensions, + setDimensions, + ] = React.useState(); + const [ + expansionState, + setExpansionState, + ] = React.useState(); const [active, setActive] = React.useState(); const [focus, setFocus] = React.useState(); diff --git a/packages/splitview-demo/src/stories/paneview/paneview.simple.stories.tsx b/packages/splitview-demo/src/stories/paneview/paneview.simple.stories.tsx index 5b1aad234..88ab3f41d 100644 --- a/packages/splitview-demo/src/stories/paneview/paneview.simple.stories.tsx +++ b/packages/splitview-demo/src/stories/paneview/paneview.simple.stories.tsx @@ -14,19 +14,21 @@ import { } from 'dockview'; import * as React from 'react'; import { Story, Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { - const [constraints, setConstraints] = React.useState< - PanelConstraintChangeEvent - >(); - const [dimensions, setDimensions] = React.useState< - PanelDimensionChangeEvent - >(); - const [expansionState, setExpansionState] = React.useState< - ExpansionEvent - >(); + const [ + constraints, + setConstraints, + ] = React.useState(); + const [ + dimensions, + setDimensions, + ] = React.useState(); + const [ + expansionState, + setExpansionState, + ] = React.useState(); const [active, setActive] = React.useState(); const [focus, setFocus] = React.useState(); @@ -126,7 +128,6 @@ export const Simple = (props: { ); }; - export default { title: 'Paneview/Simple', component: Simple, @@ -150,4 +151,3 @@ export default { }, }, } as Meta; - \ No newline at end of file diff --git a/packages/splitview-demo/src/stories/splitview/splitview.stories.tsx b/packages/splitview-demo/src/stories/splitview/splitview.stories.tsx index 2a6573e5c..fe3d9cc60 100644 --- a/packages/splitview-demo/src/stories/splitview/splitview.stories.tsx +++ b/packages/splitview-demo/src/stories/splitview/splitview.stories.tsx @@ -9,7 +9,6 @@ import { } from 'dockview'; import * as React from 'react'; import { Story, Meta } from '@storybook/react'; -import 'dockview/dist/styles.css'; const components: PanelCollection = { default: (props) => { diff --git a/packages/splitview/README.md b/packages/splitview/README.md index 155a30eb2..dd0789699 100644 --- a/packages/splitview/README.md +++ b/packages/splitview/README.md @@ -39,10 +39,10 @@ npm install --save dockview ## Setup -You must import or reference the stylesheet at `dockview/dist/styles.css`. For example: +You must import or reference the stylesheet at `dockview/dist/styles/dockview.css`. For example: ```css -@import '~dockview/dist/styles.css'; +@import '~dockview/dist/styles/dockview.css'; ``` You should also attach a dockview theme to an element containing your components. For example: diff --git a/scripts/build.js b/scripts/build.js index 6e1a14168..36f2d6c88 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -4,13 +4,11 @@ const concat = require('gulp-concat'); const init = () => { gulp.task('sass', () => { - return ( - gulp - .src('./src/**/*.scss') - .pipe(gulpSass().on('error', gulpSass.logError)) - .pipe(concat('styles.css')) - .pipe(gulp.dest('./dist')) - ); + return gulp + .src('./src/**/*.scss') + .pipe(gulpSass().on('error', gulpSass.logError)) + .pipe(concat('dockview.css')) + .pipe(gulp.dest('./dist/styles/')); }); };