mirror of
https://github.com/mathuo/dockview
synced 2025-01-23 09:55:58 +00:00
Merge branch 'master' of https://github.com/mathuo/dockview
This commit is contained in:
commit
107c20a81d
6
.github/workflows/deploy-docs.yml
vendored
6
.github/workflows/deploy-docs.yml
vendored
@ -33,8 +33,10 @@ jobs:
|
||||
working-directory: packages/dockview
|
||||
- run: npm run build
|
||||
working-directory: packages/docs
|
||||
- run: npm run deploy-docs
|
||||
working-directory: packages/docs
|
||||
- run: npm run docs
|
||||
working-directory: .
|
||||
- run: npm run package-docs
|
||||
working-directory: .
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ test-report.xml
|
||||
*.code-workspace
|
||||
yarn-error.log
|
||||
/build
|
||||
docs/
|
||||
|
@ -19,7 +19,9 @@
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"test:cov": "jest --coverage",
|
||||
"version-beta-build": "lerna version prerelease --preid beta",
|
||||
"publish-app": "lerna publish"
|
||||
"publish-app": "lerna publish",
|
||||
"docs": "typedoc",
|
||||
"package-docs": "node scripts/package-docs.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -56,6 +58,7 @@
|
||||
"ts-jest": "^29.0.5",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tslib": "^2.5.0",
|
||||
"typedoc": "^0.24.7",
|
||||
"typescript": "^4.9.5",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1",
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"out": "typedocs",
|
||||
"entryPoints": ["./src/index.ts"],
|
||||
"exclude": ["**/_test/**/*.*", "**/index.ts"],
|
||||
"excludeExternals": true,
|
||||
"excludePrivate": true
|
||||
"extends": ["../../typedoc.base.json"],
|
||||
"entryPoints": ["src/index.ts"]
|
||||
}
|
||||
|
@ -71,7 +71,6 @@
|
||||
"react-dom": "^18.2.0",
|
||||
"rimraf": "^4.1.2",
|
||||
"rollup": "^3.15.0",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"typedoc": "^0.23.25"
|
||||
"rollup-plugin-postcss": "^4.0.2"
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,6 @@
|
||||
"jsx": "react",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"paths": {
|
||||
"dockview-core": "../dockview-core"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/node_modules", "src/__tests__"]
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
{
|
||||
"out": "typedocs",
|
||||
"entryPoints": ["./src/index.ts"],
|
||||
"exclude": ["**/_test/**/*.*", "**/index.ts"],
|
||||
"excludeExternals": true,
|
||||
"excludePrivate": true
|
||||
"extends": ["../../typedoc.base.json"],
|
||||
"entryPoints": ["src/index.ts"],
|
||||
"exclude": ["**/dist/**"]
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import { SimpleSplitview2 } from '@site/src/components/simpleSplitview2';
|
||||
|
||||
# Basics
|
||||
|
||||
asd
|
||||
This section will take you through a number of concepts that can be applied to all dockview components.
|
||||
|
||||
## Panels
|
||||
|
@ -349,7 +349,9 @@ return (
|
||||
|
||||
### Third Party Dnd Libraries
|
||||
|
||||
To be completed...
|
||||
This shows a simple example of a third-party library used inside a panel that relies on drag
|
||||
and drop functionalities. This examples serves to show that `dockview` doesn't interfer with
|
||||
any drag and drop logic for other controls.
|
||||
|
||||
<Container>
|
||||
<DockviewExternalDnd />
|
||||
@ -621,6 +623,8 @@ to the entire width of the group. For example:
|
||||
|
||||
### Tab Height
|
||||
|
||||
Tab height can be controlled through CSS.
|
||||
|
||||
<Container sandboxId="tabheight-dockview">
|
||||
<DockviewTabheight />
|
||||
</Container>
|
||||
|
@ -12,8 +12,7 @@
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typecheck": "tsc",
|
||||
"deploy-docs": "node scripts/package-docs.js"
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "^2.4.0",
|
||||
|
@ -18,6 +18,29 @@ const components = {
|
||||
},
|
||||
};
|
||||
|
||||
const DraggableElement = () => (
|
||||
<span
|
||||
tabIndex={-1}
|
||||
onDragStart={(event) => {
|
||||
if (event.dataTransfer) {
|
||||
event.dataTransfer.effectAllowed = 'move';
|
||||
|
||||
event.dataTransfer.setData('text/plain', 'nothing');
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
backgroundColor: 'orange',
|
||||
padding: '0px 8px',
|
||||
borderRadius: '4px',
|
||||
width: '100px',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
draggable={true}
|
||||
>
|
||||
Drag me
|
||||
</span>
|
||||
);
|
||||
|
||||
const DndDockview = (props: { renderVisibleOnly: boolean }) => {
|
||||
const onReady = (event: DockviewReadyEvent) => {
|
||||
event.api.addPanel({
|
||||
@ -77,19 +100,9 @@ const DndDockview = (props: { renderVisibleOnly: boolean }) => {
|
||||
height: '100%',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: 'orange',
|
||||
padding: '0px 8px',
|
||||
borderRadius: '4px',
|
||||
width: '100px',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
draggable={true}
|
||||
>
|
||||
Drag me
|
||||
<div style={{ margin: '2px 0px' }}>
|
||||
<DraggableElement />
|
||||
</div>
|
||||
|
||||
<DockviewReact
|
||||
components={components}
|
||||
onReady={onReady}
|
||||
|
@ -50,7 +50,6 @@ const SampleData = [
|
||||
const TreeComponent = () => {
|
||||
const [treeData, setTreeData] = useState(SampleData);
|
||||
const handleDrop = (newTreeData: any) => {
|
||||
console.log('handleDrop');
|
||||
setTreeData(newTreeData);
|
||||
};
|
||||
return (
|
||||
|
@ -1,8 +0,0 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const output = path.join(__dirname, '../../../build');
|
||||
|
||||
const docsDir = path.join(__dirname, '../build');
|
||||
|
||||
fs.copySync(docsDir, path.join(output));
|
@ -1,8 +1,11 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const output = path.join(__dirname, '../');
|
||||
const output = path.join(__dirname, '../build');
|
||||
|
||||
const docsDir = path.join(__dirname, '../docs/build');
|
||||
const websiteDir = path.join(__dirname, '../packages/docs/build');
|
||||
|
||||
fs.copySync(docsDir, path.join(output, 'docs'));
|
||||
const docsDir = path.join(__dirname, '../docs');
|
||||
|
||||
fs.copySync(websiteDir, output);
|
||||
fs.copySync(docsDir, path.join(output, 'typedocs'));
|
||||
|
@ -1,15 +0,0 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const output = path.join(__dirname, '../output');
|
||||
|
||||
const docsDir = path.join(__dirname, '../packages/dockview/typedocs');
|
||||
const webpackAppDir = path.join(__dirname, '../packages/dockview-demo/dist');
|
||||
// const storybookAppDir = path.join(
|
||||
// __dirname,
|
||||
// '../packages/dockview-demo/storybook-static'
|
||||
// );
|
||||
|
||||
fs.copySync(docsDir, path.join(output, 'typedocs'));
|
||||
fs.copySync(webpackAppDir, path.join(output, 'build'));
|
||||
// fs.copySync(storybookAppDir, path.join(output, 'storybook-static'));
|
11
tsconfig.json
Normal file
11
tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./packages/dockview"
|
||||
},
|
||||
{
|
||||
"path": "./packages/dockview-core"
|
||||
}
|
||||
]
|
||||
}
|
4
typedoc.base.json
Normal file
4
typedoc.base.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://typedoc.org/schema.json",
|
||||
"includeVersion": true
|
||||
}
|
7
typedoc.json
Normal file
7
typedoc.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"entryPoints": ["packages/dockview", "packages/dockview-core"],
|
||||
"name": "Dockview",
|
||||
"entryPointStrategy": "packages",
|
||||
"includeVersion": true,
|
||||
"logLevel": "Verbose"
|
||||
}
|
29
yarn.lock
29
yarn.lock
@ -9918,7 +9918,7 @@ markdown-escapes@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535"
|
||||
integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==
|
||||
|
||||
marked@^4.2.12:
|
||||
marked@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
|
||||
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
|
||||
@ -10136,13 +10136,20 @@ minimatch@^6.1.6:
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimatch@^7.1.3, minimatch@^7.4.1, minimatch@^7.4.2:
|
||||
minimatch@^7.4.1, minimatch@^7.4.2:
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.3.tgz#012cbf110a65134bb354ae9773b55256cdb045a2"
|
||||
integrity sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimatch@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56"
|
||||
integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimist-options@4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
|
||||
@ -13180,9 +13187,9 @@ shelljs@^0.8.5:
|
||||
rechoir "^0.6.2"
|
||||
|
||||
shiki@^0.14.1:
|
||||
version "0.14.1"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.1.tgz#9fbe082d0a8aa2ad63df4fbf2ee11ec924aa7ee1"
|
||||
integrity sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==
|
||||
version "0.14.2"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.2.tgz#d51440800b701392b31ce2336036058e338247a1"
|
||||
integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==
|
||||
dependencies:
|
||||
ansi-sequence-parser "^1.1.0"
|
||||
jsonc-parser "^3.2.0"
|
||||
@ -14249,14 +14256,14 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==
|
||||
|
||||
typedoc@^0.23.25:
|
||||
version "0.23.28"
|
||||
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd"
|
||||
integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==
|
||||
typedoc@^0.24.7:
|
||||
version "0.24.7"
|
||||
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.7.tgz#7eeb272a1894b3789acc1a94b3f2ae8e7330ee39"
|
||||
integrity sha512-zzfKDFIZADA+XRIp2rMzLe9xZ6pt12yQOhCr7cD7/PBTjhPmMyMvGrkZ2lPNJitg3Hj1SeiYFNzCsSDrlpxpKw==
|
||||
dependencies:
|
||||
lunr "^2.3.9"
|
||||
marked "^4.2.12"
|
||||
minimatch "^7.1.3"
|
||||
marked "^4.3.0"
|
||||
minimatch "^9.0.0"
|
||||
shiki "^0.14.1"
|
||||
|
||||
"typescript@^3 || ^4", typescript@^4.9.5:
|
||||
|
Loading…
Reference in New Issue
Block a user