@octane-xplat/macos-renderer 0.14.0 → 0.15.0

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.
Files changed (222) hide show
  1. package/README.md +95 -20
  2. package/package.json +15 -2
  3. package/src/appearance.ts +2 -0
  4. package/src/fonts.ts +2 -0
  5. package/src/formatted-text.ts +147 -0
  6. package/src/gestures.ts +196 -0
  7. package/src/host-globals.d.ts +55 -0
  8. package/src/html-text.ts +88 -0
  9. package/src/image.ts +91 -16
  10. package/src/index.d.ts +9 -0
  11. package/src/index.ts +5030 -678
  12. package/src/layer.ts +11 -9
  13. package/src/list-template.ts +266 -0
  14. package/src/list-view.ts +445 -0
  15. package/src/portal-components.macos.tsx +86 -0
  16. package/src/presentation.ts +48 -15
  17. package/src/scroll-view.ts +124 -0
  18. package/src/tab-view.ts +512 -0
  19. package/src/template-props.ts +402 -0
  20. package/src/vendor/listview/LICENSE +19 -0
  21. package/src/vendor/listview/README.md +1 -0
  22. package/src/vendor/listview/binding-options.ts +189 -0
  23. package/src/vendor/listview/expressions.ts +285 -0
  24. package/src/webview.ts +36 -7
  25. package/types/ARKitCore.d.ts +199 -0
  26. package/types/AVFAudio.d.ts +2304 -0
  27. package/types/AVFoundation.d.ts +6974 -0
  28. package/types/AVKit.d.ts +215 -0
  29. package/types/AVRouting.d.ts +7 -0
  30. package/types/Accelerate.d.ts +4776 -0
  31. package/types/Accessibility.d.ts +69 -0
  32. package/types/Accounts.d.ts +134 -0
  33. package/types/AdSupport.d.ts +12 -0
  34. package/types/AddressBook.d.ts +1012 -0
  35. package/types/AppKit.d.ts +34247 -0
  36. package/types/AppTrackingTransparency.d.ts +23 -0
  37. package/types/AppleScriptKit.d.ts +6 -0
  38. package/types/ApplicationServices.d.ts +6346 -0
  39. package/types/AudioToolbox.d.ts +7129 -0
  40. package/types/AudioVideoBridging.d.ts +613 -0
  41. package/types/AuthenticationServices.d.ts +982 -0
  42. package/types/AutomaticAssessmentConfiguration.d.ts +46 -0
  43. package/types/Automator.d.ts +248 -0
  44. package/types/BackgroundAssets.d.ts +9 -0
  45. package/types/BrowserEngineKit.d.ts +166 -0
  46. package/types/BusinessChat.d.ts +29 -0
  47. package/types/CFNetwork.d.ts +931 -0
  48. package/types/CalendarStore.d.ts +354 -0
  49. package/types/CallKit.d.ts +30 -0
  50. package/types/Carbon.d.ts +16207 -0
  51. package/types/ClassKit.d.ts +281 -0
  52. package/types/CloudKit.d.ts +1565 -0
  53. package/types/Collaboration.d.ts +123 -0
  54. package/types/ColorSync.d.ts +562 -0
  55. package/types/CompositorServices.d.ts +60 -0
  56. package/types/ComputeGraph.d.ts +16 -0
  57. package/types/Contacts.d.ts +1558 -0
  58. package/types/ContactsUI.d.ts +39 -0
  59. package/types/CoreAudio.d.ts +1376 -0
  60. package/types/CoreAudioKit.d.ts +122 -0
  61. package/types/CoreAudioTypes.d.ts +1003 -0
  62. package/types/CoreBluetooth.d.ts +657 -0
  63. package/types/CoreData.d.ts +2479 -0
  64. package/types/CoreFoundation.d.ts +5546 -0
  65. package/types/CoreGraphics.d.ts +3676 -0
  66. package/types/CoreHaptics.d.ts +361 -0
  67. package/types/CoreImage.d.ts +4781 -0
  68. package/types/CoreLocation.d.ts +564 -0
  69. package/types/CoreMIDI.d.ts +1538 -0
  70. package/types/CoreML.d.ts +905 -0
  71. package/types/CoreMedia.d.ts +2615 -0
  72. package/types/CoreMediaIO.d.ts +1046 -0
  73. package/types/CoreMotion.d.ts +316 -0
  74. package/types/CoreServices.d.ts +24810 -0
  75. package/types/CoreSpotlight.d.ts +789 -0
  76. package/types/CoreTelephony.d.ts +31 -0
  77. package/types/CoreText.d.ts +3973 -0
  78. package/types/CoreTransferable.d.ts +3 -0
  79. package/types/CoreVideo.d.ts +1162 -0
  80. package/types/CoreWLAN.d.ts +556 -0
  81. package/types/CryptoTokenKit.d.ts +548 -0
  82. package/types/DVDPlayback.d.ts +931 -0
  83. package/types/DataDetection.d.ts +66 -0
  84. package/types/DeviceCheck.d.ts +46 -0
  85. package/types/DeviceDiscoveryExtension.d.ts +142 -0
  86. package/types/DirectoryService.d.ts +966 -0
  87. package/types/DiscRecording.d.ts +2345 -0
  88. package/types/DiscRecordingUI.d.ts +288 -0
  89. package/types/DiskArbitration.d.ts +366 -0
  90. package/types/DriverKit.d.ts +639 -0
  91. package/types/EventKit.d.ts +640 -0
  92. package/types/ExceptionHandling.d.ts +56 -0
  93. package/types/ExecutionPolicy.d.ts +30 -0
  94. package/types/ExternalAccessory.d.ts +98 -0
  95. package/types/FSKit.d.ts +237 -0
  96. package/types/FileProvider.d.ts +495 -0
  97. package/types/FileProviderUI.d.ts +31 -0
  98. package/types/FinderSync.d.ts +165 -0
  99. package/types/FocusEngine.d.ts +133 -0
  100. package/types/ForceFeedback.d.ts +399 -0
  101. package/types/Foundation.d.ts +18216 -0
  102. package/types/GLKit.d.ts +937 -0
  103. package/types/GLUT.d.ts +1018 -0
  104. package/types/GSS.d.ts +855 -0
  105. package/types/GameController.d.ts +1394 -0
  106. package/types/GameKit.d.ts +1958 -0
  107. package/types/GameSave.d.ts +54 -0
  108. package/types/GameplayKit.d.ts +1645 -0
  109. package/types/HealthKit.d.ts +278 -0
  110. package/types/Hypervisor.d.ts +2079 -0
  111. package/types/ICADevices.d.ts +1400 -0
  112. package/types/IOBluetooth.d.ts +6094 -0
  113. package/types/IOBluetoothUI.d.ts +250 -0
  114. package/types/IOKit.d.ts +25804 -0
  115. package/types/IOSurface.d.ts +435 -0
  116. package/types/IOUSBHost.d.ts +809 -0
  117. package/types/ImageCaptureCore.d.ts +1104 -0
  118. package/types/ImageIO.d.ts +1697 -0
  119. package/types/InputMethodKit.d.ts +264 -0
  120. package/types/InstallerPlugins.d.ts +102 -0
  121. package/types/InstantMessage.d.ts +229 -0
  122. package/types/Intents.d.ts +1833 -0
  123. package/types/IntentsUI.d.ts +5 -0
  124. package/types/JavaRuntimeSupport.d.ts +520 -0
  125. package/types/JavaScriptCore.d.ts +934 -0
  126. package/types/Kerberos.d.ts +3754 -0
  127. package/types/Kernel.d.ts +33698 -0
  128. package/types/KernelManagement.d.ts +5 -0
  129. package/types/LatentSemanticMapping.d.ts +152 -0
  130. package/types/LinkPresentation.d.ts +57 -0
  131. package/types/LocalAuthentication.d.ts +94 -0
  132. package/types/MLCompute.d.ts +2343 -0
  133. package/types/MapKit.d.ts +2125 -0
  134. package/types/Matter.d.ts +151 -0
  135. package/types/MediaAccessibility.d.ts +137 -0
  136. package/types/MediaLibrary.d.ts +394 -0
  137. package/types/MediaPlayer.d.ts +475 -0
  138. package/types/MediaToolbox.d.ts +70 -0
  139. package/types/Metal.d.ts +4542 -0
  140. package/types/MetalFX.d.ts +107 -0
  141. package/types/MetalKit.d.ts +524 -0
  142. package/types/MetalPerformanceShaders.d.ts +9306 -0
  143. package/types/MetalPerformanceShadersGraph.d.ts +1394 -0
  144. package/types/MetricKit.d.ts +231 -0
  145. package/types/ModelIO.d.ts +2908 -0
  146. package/types/MultipeerConnectivity.d.ts +348 -0
  147. package/types/NaturalLanguage.d.ts +556 -0
  148. package/types/NearbyInteraction.d.ts +51 -0
  149. package/types/NetFS.d.ts +99 -0
  150. package/types/Network.d.ts +1622 -0
  151. package/types/NetworkExtension.d.ts +1574 -0
  152. package/types/NotificationCenter.d.ts +103 -0
  153. package/types/OSAKit.d.ts +260 -0
  154. package/types/OSLog.d.ts +208 -0
  155. package/types/OpenAL.d.ts +314 -0
  156. package/types/OpenCL.d.ts +2489 -0
  157. package/types/OpenDirectory.d.ts +1919 -0
  158. package/types/OpenGL.d.ts +11322 -0
  159. package/types/PCSC.d.ts +534 -0
  160. package/types/PDFKit.d.ts +1575 -0
  161. package/types/PHASE.d.ts +166 -0
  162. package/types/ParavirtualizedGraphics.d.ts +153 -0
  163. package/types/PassKit.d.ts +1287 -0
  164. package/types/PencilKit.d.ts +201 -0
  165. package/types/Photos.d.ts +1125 -0
  166. package/types/PhotosUI.d.ts +397 -0
  167. package/types/PreferencePanes.d.ts +68 -0
  168. package/types/ProximityReaderStub.d.ts +5 -0
  169. package/types/PushKit.d.ts +45 -0
  170. package/types/Quartz.d.ts +1642 -0
  171. package/types/QuartzCore.d.ts +1398 -0
  172. package/types/QuickLook.d.ts +212 -0
  173. package/types/QuickLookThumbnailing.d.ts +131 -0
  174. package/types/QuickLookUI.d.ts +117 -0
  175. package/types/REVISION.json +5 -0
  176. package/types/ReplayKit.d.ts +294 -0
  177. package/types/Runtime.d.ts +51605 -0
  178. package/types/SafariServices.d.ts +430 -0
  179. package/types/SafetyKit.d.ts +7 -0
  180. package/types/SceneKit.d.ts +4996 -0
  181. package/types/ScreenCaptureKit.d.ts +16 -0
  182. package/types/ScreenSaver.d.ts +41 -0
  183. package/types/ScreenTime.d.ts +41 -0
  184. package/types/ScriptingBridge.d.ts +96 -0
  185. package/types/Security.d.ts +14336 -0
  186. package/types/SecurityFoundation.d.ts +53 -0
  187. package/types/SecurityInterface.d.ts +297 -0
  188. package/types/SensorKit.d.ts +7 -0
  189. package/types/ServiceManagement.d.ts +71 -0
  190. package/types/SharedWithYou.d.ts +9 -0
  191. package/types/SharedWithYouCore.d.ts +5 -0
  192. package/types/ShazamKit.d.ts +12 -0
  193. package/types/Social.d.ts +306 -0
  194. package/types/SoundAnalysis.d.ts +177 -0
  195. package/types/Speech.d.ts +246 -0
  196. package/types/SpriteKit.d.ts +2766 -0
  197. package/types/StoreKit.d.ts +509 -0
  198. package/types/SyncServices.d.ts +551 -0
  199. package/types/SystemConfiguration.d.ts +1415 -0
  200. package/types/SystemExtensions.d.ts +89 -0
  201. package/types/TWAIN.d.ts +380 -0
  202. package/types/Tcl.d.ts +4013 -0
  203. package/types/ThreadNetwork.d.ts +77 -0
  204. package/types/Tk.d.ts +3750 -0
  205. package/types/UIUtilities.d.ts +31 -0
  206. package/types/UniformTypeIdentifiers.d.ts +358 -0
  207. package/types/UserNotifications.d.ts +538 -0
  208. package/types/UserNotificationsUI.d.ts +38 -0
  209. package/types/VideoDecodeAcceleration.d.ts +50 -0
  210. package/types/VideoSubscriberAccount.d.ts +139 -0
  211. package/types/VideoToolbox.d.ts +907 -0
  212. package/types/Virtualization.d.ts +302 -0
  213. package/types/Vision.d.ts +1723 -0
  214. package/types/WebKit.d.ts +5195 -0
  215. package/types/WidgetKit.d.ts +9 -0
  216. package/types/_LocationEssentials.d.ts +159 -0
  217. package/types/_ScreenCaptureKit_SwiftUI.d.ts +5 -0
  218. package/types/iTunesLibrary.d.ts +528 -0
  219. package/types/index.d.ts +9 -0
  220. package/types/vecLib.d.ts +33586 -0
  221. package/types/vmnet.d.ts +178 -0
  222. package/src/appkit.d.ts +0 -472
@@ -0,0 +1,402 @@
1
+ // Generated from packages/jsx/src/shared.d.ts; checked by list-view.test.ts.
2
+ const common = {
3
+ className: 'value',
4
+ class: 'value',
5
+ style: 'value',
6
+ id: 'value',
7
+ hostSlot: 'value',
8
+ row: 'value',
9
+ col: 'value',
10
+ rowSpan: 'value',
11
+ colSpan: 'value',
12
+ dock: 'value',
13
+ left: 'value',
14
+ top: 'value',
15
+ right: 'value',
16
+ bottom: 'value',
17
+ flexGrow: 'value',
18
+ flexShrink: 'value',
19
+ flexWrapBefore: 'boolean',
20
+ alignSelf: 'value',
21
+ order: 'value',
22
+ horizontalAlignment: 'value',
23
+ verticalAlignment: 'value',
24
+ visibility: 'value',
25
+ accessible: 'boolean',
26
+ accessibilityLabel: 'value',
27
+ accessibilityRole: 'value',
28
+ accessibilityHint: 'value',
29
+ accessibilityValue: 'value',
30
+ accessibilityState: 'value',
31
+ accessibilityLiveRegion: 'value',
32
+ automationText: 'value',
33
+ testID: 'value',
34
+ ios: 'value',
35
+ android: 'value',
36
+ onTap: 'value',
37
+ onClick: 'value',
38
+ onPress: 'value',
39
+ onDoubleTap: 'value',
40
+ onLongPress: 'value',
41
+ onSwipe: 'value',
42
+ onPan: 'value',
43
+ onPinch: 'value',
44
+ onRotation: 'value',
45
+ onTouch: 'value',
46
+ onChange: 'value',
47
+ onSubmit: 'value',
48
+ onFocus: 'value',
49
+ onBlur: 'value',
50
+ onLoaded: 'value',
51
+ onUnloaded: 'value',
52
+ onLayoutChanged: 'value',
53
+ }
54
+
55
+ export const templateProps: Record<string, Record<string, string>> = {
56
+ absolutelayout: { ...common },
57
+ docklayout: {
58
+ ...common,
59
+ stretchLastChild: 'boolean',
60
+ },
61
+ flexboxlayout: {
62
+ ...common,
63
+ flexDirection: 'value',
64
+ flexWrap: 'value',
65
+ justifyContent: 'value',
66
+ alignItems: 'value',
67
+ alignContent: 'value',
68
+ gap: 'value',
69
+ rowGap: 'value',
70
+ columnGap: 'value',
71
+ },
72
+ gridlayout: {
73
+ ...common,
74
+ rows: 'value',
75
+ columns: 'value',
76
+ },
77
+ stacklayout: {
78
+ ...common,
79
+ orientation: 'value',
80
+ },
81
+ wraplayout: {
82
+ ...common,
83
+ orientation: 'value',
84
+ itemWidth: 'number',
85
+ itemHeight: 'number',
86
+ },
87
+ contentview: { ...common },
88
+ proxyviewcontainer: { ...common },
89
+ rootlayout: { ...common },
90
+ label: {
91
+ ...common,
92
+ text: 'value',
93
+ formattedText: 'value',
94
+ textWrap: 'boolean',
95
+ whiteSpace: 'value',
96
+ textOverflow: 'value',
97
+ maxLines: 'number',
98
+ },
99
+ formattedstring: {
100
+ ...common,
101
+ fontFamily: 'value',
102
+ fontSize: 'number',
103
+ color: 'value',
104
+ backgroundColor: 'value',
105
+ },
106
+ span: {
107
+ ...common,
108
+ text: 'value',
109
+ fontFamily: 'value',
110
+ fontSize: 'number',
111
+ fontWeight: 'value',
112
+ fontStyle: 'value',
113
+ textDecoration: 'value',
114
+ color: 'value',
115
+ backgroundColor: 'value',
116
+ },
117
+ htmlview: {
118
+ ...common,
119
+ html: 'value',
120
+ },
121
+ textfield: {
122
+ ...common,
123
+ text: 'value',
124
+ hint: 'value',
125
+ secure: 'boolean',
126
+ editable: 'boolean',
127
+ maxLength: 'number',
128
+ keyboardType: 'value',
129
+ returnKeyType: 'value',
130
+ autocorrect: 'boolean',
131
+ autocapitalizationType: 'value',
132
+ onTextChange: 'value',
133
+ onReturnPress: 'value',
134
+ },
135
+ textview: {
136
+ ...common,
137
+ text: 'value',
138
+ hint: 'value',
139
+ editable: 'boolean',
140
+ maxLength: 'number',
141
+ autocorrect: 'boolean',
142
+ autoGrow: 'boolean',
143
+ maxRows: 'number',
144
+ rows: 'number',
145
+ onTextChange: 'value',
146
+ },
147
+ searchbar: {
148
+ ...common,
149
+ text: 'value',
150
+ hint: 'value',
151
+ onTextChange: 'value',
152
+ },
153
+ button: {
154
+ ...common,
155
+ text: 'value',
156
+ formattedText: 'value',
157
+ isEnabled: 'boolean',
158
+ textWrap: 'boolean',
159
+ },
160
+ switch: {
161
+ ...common,
162
+ checked: 'boolean',
163
+ isEnabled: 'boolean',
164
+ onCheckedChange: 'boolean',
165
+ },
166
+ slider: {
167
+ ...common,
168
+ value: 'number',
169
+ minValue: 'number',
170
+ maxValue: 'number',
171
+ isEnabled: 'boolean',
172
+ onValueChange: 'number',
173
+ },
174
+ progress: {
175
+ ...common,
176
+ value: 'number',
177
+ maxValue: 'number',
178
+ },
179
+ activityindicator: {
180
+ ...common,
181
+ busy: 'boolean',
182
+ },
183
+ listpicker: {
184
+ ...common,
185
+ items: 'value',
186
+ selectedIndex: 'number',
187
+ onSelectedIndexChange: 'value',
188
+ },
189
+ segmentedbar: {
190
+ ...common,
191
+ items: 'value',
192
+ selectedIndex: 'number',
193
+ onSelectedIndexChange: 'value',
194
+ },
195
+ segmentedbaritem: {
196
+ ...common,
197
+ title: 'value',
198
+ },
199
+ datepicker: {
200
+ ...common,
201
+ date: 'value',
202
+ minDate: 'value',
203
+ maxDate: 'value',
204
+ day: 'number',
205
+ month: 'number',
206
+ year: 'number',
207
+ onDateChange: 'value',
208
+ },
209
+ timepicker: {
210
+ ...common,
211
+ time: 'value',
212
+ hour: 'number',
213
+ minute: 'number',
214
+ minHour: 'number',
215
+ maxHour: 'number',
216
+ minMinute: 'number',
217
+ maxMinute: 'number',
218
+ onTimeChange: 'value',
219
+ },
220
+ listview: {
221
+ ...common,
222
+ items: 'value',
223
+ itemTemplate: 'value',
224
+ itemTemplates: 'value',
225
+ renderItem: 'number',
226
+ separatorColor: 'value',
227
+ onItemLoading: 'value',
228
+ onItemTap: 'value',
229
+ onLoadMoreItems: 'value',
230
+ },
231
+ tabview: {
232
+ ...common,
233
+ items: 'value',
234
+ selectedIndex: 'number',
235
+ onSelectedIndexChange: 'value',
236
+ onSelectedIndexChanged: 'value',
237
+ },
238
+ tabviewitem: {
239
+ ...common,
240
+ title: 'value',
241
+ iconSource: 'value',
242
+ },
243
+ page: {
244
+ ...common,
245
+ actionBarHidden: 'boolean',
246
+ enableSwipeBackNavigation: 'boolean',
247
+ statusBarStyle: 'value',
248
+ backgroundSpanUnderStatusBar: 'boolean',
249
+ onNavigatedTo: 'value',
250
+ onNavigatedFrom: 'value',
251
+ onNavigatingTo: 'value',
252
+ },
253
+ frame: {
254
+ ...common,
255
+ actionBarVisibility: 'value',
256
+ },
257
+ actionbar: {
258
+ ...common,
259
+ title: 'value',
260
+ titleView: 'value',
261
+ flat: 'boolean',
262
+ },
263
+ actionitem: {
264
+ ...common,
265
+ text: 'value',
266
+ icon: 'value',
267
+ },
268
+ navigationbutton: {
269
+ ...common,
270
+ text: 'value',
271
+ },
272
+ image: {
273
+ ...common,
274
+ src: 'value',
275
+ imageSource: 'value',
276
+ stretch: 'value',
277
+ loadMode: 'value',
278
+ tintColor: 'value',
279
+ },
280
+ webview: {
281
+ ...common,
282
+ src: 'value',
283
+ onLoadStarted: 'value',
284
+ onLoadFinished: 'value',
285
+ onLoadError: 'value',
286
+ },
287
+ scrollview: {
288
+ ...common,
289
+ orientation: 'value',
290
+ scrollBarIndicatorVisible: 'boolean',
291
+ isScrollEnabled: 'boolean',
292
+ onScroll: 'value',
293
+ },
294
+ placeholder: {
295
+ ...common,
296
+ onCreatingView: 'value',
297
+ },
298
+ liquidglass: { ...common },
299
+ '#text': {
300
+ ...common,
301
+ value: 'value',
302
+ },
303
+ cachedimage: {
304
+ ...common,
305
+ src: 'value',
306
+ stretch: 'value',
307
+ placeholderImageUri: 'value',
308
+ failureImageUri: 'value',
309
+ lowerResSrc: 'value',
310
+ backgroundUri: 'value',
311
+ headers: 'value',
312
+ fadeDuration: 'number',
313
+ alwaysFade: 'boolean',
314
+ progressiveRenderingEnabled: 'boolean',
315
+ localThumbnailPreviewsEnabled: 'boolean',
316
+ showProgressBar: 'boolean',
317
+ progressBarColor: 'value',
318
+ roundAsCircle: 'boolean',
319
+ roundTopLeftRadius: 'value',
320
+ roundTopRightRadius: 'value',
321
+ roundBottomLeftRadius: 'value',
322
+ roundBottomRightRadius: 'value',
323
+ blurRadius: 'number',
324
+ blurDownSampling: 'number',
325
+ imageRotation: 'number',
326
+ autoPlayAnimations: 'boolean',
327
+ tapToRetryEnabled: 'boolean',
328
+ aspectRatio: 'number',
329
+ decodeWidth: 'number',
330
+ decodeHeight: 'number',
331
+ animatedImageView: 'boolean',
332
+ loadMode: 'value',
333
+ noCache: 'boolean',
334
+ noRatioEnforce: 'boolean',
335
+ tintColor: 'value',
336
+ },
337
+ svgview: {
338
+ ...common,
339
+ src: 'value',
340
+ stretch: 'value',
341
+ },
342
+ xplatvideo: {
343
+ ...common,
344
+ src: 'value',
345
+ autoplay: 'boolean',
346
+ controls: 'boolean',
347
+ loop: 'boolean',
348
+ muted: 'boolean',
349
+ fill: 'value',
350
+ headers: 'value',
351
+ observeCurrentTime: 'boolean',
352
+ onFinished: 'value',
353
+ onPlaybackReady: 'value',
354
+ onPlaybackStart: 'value',
355
+ onCurrentTimeUpdated: 'number',
356
+ onError: 'value',
357
+ },
358
+ nscanvas: {
359
+ ...common,
360
+ width: 'value',
361
+ height: 'value',
362
+ onReady: 'value',
363
+ },
364
+ xplatlottie: {
365
+ ...common,
366
+ src: 'value',
367
+ autoPlay: 'boolean',
368
+ loop: 'boolean',
369
+ progress: 'number',
370
+ speed: 'number',
371
+ },
372
+ pager: {
373
+ ...common,
374
+ items: 'value',
375
+ renderItem: 'number',
376
+ selectedIndex: 'number',
377
+ onItemLoading: 'value',
378
+ onItemDisposing: 'value',
379
+ onSelectedIndexChange: 'value',
380
+ },
381
+ animatedimage: {
382
+ ...common,
383
+ src: 'value',
384
+ stretch: 'value',
385
+ width: 'value',
386
+ height: 'value',
387
+ animatedImageView: 'boolean',
388
+ autoPlayAnimations: 'boolean',
389
+ },
390
+ applesigninbutton: {
391
+ ...common,
392
+ type: 'value',
393
+ buttonStyle: 'value',
394
+ isEnabled: 'boolean',
395
+ },
396
+ googlesigninbutton: {
397
+ ...common,
398
+ colorScheme: 'value',
399
+ colorStyle: 'value',
400
+ isEnabled: 'boolean',
401
+ },
402
+ }
@@ -0,0 +1,19 @@
1
+ Copyright OpenJS Foundation and other contributors, https://openjsf.org
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1 @@
1
+ NativeScript core 9.1.3 MIT binding option and expression helpers. Sources: `packages/core/ui/builder/binding-builder.ts` and `packages/core/ui/core/bindable/bindable-expressions.ts` at tag 9.1.3. Local changes: replace utility imports, use globalThis, avoid inherited cache keys, and replace the bindingConstants namespace with an object, and normalize three upstream indentation lines. This is bind/rebind evaluation, without NativeScript observable subscription or two-way writeback.
@@ -0,0 +1,189 @@
1
+ // @ts-nocheck — pinned NativeScript 9.1.3 implementation, retained for binding semantics.
2
+ // Copyright OpenJS Foundation and contributors. MIT; see LICENSE.
3
+ // regex that contains all symbols applicable for expression used to AI detect an expression.
4
+ const expressionSymbolsRegex = /[\+\-\*\/%\?:<>=!\|&\(\)^~]|^`.*\$\{.+\}.*`$/;
5
+
6
+ const bindingConstants = {
7
+ sourceProperty: 'sourceProperty', targetProperty: 'targetProperty', expression: 'expression',
8
+ twoWay: 'twoWay', source: 'source', bindingValueKey: '$value',
9
+ };
10
+
11
+ const hasEqualSignRegex = /=+/;
12
+ const equalSignComparisionOperatorsRegex = /(==|===|>=|<=|!=|!==)/;
13
+
14
+ // this regex is used to search for all instaces of '$parents[]' within an expression
15
+ export const parentsRegex = /\$parents\s*\[\s*(['"]*)\w*\1\s*\]/g;
16
+
17
+ function isNamedParam(value) {
18
+ const equalSignIndex = value.search(hasEqualSignRegex);
19
+ if (equalSignIndex > -1) {
20
+ const equalSignSurround = value.substr(equalSignIndex > 0 ? equalSignIndex - 1 : 0, 3);
21
+ if (equalSignSurround.search(equalSignComparisionOperatorsRegex) === -1) {
22
+ return true;
23
+ }
24
+ }
25
+
26
+ return false;
27
+ }
28
+
29
+ function areNamedParams(params: Array<any>) {
30
+ for (let i = 0; i < params.length; i++) {
31
+ if (isNamedParam(params[i])) {
32
+ return true;
33
+ }
34
+ }
35
+
36
+ return false;
37
+ }
38
+
39
+ const namedParamConstants = {
40
+ propName: 'propName',
41
+ propValue: 'propValue',
42
+ };
43
+
44
+ function getPropertyNameValuePair(param, knownOptions, callback) {
45
+ let nameValuePair = {};
46
+ let propertyName = param.substr(0, param.indexOf('=')).trim();
47
+ const propertyValue = param.substr(param.indexOf('=') + 1).trim();
48
+ if (knownOptions) {
49
+ if (!propertyName) {
50
+ propertyName = knownOptions.defaultProperty;
51
+ } else {
52
+ propertyName = propertyName in knownOptions ? propertyName : null;
53
+ }
54
+ }
55
+
56
+ if (propertyName) {
57
+ if (callback) {
58
+ nameValuePair = callback(propertyName, propertyValue);
59
+ } else {
60
+ nameValuePair[namedParamConstants.propName] = propertyName;
61
+ nameValuePair[namedParamConstants.propValue] = propertyValue;
62
+ }
63
+
64
+ return nameValuePair;
65
+ }
66
+
67
+ return null;
68
+ }
69
+
70
+ function parseNamedProperties(parameterList, knownOptions, callback) {
71
+ const result = {};
72
+ let nameValuePair;
73
+ for (let i = 0; i < parameterList.length; i++) {
74
+ nameValuePair = getPropertyNameValuePair(parameterList[i], knownOptions, callback);
75
+ if (nameValuePair) {
76
+ result[nameValuePair[namedParamConstants.propName]] = nameValuePair[namedParamConstants.propValue];
77
+ }
78
+ }
79
+
80
+ return result;
81
+ }
82
+
83
+ function getParamsArray(value: string) {
84
+ const result = [];
85
+ let skipComma = 0;
86
+ let indexReached = 0;
87
+ let singleQuoteBlock = false;
88
+ let doubleQuoteBlock = false;
89
+
90
+ for (let i = 0; i < value.length; i++) {
91
+ if (value[i] === '"') {
92
+ doubleQuoteBlock = !doubleQuoteBlock;
93
+ }
94
+
95
+ if (value[i] === "'") {
96
+ singleQuoteBlock = !singleQuoteBlock;
97
+ }
98
+
99
+ if (value[i] === '(' || value[i] === '[') {
100
+ skipComma++;
101
+ }
102
+
103
+ if (value[i] === ')' || value[i] === ']') {
104
+ skipComma--;
105
+ }
106
+
107
+ if (value[i] === ',' && skipComma === 0 && !(singleQuoteBlock || doubleQuoteBlock)) {
108
+ result.push(value.substr(indexReached, i - indexReached));
109
+ indexReached = i + 1;
110
+ }
111
+ }
112
+
113
+ result.push(value.substr(indexReached));
114
+
115
+ return result;
116
+ }
117
+
118
+ function isExpression(expression: string): boolean {
119
+ return expression.search(expressionSymbolsRegex) > -1;
120
+ }
121
+
122
+ export function getBindingOptions(name: string, value: string): any {
123
+ let namedParams = [];
124
+ const params = getParamsArray(value);
125
+ if (!areNamedParams(params)) {
126
+ if (params.length === 1) {
127
+ const trimmedValue = params[0].trim();
128
+ let sourceProp;
129
+ if (isExpression(trimmedValue)) {
130
+ sourceProp = bindingConstants.bindingValueKey;
131
+ namedParams.push(bindingConstants.expression + ' = ' + trimmedValue);
132
+ } else {
133
+ sourceProp = trimmedValue;
134
+ }
135
+ namedParams.push(bindingConstants.sourceProperty + ' = ' + sourceProp);
136
+
137
+ namedParams.push(bindingConstants.twoWay + ' = true');
138
+ } else {
139
+ namedParams.push(bindingConstants.sourceProperty + ' = ' + params[0].trim());
140
+ namedParams.push(bindingConstants.expression + ' = ' + params[1].trim());
141
+ const twoWay = params[2] ? params[2].toLowerCase().trim() === 'true' : true;
142
+ namedParams.push(bindingConstants.twoWay + ' = ' + twoWay);
143
+ }
144
+ } else {
145
+ namedParams = params;
146
+ }
147
+
148
+ const bindingPropertyHandler = function (prop, value) {
149
+ const result = {};
150
+ result[namedParamConstants.propName] = prop;
151
+ if (prop === bindingConstants.twoWay) {
152
+ // create a real boolean value
153
+ if (value === 'true') {
154
+ result[namedParamConstants.propValue] = true;
155
+ } else {
156
+ result[namedParamConstants.propValue] = false;
157
+ }
158
+ } else {
159
+ result[namedParamConstants.propValue] = value;
160
+ }
161
+
162
+ return result;
163
+ };
164
+
165
+ const bindingOptionsParameters = parseNamedProperties(namedParams, xmlBindingProperties, bindingPropertyHandler);
166
+ const bindOptions = {
167
+ targetProperty: name,
168
+ };
169
+
170
+ for (const prop in bindingOptionsParameters) {
171
+ if (bindingOptionsParameters.hasOwnProperty(prop)) {
172
+ bindOptions[prop] = bindingOptionsParameters[prop];
173
+ }
174
+ }
175
+
176
+ if (bindOptions[bindingConstants.twoWay] === undefined) {
177
+ bindOptions[bindingConstants.twoWay] = true;
178
+ }
179
+
180
+ return bindOptions;
181
+ }
182
+
183
+ const xmlBindingProperties = {
184
+ sourceProperty: true,
185
+ expression: true,
186
+ twoWay: true,
187
+ source: true,
188
+ defaultProperty: bindingConstants.sourceProperty,
189
+ };