Skip to content

Commit 861d13c

Browse files
committed
chore: docs
1 parent 8b1499e commit 861d13c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+17521
-2737
lines changed

packages/dockview-core/src/dockview/options.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ type AddPanelPositionUnion = {
170170

171171
type AddPanelOptionsUnion = AddPanelFloatingGroupUnion | AddPanelPositionUnion;
172172

173-
export type AddPanelOptions<P extends object = Parameters> = Omit<
174-
PanelOptions<P>,
175-
'component' | 'tabComponent'
176-
> & {
173+
export type AddPanelOptions<P extends object = Parameters> = {
174+
params?: P;
175+
id: string;
176+
title?: string;
177177
component: string;
178178
tabComponent?: string;
179179
renderer?: DockviewPanelRenderer;

packages/dockview-core/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ export * from './panel/types';
1515
export * from './panel/componentFactory';
1616

1717
export * from './splitview/splitview';
18-
export * from './splitview/options';
18+
export { SplitviewComponentOptions } from './splitview/options';
1919

2020
export * from './paneview/paneview';
2121
export * from './gridview/gridview';
22+
export { GridviewComponentOptions } from './gridview/options';
2223
export * from './dockview/dockviewGroupPanelModel';
2324
export * from './gridview/baseComponentGridview';
2425

packages/dockview-core/src/splitview/options.ts

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ export interface PanelViewInitParameters extends PanelInitParameters {
1515
accessor: SplitviewComponent;
1616
}
1717

18-
export interface ISerializableView extends IView, IPanel {
19-
init: (params: PanelViewInitParameters) => void;
20-
}
21-
2218
export interface SplitviewComponentOptions extends SplitViewOptions {
2319
disableAutoResizing?: boolean;
2420
components?: {

packages/dockview-core/src/splitview/splitviewPanel.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ISerializableView, PanelViewInitParameters } from './options';
1+
import { PanelViewInitParameters } from './options';
22
import {
33
BasePanelView,
44
BasePanelViewExported,
@@ -19,7 +19,7 @@ export interface ISplitviewPanel
1919

2020
export abstract class SplitviewPanel
2121
extends BasePanelView<SplitviewPanelApiImpl>
22-
implements ISerializableView, ISplitviewPanel
22+
implements ISplitviewPanel
2323
{
2424
private _evaluatedMinimumSize = 0;
2525
private _evaluatedMaximumSize = Number.POSITIVE_INFINITY;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Group API
3+
sidebar_position: 3
4+
---
5+
6+
:::info
7+
Use the group API sparingly. As you move panels, groups change and if you don't track this correctly you may encounter unexpected
8+
behaviours. You should be able to achieve most things directly through the panel API.
9+
:::
10+
11+
import { DocRef } from '@site/src/components/ui/reference/docRef';
12+
13+
14+
<DocRef declaration="DockviewGroupPanelApi" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Options
3+
sidebar_position: 0
4+
---
5+
6+
import { DocRef } from '@site/src/components/ui/reference/docRef';
7+
8+
9+
<FrameworkSpecific framework="JavaScript">
10+
<DocRef declaration="DockviewComponentOptions" />
11+
</FrameworkSpecific>
12+
13+
<FrameworkSpecific framework="React">
14+
<DocRef declaration="IDockviewReactProps" />
15+
</FrameworkSpecific>
16+
17+
18+

packages/docs/docs/api/dockview/overview.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Overview
3-
sidebar_position: 0
2+
title: API
3+
sidebar_position: 1
44
---
55

66
import { DocRef } from '@site/src/components/ui/reference/docRef';

packages/docs/docs/api/dockview/panelApi.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: Panel API
4+
sidebar_position: 2
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';

packages/docs/docs/api/dockview/reactProps.mdx

-9
This file was deleted.

packages/docs/docs/api/gridview/api.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: "API"
4+
sidebar_position: 1
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Options
3+
sidebar_position: 0
4+
---
5+
6+
import { DocRef } from '@site/src/components/ui/reference/docRef';
7+
8+
9+
<FrameworkSpecific framework="JavaScript">
10+
<DocRef declaration="GridviewComponentOptions" />
11+
</FrameworkSpecific>
12+
13+
<FrameworkSpecific framework="React">
14+
<DocRef declaration="IGridviewReactProps" />
15+
</FrameworkSpecific>
16+
17+
18+

packages/docs/docs/api/gridview/panelApi.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: Panel API
4+
sidebar_position: 2
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';

packages/docs/docs/api/gridview/reactProps.mdx

-9
This file was deleted.

packages/docs/docs/api/paneview/api.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: "API"
4+
sidebar_position: 1
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Options
3+
sidebar_position: 0
4+
---
5+
6+
import { DocRef } from '@site/src/components/ui/reference/docRef';
7+
8+
9+
<FrameworkSpecific framework="JavaScript">
10+
<DocRef declaration="PaneviewComponentOptions" />
11+
</FrameworkSpecific>
12+
13+
<FrameworkSpecific framework="React">
14+
<DocRef declaration="IPaneviewReactProps" />
15+
</FrameworkSpecific>
16+
17+
18+

packages/docs/docs/api/paneview/panelApi.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: Panel API
4+
sidebar_position: 2
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';

packages/docs/docs/api/paneview/reactProps.mdx

-9
This file was deleted.

packages/docs/docs/api/splitview/api.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: "API"
4+
sidebar_position: 1
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Options
3+
sidebar_position: 0
4+
---
5+
6+
import { DocRef } from '@site/src/components/ui/reference/docRef';
7+
8+
9+
<FrameworkSpecific framework="JavaScript">
10+
<DocRef declaration="SplitviewComponentOptions" />
11+
</FrameworkSpecific>
12+
13+
<FrameworkSpecific framework="React">
14+
<DocRef declaration="ISplitviewReactProps" />
15+
</FrameworkSpecific>
16+
17+
18+

packages/docs/docs/api/splitview/panelApi.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: API
33
title: Panel API
4+
sidebar_position: 2
45
---
56

67
import { DocRef } from '@site/src/components/ui/reference/docRef';

packages/docs/docs/api/splitview/reactProps.mdx

-9
This file was deleted.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Move Group
3+
sidebar_position: 5
4+
---
5+
6+
import { DocRef } from '@site/src/components/ui/reference/docRef';
7+
8+
This section describes how you can move a group.
9+
10+
## Methods
11+
12+
<DocRef declaration="DockviewGroupPanelApi" methods={["moveTo"]}/>
13+
14+
## Move a Group
15+
16+
You can move a group through the [Group API](/docs/api/dockview/groupApi) and you can find out how to move a Panel [here](/docs/core/panels/move).
17+
18+
```ts
19+
panel.group.api.moveTo({ group, position, index });
20+
```
21+
22+
## Live Example
23+
24+
To Be Completed...

packages/docs/docs/core/overview.mdx

+13-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ sidebar_position: 0
55

66
This section provided a core overview.
77

8-
Once you have created an dock you will want to store a reference to the [API](/docs/api/dockview/overview).
8+
9+
10+
The component takes a collection of [Options](/docs/api/dockview/options) as inputs and
11+
once you have created a dock you can store a reference to the [API](/docs/api/dockview/overview) that is created.
912

1013
<FrameworkSpecific framework='React'>
1114
```tsx
@@ -21,3 +24,12 @@ function onReady(event: DockviewReadyEvent) {
2124
```
2225
</FrameworkSpecific>
2326

27+
28+
<FrameworkSpecific framework='JavaScript'>
29+
```tsx
30+
const component = new DockviewComponent({
31+
/** options */
32+
});
33+
```
34+
</FrameworkSpecific>
35+

0 commit comments

Comments
 (0)