Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: vue3 docs #617

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const components = {
overflow: 'auto',
color: 'white',
position: 'relative',
border: 'var(--demo-border)',
}}
>
{/* <Table data={metadata} /> */}
Expand Down Expand Up @@ -180,6 +181,19 @@ const DockviewDemo = (props: { theme?: string }) => {

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 (
<div
style={{
Expand All @@ -190,6 +204,7 @@ const DockviewDemo = (props: { theme?: string }) => {
padding: '8px',
backgroundColor: 'rgba(0,0,50,0.25)',
borderRadius: '8px',
...css,
}}
>
<div>
Expand All @@ -212,6 +227,15 @@ const DockviewDemo = (props: { theme?: string }) => {
activeGroup={activeGroup}
/>
)}
{/* <div>
<button
onClick={() => {
setGapCheck(!gapCheck);
}}
>
{gapCheck ? 'Disable Gap Check' : 'Enable Gap Check'}
</button>
</div> */}
</div>
<div
style={{
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/ui/codeRunner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useActiveFramework } from '../frameworkSpecific';
import BrowserOnly from '@docusaurus/BrowserOnly';

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 }) => {
const [framework] = useActiveFramework();
Expand Down
32 changes: 0 additions & 32 deletions packages/docs/templates/dockview/basic/vue/package.json

This file was deleted.

9 changes: 6 additions & 3 deletions packages/docs/templates/dockview/basic/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
18 changes: 0 additions & 18 deletions packages/docs/templates/dockview/basic/vue/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelHeaderProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewApi,
DockviewReadyEvent,
IDockviewHeaderActionsProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

let panelCount = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewHeaderActionsProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';
import './app.css';

const LeftAction = defineComponent({
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/templates/dockview/layout/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewApi,
DockviewReadyEvent,
IDockviewHeaderActionsProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

let panelCount = 0;

Expand Down
9 changes: 6 additions & 3 deletions packages/docs/templates/dockview/locked/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'dockview-core/dist/styles/dockview.css';
import { Prop, PropType, createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import 'dockview-vue/dist/styles/dockview.css';
import { PropType, createApp, defineComponent } from 'vue';

import {
DockviewVue,
DockviewReadyEvent,
IDockviewHeaderActionsProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

let panelCount = 0;

Expand Down
9 changes: 6 additions & 3 deletions packages/docs/templates/dockview/nested/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewApi,
DockviewReadyEvent,
IDockviewHeaderActionsProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

let panelCount = 0;

Expand Down
9 changes: 6 additions & 3 deletions packages/docs/templates/dockview/render-mode/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
9 changes: 6 additions & 3 deletions packages/docs/templates/dockview/resize/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';
import './resize.css';

const Panel = defineComponent({
Expand Down
5 changes: 2 additions & 3 deletions packages/docs/templates/dockview/scrollbars/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dockview-core/dist/styles/dockview.css';
import 'dockview-vue/dist/styles/dockview.css';
import { createApp, defineComponent } from 'vue';
import { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent } from 'dockview-core';
import { DockviewVue, DockviewReadyEvent } from 'dockview-vue';

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.';
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/templates/dockview/tabview/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewApi,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelHeaderProps,
IDockviewPanelProps,
} from 'dockview-core';
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import { DockviewReadyEvent, IDockviewPanelProps } from 'dockview-core';
import {
DockviewVue,
DockviewReadyEvent,
IDockviewPanelProps,
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/templates/dockview/watermark/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 { DockviewVue } from 'dockview-vue';
import {
DockviewVue,
DockviewApi,
DockviewReadyEvent,
IDockviewPanelProps,
IWatermarkPanelProps,
Orientation,
} from 'dockview-core';
} from 'dockview-vue';

const Panel = defineComponent({
name: 'Panel',
Expand Down