Compare commits

..

6 Commits

Author SHA1 Message Date
cff8c126de chore(release): 🚀 publish 2022-09-08 15:52:46 +08:00
346c6a268a chore: 🔧 update yarn.lock (#2653) 2022-09-08 15:51:53 +08:00
f53f819043 chore: 🔧 update peerDeps for plugins (#2652) 2022-09-08 15:44:50 +08:00
f351284809 chore(release): 🚀 publish 2022-09-08 11:30:48 +08:00
12c67255ae feat: add onPortRendered options (#2649)
* chore: 🔧 set x6-next and x6-core to private

* feat:  add onPortRendered options
2022-09-08 11:29:15 +08:00
7e179844dc chore: 🔧 update peerdeps for some package (#2597) 2022-08-31 10:48:06 +08:00
13 changed files with 72 additions and 27 deletions

View File

@ -10,9 +10,9 @@
},
"dependencies": {
"@antv/x6": "^1.30.2",
"@antv/x6-next": "^2.0.2-beta.0",
"@antv/x6-react-components": "^1.1.16",
"@antv/x6-react-shape": "^2.0.2-beta.0",
"@antv/x6-next": "^2.0.3-beta.0",
"@antv/x6-react-components": "^2.0.3-beta.0",
"@antv/x6-react-shape": "^2.0.3-beta.0",
"@antv/x6-vector": "^1.3.0",
"antd": "^4.4.2",
"classnames": "^2.2.6",

View File

@ -1,5 +1,5 @@
{
"version": "2.0.3-beta.0",
"version": "2.0.6-beta.0",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {

View File

@ -28,7 +28,7 @@
"prepare": "is-ci || husky install configs/husky-config",
"precommit": "yarn lint-staged && lerna run --concurrency 1 --stream precommit",
"version": "lerna version --no-private",
"publish:latest": "lerna publish",
"publish:latest": "lerna publish from-package --no-private --ignore-scripts",
"publish:beta": "lerna publish from-package --no-private --ignore-scripts --canary --preid beta --dist-tag=beta"
},
"lint-staged": {

View File

@ -1,4 +1,5 @@
{
"private": true,
"name": "@antv/x6-core",
"version": "2.0.3-beta.0",
"description": "A lightweight graphic render library.",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6-next",
"version": "2.0.3-beta.0",
"version": "2.0.6-beta.0",
"description": "JavaScript diagramming library that uses SVG and HTML for rendering.",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -8,7 +8,7 @@ import { PanningManager } from './panning'
import { MouseWheel } from './mousewheel'
import { Edge as StandardEdge } from '../shape'
import { Model, Cell, Node, Edge } from '../model'
import { CellView, NodeView, EdgeView } from '../view'
import { CellView, NodeView, EdgeView, Markup } from '../view'
import {
Router,
Connector,
@ -17,6 +17,7 @@ import {
ConnectionPoint,
} from '../registry'
import { HighlightManager } from './highlight'
import { PortManager } from '../model/port'
export namespace Options {
interface Common {
@ -48,6 +49,8 @@ export namespace Options {
virtual?: boolean
guard: (e: Dom.EventObject, view?: CellView | null) => boolean
onPortRendered?: (args: OnPortRenderedArgs) => void
}
export interface ManualBooleans {
@ -361,6 +364,19 @@ export namespace Options {
}
}
export namespace Options {
export interface OnPortRenderedArgs {
node: Node
port: PortManager.Port
container: Element
selectors?: Markup.Selectors
labelContainer?: Element
labelSelectors?: Markup.Selectors | null
contentContainer: Element
contentSelectors?: Markup.Selectors
}
}
export namespace Options {
export const defaults: Partial<Definition> = {
x: 0,

View File

@ -3,5 +3,5 @@
/**
* Auto generated version file, do not modify it!
*/
const version = '2.0.2-beta.0'
const version = '2.0.4-beta.0'
export { version }

View File

@ -333,17 +333,18 @@ export class NodeView<
portContentSelectors,
}
// todo
// this.graph.hook.onPortRendered({
// port,
// node: this.cell,
// container: portElement,
// selectors: portSelectors,
// labelContainer: portLabelElement,
// labelSelectors: portLabelSelectors,
// contentContainer: portContentElement,
// contentSelectors: portContentSelectors,
// })
if (this.graph.options.onPortRendered) {
this.graph.options.onPortRendered({
port,
node: this.cell,
container: portElement,
selectors: portSelectors,
labelContainer: portLabelElement,
labelSelectors: portLabelSelectors,
contentContainer: portContentElement,
contentSelectors: portContentSelectors,
})
}
return portElement
}

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-scroller",
"version": "2.0.3-beta.0",
"version": "2.0.6-beta.0",
"description": "scroller plugin for X6.",
"main": "lib/index.js",
"module": "es/index.js",
@ -49,7 +49,7 @@
"@antv/x6-package-json/rollup.json"
],
"peerDependencies": {
"@antv/x6-next": "2.0.2-beta.0"
"@antv/x6-next": "beta"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6-react-shape",
"version": "2.0.3-beta.0",
"version": "2.0.6-beta.0",
"description": "X6 shape for rendering react components.",
"main": "lib/index.js",
"module": "es/index.js",
@ -59,8 +59,8 @@
"@antv/x6-package-json/rollup.json"
],
"peerDependencies": {
"@antv/x6-common": "2.0.2-beta.0",
"@antv/x6-next": "2.0.2-beta.0",
"@antv/x6-common": "beta",
"@antv/x6-next": "beta",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},

View File

@ -1,4 +1,5 @@
{
"private": true,
"version": "1.3.0",
"name": "@antv/x6-vector",
"description": "Lightweight library for manipulating and animating SVG.",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6-vue-shape",
"version": "2.0.3-beta.0",
"version": "2.0.6-beta.0",
"description": "X6 shape for rendering vue components.",
"main": "lib/index.js",
"module": "es/index.js",
@ -62,8 +62,8 @@
"vue-demi": "^0.7.4"
},
"peerDependencies": {
"@antv/x6-common": "2.0.2-beta.0",
"@antv/x6-next": "2.0.2-beta.0",
"@antv/x6-common": "beta",
"@antv/x6-next": "beta",
"@vue/composition-api": "^1.0.0-rc.6",
"vue": "^2.6.12 || ^3.0.0"
},

View File

@ -296,11 +296,37 @@
resolved "https://registry.npmjs.org/@antv/x6-geometry/-/x6-geometry-2.0.1-beta.5.tgz#66852e1d1b30e88fd654dd0e62925da2d23e1628"
integrity sha512-E5ba3j3pKMdRgzCc8pjApc9mmW9JBoVcwNdyqOghIfhHjBd40IhciNvkzwbCclvbmC4nh8qj4mVzLf+1GXVJaA==
"@antv/x6-next@^2.0.3-beta.0":
version "2.0.3-beta.0"
resolved "https://registry.npmjs.org/@antv/x6-next/-/x6-next-2.0.3-beta.0.tgz#7b0166df17218dbf0a68f1a11a367962eb39c92d"
integrity sha512-FTTyAE6pFL3e/+9qAaHyvwn5rfwooNnNmz//6umDmiitGJl8xBfhAXmw9JLncixcMzvVZQtpCuiS95rENcjSDA==
dependencies:
"@antv/x6-common" "^2.0.3-beta.0"
"@antv/x6-geometry" "^2.0.3-beta.0"
"@antv/x6-react-components@^1.1.16":
version "1.1.16"
resolved "https://registry.npmjs.org/@antv/x6-react-components/-/x6-react-components-1.1.16.tgz#51db627d542364d1b0986b2e3f178c166ec114dd"
integrity sha512-T4RLhQo+uAhi3ZFQ5QbevLDQJVgNhN1OsquXwa6UlIDlyqtsCpC/+Y0LiErg0GbBcMCYQe1sGS1lUStpj+tG2w==
dependencies:
clamp "^1.0.1"
classnames "^2.2.6"
rc-dropdown "^3.0.0-alpha.0"
rc-util "^4.15.7"
react-color "2.17.1"
react-resize-detector "^6.6.4"
ua-parser-js "^0.7.20"
"@antv/x6-react-shape@^1.6.0":
version "1.6.0"
resolved "https://registry.npmjs.org/@antv/x6-react-shape/-/x6-react-shape-1.6.0.tgz#62f63a8480bf0f9f3f2abf847625b181f401f926"
integrity sha512-sz5sEYUZq9Cm0DpajbPL21N21gowAeMDHfemGuzaVI5Ud07/JS6393spaopcqljVQAY8r7qL+jxxQnWP8hDIBg==
"@antv/x6-react-shape@^2.0.3-beta.0":
version "2.0.3-beta.0"
resolved "https://registry.npmjs.org/@antv/x6-react-shape/-/x6-react-shape-2.0.3-beta.0.tgz#9fdfd399bd20896bfbd2f69dda06faef348465e0"
integrity sha512-8s2sIUDEEWE73Sr37jdoU+9mQe/f3p+wrwBe97TvOImWiqZSMsj9sULMAnsdO8e++ctjXPu/1fa/P4eJmNhXxg==
"@ardatan/aggregate-error@0.0.6":
version "0.0.6"
resolved "https://registry.npmjs.org/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz#fe6924771ea40fc98dc7a7045c2e872dc8527609"