@orbcharts/core 3.0.0-alpha.52 → 3.0.0-alpha.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-core.es.js +709 -703
  3. package/dist/orbcharts-core.umd.js +2 -2
  4. package/dist/src/types/ContextObserverMultiGrid.d.ts +2 -1
  5. package/dist/vite.config.d.ts +1 -1
  6. package/package.json +41 -41
  7. package/src/AbstractChart.ts +48 -48
  8. package/src/GridChart.ts +20 -20
  9. package/src/MultiGridChart.ts +20 -20
  10. package/src/MultiValueChart.ts +20 -20
  11. package/src/RelationshipChart.ts +20 -20
  12. package/src/SeriesChart.ts +20 -20
  13. package/src/TreeChart.ts +20 -20
  14. package/src/base/createBaseChart.ts +369 -369
  15. package/src/base/createBasePlugin.ts +95 -95
  16. package/src/defaults.ts +226 -226
  17. package/src/defineGridPlugin.ts +3 -3
  18. package/src/defineMultiGridPlugin.ts +3 -3
  19. package/src/defineMultiValuePlugin.ts +3 -3
  20. package/src/defineNoneDataPlugin.ts +4 -4
  21. package/src/defineRelationshipPlugin.ts +3 -3
  22. package/src/defineSeriesPlugin.ts +3 -3
  23. package/src/defineTreePlugin.ts +3 -3
  24. package/src/grid/computeGridData.ts +134 -134
  25. package/src/grid/createGridContextObserver.ts +155 -155
  26. package/src/grid/gridObservables.ts +607 -607
  27. package/src/index.ts +21 -21
  28. package/src/multiGrid/computeMultiGridData.ts +130 -130
  29. package/src/multiGrid/createMultiGridContextObserver.ts +41 -40
  30. package/src/multiGrid/multiGridObservables.ts +365 -364
  31. package/src/multiValue/computeMultiValueData.ts +143 -143
  32. package/src/multiValue/createMultiValueContextObserver.ts +12 -12
  33. package/src/relationship/computeRelationshipData.ts +118 -118
  34. package/src/relationship/createRelationshipContextObserver.ts +12 -12
  35. package/src/series/computeSeriesData.ts +90 -90
  36. package/src/series/createSeriesContextObserver.ts +93 -93
  37. package/src/series/seriesObservables.ts +175 -175
  38. package/src/tree/computeTreeData.ts +132 -132
  39. package/src/tree/createTreeContextObserver.ts +61 -61
  40. package/src/tree/treeObservables.ts +94 -94
  41. package/src/types/Chart.ts +50 -50
  42. package/src/types/ChartParams.ts +51 -51
  43. package/src/types/ComputedData.ts +83 -83
  44. package/src/types/ComputedDataGrid.ts +13 -13
  45. package/src/types/ComputedDataMultiGrid.ts +2 -2
  46. package/src/types/ComputedDataMultiValue.ts +9 -9
  47. package/src/types/ComputedDataRelationship.ts +19 -19
  48. package/src/types/ComputedDataSeries.ts +7 -7
  49. package/src/types/ComputedDataTree.ts +19 -19
  50. package/src/types/ContextObserver.ts +38 -38
  51. package/src/types/ContextObserverGrid.ts +42 -42
  52. package/src/types/ContextObserverMultiGrid.ts +16 -15
  53. package/src/types/ContextObserverMultiValue.ts +4 -4
  54. package/src/types/ContextObserverRelationship.ts +4 -4
  55. package/src/types/ContextObserverSeries.ts +29 -29
  56. package/src/types/ContextObserverTree.ts +11 -11
  57. package/src/types/ContextSubject.ts +18 -18
  58. package/src/types/Data.ts +45 -45
  59. package/src/types/DataFormatter.ts +74 -74
  60. package/src/types/DataFormatterGrid.ts +67 -67
  61. package/src/types/DataFormatterMultiGrid.ts +44 -44
  62. package/src/types/DataFormatterMultiValue.ts +23 -23
  63. package/src/types/DataFormatterRelationship.ts +25 -25
  64. package/src/types/DataFormatterSeries.ts +20 -20
  65. package/src/types/DataFormatterTree.ts +12 -12
  66. package/src/types/DataGrid.ts +11 -11
  67. package/src/types/DataMultiGrid.ts +6 -6
  68. package/src/types/DataMultiValue.ts +12 -12
  69. package/src/types/DataRelationship.ts +27 -27
  70. package/src/types/DataSeries.ts +11 -11
  71. package/src/types/DataTree.ts +20 -20
  72. package/src/types/Event.ts +153 -153
  73. package/src/types/Layout.ts +11 -11
  74. package/src/types/Padding.ts +5 -5
  75. package/src/types/Plugin.ts +60 -60
  76. package/src/types/TransformData.ts +7 -7
  77. package/src/types/index.ts +37 -37
  78. package/src/utils/commonUtils.ts +50 -50
  79. package/src/utils/d3Utils.ts +89 -89
  80. package/src/utils/index.ts +4 -4
  81. package/src/utils/observables.ts +201 -201
  82. package/src/utils/orbchartsUtils.ts +349 -349
  83. package/tsconfig.json +13 -13
  84. package/vite.config.js +22 -44
@@ -1,12 +1,12 @@
1
- import { DataTreeDatum, DataTree } from './DataTree'
2
- import { DataFormatterBase, VisibleFilter } from './DataFormatter'
3
-
4
- export interface DataFormatterTree
5
- extends DataFormatterBase<'tree'> {
6
- visibleFilter: VisibleFilter<'tree'>
7
- // labelFormat: (datum: unknown) => string
8
- // descriptionFormat: (datum: unknown) => string
9
- categoryLabels: string[]
10
- }
11
-
12
- export type DataFormatterTreePartial = Partial<DataFormatterTree>
1
+ import { DataTreeDatum, DataTree } from './DataTree'
2
+ import { DataFormatterBase, VisibleFilter } from './DataFormatter'
3
+
4
+ export interface DataFormatterTree
5
+ extends DataFormatterBase<'tree'> {
6
+ visibleFilter: VisibleFilter<'tree'>
7
+ // labelFormat: (datum: unknown) => string
8
+ // descriptionFormat: (datum: unknown) => string
9
+ categoryLabels: string[]
10
+ }
11
+
12
+ export type DataFormatterTreePartial = Partial<DataFormatterTree>
@@ -1,11 +1,11 @@
1
- import type { DatumBase, DatumValue } from './Data'
2
-
3
- // export type DataGrid = DataGridDatum[][] | DataGridValue[][]
4
- export type DataGrid = (DataGridDatum | DataGridValue)[][]
5
-
6
- export type DataGridValue = number | null
7
-
8
- export interface DataGridDatum extends DatumBase, DatumValue {
9
- }
10
-
11
-
1
+ import type { DatumBase, DatumValue } from './Data'
2
+
3
+ // export type DataGrid = DataGridDatum[][] | DataGridValue[][]
4
+ export type DataGrid = (DataGridDatum | DataGridValue)[][]
5
+
6
+ export type DataGridValue = number | null
7
+
8
+ export interface DataGridDatum extends DatumBase, DatumValue {
9
+ }
10
+
11
+
@@ -1,7 +1,7 @@
1
- import type { DataGrid, DataGridDatum, DataGridValue } from './DataGrid'
2
-
3
- export type DataMultiGrid = DataGrid[]
4
-
5
- export interface DataMultiGridDatum extends DataGridDatum {}
6
-
1
+ import type { DataGrid, DataGridDatum, DataGridValue } from './DataGrid'
2
+
3
+ export type DataMultiGrid = DataGrid[]
4
+
5
+ export interface DataMultiGridDatum extends DataGridDatum {}
6
+
7
7
  export type DataMultiGridValue = DataGridValue
@@ -1,12 +1,12 @@
1
- import type { DatumBase, DatumValue } from './Data'
2
-
3
- // export type DataMultiValue = DataMultiValueDatum[][] | DataMultiValueValue[][]
4
- export type DataMultiValue = (DataMultiValueDatum | DataMultiValueValue)[][]
5
-
6
- export type DataMultiValueValue = number
7
-
8
- export interface DataMultiValueDatum extends DatumBase, DatumValue {
9
- categoryLabel?: string
10
- }
11
-
12
-
1
+ import type { DatumBase, DatumValue } from './Data'
2
+
3
+ // export type DataMultiValue = DataMultiValueDatum[][] | DataMultiValueValue[][]
4
+ export type DataMultiValue = (DataMultiValueDatum | DataMultiValueValue)[][]
5
+
6
+ export type DataMultiValueValue = number
7
+
8
+ export interface DataMultiValueDatum extends DatumBase, DatumValue {
9
+ categoryLabel?: string
10
+ }
11
+
12
+
@@ -1,28 +1,28 @@
1
- import type { DatumBase } from './Data'
2
-
3
- export type DataRelationship = DataRelationshipObj | DataRelationshipList
4
-
5
- // 物件資料
6
- export interface DataRelationshipObj {
7
- nodes: Node[]
8
- edges: Edge[]
9
- }
10
-
11
- // 陣列資料
12
- export type DataRelationshipList = [
13
- Node[],
14
- Edge[]
15
- ]
16
-
17
-
18
- export interface Node extends DatumBase {
19
- id: string
20
- value?: number
21
- categoryLabel?: string
22
- }
23
-
24
- export interface Edge extends DatumBase {
25
- start: string
26
- end: string
27
- value?: number
1
+ import type { DatumBase } from './Data'
2
+
3
+ export type DataRelationship = DataRelationshipObj | DataRelationshipList
4
+
5
+ // 物件資料
6
+ export interface DataRelationshipObj {
7
+ nodes: Node[]
8
+ edges: Edge[]
9
+ }
10
+
11
+ // 陣列資料
12
+ export type DataRelationshipList = [
13
+ Node[],
14
+ Edge[]
15
+ ]
16
+
17
+
18
+ export interface Node extends DatumBase {
19
+ id: string
20
+ value?: number
21
+ categoryLabel?: string
22
+ }
23
+
24
+ export interface Edge extends DatumBase {
25
+ start: string
26
+ end: string
27
+ value?: number
28
28
  }
@@ -1,11 +1,11 @@
1
- import type { DatumBase, DatumValue } from './Data'
2
-
3
- // export type DataSeries = DataSeriesDatum[][] | DataSeriesDatum[] | DataSeriesValue[][] | DataSeriesValue[]
4
- export type DataSeries = (DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]
5
-
6
- export type DataSeriesValue = number | null
7
-
8
- export interface DataSeriesDatum extends DatumBase, DatumValue {
9
- }
10
-
11
-
1
+ import type { DatumBase, DatumValue } from './Data'
2
+
3
+ // export type DataSeries = DataSeriesDatum[][] | DataSeriesDatum[] | DataSeriesValue[][] | DataSeriesValue[]
4
+ export type DataSeries = (DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]
5
+
6
+ export type DataSeriesValue = number | null
7
+
8
+ export interface DataSeriesDatum extends DatumBase, DatumValue {
9
+ }
10
+
11
+
@@ -1,20 +1,20 @@
1
- import type { DatumBase } from './Data'
2
-
3
- export type DataTree = DataTreeObj | DataTreeDatum[]
4
-
5
- // 樹狀結構
6
- export interface DataTreeObj extends DatumBase {
7
- id: string
8
- value?: number
9
- children?: DataTreeObj[]
10
- categoryLabel?: string
11
- }
12
-
13
- // 陣列資料
14
- export interface DataTreeDatum extends DatumBase {
15
- id: string
16
- value?: number
17
- parent?: string
18
- categoryLabel?: string
19
- }
20
-
1
+ import type { DatumBase } from './Data'
2
+
3
+ export type DataTree = DataTreeObj | DataTreeDatum[]
4
+
5
+ // 樹狀結構
6
+ export interface DataTreeObj extends DatumBase {
7
+ id: string
8
+ value?: number
9
+ children?: DataTreeObj[]
10
+ categoryLabel?: string
11
+ }
12
+
13
+ // 陣列資料
14
+ export interface DataTreeDatum extends DatumBase {
15
+ id: string
16
+ value?: number
17
+ parent?: string
18
+ categoryLabel?: string
19
+ }
20
+
@@ -1,153 +1,153 @@
1
- import * as d3 from 'd3'
2
- import type { ChartType } from './Chart'
3
- import type { ComputedDatumBase } from './ComputedData'
4
- import type { ComputedDataSeries, ComputedDatumSeries } from './ComputedDataSeries'
5
- import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
6
- import type { ComputedDataMultiGrid } from './ComputedDataMultiGrid'
7
- import type { ComputedDataMultiValue, ComputedDatumMultiValue } from './ComputedDataMultiValue'
8
- import type { ComputedDataRelationship, ComputedNode } from './ComputedDataRelationship'
9
- import type { ComputedDataTree } from './ComputedDataTree'
10
- import type { HighlightTarget } from './ChartParams'
11
-
12
- export type EventName = 'click'
13
- | 'mouseover'
14
- | 'mousemove'
15
- | 'mouseout'
16
- | 'dragstart'
17
- | 'drag'
18
- | 'dragend'
19
- | 'resize'
20
- | 'transitionMove'
21
- | 'transitionEnd'
22
- // | 'enterDuration'
23
-
24
- // export interface Event<EventData = unknown> {
25
- // eventName: EventName
26
- // data: EventData
27
- // }
28
-
29
- // export interface ShareEvent<EventData = unknown> extends Event<EventData> {
30
- // pluginName: string
31
- // }
32
-
33
- // export interface EventData {
34
-
35
- // }
36
-
37
- // 透過類型選擇Event
38
- export type EventTypeMap<T extends ChartType> = T extends 'series' ? EventSeries
39
- : T extends 'grid' ? EventGrid
40
- : T extends 'multiGrid' ? EventMultiGrid
41
- : T extends 'multiValue' ? EventMultiValue
42
- : T extends 'relationship' ? EventRelationship
43
- : T extends 'tree' ? EventTree
44
- : EventBase<any>
45
-
46
- export interface EventBase<T extends ChartType> {
47
- type: T
48
- eventName: EventName
49
- pluginName: string
50
- event: MouseEvent | undefined
51
- highlightTarget: HighlightTarget
52
- // datum: ComputedDatumBase | null
53
- tween?: number
54
- }
55
-
56
- export interface EventBaseSeriesValue<DatumType, DataType> {
57
- data: DataType
58
- series: DatumType[]
59
- seriesIndex: number
60
- seriesLabel: string
61
- datum: DatumType | null
62
- }
63
-
64
- export interface EventBaseGridValue<DatumType, DataType> {
65
- data: DataType
66
- gridIndex: number
67
- series: DatumType[]
68
- seriesIndex: number
69
- seriesLabel: string
70
- groups: DatumType[]
71
- groupIndex: number
72
- groupLabel: string
73
- datum: DatumType | null
74
- }
75
-
76
- export interface EventBaseCategoryValue<DatumType, DataType> {
77
- data: DataType
78
- category: DatumType[]
79
- categoryIndex: number
80
- categoryLabel: string
81
- datum: DatumType | null
82
- }
83
-
84
- export interface EventSeries extends EventBase<'series'>, EventBaseSeriesValue<ComputedDatumSeries, ComputedDataSeries> {
85
- // type: 'series'
86
- // data: ComputedDataSeries
87
- // series: ComputedDatumSeries[]
88
- // seriesIndex: number
89
- // seriesLabel: string
90
- // datum: ComputedDatumSeries | null
91
- // // highlightTarget: 'series' | 'datum' | 'none'
92
- // // highlightLabel: string | null
93
- // // highlightId: string | null
94
- }
95
-
96
- export interface EventGrid extends EventBase<'grid'>, EventBaseGridValue<ComputedDatumGrid, ComputedDataGrid> {
97
- // type: 'grid'
98
- // data: ComputedDataGrid
99
- // series: ComputedDatumGrid[]
100
- // seriesIndex: number
101
- // seriesLabel: string
102
- // groups: ComputedDatumGrid[]
103
- // groupIndex: number
104
- // groupLabel: string
105
- // datum: ComputedDatumGrid | null
106
- // // highlightTarget: 'series' | 'group' | 'datum' | 'none'
107
- // // highlightLabel: string | null
108
- // // highlightId: string | null
109
- }
110
-
111
- export interface EventMultiGrid extends EventBase<'multiGrid'>, EventBaseGridValue<ComputedDatumGrid, ComputedDataMultiGrid> {
112
- // type: 'multiGrid'
113
- // data: ComputedDataMultiGrid
114
- // gridIndex: number
115
- // series: ComputedDatumGrid[]
116
- // seriesIndex: number
117
- // seriesLabel: string
118
- // group: ComputedDatumGrid[]
119
- // groupIndex: number
120
- // groupLabel: string
121
- // datum: ComputedDatumGrid | null
122
- // // highlightTarget: 'series' | 'group' | 'datum' | 'none'
123
- // // highlightLabel: string | null
124
- // // highlightId: string | null
125
- }
126
-
127
- export interface EventMultiValue extends EventBase<'multiValue'>, EventBaseCategoryValue<ComputedDatumMultiValue, ComputedDataMultiValue> {
128
- // type: 'multiValue'
129
- // data: ComputedDataMultiValue
130
- // category: ComputedDatumMultiValue[]
131
- // categoryIndex: number
132
- // categoryLabel: string
133
- // datum: ComputedDatumMultiValue | null
134
- }
135
-
136
- export interface EventRelationship extends EventBase<'relationship'>, EventBaseCategoryValue<ComputedNode, ComputedDataRelationship> {
137
- // type: 'relationship'
138
- // data: ComputedDataRelationship
139
- // category: ComputedNode[]
140
- // categoryIndex: number
141
- // categoryLabel: string
142
- // datum: ComputedNode | null
143
- }
144
-
145
- export interface EventTree extends EventBase<'tree'>, EventBaseCategoryValue<ComputedDataTree, ComputedDataTree> {
146
- // type: 'tree'
147
- // data: ComputedDataTree
148
- // category: ComputedDataTree[]
149
- // categoryIndex: number
150
- // categoryLabel: string
151
- // datum: ComputedDataTree | null
152
- }
153
-
1
+ import * as d3 from 'd3'
2
+ import type { ChartType } from './Chart'
3
+ import type { ComputedDatumBase } from './ComputedData'
4
+ import type { ComputedDataSeries, ComputedDatumSeries } from './ComputedDataSeries'
5
+ import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
6
+ import type { ComputedDataMultiGrid } from './ComputedDataMultiGrid'
7
+ import type { ComputedDataMultiValue, ComputedDatumMultiValue } from './ComputedDataMultiValue'
8
+ import type { ComputedDataRelationship, ComputedNode } from './ComputedDataRelationship'
9
+ import type { ComputedDataTree } from './ComputedDataTree'
10
+ import type { HighlightTarget } from './ChartParams'
11
+
12
+ export type EventName = 'click'
13
+ | 'mouseover'
14
+ | 'mousemove'
15
+ | 'mouseout'
16
+ | 'dragstart'
17
+ | 'drag'
18
+ | 'dragend'
19
+ | 'resize'
20
+ | 'transitionMove'
21
+ | 'transitionEnd'
22
+ // | 'enterDuration'
23
+
24
+ // export interface Event<EventData = unknown> {
25
+ // eventName: EventName
26
+ // data: EventData
27
+ // }
28
+
29
+ // export interface ShareEvent<EventData = unknown> extends Event<EventData> {
30
+ // pluginName: string
31
+ // }
32
+
33
+ // export interface EventData {
34
+
35
+ // }
36
+
37
+ // 透過類型選擇Event
38
+ export type EventTypeMap<T extends ChartType> = T extends 'series' ? EventSeries
39
+ : T extends 'grid' ? EventGrid
40
+ : T extends 'multiGrid' ? EventMultiGrid
41
+ : T extends 'multiValue' ? EventMultiValue
42
+ : T extends 'relationship' ? EventRelationship
43
+ : T extends 'tree' ? EventTree
44
+ : EventBase<any>
45
+
46
+ export interface EventBase<T extends ChartType> {
47
+ type: T
48
+ eventName: EventName
49
+ pluginName: string
50
+ event: MouseEvent | undefined
51
+ highlightTarget: HighlightTarget
52
+ // datum: ComputedDatumBase | null
53
+ tween?: number
54
+ }
55
+
56
+ export interface EventBaseSeriesValue<DatumType, DataType> {
57
+ data: DataType
58
+ series: DatumType[]
59
+ seriesIndex: number
60
+ seriesLabel: string
61
+ datum: DatumType | null
62
+ }
63
+
64
+ export interface EventBaseGridValue<DatumType, DataType> {
65
+ data: DataType
66
+ gridIndex: number
67
+ series: DatumType[]
68
+ seriesIndex: number
69
+ seriesLabel: string
70
+ groups: DatumType[]
71
+ groupIndex: number
72
+ groupLabel: string
73
+ datum: DatumType | null
74
+ }
75
+
76
+ export interface EventBaseCategoryValue<DatumType, DataType> {
77
+ data: DataType
78
+ category: DatumType[]
79
+ categoryIndex: number
80
+ categoryLabel: string
81
+ datum: DatumType | null
82
+ }
83
+
84
+ export interface EventSeries extends EventBase<'series'>, EventBaseSeriesValue<ComputedDatumSeries, ComputedDataSeries> {
85
+ // type: 'series'
86
+ // data: ComputedDataSeries
87
+ // series: ComputedDatumSeries[]
88
+ // seriesIndex: number
89
+ // seriesLabel: string
90
+ // datum: ComputedDatumSeries | null
91
+ // // highlightTarget: 'series' | 'datum' | 'none'
92
+ // // highlightLabel: string | null
93
+ // // highlightId: string | null
94
+ }
95
+
96
+ export interface EventGrid extends EventBase<'grid'>, EventBaseGridValue<ComputedDatumGrid, ComputedDataGrid> {
97
+ // type: 'grid'
98
+ // data: ComputedDataGrid
99
+ // series: ComputedDatumGrid[]
100
+ // seriesIndex: number
101
+ // seriesLabel: string
102
+ // groups: ComputedDatumGrid[]
103
+ // groupIndex: number
104
+ // groupLabel: string
105
+ // datum: ComputedDatumGrid | null
106
+ // // highlightTarget: 'series' | 'group' | 'datum' | 'none'
107
+ // // highlightLabel: string | null
108
+ // // highlightId: string | null
109
+ }
110
+
111
+ export interface EventMultiGrid extends EventBase<'multiGrid'>, EventBaseGridValue<ComputedDatumGrid, ComputedDataMultiGrid> {
112
+ // type: 'multiGrid'
113
+ // data: ComputedDataMultiGrid
114
+ // gridIndex: number
115
+ // series: ComputedDatumGrid[]
116
+ // seriesIndex: number
117
+ // seriesLabel: string
118
+ // group: ComputedDatumGrid[]
119
+ // groupIndex: number
120
+ // groupLabel: string
121
+ // datum: ComputedDatumGrid | null
122
+ // // highlightTarget: 'series' | 'group' | 'datum' | 'none'
123
+ // // highlightLabel: string | null
124
+ // // highlightId: string | null
125
+ }
126
+
127
+ export interface EventMultiValue extends EventBase<'multiValue'>, EventBaseCategoryValue<ComputedDatumMultiValue, ComputedDataMultiValue> {
128
+ // type: 'multiValue'
129
+ // data: ComputedDataMultiValue
130
+ // category: ComputedDatumMultiValue[]
131
+ // categoryIndex: number
132
+ // categoryLabel: string
133
+ // datum: ComputedDatumMultiValue | null
134
+ }
135
+
136
+ export interface EventRelationship extends EventBase<'relationship'>, EventBaseCategoryValue<ComputedNode, ComputedDataRelationship> {
137
+ // type: 'relationship'
138
+ // data: ComputedDataRelationship
139
+ // category: ComputedNode[]
140
+ // categoryIndex: number
141
+ // categoryLabel: string
142
+ // datum: ComputedNode | null
143
+ }
144
+
145
+ export interface EventTree extends EventBase<'tree'>, EventBaseCategoryValue<ComputedDataTree, ComputedDataTree> {
146
+ // type: 'tree'
147
+ // data: ComputedDataTree
148
+ // category: ComputedDataTree[]
149
+ // categoryIndex: number
150
+ // categoryLabel: string
151
+ // datum: ComputedDataTree | null
152
+ }
153
+
@@ -1,12 +1,12 @@
1
- import type { Padding } from './Padding'
2
-
3
- export interface Layout extends Padding {
4
- width: number
5
- height: number
6
- // top: number
7
- // right: number
8
- // bottom: number
9
- // left: number
10
- rootWidth: number
11
- rootHeight: number
1
+ import type { Padding } from './Padding'
2
+
3
+ export interface Layout extends Padding {
4
+ width: number
5
+ height: number
6
+ // top: number
7
+ // right: number
8
+ // bottom: number
9
+ // left: number
10
+ rootWidth: number
11
+ rootHeight: number
12
12
  }
@@ -1,6 +1,6 @@
1
- export interface Padding {
2
- top: number
3
- right: number
4
- bottom: number
5
- left: number
1
+ export interface Padding {
2
+ top: number
3
+ right: number
4
+ bottom: number
5
+ left: number
6
6
  }