@triniwiz/nativescript-masonkit 1.0.0-alpha.9 → 1.0.0-beta.1

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 (397) hide show
  1. package/button/index.android.d.ts +13 -0
  2. package/button/index.android.js +56 -0
  3. package/button/index.android.js.map +1 -0
  4. package/button/index.ios.d.ts +21 -0
  5. package/button/index.ios.js +216 -0
  6. package/button/index.ios.js.map +1 -0
  7. package/common.d.ts +78 -33
  8. package/common.js +1137 -251
  9. package/common.js.map +1 -1
  10. package/img/index.android.d.ts +10 -0
  11. package/img/index.android.js +40 -0
  12. package/img/index.android.js.map +1 -0
  13. package/img/index.ios.d.ts +13 -0
  14. package/img/index.ios.js +102 -0
  15. package/img/index.ios.js.map +1 -0
  16. package/index.android.d.ts +6 -34
  17. package/index.android.js +6 -139
  18. package/index.android.js.map +1 -1
  19. package/index.d.ts +88 -60
  20. package/index.ios.d.ts +6 -48
  21. package/index.ios.js +6 -355
  22. package/index.ios.js.map +1 -1
  23. package/package.json +5 -2
  24. package/platforms/android/include.gradle +5 -1
  25. package/platforms/android/masonkit-release.aar +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +794 -284
  27. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +0 -5
  28. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
  29. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +118 -93
  30. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  32. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +52485 -22807
  34. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +1234 -255
  35. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +1234 -255
  37. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4252 -1932
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1588 -568
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +0 -5
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +118 -93
  43. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  44. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  45. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  46. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  47. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +52485 -22807
  48. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1211 -232
  49. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  50. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1211 -232
  51. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +52485 -22807
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1211 -232
  53. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  54. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1211 -232
  55. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +31 -31
  56. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  57. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4246 -1932
  58. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4124 -1883
  59. package/scroll/index.android.d.ts +12 -0
  60. package/scroll/index.android.js +50 -0
  61. package/scroll/index.android.js.map +1 -0
  62. package/scroll/index.ios.d.ts +14 -0
  63. package/scroll/index.ios.js +120 -0
  64. package/scroll/index.ios.js.map +1 -0
  65. package/style.d.ts +112 -53
  66. package/style.js +1199 -110
  67. package/style.js.map +1 -1
  68. package/text/index.android.d.ts +30 -0
  69. package/text/index.android.js +124 -0
  70. package/text/index.android.js.map +1 -0
  71. package/text/index.ios.d.ts +38 -0
  72. package/text/index.ios.js +251 -0
  73. package/text/index.ios.js.map +1 -0
  74. package/tree/index.android.d.ts +28 -0
  75. package/tree/index.android.js +77 -0
  76. package/tree/index.android.js.map +1 -0
  77. package/tree/index.ios.d.ts +29 -0
  78. package/tree/index.ios.js +76 -0
  79. package/tree/index.ios.js.map +1 -0
  80. package/utils/index.android.d.ts +187 -0
  81. package/utils/index.android.js +514 -0
  82. package/utils/index.android.js.map +1 -0
  83. package/utils/index.ios.d.ts +198 -0
  84. package/utils/index.ios.js +710 -0
  85. package/utils/index.ios.js.map +1 -0
  86. package/view/index.android.d.ts +12 -0
  87. package/view/index.android.js +50 -0
  88. package/view/index.android.js.map +1 -0
  89. package/view/index.ios.d.ts +16 -0
  90. package/view/index.ios.js +124 -0
  91. package/view/index.ios.js.map +1 -0
  92. package/web.d.ts +55 -0
  93. package/web.js +189 -0
  94. package/web.js.map +1 -0
  95. package/helpers.d.ts +0 -255
  96. package/helpers.js +0 -1318
  97. package/helpers.js.map +0 -1
  98. package/node.d.ts +0 -2
  99. package/node.js +0 -3
  100. package/node.js.map +0 -1
  101. package/platforms/ios/Podfile +0 -1
  102. package/platforms/ios/build.xcconfig +0 -5
  103. package/platforms/ios/prebuild.sh +0 -101
  104. package/platforms/new_native_src/cpp/Caches.cpp +0 -36
  105. package/platforms/new_native_src/cpp/Caches.h +0 -42
  106. package/platforms/new_native_src/cpp/Common.h +0 -34
  107. package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
  108. package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
  109. package/platforms/new_native_src/cpp/Helpers.h +0 -364
  110. package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
  111. package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
  112. package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
  113. package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
  114. package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
  115. package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
  116. package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
  117. package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
  118. package/src-native/pods/Headers/include/APIDesign.md +0 -72
  119. package/src-native/pods/Headers/include/DEPS +0 -10
  120. package/src-native/pods/Headers/include/DIR_METADATA +0 -11
  121. package/src-native/pods/Headers/include/OWNERS +0 -23
  122. package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
  123. package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
  124. package/src-native/pods/Headers/include/cppgc/README.md +0 -133
  125. package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
  126. package/src-native/pods/Headers/include/cppgc/common.h +0 -29
  127. package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
  128. package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
  129. package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
  130. package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
  131. package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
  132. package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
  133. package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
  134. package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
  135. package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
  136. package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
  137. package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
  138. package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
  139. package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
  140. package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
  141. package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
  142. package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
  143. package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
  144. package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
  145. package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
  146. package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
  147. package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
  148. package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
  149. package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
  150. package/src-native/pods/Headers/include/cppgc/member.h +0 -291
  151. package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
  152. package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
  153. package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
  154. package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
  155. package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
  156. package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
  157. package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
  158. package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
  159. package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
  160. package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
  161. package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
  162. package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
  163. package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
  164. package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
  165. package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
  166. package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
  167. package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
  168. package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
  169. package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
  170. package/src-native/pods/Headers/include/libffi.h +0 -12
  171. package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
  172. package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
  173. package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
  174. package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
  175. package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
  176. package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
  177. package/src-native/pods/Headers/include/v8-container.h +0 -129
  178. package/src-native/pods/Headers/include/v8-context.h +0 -407
  179. package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
  180. package/src-native/pods/Headers/include/v8-data.h +0 -80
  181. package/src-native/pods/Headers/include/v8-date.h +0 -43
  182. package/src-native/pods/Headers/include/v8-debug.h +0 -168
  183. package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
  184. package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
  185. package/src-native/pods/Headers/include/v8-exception.h +0 -217
  186. package/src-native/pods/Headers/include/v8-extension.h +0 -62
  187. package/src-native/pods/Headers/include/v8-external.h +0 -37
  188. package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
  189. package/src-native/pods/Headers/include/v8-forward.h +0 -81
  190. package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
  191. package/src-native/pods/Headers/include/v8-function.h +0 -125
  192. package/src-native/pods/Headers/include/v8-initialization.h +0 -315
  193. package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
  194. package/src-native/pods/Headers/include/v8-inspector.h +0 -376
  195. package/src-native/pods/Headers/include/v8-internal.h +0 -661
  196. package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
  197. package/src-native/pods/Headers/include/v8-json.h +0 -47
  198. package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
  199. package/src-native/pods/Headers/include/v8-locker.h +0 -149
  200. package/src-native/pods/Headers/include/v8-maybe.h +0 -137
  201. package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
  202. package/src-native/pods/Headers/include/v8-message.h +0 -216
  203. package/src-native/pods/Headers/include/v8-metrics.h +0 -255
  204. package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
  205. package/src-native/pods/Headers/include/v8-microtask.h +0 -28
  206. package/src-native/pods/Headers/include/v8-object.h +0 -775
  207. package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
  208. package/src-native/pods/Headers/include/v8-platform.h +0 -1092
  209. package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
  210. package/src-native/pods/Headers/include/v8-primitive.h +0 -866
  211. package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
  212. package/src-native/pods/Headers/include/v8-promise.h +0 -174
  213. package/src-native/pods/Headers/include/v8-proxy.h +0 -50
  214. package/src-native/pods/Headers/include/v8-regexp.h +0 -105
  215. package/src-native/pods/Headers/include/v8-script.h +0 -748
  216. package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
  217. package/src-native/pods/Headers/include/v8-statistics.h +0 -217
  218. package/src-native/pods/Headers/include/v8-template.h +0 -1079
  219. package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
  220. package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
  221. package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
  222. package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
  223. package/src-native/pods/Headers/include/v8-util.h +0 -658
  224. package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
  225. package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
  226. package/src-native/pods/Headers/include/v8-value.h +0 -526
  227. package/src-native/pods/Headers/include/v8-version-string.h +0 -38
  228. package/src-native/pods/Headers/include/v8-version.h +0 -20
  229. package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
  230. package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
  231. package/src-native/pods/Headers/include/v8-wasm.h +0 -257
  232. package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
  233. package/src-native/pods/Headers/include/v8.h +0 -88
  234. package/src-native/pods/Headers/include/v8config.h +0 -605
  235. package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
  236. package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
  237. package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
  238. package/src-native/pods/Headers/inspector/base64.h +0 -9
  239. package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
  240. package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
  241. package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
  242. package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
  243. package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
  244. package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
  245. package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
  246. package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
  247. package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
  248. package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
  249. package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
  250. package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
  251. package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
  252. package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
  253. package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
  254. package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
  255. package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
  256. package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
  257. package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
  258. package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
  259. package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
  260. package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
  261. package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
  262. package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
  263. package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
  264. package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
  265. package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
  266. package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
  267. package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
  268. package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
  269. package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
  270. package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
  271. package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
  272. package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
  273. package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
  274. package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
  275. package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
  276. package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
  277. package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
  278. package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
  279. package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
  280. package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
  281. package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
  282. package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
  283. package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
  284. package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
  285. package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
  286. package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
  287. package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
  288. package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
  289. package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
  290. package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
  291. package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
  292. package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
  293. package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
  294. package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
  295. package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
  296. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
  297. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
  298. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
  299. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
  300. package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
  301. package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
  302. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
  303. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
  304. package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
  305. package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
  306. package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
  307. package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
  308. package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
  309. package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
  310. package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
  311. package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
  312. package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
  313. package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
  314. package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
  315. package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
  316. package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
  317. package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
  318. package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
  319. package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
  320. package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
  321. package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
  322. package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
  323. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
  324. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
  325. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
  326. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
  327. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
  328. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
  329. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
  330. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
  331. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
  332. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
  333. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
  334. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
  335. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
  336. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
  337. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
  338. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
  339. package/src-native/pods/Headers/inspector/utils.h +0 -32
  340. package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
  341. package/src-native/pods/Headers/jsi/decorator.h +0 -762
  342. package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
  343. package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
  344. package/src-native/pods/Headers/jsi/jsi.h +0 -1387
  345. package/src-native/pods/Headers/jsi/jsilib.h +0 -59
  346. package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
  347. package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
  348. package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
  349. package/src-native/pods/Headers/runtime/Caches.h +0 -98
  350. package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
  351. package/src-native/pods/Headers/runtime/Common.h +0 -9
  352. package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
  353. package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
  354. package/src-native/pods/Headers/runtime/Console.h +0 -27
  355. package/src-native/pods/Headers/runtime/Constants.h +0 -15
  356. package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
  357. package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
  358. package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
  359. package/src-native/pods/Headers/runtime/FFICall.h +0 -105
  360. package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
  361. package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
  362. package/src-native/pods/Headers/runtime/Helpers.h +0 -84
  363. package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
  364. package/src-native/pods/Headers/runtime/Interop.h +0 -202
  365. package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
  366. package/src-native/pods/Headers/runtime/Metadata.h +0 -981
  367. package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
  368. package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
  369. package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
  370. package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
  371. package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
  372. package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
  373. package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
  374. package/src-native/pods/Headers/runtime/Pointer.h +0 -26
  375. package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
  376. package/src-native/pods/Headers/runtime/Reference.h +0 -38
  377. package/src-native/pods/Headers/runtime/Runtime.h +0 -67
  378. package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
  379. package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
  380. package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
  381. package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
  382. package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
  383. package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
  384. package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
  385. package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
  386. package/src-native/pods/Headers/runtime/Tasks.h +0 -19
  387. package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
  388. package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
  389. package/src-native/pods/Headers/runtime/Worker.h +0 -26
  390. package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
  391. package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
  392. package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
  393. package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  394. package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
  395. package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  396. package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  397. package/src-native/pods/NativeScript.podspec +0 -68
package/common.js CHANGED
@@ -1,10 +1,37 @@
1
+ var _a, _b, _c;
1
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
3
  /* eslint-disable @typescript-eslint/ban-ts-comment */
3
- import { CSSType, CssProperty, CustomLayoutView, Length as NSLength, ShorthandProperty, Style, View as NSView, getViewById, unsetValue, Property, widthProperty, heightProperty, CoreTypes, Trace, Length as CoreLength, marginLeftProperty, marginRightProperty, marginTopProperty, marginBottomProperty, minWidthProperty, minHeightProperty } from '@nativescript/core';
4
- import { _forceStyleUpdate, _parseGridTemplates, _setAlignContent, _setColumnGap, _setDisplay, _setFlexDirection, _setGridColumnEnd, _setGridColumnStart, _setGridRowEnd, _setGridRowStart, _setGridTemplateColumns, _setGridTemplateRows, _setHeight, _setJustifyContent, _setMarginBottom, _setMarginLeft, _setMarginRight, _setMarginTop, _setMinHeight, _setMinWidth, _setPaddingBottom, _setPaddingLeft, _setPaddingRight, _setPaddingTop, _setRowGap, _setWidth } from './helpers';
4
+ import { CssProperty, CustomLayoutView, Length as NSLength, ShorthandProperty, Style, View as NSView, getViewById, unsetValue, Property, widthProperty, heightProperty, CoreTypes, Trace, Length as CoreLength, PercentLength as CorePercentLength, marginLeftProperty, marginRightProperty, marginTopProperty, marginBottomProperty, minWidthProperty, minHeightProperty, fontSizeProperty, fontWeightProperty, fontStyleProperty, colorProperty, Color, lineHeightProperty, letterSpacingProperty, textAlignmentProperty, borderLeftWidthProperty, borderTopWidthProperty, borderRightWidthProperty, borderBottomWidthProperty } from '@nativescript/core';
5
5
  import { flexDirectionProperty, flexGrowProperty, flexWrapProperty } from '@nativescript/core/ui/layouts/flexbox-layout';
6
+ import { _forceStyleUpdate } from './utils';
6
7
  export const native_ = Symbol('[[native]]');
7
8
  export const style_ = Symbol('[[style]]');
9
+ export const isTextChild_ = Symbol('[[isTextChild]]');
10
+ export const isText_ = Symbol('[[isText]]');
11
+ export const isMasonView_ = Symbol('[[isMasonView]]');
12
+ export const text_ = Symbol('[[text]]');
13
+ function getViewStyle(view) {
14
+ const ret = (__ANDROID__ ? view.get() : view.deref());
15
+ return ret._styleHelper;
16
+ }
17
+ var FrameWork;
18
+ (function (FrameWork) {
19
+ FrameWork[FrameWork["Core"] = 0] = "Core";
20
+ FrameWork[FrameWork["Angular"] = 1] = "Angular";
21
+ FrameWork[FrameWork["Vue"] = 2] = "Vue";
22
+ FrameWork[FrameWork["React"] = 3] = "React";
23
+ FrameWork[FrameWork["Svelte"] = 4] = "Svelte";
24
+ FrameWork[FrameWork["Solid"] = 5] = "Solid";
25
+ })(FrameWork || (FrameWork = {}));
26
+ let frameWork = FrameWork.Core;
27
+ try {
28
+ global.VUE3_ELEMENT_REF = require('nativescript-vue').ELEMENT_REF;
29
+ frameWork = FrameWork.Vue;
30
+ }
31
+ catch (e) { }
32
+ if (global.__ngRegisteredViews || typeof Zone !== 'undefined') {
33
+ frameWork = FrameWork.Angular;
34
+ }
8
35
  export const scrollBarWidthProperty = new CssProperty({
9
36
  name: 'scrollBarWidth',
10
37
  cssName: 'scroll-bar-width',
@@ -17,37 +44,122 @@ function overflowConverter(value) {
17
44
  case 0:
18
45
  return 'visible';
19
46
  case 1:
20
- return 'hidden';
47
+ return 'clip';
21
48
  case 2:
49
+ return 'hidden';
50
+ case 3:
22
51
  return 'scroll';
23
52
  }
24
53
  }
25
54
  switch (value) {
26
55
  case 'visible':
27
56
  case 'hidden':
57
+ case 'clip':
28
58
  case 'scroll':
29
59
  return value;
30
60
  default:
31
- return 'visible';
61
+ return undefined;
32
62
  }
33
63
  }
34
- export const overflowProperty = new CssProperty({
64
+ function masonLengthParse(value) {
65
+ try {
66
+ return CoreLength.parse(value);
67
+ }
68
+ catch (e) {
69
+ return undefined;
70
+ }
71
+ }
72
+ function masonLengthPercentParse(value) {
73
+ try {
74
+ return CorePercentLength.parse(value);
75
+ }
76
+ catch (e) {
77
+ return undefined;
78
+ }
79
+ }
80
+ const filterProperty = new CssProperty({
81
+ name: 'filter',
82
+ cssName: 'filter',
83
+ });
84
+ filterProperty.register(Style);
85
+ const borderProperty = new CssProperty({
86
+ name: 'border',
87
+ cssName: 'border',
88
+ });
89
+ borderProperty.register(Style);
90
+ const backgroundProperty = new CssProperty({
91
+ name: 'background',
92
+ cssName: 'background',
93
+ });
94
+ backgroundProperty.register(Style);
95
+ const overFlow = /^\s*(visible|hidden|clip|scroll|auto)(?:\s+(visible|hidden|clip|scroll|auto))?\s*$/;
96
+ export const overflowProperty = new ShorthandProperty({
35
97
  name: 'overflow',
36
98
  cssName: 'overflow',
37
- defaultValue: 'visible',
38
- valueConverter: overflowConverter,
99
+ getter: function () {
100
+ if (this.overflowX === this.overflowY) {
101
+ return this.overflowX;
102
+ }
103
+ return `${this.overflowX} ${this.overflowY}`;
104
+ },
105
+ converter(value) {
106
+ const properties = [];
107
+ if (typeof value === 'string') {
108
+ const values = value.match(overFlow);
109
+ const length = values?.length ?? 0;
110
+ if (length === 0) {
111
+ return properties;
112
+ }
113
+ if (length === 1) {
114
+ const xy = values[0];
115
+ properties.push([overflowXProperty, xy]);
116
+ properties.push([overflowYProperty, xy]);
117
+ }
118
+ if (length > 1) {
119
+ const x = values[0];
120
+ const y = values[1];
121
+ properties.push([overflowXProperty, x]);
122
+ properties.push([overflowYProperty, y]);
123
+ }
124
+ }
125
+ return properties;
126
+ },
39
127
  });
40
128
  export const overflowXProperty = new CssProperty({
41
129
  name: 'overflowX',
42
130
  cssName: 'overflow-x',
43
131
  defaultValue: 'visible',
44
132
  valueConverter: overflowConverter,
133
+ valueChanged: (target, oldValue, newValue) => {
134
+ const view = getViewStyle(target.viewRef);
135
+ if (view) {
136
+ if (newValue) {
137
+ view.overflowX = newValue;
138
+ }
139
+ else {
140
+ // Revert to old value if newValue is invalid
141
+ view.view.style.overflowX = oldValue;
142
+ }
143
+ }
144
+ },
45
145
  });
46
146
  export const overflowYProperty = new CssProperty({
47
- name: 'overflow',
147
+ name: 'overflowY',
48
148
  cssName: 'overflow-y',
49
149
  defaultValue: 'visible',
50
150
  valueConverter: overflowConverter,
151
+ valueChanged(target, oldValue, newValue) {
152
+ const view = getViewStyle(target.viewRef);
153
+ if (view) {
154
+ if (newValue) {
155
+ view.overflowY = newValue;
156
+ }
157
+ else {
158
+ // Revert to old value if newValue is invalid
159
+ view.view.style.overflowY = oldValue;
160
+ }
161
+ }
162
+ },
51
163
  });
52
164
  const paddingProperty = new ShorthandProperty({
53
165
  name: 'padding',
@@ -67,15 +179,15 @@ export const paddingLeftProperty = new CssProperty({
67
179
  affectsLayout: global.isIOS,
68
180
  equalityComparer: CoreLength.equals,
69
181
  valueChanged: (target, oldValue, newValue) => {
70
- const view = target.viewRef.get();
182
+ const view = getViewStyle(target.viewRef);
71
183
  if (view) {
72
- view.effectivePaddingLeft = CoreLength.toDevicePixels(newValue, 0);
184
+ view.paddingLeft = CoreLength.toDevicePixels(newValue, 0);
73
185
  }
74
186
  else {
75
187
  Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
76
188
  }
77
189
  },
78
- valueConverter: CoreLength.parse,
190
+ valueConverter: masonLengthParse,
79
191
  });
80
192
  export const paddingRightProperty = new CssProperty({
81
193
  name: 'paddingRight',
@@ -84,15 +196,15 @@ export const paddingRightProperty = new CssProperty({
84
196
  affectsLayout: global.isIOS,
85
197
  equalityComparer: CoreLength.equals,
86
198
  valueChanged: (target, oldValue, newValue) => {
87
- const view = target.viewRef.get();
199
+ const view = getViewStyle(target.viewRef);
88
200
  if (view) {
89
- view.effectivePaddingRight = CoreLength.toDevicePixels(newValue, 0);
201
+ view.paddingRight = CoreLength.toDevicePixels(newValue, 0);
90
202
  }
91
203
  else {
92
204
  Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
93
205
  }
94
206
  },
95
- valueConverter: CoreLength.parse,
207
+ valueConverter: masonLengthParse,
96
208
  });
97
209
  export const paddingTopProperty = new CssProperty({
98
210
  name: 'paddingTop',
@@ -101,15 +213,15 @@ export const paddingTopProperty = new CssProperty({
101
213
  affectsLayout: global.isIOS,
102
214
  equalityComparer: CoreLength.equals,
103
215
  valueChanged: (target, oldValue, newValue) => {
104
- const view = target.viewRef.get();
216
+ const view = getViewStyle(target.viewRef);
105
217
  if (view) {
106
- view.effectivePaddingTop = CoreLength.toDevicePixels(newValue, 0);
218
+ view.paddingTop = CoreLength.toDevicePixels(newValue, 0);
107
219
  }
108
220
  else {
109
221
  Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
110
222
  }
111
223
  },
112
- valueConverter: CoreLength.parse,
224
+ valueConverter: masonLengthParse,
113
225
  });
114
226
  export const paddingBottomProperty = new CssProperty({
115
227
  name: 'paddingBottom',
@@ -118,15 +230,15 @@ export const paddingBottomProperty = new CssProperty({
118
230
  affectsLayout: global.isIOS,
119
231
  equalityComparer: CoreLength.equals,
120
232
  valueChanged: (target, oldValue, newValue) => {
121
- const view = target.viewRef.get();
233
+ const view = getViewStyle(target.viewRef);
122
234
  if (view) {
123
- view.effectivePaddingBottom = CoreLength.toDevicePixels(newValue, 0);
235
+ view.paddingBottom = CoreLength.toDevicePixels(newValue, 0);
124
236
  }
125
237
  else {
126
238
  Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
127
239
  }
128
240
  },
129
- valueConverter: CoreLength.parse,
241
+ valueConverter: masonLengthParse,
130
242
  });
131
243
  export const rowGapProperty = new CssProperty({
132
244
  name: 'rowGap',
@@ -139,6 +251,12 @@ export const rowGapProperty = new CssProperty({
139
251
  }
140
252
  return parsed;
141
253
  },
254
+ valueChanged(target, oldValue, newValue) {
255
+ const view = getViewStyle(target.viewRef);
256
+ if (view) {
257
+ view.rowGap = newValue;
258
+ }
259
+ },
142
260
  });
143
261
  export const columnGapProperty = new CssProperty({
144
262
  name: 'columnGap',
@@ -151,6 +269,48 @@ export const columnGapProperty = new CssProperty({
151
269
  }
152
270
  return parsed;
153
271
  },
272
+ valueChanged(target, oldValue, newValue) {
273
+ const view = getViewStyle(target.viewRef);
274
+ if (view) {
275
+ view.columnGap = newValue;
276
+ }
277
+ },
278
+ });
279
+ export const gridGapProperty = new ShorthandProperty({
280
+ name: 'gridGap',
281
+ cssName: 'grid-gap',
282
+ getter: function () {
283
+ if (this.rowGap === this.columnGap) {
284
+ return this.rowGap;
285
+ }
286
+ return `${this.rowGap} ${this.columnGap}`;
287
+ },
288
+ converter(gap) {
289
+ const properties = [];
290
+ let value = gap;
291
+ if (typeof value === 'number') {
292
+ value = `${value}`;
293
+ }
294
+ if (typeof value === 'string') {
295
+ const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
296
+ const length = values.length;
297
+ if (length === 0) {
298
+ return properties;
299
+ }
300
+ if (length === 1) {
301
+ const row = values[0];
302
+ properties.push([rowGapProperty, row]);
303
+ properties.push([columnGapProperty, row]);
304
+ }
305
+ if (length > 1) {
306
+ const row = values[0];
307
+ const column = values[1];
308
+ properties.push([rowGapProperty, row]);
309
+ properties.push([columnGapProperty, column]);
310
+ }
311
+ }
312
+ return properties;
313
+ },
154
314
  });
155
315
  export const gapProperty = new ShorthandProperty({
156
316
  name: 'gap',
@@ -161,8 +321,12 @@ export const gapProperty = new ShorthandProperty({
161
321
  }
162
322
  return `${this.rowGap} ${this.columnGap}`;
163
323
  },
164
- converter(value) {
324
+ converter(gap) {
165
325
  const properties = [];
326
+ let value = gap;
327
+ if (typeof value === 'number') {
328
+ value = `${value}`;
329
+ }
166
330
  if (typeof value === 'string') {
167
331
  const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
168
332
  const length = values.length;
@@ -200,7 +364,17 @@ export const displayProperty = new CssProperty({
200
364
  name: 'display',
201
365
  cssName: 'display',
202
366
  defaultValue: 'block',
203
- valueConverter(value) {
367
+ valueChanged: (target, oldValue, newValue) => {
368
+ const view = getViewStyle(target.viewRef);
369
+ if (view && newValue) {
370
+ view.display = newValue;
371
+ }
372
+ else {
373
+ // Revert to old value if newValue is invalid
374
+ view.view.style.display = oldValue;
375
+ }
376
+ },
377
+ valueConverter: function (value) {
204
378
  if (typeof value === 'number') {
205
379
  switch (value) {
206
380
  case 0:
@@ -211,6 +385,14 @@ export const displayProperty = new CssProperty({
211
385
  return 'grid';
212
386
  case 3:
213
387
  return 'block';
388
+ case 4:
389
+ return 'inline';
390
+ case 5:
391
+ return 'inline-block';
392
+ case 6:
393
+ return 'inline-flex';
394
+ case 7:
395
+ return 'inline-grid';
214
396
  }
215
397
  }
216
398
  switch (value) {
@@ -218,10 +400,13 @@ export const displayProperty = new CssProperty({
218
400
  case 'flex':
219
401
  case 'grid':
220
402
  case 'block':
403
+ case 'inline':
404
+ case 'inline-block':
405
+ case 'inline-flex':
406
+ case 'inline-grid':
221
407
  return value;
222
408
  default:
223
- // todo throw???
224
- return 'block';
409
+ return undefined;
225
410
  }
226
411
  },
227
412
  });
@@ -231,6 +416,16 @@ export const maxWidthProperty = new CssProperty({
231
416
  defaultValue: 'auto',
232
417
  // @ts-ignore
233
418
  equalityComparer: NSLength.equals,
419
+ valueConverter: masonLengthParse,
420
+ valueChanged: (target, oldValue, newValue) => {
421
+ const view = getViewStyle(target.viewRef);
422
+ if (view) {
423
+ view.maxWidth = newValue;
424
+ }
425
+ else {
426
+ Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
427
+ }
428
+ },
234
429
  });
235
430
  export const maxHeightProperty = new CssProperty({
236
431
  name: 'maxHeight',
@@ -238,11 +433,24 @@ export const maxHeightProperty = new CssProperty({
238
433
  defaultValue: 'auto',
239
434
  // @ts-ignore
240
435
  equalityComparer: NSLength.equals,
436
+ valueConverter: masonLengthParse,
437
+ valueChanged(target, oldValue, newValue) {
438
+ const view = getViewStyle(target.viewRef);
439
+ if (view) {
440
+ view.maxHeight = newValue;
441
+ }
442
+ },
241
443
  });
242
444
  export const positionProperty = new CssProperty({
243
445
  name: 'position',
244
446
  cssName: 'position',
245
447
  defaultValue: 'relative',
448
+ valueChanged(target, oldValue, newValue) {
449
+ const view = getViewStyle(target.viewRef);
450
+ if (view) {
451
+ view.position = newValue;
452
+ }
453
+ },
246
454
  });
247
455
  // export const flexDirectionProperty = new CssProperty<Style, FlexDirection>({
248
456
  // name: 'flexDirection',
@@ -253,12 +461,63 @@ export const positionProperty = new CssProperty({
253
461
  // cssName: 'flex-wrap',
254
462
  // defaultValue: 'no-wrap',
255
463
  // });
464
+ const insetProperty = new ShorthandProperty({
465
+ name: 'inset',
466
+ cssName: 'inset',
467
+ getter: function () {
468
+ if (this.top === this.right && this.top === this.bottom && this.top === this.left) {
469
+ if (typeof this.top === 'string') {
470
+ if (this.top === 'auto') {
471
+ return this.top;
472
+ }
473
+ const value = CorePercentLength.parse(this.top);
474
+ if (Number.isNaN(value)) {
475
+ return this.top;
476
+ }
477
+ else {
478
+ return CorePercentLength.convertToString(value);
479
+ }
480
+ }
481
+ }
482
+ if (CorePercentLength.equals(this.top, this.right) && CorePercentLength.equals(this.top, this.bottom) && CorePercentLength.equals(this.top, this.left)) {
483
+ return this.top;
484
+ }
485
+ return `${CorePercentLength.convertToString(this.paddingTop)} ${CorePercentLength.convertToString(this.paddingRight)} ${CorePercentLength.convertToString(this.paddingBottom)} ${CorePercentLength.convertToString(this.paddingLeft)}`;
486
+ },
487
+ converter: convertToInsets,
488
+ });
489
+ function convertToInsets(value) {
490
+ if (typeof value === 'string' && value !== 'auto') {
491
+ const thickness = parseShorthandPositioning(value);
492
+ return [
493
+ [topProperty, masonLengthPercentParse(thickness.top)],
494
+ [rightProperty, masonLengthPercentParse(thickness.right)],
495
+ [bottomProperty, masonLengthPercentParse(thickness.bottom)],
496
+ [leftProperty, masonLengthPercentParse(thickness.left)],
497
+ ];
498
+ }
499
+ else {
500
+ return [
501
+ [topProperty, value],
502
+ [rightProperty, value],
503
+ [bottomProperty, value],
504
+ [leftProperty, value],
505
+ ];
506
+ }
507
+ }
256
508
  export const leftProperty = new CssProperty({
257
509
  name: 'left',
258
510
  cssName: 'left',
259
511
  defaultValue: 'auto',
260
512
  // @ts-ignore
261
513
  equalityComparer: NSLength.equals,
514
+ valueConverter: masonLengthParse,
515
+ valueChanged(target, oldValue, newValue) {
516
+ const view = getViewStyle(target.viewRef);
517
+ if (view) {
518
+ view.left = newValue;
519
+ }
520
+ },
262
521
  });
263
522
  export const rightProperty = new CssProperty({
264
523
  name: 'right',
@@ -266,6 +525,13 @@ export const rightProperty = new CssProperty({
266
525
  defaultValue: 'auto',
267
526
  // @ts-ignore
268
527
  equalityComparer: NSLength.equals,
528
+ valueConverter: masonLengthParse,
529
+ valueChanged(target, oldValue, newValue) {
530
+ const view = getViewStyle(target.viewRef);
531
+ if (view) {
532
+ view.right = newValue;
533
+ }
534
+ },
269
535
  });
270
536
  export const topProperty = new CssProperty({
271
537
  name: 'top',
@@ -273,6 +539,13 @@ export const topProperty = new CssProperty({
273
539
  defaultValue: 'auto',
274
540
  // @ts-ignore
275
541
  equalityComparer: NSLength.equals,
542
+ valueConverter: masonLengthParse,
543
+ valueChanged(target, oldValue, newValue) {
544
+ const view = getViewStyle(target.viewRef);
545
+ if (view) {
546
+ view.top = newValue;
547
+ }
548
+ },
276
549
  });
277
550
  export const bottomProperty = new CssProperty({
278
551
  name: 'bottom',
@@ -280,11 +553,26 @@ export const bottomProperty = new CssProperty({
280
553
  defaultValue: 'auto',
281
554
  // @ts-ignore
282
555
  equalityComparer: NSLength.equals,
556
+ valueConverter: masonLengthParse,
557
+ valueChanged(target, oldValue, newValue) {
558
+ const view = getViewStyle(target.viewRef);
559
+ if (view) {
560
+ view.bottom = newValue;
561
+ }
562
+ },
283
563
  });
284
564
  export const flexBasisProperty = new CssProperty({
285
565
  name: 'flexBasis',
286
566
  cssName: 'flex-basis',
287
567
  defaultValue: 'auto',
568
+ equalityComparer: NSLength.equals,
569
+ valueConverter: masonLengthParse,
570
+ valueChanged(target, oldValue, newValue) {
571
+ const view = getViewStyle(target.viewRef);
572
+ if (view) {
573
+ view.flexBasis = newValue;
574
+ }
575
+ },
288
576
  });
289
577
  export const gridRowGapProperty = new ShorthandProperty({
290
578
  name: 'gridRowGap',
@@ -310,247 +598,221 @@ export const aspectRatioProperty = new CssProperty({
310
598
  name: 'aspectRatio',
311
599
  cssName: 'aspect-ratio',
312
600
  defaultValue: Number.NaN,
601
+ valueChanged(target, oldValue, newValue) {
602
+ const view = getViewStyle(target.viewRef);
603
+ if (view) {
604
+ view.aspectRatio = newValue;
605
+ }
606
+ },
313
607
  });
314
608
  export const alignItemsProperty = new CssProperty({
315
609
  name: 'alignItems',
316
610
  cssName: 'align-items',
317
611
  defaultValue: 'normal',
612
+ valueChanged(target, oldValue, newValue) {
613
+ const view = getViewStyle(target.viewRef);
614
+ if (view) {
615
+ view.alignItems = newValue;
616
+ }
617
+ },
318
618
  });
319
619
  export const alignSelfProperty = new CssProperty({
320
620
  name: 'alignSelf',
321
621
  cssName: 'align-self',
322
622
  defaultValue: 'normal',
623
+ valueChanged(target, oldValue, newValue) {
624
+ const view = getViewStyle(target.viewRef);
625
+ if (view) {
626
+ view.alignSelf = newValue;
627
+ }
628
+ },
323
629
  });
324
630
  export const alignContentProperty = new CssProperty({
325
631
  name: 'alignContent',
326
632
  cssName: 'align-content',
327
633
  defaultValue: 'normal',
634
+ valueChanged(target, oldValue, newValue) {
635
+ const view = getViewStyle(target.viewRef);
636
+ if (view) {
637
+ view.alignContent = newValue;
638
+ }
639
+ },
328
640
  });
329
641
  export const justifyItemsProperty = new CssProperty({
330
642
  name: 'justifyItems',
331
643
  cssName: 'justify-items',
332
644
  defaultValue: 'normal',
645
+ valueChanged(target, oldValue, newValue) {
646
+ const view = getViewStyle(target.viewRef);
647
+ if (view) {
648
+ view.justifyItems = newValue;
649
+ }
650
+ },
333
651
  });
334
652
  export const justifySelfProperty = new CssProperty({
335
653
  name: 'justifySelf',
336
654
  cssName: 'justify-self',
337
655
  defaultValue: 'normal',
656
+ valueChanged(target, oldValue, newValue) {
657
+ const view = getViewStyle(target.viewRef);
658
+ if (view) {
659
+ view.justifySelf = newValue;
660
+ }
661
+ },
338
662
  });
339
663
  export const justifyContentProperty = new CssProperty({
340
664
  name: 'justifyContent',
341
665
  cssName: 'justify-content',
342
666
  defaultValue: 'normal',
667
+ valueChanged(target, oldValue, newValue) {
668
+ const view = getViewStyle(target.viewRef);
669
+ if (view) {
670
+ view.justifyContent = newValue;
671
+ }
672
+ },
343
673
  });
344
674
  export const gridAutoRowsProperty = new CssProperty({
345
675
  name: 'gridAutoRows',
346
676
  cssName: 'grid-auto-rows',
347
677
  defaultValue: '',
678
+ valueChanged(target, oldValue, newValue) {
679
+ const view = getViewStyle(target.viewRef);
680
+ if (view) {
681
+ view.gridAutoRows = newValue;
682
+ }
683
+ },
348
684
  });
349
685
  export const gridAutoColumnsProperty = new CssProperty({
350
686
  name: 'gridAutoColumns',
351
687
  cssName: 'grid-auto-columns',
352
688
  defaultValue: '',
689
+ valueChanged(target, oldValue, newValue) {
690
+ const view = getViewStyle(target.viewRef);
691
+ if (view) {
692
+ view.gridAutoColumns = newValue;
693
+ }
694
+ },
353
695
  });
354
696
  export const gridAutoFlowProperty = new CssProperty({
355
697
  name: 'gridAutoFlow',
356
698
  cssName: 'grid-auto-flow',
357
699
  defaultValue: 'row',
358
- });
359
- function parseGridColumnOrRow(value) {
360
- if (value.trim() === 'auto') {
361
- return 'auto';
362
- }
363
- else {
364
- const split = value.split(/\s+/).filter((item) => item.trim().length !== 0);
365
- const length = split.length;
366
- if (length === 0) {
367
- return undefined;
368
- }
369
- const first = split[0];
370
- if (length === 1) {
371
- const parsedValue = Number(first);
372
- if (Number.isNaN(parsedValue)) {
373
- return undefined;
374
- }
375
- return first;
376
- }
377
- if (length === 2) {
378
- if (first === 'span') {
379
- const second = split[1];
380
- const parsedValue = Number(second);
381
- if (Number.isNaN(parsedValue)) {
382
- return undefined;
383
- }
384
- return `${first} ${second}`;
385
- }
700
+ valueChanged(target, oldValue, newValue) {
701
+ const view = getViewStyle(target.viewRef);
702
+ if (view) {
703
+ view.gridAutoFlow = newValue;
386
704
  }
387
- //custom-ident unsupport atm
388
- return undefined;
389
- }
390
- }
391
- export const gridAreaProperty = new ShorthandProperty({
705
+ },
706
+ });
707
+ export const gridAreaProperty = new CssProperty({
392
708
  name: 'gridArea',
393
709
  cssName: 'grid-area',
394
- getter: function () {
395
- return `${this.gridRowStart} / ${this.gridColumnStart} / ${this.gridRowEnd} / ${this.gridColumnEnd}`;
396
- },
397
- converter(value) {
398
- if (typeof value === 'string') {
399
- const values = value.split('/').filter((item) => item.trim().length !== 0);
400
- // grid-row-start / grid-column-start / grid-row-end / grid-column-end
401
- const length = values.length;
402
- if (length === 0) {
403
- return [];
404
- }
405
- if (length === 1) {
406
- const parsed = parseGridColumnOrRow(values[0]);
407
- return [
408
- [gridRowStartProperty, parsed],
409
- [gridRowEndProperty, parsed],
410
- [gridColumnStartProperty, parsed],
411
- [gridColumnEndProperty, parsed],
412
- ];
413
- }
414
- if (length === 2) {
415
- const row = parseGridColumnOrRow(values[0]);
416
- const column = parseGridColumnOrRow(values[1]);
417
- return [
418
- [gridRowStartProperty, row],
419
- [gridRowEndProperty, row],
420
- [gridColumnStartProperty, column],
421
- [gridColumnEndProperty, column],
422
- ];
423
- }
424
- if (length === 3) {
425
- const rowStart = parseGridColumnOrRow(values[0]);
426
- const rowEnd = parseGridColumnOrRow(values[2]);
427
- const columnStart = parseGridColumnOrRow(values[1]);
428
- return [
429
- [gridRowStartProperty, rowStart],
430
- [gridRowEndProperty, rowEnd],
431
- [gridColumnStartProperty, columnStart],
432
- [gridColumnEndProperty, columnStart],
433
- ];
434
- }
435
- if (length >= 4) {
436
- const rowStart = parseGridColumnOrRow(values[0]);
437
- const rowEnd = parseGridColumnOrRow(values[2]);
438
- const columnStart = parseGridColumnOrRow(values[1]);
439
- const columnEnd = parseGridColumnOrRow(values[3]);
440
- return [
441
- [gridRowStartProperty, rowStart],
442
- [gridRowEndProperty, rowEnd],
443
- [gridColumnStartProperty, columnStart],
444
- [gridColumnEndProperty, columnEnd],
445
- ];
446
- }
447
- }
448
- return [];
710
+ defaultValue: '',
711
+ valueChanged(target, oldValue, newValue) {
712
+ const view = getViewStyle(target.viewRef);
713
+ if (view) {
714
+ view.gridArea = newValue;
715
+ }
449
716
  },
450
717
  });
451
718
  export const gridColumnStartProperty = new CssProperty({
452
719
  name: 'gridColumnStart',
453
720
  cssName: 'grid-column-start',
454
721
  defaultValue: 'auto',
722
+ valueChanged(target, oldValue, newValue) {
723
+ const view = getViewStyle(target.viewRef);
724
+ if (view) {
725
+ view.gridColumnStart = newValue;
726
+ }
727
+ },
455
728
  });
456
729
  export const gridColumnEndProperty = new CssProperty({
457
730
  name: 'gridColumnEnd',
458
731
  cssName: 'grid-column-end',
459
732
  defaultValue: 'auto',
733
+ valueChanged(target, oldValue, newValue) {
734
+ const view = getViewStyle(target.viewRef);
735
+ if (view) {
736
+ view.gridColumnEnd = newValue;
737
+ }
738
+ },
460
739
  });
461
- export const gridColumnProperty = new ShorthandProperty({
740
+ export const gridColumnProperty = new CssProperty({
462
741
  name: 'gridColumn',
463
742
  cssName: 'grid-column',
464
- getter: function () {
465
- if (this.gridColumnStart === this.gridColumnEnd) {
466
- return this.gridColumnStart;
467
- }
468
- return `${this.gridColumnStart} / ${this.gridColumnStart}`;
469
- },
470
- converter(value) {
471
- if (typeof value === 'string') {
472
- const values = value.split('/').filter((item) => item.trim().length !== 0);
473
- const length = values.length;
474
- if (length === 0) {
475
- return [];
476
- }
477
- if (length === 1) {
478
- const parsed = parseGridColumnOrRow(values[0]);
479
- return [
480
- [gridColumnStartProperty, parsed],
481
- [gridColumnEndProperty, parsed],
482
- ];
483
- }
484
- if (length > 1) {
485
- const start = values[0];
486
- const end = values[1];
487
- const parsedStart = parseGridColumnOrRow(start);
488
- const parsedEnd = parseGridColumnOrRow(end);
489
- return [
490
- [gridColumnStartProperty, parsedStart],
491
- [gridColumnEndProperty, parsedEnd],
492
- ];
493
- }
743
+ defaultValue: '',
744
+ valueChanged(target, oldValue, newValue) {
745
+ const view = getViewStyle(target.viewRef);
746
+ if (view) {
747
+ view.gridColumn = newValue;
494
748
  }
495
- return [];
496
749
  },
497
750
  });
498
751
  export const gridRowStartProperty = new CssProperty({
499
752
  name: 'gridRowStart',
500
753
  cssName: 'grid-row-start',
501
754
  defaultValue: 'auto',
755
+ valueChanged(target, oldValue, newValue) {
756
+ const view = getViewStyle(target.viewRef);
757
+ if (view) {
758
+ view.gridRowStart = newValue;
759
+ }
760
+ },
502
761
  });
503
762
  export const gridRowEndProperty = new CssProperty({
504
763
  name: 'gridRowEnd',
505
764
  cssName: 'grid-row-end',
506
765
  defaultValue: 'auto',
766
+ valueChanged(target, oldValue, newValue) {
767
+ const view = getViewStyle(target.viewRef);
768
+ if (view) {
769
+ view.gridRowEnd = newValue;
770
+ }
771
+ },
507
772
  });
508
- export const gridRowProperty = new ShorthandProperty({
773
+ export const gridRowProperty = new CssProperty({
509
774
  name: 'gridRow',
510
775
  cssName: 'grid-row',
511
- getter: function () {
512
- if (this.gridRowStart === this.gridRowEnd) {
513
- return this.gridRowStart;
776
+ defaultValue: '',
777
+ valueChanged(target, oldValue, newValue) {
778
+ const view = getViewStyle(target.viewRef);
779
+ if (view) {
780
+ view.gridRow = newValue;
514
781
  }
515
- return `${this.gridRowStart} / ${this.gridRowStart}`;
516
782
  },
517
- converter(value) {
518
- if (typeof value === 'string') {
519
- const values = value.split('/').filter((item) => item.trim().length !== 0);
520
- const length = values.length;
521
- if (length === 0) {
522
- return [];
523
- }
524
- if (length === 1) {
525
- const parsed = parseGridColumnOrRow(values[0]);
526
- return [
527
- [gridRowStartProperty, parsed],
528
- [gridRowEndProperty, parsed],
529
- ];
530
- }
531
- if (length > 1) {
532
- const start = values[0];
533
- const end = values[1];
534
- const parsedStart = parseGridColumnOrRow(start);
535
- const parsedEnd = parseGridColumnOrRow(end);
536
- return [
537
- [gridRowStartProperty, parsedStart],
538
- [gridRowEndProperty, parsedEnd],
539
- ];
540
- }
783
+ });
784
+ export const gridTemplateAreasProperty = new CssProperty({
785
+ name: 'gridTemplateAreas',
786
+ cssName: 'grid-template-areas',
787
+ defaultValue: null,
788
+ valueChanged(target, oldValue, newValue) {
789
+ const view = getViewStyle(target.viewRef);
790
+ if (view) {
791
+ view.gridTemplateAreas = newValue;
541
792
  }
542
- return [];
543
793
  },
544
794
  });
545
795
  export const gridTemplateRowsProperty = new CssProperty({
546
796
  name: 'gridTemplateRows',
547
797
  cssName: 'grid-template-rows',
548
798
  defaultValue: null,
799
+ valueChanged(target, oldValue, newValue) {
800
+ const view = getViewStyle(target.viewRef);
801
+ if (view) {
802
+ view.gridTemplateRows = newValue;
803
+ }
804
+ },
549
805
  });
550
806
  export const gridTemplateColumnsProperty = new CssProperty({
551
807
  name: 'gridTemplateColumns',
552
808
  cssName: 'grid-template-columns',
553
809
  defaultValue: null,
810
+ valueChanged(target, oldValue, newValue) {
811
+ const view = getViewStyle(target.viewRef);
812
+ if (view) {
813
+ view.gridTemplateColumns = newValue;
814
+ }
815
+ },
554
816
  });
555
817
  // flex-flow: <flex-direction> || <flex-wrap>
556
818
  const flexFlowProperty = new ShorthandProperty({
@@ -637,27 +899,79 @@ const flexProperty = new ShorthandProperty({
637
899
  return properties;
638
900
  },
639
901
  });
640
- export const textWrapProperty = new Property({
902
+ // @ts-ignore
903
+ export const textWrapProperty = new CssProperty({
641
904
  name: 'textWrap',
642
905
  affectsLayout: true,
643
906
  defaultValue: 'nowrap',
907
+ valueChanged(target, oldValue, newValue) {
908
+ const view = target?.viewRef ? getViewStyle(target.viewRef) : target.view;
909
+ if (view) {
910
+ view.textWrap = newValue;
911
+ }
912
+ },
644
913
  });
645
- export const textProperty = new Property({
646
- name: 'text',
914
+ // @ts-ignore
915
+ export const textOverFlowProperty = new CssProperty({
916
+ name: 'textOverflow',
917
+ defaultValue: 'text-overflow',
918
+ valueChanged(target, oldValue, newValue) {
919
+ const view = target?.viewRef ? getViewStyle(target.viewRef) : target.view;
920
+ if (view) {
921
+ view.textOverflow = newValue;
922
+ }
923
+ },
924
+ });
925
+ export const textContentProperty = new Property({
926
+ name: 'textContent',
647
927
  affectsLayout: true,
648
928
  defaultValue: '',
649
929
  });
650
- let ViewBase = class ViewBase extends CustomLayoutView {
930
+ export const boxSizingProperty = new CssProperty({
931
+ name: 'boxSizing',
932
+ cssName: 'box-sizing',
933
+ defaultValue: 'border-box',
934
+ valueChanged(target, oldValue, newValue) {
935
+ const view = getViewStyle(target.viewRef);
936
+ if (view) {
937
+ if (newValue) {
938
+ view.boxSizing = newValue;
939
+ }
940
+ else {
941
+ // Revert to old value if newValue is invalid
942
+ view.view.style.boxSizing = oldValue;
943
+ }
944
+ }
945
+ },
946
+ valueConverter(value) {
947
+ switch (value) {
948
+ case 'content-box':
949
+ case 'border-box':
950
+ return value;
951
+ default:
952
+ return undefined;
953
+ }
954
+ },
955
+ });
956
+ const borderRadiusProperty = new CssProperty({
957
+ name: 'borderRadius',
958
+ cssName: 'border-radius',
959
+ });
960
+ borderRadiusProperty.register(Style);
961
+ export class ViewBase extends CustomLayoutView {
651
962
  constructor() {
652
963
  super();
653
964
  this._children = [];
654
- this._isMasonView = false;
655
- this._isMasonChild = false;
656
- this._isMasonView = true;
965
+ this[_a] = false;
966
+ this[_b] = false;
967
+ this[_c] = false;
657
968
  }
658
969
  forceStyleUpdate() {
659
970
  _forceStyleUpdate(this);
660
971
  }
972
+ get _viewChildren() {
973
+ return this._children.filter((child) => child instanceof NSView);
974
+ }
661
975
  eachLayoutChild(callback) {
662
976
  let lastChild = null;
663
977
  this.eachChildView((cv) => {
@@ -674,42 +988,96 @@ let ViewBase = class ViewBase extends CustomLayoutView {
674
988
  }
675
989
  }
676
990
  eachChild(callback) {
677
- for (const child of this._children) {
991
+ for (const child of this._viewChildren) {
678
992
  callback(child);
679
993
  }
680
994
  }
681
995
  eachChildView(callback) {
682
- for (const view of this._children) {
996
+ for (const view of this._viewChildren) {
683
997
  callback(view);
684
998
  }
685
999
  }
686
1000
  _addChildFromBuilder(name, value) {
687
- if (value instanceof NSView) {
688
- this.addChild(value);
689
- }
1001
+ this.addChild(value);
690
1002
  }
691
1003
  getChildrenCount() {
692
- return this._children.length;
1004
+ return this._viewChildren.length;
693
1005
  }
694
1006
  get _childrenCount() {
695
- return this._children.length;
1007
+ return this._viewChildren.length;
696
1008
  }
697
1009
  getChildAt(index) {
698
- return this._children[index];
1010
+ return this._viewChildren[index];
699
1011
  }
700
1012
  getChildIndex(child) {
701
- return this._children.indexOf(child);
1013
+ return this._viewChildren.indexOf(child);
702
1014
  }
703
1015
  getChildById(id) {
704
1016
  return getViewById(this, id);
705
1017
  }
706
1018
  addChild(child) {
707
- this._children.push(child);
708
- this._addView(child);
1019
+ if (child instanceof NSView) {
1020
+ this._children.push(child);
1021
+ if (this[isText_]) {
1022
+ child[isTextChild_] = true;
1023
+ }
1024
+ this._addView(child);
1025
+ }
1026
+ else {
1027
+ if (text_ in child) {
1028
+ //@ts-ignore
1029
+ if (this._view) {
1030
+ if (__ANDROID__) {
1031
+ //@ts-ignore
1032
+ this._view.addChildAt(child[text_] || '', this._children.length);
1033
+ }
1034
+ if (__APPLE__) {
1035
+ //@ts-ignore
1036
+ this._view.mason_addChildAtText(child[text_] || '', this._children.length);
1037
+ }
1038
+ }
1039
+ this._children.push(child);
1040
+ }
1041
+ }
709
1042
  }
710
1043
  insertChild(child, atIndex) {
711
- this._children.splice(atIndex, 0, child);
712
- this._addView(child, atIndex);
1044
+ if (child instanceof NSView) {
1045
+ this._children.splice(atIndex, 0, child);
1046
+ if (this[isText_]) {
1047
+ child[isTextChild_] = true;
1048
+ }
1049
+ this._addView(child, atIndex);
1050
+ }
1051
+ }
1052
+ replaceChild(child, atIndex) {
1053
+ if (child instanceof NSView) {
1054
+ this._children[atIndex] = child;
1055
+ if (this[isText_]) {
1056
+ child[isTextChild_] = true;
1057
+ }
1058
+ this._addView(child, atIndex);
1059
+ }
1060
+ else {
1061
+ if (text_ in child) {
1062
+ //@ts-ignore
1063
+ if (this._view) {
1064
+ if (__ANDROID__) {
1065
+ //@ts-ignore
1066
+ this._view.replaceChildAt(child[text_] || '', atIndex);
1067
+ }
1068
+ if (__APPLE__) {
1069
+ //@ts-ignore
1070
+ this._view.mason_replaceChildAtText(child[text_] || '', atIndex);
1071
+ }
1072
+ }
1073
+ if (this._children.length >= atIndex) {
1074
+ this._children[atIndex] = { text: child[text_] || '' };
1075
+ }
1076
+ else {
1077
+ this._children.push({ text: child[text_] || '' });
1078
+ }
1079
+ }
1080
+ }
713
1081
  }
714
1082
  removeChild(child) {
715
1083
  const index = this._children.indexOf(child);
@@ -719,105 +1087,505 @@ let ViewBase = class ViewBase extends CustomLayoutView {
719
1087
  }
720
1088
  }
721
1089
  removeChildren() {
722
- if (this._children.length === 0) {
1090
+ if (this._viewChildren.length === 0) {
723
1091
  return;
724
1092
  }
725
- for (const child of this._children) {
1093
+ for (const child of this._viewChildren) {
1094
+ // @ts-ignore
726
1095
  child._isMasonChild = false;
727
- this._removeView(child);
1096
+ if (child instanceof NSView) {
1097
+ this._removeView(child);
1098
+ }
728
1099
  }
729
1100
  this._children.splice(0);
730
1101
  }
731
- [displayProperty.setNative](value) {
732
- _setDisplay(value, this);
1102
+ set text(value) {
1103
+ if (frameWork === FrameWork.Vue && global.VUE3_ELEMENT_REF) {
1104
+ const view_ref = this[global.VUE3_ELEMENT_REF];
1105
+ if (Array.isArray(view_ref.childNodes)) {
1106
+ if (view_ref.childNodes.length === 0) {
1107
+ this.addChild({ [text_]: value });
1108
+ return;
1109
+ }
1110
+ if (view_ref.childNodes.length === 1) {
1111
+ const node = view_ref.childNodes[0];
1112
+ if (node && node.nodeType === 'text') {
1113
+ this.addChild({ [text_]: node.text });
1114
+ }
1115
+ return;
1116
+ }
1117
+ view_ref.childNodes.forEach((node, index) => {
1118
+ if (node.nodeType === 'text') {
1119
+ // nativeView.replaceChildAt(node.text, index);
1120
+ this.replaceChild({ [text_]: node.text }, index);
1121
+ }
1122
+ });
1123
+ }
1124
+ return;
1125
+ }
1126
+ if ('firstChild' in this) {
1127
+ function getTextNodes(root) {
1128
+ const result = [];
1129
+ let node = root.firstChild;
1130
+ while (node) {
1131
+ result.push(node);
1132
+ node = node.nextSibling;
1133
+ }
1134
+ return result;
1135
+ }
1136
+ const nodes = getTextNodes(this);
1137
+ for (const [index, node] of nodes.entries()) {
1138
+ if (node.nodeType === 'text' || node.nodeName === 'TextNode' || node.constructor.name === 'TextNode') {
1139
+ const existing = this._children[index];
1140
+ if (existing && Object.is(existing['node'], node)) {
1141
+ // todo direct set text
1142
+ this.replaceChild({ [text_]: node.text, node }, index);
1143
+ continue;
1144
+ }
1145
+ this.replaceChild({ [text_]: node.text, node }, index);
1146
+ }
1147
+ }
1148
+ }
1149
+ }
1150
+ [(_a = isMasonView_, _b = isTextChild_, _c = isText_, filterProperty.setNative)](value) {
1151
+ // @ts-ignore
1152
+ const style = this._styleHelper;
1153
+ if (style) {
1154
+ // @ts-ignore
1155
+ style.filter = value;
1156
+ }
1157
+ }
1158
+ [borderRadiusProperty.setNative](value) {
1159
+ // @ts-ignore
1160
+ const style = this._styleHelper;
1161
+ if (style) {
1162
+ // @ts-ignore
1163
+ style.borderRadius = value;
1164
+ }
1165
+ }
1166
+ [borderProperty.setNative](value) {
1167
+ // @ts-ignore
1168
+ const style = this._styleHelper;
1169
+ if (style) {
1170
+ // @ts-ignore
1171
+ style.border = value;
1172
+ }
1173
+ }
1174
+ [backgroundProperty.setNative](value) {
1175
+ // @ts-ignore
1176
+ const style = this._styleHelper;
1177
+ if (style) {
1178
+ // @ts-ignore
1179
+ style.background = value;
1180
+ }
1181
+ }
1182
+ [borderLeftWidthProperty.setNative](value) {
1183
+ // @ts-ignore
1184
+ const style = this._styleHelper;
1185
+ if (style) {
1186
+ // @ts-ignore
1187
+ style.borderLeftWidth = value;
1188
+ }
1189
+ }
1190
+ [borderTopWidthProperty.setNative](value) {
1191
+ // @ts-ignore
1192
+ const style = this._styleHelper;
1193
+ if (style) {
1194
+ // @ts-ignore
1195
+ style.borderTopWidth = value;
1196
+ }
1197
+ }
1198
+ [borderRightWidthProperty.setNative](value) {
1199
+ // @ts-ignore
1200
+ const style = this._styleHelper;
1201
+ if (style) {
1202
+ // @ts-ignore
1203
+ style.borderRightWidth = value;
1204
+ }
1205
+ }
1206
+ [borderBottomWidthProperty.setNative](value) {
1207
+ // @ts-ignore
1208
+ const style = this._styleHelper;
1209
+ if (style) {
1210
+ // @ts-ignore
1211
+ style.borderBottomWidth = value;
1212
+ }
1213
+ }
1214
+ [lineHeightProperty.setNative](value) {
1215
+ // @ts-ignore
1216
+ const style = this._styleHelper;
1217
+ if (style) {
1218
+ // @ts-ignore
1219
+ style.lineHeight = value;
1220
+ }
1221
+ }
1222
+ [letterSpacingProperty.setNative](value) {
1223
+ // @ts-ignore
1224
+ const style = this._styleHelper;
1225
+ if (style) {
1226
+ // @ts-ignore
1227
+ style.letterSpacing = value;
1228
+ }
1229
+ }
1230
+ [textAlignmentProperty.setNative](value) {
1231
+ // @ts-ignore
1232
+ const style = this._styleHelper;
1233
+ if (style) {
1234
+ // @ts-ignore
1235
+ style.textAlignment = value;
1236
+ }
1237
+ }
1238
+ get boxSizing() {
1239
+ return this.style.boxSizing;
1240
+ }
1241
+ set boxSizing(value) {
1242
+ this.style.boxSizing = value;
1243
+ }
1244
+ get display() {
1245
+ return this.style.display;
1246
+ }
1247
+ set display(value) {
1248
+ this.style.display = value;
1249
+ }
1250
+ get overflowX() {
1251
+ return this.style.overflowX;
1252
+ }
1253
+ set overflowX(value) {
1254
+ this.style.overflowX = value;
1255
+ }
1256
+ get overflowY() {
1257
+ return this.style.overflowY;
1258
+ }
1259
+ set overflowY(value) {
1260
+ this.style.overflowY = value;
1261
+ }
1262
+ get scrollBarWidth() {
1263
+ return this.style.scrollBarWidth;
1264
+ }
1265
+ set scrollBarWidth(value) {
1266
+ this.style.scrollBarWidth = value;
1267
+ }
1268
+ get position() {
1269
+ return this.style.position;
1270
+ }
1271
+ set position(value) {
1272
+ // @ts-ignore
1273
+ const style = this._styleHelper;
1274
+ if (style) {
1275
+ // @ts-ignore
1276
+ style.position = value;
1277
+ }
1278
+ }
1279
+ [colorProperty.setNative](value) {
1280
+ if (value instanceof Color) {
1281
+ // @ts-ignore
1282
+ const style = this._styleHelper;
1283
+ if (style) {
1284
+ // @ts-ignore
1285
+ style.color = value.argb;
1286
+ }
1287
+ }
1288
+ }
1289
+ [flexWrapProperty.setNative](value) {
1290
+ // @ts-ignore
1291
+ const style = this._styleHelper;
1292
+ if (style) {
1293
+ style.flexWrap = value;
1294
+ }
733
1295
  }
734
1296
  [flexDirectionProperty.setNative](value) {
735
- _setFlexDirection(value, this);
1297
+ // @ts-ignore
1298
+ const style = this._styleHelper;
1299
+ if (style) {
1300
+ style.flexDirection = value;
1301
+ }
1302
+ }
1303
+ [flexGrowProperty.setNative](value) {
1304
+ // @ts-ignore
1305
+ const style = this._styleHelper;
1306
+ if (style) {
1307
+ style.flexGrow = value;
1308
+ }
1309
+ }
1310
+ [flexShrinkProperty.setNative](value) {
1311
+ // @ts-ignore
1312
+ const style = this._styleHelper;
1313
+ if (style) {
1314
+ style.flexShrink = value;
1315
+ }
1316
+ }
1317
+ [flexBasisProperty.setNative](value) {
1318
+ // @ts-ignore
1319
+ const style = this._styleHelper;
1320
+ if (style) {
1321
+ style.flexBasis = value;
1322
+ }
1323
+ }
1324
+ [alignItemsProperty.setNative](value) {
1325
+ // @ts-ignore
1326
+ const style = this._styleHelper;
1327
+ if (style) {
1328
+ style.alignItems = value;
1329
+ }
1330
+ }
1331
+ [alignSelfProperty.setNative](value) {
1332
+ // @ts-ignore
1333
+ const style = this._styleHelper;
1334
+ if (style) {
1335
+ style.alignSelf = value;
1336
+ }
1337
+ }
1338
+ [alignContentProperty.setNative](value) {
1339
+ // @ts-ignore
1340
+ const style = this._styleHelper;
1341
+ if (style) {
1342
+ style.alignContent = value;
1343
+ }
1344
+ }
1345
+ [justifyItemsProperty.setNative](value) {
1346
+ // @ts-ignore
1347
+ const style = this._styleHelper;
1348
+ if (style) {
1349
+ style.justifyItems = value;
1350
+ }
1351
+ }
1352
+ [justifySelfProperty.setNative](value) {
1353
+ // @ts-ignore
1354
+ const style = this._styleHelper;
1355
+ if (style) {
1356
+ style.justifySelf = value;
1357
+ }
1358
+ }
1359
+ [justifyContentProperty.setNative](value) {
1360
+ // @ts-ignore
1361
+ const style = this._styleHelper;
1362
+ if (style) {
1363
+ style.justifyContent = value;
1364
+ }
1365
+ }
1366
+ [leftProperty.setNative](value) {
1367
+ // @ts-ignore
1368
+ const style = this._styleHelper;
1369
+ if (style) {
1370
+ style.left = value;
1371
+ }
1372
+ }
1373
+ [rightProperty.setNative](value) {
1374
+ // @ts-ignore
1375
+ const style = this._styleHelper;
1376
+ if (style) {
1377
+ style.right = value;
1378
+ }
1379
+ }
1380
+ [bottomProperty.setNative](value) {
1381
+ // @ts-ignore
1382
+ const style = this._styleHelper;
1383
+ if (style) {
1384
+ style.bottom = value;
1385
+ }
1386
+ }
1387
+ [topProperty.setNative](value) {
1388
+ // @ts-ignore
1389
+ const style = this._styleHelper;
1390
+ if (style) {
1391
+ style.top = value;
1392
+ }
736
1393
  }
737
1394
  [minWidthProperty.setNative](value) {
738
- _setMinWidth(value, this);
1395
+ // @ts-ignore
1396
+ const style = this._styleHelper;
1397
+ if (style) {
1398
+ style.minWidth = value;
1399
+ }
739
1400
  }
740
1401
  [minHeightProperty.setNative](value) {
741
- _setMinHeight(value, this);
1402
+ // @ts-ignore
1403
+ const style = this._styleHelper;
1404
+ if (style) {
1405
+ style.minHeight = value;
1406
+ }
1407
+ }
1408
+ [heightProperty.setNative](value) {
1409
+ // @ts-ignore
1410
+ const style = this._styleHelper;
1411
+ if (style) {
1412
+ style.height = value;
1413
+ }
742
1414
  }
743
1415
  [widthProperty.setNative](value) {
744
- _setWidth(value, this);
1416
+ // @ts-ignore
1417
+ const style = this._styleHelper;
1418
+ if (style) {
1419
+ style.width = value;
1420
+ }
745
1421
  }
746
- [heightProperty.setNative](value) {
747
- _setHeight(value, this);
1422
+ set maxWidth(value) {
1423
+ this.style.maxWidth = value;
748
1424
  }
749
- [alignContentProperty.setNative](value) {
750
- _setAlignContent(value, this);
1425
+ get maxWidth() {
1426
+ return this.style.maxWidth;
751
1427
  }
752
- [justifyContentProperty.setNative](value) {
753
- _setJustifyContent(value, this);
1428
+ set maxHeight(value) {
1429
+ this.style.maxHeight = value;
1430
+ }
1431
+ get maxHeight() {
1432
+ return this.style.maxHeight;
754
1433
  }
1434
+ _redrawNativeBackground(value) { }
755
1435
  [marginLeftProperty.setNative](value) {
756
- _setMarginLeft(value, this);
1436
+ // @ts-ignore
1437
+ const style = this._styleHelper;
1438
+ if (style) {
1439
+ style.marginLeft = value;
1440
+ }
757
1441
  }
758
1442
  [marginRightProperty.setNative](value) {
759
- _setMarginRight(value, this);
1443
+ // @ts-ignore
1444
+ const style = this._styleHelper;
1445
+ if (style) {
1446
+ style.marginRight = value;
1447
+ }
760
1448
  }
761
1449
  [marginBottomProperty.setNative](value) {
762
- _setMarginBottom(value, this);
1450
+ // @ts-ignore
1451
+ const style = this._styleHelper;
1452
+ if (style) {
1453
+ style.marginBottom = value;
1454
+ }
763
1455
  }
764
1456
  [marginTopProperty.setNative](value) {
765
- _setMarginTop(value, this);
1457
+ // @ts-ignore
1458
+ const style = this._styleHelper;
1459
+ if (style) {
1460
+ style.marginTop = value;
1461
+ }
766
1462
  }
767
1463
  [paddingLeftProperty.setNative](value) {
768
- _setPaddingLeft(value, this);
1464
+ // @ts-ignore
1465
+ const style = this._styleHelper;
1466
+ if (style) {
1467
+ style.paddingLeft = value;
1468
+ }
769
1469
  }
770
1470
  [paddingRightProperty.setNative](value) {
771
- _setPaddingRight(value, this);
1471
+ // @ts-ignore
1472
+ const style = this._styleHelper;
1473
+ if (style) {
1474
+ style.paddingRight = value;
1475
+ }
772
1476
  }
773
1477
  [paddingTopProperty.setNative](value) {
774
- _setPaddingTop(value, this);
1478
+ // @ts-ignore
1479
+ const style = this._styleHelper;
1480
+ if (style) {
1481
+ style.paddingTop = value;
1482
+ }
775
1483
  }
776
1484
  [paddingBottomProperty.setNative](value) {
777
- _setPaddingBottom(value, this);
1485
+ // @ts-ignore
1486
+ const style = this._styleHelper;
1487
+ if (style) {
1488
+ style.paddingBottom = value;
1489
+ }
778
1490
  }
779
- [rowGapProperty.setNative](value) {
780
- _setRowGap(value, this);
1491
+ set rowGap(value) {
1492
+ this.style.rowGap = value;
781
1493
  }
782
- [columnGapProperty.setNative](value) {
783
- _setColumnGap(value, this);
1494
+ get rowGap() {
1495
+ return this.style.rowGap;
784
1496
  }
785
- [gridColumnStartProperty.setNative](value) {
786
- _setGridColumnStart(value, this);
1497
+ set columnGap(value) {
1498
+ this.style.columnGap = value;
787
1499
  }
788
- [gridColumnEndProperty.setNative](value) {
789
- _setGridColumnEnd(value, this);
1500
+ get columnGap() {
1501
+ return this.style.columnGap;
790
1502
  }
791
- [gridRowStartProperty.setNative](value) {
792
- _setGridRowStart(value, this);
1503
+ set gridColumnStart(value) {
1504
+ this.style.gridColumnStart = value;
793
1505
  }
794
- [gridRowEndProperty.setNative](value) {
795
- _setGridRowEnd(value, this);
1506
+ get gridColumnStart() {
1507
+ return this.style.gridColumnStart;
796
1508
  }
797
- [gridTemplateRowsProperty.setNative](value) {
798
- _setGridTemplateRows(_parseGridTemplates(value), this);
1509
+ set gridColumnEnd(value) {
1510
+ this.style.gridColumnEnd = value;
799
1511
  }
800
- [gridTemplateColumnsProperty.setNative](value) {
801
- _setGridTemplateColumns(_parseGridTemplates(value), this);
1512
+ get gridColumnEnd() {
1513
+ return this.style.gridColumnEnd;
802
1514
  }
803
- };
804
- ViewBase = __decorate([
805
- CSSType('View'),
806
- __metadata("design:paramtypes", [])
807
- ], ViewBase);
808
- export { ViewBase };
809
- let TextBase = class TextBase extends ViewBase {
810
- constructor() {
811
- super();
1515
+ set gridRowStart(value) {
1516
+ this.style.gridRowStart = value;
1517
+ }
1518
+ get gridRowStart() {
1519
+ return this.style.gridRowStart;
1520
+ }
1521
+ set gridRowEnd(value) {
1522
+ this.style.gridRowEnd = value;
1523
+ }
1524
+ get gridRowEnd() {
1525
+ return this.style.gridRowEnd;
1526
+ }
1527
+ set gridTemplateRows(value) {
1528
+ this.style.gridTemplateRows = value;
1529
+ }
1530
+ get gridTemplateRows() {
1531
+ return this.style.gridTemplateRows;
1532
+ }
1533
+ set gridTemplateColumns(value) {
1534
+ this.style.gridTemplateColumns = value;
1535
+ }
1536
+ get gridTemplateColumns() {
1537
+ return this.style.gridTemplateColumns;
1538
+ }
1539
+ set gridAutoColumns(value) {
1540
+ this.style.gridAutoColumns = value;
1541
+ }
1542
+ get gridAutoColumns() {
1543
+ return this.style.gridAutoColumns;
1544
+ }
1545
+ set gridAutoRows(value) {
1546
+ this.style.gridAutoRows = value;
1547
+ }
1548
+ get gridAutoRows() {
1549
+ return this.style.gridAutoRows;
1550
+ }
1551
+ // @ts-ignore
1552
+ [fontSizeProperty.setNative](value) {
1553
+ // @ts-ignore
1554
+ if (this._styleHelper) {
1555
+ //@ts-ignore
1556
+ this._styleHelper.fontSize = value;
1557
+ }
1558
+ }
1559
+ [fontWeightProperty.setNative](value) {
1560
+ // @ts-ignore
1561
+ if (this._styleHelper) {
1562
+ //@ts-ignore
1563
+ this._styleHelper.fontWeight = value;
1564
+ }
812
1565
  }
813
- };
814
- TextBase = __decorate([
815
- CSSType('Text'),
816
- __metadata("design:paramtypes", [])
817
- ], TextBase);
818
- export { TextBase };
819
- textProperty.register(TextBase);
820
- textWrapProperty.register(TextBase);
1566
+ [fontStyleProperty.setNative](value) {
1567
+ // @ts-ignore
1568
+ if (this._styleHelper) {
1569
+ //@ts-ignore
1570
+ this._styleHelper.fontStyle = value;
1571
+ }
1572
+ }
1573
+ }
1574
+ export class TextBase extends ViewBase {
1575
+ }
1576
+ textContentProperty.register(TextBase);
1577
+ textWrapProperty.register(Style);
1578
+ textOverFlowProperty.register(Style);
1579
+ export class ButtonBase extends TextBase {
1580
+ }
1581
+ // @ts-ignore
1582
+ export const srcProperty = new Property({
1583
+ name: 'src',
1584
+ defaultValue: '',
1585
+ });
1586
+ export class ImageBase extends ViewBase {
1587
+ }
1588
+ srcProperty.register(ImageBase);
821
1589
  /**
822
1590
  * Props are already defined in core flexbox layout,
823
1591
  * overriding them breaks the core flexbox layout.
@@ -825,7 +1593,123 @@ textWrapProperty.register(TextBase);
825
1593
  // flexDirectionProperty.register(Style);
826
1594
  // flexWrapProperty.register(Style);
827
1595
  // flexGrowProperty.register(Style);
828
- // flexShrinkProperty.register(Style);
1596
+ flexShrinkProperty.register(Style);
1597
+ // revert valueConverter if causing issues with core components
1598
+ fontSizeProperty.overrideHandlers({
1599
+ name: 'fontSize',
1600
+ cssName: 'font-size',
1601
+ valueConverter: function (value) {
1602
+ return value;
1603
+ },
1604
+ valueChanged(target, oldValue, newValue) {
1605
+ const view = getViewStyle(target.viewRef);
1606
+ if (view) {
1607
+ if (newValue) {
1608
+ if (typeof newValue === 'string') {
1609
+ // @ts-ignore
1610
+ if (newValue.indexOf('%') !== -1) {
1611
+ view.fontSize = {
1612
+ value: parseFloat(newValue) / 100,
1613
+ unit: '%',
1614
+ };
1615
+ // @ts-ignore
1616
+ }
1617
+ else if (newValue.indexOf('dip') !== -1) {
1618
+ view.fontSize = parseFloat(newValue);
1619
+ // @ts-ignore
1620
+ }
1621
+ else if (newValue.indexOf('px') !== -1) {
1622
+ view.fontSize = {
1623
+ value: parseFloat(newValue),
1624
+ unit: 'px',
1625
+ };
1626
+ }
1627
+ else {
1628
+ view.fontSize = parseFloat(newValue);
1629
+ }
1630
+ }
1631
+ else {
1632
+ view.fontSize = newValue;
1633
+ }
1634
+ }
1635
+ else {
1636
+ // Revert to old value if newValue is invalid
1637
+ // @ts-ignore
1638
+ view.view.style.fontSize = oldValue;
1639
+ }
1640
+ }
1641
+ },
1642
+ });
1643
+ paddingLeftProperty.overrideHandlers({
1644
+ name: 'paddingLeft',
1645
+ cssName: 'padding-left',
1646
+ valueChanged(target, oldValue, newValue) {
1647
+ const view = getViewStyle(target.viewRef);
1648
+ if (view) {
1649
+ if (newValue) {
1650
+ view.paddingLeft = newValue;
1651
+ }
1652
+ else {
1653
+ // Revert to old value if newValue is invalid
1654
+ // @ts-ignore
1655
+ view.view.style.paddingLeft = oldValue;
1656
+ }
1657
+ }
1658
+ },
1659
+ });
1660
+ paddingTopProperty.overrideHandlers({
1661
+ name: 'paddingTop',
1662
+ cssName: 'padding-top',
1663
+ valueChanged(target, oldValue, newValue) {
1664
+ const view = getViewStyle(target.viewRef);
1665
+ if (view) {
1666
+ if (newValue) {
1667
+ view.paddingTop = newValue;
1668
+ }
1669
+ else {
1670
+ // Revert to old value if newValue is invalid
1671
+ // @ts-ignore
1672
+ view.view.style.paddingTop = oldValue;
1673
+ }
1674
+ }
1675
+ },
1676
+ });
1677
+ paddingRightProperty.overrideHandlers({
1678
+ name: 'paddingRight',
1679
+ cssName: 'padding-right',
1680
+ valueChanged(target, oldValue, newValue) {
1681
+ const view = getViewStyle(target.viewRef);
1682
+ if (view) {
1683
+ if (newValue) {
1684
+ view.paddingRight = newValue;
1685
+ }
1686
+ else {
1687
+ // Revert to old value if newValue is invalid
1688
+ // @ts-ignore
1689
+ view.view.style.paddingRight = oldValue;
1690
+ }
1691
+ }
1692
+ },
1693
+ });
1694
+ paddingBottomProperty.overrideHandlers({
1695
+ name: 'paddingBottom',
1696
+ cssName: 'padding-bottom',
1697
+ valueChanged(target, oldValue, newValue) {
1698
+ const view = getViewStyle(target.viewRef);
1699
+ if (view) {
1700
+ if (newValue) {
1701
+ view.paddingBottom = newValue;
1702
+ }
1703
+ else {
1704
+ // Revert to old value if newValue is invalid
1705
+ // @ts-ignore
1706
+ view.view.style.paddingBottom = oldValue;
1707
+ }
1708
+ }
1709
+ },
1710
+ });
1711
+ insetProperty.register(Style);
1712
+ boxSizingProperty.register(Style);
829
1713
  alignItemsProperty.register(Style);
830
1714
  alignSelfProperty.register(Style);
831
1715
  justifyContentProperty.register(Style);
@@ -843,6 +1727,7 @@ columnGapProperty.register(Style);
843
1727
  gridRowGapProperty.register(Style);
844
1728
  gridColumnGapProperty.register(Style);
845
1729
  gapProperty.register(Style);
1730
+ gridGapProperty.register(Style);
846
1731
  aspectRatioProperty.register(Style);
847
1732
  alignContentProperty.register(Style);
848
1733
  justifyItemsProperty.register(Style);
@@ -859,6 +1744,7 @@ gridRowStartProperty.register(Style);
859
1744
  gridRowEndProperty.register(Style);
860
1745
  gridTemplateRowsProperty.register(Style);
861
1746
  gridTemplateColumnsProperty.register(Style);
1747
+ gridTemplateAreasProperty.register(Style);
862
1748
  overflowProperty.register(Style);
863
1749
  overflowXProperty.register(Style);
864
1750
  overflowYProperty.register(Style);