@triniwiz/nativescript-masonkit 1.0.0-alpha.2 → 1.0.0-alpha.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/common.d.ts +67 -30
- package/common.js +609 -1094
- package/common.js.map +1 -1
- package/helpers.d.ts +116 -94
- package/helpers.js +471 -2538
- package/helpers.js.map +1 -1
- package/index.android.d.ts +53 -18
- package/index.android.js +190 -61
- package/index.android.js.map +1 -1
- package/index.d.ts +161 -17
- package/index.ios.d.ts +69 -19
- package/index.ios.js +438 -93
- package/index.ios.js.map +1 -1
- package/package.json +4 -4
- package/platforms/android/include.gradle +22 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +9 -5
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +495 -313
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +11 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +215 -818
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +34507 -20240
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/module.modulemap +1 -1
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +2421 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1053 -689
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +11 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +215 -818
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +34507 -20240
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +34507 -20240
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +660 -310
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/module.modulemap +1 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +33 -97
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +2421 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +2357 -0
- package/style.d.ts +166 -0
- package/style.js +1705 -0
- package/style.js.map +1 -0
- package/web.d.ts +55 -0
- package/web.js +189 -0
- package/web.js.map +1 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/Podfile +0 -1
- package/platforms/ios/build.xcconfig +0 -2
- package/platforms/ios/src/JSIModule.h +0 -217
- package/platforms/ios/src/JSIModule.mm +0 -2788
- package/platforms/ios/src/include/mason_native.h +0 -945
- package/platforms/ios/src/module.modulemap +0 -4
package/index.android.js
CHANGED
|
@@ -1,95 +1,224 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class
|
|
1
|
+
var _a;
|
|
2
|
+
import { backgroundColorProperty, Color, colorProperty, CSSType, Utils } from '@nativescript/core';
|
|
3
|
+
import { TextBase, ViewBase, style_, textProperty, textWrapProperty, ImageBase, srcProperty } from './common';
|
|
4
|
+
import { Style } from './style';
|
|
5
|
+
export class Tree {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
8
|
-
this.__masonStylePtr = BigIntZero;
|
|
9
|
-
this.__masonNodePtr = BigIntZero;
|
|
10
|
-
this.__masonPtr = BigIntZero;
|
|
11
|
-
this._hasNativeView = false;
|
|
12
|
-
this._inBatch = false;
|
|
7
|
+
this._base = org.nativescript.mason.masonkit.Mason.getShared();
|
|
13
8
|
}
|
|
14
|
-
get
|
|
15
|
-
|
|
16
|
-
this.__masonStylePtr = BigInt(this.android?.getMasonStylePtr?.()?.toString?.() ?? '0');
|
|
17
|
-
}
|
|
18
|
-
return this.__masonStylePtr;
|
|
9
|
+
static get instance() {
|
|
10
|
+
return _a._tree;
|
|
19
11
|
}
|
|
20
|
-
get
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return this.
|
|
12
|
+
get native() {
|
|
13
|
+
return this._base;
|
|
14
|
+
}
|
|
15
|
+
createView(context) {
|
|
16
|
+
return this.native.createView(context);
|
|
17
|
+
}
|
|
18
|
+
createTextView(context) {
|
|
19
|
+
return this.native.createTextView(context);
|
|
20
|
+
}
|
|
21
|
+
createImageView(context) {
|
|
22
|
+
return this.native.createImageView(context);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
_a = Tree;
|
|
26
|
+
(() => {
|
|
27
|
+
_a._tree = new _a();
|
|
28
|
+
})();
|
|
29
|
+
export class View extends ViewBase {
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this._hasNativeView = false;
|
|
33
|
+
this._inBatch = false;
|
|
34
|
+
const view = Tree.instance.createView(Utils.android.getCurrentActivity() || Utils.android.getApplicationContext());
|
|
35
|
+
this._hasNativeView = true;
|
|
36
|
+
this._view = view;
|
|
25
37
|
}
|
|
26
|
-
get
|
|
27
|
-
if (this
|
|
28
|
-
this
|
|
38
|
+
get _styleHelper() {
|
|
39
|
+
if (this[style_] === undefined) {
|
|
40
|
+
this[style_] = Style.fromView(this, this._view);
|
|
29
41
|
}
|
|
30
|
-
return this
|
|
42
|
+
return this[style_];
|
|
31
43
|
}
|
|
32
44
|
createNativeView() {
|
|
33
|
-
|
|
34
|
-
this._hasNativeView = true;
|
|
35
|
-
return view;
|
|
45
|
+
return this._view;
|
|
36
46
|
}
|
|
37
47
|
disposeNativeView() {
|
|
38
48
|
this._hasNativeView = false;
|
|
39
49
|
super.disposeNativeView();
|
|
40
50
|
}
|
|
41
|
-
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
52
|
+
// @ts-ignore
|
|
42
53
|
get android() {
|
|
43
|
-
return this.
|
|
54
|
+
return this._view;
|
|
44
55
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const nativeView = this.
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
_addViewToNativeVisualTree(child, atIndex = -1) {
|
|
58
|
+
const nativeView = this._view;
|
|
59
|
+
// @ts-ignore
|
|
48
60
|
child._masonParent = this;
|
|
49
61
|
if (nativeView && child.nativeViewProtected) {
|
|
50
|
-
child
|
|
51
|
-
child
|
|
52
|
-
nativeView.addView(child.nativeViewProtected, -1);
|
|
62
|
+
child._hasNativeView = true;
|
|
63
|
+
child._isMasonChild = true;
|
|
64
|
+
nativeView.addView(child.nativeViewProtected, (atIndex ?? -1));
|
|
53
65
|
return true;
|
|
54
66
|
}
|
|
55
67
|
return false;
|
|
56
68
|
}
|
|
69
|
+
// @ts-ignore
|
|
57
70
|
_removeViewFromNativeVisualTree(view) {
|
|
58
71
|
view._masonParent = undefined;
|
|
59
72
|
view._isMasonView = false;
|
|
60
73
|
view._isMasonChild = false;
|
|
74
|
+
// @ts-ignore
|
|
61
75
|
super._removeViewFromNativeVisualTree(view);
|
|
62
76
|
}
|
|
63
77
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const
|
|
78
|
+
export class Text extends TextBase {
|
|
79
|
+
constructor(type = 0) {
|
|
80
|
+
super();
|
|
81
|
+
this._hasNativeView = false;
|
|
82
|
+
this._inBatch = false;
|
|
83
|
+
const context = Utils.android.getCurrentActivity() || Utils.android.getApplicationContext();
|
|
84
|
+
switch (type) {
|
|
85
|
+
case 0 /* TextType.None */:
|
|
86
|
+
this._view = Tree.instance.createTextView(context);
|
|
87
|
+
break;
|
|
88
|
+
case 1 /* TextType.P */:
|
|
89
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.P);
|
|
90
|
+
break;
|
|
91
|
+
case 2 /* TextType.Span */:
|
|
92
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.Span);
|
|
93
|
+
break;
|
|
94
|
+
case 3 /* TextType.Code */:
|
|
95
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.Code);
|
|
96
|
+
break;
|
|
97
|
+
case 4 /* TextType.H1 */:
|
|
98
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H1);
|
|
99
|
+
break;
|
|
100
|
+
case 5 /* TextType.H2 */:
|
|
101
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H2);
|
|
102
|
+
break;
|
|
103
|
+
case 6 /* TextType.H3 */:
|
|
104
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H3);
|
|
105
|
+
break;
|
|
106
|
+
case 7 /* TextType.H4 */:
|
|
107
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H4);
|
|
108
|
+
break;
|
|
109
|
+
case 8 /* TextType.H5 */:
|
|
110
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H5);
|
|
111
|
+
break;
|
|
112
|
+
case 9 /* TextType.H6 */:
|
|
113
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.H6);
|
|
114
|
+
break;
|
|
115
|
+
case 10 /* TextType.Li */:
|
|
116
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.Li);
|
|
117
|
+
break;
|
|
118
|
+
case 11 /* TextType.Blockquote */:
|
|
119
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.Blockquote);
|
|
120
|
+
break;
|
|
121
|
+
case 12 /* TextType.B */:
|
|
122
|
+
this._view = Tree.instance.native.createTextView(context, org.nativescript.mason.masonkit.TextType.B);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
70
125
|
this._hasNativeView = true;
|
|
71
|
-
|
|
126
|
+
this[style_] = Style.fromView(this, this._view, true);
|
|
127
|
+
}
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
get android() {
|
|
131
|
+
return this._view;
|
|
132
|
+
}
|
|
133
|
+
get _styleHelper() {
|
|
134
|
+
if (this[style_] === undefined) {
|
|
135
|
+
this[style_] = Style.fromView(this, this._view);
|
|
136
|
+
}
|
|
137
|
+
return this[style_];
|
|
72
138
|
}
|
|
73
|
-
};
|
|
74
|
-
Grid = __decorate([
|
|
75
|
-
CSSType('Grid')
|
|
76
|
-
], Grid);
|
|
77
|
-
export { Grid };
|
|
78
|
-
let Flex = class Flex extends TSCView {
|
|
79
139
|
createNativeView() {
|
|
80
|
-
|
|
140
|
+
return this._view;
|
|
141
|
+
}
|
|
142
|
+
[textProperty.setNative](value) {
|
|
143
|
+
const nativeView = this._view;
|
|
144
|
+
if (nativeView) {
|
|
145
|
+
nativeView.updateText(value);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
[colorProperty.setNative](value) {
|
|
149
|
+
if (value instanceof Color) {
|
|
150
|
+
this[style_].color = value.android;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
[backgroundColorProperty.setNative](value) {
|
|
154
|
+
if (typeof value === 'number') {
|
|
155
|
+
this[style_].backgroundColor = value;
|
|
156
|
+
}
|
|
157
|
+
else if (value instanceof Color) {
|
|
158
|
+
this[style_].backgroundColor = value.android;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
[textWrapProperty.setNative](value) {
|
|
162
|
+
switch (value) {
|
|
163
|
+
case 'false':
|
|
164
|
+
case 'nowrap':
|
|
165
|
+
this[style_].textWrap = 0 /* TextWrap.NoWrap */;
|
|
166
|
+
break;
|
|
167
|
+
case 'true':
|
|
168
|
+
case 'wrap':
|
|
169
|
+
this[style_].textWrap = 1 /* TextWrap.Wrap */;
|
|
170
|
+
break;
|
|
171
|
+
case 'balance':
|
|
172
|
+
this[style_].textWrap = 2 /* TextWrap.Balance */;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
_addViewToNativeVisualTree(child, atIndex = -1) {
|
|
178
|
+
const nativeView = this._view;
|
|
179
|
+
if (nativeView && child.nativeViewProtected) {
|
|
180
|
+
child._hasNativeView = true;
|
|
181
|
+
child._isMasonChild = true;
|
|
182
|
+
nativeView.addView(child.nativeViewProtected, atIndex ?? -1);
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
let Img = class Img extends ImageBase {
|
|
189
|
+
constructor() {
|
|
190
|
+
super();
|
|
191
|
+
this._hasNativeView = false;
|
|
192
|
+
this._inBatch = false;
|
|
193
|
+
const context = Utils.android.getCurrentActivity() || Utils.android.getApplicationContext();
|
|
194
|
+
this._view = Tree.instance.createImageView(context);
|
|
81
195
|
this._hasNativeView = true;
|
|
82
|
-
|
|
196
|
+
this[style_] = Style.fromView(this, this._view);
|
|
197
|
+
}
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
get android() {
|
|
201
|
+
return this._view;
|
|
202
|
+
}
|
|
203
|
+
get _styleHelper() {
|
|
204
|
+
if (this[style_] === undefined) {
|
|
205
|
+
this[style_] = Style.fromView(this, this._view);
|
|
206
|
+
}
|
|
207
|
+
return this[style_];
|
|
208
|
+
}
|
|
209
|
+
createNativeView() {
|
|
210
|
+
return this._view;
|
|
211
|
+
}
|
|
212
|
+
[srcProperty.setNative](value) {
|
|
213
|
+
const nativeView = this._view;
|
|
214
|
+
if (nativeView) {
|
|
215
|
+
nativeView.setSrc(value);
|
|
216
|
+
}
|
|
83
217
|
}
|
|
84
218
|
};
|
|
85
|
-
|
|
86
|
-
CSSType('
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
Container = __decorate([
|
|
92
|
-
CSSType('Container')
|
|
93
|
-
], Container);
|
|
94
|
-
export { Container };
|
|
219
|
+
Img = __decorate([
|
|
220
|
+
CSSType('img'),
|
|
221
|
+
__metadata("design:paramtypes", [])
|
|
222
|
+
], Img);
|
|
223
|
+
export { Img };
|
|
95
224
|
//# sourceMappingURL=index.android.js.map
|
package/index.android.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../packages/nativescript-masonkit/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../packages/nativescript-masonkit/index.android.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAc,gBA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AAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAC5F,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED,6DAA6D;IAC7D,aAAa;IACb,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,YAAY;QACd,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,KAAK;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,KAA4C,CAAC;QACrE,IAAI,UAAU,EAAE,CAAC;YACf,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CASF,CAAA;AA5CY,GAAG;IADf,OAAO,CAAC,KAAK,CAAC;;GACF,GAAG,CA4Cf"}
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { CoreTypes } from '@nativescript/core';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { TextBase, ViewBase } from './common';
|
|
4
|
+
import { LengthPercentage } from '@nativescript/core/css/parser';
|
|
4
5
|
|
|
5
|
-
export type Length = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit;
|
|
6
|
+
export type Length = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | CoreTypes.LengthPercentUnit;
|
|
6
7
|
|
|
7
|
-
export type LengthAuto = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | 'auto';
|
|
8
|
+
export type LengthAuto = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | CoreTypes.LengthPercentUnit | 'auto';
|
|
8
9
|
|
|
9
10
|
export type SizeLength = { width: LengthType; height: LengthType };
|
|
10
11
|
|
|
11
12
|
export type Position = 'absolute' | 'relative';
|
|
12
13
|
|
|
13
|
-
export type Display = 'none' | 'flex' | 'grid';
|
|
14
|
+
export type Display = 'none' | 'flex' | 'grid' | 'block';
|
|
15
|
+
|
|
16
|
+
export type BoxSizing = 'border-box' | 'content-box';
|
|
17
|
+
|
|
18
|
+
export type Overflow = 'visible' | 'hidden' | 'scroll';
|
|
14
19
|
|
|
15
20
|
export type FlexWrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
|
|
16
21
|
|
|
@@ -32,17 +37,149 @@ export type JustifySelf = AlignSelf;
|
|
|
32
37
|
|
|
33
38
|
export type JustifyContent = AlignContent;
|
|
34
39
|
|
|
35
|
-
export type GridAutoFlow = 'row' | 'column' | 'row
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
export type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense' | 'dense';
|
|
41
|
+
|
|
42
|
+
export class View extends ViewBase {
|
|
43
|
+
display: Display;
|
|
44
|
+
position: Position;
|
|
45
|
+
flexDirection: FlexDirection;
|
|
46
|
+
flexWrap: FlexWrap;
|
|
47
|
+
flex: string | 'auto' | 'none' | number | 'initial';
|
|
48
|
+
flexFlow: string;
|
|
49
|
+
width: LengthAuto;
|
|
50
|
+
height: LengthAuto;
|
|
51
|
+
maxWidth: LengthAuto;
|
|
52
|
+
maxHeight: LengthAuto;
|
|
53
|
+
left: Length;
|
|
54
|
+
right: Length;
|
|
55
|
+
top: Length;
|
|
56
|
+
bottom: Length;
|
|
57
|
+
gridGap: Gap;
|
|
58
|
+
gap: Gap;
|
|
59
|
+
rowGap: Length;
|
|
60
|
+
columnGap: Length;
|
|
61
|
+
aspectRatio: number;
|
|
62
|
+
flexBasis: Length;
|
|
63
|
+
alignItems: AlignItems;
|
|
64
|
+
alignSelf: AlignSelf;
|
|
65
|
+
alignContent: AlignContent;
|
|
66
|
+
justifyItems: JustifyItems;
|
|
67
|
+
justifySelf: JustifySelf;
|
|
68
|
+
justifyContent: JustifyContent;
|
|
69
|
+
gridAutoRows: string;
|
|
70
|
+
gridAutoColumns: string;
|
|
71
|
+
gridAutoFlow: GridAutoFlow;
|
|
72
|
+
gridRowGap: Gap;
|
|
73
|
+
gridColumnGap: Gap;
|
|
74
|
+
gridArea: string;
|
|
75
|
+
gridColumn: string;
|
|
76
|
+
gridColumnStart: string;
|
|
77
|
+
gridColumnEnd: string;
|
|
78
|
+
gridRow: string;
|
|
79
|
+
gridRowStart: string;
|
|
80
|
+
gridRowEnd: string;
|
|
81
|
+
gridTemplateRows: string;
|
|
82
|
+
gridTemplateColumns: string;
|
|
83
|
+
overflow: Overflow;
|
|
84
|
+
overflowX: Overflow;
|
|
85
|
+
overflowY: Overflow;
|
|
86
|
+
scrollBarWidth: number | CoreTypes.LengthType;
|
|
87
|
+
}
|
|
42
88
|
|
|
43
|
-
export class
|
|
89
|
+
export class Text extends TextBase {
|
|
90
|
+
display: Display;
|
|
91
|
+
position: Position;
|
|
92
|
+
flexDirection: FlexDirection;
|
|
93
|
+
flexWrap: FlexWrap;
|
|
94
|
+
flex: string | 'auto' | 'none' | number | 'initial';
|
|
95
|
+
flexFlow: string;
|
|
96
|
+
width: LengthAuto;
|
|
97
|
+
height: LengthAuto;
|
|
98
|
+
maxWidth: LengthAuto;
|
|
99
|
+
maxHeight: LengthAuto;
|
|
100
|
+
left: Length;
|
|
101
|
+
right: Length;
|
|
102
|
+
top: Length;
|
|
103
|
+
bottom: Length;
|
|
104
|
+
gridGap: Gap;
|
|
105
|
+
gap: Gap;
|
|
106
|
+
rowGap: Length;
|
|
107
|
+
columnGap: Length;
|
|
108
|
+
aspectRatio: number;
|
|
109
|
+
flexBasis: Length;
|
|
110
|
+
alignItems: AlignItems;
|
|
111
|
+
alignSelf: AlignSelf;
|
|
112
|
+
alignContent: AlignContent;
|
|
113
|
+
justifyItems: JustifyItems;
|
|
114
|
+
justifySelf: JustifySelf;
|
|
115
|
+
justifyContent: JustifyContent;
|
|
116
|
+
gridAutoRows: string;
|
|
117
|
+
gridAutoColumns: string;
|
|
118
|
+
gridAutoFlow: GridAutoFlow;
|
|
119
|
+
gridRowGap: Gap;
|
|
120
|
+
gridColumnGap: Gap;
|
|
121
|
+
gridArea: string;
|
|
122
|
+
gridColumn: string;
|
|
123
|
+
gridColumnStart: string;
|
|
124
|
+
gridColumnEnd: string;
|
|
125
|
+
gridRow: string;
|
|
126
|
+
gridRowStart: string;
|
|
127
|
+
gridRowEnd: string;
|
|
128
|
+
gridTemplateRows: string;
|
|
129
|
+
gridTemplateColumns: string;
|
|
130
|
+
overflow: Overflow;
|
|
131
|
+
overflowX: Overflow;
|
|
132
|
+
overflowY: Overflow;
|
|
133
|
+
scrollBarWidth: number | CoreTypes.LengthType;
|
|
134
|
+
}
|
|
44
135
|
|
|
45
|
-
export class
|
|
136
|
+
export class Img extends ViewBase {
|
|
137
|
+
src: string;
|
|
138
|
+
display: Display;
|
|
139
|
+
position: Position;
|
|
140
|
+
flexDirection: FlexDirection;
|
|
141
|
+
flexWrap: FlexWrap;
|
|
142
|
+
flex: string | 'auto' | 'none' | number | 'initial';
|
|
143
|
+
flexFlow: string;
|
|
144
|
+
width: LengthAuto;
|
|
145
|
+
height: LengthAuto;
|
|
146
|
+
maxWidth: LengthAuto;
|
|
147
|
+
maxHeight: LengthAuto;
|
|
148
|
+
left: Length;
|
|
149
|
+
right: Length;
|
|
150
|
+
top: Length;
|
|
151
|
+
bottom: Length;
|
|
152
|
+
gridGap: Gap;
|
|
153
|
+
gap: Gap;
|
|
154
|
+
rowGap: Length;
|
|
155
|
+
columnGap: Length;
|
|
156
|
+
aspectRatio: number;
|
|
157
|
+
flexBasis: Length;
|
|
158
|
+
alignItems: AlignItems;
|
|
159
|
+
alignSelf: AlignSelf;
|
|
160
|
+
alignContent: AlignContent;
|
|
161
|
+
justifyItems: JustifyItems;
|
|
162
|
+
justifySelf: JustifySelf;
|
|
163
|
+
justifyContent: JustifyContent;
|
|
164
|
+
gridAutoRows: string;
|
|
165
|
+
gridAutoColumns: string;
|
|
166
|
+
gridAutoFlow: GridAutoFlow;
|
|
167
|
+
gridRowGap: Gap;
|
|
168
|
+
gridColumnGap: Gap;
|
|
169
|
+
gridArea: string;
|
|
170
|
+
gridColumn: string;
|
|
171
|
+
gridColumnStart: string;
|
|
172
|
+
gridColumnEnd: string;
|
|
173
|
+
gridRow: string;
|
|
174
|
+
gridRowStart: string;
|
|
175
|
+
gridRowEnd: string;
|
|
176
|
+
gridTemplateRows: string;
|
|
177
|
+
gridTemplateColumns: string;
|
|
178
|
+
overflow: Overflow;
|
|
179
|
+
overflowX: Overflow;
|
|
180
|
+
overflowY: Overflow;
|
|
181
|
+
scrollBarWidth: number | CoreTypes.LengthType;
|
|
182
|
+
}
|
|
46
183
|
|
|
47
184
|
declare module '@nativescript/core/ui/styling/style' {
|
|
48
185
|
interface Style {
|
|
@@ -50,10 +187,12 @@ declare module '@nativescript/core/ui/styling/style' {
|
|
|
50
187
|
position: Position;
|
|
51
188
|
flexDirection: FlexDirection;
|
|
52
189
|
flexWrap: FlexWrap;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
190
|
+
flex: string | 'auto' | 'none' | number | 'initial';
|
|
191
|
+
flexFlow: string;
|
|
192
|
+
width: LengthPercentage | string | number;
|
|
193
|
+
height: LengthPercentage | string | number;
|
|
194
|
+
maxWidth: LengthPercentage | string | number;
|
|
195
|
+
maxHeight: LengthPercentage | string | number;
|
|
57
196
|
left: Length;
|
|
58
197
|
right: Length;
|
|
59
198
|
top: Length;
|
|
@@ -63,6 +202,7 @@ declare module '@nativescript/core/ui/styling/style' {
|
|
|
63
202
|
rowGap: Length;
|
|
64
203
|
columnGap: Length;
|
|
65
204
|
aspectRatio: number;
|
|
205
|
+
flexBasis: LengthPercentage | string | number;
|
|
66
206
|
alignItems: AlignItems;
|
|
67
207
|
alignSelf: AlignSelf;
|
|
68
208
|
alignContent: AlignContent;
|
|
@@ -83,5 +223,9 @@ declare module '@nativescript/core/ui/styling/style' {
|
|
|
83
223
|
gridRowEnd: string;
|
|
84
224
|
gridTemplateRows: string;
|
|
85
225
|
gridTemplateColumns: string;
|
|
226
|
+
overflow: Overflow;
|
|
227
|
+
overflowX: Overflow;
|
|
228
|
+
overflowY: Overflow;
|
|
229
|
+
scrollBarWidth: number | CoreTypes.LengthType;
|
|
86
230
|
}
|
|
87
231
|
}
|
package/index.ios.d.ts
CHANGED
|
@@ -1,27 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Color } from '@nativescript/core';
|
|
2
|
+
import { MasonChild, style_, TextBase, ViewBase, ImageBase } from './common';
|
|
3
|
+
declare const enum TextType {
|
|
4
|
+
None = 0,
|
|
5
|
+
P = 1,
|
|
6
|
+
Span = 2,
|
|
7
|
+
Code = 3,
|
|
8
|
+
H1 = 4,
|
|
9
|
+
H2 = 5,
|
|
10
|
+
H3 = 6,
|
|
11
|
+
H4 = 7,
|
|
12
|
+
H5 = 8,
|
|
13
|
+
H6 = 9,
|
|
14
|
+
Li = 10,
|
|
15
|
+
Blockquote = 11,
|
|
16
|
+
B = 12
|
|
17
|
+
}
|
|
18
|
+
export declare class Tree {
|
|
19
|
+
_base: NSCMason;
|
|
20
|
+
private static _tree;
|
|
21
|
+
constructor();
|
|
22
|
+
static get instance(): Tree;
|
|
23
|
+
get native(): NSCMason;
|
|
24
|
+
createView(): MasonUIView;
|
|
25
|
+
createTextView(): MasonText;
|
|
26
|
+
createImageView(): MasonImg;
|
|
27
|
+
}
|
|
28
|
+
export declare class View extends ViewBase {
|
|
29
|
+
[style_]: any;
|
|
30
|
+
private _view;
|
|
31
|
+
constructor();
|
|
32
|
+
get _styleHelper(): any;
|
|
10
33
|
_hasNativeView: boolean;
|
|
11
|
-
|
|
34
|
+
_inBatch: boolean;
|
|
35
|
+
createNativeView(): MasonUIView;
|
|
12
36
|
disposeNativeView(): void;
|
|
13
|
-
get ios():
|
|
37
|
+
get ios(): MasonUIView;
|
|
14
38
|
onLayout(left: number, top: number, right: number, bottom: number): void;
|
|
15
39
|
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
16
|
-
|
|
17
|
-
_addViewToNativeVisualTree(
|
|
18
|
-
_removeViewFromNativeVisualTree(view:
|
|
40
|
+
_setNativeViewFrame(nativeView: any, frame: CGRect): void;
|
|
41
|
+
_addViewToNativeVisualTree(child: MasonChild, atIndex?: number): boolean;
|
|
42
|
+
_removeViewFromNativeVisualTree(view: MasonChild): void;
|
|
19
43
|
}
|
|
20
|
-
export declare class
|
|
21
|
-
|
|
44
|
+
export declare class Text extends TextBase {
|
|
45
|
+
[style_]: any;
|
|
46
|
+
_hasNativeView: boolean;
|
|
47
|
+
_inBatch: boolean;
|
|
48
|
+
_isText: boolean;
|
|
49
|
+
private _view;
|
|
50
|
+
constructor(type?: TextType);
|
|
51
|
+
get ios(): MasonText;
|
|
52
|
+
get _styleHelper(): any;
|
|
53
|
+
createNativeView(): MasonText;
|
|
54
|
+
get text(): string;
|
|
55
|
+
set text(value: string);
|
|
56
|
+
set backgroundColor(value: Color | number);
|
|
57
|
+
get backgroundColor(): Color | number;
|
|
58
|
+
onLayout(left: number, top: number, right: number, bottom: number): void;
|
|
59
|
+
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
60
|
+
_addViewToNativeVisualTree(child: MasonChild & {
|
|
61
|
+
text?: string;
|
|
62
|
+
}, atIndex?: number): boolean;
|
|
63
|
+
_setNativeViewFrame(nativeView: any, frame: CGRect): void;
|
|
22
64
|
}
|
|
23
|
-
export declare class
|
|
65
|
+
export declare class Img extends ImageBase {
|
|
66
|
+
[style_]: any;
|
|
67
|
+
_hasNativeView: boolean;
|
|
68
|
+
_inBatch: boolean;
|
|
69
|
+
private _view;
|
|
70
|
+
constructor();
|
|
71
|
+
get ios(): any;
|
|
72
|
+
get _styleHelper(): any;
|
|
24
73
|
createNativeView(): any;
|
|
74
|
+
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
75
|
+
_setNativeViewFrame(nativeView: any, frame: CGRect): void;
|
|
25
76
|
}
|
|
26
|
-
export
|
|
27
|
-
}
|
|
77
|
+
export {};
|