@@ -98,13 +98,15 @@ public virtual string TransformText()
98
98
import { NativeXamlControl } from './NativeXamlControl';
99
99
import { findNodeHandle, UIManager } from 'react-native';
100
100
101
- import type { Point } from './Props';
101
+ import type { Point, Color } from './Props';
102
+
103
+ export type { Point, Color };
102
104
103
105
const xamlCommands = UIManager.getViewManagerConfig('XamlControl').Commands;
104
106
105
107
" ) ;
106
108
107
- #line 35 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
109
+ #line 37 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
108
110
109
111
foreach ( var type in Types . Where ( t => Util . HasCtor ( t ) ) ) {
110
112
var ns = Util . GetTSNamespace ( type ) ;
@@ -114,126 +116,126 @@ public virtual string TransformText()
114
116
#line hidden
115
117
this . Write ( "export namespace " ) ;
116
118
117
- #line 39 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
119
+ #line 41 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
118
120
this . Write ( this . ToStringHelper . ToStringWithCulture ( ns ) ) ;
119
121
120
122
#line default
121
123
#line hidden
122
124
this . Write ( " {\r \n " ) ;
123
125
124
- #line 40 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
126
+ #line 42 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
125
127
}
126
128
127
129
#line default
128
130
#line hidden
129
131
this . Write ( "export type " ) ;
130
132
131
- #line 41 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
133
+ #line 43 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
132
134
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . ToJsName ( type ) ) ) ;
133
135
134
136
#line default
135
137
#line hidden
136
138
this . Write ( "Props = Omit<" ) ;
137
139
138
- #line 41 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
140
+ #line 43 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
139
141
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . GetNativePropsName ( type ) ) ) ;
140
142
141
143
#line default
142
144
#line hidden
143
145
this . Write ( ", \' type\' >;\r \n \r \n export class " ) ;
144
146
145
- #line 43 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
147
+ #line 45 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
146
148
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . ToJsName ( type ) ) ) ;
147
149
148
150
#line default
149
151
#line hidden
150
152
this . Write ( " extends React.Component<" ) ;
151
153
152
- #line 43 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
154
+ #line 45 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
153
155
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . ToJsName ( type ) ) ) ;
154
156
155
157
#line default
156
158
#line hidden
157
159
this . Write ( "Props> {\r \n render() {\r \n return <NativeXamlControl {...this.props} type=\' " ) ;
158
160
159
- #line 45 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
161
+ #line 47 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
160
162
this . Write ( this . ToStringHelper . ToStringWithCulture ( type . GetFullName ( ) ) ) ;
161
163
162
164
#line default
163
165
#line hidden
164
166
this . Write ( "\' />;\r \n }\r \n " ) ;
165
167
166
- #line 47 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
168
+ #line 49 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
167
169
foreach ( var command in Util . GetCommands ( type . GetFullName ( ) ) ) {
168
170
169
171
#line default
170
172
#line hidden
171
173
this . Write ( " static " ) ;
172
174
173
- #line 48 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
175
+ #line 50 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
174
176
this . Write ( this . ToStringHelper . ToStringWithCulture ( command . Name ) ) ;
175
177
176
178
#line default
177
179
#line hidden
178
180
this . Write ( "(ref: React.MutableRefObject<" ) ;
179
181
180
- #line 48 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
182
+ #line 50 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
181
183
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . ToJsName ( type ) ) ) ;
182
184
183
185
#line default
184
186
#line hidden
185
187
this . Write ( ">, args: " ) ;
186
188
187
- #line 48 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
189
+ #line 50 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
188
190
this . Write ( this . ToStringHelper . ToStringWithCulture ( command . TSArgTypes != null ? command . TSArgTypes : "any[]" ) ) ;
189
191
190
192
#line default
191
193
#line hidden
192
194
this . Write ( ") {\r \n const tag = findNodeHandle(ref.current);\r \n UIManager.dispatchViewMana" +
193
195
"gerCommand(tag, xamlCommands." ) ;
194
196
195
- #line 50 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
197
+ #line 52 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
196
198
this . Write ( this . ToStringHelper . ToStringWithCulture ( command . Name ) ) ;
197
199
198
200
#line default
199
201
#line hidden
200
202
this . Write ( ", " ) ;
201
203
202
- #line 50 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
204
+ #line 52 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
203
205
this . Write ( this . ToStringHelper . ToStringWithCulture ( command . TSArgTypes != null ? "[args]" : "args" ) ) ;
204
206
205
207
#line default
206
208
#line hidden
207
209
this . Write ( ");\r \n }\r \n " ) ;
208
210
209
- #line 52 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
211
+ #line 54 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
210
212
}
211
213
212
214
#line default
213
215
#line hidden
214
216
this . Write ( "};\r \n " ) ;
215
217
216
- #line 54 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
218
+ #line 56 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
217
219
if ( ns != "" ) {
218
220
219
221
#line default
220
222
#line hidden
221
223
this . Write ( "}\r \n " ) ;
222
224
223
- #line 56 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
225
+ #line 58 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
224
226
}
225
227
226
228
#line default
227
229
#line hidden
228
230
229
- #line 57 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
231
+ #line 59 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
230
232
}
231
233
232
234
#line default
233
235
#line hidden
234
236
this . Write ( "\r \n " ) ;
235
237
236
- #line 59 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
238
+ #line 61 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
237
239
foreach ( var ea in Util . eventArgsTypes ) {
238
240
var ns = Util . GetTSNamespace ( ea ) ;
239
241
if ( ns != "" ) {
@@ -242,14 +244,14 @@ public virtual string TransformText()
242
244
#line hidden
243
245
this . Write ( "export namespace " ) ;
244
246
245
- #line 62 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
247
+ #line 64 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
246
248
this . Write ( this . ToStringHelper . ToStringWithCulture ( ns ) ) ;
247
249
248
250
#line default
249
251
#line hidden
250
252
this . Write ( " {\r \n " ) ;
251
253
252
- #line 63 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
254
+ #line 65 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
253
255
254
256
}
255
257
@@ -258,41 +260,41 @@ public virtual string TransformText()
258
260
#line hidden
259
261
this . Write ( "export type " ) ;
260
262
261
- #line 66 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
263
+ #line 68 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
262
264
this . Write ( this . ToStringHelper . ToStringWithCulture ( ea . GetName ( ) ) ) ;
263
265
264
266
#line default
265
267
#line hidden
266
268
this . Write ( " = " ) ;
267
269
268
- #line 66 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
270
+ #line 68 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
269
271
this . Write ( this . ToStringHelper . ToStringWithCulture ( Util . GetEventArgsTSType ( ea , "Native" ) ) ) ;
270
272
271
273
#line default
272
274
#line hidden
273
275
this . Write ( "; // " ) ;
274
276
275
- #line 66 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
277
+ #line 68 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
276
278
this . Write ( this . ToStringHelper . ToStringWithCulture ( ea . GetFullName ( ) ) ) ;
277
279
278
280
#line default
279
281
#line hidden
280
282
this . Write ( " \r \n " ) ;
281
283
282
- #line 67 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
284
+ #line 69 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
283
285
if ( ns != "" ) {
284
286
285
287
#line default
286
288
#line hidden
287
289
this . Write ( "}\r \n " ) ;
288
290
289
- #line 69 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
291
+ #line 71 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
290
292
}
291
293
292
294
#line default
293
295
#line hidden
294
296
295
- #line 70 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
297
+ #line 72 "C:\Users\a sklar\source\r epos\r eact-native-xaml\package\Codegen\TSTypes.tt"
296
298
}
297
299
298
300
#line default
0 commit comments