@antv/g6 5.0.0-beta.2 → 5.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/g6.min.js +2 -2
  2. package/esm/constant/shape.d.ts +2 -0
  3. package/esm/index.d.ts +2 -1
  4. package/esm/index.js +1 -1
  5. package/esm/item/node.js +8 -3
  6. package/esm/item/node.js.map +1 -1
  7. package/esm/stdlib/behavior/index.d.ts +1 -0
  8. package/esm/stdlib/behavior/index.js +1 -0
  9. package/esm/stdlib/behavior/index.js.map +1 -1
  10. package/esm/stdlib/behavior/shortcuts-call.d.ts +38 -0
  11. package/esm/stdlib/behavior/shortcuts-call.js +80 -0
  12. package/esm/stdlib/behavior/shortcuts-call.js.map +1 -0
  13. package/esm/stdlib/index.d.ts +1 -0
  14. package/esm/stdlib/index.js +3 -2
  15. package/esm/stdlib/index.js.map +1 -1
  16. package/esm/stdlib/item/node/base.js +7 -14
  17. package/esm/stdlib/item/node/base.js.map +1 -1
  18. package/esm/stdlib/item/node/diamond.js +1 -1
  19. package/esm/stdlib/item/node/ellipse.js +2 -2
  20. package/esm/stdlib/item/node/hexagon.js +6 -2
  21. package/esm/stdlib/item/node/hexagon.js.map +1 -1
  22. package/esm/stdlib/item/node/image.d.ts +40 -0
  23. package/esm/stdlib/item/node/image.js +110 -0
  24. package/esm/stdlib/item/node/image.js.map +1 -0
  25. package/esm/stdlib/item/node/index.d.ts +1 -0
  26. package/esm/stdlib/item/node/index.js +1 -0
  27. package/esm/stdlib/item/node/index.js.map +1 -1
  28. package/esm/stdlib/theme/dark.js +42 -2
  29. package/esm/stdlib/theme/dark.js.map +1 -1
  30. package/esm/stdlib/theme/light.js +4 -4
  31. package/esm/types/event.d.ts +1 -0
  32. package/esm/types/item.d.ts +6 -0
  33. package/esm/types/item.js.map +1 -1
  34. package/lib/constant/shape.d.ts +2 -0
  35. package/lib/index.d.ts +2 -1
  36. package/lib/index.js +1 -1
  37. package/lib/item/node.js +8 -3
  38. package/lib/item/node.js.map +1 -1
  39. package/lib/stdlib/behavior/index.d.ts +1 -0
  40. package/lib/stdlib/behavior/index.js +1 -0
  41. package/lib/stdlib/behavior/index.js.map +1 -1
  42. package/lib/stdlib/behavior/shortcuts-call.d.ts +38 -0
  43. package/lib/stdlib/behavior/shortcuts-call.js +84 -0
  44. package/lib/stdlib/behavior/shortcuts-call.js.map +1 -0
  45. package/lib/stdlib/index.d.ts +1 -0
  46. package/lib/stdlib/index.js +3 -2
  47. package/lib/stdlib/index.js.map +1 -1
  48. package/lib/stdlib/item/node/base.js +7 -14
  49. package/lib/stdlib/item/node/base.js.map +1 -1
  50. package/lib/stdlib/item/node/diamond.js +1 -1
  51. package/lib/stdlib/item/node/ellipse.js +2 -2
  52. package/lib/stdlib/item/node/hexagon.js +6 -2
  53. package/lib/stdlib/item/node/hexagon.js.map +1 -1
  54. package/lib/stdlib/item/node/image.d.ts +40 -0
  55. package/lib/stdlib/item/node/image.js +114 -0
  56. package/lib/stdlib/item/node/image.js.map +1 -0
  57. package/lib/stdlib/item/node/index.d.ts +1 -0
  58. package/lib/stdlib/item/node/index.js +1 -0
  59. package/lib/stdlib/item/node/index.js.map +1 -1
  60. package/lib/stdlib/theme/dark.js +42 -2
  61. package/lib/stdlib/theme/dark.js.map +1 -1
  62. package/lib/stdlib/theme/light.js +4 -4
  63. package/lib/types/event.d.ts +1 -0
  64. package/lib/types/item.d.ts +6 -0
  65. package/lib/types/item.js.map +1 -1
  66. package/package.json +2 -4
  67. package/src/constant/shape.ts +1 -1
  68. package/src/index.ts +1 -1
  69. package/src/item/node.ts +8 -3
  70. package/src/stdlib/behavior/index.ts +1 -0
  71. package/src/stdlib/behavior/shortcuts-call.ts +120 -0
  72. package/src/stdlib/index.ts +3 -0
  73. package/src/stdlib/item/node/base.ts +9 -15
  74. package/src/stdlib/item/node/diamond.ts +1 -1
  75. package/src/stdlib/item/node/ellipse.ts +2 -2
  76. package/src/stdlib/item/node/hexagon.ts +6 -2
  77. package/src/stdlib/item/node/image.ts +190 -0
  78. package/src/stdlib/item/node/index.ts +1 -0
  79. package/src/stdlib/theme/dark.ts +66 -2
  80. package/src/stdlib/theme/light.ts +4 -4
  81. package/src/types/event.ts +1 -0
  82. package/src/types/item.ts +10 -0
@@ -108,7 +108,7 @@ export const LightTheme = {
108
108
  },
109
109
  haloShape: {
110
110
  opacity: 0.25,
111
- lineWidth: 20,
111
+ lineWidth: 12,
112
112
  pointerEvents: 'none',
113
113
  zIndex: -1,
114
114
  visible: true,
@@ -121,7 +121,7 @@ export const LightTheme = {
121
121
  },
122
122
  haloShape: {
123
123
  opacity: 0.25,
124
- lineWidth: 20,
124
+ lineWidth: 12,
125
125
  pointerEvents: 'none',
126
126
  zIndex: -1,
127
127
  visible: true,
@@ -328,7 +328,7 @@ export const LightTheme = {
328
328
  },
329
329
  haloShape: {
330
330
  opacity: 0.25,
331
- lineWidth: 20,
331
+ lineWidth: 12,
332
332
  pointerEvents: 'none',
333
333
  zIndex: -1,
334
334
  visible: true,
@@ -343,7 +343,7 @@ export const LightTheme = {
343
343
  },
344
344
  haloShape: {
345
345
  opacity: 0.25,
346
- lineWidth: 20,
346
+ lineWidth: 12,
347
347
  pointerEvents: 'none',
348
348
  zIndex: -1,
349
349
  visible: true,
@@ -42,6 +42,7 @@ export interface IG6GraphEvent
42
42
  currentTarget: IGraph;
43
43
  itemType: 'node' | 'edge' | 'combo' | 'canvas';
44
44
  itemId: ID;
45
+ key?: string;
45
46
  /** Original event emitted by G */
46
47
  gEvent: Event;
47
48
  }
package/src/types/item.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  Group,
14
14
  DisplayObject,
15
15
  IAnimation,
16
+ Shape,
16
17
  } from '@antv/g';
17
18
  import {
18
19
  CubeGeometryProps,
@@ -61,11 +62,20 @@ export type GShapeStyle = CircleStyleProps &
61
62
  interactive?: boolean;
62
63
  };
63
64
 
65
+ export type ClipCfg = {
66
+ type: SHAPE_TYPE;
67
+ show: boolean;
68
+ } & CircleStyleProps &
69
+ RectStyleProps &
70
+ EllipseStyleProps;
71
+
64
72
  export type ShapeStyle = Partial<
65
73
  GShapeStyle & {
66
74
  animates?: IAnimates;
67
75
  lod?: number;
68
76
  visible?: boolean;
77
+ } & {
78
+ clipCfg?: ClipCfg;
69
79
  }
70
80
  >;
71
81
  export interface Encode<T> {