-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move all plugin into build-in, and remove constants.ts file (…
…#5440) * refactor: move all build in to one file, and remove constants.ts file * chore: fix ci
- Loading branch information
Showing
18 changed files
with
202 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
export { BUILT_IN_ANIMATIONS } from './constants'; | ||
export { executor } from './executor'; | ||
|
||
/** | ||
* <zh/> 内置的动画元素。 | ||
* <en/> Built-in animations. | ||
*/ | ||
export const fade = [ | ||
{ | ||
fields: ['opacity'], | ||
}, | ||
]; | ||
|
||
export const translate = [ | ||
{ | ||
fields: ['x', 'y'], | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { BUILT_IN_EDGES, BUILT_IN_NODES } from './constants'; | ||
export { Cubic, Line, Polyline, Quadratic } from './edges'; | ||
export { Circle, Ellipse, Rect, Star, Triangle } from './nodes'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
export { BUILT_IN_LAYOUTS } from './constants'; | ||
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy'; | ||
export { | ||
CircularLayout, | ||
ComboCombinedLayout, | ||
ConcentricLayout, | ||
D3ForceLayout, | ||
DagreLayout, | ||
ForceAtlas2Layout, | ||
ForceLayout, | ||
FruchtermanLayout, | ||
GridLayout, | ||
MDSLayout, | ||
RadialLayout, | ||
RandomLayout, | ||
} from '@antv/layout'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,54 @@ | ||
export { BUILT_IN_PALETTES } from './constants'; | ||
/** | ||
* <zh/> 内置色板 | ||
* | ||
* <en/> Built-in palettes | ||
*/ | ||
export const spectral = [ | ||
'rgb(158, 1, 66)', | ||
'rgb(213, 62, 79)', | ||
'rgb(244, 109, 67)', | ||
'rgb(253, 174, 97)', | ||
'rgb(254, 224, 139)', | ||
'rgb(255, 255, 191)', | ||
'rgb(230, 245, 152)', | ||
'rgb(171, 221, 164)', | ||
'rgb(102, 194, 165)', | ||
'rgb(50, 136, 189)', | ||
'rgb(94, 79, 162)', | ||
]; | ||
|
||
export const oranges = [ | ||
'rgb(255, 245, 235)', | ||
'rgb(254, 230, 206)', | ||
'rgb(253, 208, 162)', | ||
'rgb(253, 174, 107)', | ||
'rgb(253, 141, 60)', | ||
'rgb(241, 105, 19)', | ||
'rgb(217, 72, 1)', | ||
'rgb(166, 54, 3)', | ||
'rgb(127, 39, 4)', | ||
]; | ||
|
||
export const greens = [ | ||
'rgb(247, 252, 245)', | ||
'rgb(229, 245, 224)', | ||
'rgb(199, 233, 192)', | ||
'rgb(161, 217, 155)', | ||
'rgb(116, 196, 118)', | ||
'rgb(65, 171, 93)', | ||
'rgb(35, 139, 69)', | ||
'rgb(0, 109, 44)', | ||
'rgb(0, 68, 27)', | ||
]; | ||
|
||
export const blues = [ | ||
'rgb(247, 251, 255)', | ||
'rgb(222, 235, 247)', | ||
'rgb(198, 219, 239)', | ||
'rgb(158, 202, 225)', | ||
'rgb(107, 174, 214)', | ||
'rgb(66, 146, 198)', | ||
'rgb(33, 113, 181)', | ||
'rgb(8, 81, 156)', | ||
'rgb(8, 48, 107)', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { fade, translate } from '../animations'; | ||
import { Circle, Cubic, Ellipse, Line, Polyline, Quadratic, Rect, Star, Triangle } from '../elements'; | ||
import { | ||
CircularLayout, | ||
ComboCombinedLayout, | ||
ConcentricLayout, | ||
D3ForceLayout, | ||
DagreLayout, | ||
ForceAtlas2Layout, | ||
ForceLayout, | ||
FruchtermanLayout, | ||
GridLayout, | ||
MDSLayout, | ||
RadialLayout, | ||
RandomLayout, | ||
compactBox, | ||
dendrogram, | ||
indented, | ||
mindmap, | ||
} from '../layouts'; | ||
import { blues, greens, oranges, spectral } from '../palettes'; | ||
import { dark, light } from '../themes'; | ||
|
||
/** | ||
* <zh/> 内置插件统一在这里注册。 | ||
* <en/> Built-in plugins are registered here. | ||
*/ | ||
export const BUILT_IN_PLUGINS = { | ||
animation: { | ||
fade, | ||
translate, | ||
}, | ||
behavior: {}, | ||
combo: {}, | ||
edge: { | ||
cubic: Cubic, | ||
line: Line, | ||
polyline: Polyline, | ||
quadratic: Quadratic, | ||
}, | ||
layout: { | ||
'combo-combined': ComboCombinedLayout, | ||
'compact-box': compactBox, | ||
'force-atlas2': ForceAtlas2Layout, | ||
circular: CircularLayout, | ||
concentric: ConcentricLayout, | ||
d3force: D3ForceLayout, | ||
dagre: DagreLayout, | ||
dendrogram, | ||
force: ForceLayout, | ||
fruchterman: FruchtermanLayout, | ||
grid: GridLayout, | ||
indented, | ||
mds: MDSLayout, | ||
mindmap, | ||
radial: RadialLayout, | ||
random: RandomLayout, | ||
}, | ||
node: { | ||
circle: Circle, | ||
ellipse: Ellipse, | ||
rect: Rect, | ||
star: Star, | ||
triangle: Triangle, | ||
}, | ||
palette: { | ||
spectral, | ||
oranges, | ||
greens, | ||
blues, | ||
}, | ||
theme: { | ||
dark, | ||
light, | ||
}, | ||
widget: {}, | ||
}; |
Oops, something went wrong.