@leafer/decorator 1.0.0-rc.2 → 1.0.0-rc.21
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.
- package/package.json +4 -4
- package/src/data.ts +162 -152
- package/src/define.ts +1 -1
- package/src/index.ts +1 -1
- package/types/index.d.ts +27 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/decorator",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.21",
|
|
4
4
|
"description": "@leafer/decorator",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/platform": "1.0.0-rc.
|
|
26
|
-
"@leafer/debug": "1.0.0-rc.
|
|
25
|
+
"@leafer/platform": "1.0.0-rc.21",
|
|
26
|
+
"@leafer/debug": "1.0.0-rc.21"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@leafer/interface": "1.0.0-rc.
|
|
29
|
+
"@leafer/interface": "1.0.0-rc.21"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/data.ts
CHANGED
|
@@ -1,197 +1,205 @@
|
|
|
1
|
-
import { ILeafData, ILeaf, IObject,
|
|
1
|
+
import { ILeafData, ILeaf, IObject, IValue, ILeafAttrDescriptor, ILeafAttrDescriptorFn } from '@leafer/interface'
|
|
2
2
|
import { defineKey, getDescriptor } from './object'
|
|
3
3
|
import { Debug } from '@leafer/debug'
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// name
|
|
7
7
|
|
|
8
|
-
export function
|
|
9
|
-
return (target: ILeaf, key: string) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
}
|
|
8
|
+
export function decorateLeafAttr(defaultValue?: IValue, descriptorFn?: ILeafAttrDescriptorFn) {
|
|
9
|
+
return (target: ILeaf, key: string) => defineLeafAttr(target, key, defaultValue, descriptorFn && descriptorFn(key))
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function attr(partDescriptor?: ILeafAttrDescriptor): ILeafAttrDescriptor {
|
|
13
|
+
return partDescriptor
|
|
17
14
|
}
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
|
|
17
|
+
export function defineLeafAttr(target: ILeaf, key: string, defaultValue?: IValue, partDescriptor?: ILeafAttrDescriptor): void {
|
|
18
|
+
const defaultDescriptor: ILeafAttrDescriptor = {
|
|
21
19
|
get() { return this.__getAttr(key) },
|
|
22
|
-
set(value:
|
|
20
|
+
set(value: IValue) { this.__setAttr(key, value) },
|
|
23
21
|
configurable: true,
|
|
24
22
|
enumerable: true
|
|
25
23
|
}
|
|
26
|
-
defineKey(target, key, Object.assign(defaultDescriptor,
|
|
24
|
+
defineKey(target, key, Object.assign(defaultDescriptor, partDescriptor || {}))
|
|
27
25
|
defineDataProcessor(target, key, defaultValue)
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
28
|
+
|
|
29
|
+
export function dataType(defaultValue?: IValue) {
|
|
30
|
+
return decorateLeafAttr(defaultValue)
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
export function positionType(defaultValue?:
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
}
|
|
33
|
+
export function positionType(defaultValue?: IValue, checkFiniteNumber?: boolean) {
|
|
34
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
35
|
+
set(value: IValue) {
|
|
36
|
+
this.__setAttr(key, value, checkFiniteNumber)
|
|
37
|
+
this.__layout.matrixChanged || this.__layout.matrixChange()
|
|
38
|
+
}
|
|
39
|
+
}))
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
export function
|
|
48
|
-
return (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
}
|
|
42
|
+
export function autoLayoutType(defaultValue?: IValue) {
|
|
43
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
44
|
+
set(value: IValue) {
|
|
45
|
+
this.__setAttr(key, value)
|
|
46
|
+
this.__layout.matrixChanged || this.__layout.matrixChange()
|
|
47
|
+
this.__hasAutoLayout = !!value
|
|
48
|
+
if (!this.__local) this.__layout.createLocal()
|
|
49
|
+
}
|
|
50
|
+
}))
|
|
56
51
|
}
|
|
57
52
|
|
|
53
|
+
export function scaleType(defaultValue?: IValue, checkFiniteNumber?: boolean) {
|
|
54
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
55
|
+
set(value: IValue) {
|
|
56
|
+
this.__setAttr(key, value, checkFiniteNumber)
|
|
57
|
+
this.__layout.scaleChanged || this.__layout.scaleChange()
|
|
58
|
+
}
|
|
59
|
+
}))
|
|
60
|
+
}
|
|
58
61
|
|
|
59
|
-
export function rotationType(defaultValue?:
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
export function rotationType(defaultValue?: IValue, checkFiniteNumber?: boolean) {
|
|
63
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
64
|
+
set(value: IValue) {
|
|
65
|
+
this.__setAttr(key, value, checkFiniteNumber)
|
|
66
|
+
this.__layout.rotationChanged || this.__layout.rotationChange()
|
|
67
|
+
}
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
+
}))
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
export function boundsType(defaultValue?:
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
export function boundsType(defaultValue?: IValue, checkFiniteNumber?: boolean) {
|
|
73
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
74
|
+
set(value: IValue) {
|
|
75
|
+
this.__setAttr(key, value, checkFiniteNumber) && doBoundsType(this)
|
|
76
|
+
}
|
|
77
|
+
}))
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function naturalBoundsType(defaultValue?: IValue) {
|
|
81
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
82
|
+
set(value: IValue) {
|
|
83
|
+
this.__setAttr(key, value)
|
|
84
|
+
doBoundsType(this)
|
|
85
|
+
this.__.__removeNaturalSize()
|
|
86
|
+
}
|
|
87
|
+
}))
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function doBoundsType(leaf: ILeaf): void {
|
|
91
|
+
leaf.__layout.boxChanged || leaf.__layout.boxChange()
|
|
92
|
+
if (leaf.__hasAutoLayout) leaf.__layout.matrixChanged || leaf.__layout.matrixChange()
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function pathInputType(defaultValue?: IValue) {
|
|
96
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
97
|
+
set(value: IValue) {
|
|
98
|
+
if (this.__.__pathInputed !== 2) this.__.__pathInputed = value ? 1 : 0
|
|
99
|
+
this.__setAttr(key, value)
|
|
100
|
+
doBoundsType(this)
|
|
101
|
+
}
|
|
102
|
+
}))
|
|
81
103
|
}
|
|
82
104
|
|
|
83
105
|
export const pathType = boundsType
|
|
84
106
|
|
|
85
107
|
|
|
86
|
-
export function affectStrokeBoundsType(defaultValue?:
|
|
87
|
-
return (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
export function affectStrokeBoundsType(defaultValue?: IValue) {
|
|
109
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
110
|
+
set(value: IValue) {
|
|
111
|
+
this.__setAttr(key, value) && doStrokeType(this)
|
|
112
|
+
}
|
|
113
|
+
}))
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function doStrokeType(leaf: ILeaf): void {
|
|
117
|
+
leaf.__layout.strokeChanged || leaf.__layout.strokeChange()
|
|
118
|
+
if (leaf.__.__useArrow) doBoundsType(leaf)
|
|
95
119
|
}
|
|
96
120
|
|
|
97
121
|
export const strokeType = affectStrokeBoundsType
|
|
98
122
|
|
|
99
|
-
export function affectRenderBoundsType(defaultValue?:
|
|
100
|
-
return (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
})
|
|
107
|
-
}
|
|
123
|
+
export function affectRenderBoundsType(defaultValue?: IValue) {
|
|
124
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
125
|
+
set(value: IValue) {
|
|
126
|
+
this.__setAttr(key, value)
|
|
127
|
+
this.__layout.renderChanged || this.__layout.renderChange()
|
|
128
|
+
}
|
|
129
|
+
}))
|
|
108
130
|
}
|
|
109
131
|
|
|
110
|
-
export function surfaceType(defaultValue?:
|
|
111
|
-
return (
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})
|
|
118
|
-
}
|
|
132
|
+
export function surfaceType(defaultValue?: IValue) {
|
|
133
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
134
|
+
set(value: IValue) {
|
|
135
|
+
this.__setAttr(key, value)
|
|
136
|
+
this.__layout.surfaceChanged || this.__layout.surfaceChange()
|
|
137
|
+
}
|
|
138
|
+
}))
|
|
119
139
|
}
|
|
120
140
|
|
|
121
|
-
export function opacityType(defaultValue?:
|
|
122
|
-
return (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
})
|
|
129
|
-
}
|
|
141
|
+
export function opacityType(defaultValue?: IValue) {
|
|
142
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
143
|
+
set(value: IValue) {
|
|
144
|
+
this.__setAttr(key, value)
|
|
145
|
+
this.__layout.opacityChanged || this.__layout.opacityChange()
|
|
146
|
+
}
|
|
147
|
+
}))
|
|
130
148
|
}
|
|
131
149
|
|
|
132
|
-
export function sortType(defaultValue?:
|
|
133
|
-
return (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
})
|
|
141
|
-
}
|
|
150
|
+
export function sortType(defaultValue?: IValue) {
|
|
151
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
152
|
+
set(value: IValue) {
|
|
153
|
+
this.__setAttr(key, value)
|
|
154
|
+
this.__layout.surfaceChanged || this.__layout.surfaceChange()
|
|
155
|
+
this.waitParent(() => { this.parent.__layout.childrenSortChange() })
|
|
156
|
+
}
|
|
157
|
+
}))
|
|
142
158
|
}
|
|
143
159
|
|
|
144
|
-
export function maskType(defaultValue?:
|
|
145
|
-
return (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
})
|
|
153
|
-
}
|
|
160
|
+
export function maskType(defaultValue?: IValue) {
|
|
161
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
162
|
+
set(value: boolean) {
|
|
163
|
+
this.__setAttr(key, value)
|
|
164
|
+
this.__layout.boxChanged || this.__layout.boxChange()
|
|
165
|
+
this.waitParent(() => { this.parent.__updateMask(value) })
|
|
166
|
+
}
|
|
167
|
+
}))
|
|
154
168
|
}
|
|
155
169
|
|
|
156
|
-
export function eraserType(defaultValue?:
|
|
157
|
-
return (
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
})
|
|
164
|
-
}
|
|
170
|
+
export function eraserType(defaultValue?: IValue) {
|
|
171
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
172
|
+
set(value: boolean) {
|
|
173
|
+
this.__setAttr(key, value)
|
|
174
|
+
this.waitParent(() => { this.parent.__updateEraser(value) })
|
|
175
|
+
}
|
|
176
|
+
}))
|
|
165
177
|
}
|
|
166
178
|
|
|
167
|
-
export function hitType(defaultValue?:
|
|
168
|
-
return (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
})
|
|
176
|
-
}
|
|
179
|
+
export function hitType(defaultValue?: IValue) {
|
|
180
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
181
|
+
set(value: IValue) {
|
|
182
|
+
this.__setAttr(key, value)
|
|
183
|
+
if (Debug.showHitView) { this.__layout.surfaceChanged || this.__layout.surfaceChange() }
|
|
184
|
+
if (this.leafer) this.leafer.updateCursor()
|
|
185
|
+
}
|
|
186
|
+
}))
|
|
177
187
|
}
|
|
178
188
|
|
|
179
|
-
export function cursorType(defaultValue?:
|
|
180
|
-
return (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
})
|
|
187
|
-
}
|
|
189
|
+
export function cursorType(defaultValue?: IValue) {
|
|
190
|
+
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
191
|
+
set(value: IValue) {
|
|
192
|
+
this.__setAttr(key, value)
|
|
193
|
+
if (this.leafer) this.leafer.updateCursor()
|
|
194
|
+
}
|
|
195
|
+
}))
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
|
|
191
199
|
// get
|
|
192
200
|
|
|
193
201
|
export function dataProcessor(processor: IObject) {
|
|
194
|
-
return (target:
|
|
202
|
+
return (target: IObject, _key?: string) => {
|
|
195
203
|
defineKey(target, '__DataProcessor', {
|
|
196
204
|
get() { return processor }
|
|
197
205
|
})
|
|
@@ -199,7 +207,7 @@ export function dataProcessor(processor: IObject) {
|
|
|
199
207
|
}
|
|
200
208
|
|
|
201
209
|
export function layoutProcessor(processor: IObject) {
|
|
202
|
-
return (target:
|
|
210
|
+
return (target: IObject, _key?: string) => {
|
|
203
211
|
defineKey(target, '__LayoutProcessor', {
|
|
204
212
|
get() { return processor }
|
|
205
213
|
})
|
|
@@ -213,24 +221,21 @@ function getSetMethodName(key: string): string {
|
|
|
213
221
|
return 'set' + key.charAt(0).toUpperCase() + key.slice(1)
|
|
214
222
|
}
|
|
215
223
|
|
|
216
|
-
export function setDefaultValue(target: IObject, key: string, defaultValue: __Value): void {
|
|
217
|
-
defineDataProcessor(target.prototype, key, defaultValue)
|
|
218
|
-
}
|
|
219
224
|
|
|
220
225
|
// define leaf.__[key] getter/setter
|
|
221
|
-
export function defineDataProcessor(target: ILeaf, key: string, defaultValue?:
|
|
226
|
+
export function defineDataProcessor(target: ILeaf, key: string, defaultValue?: IValue): void {
|
|
222
227
|
|
|
223
|
-
const data = target.__DataProcessor.prototype
|
|
228
|
+
const data = target.__DataProcessor.prototype
|
|
224
229
|
const computedKey = '_' + key
|
|
225
230
|
const setMethodName = getSetMethodName(key)
|
|
226
231
|
|
|
227
232
|
const property: IObject & ThisType<ILeafData> = {
|
|
228
233
|
get() {
|
|
229
|
-
const v = this[computedKey]
|
|
234
|
+
const v = (this as IObject)[computedKey]
|
|
230
235
|
return v === undefined ? defaultValue : v
|
|
231
236
|
},
|
|
232
|
-
set(value:
|
|
233
|
-
this[computedKey] = value
|
|
237
|
+
set(value: IValue) {
|
|
238
|
+
(this as IObject)[computedKey] = value
|
|
234
239
|
},
|
|
235
240
|
configurable: true,
|
|
236
241
|
enumerable: true
|
|
@@ -250,12 +255,17 @@ export function defineDataProcessor(target: ILeaf, key: string, defaultValue?: _
|
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
|
|
253
|
-
|
|
258
|
+
// find parent proto
|
|
259
|
+
let descriptor, find = data
|
|
260
|
+
while (!descriptor && find) {
|
|
261
|
+
descriptor = getDescriptor(find, key)
|
|
262
|
+
find = find.__proto__
|
|
263
|
+
}
|
|
254
264
|
|
|
255
|
-
if (descriptor && descriptor.set) property.set = descriptor.set // use
|
|
265
|
+
if (descriptor && descriptor.set) property.set = descriptor.set // use exist set
|
|
256
266
|
|
|
257
267
|
if (data[setMethodName]) {
|
|
258
|
-
property.set = data[setMethodName] //
|
|
268
|
+
property.set = data[setMethodName] // first use custom setKey(value)
|
|
259
269
|
delete data[setMethodName]
|
|
260
270
|
}
|
|
261
271
|
|
package/src/define.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { defineLeafAttr, decorateLeafAttr, attr, dataType, positionType, autoLayoutType, boundsType, doBoundsType, naturalBoundsType, affectStrokeBoundsType, doStrokeType, strokeType, affectRenderBoundsType, scaleType, rotationType, surfaceType, opacityType, sortType, maskType, eraserType, hitType, pathType, pathInputType, cursorType, dataProcessor, layoutProcessor, defineDataProcessor } from './data'
|
|
2
2
|
export { useModule, rewrite, rewriteAble } from './rewrite'
|
|
3
3
|
export { defineKey, getDescriptor } from './object'
|
|
4
4
|
export { registerUI, registerUIEvent } from './class'
|
package/types/index.d.ts
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { ILeaf,
|
|
1
|
+
import { IValue, ILeafAttrDescriptorFn, ILeaf, ILeafAttrDescriptor, IObject, IFunction } from '@leafer/interface';
|
|
2
2
|
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
3
|
+
declare function decorateLeafAttr(defaultValue?: IValue, descriptorFn?: ILeafAttrDescriptorFn): (target: ILeaf, key: string) => void;
|
|
4
|
+
declare function attr(partDescriptor?: ILeafAttrDescriptor): ILeafAttrDescriptor;
|
|
5
|
+
declare function defineLeafAttr(target: ILeaf, key: string, defaultValue?: IValue, partDescriptor?: ILeafAttrDescriptor): void;
|
|
6
|
+
declare function dataType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
7
|
+
declare function positionType(defaultValue?: IValue, checkFiniteNumber?: boolean): (target: ILeaf, key: string) => void;
|
|
8
|
+
declare function autoLayoutType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
9
|
+
declare function scaleType(defaultValue?: IValue, checkFiniteNumber?: boolean): (target: ILeaf, key: string) => void;
|
|
10
|
+
declare function rotationType(defaultValue?: IValue, checkFiniteNumber?: boolean): (target: ILeaf, key: string) => void;
|
|
11
|
+
declare function boundsType(defaultValue?: IValue, checkFiniteNumber?: boolean): (target: ILeaf, key: string) => void;
|
|
12
|
+
declare function naturalBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
13
|
+
declare function doBoundsType(leaf: ILeaf): void;
|
|
14
|
+
declare function pathInputType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
10
15
|
declare const pathType: typeof boundsType;
|
|
11
|
-
declare function affectStrokeBoundsType(defaultValue?:
|
|
16
|
+
declare function affectStrokeBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
17
|
+
declare function doStrokeType(leaf: ILeaf): void;
|
|
12
18
|
declare const strokeType: typeof affectStrokeBoundsType;
|
|
13
|
-
declare function affectRenderBoundsType(defaultValue?:
|
|
14
|
-
declare function surfaceType(defaultValue?:
|
|
15
|
-
declare function opacityType(defaultValue?:
|
|
16
|
-
declare function sortType(defaultValue?:
|
|
17
|
-
declare function maskType(defaultValue?:
|
|
18
|
-
declare function eraserType(defaultValue?:
|
|
19
|
-
declare function hitType(defaultValue?:
|
|
20
|
-
declare function cursorType(defaultValue?:
|
|
21
|
-
declare function dataProcessor(processor: IObject): (target:
|
|
22
|
-
declare function layoutProcessor(processor: IObject): (target:
|
|
23
|
-
declare function
|
|
24
|
-
declare function defineDataProcessor(target: ILeaf, key: string, defaultValue?: __Value): void;
|
|
19
|
+
declare function affectRenderBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
20
|
+
declare function surfaceType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
21
|
+
declare function opacityType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
22
|
+
declare function sortType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
23
|
+
declare function maskType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
24
|
+
declare function eraserType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
25
|
+
declare function hitType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
26
|
+
declare function cursorType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
27
|
+
declare function dataProcessor(processor: IObject): (target: IObject, _key?: string) => void;
|
|
28
|
+
declare function layoutProcessor(processor: IObject): (target: IObject, _key?: string) => void;
|
|
29
|
+
declare function defineDataProcessor(target: ILeaf, key: string, defaultValue?: IValue): void;
|
|
25
30
|
|
|
26
31
|
declare function rewrite(method: IFunction): (target: IObject, key: string) => void;
|
|
27
32
|
declare function rewriteAble(): (_target: IObject) => void;
|
|
@@ -33,4 +38,4 @@ declare function getDescriptor(object: IObject, name: string): PropertyDescripto
|
|
|
33
38
|
declare function registerUI(): (target: IObject) => void;
|
|
34
39
|
declare function registerUIEvent(): (target: IObject) => void;
|
|
35
40
|
|
|
36
|
-
export { affectRenderBoundsType, affectStrokeBoundsType,
|
|
41
|
+
export { affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, eraserType, getDescriptor, hitType, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, positionType, registerUI, registerUIEvent, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, useModule };
|