Merge pull request #617 from mathuo/562-dockview-framework-wrappers-vuejs-angular-javascript-etc-3

chore: vue3 docs
This commit is contained in:
mathuo 2024-05-30 20:44:23 +01:00 committed by GitHub
commit 943c2dc425
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 98 additions and 103 deletions

View File

@ -26,6 +26,7 @@ const components = {
overflow: 'auto', overflow: 'auto',
color: 'white', color: 'white',
position: 'relative', position: 'relative',
border: 'var(--demo-border)',
}} }}
> >
{/* <Table data={metadata} /> */} {/* <Table data={metadata} /> */}
@ -180,6 +181,19 @@ const DockviewDemo = (props: { theme?: string }) => {
const [watermark, setWatermark] = React.useState<boolean>(false); const [watermark, setWatermark] = React.useState<boolean>(false);
const [gapCheck, setGapCheck] = React.useState<boolean>(false);
const css = React.useMemo(() => {
if (!gapCheck) {
return {};
}
return {
'--dv-group-gap-size': '0.5rem',
'--demo-border': '5px dashed purple',
} as React.CSSProperties;
}, [gapCheck]);
return ( return (
<div <div
style={{ style={{
@ -190,6 +204,7 @@ const DockviewDemo = (props: { theme?: string }) => {
padding: '8px', padding: '8px',
backgroundColor: 'rgba(0,0,50,0.25)', backgroundColor: 'rgba(0,0,50,0.25)',
borderRadius: '8px', borderRadius: '8px',
...css,
}} }}
> >
<div> <div>
@ -212,6 +227,15 @@ const DockviewDemo = (props: { theme?: string }) => {
activeGroup={activeGroup} activeGroup={activeGroup}
/> />
)} )}
{/* <div>
<button
onClick={() => {
setGapCheck(!gapCheck);
}}
>
{gapCheck ? 'Disable Gap Check' : 'Enable Gap Check'}
</button>
</div> */}
</div> </div>
<div <div
style={{ style={{

View File

@ -3,7 +3,7 @@ import { useActiveFramework } from '../frameworkSpecific';
import BrowserOnly from '@docusaurus/BrowserOnly'; import BrowserOnly from '@docusaurus/BrowserOnly';
const BASE_SANDBOX_URL = const BASE_SANDBOX_URL =
'https://codesandbox.io/s/github/mathuo/dockview/tree/master/packages/docs'; 'https://codesandbox.io/s/github/mathuo/dockview/tree/gh-pages';
export const _CodeRunner = (props: { id: string; height: number }) => { export const _CodeRunner = (props: { id: string; height: number }) => {
const [framework] = useActiveFramework(); const [framework] = useActiveFramework();

View File

@ -1,32 +0,0 @@
{
"name": "dockview.resize",
"description": "",
"keywords": [
"dockview"
],
"version": "1.0.0",
"main": "src/index.tsx",
"dependencies": {
"dockview": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"typescript": "^4.9.5",
"react-scripts": "*"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,18 +0,0 @@
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "es5",
"lib": ["es6", "dom"],
"sourceMap": true,
"allowJs": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true
}
}

View File

@ -1,11 +1,11 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewPanelHeaderProps, IDockviewPanelHeaderProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,12 +1,12 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewApi, DockviewApi,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewHeaderActionsProps, IDockviewHeaderActionsProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
let panelCount = 0; let panelCount = 0;

View File

@ -1,11 +1,11 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewHeaderActionsProps, IDockviewHeaderActionsProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
import './app.css'; import './app.css';
const LeftAction = defineComponent({ const LeftAction = defineComponent({

View File

@ -1,12 +1,12 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewApi, DockviewApi,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewHeaderActionsProps, IDockviewHeaderActionsProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
let panelCount = 0; let panelCount = 0;

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,11 +1,12 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { Prop, PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewHeaderActionsProps, IDockviewHeaderActionsProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
let panelCount = 0; let panelCount = 0;

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,12 +1,12 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewApi, DockviewApi,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewHeaderActionsProps, IDockviewHeaderActionsProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
let panelCount = 0; let panelCount = 0;

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
import './resize.css'; import './resize.css';
const Panel = defineComponent({ const Panel = defineComponent({

View File

@ -1,7 +1,6 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { createApp, defineComponent } from 'vue'; import { createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import { DockviewVue, DockviewReadyEvent } from 'dockview-vue';
import { DockviewReadyEvent } from 'dockview-core';
const TEXT = const TEXT =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';

View File

@ -1,11 +1,11 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewApi, DockviewApi,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,11 +1,11 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewPanelHeaderProps, IDockviewPanelHeaderProps,
IDockviewPanelProps, IDockviewPanelProps,
} from 'dockview-core'; } from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,7 +1,10 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue'; import {
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core'; DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',

View File

@ -1,13 +1,13 @@
import 'dockview-core/dist/styles/dockview.css'; import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue'; import { PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { import {
DockviewVue,
DockviewApi, DockviewApi,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewPanelProps, IDockviewPanelProps,
IWatermarkPanelProps, IWatermarkPanelProps,
Orientation, Orientation,
} from 'dockview-core'; } from 'dockview-vue';
const Panel = defineComponent({ const Panel = defineComponent({
name: 'Panel', name: 'Panel',