Compare commits

...

122 Commits

Author SHA1 Message Date
96010e3b52 fix: add createView options () 2022-12-20 20:18:59 +08:00
a98e97db11 fix: add getGraph provide () 2022-12-20 20:16:07 +08:00
30c2ed2655 fix: optimize snapToGrid options for manhattan () 2022-12-20 20:15:55 +08:00
3a020d17c3 chore(release): release 1 package [skip ci]
[@antv/x6-common@2.0.4](https://www.npmjs.com/package/@antv/x6-common/v/2.0.4)
[@antv/x6-common@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-common%402.0.4)
2022-12-20 03:52:49 +00:00
d8e1e637d8 fix: fix window incompatibility problem () 2022-12-20 11:39:53 +08:00
2d04848d52 chore(release): release 1 package [skip ci]
[@antv/x6@2.1.1](https://www.npmjs.com/package/@antv/x6/v/2.1.1)
[@antv/x6@2.1.1](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.1.1)
2022-12-19 14:40:16 +00:00
e2bb71d954 fix: set snapToGrid to false by default () 2022-12-19 22:29:40 +08:00
8b145941ec chore: update contributors [skip ci] 2022-12-19 14:28:26 +00:00
2c7a04a6f4 chore: move file 2022-12-19 22:27:23 +08:00
dfa8c492da chore: update CONTRIBUTORS [skip ci] 2022-12-19 12:57:10 +00:00
3b668feb4e fix: arrowhead not get options bug () 2022-12-19 20:49:55 +08:00
07f4739979 chore(release): release 1 package [skip ci]
[@antv/x6@2.1.0](https://www.npmjs.com/package/@antv/x6/v/2.1.0)
[@antv/x6@2.1.0](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.1.0)
2022-12-19 01:46:51 +00:00
824560ddda feat: add snapToGrid options for manhattan router ()
* docs: update github url

* fix: debounce update to improve performance

* feat: add snapToGrid options for manhattan router
2022-12-19 09:36:17 +08:00
9e37ea9f78 fix: debounce update to improve performance ()
* docs: update github url

* fix: debounce update to improve performance
2022-12-18 21:44:03 +08:00
610349d924 chore(release): release 3 packages [skip ci]
[@antv/x6@2.0.9](https://www.npmjs.com/package/@antv/x6/v/2.0.9)
[@antv/x6@2.0.9](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.0.9)

[@antv/x6-example-features@2.0.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-example-features%402.0.1)

[@antv/x6-sites@1.2.0](https://github.com/antvis/X6/releases/tag/%40antv/x6-sites%401.2.0)
2022-12-16 10:44:52 +00:00
2f92e33d0e fix: remove useless repo url 2022-12-16 18:33:03 +08:00
df540d9b79 chore: rename dir 2022-12-16 18:19:58 +08:00
3bc37971f8 chore: update deprecated terser plugin
Co-authored-by: NewByVector <vectorse@126.com>
2022-12-16 18:07:58 +08:00
50284c2d51 chore: update contributors [skip ci] 2022-12-16 08:44:49 +00:00
15284e778a fix: 🐛 char ghosting when edit text () ()
* fix: 🐛 char ghosting when edit text ()

* fix: 🐛 grammar style improvement
2022-12-16 16:44:28 +08:00
1a0e8cf969 docs: fix broken CI status badge 2022-12-16 15:44:05 +08:00
1089109b08 chore: update build:watch script () 2022-12-12 21:26:40 +08:00
faf294a5ec chore: only support react18 in 2.1.x () 2022-12-12 21:21:41 +08:00
25461fd985 docs: update vue demo ()
* chore: refactor x6-site

* docs: update vue demo
2022-12-12 16:38:16 +08:00
35f2966219 chore: refactor x6-site ()
* chore: refactor x6-site

* chore: fix ts lint and style lint error
2022-12-12 16:21:09 +08:00
26df790b8c chore: remove sites files () 2022-12-12 10:25:03 +08:00
bc7efe8db9 chore: update package version () 2022-12-11 20:15:16 +08:00
abeb009d0a fix: cancel debounce update for scroller plugin () 2022-12-11 17:44:13 +08:00
ad08cf87ef chore: update contributors [skip ci] 2022-12-10 01:29:38 +00:00
16c2ef35e0 chore(release): release 1 package [skip ci]
[@antv/x6-vue-shape@2.0.7](https://www.npmjs.com/package/@antv/x6-vue-shape/v/2.0.7)
[@antv/x6-vue-shape@2.0.7](https://github.com/antvis/X6/releases/tag/%40antv/x6-vue-shape%402.0.7)
2022-12-09 07:37:48 +00:00
187e318aee fix: cannot read properties of undefined when unmount vue component ()
* fix: cannot read properties of undefined when unmount vue component

* fix: cannot read properties of undefined when unmount vue component
2022-12-09 15:26:57 +08:00
f07abff980 chore(release): release 1 package [skip ci]
[@antv/x6@2.0.8](https://www.npmjs.com/package/@antv/x6/v/2.0.8)
[@antv/x6@2.0.8](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.0.8)
2022-12-08 01:44:43 +00:00
4a6a634a8a fix: trigger preventDefault by origin event () 2022-12-08 09:35:17 +08:00
627368e0dd chore(release): release 1 package [skip ci]
[@antv/x6-plugin-transform@2.1.4](https://www.npmjs.com/package/@antv/x6-plugin-transform/v/2.1.4)
[@antv/x6-plugin-transform@2.1.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-transform%402.1.4)
2022-12-07 09:03:49 +00:00
604c0244cd fix: make resizing options take effect () 2022-12-07 16:53:46 +08:00
80898ada1c chore(release): release 1 package [skip ci]
[@antv/x6@2.0.7](https://www.npmjs.com/package/@antv/x6/v/2.0.7)
[@antv/x6@2.0.7](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.0.7)
2022-12-06 09:38:57 +00:00
057d5209ff fix: hide elems when visible is false () 2022-12-06 17:26:38 +08:00
2070828425 chore: remove ts and style lint error () 2022-12-05 17:20:38 +08:00
502422fe24 Delete .lgtm.yml 2022-12-05 17:06:19 +08:00
8daf0fd62c chore: config codeql 2022-12-05 16:55:39 +08:00
a108b50a66 chore: update contributors [skip ci] 2022-12-03 03:49:59 +00:00
525bac1907 chore: release @antv/x6-plugin-selection@2.1.5 () 2022-12-03 11:49:38 +08:00
34ec3d29ab chore: update CONTRIBUTORS [skip ci] 2022-12-03 03:34:26 +00:00
74fb7b86d7 chore: add eslintcache ()
* chore: add eslintcache

* chore: add eslintcache
2022-12-03 11:27:56 +08:00
1fb2d8308a fix: use geometry in selection box () 2022-12-02 17:49:13 +08:00
b2b8ac578c chore: update CONTRIBUTORS [skip ci] 2022-12-02 08:51:57 +00:00
1b03004ee5 chore: update contributors [skip ci] 2022-12-02 08:44:34 +00:00
53c9eaf626 chore: update wrong comment word ()
Co-authored-by: hehongsheng <hehongsheng@dolinkhub.com>
2022-12-02 16:44:14 +08:00
05d1fe35d6 fix: remove lint error ()
* chore: release 4 packages

x6@2.0.6
x6-plugin-export@2.1.4
x6-plugin-snapline@2.1.6
x6-react-shape@2.0.6

* fix: remove lint error
2022-12-01 11:51:31 +08:00
b05d1596dd chore: update deps 2022-12-01 11:38:15 +08:00
8843212f53 chore: move '--debug' to env variable 'SRM_DEBUG' 2022-12-01 11:38:15 +08:00
f920d5a4ee fix: export toJpeg methods in export plugin () 2022-11-30 10:50:30 +08:00
6a81805075 fix: render react shape in dnd graph () 2022-11-29 21:22:49 +08:00
94f90425f6 fix: support react 17 () 2022-11-29 19:40:46 +08:00
cd85c5bd26 chore(release): release 1 package [skip ci]
[@antv/x6-geometry@2.0.4](https://www.npmjs.com/package/@antv/x6-geometry/v/2.0.4)
[@antv/x6-geometry@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-geometry%402.0.4)
2022-11-29 09:41:38 +00:00
16b6c89e6b fix: regex for excluding coverage 2022-11-29 17:29:47 +08:00
76be8db8ca docs: update sites url 2022-11-29 17:27:40 +08:00
18c0edf483 chore(release): release 1 package [skip ci]
[@antv/x6-plugin-keyboard@2.1.4](https://www.npmjs.com/package/@antv/x6-plugin-keyboard/v/2.1.4)
[@antv/x6-plugin-keyboard@2.1.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-keyboard%402.1.4)
2022-11-29 08:53:51 +00:00
4978110b45 fix: not trigger keyboard event whith delete key in contenteditable elem () 2022-11-29 16:44:32 +08:00
8eb43874a5 Add CodeQL workflow for GitHub code scanning ()
Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com>
2022-11-29 15:53:33 +08:00
83d0295596 chore: update readme () 2022-11-29 14:58:10 +08:00
2c40e3d129 chore: hide coverage badge 2022-11-29 10:03:52 +08:00
d903e5a5b6 fix: trigger transform knob after click node () 2022-11-28 20:19:27 +08:00
c350371d3c fix: dom.data support custom object () 2022-11-28 16:10:34 +08:00
9f3ba0f3b4 chore: update contributors [skip ci] 2022-11-28 01:30:11 +00:00
b0555151e9 fix: render vue shape in minimap with same cellid when using teleport ()
* fix: render vue shape in minimap with same cellid when using teleport

* fix: render vue shape in minimap with same cellid when using teleport
2022-11-27 10:42:13 +08:00
1d324df545 chore(release): release 1 package [skip ci]
[@antv/x6-plugin-clipboard@2.1.3](https://www.npmjs.com/package/@antv/x6-plugin-clipboard/v/2.1.3)
[@antv/x6-plugin-clipboard@2.1.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-clipboard%402.1.3)
2022-11-25 11:48:13 +00:00
d6df2d5981 fix: broken file 2022-11-25 18:15:46 +08:00
273102322b chore: update package version ()
* chore: update package version

* chore: fix repository url

* chore: enable publish to npm

Co-authored-by: bubkoo <bubkoo.wy@gmail.com>
2022-11-25 18:13:10 +08:00
1dcab69b18 chore(release): release 17 packages [skip ci]
[@antv/x6@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.0.4)

[@antv/x6-common@2.0.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-common%402.0.1)

[@antv/x6-geometry@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-geometry%402.0.3)

[@antv/x6-plugin-clipboard@2.1.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-clipboard%402.1.2)

[@antv/x6-plugin-dnd@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-dnd%402.0.3)

[@antv/x6-plugin-export@2.1.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-export%402.1.2)

[@antv/x6-plugin-history@2.1.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-history%402.1.3)

[@antv/x6-plugin-keyboard@2.1.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-keyboard%402.1.3)

[@antv/x6-plugin-minimap@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-minimap%402.0.3)

[@antv/x6-plugin-scroller@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-scroller%402.0.3)

[@antv/x6-plugin-selection@2.1.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-selection%402.1.4)

[@antv/x6-plugin-snapline@2.1.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-snapline%402.1.4)

[@antv/x6-plugin-stencil@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-stencil%402.0.3)

[@antv/x6-plugin-transform@2.1.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-transform%402.1.2)

[@antv/x6-react-components@2.0.5](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-components%402.0.5)

[@antv/x6-react-shape@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-shape%402.0.4)

[@antv/x6-vue-shape@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-vue-shape%402.0.4)
2022-11-25 09:50:08 +00:00
cb0cfdeb4d fix: npm version 2022-11-25 17:44:42 +08:00
bdba8cef5c chore(release): release 16 packages [skip ci]
[@antv/x6@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6%402.0.3)

[@antv/x6-geometry@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-geometry%402.0.2)

[@antv/x6-plugin-clipboard@2.1.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-clipboard%402.1.1)

[@antv/x6-plugin-dnd@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-dnd%402.0.2)

[@antv/x6-plugin-export@2.1.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-export%402.1.1)

[@antv/x6-plugin-history@2.1.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-history%402.1.2)

[@antv/x6-plugin-keyboard@2.1.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-keyboard%402.1.2)

[@antv/x6-plugin-minimap@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-minimap%402.0.2)

[@antv/x6-plugin-scroller@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-scroller%402.0.2)

[@antv/x6-plugin-selection@2.1.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-selection%402.1.3)

[@antv/x6-plugin-snapline@2.1.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-snapline%402.1.3)

[@antv/x6-plugin-stencil@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-stencil%402.0.2)

[@antv/x6-plugin-transform@2.1.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-transform%402.1.1)

[@antv/x6-react-components@2.0.4](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-components%402.0.4)

[@antv/x6-react-shape@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-shape%402.0.3)

[@antv/x6-vue-shape@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-vue-shape%402.0.3)
2022-11-25 09:27:28 +00:00
6c4244c747 chore: ignore build 2022-11-25 17:06:13 +08:00
e6a1a71932 chore: disable publish to npm 2022-11-25 17:01:54 +08:00
7d64596767 chore: disable breaking changes 2022-11-25 16:11:46 +08:00
54725040f2 fix: type errors 2022-11-25 15:12:22 +08:00
a2a2e657e9 chore: disable breaking changes 2022-11-25 15:11:02 +08:00
593416d8d9 docs: update homepage of packages 2022-11-25 14:34:56 +08:00
96fc0d79cb chore: remove "gitHead" field 2022-11-25 14:34:56 +08:00
85aa3c82ca chore(release): release 3 packages [skip ci]
[@antv/x6-plugin-keyboard@2.1.1](https://www.npmjs.com/package/@antv/x6-plugin-keyboard/v/2.1.1)
[@antv/x6-plugin-keyboard@2.1.1](https://github.com/antvis/X6/releases/tag/%40antv/x6-plugin-keyboard%402.1.1)

[@antv/x6-react-components@2.0.3](https://www.npmjs.com/package/@antv/x6-react-components/v/2.0.3)
[@antv/x6-react-components@2.0.3](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-components%402.0.3)

[@antv/x6-react-shape@2.0.2](https://www.npmjs.com/package/@antv/x6-react-shape/v/2.0.2)
[@antv/x6-react-shape@2.0.2](https://github.com/antvis/X6/releases/tag/%40antv/x6-react-shape%402.0.2)
2022-11-25 06:25:01 +00:00
f20127af55 perf: update deps 2022-11-25 14:00:58 +08:00
f275d3df1e chore: combine release commits 2022-11-25 14:00:01 +08:00
3a1f34ecfd chore: do not release with "ci" and "chore" commits 2022-11-25 14:00:01 +08:00
279caf5173 chore(release): @antv/x6-react-components@2.0.3 [skip ci] 2022-11-24 14:19:16 +00:00
2dcf5d2461 chore(release): @antv/x6-plugin-selection@2.1.2 [skip ci] 2022-11-24 14:19:14 +00:00
d83837d85a chore(release): @antv/x6-plugin-history@2.1.1 [skip ci] 2022-11-24 14:19:10 +00:00
41a64aa1d8 chore(release): @antv/x6@2.0.2 [skip ci] 2022-11-24 14:19:07 +00:00
d4df46ab40 fix: update react type version () 2022-11-24 22:09:33 +08:00
f448f72417 docs: update antd to v5 for demos () 2022-11-24 21:04:58 +08:00
557d2df152 fix: get correct center when zoom () 2022-11-24 19:29:01 +08:00
5edd9ba5f2 chore: update CONTRIBUTORS [skip ci] 2022-11-24 08:23:49 +00:00
bfd1103fd4 chore: update contributors [skip ci] 2022-11-24 08:17:04 +00:00
75f42978cb fix: deep clone instead of shallow clone ()
Co-authored-by: Qinghui.Liu <Qinghui.Liu@fanruan.com>
2022-11-24 16:16:25 +08:00
2ecc213094 fix: support antd5 in react components () 2022-11-24 16:16:06 +08:00
16c19e0591 chore: fix git committer name 2022-11-24 15:34:34 +08:00
02d95cfeea docs: update deps for sites demo () 2022-11-24 15:33:09 +08:00
602fcfa0ed chore(release): @antv/x6-vue-shape@2.0.2 [skip ci] 2022-11-24 07:25:28 +00:00
4be1397374 chore(release): @antv/x6-react-components@2.0.2 [skip ci] 2022-11-24 07:25:25 +00:00
e326d8beb9 chore(release): @antv/x6-plugin-snapline@2.1.2 [skip ci] 2022-11-24 07:25:21 +00:00
d6ae5199c0 fix: updae react-resize-detector version () 2022-11-24 15:12:31 +08:00
97e758fee6 chore: config pnpm workspace 2022-11-24 14:38:01 +08:00
fabd9d5ed9 chore: enable npm publish 2022-11-24 14:31:00 +08:00
08a38bfabd chore(release): @antv/x6-plugin-snapline@2.1.1 [skip ci] 2022-11-24 06:10:43 +00:00
a6055a2b89 chore(release): @antv/x6-example-features@2.0.0 [skip ci] 2022-11-24 06:10:20 +00:00
083948a040 chore(release): @antv/x6-plugin-selection@2.1.1 [skip ci] 2022-11-24 06:10:00 +00:00
bc261fb992 fix: modify the semantics of filter () 2022-11-24 13:58:11 +08:00
33a2ba2c04 chore(release): @antv/x6-vue-shape@2.0.1 [skip ci] 2022-11-24 04:22:15 +00:00
40d26f87c2 chore(release): @antv/x6-react-shape@2.0.1 [skip ci] 2022-11-24 04:22:12 +00:00
f901d2c149 chore(release): @antv/x6-react-components@2.0.1 [skip ci] 2022-11-24 04:22:09 +00:00
da99354379 chore(release): @antv/x6-plugin-transform@2.1.0 [skip ci] 2022-11-24 04:22:06 +00:00
28111565fa chore(release): @antv/x6-plugin-stencil@2.0.1 [skip ci] 2022-11-24 04:22:03 +00:00
85308db9a0 chore(release): @antv/x6-plugin-snapline@2.1.0 [skip ci] 2022-11-24 04:22:01 +00:00
b58ced43f6 chore(release): @antv/x6-plugin-selection@2.1.0 [skip ci] 2022-11-24 04:21:58 +00:00
9b6c5420aa chore(release): @antv/x6-plugin-scroller@2.0.1 [skip ci] 2022-11-24 04:21:55 +00:00
6fc0344552 chore(release): @antv/x6-plugin-minimap@2.0.1 [skip ci] 2022-11-24 04:21:53 +00:00
86fed91719 chore(release): @antv/x6-plugin-keyboard@2.1.0 [skip ci] 2022-11-24 04:21:50 +00:00
2ceee7d067 chore(release): @antv/x6-plugin-history@2.1.0 [skip ci] 2022-11-24 04:21:48 +00:00
a4a1b37413 chore(release): @antv/x6-plugin-export@2.1.0 [skip ci] 2022-11-24 04:21:45 +00:00
14acda8f4b chore(release): @antv/x6-plugin-dnd@2.0.1 [skip ci] 2022-11-24 04:21:42 +00:00
8af0f1c676 chore(release): @antv/x6-plugin-clipboard@2.1.0 [skip ci] 2022-11-24 04:21:40 +00:00
58853d9ac2 chore(release): @antv/x6-common@2.0.1 [skip ci] 2022-11-24 04:21:37 +00:00
7551e782c1 chore(release): @antv/x6@2.0.1 [skip ci] 2022-11-24 04:21:34 +00:00
1586 changed files with 44785 additions and 89822 deletions
.github/workflows
.gitignore.lgtm.yml.prettierignore.releaserc.stylelintrcCONTRIBUTORSCONTRIBUTORS.svgREADME.en-us.mdREADME.md
examples/x6-example-features
karma.conf.jspackage.json
packages
pnpm-lock.yamlpnpm-workspace.yamlrollup.config.js
scripts
sites
x6-sites-demos-helper
x6-sites-demos
CHANGELOG.mdpackage.json
packages
api
graph
registry
attr
background
connection-point/playground
connector
edge-anchor/playground
edge-tool
filter
grid
node-anchor/playground
node-tool
port-label-layout
port-layout
router
ui
performance
scene/sankey
tutorial
basic
edge
events/custom-click
graph
interacting
node
port
serialization
getting-started
intermediate
plugins
x6-sites
.dumi
global.ts
theme/locales
.dumirc.ts.eslintrc.gitignoreCHANGELOG.mdCNAME
docs
api
temp
tutorial
examples
gatsby-browser.jsgatsby-config.jsgatsby-node.jspackage.json
public
site
src
tutorial
basic
getting-started
intermediate
plugins
typings

42
.github/workflows/codeql.yml vendored Normal file

@ -0,0 +1,42 @@
name:  CodeQL
on:
push:
branches: [ "master", "bot", "gh-pages", "v1" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "41 2 * * 1"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ javascript ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/workflows/config/codeql.yml
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"

7
.github/workflows/config/codeql.yml vendored Normal file

@ -0,0 +1,7 @@
paths-ignore:
- sites/public
query-filters:
- exclude:
id: js/use-before-declaration
- exclude:
id: js/polynomial-redos

@ -57,15 +57,16 @@ jobs:
private_key: ${{ secrets.PRIVATE_KEY }}
- name: 📦 Semantic Release
run: pnpm srm --debug --comment-footer 'Thanks for being a part of the [AntV](https://github.com/antvis) community! 💪💯'
run: pnpm srm --combine-commits --comment-footer 'Thanks for being a part of the [AntV](https://github.com/antvis) community! 💪💯'
env:
SRM_DEBUG: ${{ secrets.SRM_DEBUG }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ env.BOT_TOKEN }}
GIT_AUTHOR_NAME: ${{ env.BOT_NAME }}
GIT_AUTHOR_EMAIL: ${{ env.BOT_NAME }}@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ env.BOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ env.BOT_NAME }}@users.noreply.github.com
GIT_AUTHOR_NAME: ${{ env.BOT_NAME }}[bot]
GIT_AUTHOR_EMAIL: ${{ env.BOT_NAME }}[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ env.BOT_NAME }}[bot]
GIT_COMMITTER_EMAIL: ${{ env.BOT_NAME }}[bot]@users.noreply.github.com
- name: 🔀 Repository Dispatch
if: github.ref == 'refs/heads/master'

2
.gitignore vendored

@ -15,3 +15,5 @@ dist
tmp
test/coverage
packages/**/src/style/raw.ts
.eslintcache
.stylelintcache

@ -1,12 +0,0 @@
# @see https://help.semmle.com/lgtm-enterprise/user/help/lgtm.yml-configuration-file.html
# @template https://lgtm.com/static/downloads/lgtm.template.yml
queries:
- exclude: js/use-before-declaration
- exclude: js/polynomial-redos
extraction:
javascript:
index:
filters:
- exclude: "sites/x6-sites/static"

@ -12,5 +12,5 @@ es/
lib/
dist/
coverage/
sites/x6-sites/static/demos
sites/public
csstype.ts

@ -11,22 +11,17 @@
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
},
"releaseRules": [
{ "breaking": true, "release": "major" },
{ "revert": true, "release": "patch" },
{ "type": "feat", "release": "minor" },
{ "type": "ci", "release": "patch" },
{ "type": "build", "release": "patch" },
{ "type": "chore", "release": "patch" },
{ "type": "docs", "release": "patch" },
{ "type": "perf", "release": "patch" },
{ "type": "style", "release": "patch" },
{ "type": "test", "release": "patch" },
{ "type": "refactor", "release": "patch" },
{ "type": "ci", "release": false },
{ "type": "chore", "release": false },
{ "scope": "no-release", "release": false }
]
}
@ -36,7 +31,7 @@
[
"@semantic-release/npm",
{
"npmPublish": false
"npmPublish": true
}
],
[

@ -15,6 +15,11 @@
"no-invalid-double-slash-comments": null,
"no-descending-specificity": null,
"declaration-empty-line-before": null,
"no-duplicate-selectors": null
"no-duplicate-selectors": null,
"value-no-vendor-prefix": null,
"selector-pseudo-class-no-unknown": null,
"selector-class-pattern": null,
"keyframes-name-pattern": null,
"number-max-precision": null
}
}

@ -13,6 +13,7 @@ Indomi <indomi126@gmail.com>
James <san>
Jógvan <lse>
Ken <ei>
Kent <oo>
Limbo <49612796+JUST-Limbo@users.noreply.github.com>
Lixu <37231473+wflixu@users.noreply.github.com>
Lloyd <ho>
@ -27,6 +28,7 @@ Opportunity <opportunity@live.in>
Questions <chip@twostewards.com>
RuiLin <on>
SSC <273702440@qq.com>
Simon <>
Sindori <441933726@qq.com>
Susan <527971893@qq.com>
Thomas <eugne>
@ -58,6 +60,7 @@ myzxlin <myzxlin@163.com>
newbyvector <vectorse@126.com>
niexq <1879633916@qq.com>
niexq <niexq@firstgrid.cn>
njshuisheng <34205271+njshuisheng@users.noreply.github.com>
pengxingjian.pxj <pengxingjian.pxj@alibaba-inc.com>
pfdgithub <pfdgithub@users.noreply.github.com>
qingchi <qinky94@163.com>
@ -82,6 +85,7 @@ zdc1111 <39116292+zdc1111@users.noreply.github.com>
崖 <bubkoo.wy@gmail.com>
崖崖崖 <bubkoo.wy@gmail.com>
文瑀 <wenyu.jqq@antfin.com>
映月 <38279397+orientMoon@users.noreply.github.com>
杨凌 <89915256@qq.com>
柏愚 <boyu.zlj@antfin.com>
粑粑超 <842486229@qq.com>

File diff suppressed because one or more lines are too long

Before

(image error) Size: 10 MiB

After

(image error) Size: 12 MiB

@ -17,7 +17,7 @@
<a href="/LICENSE"><img src="https://img.shields.io/github/license/antvis/x6?style=flat-square" alt="MIT License"></a>
<a href="https://www.typescriptlang.org"><img alt="Language" src="https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square"></a>
<a href="https://github.com/antvis/x6/pulls"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square"></a>
<a href="https://x6.antv.vision"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
<a href="https://x6.antv.antgroup.com/"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
</p>
## Features
@ -84,8 +84,8 @@ graph.addEdge({
## Links
- [Documents](https://x6.antv.vision/zh/docs/tutorial/about)
- [Samples](https://x6.antv.vision/zh/examples/gallery)
- [Documents](https://x6.antv.antgroup.com/tutorial/about)
- [Samples](https://x6.antv.antgroup.com/examples)
- [Blog](https://www.yuque.com/antv/x6/gcinvi)
- [Versioning Release Note](https://www.yuque.com/antv/x6/bbfu6r)
- [FAQ](https://www.yuque.com/antv/x6/be9pfx)

@ -6,8 +6,8 @@
<p align="center"><strong>提供简单易用的节点定制能力和开箱即用的交互组件方便我们快速搭建流程图、DAG 图、ER 图等图应用</strong></p>
<p align="center">
<a href="https://github.com/antvis/X6/actions/workflows/ci.yml"><img alt="build" src="https://img.shields.io/github/workflow/status/antvis/x6/%F0%9F%91%B7%E3%80%80CI/master?logo=github&style=flat-square"></a>
<a href="https://app.codecov.io/gh/antvis/X6"><img alt="coverage" src="https://img.shields.io/codecov/c/gh/antvis/x6?logo=codecov&style=flat-square&token=15CO54WYUV"></a>
<a href="https://github.com/antvis/X6/actions/workflows/ci.yml"><img alt="build" src="https://img.shields.io/github/actions/workflow/status/antvis/x6/ci.yml?branch=master&logo=github&style=flat-square"></a>
<!-- <a href="https://app.codecov.io/gh/antvis/X6"><img alt="coverage" src="https://img.shields.io/codecov/c/gh/antvis/x6?logo=codecov&style=flat-square&token=15CO54WYUV"></a> -->
<a href="https://lgtm.com/projects/g/antvis/x6/context:javascript"><img alt="Language grade: JavaScript" src="https://img.shields.io/lgtm/grade/javascript/g/antvis/x6.svg?logo=lgtm&style=flat-square"></a>
<a href="https://www.npmjs.com/package/@antv/x6"><img alt="NPM Package" src="https://img.shields.io/npm/v/@antv/x6.svg?style=flat-square"></a>
<a href="https://www.npmjs.com/package/@antv/x6"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@antv/x6?logo=npm&style=flat-square"></a>
@ -17,7 +17,7 @@
<a href="/LICENSE"><img src="https://img.shields.io/github/license/antvis/x6?style=flat-square" alt="MIT License"></a>
<a href="https://www.typescriptlang.org"><img alt="Language" src="https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square"></a>
<a href="https://github.com/antvis/x6/pulls"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square"></a>
<a href="https://x6.antv.vision"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
<a href="https://x6.antv.antgroup.com"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
</p>
## 特性
@ -29,12 +29,12 @@
## 兼容环境
- 现代浏览器和 IE11需要 polyfills
- 现代浏览器
- 支持服务端渲染。
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| last 2 versions | last 2 versions | last 2 versions |
## 安装
@ -84,12 +84,12 @@ graph.addEdge({
## 链接
- [文档](https://x6.antv.vision/zh/docs/tutorial/about)
- [示例](https://x6.antv.vision/zh/examples/gallery)
- [博客](https://www.yuque.com/antv/x6/gcinvi)
- [文档](http://x6.antv.antgroup.com/tutorial/about)
- [示例](http://x6.antv.antgroup.com/examples)
- [博客](https://www.yuque.com/antv/x6/huhla47wqalq5n7r)
- [更新日志](https://www.yuque.com/antv/x6/bbfu6r)
- [常见问题](https://www.yuque.com/antv/x6/be9pfx)
- [CodeSanbox 模板](https://codesandbox.io/s/qosj0?file=/src/app.tsx)
- [常见问题](https://www.yuque.com/antv/x6/tox1ukbz5cw57qfy)
- [CodeSanbox 模板](https://codesandbox.io/s/mo-ban-wchooy?file=/src/App.tsx)
## 本地开发

@ -0,0 +1,101 @@
## @antv/x6-example-features [2.0.1](https://github.com/antvis/X6/compare/@antv/x6-example-features@2.0.0...@antv/x6-example-features@2.0.1) (2022-12-16)
### Bug Fixes
* make resizing options take effect ([#3014](https://github.com/antvis/X6/issues/3014)) ([604c024](https://github.com/antvis/X6/commit/604c0244cd71ec8e911754dfe524f12c04e4e9ad))
# @antv/x6-example-features [2.0.0](https://github.com/antvis/X6/compare/@antv/x6-example-features@1.1.2...@antv/x6-example-features@2.0.0) (2022-11-24)
### Bug Fixes
* 🐛 add return value for autoScroller in scroller plugin ([5e102a3](https://github.com/antvis/X6/commit/5e102a39c5bd14a478edd4f36c4264997027c2a9))
* 🐛 add timeout for schedule ([#2303](https://github.com/antvis/X6/issues/2303)) ([a6a2d12](https://github.com/antvis/X6/commit/a6a2d12b07add27ef19eebbf7b5ca7cd17dde09e))
* 🐛 break text with chinese characters(double byte character) ([14199bc](https://github.com/antvis/X6/commit/14199bc8529adddb347ef934926503a789b64980)), closes [#596](https://github.com/antvis/X6/issues/596)
* 🐛 change jobqueue to transient ([0e39d94](https://github.com/antvis/X6/commit/0e39d9447bc8c0ba0b11c272bf9b64df9ba95a33))
* 🐛 do not generate new commands on redoing/undoing ([5b3d713](https://github.com/antvis/X6/commit/5b3d7133f3a7b4841f461e67af5963ec84820741)), closes [#627](https://github.com/antvis/X6/issues/627)
* 🐛 do not update pagesize automatically when set graph size ([949a42d](https://github.com/antvis/X6/commit/949a42dacfc5023d25bcabc0a3a1a7d8578f1b96)), closes [#644](https://github.com/antvis/X6/issues/644) [#564](https://github.com/antvis/X6/issues/564)
* 🐛 fix add tools not work ([f5d1d6a](https://github.com/antvis/X6/commit/f5d1d6a326021247ee8967675fc9490ddbb6d0aa))
* 🐛 fix model event trigger twice ([#789](https://github.com/antvis/X6/issues/789)) ([7638143](https://github.com/antvis/X6/commit/7638143b04c0a50a333200423753f6bd19a6ceb3))
* 🐛 fix running error of x6-example-demo ([#1111](https://github.com/antvis/X6/issues/1111)) ([d5c854f](https://github.com/antvis/X6/commit/d5c854f644e4926dba2913a216870bdbaafd425a))
* 🐛 fix the error in selected nodes position when snapline enabled ([#2797](https://github.com/antvis/X6/issues/2797)) ([1e7f132](https://github.com/antvis/X6/commit/1e7f132bed15006cc5535f1294f0b8a545dd6441))
* 🐛 fix type error ([30ca7a9](https://github.com/antvis/X6/commit/30ca7a92817d28e58589413e36d3d2931360b8ae))
* 🐛 fix x6-react-components version in demo ([709cdae](https://github.com/antvis/X6/commit/709cdae33d13acfd77af11e8bb5fb4f493dd5bd5))
* 🐛 interact with input rendered in react component ([82478b1](https://github.com/antvis/X6/commit/82478b1d66e3b8b4346dab9041cb00e54fea9be1))
* 🐛 linear gradient along edge path ([669fc5b](https://github.com/antvis/X6/commit/669fc5bd2d57635ce9d45dc0470674dad74f4add)), closes [#635](https://github.com/antvis/X6/issues/635)
* 🐛 liner gradient not available on horizontal and vertical edges ([333689a](https://github.com/antvis/X6/commit/333689a880a30dbc0879705b7f655cec8d30f1df)), closes [#635](https://github.com/antvis/X6/issues/635)
* 🐛 optimize cell remove method ([391fe8f](https://github.com/antvis/X6/commit/391fe8fd88f10d936c5860f465c7a423632f30f9))
* 🐛 optimize contextmenu tools ([#1391](https://github.com/antvis/X6/issues/1391)) ([cc01fdf](https://github.com/antvis/X6/commit/cc01fdf208f4fbd283a6ce3d7a106716e8e10300))
* 🐛 set the async of minimapGraph to be the same as sourceGraph ([9dded68](https://github.com/antvis/X6/commit/9dded6853d66b86e7bbeb738b2df15b51d1a8627))
* 🐛 should render vertices tool with lowest z-index ([213a01f](https://github.com/antvis/X6/commit/213a01fca28b1e790ce58d228aa460ea798bb98f)), closes [#638](https://github.com/antvis/X6/issues/638)
* 🐛 update x6-react-shape version ([#1425](https://github.com/antvis/X6/issues/1425)) ([4208846](https://github.com/antvis/X6/commit/4208846337326d8983f1662faa8da67efd8568b4))
* fix contextmenu show multiple times ([5d437ce](https://github.com/antvis/X6/commit/5d437cef07427bf9f2cbae9b2e08dd4a6544ff70))
* fix demo import path error ([2ebf581](https://github.com/antvis/X6/commit/2ebf581dc1ec9c5ee4501917a7cbddbbb4b69c0f))
* fix path error in custom router demo ([#620](https://github.com/antvis/X6/issues/620)) ([7cd3a7e](https://github.com/antvis/X6/commit/7cd3a7e57d772481ad33949ee832a36aab59ef3a))
* refactor example ([#2831](https://github.com/antvis/X6/issues/2831)) ([3d8f005](https://github.com/antvis/X6/commit/3d8f005696021f1d9f91a96812ebadce179f2d73))
* remove x6-common and x6-geometry deps ([#2830](https://github.com/antvis/X6/issues/2830)) ([5b5f5aa](https://github.com/antvis/X6/commit/5b5f5aa7ea6fded1b15abc79b9b5a5e2281b3ab9))
* update dependencies and fix type errors ([#1103](https://github.com/antvis/X6/issues/1103)) ([49d4371](https://github.com/antvis/X6/commit/49d43716ada672e609e4e6d9c6fdca3f494b6f68))
* **wip:** 🐛 click event of contextmenu was not triggered ([2c9363e](https://github.com/antvis/X6/commit/2c9363e46904979901d4b467995d289c094d329a))
### chore
* release beta ([b5f3cfa](https://github.com/antvis/X6/commit/b5f3cfa2042f5196a995a38a8f41f140cabdce57))
### Documentation
* refresh changelogs ([44f89a1](https://github.com/antvis/X6/commit/44f89a1e1a85513a9bf548be87be38e3cdc82574))
### Features
* ✨ add `primer` and `useForeignObject` option for react-shape ([ab6a06f](https://github.com/antvis/X6/commit/ab6a06f1fe70b71ae31acc47b0d9cb02c86097e2))
* ✨ add autoResize feature ([5aeae97](https://github.com/antvis/X6/commit/5aeae976cd7638b2b5c05bc12bc56b562366fe5f))
* ✨ add clipboard plugin ([8107f6d](https://github.com/antvis/X6/commit/8107f6df5de52a33e1b8094a44d59ee7fd2a8042))
* ✨ add dnd plugin ([269fae9](https://github.com/antvis/X6/commit/269fae9e5eeb969c6a7884373aa3a32002c064e6))
* ✨ add history plugin ([#2819](https://github.com/antvis/X6/issues/2819)) ([fd8d384](https://github.com/antvis/X6/commit/fd8d384a29d0f2e02bf066efd19ed3f92614c524))
* ✨ add html shape ([8d75504](https://github.com/antvis/X6/commit/8d7550413f9f6f3177eab9d0f7fef14c55949fb8))
* ✨ add keyboard plugin ([#2665](https://github.com/antvis/X6/issues/2665)) ([bf53677](https://github.com/antvis/X6/commit/bf536778ca7ee3229390dfcfcb085ec55edd9fb2))
* ✨ add library for manipulating and animating SVG ([c07a177](https://github.com/antvis/X6/commit/c07a17785fc99372baaa66ea2525acf1d332fa11))
* ✨ add minimap plugin ([6cdecbb](https://github.com/antvis/X6/commit/6cdecbbba9a4db1f67189e23fb89f2a7ba2af99e))
* ✨ add panning and mousewheel module ([#2243](https://github.com/antvis/X6/issues/2243)) ([55d36e4](https://github.com/antvis/X6/commit/55d36e46808a4c79b086d7798bce396d5211a1dc))
* ✨ add scroller api ([12173bf](https://github.com/antvis/X6/commit/12173bf500624f197ed56cf6a797499587178cba))
* ✨ add selection plugin ([#2742](https://github.com/antvis/X6/issues/2742)) ([50a5dc7](https://github.com/antvis/X6/commit/50a5dc7cd8c2e39a1f8bf8359a0eb189dda8cb86))
* ✨ add snapline plugin ([294672b](https://github.com/antvis/X6/commit/294672b3066b15ab834ce2a3172facc49004c950))
* ✨ add some missing api ([1dcb3d9](https://github.com/antvis/X6/commit/1dcb3d92fd83e5dfd1a1af9670d539a99dd9f55a))
* ✨ add stencil plugin ([#2815](https://github.com/antvis/X6/issues/2815)) ([4e1fb7b](https://github.com/antvis/X6/commit/4e1fb7bef8ff5548edf2529eb27be0a66a600996))
* ✨ add transform plugin ([#2818](https://github.com/antvis/X6/issues/2818)) ([660e2d7](https://github.com/antvis/X6/commit/660e2d7689bfa59a0f4a4a5e3c0ace70dec21e9e))
* ✨ add virtual render feature ([#2198](https://github.com/antvis/X6/issues/2198)) ([fcba5e1](https://github.com/antvis/X6/commit/fcba5e14808d44c80b658c090cc2a4ebcdc64f6d))
* ✨ add xmind demo ([adb2c98](https://github.com/antvis/X6/commit/adb2c98e23e93b7084fd20f05801f2595d4ac990))
* ✨ auto resize graph when container resized ([9c7bc9a](https://github.com/antvis/X6/commit/9c7bc9a4bb210451283663cd99a29bd6c79e2ec4)), closes [#531](https://github.com/antvis/X6/issues/531)
* ✨ export common and geometry in x6 package ([#2820](https://github.com/antvis/X6/issues/2820)) ([df28200](https://github.com/antvis/X6/commit/df282000cc5e17521147c77c210e172c444c9938))
* ✨ expose the selection api ([#2756](https://github.com/antvis/X6/issues/2756)) ([f3edbbc](https://github.com/antvis/X6/commit/f3edbbc95d2038a61116fa71bb0c3016f1c92d5e))
* ✨ improve auto-resize feature ([40d5335](https://github.com/antvis/X6/commit/40d53355cedc0bbbeb1e26948b67254dc6a40d85))
* ✨ random path demo ([38ec683](https://github.com/antvis/X6/commit/38ec683673e2da64296521f23a91f951a442adc0))
* ✨ support inherit options for react-shape registry ([#2596](https://github.com/antvis/X6/issues/2596)) ([ad63046](https://github.com/antvis/X6/commit/ad63046e89fa5853b0cf15947af1ed2a7b625188))
* ✨ support panning scroller graph byrightmousedown ([6ffdb50](https://github.com/antvis/X6/commit/6ffdb5004401b30ff5852a08de9286a934780be3))
* add scroller plugin ([#2580](https://github.com/antvis/X6/issues/2580)) ([5e0e2ac](https://github.com/antvis/X6/commit/5e0e2acde7d7e259ea27d001983e950878d0ecc8))
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/X6/issues/2864)) ([774f547](https://github.com/antvis/X6/commit/774f547b85522eb2411dca949d36ecfe535503f3))
* force release 2.0-beta ([6987d9c](https://github.com/antvis/X6/commit/6987d9ce64454cd76f697d33f96715dbdf56524a))
* support mouseenter and mouseleave event ([#2559](https://github.com/antvis/X6/issues/2559)) ([ecfd426](https://github.com/antvis/X6/commit/ecfd4263b1266a128bf8651c4dd745ff8ab038b3))
* sync code from master ([#2004](https://github.com/antvis/X6/issues/2004)) ([c681405](https://github.com/antvis/X6/commit/c68140504bd21f654870f3d2fc1ad2f16f1113c8)), closes [#1974](https://github.com/antvis/X6/issues/1974) [#1977](https://github.com/antvis/X6/issues/1977) [#1985](https://github.com/antvis/X6/issues/1985) [#1988](https://github.com/antvis/X6/issues/1988) [#1991](https://github.com/antvis/X6/issues/1991) [#1989](https://github.com/antvis/X6/issues/1989)
* upgrade react to 18 in react-components ([#2836](https://github.com/antvis/X6/issues/2836)) ([5138562](https://github.com/antvis/X6/commit/5138562515ddbd3975adc9d93514f21d6fc2bb3e))
### Performance Improvements
* ⚡️ add getMatrixByElementAttr and getBBoxByElementAttr to reduce reflow ([ba5b22a](https://github.com/antvis/X6/commit/ba5b22a33a0af067d77735c5cc46a60a45734dca))
* ⚡️ add simple config to remove rect and text element ([#1449](https://github.com/antvis/X6/issues/1449)) ([0b5f241](https://github.com/antvis/X6/commit/0b5f2413f0b907316784149027615ae2d09616a4))
* ⚡️ check whether label existed in port ([#2063](https://github.com/antvis/X6/issues/2063)) ([5ae7271](https://github.com/antvis/X6/commit/5ae7271a25e804a9321aa80e31dcf6e43144728b))
* ⚡️ optimize breakText for a high performance version ([#2242](https://github.com/antvis/X6/issues/2242)) ([0aced58](https://github.com/antvis/X6/commit/0aced58056d908ec092bca1889b5ef367a94fe68))
* ⚡️ optimize node render performance ([6554959](https://github.com/antvis/X6/commit/65549599d2f82f8052d16776c8d36ce7ee2fba9b))
* ⚡️ repalce getTransformToElement and getBBox to improve performance ([#2177](https://github.com/antvis/X6/issues/2177)) ([1436586](https://github.com/antvis/X6/commit/1436586f85cc2e2f6ec71548f6d6c232be793154))
### BREAKING CHANGES
* dump to 2.0
* force release 2.0-beta
* 2.0-beta

@ -1,17 +1,18 @@
{
"private": true,
"name": "@antv/x6-example-features",
"version": "2.0.0",
"version": "2.0.1",
"scripts": {
"start": "umi dev",
"build": "umi build",
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix",
"precommit": "lint-staged"
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix"
},
"dependencies": {
"@antv/hierarchy": "^0.6.8",
"@antv/x6": "^2.x",
"@antv/x6-plugin-clipboard": "^2.x",
"@antv/x6-plugin-dnd": "^2.x",
"@antv/x6-plugin-export": "^2.x",
"@antv/x6-plugin-history": "^2.x",
"@antv/x6-plugin-keyboard": "^2.x",
"@antv/x6-plugin-minimap": "^2.x",
@ -20,42 +21,34 @@
"@antv/x6-plugin-snapline": "^2.x",
"@antv/x6-plugin-stencil": "^2.x",
"@antv/x6-plugin-transform": "^2.x",
"@antv/x6-plugin-export": "^2.x",
"@antv/x6-react-components": "^2.x",
"@antv/x6-react-shape": "^2.x",
"antd": "^4.4.2",
"classnames": "^2.2.6",
"dagre": "^0.8.5",
"elkjs": "^0.7.1",
"elkjs": "^0.8.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-helmet": "^6.0.0",
"@antv/hierarchy": "^0.6.8"
"react-helmet": "^6.0.0"
},
"devDependencies": {
"@ant-design/icons": "^4.2.2",
"@types/jest": "^25.2.1",
"@types/jest": "^29.2.4",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-helmet": "^6.0.0",
"@types/react-test-renderer": "^16.0.3",
"eslint": "^7.16.0",
"@types/react-test-renderer": "^18.0.0",
"babel-plugin-import": "^1.13.5",
"eslint": "^8.29.0",
"eslint-config-umi": "^1.4.0",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.11.1",
"lint-staged": "^10.5.3",
"react-test-renderer": "^16.7.0",
"umi": "^2.9.0",
"umi-plugin-react": "^1.8.0",
"umi-types": "^0.3.0",
"babel-plugin-import": "^1.13.5"
},
"lint-staged": {
"src/**/*.ts": [
"eslint --fix"
]
"umi-types": "^0.3.0"
},
"engines": {
"node": ">=8.0.0"

@ -7,17 +7,17 @@
.nav {
position: absolute;
z-index: 101;
top: 0;
bottom: 0;
left: 0;
font-size: 13px;
overflow-x: hidden;
overflow-y: auto;
z-index: 101;
box-sizing: border-box;
width: 220px;
padding: 0 16px;
overflow-x: hidden;
overflow-y: auto;
font-size: 13px;
border-right: 1px solid #e9e9e9;
box-sizing: border-box;
ul {
padding-left: 16px;
@ -29,11 +29,11 @@
}
.content {
flex-grow: 1;
box-sizing: border-box;
margin-left: 220px;
padding: 34px;
overflow-x: hidden;
overflow-y: auto;
flex-grow: 1;
margin-left: 220px;
background: #ffffff;
padding: 34px;
background: #fff;
}

@ -8,13 +8,15 @@
border: 1px solid #c2c8d5;
border-left: 4px solid #1890ff;
border-radius: 4px;
box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.06);
box-shadow: 0 2px 5px 1px rgb(0 0 0 / 6%);
img {
flex-shrink: 0;
width: 20px;
height: 20px;
flex-shrink: 0;
margin-left: 8px;
}
.label {
display: inline-block;
flex-shrink: 0;
@ -23,15 +25,19 @@
color: #666;
font-size: 12px;
}
.status {
flex-shrink: 0;
}
&.success {
border-left: 4px solid #52c41a;
}
&.failed {
border-left: 4px solid #ff4d4f;
}
&.running .status img {
animation: spin 1s linear infinite;
}
@ -43,11 +49,13 @@
border-radius: 2px;
box-shadow: 0 0 0 4px #d4e8fe;
}
.node.success {
border-color: #52c41a;
border-radius: 2px;
box-shadow: 0 0 0 4px #ccecc0;
}
.node.failed {
border-color: #ff4d4f;
border-radius: 2px;
@ -80,6 +88,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}

@ -4,6 +4,7 @@
visibility: hidden;
cursor: pointer;
}
&:hover image {
visibility: visible;
}

@ -2,24 +2,25 @@
position: relative;
}
.validating:after {
.validating::after {
position: absolute;
top: 4px;
left: 4px;
content: ' ';
display: block;
width: 50px;
height: 50px;
border-radius: 50%;
border: 6px solid #873bf4;
border-color: #873bf4 transparent #873bf4 transparent;
border-color: #873bf4 transparent;
border-radius: 50%;
animation: lds-dual-ring 1.2s linear infinite;
content: ' ';
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}

@ -2,14 +2,14 @@
.x6-example-wrap {
width: 100%;
height: 100%;
background-color: #ffffff;
background-color: #fff;
.left-side {
position: fixed;
width: 336px;
left: 24px;
top: 0px;
top: 0;
bottom: 0;
left: 24px;
width: 336px;
padding: 0 8px;
overflow-x: visible;
overflow-y: auto;
@ -17,18 +17,18 @@
.right-side {
position: fixed;
top: 0;
right: 24px;
bottom: 0;
width: 336px;
padding: 0 8px;
top: 0px;
bottom: 0;
overflow-x: visible;
overflow-y: auto;
}
.ant-card {
box-shadow: 0 0 10px 1px #e9e9e9;
margin-top: 24px;
box-shadow: 0 0 10px 1px #e9e9e9;
}
.ant-row-flex {
@ -36,14 +36,14 @@
}
.slider-value {
background: #eee;
color: #333333;
padding: 3px 7px;
border-radius: 10px;
display: inline-block;
font-size: 12px;
margin-left: 8px;
padding: 3px 7px;
color: #333;
font-size: 12px;
line-height: 1.25;
background: #eee;
border-radius: 10px;
}
.x6-graph {
@ -52,15 +52,15 @@
.x6-node {
path {
fill: #6a6c8a;
stroke-width: 0px;
transition: fill 0.1s;
fill: #6a6c8a;
stroke-width: 0;
}
text {
fill: #fff;
font-size: 12px;
font-weight: lighter;
font-size: 12px;
fill: #fff;
}
&:hover path {
@ -80,37 +80,37 @@
}
.bbox {
transition-duration: 0.5s;
transition-property: stroke-opacity;
pointer-events: none;
fill: none;
stroke: #16a085;
stroke-width: 2;
stroke-opacity: 0;
fill: none;
transition-property: stroke-opacity;
transition-duration: 0.5s;
pointer-events: none;
}
.axis {
pointer-events: none;
stroke: #95a5a6;
stroke-dasharray: 2, 4;
stroke-width: 1;
pointer-events: none;
}
.padding {
transition-duration: 1s;
transition-property: stroke-opacity;
pointer-events: none;
stroke: #1abc9c;
stroke-opacity: 0;
transition-property: stroke-opacity;
transition-duration: 1s;
pointer-events: none;
}
.grid {
transition-duration: 1s;
transition-property: stroke-opacity;
pointer-events: none;
stroke: #16a085;
stroke-width: 0.5;
stroke-opacity: 0;
transition-property: stroke-opacity;
transition-duration: 1s;
pointer-events: none;
}
.active {

@ -1,9 +1,9 @@
.custom-html {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: #000;
font-size: 16px;
border: 1px solid #000;

@ -1,27 +1,27 @@
.x6-graph-wrap {
width: 100%;
height: 100%;
background-color: #ffffff;
overflow: auto;
padding: 32px 0;
overflow: auto;
background-color: #fff;
> h1 {
display: block;
width: 800px;
margin: 0 auto 32px auto;
margin: 0 auto 32px;
}
}
.x6-graph-tools {
width: 800px;
margin: 0 auto 32px auto;
margin: 0 auto 32px;
}
.x6-graph {
width: 100%;
height: 100%;
box-shadow: 0 0 10px 1px #e9e9e9;
margin: 0 auto;
box-shadow: 0 0 10px 1px #e9e9e9;
}
.x6-node-selected {

@ -1,10 +1,10 @@
.react-algo-node {
display: flex;
align-items: center;
width: 100%;
height: 100%;
border: 1px solid #5f95ff;
border-radius: 14px;
display: flex;
align-items: center;
img {
width: 24px;
@ -13,8 +13,8 @@
span {
margin-left: 4px;
font-size: 12px;
color: #000000a6;
font-size: 12px;
}
&.dark {

@ -2,20 +2,20 @@
.my-port {
width: 100%;
height: 100%;
background: #eee;
border: 1px solid #808080;
border-radius: 100%;
background: #eee;
&.connected {
width: 0;
height: 0;
margin-top: 5px;
margin-left: 1px;
border-width: 5px 4px 0;
border-style: solid;
border-color: #808080 transparent transparent;
border-radius: 0;
background-color: transparent;
border-color: #808080 transparent transparent;
border-style: solid;
border-width: 5px 4px 0;
border-radius: 0;
}
}
@ -30,30 +30,30 @@
}
body > div::before {
content: ' ';
float: left;
box-sizing: border-box;
width: 20px;
height: 20px;
margin-top: -5px;
margin-left: -5px;
background-color: rgb(57 202 116 / 60%);
border-radius: 50%;
background-color: rgba(57, 202, 116, 0.6);
box-sizing: border-box;
content: ' ';
}
body > div::after {
content: ' ';
position: relative;
z-index: 10;
float: left;
clear: both;
box-sizing: border-box;
width: 10px;
height: 10px;
margin-top: -15px;
border-radius: 50%;
background-color: #fff;
border: 1px solid #39ca74;
position: relative;
z-index: 10;
box-sizing: border-box;
border-radius: 50%;
content: ' ';
}
}
@ -65,30 +65,30 @@
}
body > div::before {
content: ' ';
float: left;
box-sizing: border-box;
width: 28px;
height: 28px;
margin-top: -9px;
margin-left: -9px;
background-color: rgb(57 202 116 / 60%);
border-radius: 50%;
background-color: rgba(57, 202, 116, 0.6);
box-sizing: border-box;
content: ' ';
}
body > div::after {
content: ' ';
position: relative;
z-index: 10;
float: left;
clear: both;
box-sizing: border-box;
width: 10px;
height: 10px;
margin-top: -19px;
border-radius: 50%;
background-color: #fff;
border: 1px solid #39ca74;
position: relative;
z-index: 10;
box-sizing: border-box;
border-radius: 50%;
content: ' ';
}
}
}

@ -1,4 +1,4 @@
.x6-graph-scroller {
box-shadow: 0 0 10px 1px #e9e9e9;
margin: 0 auto;
box-shadow: 0 0 10px 1px #e9e9e9;
}

@ -25,7 +25,6 @@ export default class Example extends React.Component {
strict: true,
showNodeSelectionBox: true,
selectCellOnMoved: false,
useCellGeometry: true,
filter(cell) {
return cell !== a
},

@ -1,20 +1,20 @@
.react-table {
width: 100%;
height: 100%;
border: 1px solid #edf2f5;
background-color: #fff;
border-radius: 5px;
overflow: hidden;
background-color: #fff;
border: 1px solid #edf2f5;
border-radius: 5px;
.inner {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
padding: 12px;
border: 1px solid #fff;
background: #edf2f5;
border: 1px solid #fff;
border-radius: 5px;
display: flex;
flex-direction: column;
}
.header {
@ -36,21 +36,21 @@
}
ul {
padding: 0;
margin: 0;
padding: 0;
}
li {
list-style: none;
height: 40px;
line-height: 40px;
padding-left: 16px;
line-height: 40px;
list-style: none;
border: 1px solid transparent;
&:hover {
border: 1px solid #1890ff;
// background: rgba(230,247,255,.92);
z-index: 0;
border: 1px solid #1890ff;
}
}
}
@ -58,8 +58,8 @@
.react-table-port {
width: 100%;
height: 100%;
overflow: hidden;
background: #eee;
border: 1px solid #808080;
border-radius: 100%;
background: #eee;
overflow: hidden;
}

@ -1,41 +1,44 @@
.tools {
width: 800px;
margin: 32px auto;
.ant-input {
margin-bottom: 16px;
}
}
.react-node {
display: flex;
align-items: center;
width: 100%;
height: 100%;
border: 1px solid #5f95ff;
border-radius: 14px;
display: flex;
align-items: center;
img {
width: 24px;
height: 24px;
}
span {
margin-left: 4px;
font-size: 12px;
color: #000000a6;
font-size: 12px;
}
}
.stutterer {
transform: scale(1.5);
height: 310px;
width: 310px;
position: absolute;
left: 0;
right: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 310px;
height: 310px;
margin: auto;
box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.2);
border-radius: 200px;
box-shadow: 0 0 10px 10px rgb(0 0 0 / 20%);
transform: scale(1.5);
}
.clockHand {
@ -50,12 +53,12 @@
}
.innerLine {
border-radius: 6px;
position: absolute;
height: 149px;
left: 47.5%;
top: 0%;
left: 47.5%;
width: 5%;
height: 149px;
background-color: red;
border-radius: 6px;
transform-origin: bottom center;
}

@ -96,7 +96,7 @@ module.exports = function (config, base, karmaTypescriptConfig) {
},
coverageOptions: {
instrumentation: !isDebug,
exclude: /\.test|spec\.ts$/,
exclude: /\.(test|spec)\.ts$/,
},
reports: {
html: reportsDir,

@ -3,8 +3,8 @@
"private": true,
"scripts": {
"preinstall": "node ./scripts/preinstall",
"lint:ts": "eslint '**/src/**/*.{js,ts}?(x)' --fix",
"lint:style": "stylelint '**/src/**/*.less' --syntax less --fix",
"lint:ts": "eslint '**/src/**/*.{js,ts}?(x)' --cache --fix",
"lint:style": "stylelint '**/src/**/*.less' --customSyntax postcss-less --cache --fix",
"lint": "run-s lint:ts lint:style",
"prettier": "prettier --write '**/*.{js,mjs,jsx,tsx,ts,less,md,json}'",
"pretty-quick": "pretty-quick",
@ -15,7 +15,6 @@
"build:dev": "turbo run build:dev --filter=./packages/*",
"build:umd": "turbo run build:umd --filter=./packages/*",
"build:demos": "sh ./scripts/build-demos",
"build:sites": "sh ./scripts/build-sites",
"clean:turbo": "pnpm -r --if-present --parallel --filter=./packages/* run clean:turbo",
"clean:build": "pnpm -r --if-present --parallel --filter=./packages/* run clean",
"clean:modules": "pnpm -r --parallel exec rimraf node_modules && rimraf node_modules",
@ -37,8 +36,8 @@
"build:umd": "pnpm run --if-present build:less && rollup -c ../../rollup.config.js --bundleConfigAsCjs",
"build:dev": "pnpm run --if-present build:less && run-p -s build:cjs build:esm",
"build:watch": "run-s -s build:watch:esm",
"build:watch:esm": "run-s -s 'build:esm -w'",
"build:watch:cjs": "run-s -s 'build:cjs -w'",
"build:watch:esm": "run-s -s 'build:esm -- -w'",
"build:watch:cjs": "run-s -s 'build:cjs -- -w'",
"build": "run-p -s build:dev build:umd",
"prebuild": "run-s -s clean:build",
"test": {
@ -89,40 +88,40 @@
}
},
"dependencies": {
"@babel/core": "^7.20.2",
"@babel/core": "^7.20.5",
"@babel/plugin-syntax-flow": "^7.18.6",
"@babel/plugin-transform-react-jsx": "^7.19.0",
"@commitlint/config-conventional": "^17.2.0",
"@rollup/plugin-commonjs": "^23.0.2",
"@commitlint/config-conventional": "^17.3.0",
"@rollup/plugin-commonjs": "^23.0.5",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.1",
"@rollup/plugin-typescript": "^8.2.5",
"@semantic-release-monorepo/cli": "^2.0.0",
"@semantic-release/changelog": "^6.0.1",
"@rollup/plugin-typescript": "^10.0.1",
"@semantic-release-monorepo/cli": "^2.1.2",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"@types/jasmine": "^4.3.0",
"@types/jest": "^29.2.2",
"@types/node": "^18.11.9",
"@types/jest": "^29.2.4",
"@types/node": "^18.11.15",
"@types/sinon": "^10.0.2",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"boxen": "^7.0.0",
"colors": "^1.4.0",
"coveralls": "^3.1.1",
"eslint": "^8.26.0",
"eslint": "^8.29.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^27.1.4",
"eslint-plugin-jest": "^27.1.7",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unicorn": "^44.0.2",
"fs-extra": "^10.0.0",
"eslint-plugin-unicorn": "^45.0.2",
"fs-extra": "^11.1.0",
"husky": "^8.0.1",
"is-ci": "^3.0.0",
"jasmine-core": "^4.5.0",
@ -131,27 +130,27 @@
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^5.1.0",
"karma-spec-reporter": "^0.0.34",
"karma-spec-reporter": "^0.0.36",
"karma-typescript": "5.5.3",
"karma-typescript-es6-transform": "5.5.3",
"less": "^4.1.1",
"lodash": "^4.17.21",
"npm-run-all": "^4.1.5",
"postcss": "^8.3.6",
"prettier": "^2.4.0",
"postcss": "^8.4.20",
"postcss-less": "^6.0.0",
"prettier": "^2.8.0",
"pretty-quick": "^3.1.1",
"rimraf": "^3.0.2",
"rollup": "^3.2.5",
"rollup": "^3.7.4",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-postcss": "^4.0.1",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-terser": "^7.0.2",
"run-shared-scripts": "^1.0.2",
"run-shared-scripts": "^1.1.5",
"semantic-release": "^19.0.5",
"sinon": "^14.0.1",
"stylelint": "^14.14.1",
"stylelint-config-prettier": "^9.0.3",
"sinon": "^15.0.1",
"stylelint": "^14.15.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^29.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.4.0",
@ -160,6 +159,9 @@
"ts-node": "^10.2.1",
"tslib": "^2.4.1",
"turbo": "^1.6.3",
"typescript": "^4.4.3"
"typescript": "^4.9.3"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.2.0"
}
}

@ -0,0 +1,15 @@
## @antv/x6-common [2.0.4](https://github.com/antvis/x6/compare/@antv/x6-common@2.0.3...@antv/x6-common@2.0.4) (2022-12-20)
### Bug Fixes
* fix window incompatibility problem ([#3070](https://github.com/antvis/x6/issues/3070)) ([d8e1e63](https://github.com/antvis/x6/commit/d8e1e637d8027b9494cd26efc87815d74bd51366))
## @antv/x6-common [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-common@2.0.0...@antv/x6-common@2.0.1) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-common [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-common@2.0.0...@antv/x6-common@2.0.1) (2022-11-24)

@ -1,6 +1,6 @@
{
"name": "@antv/x6-common",
"version": "2.0.0",
"version": "2.0.4",
"description": "Basic toolkit for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "vectorse@126.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-common"
},
"publishConfig": {

@ -6,5 +6,5 @@ export {
sortBy,
groupBy,
difference,
max
max,
} from 'lodash-es'

@ -1,3 +1,5 @@
/* eslint-disable no-constructor-return */
import { NumberExt } from '../number'
export class Color {

@ -33,7 +33,7 @@ export function addClass(
}
if (typeof selector === 'string' && elem.nodeType === 1) {
const classes = selector.match(rnotwhite) || []
const classes: string[] = selector.match(rnotwhite) || []
const oldValue = fillSpaces(getClass(elem)).replace(rclass, ' ')
let newValue = classes.reduce((memo, cls) => {
if (memo.indexOf(fillSpaces(cls)) < 0) {
@ -63,7 +63,7 @@ export function removeClass(
}
if ((!selector || typeof selector === 'string') && elem.nodeType === 1) {
const classes = (selector || '').match(rnotwhite) || []
const classes: string[] = (selector || '').match(rnotwhite) || []
const oldValue = fillSpaces(getClass(elem)).replace(rclass, ' ')
let newValue = classes.reduce((memo, cls) => {
const className = fillSpaces(cls)

@ -1,26 +1,25 @@
import { StringExt } from '../string'
export function getData(dataset: Record<string, any>, name: string) {
const value = dataset[name] || dataset[StringExt.camelCase(name)]
try {
return JSON.parse(value)
} catch {
return value
const dataset: WeakMap<Element, Record<string, any>> = new WeakMap()
export function getData(elem: Element, name: string) {
const key = StringExt.camelCase(name)
const cache = dataset.get(elem)
if (cache) {
return cache[key]
}
}
export function setData(
dataset: Record<string, any>,
name: string,
value: any,
) {
let val = value
try {
val = JSON.stringify(val)
} catch (e) {
// paas
export function setData(elem: Element, name: string, value: any) {
const key = StringExt.camelCase(name)
const cache = dataset.get(elem)
if (cache) {
cache[key] = value
} else {
dataset.set(elem, {
[key]: value,
})
}
dataset[StringExt.camelCase(name)] = val
}
export function data(elem: Element): Record<string, any> | undefined
@ -34,20 +33,17 @@ export function data(
) {
if (!name) {
const datas: Record<string, any> = {}
const dataset = (elem as any).dataset
// eslint-disable-next-line
for (const key in dataset) {
datas[key] = getData(dataset, key)
}
Object.keys(dataset).forEach((key) => {
datas[key] = getData(elem, key)
})
return datas
}
if (typeof name === 'string') {
const dataset = (elem as any).dataset
if (value === undefined) {
return getData(dataset, name)
return getData(elem, name)
}
setData(dataset, name, value)
setData(elem, name, value)
return
}

@ -117,6 +117,7 @@ export function unsetByPath(
return obj
}
// eslint-disable-next-line default-param-last
export function flatten(obj: any, delim = '/', stop?: (val: any) => boolean) {
const ret: { [key: string]: any } = {}

@ -1,6 +1,10 @@
// compatible with NodeList.prototype.forEach() before chrome 51
// https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
if (window.NodeList && !NodeList.prototype.forEach) {
if (
typeof window === 'object' &&
window.NodeList &&
!NodeList.prototype.forEach
) {
NodeList.prototype.forEach = Array.prototype.forEach as any
}

@ -1 +1,12 @@
## @antv/x6-geometry [2.0.4](https://github.com/antvis/x6/compare/@antv/x6-geometry@2.0.3...@antv/x6-geometry@2.0.4) (2022-11-29)
## @antv/x6-geometry [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-geometry@2.0.2...@antv/x6-geometry@2.0.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-geometry [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-geometry@2.0.1...@antv/x6-geometry@2.0.2) (2022-11-25)
## @antv/x6-geometry [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-geometry@2.0.0...@antv/x6-geometry@2.0.1) (2022-11-24)

@ -5,7 +5,7 @@
<a href="/LICENSE"><img src="https://img.shields.io/github/license/antvis/x6?style=flat-square" alt="MIT License"></a>
<a href="https://www.typescriptlang.org"><img alt="Language" src="https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square"></a>
<a href="https://github.com/antvis/x6/pulls"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square"></a>
<a href="https://x6.antv.vision"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
<a href="https://x6.antv.antgroup.com"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6"></a>
<a href="https://github.com/antvis/X6/actions/workflows/ci.yml"><img alt="build" src="https://img.shields.io/github/workflow/status/antvis/x6/%F0%9F%91%B7%E3%80%80CI/master?logo=github&style=flat-square"></a>
<a href="https://app.codecov.io/gh/antvis/x6"><img alt="coverage" src="https://img.shields.io/codecov/c/gh/antvis/x6?logo=codecov&flag=x6-geometry&style=flat-square&token=15CO54WYUV"></a>
<a href="https://lgtm.com/projects/g/antvis/x6/context:javascript"><img alt="Language grade: JavaScript" src="https://img.shields.io/lgtm/grade/javascript/g/antvis/x6.svg?logo=lgtm&style=flat-square"></a>

@ -1,5 +1,5 @@
{
"version": "2.0.1",
"version": "2.0.4",
"name": "@antv/x6-geometry",
"description": "Geometry operations for X6",
"main": "lib/index.js",
@ -41,13 +41,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-geometry"
},
"publishConfig": {

@ -1,6 +1,8 @@
/* eslint-disable default-param-last */
import { Point } from '../point'
const regexSupportedData = new RegExp(`^[\\s\\dLMCZz,.]*$`)
const regexSupportedData = new RegExp(`^[\\s\\dLMCZz,.]*$`) // eslint-disable-line prefer-regex-literals
export function isValid(data: any) {
if (typeof data !== 'string') {

@ -1,3 +1,5 @@
/* eslint-disable no-constructor-return */
import { Line } from './line'
import { Point } from './point'
import { Rectangle } from './rectangle'

@ -0,0 +1,22 @@
## @antv/x6-plugin-clipboard [2.1.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@2.1.2...@antv/x6-plugin-clipboard@2.1.3) (2022-11-25)
### Bug Fixes
* broken file ([d6df2d5](https://github.com/antvis/x6/commit/d6df2d59811dc18791208af36b452e11e6391f3b))
## @antv/x6-plugin-clipboard [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@2.1.1...@antv/x6-plugin-clipboard@2.1.2) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-clipboard [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@2.1.0...@antv/x6-plugin-clipboard@2.1.1) (2022-11-25)
# @antv/x6-plugin-clipboard [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@2.0.0...@antv/x6-plugin-clipboard@2.1.0) (2022-11-24)
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-clipboard",
"version": "2.0.1",
"version": "2.1.3",
"description": "clipboard plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -47,13 +47,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/clipboard",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-clipboard"
},
"publishConfig": {

@ -0,0 +1,15 @@
## @antv/x6-plugin-dnd [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@2.0.2...@antv/x6-plugin-dnd@2.0.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-dnd [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@2.0.1...@antv/x6-plugin-dnd@2.0.2) (2022-11-25)
## @antv/x6-plugin-dnd [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@2.0.0...@antv/x6-plugin-dnd@2.0.1) (2022-11-24)
### Bug Fixes
* export snap methods from snapline ([#2904](https://github.com/antvis/x6/issues/2904)) ([826ccdd](https://github.com/antvis/x6/commit/826ccdd9a033486ad5b90d666340e46f6c266af7))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-dnd",
"version": "2.0.2",
"version": "2.0.3",
"description": "dnd plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/dnd",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-dnd"
},
"publishConfig": {

@ -0,0 +1,16 @@
## @antv/x6-plugin-export [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@2.1.1...@antv/x6-plugin-export@2.1.2) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-export [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@2.1.0...@antv/x6-plugin-export@2.1.1) (2022-11-25)
# @antv/x6-plugin-export [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@2.0.0...@antv/x6-plugin-export@2.1.0) (2022-11-24)
### Features
* add exportSVG methods ([#2906](https://github.com/antvis/x6/issues/2906)) ([847f225](https://github.com/antvis/x6/commit/847f2256326db0589ac37f1e1fa185560b61bdb7))
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-export",
"version": "2.0.2",
"version": "2.1.5",
"description": "export plugin for X6.",
"main": "lib/index.js",
"module": "es/index.js",
@ -46,13 +46,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/export",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-export"
},
"publishConfig": {

@ -3,12 +3,54 @@ import { Export } from './index'
declare module '@antv/x6/lib/graph/graph' {
interface Graph {
toSVG: (
callback: Export.ToSVGCallback,
options?: Export.ToSVGOptions,
) => void
toPNG: (
callback: Export.ToSVGCallback,
options?: Export.ToImageOptions,
) => void
toJPEG: (
callback: Export.ToSVGCallback,
options?: Export.ToImageOptions,
) => void
exportPNG: (fileName?: string, options?: Export.ToImageOptions) => void
exportJPEG: (fileName?: string, options?: Export.ToImageOptions) => void
exportSVG: (fileName?: string, options?: Export.ToSVGOptions) => void
}
}
Graph.prototype.toSVG = function (
callback: Export.ToSVGCallback,
options?: Export.ToSVGOptions,
) {
const instance = this.getPlugin('export') as Export
if (instance) {
instance.toSVG(callback, options)
}
}
Graph.prototype.toPNG = function (
callback: Export.ToSVGCallback,
options?: Export.ToImageOptions,
) {
const instance = this.getPlugin('export') as Export
if (instance) {
instance.toPNG(callback, options)
}
}
Graph.prototype.toJPEG = function (
callback: Export.ToSVGCallback,
options?: Export.ToImageOptions,
) {
const instance = this.getPlugin('export') as Export
if (instance) {
instance.toJPEG(callback, options)
}
}
Graph.prototype.exportPNG = function (
fileName?: string,
options?: Export.ToImageOptions,

@ -0,0 +1,22 @@
## @antv/x6-plugin-history [2.1.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@2.1.2...@antv/x6-plugin-history@2.1.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-history [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@2.1.1...@antv/x6-plugin-history@2.1.2) (2022-11-25)
## @antv/x6-plugin-history [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@2.1.0...@antv/x6-plugin-history@2.1.1) (2022-11-24)
### Bug Fixes
* deep clone instead of shallow clone ([#2924](https://github.com/antvis/x6/issues/2924)) ([75f4297](https://github.com/antvis/x6/commit/75f42978cb0ed4c9e7c7ac141ffa29603cb27596))
# @antv/x6-plugin-history [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@2.0.0...@antv/x6-plugin-history@2.1.0) (2022-11-24)
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-history",
"version": "2.0.1",
"version": "2.1.3",
"description": "history plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -47,13 +47,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/history",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-history"
},
"publishConfig": {

@ -366,7 +366,7 @@ export class History
if (data.prev == null) {
data.prev = {}
}
data.prev[key] = ObjectExt.clone(cell.previous(key))
data.prev[key] = ObjectExt.cloneDeep(cell.previous(key))
if (isModelChange) {
cmd.modelChange = true
@ -378,7 +378,7 @@ export class History
if (data.next == null) {
data.next = {}
}
data.next[key] = ObjectExt.clone(cell.prop(key))
data.next[key] = ObjectExt.cloneDeep(cell.prop(key))
return this.push(cmd, options)
}

@ -0,0 +1,29 @@
## @antv/x6-plugin-keyboard [2.1.4](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@2.1.3...@antv/x6-plugin-keyboard@2.1.4) (2022-11-29)
### Bug Fixes
* not trigger keyboard event whith delete key in contenteditable elem ([#2965](https://github.com/antvis/x6/issues/2965)) ([4978110](https://github.com/antvis/x6/commit/4978110b4594aee801d39c74f5c190432846eba4))
## @antv/x6-plugin-keyboard [2.1.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@2.1.2...@antv/x6-plugin-keyboard@2.1.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-keyboard [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@2.1.1...@antv/x6-plugin-keyboard@2.1.2) (2022-11-25)
## @antv/x6-plugin-keyboard [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@2.1.0...@antv/x6-plugin-keyboard@2.1.1) (2022-11-25)
### Performance Improvements
* update deps ([f20127a](https://github.com/antvis/x6/commit/f20127af555d9b7beaac3a07ac308d5c0d4e53a3))
# @antv/x6-plugin-keyboard [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@2.0.0...@antv/x6-plugin-keyboard@2.1.0) (2022-11-24)
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-keyboard",
"version": "2.0.1",
"version": "2.1.4",
"description": "keyboard plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -44,20 +44,20 @@
},
"devDependencies": {
"@antv/x6": "^2.x",
"@types/mousetrap": "^1.6.5"
"@types/mousetrap": "^1.6.11"
},
"author": {
"name": "bubkoo",
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/keyboard",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-keyboard"
},
"publishConfig": {

@ -129,15 +129,18 @@ export class KeyboardImpl extends Disposable implements IDisablable {
isInputEvent(e: KeyboardEvent | Dom.MouseUpEvent) {
const target = e.target as Element
const tagName = target?.tagName?.toLowerCase()
return ['input', 'textarea'].includes(tagName)
let isInput = ['input', 'textarea'].includes(tagName)
if (Dom.attr(target, 'contenteditable') === 'true') {
isInput = true
}
return isInput
}
isEnabledForEvent(e: KeyboardEvent) {
const allowed = !this.disabled && this.isGraphEvent(e)
const isInputEvent = this.isInputEvent(e)
if (allowed) {
const code = e.keyCode || e.which
if (isInputEvent && (code === 8 || code === 46)) {
if (isInputEvent && (e.key === 'Backspace' || e.key === 'Delete')) {
return false
}
if (this.options.guard) {

@ -0,0 +1,15 @@
## @antv/x6-plugin-minimap [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@2.0.2...@antv/x6-plugin-minimap@2.0.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-minimap [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@2.0.1...@antv/x6-plugin-minimap@2.0.2) (2022-11-25)
## @antv/x6-plugin-minimap [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@2.0.0...@antv/x6-plugin-minimap@2.0.1) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-minimap",
"version": "2.0.1",
"version": "2.0.3",
"description": "minimap plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/minimap",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-minimap"
},
"publishConfig": {

@ -17,7 +17,7 @@
> svg {
pointer-events: none;
shape-rendering: optimizeSpeed;
shape-rendering: optimizespeed;
}
.x6-node * {

@ -0,0 +1,16 @@
## @antv/x6-plugin-scroller [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@2.0.2...@antv/x6-plugin-scroller@2.0.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-scroller [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@2.0.1...@antv/x6-plugin-scroller@2.0.2) (2022-11-25)
## @antv/x6-plugin-scroller [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@2.0.0...@antv/x6-plugin-scroller@2.0.1) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))
* resize graph when scale scroller ([#2903](https://github.com/antvis/x6/issues/2903)) ([cee4aa4](https://github.com/antvis/x6/commit/cee4aa4e53b2821ed11d5602fccdb36625957c72))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-scroller",
"version": "2.0.4",
"version": "2.0.7",
"description": "scroller plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/scroller",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-scroller"
},
"publishConfig": {

@ -37,14 +37,10 @@
&&-pannable[data-panning='false'] {
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
}
&&-pannable[data-panning='true'] {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
user-select: none;
}
}

@ -0,0 +1,34 @@
## @antv/x6-plugin-selection [2.1.4](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@2.1.3...@antv/x6-plugin-selection@2.1.4) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-selection [2.1.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@2.1.2...@antv/x6-plugin-selection@2.1.3) (2022-11-25)
## @antv/x6-plugin-selection [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@2.1.1...@antv/x6-plugin-selection@2.1.2) (2022-11-24)
### Bug Fixes
* support antd5 in react components ([#2933](https://github.com/antvis/x6/issues/2933)) ([2ecc213](https://github.com/antvis/x6/commit/2ecc213094250b476b533b444c0f3716f88b7987))
## @antv/x6-plugin-selection [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@2.1.0...@antv/x6-plugin-selection@2.1.1) (2022-11-24)
### Bug Fixes
* modify the semantics of filter ([#2927](https://github.com/antvis/x6/issues/2927)) ([bc261fb](https://github.com/antvis/x6/commit/bc261fb9929aa0b4d3fa4194bcc780ea701b029e))
# @antv/x6-plugin-selection [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@2.0.0...@antv/x6-plugin-selection@2.1.0) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-selection",
"version": "2.0.1",
"version": "2.1.5",
"description": "selection plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/selection",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-selection"
},
"publishConfig": {

@ -464,7 +464,6 @@ export namespace Selection {
multipleSelectionModifiers: ['ctrl', 'meta'],
movable: true,
strict: false,
useCellGeometry: false,
selectCellOnMoved: false,
selectNodeOnMoved: false,
selectEdgeOnMoved: false,

@ -292,17 +292,22 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
filter(cells: Cell[]) {
const filter = this.options.filter
if (Array.isArray(filter)) {
return cells.filter(
(cell) => !filter.includes(cell) && !filter.includes(cell.shape),
)
}
if (typeof filter === 'function') {
return cells.filter((cell) => FunctionExt.call(filter, this.graph, cell))
}
return cells.filter((cell) => {
if (Array.isArray(filter)) {
return filter.some((item) => {
if (typeof item === 'string') {
return cell.shape === item
}
return cell.id === item.id
})
}
if (typeof filter === 'function') {
return FunctionExt.call(filter, this.graph, cell)
}
return cells
return true
})
}
protected stopSelecting(evt: Dom.MouseUpEvent) {
@ -602,29 +607,21 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
let views: CellView[] = []
if (this.options.rubberNode) {
if (this.options.useCellGeometry) {
views = views.concat(
graph.model
.getNodesInArea(rect, options)
.map((node) => graph.renderer.findViewByCell(node))
.filter((view) => view != null) as CellView[],
)
} else {
views = views.concat(graph.renderer.findViewsInArea(rect, options))
}
views = views.concat(
graph.model
.getNodesInArea(rect, options)
.map((node) => graph.renderer.findViewByCell(node))
.filter((view) => view != null) as CellView[],
)
}
if (this.options.rubberEdge) {
if (this.options.useCellGeometry) {
views = views.concat(
graph.model
.getEdgesInArea(rect, options)
.map((edge) => graph.renderer.findViewByCell(edge))
.filter((view) => view != null) as CellView[],
)
} else {
views = views.concat(graph.renderer.findEdgeViewsInArea(rect, options))
}
views = views.concat(
graph.model
.getEdgesInArea(rect, options)
.map((edge) => graph.renderer.findViewByCell(edge))
.filter((view) => view != null) as CellView[],
)
}
return views
@ -756,7 +753,7 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
const view = this.graph.renderer.findViewByCell(cell)
if (view) {
const bbox = view.getBBox({
useCellGeometry: this.options.useCellGeometry,
useCellGeometry: true,
})
origin.x = Math.min(origin.x, bbox.x)
origin.y = Math.min(origin.y, bbox.y)
@ -817,7 +814,7 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
const view = this.graph.renderer.findViewByCell(cell)
if (view) {
const bbox = view.getBBox({
useCellGeometry: this.options.useCellGeometry,
useCellGeometry: true,
})
const className = this.boxClassName
@ -894,7 +891,7 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
protected onCellAdded({ cell }: Collection.EventArgs['added']) {
// The collection do not known the cell was removed when cell was
// removed by interaction(such as, by "delete" shortcut), so we should
// manually listen to cell's remove evnet.
// manually listen to cell's remove event.
this.listenCellRemoveEvent(cell)
this.createSelectionBox(cell)
this.updateContainer()
@ -966,7 +963,6 @@ export namespace SelectionImpl {
showNodeSelectionBox?: boolean
movable?: boolean
following?: boolean
useCellGeometry?: boolean
content?: Content
// Can select node or edge when rubberband

@ -0,0 +1,35 @@
## @antv/x6-plugin-snapline [2.1.4](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@2.1.3...@antv/x6-plugin-snapline@2.1.4) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-snapline [2.1.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@2.1.2...@antv/x6-plugin-snapline@2.1.3) (2022-11-25)
## @antv/x6-plugin-snapline [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@2.1.1...@antv/x6-plugin-snapline@2.1.2) (2022-11-24)
### Bug Fixes
* updae react-resize-detector version ([#2930](https://github.com/antvis/x6/issues/2930)) ([d6ae519](https://github.com/antvis/x6/commit/d6ae5199c00be6429a828f537b194adddd2b6aeb))
## @antv/x6-plugin-snapline [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@2.1.0...@antv/x6-plugin-snapline@2.1.1) (2022-11-24)
### Bug Fixes
* modify the semantics of filter ([#2927](https://github.com/antvis/x6/issues/2927)) ([bc261fb](https://github.com/antvis/x6/commit/bc261fb9929aa0b4d3fa4194bcc780ea701b029e))
# @antv/x6-plugin-snapline [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@2.0.0...@antv/x6-plugin-snapline@2.1.0) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))
* export snap methods from snapline ([#2904](https://github.com/antvis/x6/issues/2904)) ([826ccdd](https://github.com/antvis/x6/commit/826ccdd9a033486ad5b90d666340e46f6c266af7))
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-snapline",
"version": "2.0.2",
"version": "2.1.6",
"description": "snapline plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/snapline",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-snapline"
},
"publishConfig": {

@ -5,10 +5,12 @@ import './api'
export class Snapline extends Disposable {
private snaplineImpl: SnaplineImpl
public options: Snapline.Options
public name = 'snapline'
constructor(public readonly options: Snapline.Options) {
constructor(options: Snapline.Options) {
super()
this.options = { tolerance: 10, ...options }
CssLoader.ensure(this.name, content)
}

@ -18,9 +18,6 @@ import {
export class SnaplineImpl extends View implements IDisablable {
public readonly options: SnaplineImpl.Options
protected readonly graph: Graph
protected filterShapes: { [type: string]: boolean }
protected filterCells: { [id: string]: boolean }
protected filterFunction: SnaplineImpl.FilterFunction | null
protected offset: Point.PointLike
protected timer: number | null
@ -50,10 +47,9 @@ export class SnaplineImpl extends View implements IDisablable {
const { graph, ...others } = options
this.graph = graph
this.options = { tolerance: 10, ...others }
this.options = { ...others }
this.offset = { x: 0, y: 0 }
this.render()
this.parseFilter()
if (!this.disabled) {
this.startListening()
}
@ -79,7 +75,6 @@ export class SnaplineImpl extends View implements IDisablable {
setFilter(filter?: SnaplineImpl.Filter) {
this.options.filter = filter
this.parseFilter()
}
protected render() {
@ -124,24 +119,6 @@ export class SnaplineImpl extends View implements IDisablable {
this.undelegateDocumentEvents()
}
protected parseFilter() {
this.filterShapes = {}
this.filterCells = {}
this.filterFunction = null
const filter = this.options.filter
if (Array.isArray(filter)) {
filter.forEach((item) => {
if (typeof item === 'string') {
this.filterShapes[item] = true
} else {
this.filterCells[item.id] = true
}
})
} else if (typeof filter === 'function') {
this.filterFunction = filter
}
}
protected onBatchStop({ name, data }: Model.EventArgs['batch:stop']) {
if (name === 'resize') {
this.snapOnResizing(data.cell, data as Node.ResizeOptions)
@ -577,13 +554,27 @@ export class SnaplineImpl extends View implements IDisablable {
return (
targetNode.id === snapNode.id ||
targetNode.isDescendantOf(snapNode) ||
this.filterShapes[targetNode.shape] ||
this.filterCells[targetNode.id] ||
(this.filterFunction &&
FunctionExt.call(this.filterFunction, this.graph, targetNode))
!this.filter(targetNode)
)
}
protected filter(node: Node) {
const filter = this.options.filter
if (Array.isArray(filter)) {
return filter.some((item) => {
if (typeof item === 'string') {
return node.shape === item
}
return node.id === item.id
})
}
if (typeof filter === 'function') {
return FunctionExt.call(filter, this.graph, node)
}
return true
}
protected update(metadata: {
verticalLeft?: number
verticalTop?: number

@ -0,0 +1,15 @@
## @antv/x6-plugin-stencil [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@2.0.2...@antv/x6-plugin-stencil@2.0.3) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-stencil [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@2.0.1...@antv/x6-plugin-stencil@2.0.2) (2022-11-25)
## @antv/x6-plugin-stencil [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@2.0.0...@antv/x6-plugin-stencil@2.0.1) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-stencil",
"version": "2.0.1",
"version": "2.0.2",
"description": "stencil plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -50,13 +50,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/stencil",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-stencil"
},
"publishConfig": {

@ -247,12 +247,12 @@
}
input[type='search'] {
-webkit-appearance: textfield;
appearance: textfield;
}
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
&-search-text {

@ -0,0 +1,27 @@
## @antv/x6-plugin-transform [2.1.4](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@2.1.3...@antv/x6-plugin-transform@2.1.4) (2022-12-07)
### Bug Fixes
* make resizing options take effect ([#3014](https://github.com/antvis/x6/issues/3014)) ([604c024](https://github.com/antvis/x6/commit/604c0244cd71ec8e911754dfe524f12c04e4e9ad))
## @antv/x6-plugin-transform [2.1.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@2.1.1...@antv/x6-plugin-transform@2.1.2) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-plugin-transform [2.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@2.1.0...@antv/x6-plugin-transform@2.1.1) (2022-11-25)
# @antv/x6-plugin-transform [2.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@2.0.0...@antv/x6-plugin-transform@2.1.0) (2022-11-24)
### Bug Fixes
* add missing script for building style ([e683155](https://github.com/antvis/x6/commit/e68315528a202cbc5a9ad256d168943e001d7116))
### Features
* attach plugin api and events to grpah instance ([#2864](https://github.com/antvis/x6/issues/2864)) ([774f547](https://github.com/antvis/x6/commit/774f547b85522eb2411dca949d36ecfe535503f3))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-plugin-transform",
"version": "2.0.1",
"version": "2.1.4",
"description": "transform plugin for X6",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,13 +48,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/plugins/transform",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-plugin-transform"
},
"publishConfig": {

@ -19,16 +19,16 @@ export class Transform extends Basecoat<Transform.EventArgs> {
}
protected startListening() {
this.graph.on('node:mouseup', this.onNodeMouseUp, this)
this.graph.on('node:click', this.onNodeClick, this)
this.graph.on('blank:mousedown', this.onBlankMouseDown, this)
}
protected stopListening() {
this.graph.off('node:mouseup', this.onNodeMouseUp, this)
this.graph.off('node:click', this.onNodeClick, this)
this.graph.off('blank:mousedown', this.onBlankMouseDown, this)
}
protected onNodeMouseUp({ node }: EventArgs['node:mouseup']) {
protected onNodeClick({ node }: EventArgs['node:click']) {
this.clearWidgets()
const widget = this.createTransform(node)
if (widget) {
@ -90,18 +90,23 @@ export class Transform extends Basecoat<Transform.EventArgs> {
)
const options: TransformImpl.Options = {
resizable: resizing.enabled,
resizable: !!resizing.enabled,
minWidth: resizing.minWidth || 0,
maxWidth: resizing.maxWidth || Number.MAX_SAFE_INTEGER,
minHeight: resizing.minHeight || 0,
maxHeight: resizing.maxHeight || Number.MAX_SAFE_INTEGER,
orthogonalResizing: resizing.orthogonal || true,
restrictedResizing: resizing.restrict || false,
autoScrollOnResizing: resizing.autoScroll || true,
preserveAspectRatio: resizing.preserveAspectRatio || false,
allowReverse: resizing.allowReverse || true,
orthogonalResizing:
typeof resizing.orthogonal === 'boolean' ? resizing.orthogonal : true,
restrictedResizing: !!resizing.restrict,
autoScrollOnResizing:
typeof resizing.autoScroll === 'boolean' ? resizing.autoScroll : true,
preserveAspectRatio: !!resizing.preserveAspectRatio,
allowReverse:
typeof resizing.allowReverse === 'boolean'
? resizing.allowReverse
: true,
rotatable: rotating.enabled || false,
rotatable: !!rotating.enabled,
rotateGrid: rotating.grid || 15,
}
@ -109,7 +114,11 @@ export class Transform extends Basecoat<Transform.EventArgs> {
}
protected clearWidgets() {
this.widgets.forEach((widget) => widget.dispose())
this.widgets.forEach((widget, node) => {
if (this.graph.getCellById(node.id)) {
widget.dispose()
}
})
this.widgets.clear()
}

@ -0,0 +1,38 @@
## @antv/x6-react-components [2.0.5](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.4...@antv/x6-react-components@2.0.5) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-react-components [2.0.4](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.3...@antv/x6-react-components@2.0.4) (2022-11-25)
## @antv/x6-react-components [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.2...@antv/x6-react-components@2.0.3) (2022-11-25)
### Bug Fixes
* support antd5 in react components ([#2933](https://github.com/antvis/x6/issues/2933)) ([2ecc213](https://github.com/antvis/x6/commit/2ecc213094250b476b533b444c0f3716f88b7987))
* update react type version ([#2937](https://github.com/antvis/x6/issues/2937)) ([d4df46a](https://github.com/antvis/x6/commit/d4df46ab40c0f2fb6e7a76fc0083d7b4710555b9))
### Performance Improvements
* update deps ([f20127a](https://github.com/antvis/x6/commit/f20127af555d9b7beaac3a07ac308d5c0d4e53a3))
## @antv/x6-react-components [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.2...@antv/x6-react-components@2.0.3) (2022-11-24)
### Bug Fixes
* support antd5 in react components ([#2933](https://github.com/antvis/x6/issues/2933)) ([2ecc213](https://github.com/antvis/x6/commit/2ecc213094250b476b533b444c0f3716f88b7987))
* update react type version ([#2937](https://github.com/antvis/x6/issues/2937)) ([d4df46a](https://github.com/antvis/x6/commit/d4df46ab40c0f2fb6e7a76fc0083d7b4710555b9))
## @antv/x6-react-components [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.1...@antv/x6-react-components@2.0.2) (2022-11-24)
### Bug Fixes
* updae react-resize-detector version ([#2930](https://github.com/antvis/x6/issues/2930)) ([d6ae519](https://github.com/antvis/x6/commit/d6ae5199c00be6429a828f537b194adddd2b6aeb))
## @antv/x6-react-components [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-react-components@2.0.0...@antv/x6-react-components@2.0.1) (2022-11-24)

@ -1,6 +1,6 @@
{
"name": "@antv/x6-react-components",
"version": "2.0.0",
"version": "2.0.5",
"description": "React components for building x6 editors",
"main": "lib/index.js",
"module": "es/index.js",
@ -48,7 +48,7 @@
"antv"
],
"peerDependencies": {
"antd": ">=4.4.2",
"antd": ">=4.4.2 || >=5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
@ -57,17 +57,17 @@
"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",
"react-color": "2.19.3",
"react-resize-detector": "^7.0.0",
"ua-parser-js": "^0.7.20"
},
"devDependencies": {
"@types/react": "^18.0.25",
"@types/react": "^18.0.0",
"@types/react-color": "^3.0.1",
"@types/react-dom": "^18.0.0",
"@types/react-resize-detector": "^5.0.0",
"@types/react-dom": "^18.0.9",
"@types/react-resize-detector": "^6.1.0",
"@types/ua-parser-js": "^0.7.33",
"antd": "^4.4.2",
"antd": "^5.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
@ -76,18 +76,17 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-react-components"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"gitHead": "576fa342fa65a6867ead29f6801a30dcb31bcdb5"
}
}

@ -1 +1 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');

@ -5,7 +5,6 @@ import React from 'react'
import classNames from 'classnames'
import { Popover } from 'antd'
import { PopoverProps } from 'antd/es/popover'
import 'antd/es/popover/style/index.css'
import addEventListener from 'rc-util/lib/Dom/addEventListener'
import {
SketchPicker,
@ -104,8 +103,12 @@ export class ColorPicker extends React.Component<
const popoverProps: PopoverProps = {}
if (disabled) {
popoverProps.visible = false
// Support for antd 5.0
popoverProps.open = false
} else {
popoverProps.visible = this.state.active
// Support for antd 5.0
popoverProps.open = this.state.active
}
const colorStr =

@ -1,4 +1,4 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');
@color-picker-prefix-cls: ~'@{x6-prefix}-color-picker';
@ -27,7 +27,7 @@
background: transparent;
.sketch-picker {
box-shadow: #e9e9e9 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 8px 16px !important;
box-shadow: #e9e9e9 0 0 0 1px, rgb(0 0 0 / 10%) 0 8px 16px !important;
}
}
}

@ -1,2 +1,2 @@
@import '../../style/themes/index';
@import '../../menu/style/index';
@import url('../../style/themes/index');
@import url('../../menu/style/index');

@ -1,4 +1,4 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');
@dropdown-prefix-cls: ~'@{x6-prefix}-dropdown';
@ -11,7 +11,7 @@
max-height: 320px;
overflow-y: scroll;
border-radius: 3px;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 6px rgb(0 0 0 / 20%);
// &::before {
// position: absolute;

@ -1,4 +1,4 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');
@menu-prefix-cls: ~'@{x6-prefix}-menu';
@ -103,8 +103,8 @@
right: 12px;
width: 0;
height: 0;
border-top: 4px solid rgba(0, 0, 0, 0);
border-bottom: 4px solid rgba(0, 0, 0, 0);
border-top: 4px solid rgb(0 0 0 / 0%);
border-bottom: 4px solid rgb(0 0 0 / 0%);
border-left: 5px solid @menu-submenu-arrow-color;
opacity: 0.4;
pointer-events: none;

@ -1,5 +1,5 @@
@import '../../style/themes/index';
@import '../../menu/style/index';
@import url('../../style/themes/index');
@import url('../../menu/style/index');
@menubar-prefix-cls: ~'@{x6-prefix}-menubar';
@ -96,7 +96,7 @@
}
& > .@{menu-prefix-cls} {
border-radius: 0 4px 4px 4px;
border-radius: 0 4px 4px;
}
.@{menu-prefix-cls}-submenu-menu {

@ -1,5 +1,5 @@
@import '../../style/themes/index';
@import '../../scrollbar/style/index';
@import url('../../style/themes/index');
@import url('../../scrollbar/style/index');
@scrollBox-prefix-cls: ~'@{x6-prefix}-scroll-box';

@ -1,4 +1,4 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');
@scrollbar-prefix-cls: ~'@{x6-prefix}-scrollbar';

@ -1,4 +1,4 @@
@import '../../style/themes/index';
@import url('../../style/themes/index');
@splitBox-prefix-cls: ~'@{x6-prefix}-split-box';

@ -1 +1 @@
@import './themes/index';
@import url('./themes/index');

@ -1 +1 @@
@import './default.less';
@import url('./default.less');

@ -2,7 +2,6 @@ import React from 'react'
import classNames from 'classnames'
import { Tooltip } from 'antd'
import { TooltipProps } from 'antd/es/tooltip'
import 'antd/es/tooltip/style/index.css'
import { Menu } from '../menu'
import { Dropdown } from '../dropdown'
import { ToolbarContext } from './context'

@ -1,5 +1,5 @@
@import '../../style/themes/index';
@import '../../dropdown/style/index';
@import url('../../style/themes/index');
@import url('../../dropdown/style/index');
@toolbar-prefix-cls: ~'@{x6-prefix}-toolbar';
@ -42,7 +42,7 @@
width: 1px;
height: 40%;
margin: 0 6px;
background-color: rgba(0, 0, 0, 0.15);
background-color: rgb(0 0 0 / 15%);
content: ' ';
pointer-events: none;
}
@ -111,9 +111,9 @@
width: 0;
height: 0;
margin-left: 6px;
border-color: #262626 transparent transparent transparent;
border-color: #262626 transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
border-width: 5px 4px 0;
opacity: 0.4;
}

@ -0,0 +1,22 @@
## @antv/x6-react-shape [2.0.4](https://github.com/antvis/x6/compare/@antv/x6-react-shape@2.0.3...@antv/x6-react-shape@2.0.4) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-react-shape [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-react-shape@2.0.2...@antv/x6-react-shape@2.0.3) (2022-11-25)
## @antv/x6-react-shape [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-react-shape@2.0.1...@antv/x6-react-shape@2.0.2) (2022-11-25)
### Performance Improvements
* update deps ([f20127a](https://github.com/antvis/x6/commit/f20127af555d9b7beaac3a07ac308d5c0d4e53a3))
## @antv/x6-react-shape [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-react-shape@2.0.0...@antv/x6-react-shape@2.0.1) (2022-11-24)
### Bug Fixes
* optimize typo for react-shape ([#2870](https://github.com/antvis/x6/issues/2870)) ([86412e2](https://github.com/antvis/x6/commit/86412e23d242347d6ee1c9ccd63a6ccf3caf4c49))

@ -1,6 +1,6 @@
{
"name": "@antv/x6-react-shape",
"version": "2.0.0",
"version": "2.1.0",
"description": "X6 shape for rendering react components.",
"main": "lib/index.js",
"module": "es/index.js",
@ -39,13 +39,13 @@
},
"peerDependencies": {
"@antv/x6": "^2.x",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": ">=18.0.0",
"react-dom": ">= 18.0.0"
},
"devDependencies": {
"@antv/x6": "^2.x",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.0",
"@types/react-dom": "^18.0.9",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
@ -54,18 +54,17 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/intermediate/react",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-react-shape"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"gitHead": "576fa342fa65a6867ead29f6801a30dcb31bcdb5"
}
}

@ -10,7 +10,7 @@ export class ReactShapeView extends NodeView<ReactShape> {
root?: Root
getComponentContainer() {
return this.selectors.foContent as HTMLDivElement
return this.selectors && (this.selectors.foContent as HTMLDivElement)
}
confirmUpdate(flag: number) {
@ -26,19 +26,20 @@ export class ReactShapeView extends NodeView<ReactShape> {
const node = this.cell
if (container) {
const elem = React.createElement(Wrap, { node, graph: node.model!.graph })
const elem = React.createElement(Wrap, { node, graph: this.graph })
if (Portal.isActive()) {
const portal = createPortal(elem, container) as ReactPortal
Portal.connect(this.cell.id, portal)
} else {
const root = createRoot(container)
root.render(elem)
this.root = createRoot(container)
this.root.render(elem)
}
}
}
protected unmountReactComponent() {
if (this.root) {
const container = this.getComponentContainer()
if (container && this.root) {
this.root.unmount()
this.root = undefined
}

@ -0,0 +1,24 @@
## @antv/x6-vue-shape [2.0.7](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@2.0.6...@antv/x6-vue-shape@2.0.7) (2022-12-09)
### Bug Fixes
* cannot read properties of undefined when unmount vue component ([#3024](https://github.com/antvis/x6/issues/3024)) ([187e318](https://github.com/antvis/x6/commit/187e318aee8622591781d3b8fc45d72a4d54a989))
## @antv/x6-vue-shape [2.0.4](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@2.0.3...@antv/x6-vue-shape@2.0.4) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6-vue-shape [2.0.3](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@2.0.2...@antv/x6-vue-shape@2.0.3) (2022-11-25)
## @antv/x6-vue-shape [2.0.2](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@2.0.1...@antv/x6-vue-shape@2.0.2) (2022-11-24)
### Bug Fixes
* updae react-resize-detector version ([#2930](https://github.com/antvis/x6/issues/2930)) ([d6ae519](https://github.com/antvis/x6/commit/d6ae5199c00be6429a828f537b194adddd2b6aeb))
## @antv/x6-vue-shape [2.0.1](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@2.0.0...@antv/x6-vue-shape@2.0.1) (2022-11-24)

@ -1,6 +1,6 @@
{
"name": "@antv/x6-vue-shape",
"version": "2.0.0",
"version": "2.0.7",
"description": "X6 shape for rendering vue components.",
"main": "lib/index.js",
"module": "es/index.js",
@ -38,40 +38,38 @@
"pretest": "rss"
},
"dependencies": {
"vue-demi": "^0.7.4"
"vue-demi": "latest"
},
"peerDependencies": {
"@antv/x6": "^2.x",
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^2.0.0 || >=3.0.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
},
"peerDependencies": {
"@antv/x6": "^2.x",
"@vue/composition-api": "^1.0.0-rc.6",
"vue": "^2.6.12 || ^3.0.0"
},
"devDependencies": {
"@antv/x6": "^2.x",
"@vue/composition-api": "^1.0.0-rc.6",
"vue": "^2.6.12"
"vue": "^3.0.0"
},
"author": {
"name": "bubkoo",
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/intermediate/vue",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6-vue-shape"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"gitHead": "576fa342fa65a6867ead29f6801a30dcb31bcdb5"
}
}

@ -1,4 +1,5 @@
import { defineComponent, h, reactive, isVue3, Vue } from 'vue-demi'
import { Graph } from '@antv/x6'
import { VueShape } from './node'
let active = false
@ -9,6 +10,7 @@ export function connect(
component: any,
container: HTMLDivElement,
node: VueShape,
graph: Graph,
) {
if (active) {
const { Teleport, markRaw } = Vue as any
@ -17,6 +19,7 @@ export function connect(
render: () => h(Teleport, { to: container } as any, [h(component)]),
provide: () => ({
getNode: () => node,
getGraph: () => graph,
}),
}),
)

@ -8,7 +8,7 @@ export class VueShapeView extends NodeView<VueShape> {
private vm: any
getComponentContainer() {
return this.selectors.foContent as HTMLDivElement
return this.selectors && (this.selectors.foContent as HTMLDivElement)
}
confirmUpdate(flag: number) {
@ -18,6 +18,10 @@ export class VueShapeView extends NodeView<VueShape> {
})
}
protected targetId() {
return `${this.graph.view.cid}:${this.cell.id}`
}
protected renderVueComponent() {
this.unmountVueComponent()
const root = this.getComponentContainer()
@ -36,12 +40,13 @@ export class VueShapeView extends NodeView<VueShape> {
provide() {
return {
getNode: () => node,
getGraph: () => this.graph,
}
},
})
} else if (isVue3) {
if (isActive()) {
connect(node.id, component, root, node)
connect(this.targetId(), component, root, node, this.graph)
} else {
this.vm = createApp({
render() {
@ -50,6 +55,7 @@ export class VueShapeView extends NodeView<VueShape> {
provide() {
return {
getNode: () => node,
getGraph: () => this.graph,
}
},
})
@ -67,7 +73,9 @@ export class VueShapeView extends NodeView<VueShape> {
isVue3 && this.vm.unmount()
this.vm = null
}
root.innerHTML = ''
if (root) {
root.innerHTML = ''
}
return root
}
@ -97,7 +105,7 @@ export class VueShapeView extends NodeView<VueShape> {
unmount() {
if (isActive()) {
disconnect(this.cell.id)
disconnect(this.targetId())
}
this.unmountVueComponent()
super.unmount()

60
packages/x6/CHANGELOG.md Normal file

@ -0,0 +1,60 @@
## @antv/x6 [2.1.1](https://github.com/antvis/x6/compare/@antv/x6@2.1.0...@antv/x6@2.1.1) (2022-12-19)
### Bug Fixes
* arrowhead not get options bug ([#3065](https://github.com/antvis/x6/issues/3065)) ([3b668fe](https://github.com/antvis/x6/commit/3b668feb4eac47994f52d0cc977d22a8a2c06acd))
* set snapToGrid to false by default ([#3066](https://github.com/antvis/x6/issues/3066)) ([e2bb71d](https://github.com/antvis/x6/commit/e2bb71d95484b29187fafca97f1a386e9b984095))
# @antv/x6 [2.1.0](https://github.com/antvis/x6/compare/@antv/x6@2.0.9...@antv/x6@2.1.0) (2022-12-19)
### Features
* add snapToGrid options for manhattan router ([#3062](https://github.com/antvis/x6/issues/3062)) ([824560d](https://github.com/antvis/x6/commit/824560ddda7016158cce3166773e1af009bfe498))
## @antv/x6 [2.0.9](https://github.com/antvis/x6/compare/@antv/x6@2.0.8...@antv/x6@2.0.9) (2022-12-16)
### Bug Fixes
* :bug: char ghosting when edit text ([#2560](https://github.com/antvis/x6/issues/2560)) ([#3043](https://github.com/antvis/x6/issues/3043)) ([15284e7](https://github.com/antvis/x6/commit/15284e778a09f4f2e5a8f777330744b0cfe88e9e))
## @antv/x6 [2.0.8](https://github.com/antvis/x6/compare/@antv/x6@2.0.7...@antv/x6@2.0.8) (2022-12-08)
### Bug Fixes
* trigger preventDefault by origin event ([#3017](https://github.com/antvis/x6/issues/3017)) ([4a6a634](https://github.com/antvis/x6/commit/4a6a634a8acfad5c1a7bb93ac17fb3b97239e853))
## @antv/x6 [2.0.7](https://github.com/antvis/x6/compare/@antv/x6@2.0.6...@antv/x6@2.0.7) (2022-12-06)
### Bug Fixes
* hide elems when visible is false ([#3007](https://github.com/antvis/x6/issues/3007)) ([057d520](https://github.com/antvis/x6/commit/057d5209ff827d0231ecc6562e768907f75aff2d))
## @antv/x6 [2.0.4](https://github.com/antvis/x6/compare/@antv/x6@2.0.3...@antv/x6@2.0.4) (2022-11-25)
### Bug Fixes
* npm version ([cb0cfde](https://github.com/antvis/x6/commit/cb0cfdeb4dbe8858569e6899db08ccb9ab8ba4e7))
## @antv/x6 [2.0.3](https://github.com/antvis/x6/compare/@antv/x6@2.0.2...@antv/x6@2.0.3) (2022-11-25)
## @antv/x6 [2.0.2](https://github.com/antvis/x6/compare/@antv/x6@2.0.1...@antv/x6@2.0.2) (2022-11-24)
### Bug Fixes
* get correct center when zoom ([#2934](https://github.com/antvis/x6/issues/2934)) ([557d2df](https://github.com/antvis/x6/commit/557d2df1529226e505e3488a43fa358191d79271))
## @antv/x6 [2.0.1](https://github.com/antvis/x6/compare/@antv/x6@2.0.0...@antv/x6@2.0.1) (2022-11-24)
### Bug Fixes
* Cannot use "this" here: [#2824](https://github.com/antvis/x6/issues/2824) ([#2855](https://github.com/antvis/x6/issues/2855)) ([10347d0](https://github.com/antvis/x6/commit/10347d069b23e4cfaf156138a39e2f5f996f0e29))
* resize graph when scale scroller ([#2903](https://github.com/antvis/x6/issues/2903)) ([cee4aa4](https://github.com/antvis/x6/commit/cee4aa4e53b2821ed11d5602fccdb36625957c72))
* sync render when change position ([#2860](https://github.com/antvis/x6/issues/2860)) ([2194769](https://github.com/antvis/x6/commit/2194769e362ce60d19652b29047a394cac4077d0))

@ -1,6 +1,6 @@
{
"name": "@antv/x6",
"version": "2.0.0",
"version": "2.1.1",
"description": "JavaScript diagramming library that uses SVG and HTML for rendering",
"main": "lib/index.js",
"module": "es/index.js",
@ -53,13 +53,13 @@
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"homepage": "https://github.com/antvis/x6",
"homepage": "https://x6.antv.antgroup.com/tutorial/about",
"bugs": {
"url": "https://github.com/antvis/x6/issues"
},
"repository": {
"type": "git",
"url": "ssh://git@github.com/antvis/x6.git",
"url": "https://github.com/antvis/x6.git",
"directory": "packages/x6"
},
"publishConfig": {

Some files were not shown because too many files have changed in this diff Show More