@triniwiz/nativescript-masonkit 1.0.0-alpha.9 → 1.0.0-beta.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 (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 +1121 -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 +58079 -23135
  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 +58076 -23132
  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 +58076 -23132
  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 +110 -53
  66. package/style.js +1176 -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/style.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { layout } from '@nativescript/core/utils';
2
+ import { Length as CoreLength } from '@nativescript/core';
2
3
  var StyleKeys;
3
4
  (function (StyleKeys) {
4
5
  StyleKeys[StyleKeys["DISPLAY"] = 0] = "DISPLAY";
@@ -81,20 +82,121 @@ var StyleKeys;
81
82
  StyleKeys[StyleKeys["BOX_SIZING"] = 308] = "BOX_SIZING";
82
83
  StyleKeys[StyleKeys["OVERFLOW"] = 312] = "OVERFLOW";
83
84
  StyleKeys[StyleKeys["ITEM_IS_TABLE"] = 316] = "ITEM_IS_TABLE";
85
+ StyleKeys[StyleKeys["ITEM_IS_REPLACED"] = 320] = "ITEM_IS_REPLACED";
86
+ StyleKeys[StyleKeys["DISPLAY_MODE"] = 324] = "DISPLAY_MODE";
87
+ StyleKeys[StyleKeys["FORCE_INLINE"] = 328] = "FORCE_INLINE";
88
+ StyleKeys[StyleKeys["MIN_CONTENT_WIDTH"] = 332] = "MIN_CONTENT_WIDTH";
89
+ StyleKeys[StyleKeys["MIN_CONTENT_HEIGHT"] = 336] = "MIN_CONTENT_HEIGHT";
90
+ StyleKeys[StyleKeys["MAX_CONTENT_WIDTH"] = 340] = "MAX_CONTENT_WIDTH";
91
+ StyleKeys[StyleKeys["MAX_CONTENT_HEIGHT"] = 344] = "MAX_CONTENT_HEIGHT";
92
+ // ----------------------------
93
+ // Border Style (per side)
94
+ // ----------------------------
95
+ StyleKeys[StyleKeys["BORDER_LEFT_STYLE"] = 348] = "BORDER_LEFT_STYLE";
96
+ StyleKeys[StyleKeys["BORDER_RIGHT_STYLE"] = 352] = "BORDER_RIGHT_STYLE";
97
+ StyleKeys[StyleKeys["BORDER_TOP_STYLE"] = 356] = "BORDER_TOP_STYLE";
98
+ StyleKeys[StyleKeys["BORDER_BOTTOM_STYLE"] = 360] = "BORDER_BOTTOM_STYLE";
99
+ // ----------------------------
100
+ // Border Color (per side)
101
+ // ----------------------------
102
+ StyleKeys[StyleKeys["BORDER_LEFT_COLOR"] = 364] = "BORDER_LEFT_COLOR";
103
+ StyleKeys[StyleKeys["BORDER_RIGHT_COLOR"] = 368] = "BORDER_RIGHT_COLOR";
104
+ StyleKeys[StyleKeys["BORDER_TOP_COLOR"] = 372] = "BORDER_TOP_COLOR";
105
+ StyleKeys[StyleKeys["BORDER_BOTTOM_COLOR"] = 376] = "BORDER_BOTTOM_COLOR";
106
+ // ============================================================
107
+ // Border Radius (elliptical + squircle exponent)
108
+ // Each corner = 20 bytes:
109
+ // x_type (4), x_value (4), y_type (4), y_value (4), exponent (4)
110
+ // ============================================================
111
+ // ----------------------------
112
+ // Top-left corner (20 bytes)
113
+ // ----------------------------
114
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_LEFT_X_TYPE"] = 380] = "BORDER_RADIUS_TOP_LEFT_X_TYPE";
115
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_LEFT_X_VALUE"] = 384] = "BORDER_RADIUS_TOP_LEFT_X_VALUE";
116
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_LEFT_Y_TYPE"] = 388] = "BORDER_RADIUS_TOP_LEFT_Y_TYPE";
117
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_LEFT_Y_VALUE"] = 392] = "BORDER_RADIUS_TOP_LEFT_Y_VALUE";
118
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_LEFT_EXPONENT"] = 396] = "BORDER_RADIUS_TOP_LEFT_EXPONENT";
119
+ // ----------------------------
120
+ // Top-right corner
121
+ // ----------------------------
122
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_RIGHT_X_TYPE"] = 400] = "BORDER_RADIUS_TOP_RIGHT_X_TYPE";
123
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_RIGHT_X_VALUE"] = 404] = "BORDER_RADIUS_TOP_RIGHT_X_VALUE";
124
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_RIGHT_Y_TYPE"] = 408] = "BORDER_RADIUS_TOP_RIGHT_Y_TYPE";
125
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_RIGHT_Y_VALUE"] = 412] = "BORDER_RADIUS_TOP_RIGHT_Y_VALUE";
126
+ StyleKeys[StyleKeys["BORDER_RADIUS_TOP_RIGHT_EXPONENT"] = 416] = "BORDER_RADIUS_TOP_RIGHT_EXPONENT";
127
+ // ----------------------------
128
+ // Bottom-right corner
129
+ // ----------------------------
130
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_RIGHT_X_TYPE"] = 420] = "BORDER_RADIUS_BOTTOM_RIGHT_X_TYPE";
131
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_RIGHT_X_VALUE"] = 424] = "BORDER_RADIUS_BOTTOM_RIGHT_X_VALUE";
132
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_RIGHT_Y_TYPE"] = 428] = "BORDER_RADIUS_BOTTOM_RIGHT_Y_TYPE";
133
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_RIGHT_Y_VALUE"] = 432] = "BORDER_RADIUS_BOTTOM_RIGHT_Y_VALUE";
134
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_RIGHT_EXPONENT"] = 436] = "BORDER_RADIUS_BOTTOM_RIGHT_EXPONENT";
135
+ // ----------------------------
136
+ // Bottom-left corner
137
+ // ----------------------------
138
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_LEFT_X_TYPE"] = 440] = "BORDER_RADIUS_BOTTOM_LEFT_X_TYPE";
139
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_LEFT_X_VALUE"] = 444] = "BORDER_RADIUS_BOTTOM_LEFT_X_VALUE";
140
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_LEFT_Y_TYPE"] = 448] = "BORDER_RADIUS_BOTTOM_LEFT_Y_TYPE";
141
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_LEFT_Y_VALUE"] = 452] = "BORDER_RADIUS_BOTTOM_LEFT_Y_VALUE";
142
+ StyleKeys[StyleKeys["BORDER_RADIUS_BOTTOM_LEFT_EXPONENT"] = 456] = "BORDER_RADIUS_BOTTOM_LEFT_EXPONENT";
143
+ // ----------------------------
144
+ // Float
145
+ // ----------------------------
146
+ StyleKeys[StyleKeys["FLOAT"] = 460] = "FLOAT";
147
+ StyleKeys[StyleKeys["CLEAR"] = 464] = "CLEAR";
148
+ StyleKeys[StyleKeys["OBJECT_FIT"] = 468] = "OBJECT_FIT";
149
+ StyleKeys[StyleKeys["FONT_METRICS_ASCENT_OFFSET"] = 472] = "FONT_METRICS_ASCENT_OFFSET";
150
+ StyleKeys[StyleKeys["FONT_METRICS_DESCENT_OFFSET"] = 476] = "FONT_METRICS_DESCENT_OFFSET";
151
+ StyleKeys[StyleKeys["FONT_METRICS_X_HEIGHT_OFFSET"] = 480] = "FONT_METRICS_X_HEIGHT_OFFSET";
152
+ StyleKeys[StyleKeys["FONT_METRICS_LEADING_OFFSET"] = 484] = "FONT_METRICS_LEADING_OFFSET";
153
+ StyleKeys[StyleKeys["FONT_METRICS_CAP_HEIGHT_OFFSET"] = 488] = "FONT_METRICS_CAP_HEIGHT_OFFSET";
154
+ StyleKeys[StyleKeys["VERTICAL_ALIGN_OFFSET_OFFSET"] = 492] = "VERTICAL_ALIGN_OFFSET_OFFSET";
155
+ StyleKeys[StyleKeys["VERTICAL_ALIGN_IS_PERCENT_OFFSET"] = 496] = "VERTICAL_ALIGN_IS_PERCENT_OFFSET";
156
+ StyleKeys[StyleKeys["VERTICAL_ALIGN_ENUM_OFFSET"] = 500] = "VERTICAL_ALIGN_ENUM_OFFSET";
157
+ StyleKeys[StyleKeys["FIRST_BASELINE_OFFSET"] = 504] = "FIRST_BASELINE_OFFSET";
84
158
  })(StyleKeys || (StyleKeys = {}));
85
159
  var TextStyleKeys;
86
160
  (function (TextStyleKeys) {
87
161
  TextStyleKeys[TextStyleKeys["COLOR"] = 0] = "COLOR";
88
- TextStyleKeys[TextStyleKeys["DECORATION_LINE"] = 4] = "DECORATION_LINE";
89
- TextStyleKeys[TextStyleKeys["DECORATION_COLOR"] = 8] = "DECORATION_COLOR";
90
- TextStyleKeys[TextStyleKeys["TEXT_ALIGN"] = 12] = "TEXT_ALIGN";
91
- TextStyleKeys[TextStyleKeys["TEXT_JUSTIFY"] = 16] = "TEXT_JUSTIFY";
92
- TextStyleKeys[TextStyleKeys["BACKGROUND_COLOR"] = 20] = "BACKGROUND_COLOR";
93
- TextStyleKeys[TextStyleKeys["SIZE"] = 24] = "SIZE";
94
- TextStyleKeys[TextStyleKeys["TRANSFORM"] = 28] = "TRANSFORM";
95
- TextStyleKeys[TextStyleKeys["FONT_STYLE_TYPE"] = 32] = "FONT_STYLE_TYPE";
96
- TextStyleKeys[TextStyleKeys["FONT_STYLE_SLANT"] = 36] = "FONT_STYLE_SLANT";
97
- TextStyleKeys[TextStyleKeys["TEXT_WRAP"] = 40] = "TEXT_WRAP";
162
+ TextStyleKeys[TextStyleKeys["COLOR_STATE"] = 4] = "COLOR_STATE";
163
+ TextStyleKeys[TextStyleKeys["SIZE"] = 8] = "SIZE";
164
+ TextStyleKeys[TextStyleKeys["SIZE_TYPE"] = 12] = "SIZE_TYPE";
165
+ TextStyleKeys[TextStyleKeys["SIZE_STATE"] = 13] = "SIZE_STATE";
166
+ TextStyleKeys[TextStyleKeys["FONT_WEIGHT"] = 16] = "FONT_WEIGHT";
167
+ TextStyleKeys[TextStyleKeys["FONT_WEIGHT_STATE"] = 20] = "FONT_WEIGHT_STATE";
168
+ TextStyleKeys[TextStyleKeys["FONT_STYLE_SLANT"] = 24] = "FONT_STYLE_SLANT";
169
+ TextStyleKeys[TextStyleKeys["FONT_STYLE_TYPE"] = 28] = "FONT_STYLE_TYPE";
170
+ TextStyleKeys[TextStyleKeys["FONT_STYLE_STATE"] = 29] = "FONT_STYLE_STATE";
171
+ TextStyleKeys[TextStyleKeys["FONT_FAMILY_STATE"] = 30] = "FONT_FAMILY_STATE";
172
+ TextStyleKeys[TextStyleKeys["FONT_RESOLVED_DIRTY"] = 31] = "FONT_RESOLVED_DIRTY";
173
+ TextStyleKeys[TextStyleKeys["BACKGROUND_COLOR"] = 32] = "BACKGROUND_COLOR";
174
+ TextStyleKeys[TextStyleKeys["BACKGROUND_COLOR_STATE"] = 36] = "BACKGROUND_COLOR_STATE";
175
+ TextStyleKeys[TextStyleKeys["DECORATION_LINE"] = 40] = "DECORATION_LINE";
176
+ TextStyleKeys[TextStyleKeys["DECORATION_LINE_STATE"] = 44] = "DECORATION_LINE_STATE";
177
+ TextStyleKeys[TextStyleKeys["DECORATION_COLOR"] = 48] = "DECORATION_COLOR";
178
+ TextStyleKeys[TextStyleKeys["DECORATION_COLOR_STATE"] = 52] = "DECORATION_COLOR_STATE";
179
+ TextStyleKeys[TextStyleKeys["DECORATION_STYLE"] = 56] = "DECORATION_STYLE";
180
+ TextStyleKeys[TextStyleKeys["DECORATION_STYLE_STATE"] = 60] = "DECORATION_STYLE_STATE";
181
+ TextStyleKeys[TextStyleKeys["LETTER_SPACING"] = 64] = "LETTER_SPACING";
182
+ TextStyleKeys[TextStyleKeys["LETTER_SPACING_STATE"] = 68] = "LETTER_SPACING_STATE";
183
+ TextStyleKeys[TextStyleKeys["TEXT_WRAP"] = 72] = "TEXT_WRAP";
184
+ TextStyleKeys[TextStyleKeys["TEXT_WRAP_STATE"] = 76] = "TEXT_WRAP_STATE";
185
+ TextStyleKeys[TextStyleKeys["WHITE_SPACE"] = 80] = "WHITE_SPACE";
186
+ TextStyleKeys[TextStyleKeys["WHITE_SPACE_STATE"] = 84] = "WHITE_SPACE_STATE";
187
+ TextStyleKeys[TextStyleKeys["TRANSFORM"] = 88] = "TRANSFORM";
188
+ TextStyleKeys[TextStyleKeys["TRANSFORM_STATE"] = 92] = "TRANSFORM_STATE";
189
+ TextStyleKeys[TextStyleKeys["TEXT_ALIGN"] = 96] = "TEXT_ALIGN";
190
+ TextStyleKeys[TextStyleKeys["TEXT_ALIGN_STATE"] = 100] = "TEXT_ALIGN_STATE";
191
+ TextStyleKeys[TextStyleKeys["TEXT_JUSTIFY"] = 104] = "TEXT_JUSTIFY";
192
+ TextStyleKeys[TextStyleKeys["TEXT_JUSTIFY_STATE"] = 108] = "TEXT_JUSTIFY_STATE";
193
+ TextStyleKeys[TextStyleKeys["TEXT_INDENT"] = 112] = "TEXT_INDENT";
194
+ TextStyleKeys[TextStyleKeys["TEXT_INDENT_STATE"] = 116] = "TEXT_INDENT_STATE";
195
+ TextStyleKeys[TextStyleKeys["TEXT_OVERFLOW"] = 120] = "TEXT_OVERFLOW";
196
+ TextStyleKeys[TextStyleKeys["TEXT_OVERFLOW_STATE"] = 124] = "TEXT_OVERFLOW_STATE";
197
+ TextStyleKeys[TextStyleKeys["LINE_HEIGHT"] = 128] = "LINE_HEIGHT";
198
+ TextStyleKeys[TextStyleKeys["LINE_HEIGHT_TYPE"] = 132] = "LINE_HEIGHT_TYPE";
199
+ TextStyleKeys[TextStyleKeys["LINE_HEIGHT_STATE"] = 133] = "LINE_HEIGHT_STATE";
98
200
  })(TextStyleKeys || (TextStyleKeys = {}));
99
201
  function parseLengthPercentageAuto(type, value) {
100
202
  switch (type) {
@@ -161,6 +263,16 @@ StateKeys.TEXT_ALIGN = new StateKeys(1n << 29n);
161
263
  StateKeys.BOX_SIZING = new StateKeys(1n << 30n);
162
264
  StateKeys.OVERFLOW = new StateKeys(1n << 31n);
163
265
  StateKeys.ITEM_IS_TABLE = new StateKeys(1n << 32n);
266
+ StateKeys.ITEM_IS_REPLACED = new StateKeys(1n << 33n);
267
+ StateKeys.DISPLAY_MODE = new StateKeys(1n << 34n);
268
+ StateKeys.FORCE_INLINE = new StateKeys(1n << 35n);
269
+ StateKeys.MIN_CONTENT_WIDTH = new StateKeys(1n << 36n);
270
+ StateKeys.MIN_CONTENT_HEIGHT = new StateKeys(1n << 37n);
271
+ StateKeys.MAX_CONTENT_WIDTH = new StateKeys(1n << 38n);
272
+ StateKeys.MAX_CONTENT_HEIGHT = new StateKeys(1n << 39n);
273
+ StateKeys.BORDER_STYLE = new StateKeys(1n << 40n);
274
+ StateKeys.BORDER_RADIUS = new StateKeys(1n << 41n);
275
+ StateKeys.BORDER_COLOR = new StateKeys(1n << 42n);
164
276
  class TextStateKeys {
165
277
  constructor(bits) {
166
278
  this.bits = bits;
@@ -175,17 +287,43 @@ class TextStateKeys {
175
287
  return (this.bits & flag.bits) !== 0n;
176
288
  }
177
289
  }
290
+ TextStateKeys.ALL = new TextStateKeys(-1n);
291
+ TextStateKeys.NONE = new TextStateKeys(0n);
178
292
  TextStateKeys.COLOR = new TextStateKeys(1n << 0n);
179
- TextStateKeys.DECORATION_LINE = new TextStateKeys(1n << 1n);
180
- TextStateKeys.DECORATION_COLOR = new TextStateKeys(1n << 2n);
181
- TextStateKeys.TEXT_ALIGN = new TextStateKeys(1n << 3n);
182
- TextStateKeys.TEXT_JUSTIFY = new TextStateKeys(1n << 4n);
183
- TextStateKeys.BACKGROUND_COLOR = new TextStateKeys(1n << 5n);
184
- TextStateKeys.SIZE = new TextStateKeys(1n << 6n);
185
- TextStateKeys.TRANSFORM = new TextStateKeys(1n << 7n);
186
- TextStateKeys.FONT_STYLE = new TextStateKeys(1n << 8n);
187
- TextStateKeys.FONT_STYLE_SLANT = new TextStateKeys(1n << 9n);
293
+ TextStateKeys.SIZE = new TextStateKeys(1n << 1n);
294
+ TextStateKeys.FONT_WEIGHT = new TextStateKeys(1n << 2n);
295
+ TextStateKeys.FONT_STYLE = new TextStateKeys(1n << 3n);
296
+ TextStateKeys.FONT_FAMILY = new TextStateKeys(1n << 4n);
297
+ TextStateKeys.LETTER_SPACING = new TextStateKeys(1n << 5n);
298
+ TextStateKeys.DECORATION_LINE = new TextStateKeys(1n << 6n);
299
+ TextStateKeys.DECORATION_COLOR = new TextStateKeys(1n << 7n);
300
+ TextStateKeys.DECORATION_STYLE = new TextStateKeys(1n << 8n);
301
+ TextStateKeys.BACKGROUND_COLOR = new TextStateKeys(1n << 9n);
188
302
  TextStateKeys.TEXT_WRAP = new TextStateKeys(1n << 10n);
303
+ TextStateKeys.WHITE_SPACE = new TextStateKeys(1n << 11n);
304
+ TextStateKeys.TRANSFORM = new TextStateKeys(1n << 12n);
305
+ TextStateKeys.TEXT_JUSTIFY = new TextStateKeys(1n << 13n);
306
+ TextStateKeys.TEXT_OVERFLOW = new TextStateKeys(1n << 14n);
307
+ TextStateKeys.LINE_HEIGHT = new TextStateKeys(1n << 15n);
308
+ TextStateKeys.TEXT_ALIGN = new TextStateKeys(1n << 16n);
309
+ const getInt8 = (view, offset) => {
310
+ return view.getInt8(offset);
311
+ };
312
+ const setInt8 = (view, offset, value) => {
313
+ view.setInt8(offset, value);
314
+ };
315
+ const getUint8 = (view, offset) => {
316
+ return view.getUint8(offset);
317
+ };
318
+ const setUint8 = (view, offset, value) => {
319
+ view.setUint8(offset, value);
320
+ };
321
+ const getInt16 = (view, offset) => {
322
+ return view.getInt16(offset, true);
323
+ };
324
+ const setInt16 = (view, offset, value) => {
325
+ view.setInt16(offset, value, true);
326
+ };
189
327
  const getUint32 = (view, offset) => {
190
328
  return view.getUint32(offset, true);
191
329
  };
@@ -210,45 +348,36 @@ export class Style {
210
348
  this.isTextDirty = -1n;
211
349
  this.inBatch = false;
212
350
  }
213
- static fromView(view, nativeView, isText = false) {
351
+ static fromView(view, nativeView) {
214
352
  //console.time('fromView');
215
353
  const ret = new Style();
216
354
  ret.view_ = view;
355
+ ret.nativeView = nativeView;
217
356
  if (__ANDROID__) {
218
- const style = nativeView.getStyle();
219
- if (!isText) {
220
- const styleBuffer = style.getValues();
221
- const buffer = ArrayBuffer.from(styleBuffer);
222
- ret.style_view = new DataView(buffer);
223
- }
224
- else {
225
- const styleBuffer = style.getValues();
226
- const buffer = ArrayBuffer.from(styleBuffer);
227
- ret.style_view = new DataView(buffer);
228
- const textStyleBuffer = nativeView.getTextValues();
229
- const textBuffer = ArrayBuffer.from(textStyleBuffer);
230
- ret.text_style_view = new DataView(textBuffer);
357
+ let style = nativeView?.getStyle?.();
358
+ if (!style) {
359
+ // if a non mason view is passed
360
+ style = org.nativescript.mason.masonkit.Mason.getShared().styleForView(nativeView);
231
361
  }
362
+ const styleBuffer = style.getValues();
363
+ const buffer = ArrayBuffer.from(styleBuffer);
364
+ ret.style_view = new DataView(buffer);
365
+ const textStyleBuffer = style.getTextValues();
366
+ const textBuffer = ArrayBuffer.from(textStyleBuffer);
367
+ ret.text_style_view = new DataView(textBuffer);
232
368
  }
233
369
  else if (__APPLE__) {
234
- const style = nativeView.style;
235
- if (!isText) {
236
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
237
- // @ts-ignore
238
- const styleBuffer = style.valuesCompat;
239
- const buffer = interop.bufferFromData(styleBuffer);
240
- ret.style_view = new DataView(buffer);
241
- }
242
- else {
243
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
244
- // @ts-ignore
245
- const styleBuffer = style.valuesCompat;
246
- const buffer = interop.bufferFromData(styleBuffer);
247
- ret.style_view = new DataView(buffer);
248
- const textStyleBuffer = nativeView.textValues;
249
- const textBuffer = interop.bufferFromData(textStyleBuffer);
250
- ret.text_style_view = new DataView(textBuffer);
370
+ let style = nativeView?.style;
371
+ if (!style) {
372
+ style = NSCMason.shared.styleForView(nativeView);
251
373
  }
374
+ const styleBuffer = style.values;
375
+ const buffer = interop.bufferFromData(styleBuffer);
376
+ ret.style_view = new DataView(buffer);
377
+ //@ts-ignore
378
+ const textStyleBuffer = style.textValues;
379
+ const textBuffer = interop.bufferFromData(textStyleBuffer);
380
+ ret.text_style_view = new DataView(textBuffer);
252
381
  }
253
382
  //console.timeEnd('fromView');
254
383
  return ret;
@@ -257,30 +386,17 @@ export class Style {
257
386
  this.isDirty = -1n;
258
387
  this.isTextDirty = -1n;
259
388
  }
260
- syncStyle(isText = false) {
261
- // console.time('syncStyle');
389
+ syncStyle() {
262
390
  if (__ANDROID__) {
263
- if (!isText) {
264
- const view = this.view.android;
265
- view.syncStyle(this.isDirty.toString());
266
- }
267
- else {
268
- const view = this.view.android;
269
- view.syncStyle(this.isDirty.toString(), this.isTextDirty.toString());
270
- }
391
+ const view = this.view.android;
392
+ view.syncStyle(this.isDirty.toString(), this.isTextDirty.toString());
271
393
  }
272
394
  else if (__APPLE__) {
273
- if (!isText) {
274
- const view = this.view.ios;
275
- view.syncStyle(this.isDirty.toString());
276
- }
277
- else {
278
- const view = this.view.ios;
279
- view.syncStyle(this.isDirty.toString(), this.isTextDirty.toString());
280
- }
395
+ const view = this.view.ios;
396
+ // @ts-ignore
397
+ view.mason_syncStyle(this.isDirty.toString(), this.isTextDirty.toString());
281
398
  }
282
399
  this.resetState();
283
- // console.timeEnd('syncStyle');
284
400
  }
285
401
  setOrAppendState(value) {
286
402
  if (this.isDirty == -1n) {
@@ -290,7 +406,7 @@ export class Style {
290
406
  this.isDirty = this.isDirty | value.bits;
291
407
  }
292
408
  if (!this.inBatch) {
293
- this.syncStyle(this.text_style_view != null);
409
+ this.syncStyle();
294
410
  }
295
411
  }
296
412
  setOrAppendTextState(value) {
@@ -301,18 +417,184 @@ export class Style {
301
417
  this.isTextDirty = this.isTextDirty | value.bits;
302
418
  }
303
419
  if (!this.inBatch) {
304
- this.syncStyle(this.text_style_view != null);
420
+ this.syncStyle();
305
421
  }
306
422
  }
307
423
  batch(fn) {
308
424
  this.inBatch = true;
309
425
  fn(this);
310
426
  this.inBatch = false;
311
- this.syncStyle(this.text_style_view != null);
427
+ this.syncStyle();
312
428
  }
313
429
  get view() {
314
430
  return this.view_;
315
431
  }
432
+ get boxSizing() {
433
+ switch (getUint32(this.style_view, StyleKeys.BOX_SIZING)) {
434
+ case 0:
435
+ return 'border-box';
436
+ case 1:
437
+ return 'content-box';
438
+ }
439
+ }
440
+ set boxSizing(value) {
441
+ let boxSizing = -1;
442
+ switch (value) {
443
+ case 'border-box':
444
+ boxSizing = 0;
445
+ break;
446
+ case 'content-box':
447
+ boxSizing = 1;
448
+ break;
449
+ }
450
+ if (boxSizing !== -1) {
451
+ setUint32(this.style_view, StyleKeys.BOX_SIZING, boxSizing);
452
+ this.setOrAppendState(StateKeys.BOX_SIZING);
453
+ }
454
+ }
455
+ get fontSize() {
456
+ if (!this.text_style_view) {
457
+ // BLACK ?
458
+ return 16;
459
+ }
460
+ const type = getUint8(this.text_style_view, TextStyleKeys.SIZE_TYPE);
461
+ const value = getInt32(this.text_style_view, TextStyleKeys.SIZE);
462
+ if (type === 1) {
463
+ return `${value / 100}%`;
464
+ }
465
+ return value;
466
+ }
467
+ set fontSize(value) {
468
+ if (!this.text_style_view) {
469
+ return;
470
+ }
471
+ switch (typeof value) {
472
+ case 'number':
473
+ setInt32(this.text_style_view, TextStyleKeys.SIZE, value);
474
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_STATE, 1);
475
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_TYPE, 0);
476
+ this.setOrAppendTextState(TextStateKeys.SIZE);
477
+ break;
478
+ case 'object':
479
+ switch (value.unit) {
480
+ case 'dip':
481
+ setInt32(this.text_style_view, TextStyleKeys.SIZE, value.value);
482
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_STATE, 1);
483
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_TYPE, 0);
484
+ this.setOrAppendTextState(TextStateKeys.SIZE);
485
+ break;
486
+ case 'px':
487
+ setInt32(this.text_style_view, TextStyleKeys.SIZE, layout.toDeviceIndependentPixels(value.value));
488
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_STATE, 1);
489
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_TYPE, 0);
490
+ this.setOrAppendTextState(TextStateKeys.SIZE);
491
+ break;
492
+ case '%':
493
+ setInt32(this.text_style_view, TextStyleKeys.SIZE, value.value * 100);
494
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_STATE, 1);
495
+ setInt8(this.text_style_view, TextStyleKeys.SIZE_TYPE, 1);
496
+ this.setOrAppendTextState(TextStateKeys.SIZE);
497
+ break;
498
+ }
499
+ break;
500
+ }
501
+ if (value && typeof value === 'object') {
502
+ }
503
+ else {
504
+ }
505
+ }
506
+ get fontStyle() {
507
+ if (!this.text_style_view) {
508
+ // normal ?
509
+ return 'normal';
510
+ }
511
+ switch (getInt32(this.text_style_view, TextStyleKeys.FONT_STYLE_TYPE)) {
512
+ case 0:
513
+ return 'normal';
514
+ case 1:
515
+ return 'italic';
516
+ case 2:
517
+ return 'oblique';
518
+ default:
519
+ return 'normal';
520
+ }
521
+ }
522
+ set fontStyle(value) {
523
+ if (!this.text_style_view) {
524
+ return;
525
+ }
526
+ let style = -1;
527
+ switch (value) {
528
+ case 'normal':
529
+ style = 0;
530
+ break;
531
+ case 'italic':
532
+ style = 1;
533
+ break;
534
+ case 'oblique':
535
+ style = 2;
536
+ break;
537
+ }
538
+ if (style !== -1) {
539
+ setInt32(this.text_style_view, TextStyleKeys.FONT_STYLE_TYPE, style);
540
+ setInt8(this.text_style_view, TextStyleKeys.FONT_STYLE_STATE, 1);
541
+ this.setOrAppendTextState(TextStateKeys.FONT_STYLE);
542
+ }
543
+ }
544
+ get fontWeight() {
545
+ if (!this.text_style_view) {
546
+ // BLACK ?
547
+ return 400;
548
+ }
549
+ return getInt32(this.text_style_view, TextStyleKeys.FONT_WEIGHT);
550
+ }
551
+ set fontWeight(value) {
552
+ if (!this.text_style_view) {
553
+ return;
554
+ }
555
+ let weight = -1;
556
+ switch (value) {
557
+ case '100':
558
+ weight = 100;
559
+ break;
560
+ case '200':
561
+ weight = 200;
562
+ break;
563
+ case '300':
564
+ weight = 300;
565
+ break;
566
+ case 'normal':
567
+ case '400':
568
+ weight = 400;
569
+ break;
570
+ case '500':
571
+ weight = 500;
572
+ break;
573
+ case '600':
574
+ weight = 600;
575
+ break;
576
+ case '700':
577
+ case 'bold':
578
+ weight = 700;
579
+ break;
580
+ case '800':
581
+ weight = 800;
582
+ break;
583
+ case '900':
584
+ weight = 900;
585
+ break;
586
+ default:
587
+ if (typeof value === 'number' && value >= 100 && value <= 1000) {
588
+ weight = value;
589
+ }
590
+ break;
591
+ }
592
+ if (weight !== -1) {
593
+ setInt32(this.text_style_view, TextStyleKeys.FONT_WEIGHT, weight);
594
+ setInt8(this.text_style_view, TextStyleKeys.FONT_WEIGHT_STATE, 1);
595
+ this.setOrAppendTextState(TextStateKeys.FONT_WEIGHT);
596
+ }
597
+ }
316
598
  get color() {
317
599
  if (!this.text_style_view) {
318
600
  // BLACK ?
@@ -325,6 +607,7 @@ export class Style {
325
607
  return;
326
608
  }
327
609
  setUint32(this.text_style_view, TextStyleKeys.COLOR, value);
610
+ setInt8(this.text_style_view, TextStyleKeys.COLOR_STATE, 1);
328
611
  this.setOrAppendTextState(TextStateKeys.COLOR);
329
612
  }
330
613
  get backgroundColor() {
@@ -339,6 +622,7 @@ export class Style {
339
622
  return;
340
623
  }
341
624
  setUint32(this.text_style_view, TextStyleKeys.BACKGROUND_COLOR, value);
625
+ setInt8(this.text_style_view, TextStyleKeys.BACKGROUND_COLOR_STATE, 1);
342
626
  this.setOrAppendTextState(TextStateKeys.BACKGROUND_COLOR);
343
627
  }
344
628
  get textWrap() {
@@ -346,32 +630,66 @@ export class Style {
346
630
  // BLACK ?
347
631
  return 0;
348
632
  }
349
- return getInt32(this.text_style_view, TextStyleKeys.TEXT_ALIGN);
633
+ return getInt32(this.text_style_view, TextStyleKeys.TEXT_WRAP);
350
634
  }
351
635
  set textWrap(value) {
352
636
  if (!this.text_style_view) {
353
637
  return;
354
638
  }
355
- setInt32(this.text_style_view, TextStyleKeys.TEXT_WRAP, value);
356
- this.setOrAppendTextState(TextStateKeys.TEXT_WRAP);
639
+ let wrap = -1;
640
+ switch (value) {
641
+ case 'nowrap':
642
+ wrap = 0;
643
+ break;
644
+ case 'wrap':
645
+ wrap = 1;
646
+ break;
647
+ case 'balance':
648
+ wrap = 2;
649
+ break;
650
+ }
651
+ if (typeof value === 'number' && value >= 0 && value < 3) {
652
+ wrap = value;
653
+ }
654
+ if (wrap !== -1) {
655
+ setInt32(this.text_style_view, TextStyleKeys.TEXT_WRAP, wrap);
656
+ setInt8(this.text_style_view, TextStyleKeys.TEXT_WRAP_STATE, 1);
657
+ this.setOrAppendTextState(TextStateKeys.TEXT_WRAP);
658
+ }
357
659
  }
358
660
  get styleView() {
359
661
  return this.style_view;
360
662
  }
361
663
  get display() {
664
+ const mode = getInt32(this.style_view, StyleKeys.DISPLAY_MODE);
665
+ if (mode === 1 /* DisplayMode.Inline */) {
666
+ return 'inline';
667
+ }
362
668
  switch (getInt32(this.style_view, StyleKeys.DISPLAY)) {
363
669
  case 0:
364
670
  return 'none';
365
671
  case 1:
672
+ if (mode === 2 /* DisplayMode.Box */) {
673
+ return 'inline-flex';
674
+ }
366
675
  return 'flex';
367
676
  case 2:
677
+ if (mode === 2 /* DisplayMode.Box */) {
678
+ return 'inline-grid';
679
+ }
368
680
  return 'grid';
369
681
  case 3:
682
+ if (mode === 2 /* DisplayMode.Box */) {
683
+ return 'inline-block';
684
+ }
370
685
  return 'block';
686
+ default:
687
+ return 'none';
371
688
  }
372
689
  }
373
690
  set display(value) {
374
691
  let display = -1;
692
+ let displayMode = 0;
375
693
  switch (value) {
376
694
  case 'none':
377
695
  display = 0;
@@ -385,9 +703,28 @@ export class Style {
385
703
  case 'block':
386
704
  display = 3;
387
705
  break;
706
+ case 'inline':
707
+ // inline
708
+ display = 1;
709
+ displayMode = 1;
710
+ break;
711
+ case 'inline-block':
712
+ // inline-block
713
+ display = 3;
714
+ displayMode = 2;
715
+ break;
716
+ case 'inline-flex':
717
+ display = 1;
718
+ displayMode = 2;
719
+ break;
720
+ case 'inline-grid':
721
+ display = 2;
722
+ displayMode = 2;
723
+ break;
388
724
  }
389
725
  if (display != -1) {
390
726
  setInt32(this.style_view, StyleKeys.DISPLAY, display);
727
+ setInt32(this.style_view, StyleKeys.DISPLAY_MODE, displayMode);
391
728
  this.setOrAppendState(StateKeys.DISPLAY);
392
729
  }
393
730
  }
@@ -421,9 +758,9 @@ export class Style {
421
758
  case 1:
422
759
  return 'row';
423
760
  case 2:
424
- return 'column-reverse';
425
- case 3:
426
761
  return 'row-reverse';
762
+ case 3:
763
+ return 'column-reverse';
427
764
  }
428
765
  }
429
766
  set flexDirection(value) {
@@ -435,10 +772,10 @@ export class Style {
435
772
  case 'row':
436
773
  flex = 1;
437
774
  break;
438
- case 'column-reverse':
775
+ case 'row-reverse':
439
776
  flex = 2;
440
777
  break;
441
- case 'row-reverse':
778
+ case 'column-reverse':
442
779
  flex = 3;
443
780
  break;
444
781
  }
@@ -551,7 +888,6 @@ export class Style {
551
888
  return parseLengthPercentageAuto(type, value);
552
889
  }
553
890
  set width(value) {
554
- console.log('set width', value);
555
891
  switch (typeof value) {
556
892
  case 'string':
557
893
  setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 0);
@@ -679,12 +1015,12 @@ export class Style {
679
1015
  }
680
1016
  this.setOrAppendState(StateKeys.MAX_SIZE);
681
1017
  }
682
- get borderLeft() {
1018
+ get borderLeftWidth() {
683
1019
  const type = getInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE);
684
1020
  const value = getFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE);
685
1021
  return parseLengthPercentage(type, value);
686
1022
  }
687
- set borderLeft(value) {
1023
+ set borderLeftWidth(value) {
688
1024
  switch (typeof value) {
689
1025
  case 'number':
690
1026
  setInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE, 0);
@@ -709,12 +1045,12 @@ export class Style {
709
1045
  }
710
1046
  this.setOrAppendState(StateKeys.BORDER);
711
1047
  }
712
- get borderRight() {
1048
+ get borderRightWidth() {
713
1049
  const type = getInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE);
714
1050
  const value = getFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE);
715
1051
  return parseLengthPercentage(type, value);
716
1052
  }
717
- set borderRight(value) {
1053
+ set borderRightWidth(value) {
718
1054
  switch (typeof value) {
719
1055
  case 'number':
720
1056
  setInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE, 0);
@@ -739,12 +1075,12 @@ export class Style {
739
1075
  }
740
1076
  this.setOrAppendState(StateKeys.BORDER);
741
1077
  }
742
- get borderTop() {
1078
+ get borderTopWidth() {
743
1079
  const type = getInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE);
744
1080
  const value = getFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE);
745
1081
  return parseLengthPercentage(type, value);
746
1082
  }
747
- set borderTop(value) {
1083
+ set borderTopWidth(value) {
748
1084
  switch (typeof value) {
749
1085
  case 'number':
750
1086
  setInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE, 0);
@@ -769,12 +1105,12 @@ export class Style {
769
1105
  }
770
1106
  this.setOrAppendState(StateKeys.BORDER);
771
1107
  }
772
- get borderBottom() {
1108
+ get borderBottomWidth() {
773
1109
  const type = getInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE);
774
1110
  const value = getFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE);
775
1111
  return parseLengthPercentage(type, value);
776
1112
  }
777
- set borderBottom(value) {
1113
+ set borderBottomWidth(value) {
778
1114
  switch (typeof value) {
779
1115
  case 'number':
780
1116
  setInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE, 0);
@@ -802,26 +1138,31 @@ export class Style {
802
1138
  get left() {
803
1139
  const type = getInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE);
804
1140
  const value = getFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE);
805
- return parseLengthPercentage(type, value);
1141
+ return parseLengthPercentageAuto(type, value);
806
1142
  }
807
1143
  set left(value) {
1144
+ if (value === 'auto') {
1145
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
1146
+ setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, 0);
1147
+ return;
1148
+ }
808
1149
  switch (typeof value) {
809
1150
  case 'number':
810
- setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
1151
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 1);
811
1152
  setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, layout.toDevicePixels(value));
812
1153
  break;
813
1154
  case 'object':
814
1155
  switch (value.unit) {
815
1156
  case 'dip':
816
- setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
1157
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 1);
817
1158
  setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, layout.toDevicePixels(value.value));
818
1159
  break;
819
1160
  case 'px':
820
- setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
1161
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 1);
821
1162
  setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, value.value);
822
1163
  break;
823
1164
  case '%':
824
- setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 1);
1165
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 2);
825
1166
  setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, value.value);
826
1167
  break;
827
1168
  }
@@ -832,26 +1173,31 @@ export class Style {
832
1173
  get right() {
833
1174
  const type = getInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE);
834
1175
  const value = getFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE);
835
- return parseLengthPercentage(type, value);
1176
+ return parseLengthPercentageAuto(type, value);
836
1177
  }
837
1178
  set right(value) {
1179
+ if (value === 'auto') {
1180
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
1181
+ setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, 0);
1182
+ return;
1183
+ }
838
1184
  switch (typeof value) {
839
1185
  case 'number':
840
- setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
1186
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 1);
841
1187
  setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, layout.toDevicePixels(value));
842
1188
  break;
843
1189
  case 'object':
844
1190
  switch (value.unit) {
845
1191
  case 'dip':
846
- setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
1192
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 1);
847
1193
  setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, layout.toDevicePixels(value.value));
848
1194
  break;
849
1195
  case 'px':
850
- setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
1196
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 1);
851
1197
  setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, value.value);
852
1198
  break;
853
1199
  case '%':
854
- setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 1);
1200
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 2);
855
1201
  setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, value.value);
856
1202
  break;
857
1203
  }
@@ -862,26 +1208,31 @@ export class Style {
862
1208
  get top() {
863
1209
  const type = getInt32(this.style_view, StyleKeys.INSET_TOP_TYPE);
864
1210
  const value = getFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE);
865
- return parseLengthPercentage(type, value);
1211
+ return parseLengthPercentageAuto(type, value);
866
1212
  }
867
1213
  set top(value) {
1214
+ if (value === 'auto') {
1215
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
1216
+ setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, 0);
1217
+ return;
1218
+ }
868
1219
  switch (typeof value) {
869
1220
  case 'number':
870
- setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
1221
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 1);
871
1222
  setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, layout.toDevicePixels(value));
872
1223
  break;
873
1224
  case 'object':
874
1225
  switch (value.unit) {
875
1226
  case 'dip':
876
- setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
1227
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 1);
877
1228
  setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, layout.toDevicePixels(value.value));
878
1229
  break;
879
1230
  case 'px':
880
- setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
1231
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 1);
881
1232
  setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, value.value);
882
1233
  break;
883
1234
  case '%':
884
- setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 1);
1235
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 2);
885
1236
  setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, value.value);
886
1237
  break;
887
1238
  }
@@ -892,26 +1243,31 @@ export class Style {
892
1243
  get bottom() {
893
1244
  const type = getInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE);
894
1245
  const value = getFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE);
895
- return parseLengthPercentage(type, value);
1246
+ return parseLengthPercentageAuto(type, value);
896
1247
  }
897
1248
  set bottom(value) {
1249
+ if (value === 'auto') {
1250
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
1251
+ setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, 0);
1252
+ return;
1253
+ }
898
1254
  switch (typeof value) {
899
1255
  case 'number':
900
- setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
1256
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 1);
901
1257
  setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, layout.toDevicePixels(value));
902
1258
  break;
903
1259
  case 'object':
904
1260
  switch (value.unit) {
905
1261
  case 'dip':
906
- setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
1262
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 1);
907
1263
  setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, layout.toDevicePixels(value.value));
908
1264
  break;
909
1265
  case 'px':
910
- setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
1266
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 1);
911
1267
  setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, value.value);
912
1268
  break;
913
1269
  case '%':
914
- setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 1);
1270
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 2);
915
1271
  setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, value.value);
916
1272
  break;
917
1273
  }
@@ -950,7 +1306,7 @@ export class Style {
950
1306
  }
951
1307
  break;
952
1308
  }
953
- this.setOrAppendState(StateKeys.INSET);
1309
+ this.setOrAppendState(StateKeys.MARGIN);
954
1310
  }
955
1311
  get marginRight() {
956
1312
  const type = getInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE);
@@ -1177,8 +1533,37 @@ export class Style {
1177
1533
  }
1178
1534
  this.setOrAppendState(StateKeys.PADDING);
1179
1535
  }
1536
+ get gridGap() {
1537
+ return this.gap;
1538
+ }
1539
+ set gridGap(value) {
1540
+ this.gap = value;
1541
+ }
1180
1542
  get gap() {
1181
- return `${this.rowGap} ${this.columnGap}`;
1543
+ if (CoreLength.equals(this.rowGap, this.columnGap)) {
1544
+ return `${CoreLength.convertToString(this.rowGap)}`;
1545
+ }
1546
+ return `${CoreLength.convertToString(this.rowGap)} ${CoreLength.convertToString(this.columnGap)}`;
1547
+ }
1548
+ set gap(value) {
1549
+ if (typeof value === 'string') {
1550
+ const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
1551
+ const length = values.length;
1552
+ if (length === 0) {
1553
+ return;
1554
+ }
1555
+ if (length === 1) {
1556
+ const row = values[0];
1557
+ this.rowGap = CoreLength.parse(row);
1558
+ this.columnGap = CoreLength.parse(row);
1559
+ }
1560
+ if (length > 1) {
1561
+ const row = values[0];
1562
+ const column = values[1];
1563
+ this.rowGap = CoreLength.parse(row);
1564
+ this.columnGap = CoreLength.parse(column);
1565
+ }
1566
+ }
1182
1567
  }
1183
1568
  get rowGap() {
1184
1569
  const type = getInt32(this.style_view, StyleKeys.GAP_ROW_TYPE);
@@ -1431,6 +1816,104 @@ export class Style {
1431
1816
  }
1432
1817
  this.setOrAppendState(StateKeys.ALIGN_CONTENT);
1433
1818
  }
1819
+ get justifyItems() {
1820
+ switch (getInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS)) {
1821
+ case -1 /* JustifyItems.Normal */:
1822
+ return 'normal';
1823
+ case 0 /* JustifyItems.Start */:
1824
+ return 'start';
1825
+ case 1 /* JustifyItems.End */:
1826
+ return 'end';
1827
+ case 2 /* JustifyItems.Center */:
1828
+ return 'center';
1829
+ case 3 /* JustifyItems.Baseline */:
1830
+ return 'baseline';
1831
+ case 4 /* JustifyItems.Stretch */:
1832
+ return 'stretch';
1833
+ case 5 /* JustifyItems.FlexStart */:
1834
+ return 'flex-start';
1835
+ case 6 /* JustifyItems.FlexEnd */:
1836
+ return 'flex-end';
1837
+ }
1838
+ }
1839
+ set justifyItems(value) {
1840
+ switch (value) {
1841
+ case 'normal':
1842
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, -1 /* JustifyItems.Normal */);
1843
+ break;
1844
+ case 'start':
1845
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 0 /* JustifyItems.Start */);
1846
+ break;
1847
+ case 'end':
1848
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 1 /* JustifyItems.End */);
1849
+ break;
1850
+ case 'center':
1851
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 2 /* JustifyItems.Center */);
1852
+ break;
1853
+ case 'baseline':
1854
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 3 /* JustifyItems.Baseline */);
1855
+ break;
1856
+ case 'stretch':
1857
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 4 /* JustifyItems.Stretch */);
1858
+ break;
1859
+ case 'flex-start':
1860
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 5 /* JustifyItems.FlexStart */);
1861
+ break;
1862
+ case 'flex-end':
1863
+ setInt32(this.style_view, StyleKeys.JUSTIFY_ITEMS, 6 /* JustifyItems.FlexEnd */);
1864
+ break;
1865
+ }
1866
+ this.setOrAppendState(StateKeys.JUSTIFY_ITEMS);
1867
+ }
1868
+ get justifySelf() {
1869
+ switch (getInt32(this.style_view, StyleKeys.JUSTIFY_SELF)) {
1870
+ case -1 /* JustifySelf.Normal */:
1871
+ return 'normal';
1872
+ case 0 /* JustifySelf.Start */:
1873
+ return 'start';
1874
+ case 1 /* JustifySelf.End */:
1875
+ return 'end';
1876
+ case 2 /* JustifySelf.Center */:
1877
+ return 'center';
1878
+ case 3 /* JustifySelf.Baseline */:
1879
+ return 'baseline';
1880
+ case 4 /* JustifySelf.Stretch */:
1881
+ return 'stretch';
1882
+ case 5 /* JustifySelf.FlexStart */:
1883
+ return 'flex-start';
1884
+ case 6 /* JustifySelf.FlexEnd */:
1885
+ return 'flex-end';
1886
+ }
1887
+ }
1888
+ set justifySelf(value) {
1889
+ switch (value) {
1890
+ case 'normal':
1891
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, -1 /* JustifySelf.Normal */);
1892
+ break;
1893
+ case 'start':
1894
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 0 /* JustifySelf.Start */);
1895
+ break;
1896
+ case 'end':
1897
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 1 /* JustifySelf.End */);
1898
+ break;
1899
+ case 'center':
1900
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 2 /* JustifySelf.Center */);
1901
+ break;
1902
+ case 'baseline':
1903
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 3 /* JustifySelf.Baseline */);
1904
+ break;
1905
+ case 'stretch':
1906
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 4 /* JustifySelf.Stretch */);
1907
+ break;
1908
+ case 'flex-start':
1909
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 5 /* JustifySelf.FlexStart */);
1910
+ break;
1911
+ case 'flex-end':
1912
+ setInt32(this.style_view, StyleKeys.JUSTIFY_SELF, 6 /* JustifySelf.FlexEnd */);
1913
+ break;
1914
+ }
1915
+ this.setOrAppendState(StateKeys.JUSTIFY_SELF);
1916
+ }
1434
1917
  get justifyContent() {
1435
1918
  switch (getInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT)) {
1436
1919
  case -1 /* JustifyContent.Normal */:
@@ -1484,6 +1967,52 @@ export class Style {
1484
1967
  }
1485
1968
  this.setOrAppendState(StateKeys.JUSTIFY_CONTENT);
1486
1969
  }
1970
+ get gridAutoRows() {
1971
+ if (!this.nativeView) {
1972
+ return '';
1973
+ }
1974
+ if (__ANDROID__) {
1975
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridAutoRows(this.nativeView);
1976
+ }
1977
+ if (__APPLE__) {
1978
+ return this.nativeView.style.gridAutoRows;
1979
+ }
1980
+ return '';
1981
+ }
1982
+ set gridAutoRows(value) {
1983
+ if (!this.nativeView) {
1984
+ return;
1985
+ }
1986
+ if (__ANDROID__) {
1987
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridAutoRows(this.nativeView, value);
1988
+ }
1989
+ if (__APPLE__) {
1990
+ this.nativeView.style.gridAutoRows = value;
1991
+ }
1992
+ }
1993
+ get gridAutoColumns() {
1994
+ if (!this.nativeView) {
1995
+ return '';
1996
+ }
1997
+ if (__ANDROID__) {
1998
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridAutoColumns(this.nativeView);
1999
+ }
2000
+ if (__APPLE__) {
2001
+ return this.nativeView.style.gridAutoColumns;
2002
+ }
2003
+ return '';
2004
+ }
2005
+ set gridAutoColumns(value) {
2006
+ if (!this.nativeView) {
2007
+ return;
2008
+ }
2009
+ if (__ANDROID__) {
2010
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridAutoColumns(this.nativeView, value);
2011
+ }
2012
+ if (__APPLE__) {
2013
+ this.nativeView.style.gridAutoColumns = value;
2014
+ }
2015
+ }
1487
2016
  get gridAutoFlow() {
1488
2017
  switch (getInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW)) {
1489
2018
  case 0:
@@ -1511,6 +2040,249 @@ export class Style {
1511
2040
  setInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW, 3);
1512
2041
  break;
1513
2042
  }
2043
+ this.setOrAppendState(StateKeys.GRID_AUTO_FLOW);
2044
+ }
2045
+ get gridRowGap() {
2046
+ return this.rowGap;
2047
+ }
2048
+ set gridRowGap(value) {
2049
+ this.rowGap = value;
2050
+ }
2051
+ get gridColumnGap() {
2052
+ return this.columnGap;
2053
+ }
2054
+ set gridColumnGap(value) {
2055
+ this.columnGap = value;
2056
+ }
2057
+ set gridColumn(value) {
2058
+ if (!this.nativeView) {
2059
+ return;
2060
+ }
2061
+ if (__ANDROID__) {
2062
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridColumn(this.nativeView, value);
2063
+ }
2064
+ if (__APPLE__) {
2065
+ this.nativeView.style.gridColumn = value;
2066
+ }
2067
+ }
2068
+ get gridColumn() {
2069
+ if (!this.nativeView) {
2070
+ return '';
2071
+ }
2072
+ if (__ANDROID__) {
2073
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridColumn(this.nativeView);
2074
+ }
2075
+ if (__APPLE__) {
2076
+ return this.nativeView.style.gridColumn;
2077
+ }
2078
+ return '';
2079
+ }
2080
+ get gridColumnStart() {
2081
+ if (!this.nativeView) {
2082
+ return '';
2083
+ }
2084
+ if (__ANDROID__) {
2085
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridColumnStart(this.nativeView);
2086
+ }
2087
+ if (__APPLE__) {
2088
+ return this.nativeView.style.gridColumnStart;
2089
+ }
2090
+ return '';
2091
+ }
2092
+ set gridColumnStart(value) {
2093
+ if (!this.nativeView) {
2094
+ return;
2095
+ }
2096
+ if (__ANDROID__) {
2097
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridColumnStart(this.nativeView, value);
2098
+ }
2099
+ if (__APPLE__) {
2100
+ this.nativeView.style.gridColumnStart = value;
2101
+ }
2102
+ }
2103
+ get gridColumnEnd() {
2104
+ if (!this.nativeView) {
2105
+ return '';
2106
+ }
2107
+ if (__ANDROID__) {
2108
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridColumnEnd(this.nativeView);
2109
+ }
2110
+ if (__APPLE__) {
2111
+ return this.nativeView.style.gridColumnEnd;
2112
+ }
2113
+ return '';
2114
+ }
2115
+ set gridColumnEnd(value) {
2116
+ if (!this.nativeView) {
2117
+ return;
2118
+ }
2119
+ if (__ANDROID__) {
2120
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridColumnEnd(this.nativeView, value);
2121
+ }
2122
+ if (__APPLE__) {
2123
+ this.nativeView.style.gridColumnEnd = value;
2124
+ }
2125
+ }
2126
+ set gridRow(value) {
2127
+ if (!this.nativeView) {
2128
+ return;
2129
+ }
2130
+ if (__ANDROID__) {
2131
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridRow(this.nativeView, value);
2132
+ }
2133
+ if (__APPLE__) {
2134
+ this.nativeView.style.gridRow = value;
2135
+ }
2136
+ }
2137
+ get gridRow() {
2138
+ if (!this.nativeView) {
2139
+ return '';
2140
+ }
2141
+ if (__ANDROID__) {
2142
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridRow(this.nativeView);
2143
+ }
2144
+ if (__APPLE__) {
2145
+ return this.nativeView.style.gridRow;
2146
+ }
2147
+ return '';
2148
+ }
2149
+ get gridRowStart() {
2150
+ if (!this.nativeView) {
2151
+ return '';
2152
+ }
2153
+ if (__ANDROID__) {
2154
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridRowStart(this.nativeView);
2155
+ }
2156
+ if (__APPLE__) {
2157
+ return this.nativeView.style.gridRowStart;
2158
+ }
2159
+ return '';
2160
+ }
2161
+ set gridRowStart(value) {
2162
+ if (!this.nativeView) {
2163
+ return;
2164
+ }
2165
+ if (__ANDROID__) {
2166
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridRowStart(this.nativeView, value);
2167
+ }
2168
+ if (__APPLE__) {
2169
+ this.nativeView.style.gridRowStart = value;
2170
+ }
2171
+ }
2172
+ get gridRowEnd() {
2173
+ if (!this.nativeView) {
2174
+ return '';
2175
+ }
2176
+ if (__ANDROID__) {
2177
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridRowEnd(this.nativeView);
2178
+ }
2179
+ if (__APPLE__) {
2180
+ return this.nativeView.style.gridRowEnd;
2181
+ }
2182
+ return '';
2183
+ }
2184
+ set gridRowEnd(value) {
2185
+ if (!this.nativeView) {
2186
+ return;
2187
+ }
2188
+ if (__ANDROID__) {
2189
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridRowEnd(this.nativeView, value);
2190
+ }
2191
+ if (__APPLE__) {
2192
+ this.nativeView.style.gridRowEnd = value;
2193
+ }
2194
+ }
2195
+ set gridArea(value) {
2196
+ if (!this.nativeView) {
2197
+ return;
2198
+ }
2199
+ if (__ANDROID__) {
2200
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridArea(this.nativeView, value);
2201
+ }
2202
+ if (__APPLE__) {
2203
+ this.nativeView.style.gridArea = value;
2204
+ }
2205
+ }
2206
+ get gridArea() {
2207
+ if (!this.nativeView) {
2208
+ return '';
2209
+ }
2210
+ if (__ANDROID__) {
2211
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridArea(this.nativeView);
2212
+ }
2213
+ if (__APPLE__) {
2214
+ return this.nativeView.style.gridArea;
2215
+ }
2216
+ return '';
2217
+ }
2218
+ set gridTemplateRows(value) {
2219
+ if (!this.nativeView) {
2220
+ return;
2221
+ }
2222
+ if (__ANDROID__) {
2223
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridTemplateRows(this.nativeView, value);
2224
+ }
2225
+ if (__APPLE__) {
2226
+ this.nativeView.style.gridTemplateRows = value;
2227
+ }
2228
+ }
2229
+ get gridTemplateRows() {
2230
+ if (!this.nativeView) {
2231
+ return '';
2232
+ }
2233
+ if (__ANDROID__) {
2234
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridTemplateRows(this.nativeView);
2235
+ }
2236
+ if (__APPLE__) {
2237
+ return this.nativeView.style.gridTemplateRows;
2238
+ }
2239
+ return '';
2240
+ }
2241
+ get gridTemplateColumns() {
2242
+ if (!this.nativeView) {
2243
+ return '';
2244
+ }
2245
+ if (__ANDROID__) {
2246
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridTemplateColumns(this.nativeView);
2247
+ }
2248
+ if (__APPLE__) {
2249
+ return this.nativeView.style.gridTemplateColumns;
2250
+ }
2251
+ return '';
2252
+ }
2253
+ set gridTemplateColumns(value) {
2254
+ if (!this.nativeView) {
2255
+ return;
2256
+ }
2257
+ if (__ANDROID__) {
2258
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridTemplateColumns(this.nativeView, value);
2259
+ }
2260
+ if (__APPLE__) {
2261
+ this.nativeView.style.gridTemplateColumns = value;
2262
+ }
2263
+ }
2264
+ get gridTemplateAreas() {
2265
+ if (!this.nativeView) {
2266
+ return '';
2267
+ }
2268
+ if (__ANDROID__) {
2269
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getGridTemplateAreas(this.nativeView);
2270
+ }
2271
+ if (__APPLE__) {
2272
+ return this.nativeView.style.gridTemplateAreas;
2273
+ }
2274
+ return '';
2275
+ }
2276
+ set gridTemplateAreas(value) {
2277
+ if (!this.nativeView) {
2278
+ return;
2279
+ }
2280
+ if (__ANDROID__) {
2281
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setGridTemplateAreas(this.nativeView, value);
2282
+ }
2283
+ if (__APPLE__) {
2284
+ this.nativeView.style.gridTemplateAreas = value;
2285
+ }
1514
2286
  }
1515
2287
  get overflow() {
1516
2288
  const x = this.overflowX;
@@ -1547,6 +2319,12 @@ export class Style {
1547
2319
  case 'scroll':
1548
2320
  setInt32(this.style_view, StyleKeys.OVERFLOW_X, 2);
1549
2321
  break;
2322
+ case 'clip':
2323
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 3);
2324
+ break;
2325
+ case 'auto':
2326
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 4);
2327
+ break;
1550
2328
  }
1551
2329
  switch (values[1]) {
1552
2330
  case 'visible':
@@ -1558,10 +2336,17 @@ export class Style {
1558
2336
  case 'scroll':
1559
2337
  setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 2);
1560
2338
  break;
2339
+ case 'clip':
2340
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 3);
2341
+ break;
2342
+ case 'auto':
2343
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 4);
2344
+ break;
1561
2345
  }
1562
2346
  }
1563
2347
  break;
1564
2348
  }
2349
+ this.setOrAppendState(StateKeys.OVERFLOW);
1565
2350
  }
1566
2351
  get overflowX() {
1567
2352
  switch (getInt32(this.style_view, StyleKeys.OVERFLOW_X)) {
@@ -1574,16 +2359,31 @@ export class Style {
1574
2359
  }
1575
2360
  }
1576
2361
  set overflowX(value) {
2362
+ let dirty = false;
1577
2363
  switch (value) {
1578
2364
  case 'visible':
1579
2365
  setInt32(this.style_view, StyleKeys.OVERFLOW_X, 0);
2366
+ dirty = true;
1580
2367
  break;
1581
2368
  case 'hidden':
1582
2369
  setInt32(this.style_view, StyleKeys.OVERFLOW_X, 1);
2370
+ dirty = true;
1583
2371
  break;
1584
2372
  case 'scroll':
2373
+ dirty = true;
1585
2374
  setInt32(this.style_view, StyleKeys.OVERFLOW_X, 2);
1586
2375
  break;
2376
+ case 'clip':
2377
+ dirty = true;
2378
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 3);
2379
+ break;
2380
+ case 'auto':
2381
+ dirty = true;
2382
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 4);
2383
+ break;
2384
+ }
2385
+ if (dirty) {
2386
+ this.setOrAppendState(StateKeys.OVERFLOW_X);
1587
2387
  }
1588
2388
  }
1589
2389
  get overflowY() {
@@ -1594,32 +2394,53 @@ export class Style {
1594
2394
  return 'hidden';
1595
2395
  case 2:
1596
2396
  return 'scroll';
2397
+ case 3:
2398
+ return 'clip';
2399
+ case 4:
2400
+ return 'auto';
1597
2401
  }
1598
2402
  }
1599
2403
  set overflowY(value) {
2404
+ let dirty = false;
1600
2405
  switch (value) {
1601
2406
  case 'visible':
1602
2407
  setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 0);
2408
+ dirty = true;
1603
2409
  break;
1604
2410
  case 'hidden':
1605
2411
  setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 1);
2412
+ dirty = true;
1606
2413
  break;
1607
2414
  case 'scroll':
1608
2415
  setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 2);
2416
+ dirty = true;
2417
+ break;
2418
+ case 'clip':
2419
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 3);
2420
+ dirty = true;
2421
+ break;
2422
+ case 'auto':
2423
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 4);
2424
+ dirty = true;
1609
2425
  break;
1610
2426
  }
2427
+ if (dirty) {
2428
+ this.setOrAppendState(StateKeys.OVERFLOW_Y);
2429
+ }
1611
2430
  }
1612
2431
  get flexGrow() {
1613
2432
  return getFloat32(this.style_view, StyleKeys.FLEX_GROW);
1614
2433
  }
1615
2434
  set flexGrow(value) {
1616
2435
  setFloat32(this.style_view, StyleKeys.FLEX_GROW, value);
2436
+ this.setOrAppendState(StateKeys.FLEX_GROW);
1617
2437
  }
1618
2438
  get flexShrink() {
1619
2439
  return getFloat32(this.style_view, StyleKeys.FLEX_SHRINK);
1620
2440
  }
1621
2441
  set flexShrink(value) {
1622
2442
  setFloat32(this.style_view, StyleKeys.FLEX_SHRINK, value);
2443
+ this.setOrAppendState(StateKeys.FLEX_SHRINK);
1623
2444
  }
1624
2445
  get scrollBarWidth() {
1625
2446
  return getFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH);
@@ -1627,18 +2448,254 @@ export class Style {
1627
2448
  set scrollBarWidth(value) {
1628
2449
  if (typeof value === 'number') {
1629
2450
  setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, value);
2451
+ this.setOrAppendState(StateKeys.SCROLLBAR_WIDTH);
1630
2452
  }
1631
2453
  else if (typeof value === 'object') {
1632
2454
  switch (value.unit) {
1633
2455
  case 'dip':
1634
2456
  setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, layout.toDevicePixels(value.value));
2457
+ this.setOrAppendState(StateKeys.SCROLLBAR_WIDTH);
1635
2458
  break;
1636
2459
  case 'px':
1637
2460
  setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, value.value);
2461
+ this.setOrAppendState(StateKeys.SCROLLBAR_WIDTH);
2462
+ break;
2463
+ }
2464
+ }
2465
+ }
2466
+ get letterSpacing() {
2467
+ return getFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING);
2468
+ }
2469
+ set letterSpacing(value) {
2470
+ if (typeof value === 'number') {
2471
+ setFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING, value);
2472
+ setUint8(this.text_style_view, TextStyleKeys.LETTER_SPACING_STATE, 1);
2473
+ this.setOrAppendTextState(TextStateKeys.LETTER_SPACING);
2474
+ }
2475
+ else if (typeof value === 'object') {
2476
+ switch (value.unit) {
2477
+ case 'dip':
2478
+ setFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING, layout.toDevicePixels(value.value));
2479
+ setUint8(this.text_style_view, TextStyleKeys.LETTER_SPACING_STATE, 1);
2480
+ this.setOrAppendTextState(TextStateKeys.LETTER_SPACING);
2481
+ break;
2482
+ case 'px':
2483
+ setFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING, value.value);
2484
+ setUint8(this.text_style_view, TextStyleKeys.LETTER_SPACING_STATE, 1);
2485
+ this.setOrAppendTextState(TextStateKeys.LETTER_SPACING);
2486
+ break;
2487
+ }
2488
+ }
2489
+ }
2490
+ get lineHeight() {
2491
+ return getFloat32(this.text_style_view, TextStyleKeys.LINE_HEIGHT);
2492
+ }
2493
+ set lineHeight(value) {
2494
+ if (typeof value === 'number') {
2495
+ setFloat32(this.text_style_view, TextStyleKeys.LINE_HEIGHT, value);
2496
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_STATE, 1);
2497
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_TYPE, 0);
2498
+ this.setOrAppendTextState(TextStateKeys.LINE_HEIGHT);
2499
+ }
2500
+ else if (typeof value === 'object') {
2501
+ switch (value.unit) {
2502
+ case 'dip':
2503
+ setFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING, layout.toDevicePixels(value.value));
2504
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_STATE, 1);
2505
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_TYPE, 1);
2506
+ this.setOrAppendTextState(TextStateKeys.LETTER_SPACING);
2507
+ break;
2508
+ case 'px':
2509
+ setFloat32(this.text_style_view, TextStyleKeys.LETTER_SPACING, value.value);
2510
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_STATE, 1);
2511
+ setUint8(this.text_style_view, TextStyleKeys.LINE_HEIGHT_TYPE, 1);
2512
+ this.setOrAppendTextState(TextStateKeys.LETTER_SPACING);
1638
2513
  break;
1639
2514
  }
1640
2515
  }
1641
2516
  }
2517
+ get textOverflow() {
2518
+ if (!this.text_style_view) {
2519
+ // clip ?
2520
+ return 'clip';
2521
+ }
2522
+ const type = getInt32(this.text_style_view, TextStyleKeys.TEXT_OVERFLOW);
2523
+ switch (type) {
2524
+ case 0:
2525
+ return 'clip';
2526
+ case 1:
2527
+ return 'ellipsis';
2528
+ default:
2529
+ }
2530
+ if (__ANDROID__) {
2531
+ // @ts-ignore
2532
+ const overflow = this.view_._view.getTextOverflow();
2533
+ }
2534
+ if (__APPLE__) {
2535
+ // @ts-ignore
2536
+ const overflow = this.view_._view.textOverflow;
2537
+ }
2538
+ return 'clip';
2539
+ }
2540
+ set textOverflow(value) {
2541
+ if (!this.text_style_view) {
2542
+ return;
2543
+ }
2544
+ let flow = -1;
2545
+ switch (value) {
2546
+ case 'clip':
2547
+ flow = 0;
2548
+ break;
2549
+ case 'ellipsis':
2550
+ flow = 1;
2551
+ break;
2552
+ default:
2553
+ {
2554
+ if (__ANDROID__) {
2555
+ // @ts-ignore
2556
+ const overflow = this.view_._view.getTextOverflow();
2557
+ }
2558
+ if (__APPLE__) {
2559
+ // @ts-ignore
2560
+ const overflow = this.view_._view.textOverflow;
2561
+ }
2562
+ }
2563
+ break;
2564
+ }
2565
+ if (flow !== -1) {
2566
+ setInt32(this.text_style_view, TextStyleKeys.TEXT_OVERFLOW, flow);
2567
+ setInt8(this.text_style_view, TextStyleKeys.TEXT_OVERFLOW_STATE, 1);
2568
+ this.setOrAppendTextState(TextStateKeys.TEXT_OVERFLOW);
2569
+ }
2570
+ }
2571
+ get textAlignment() {
2572
+ if (!this.text_style_view) {
2573
+ // clip ?
2574
+ return 'start';
2575
+ }
2576
+ const type = getInt32(this.text_style_view, TextStyleKeys.TEXT_ALIGN);
2577
+ switch (type) {
2578
+ case 0:
2579
+ // auto
2580
+ return 'start';
2581
+ case 1:
2582
+ return 'left';
2583
+ case 2:
2584
+ return 'right';
2585
+ case 3:
2586
+ return 'center';
2587
+ case 4:
2588
+ return 'justify';
2589
+ case 5:
2590
+ return 'start';
2591
+ case 6:
2592
+ return 'end';
2593
+ default:
2594
+ return 'start';
2595
+ }
2596
+ }
2597
+ set textAlignment(value) {
2598
+ if (!this.text_style_view) {
2599
+ return;
2600
+ }
2601
+ let align = -1;
2602
+ switch (value) {
2603
+ case 'left':
2604
+ align = 1;
2605
+ break;
2606
+ case 'right':
2607
+ align = 2;
2608
+ break;
2609
+ case 'center':
2610
+ align = 3;
2611
+ break;
2612
+ case 'justify':
2613
+ align = 4;
2614
+ break;
2615
+ case 'start':
2616
+ align = 5;
2617
+ break;
2618
+ case 'end':
2619
+ align = 6;
2620
+ break;
2621
+ default:
2622
+ break;
2623
+ }
2624
+ if (align !== -1) {
2625
+ setInt32(this.text_style_view, TextStyleKeys.TEXT_ALIGN, align);
2626
+ setInt8(this.text_style_view, TextStyleKeys.TEXT_ALIGN_STATE, 1);
2627
+ this.setOrAppendTextState(TextStateKeys.TEXT_ALIGN);
2628
+ }
2629
+ }
2630
+ get background() {
2631
+ if (!this.nativeView) {
2632
+ return '';
2633
+ }
2634
+ if (__ANDROID__) {
2635
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getBackground(this.nativeView);
2636
+ }
2637
+ if (__APPLE__) {
2638
+ return this.nativeView.style.background;
2639
+ }
2640
+ return '';
2641
+ }
2642
+ set background(value) {
2643
+ if (!this.nativeView) {
2644
+ return;
2645
+ }
2646
+ if (__ANDROID__) {
2647
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setBackground(this.nativeView, value);
2648
+ }
2649
+ if (__APPLE__) {
2650
+ this.nativeView.style.background = value;
2651
+ }
2652
+ }
2653
+ get border() {
2654
+ if (!this.nativeView) {
2655
+ return '';
2656
+ }
2657
+ if (__ANDROID__) {
2658
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getBorder(this.nativeView);
2659
+ }
2660
+ if (__APPLE__) {
2661
+ return this.nativeView.style.border;
2662
+ }
2663
+ return '';
2664
+ }
2665
+ set border(value) {
2666
+ if (!this.nativeView) {
2667
+ return;
2668
+ }
2669
+ if (__ANDROID__) {
2670
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setBorder(this.nativeView, value);
2671
+ }
2672
+ if (__APPLE__) {
2673
+ this.nativeView.style.border = value;
2674
+ }
2675
+ }
2676
+ get filter() {
2677
+ if (!this.nativeView) {
2678
+ return '';
2679
+ }
2680
+ if (__ANDROID__) {
2681
+ return org.nativescript.mason.masonkit.NodeHelper.getShared().getFilter(this.nativeView);
2682
+ }
2683
+ if (__APPLE__) {
2684
+ return this.nativeView.style.filter;
2685
+ }
2686
+ return '';
2687
+ }
2688
+ set filter(value) {
2689
+ if (!this.nativeView) {
2690
+ return;
2691
+ }
2692
+ if (__ANDROID__) {
2693
+ org.nativescript.mason.masonkit.NodeHelper.getShared().setFilter(this.nativeView, value);
2694
+ }
2695
+ if (__APPLE__) {
2696
+ this.nativeView.style.filter = value;
2697
+ }
2698
+ }
1642
2699
  toJSON() {
1643
2700
  return {
1644
2701
  display: this.display,
@@ -1674,12 +2731,21 @@ export class Style {
1674
2731
  top: this.paddingTop,
1675
2732
  bottom: this.paddingBottom,
1676
2733
  },
2734
+ aspectRatio: this.aspectRatio,
2735
+ flexBasis: this.flexBasis,
2736
+ overflow: this.overflow,
2737
+ flexShrink: this.flexShrink,
2738
+ scrollBarWidth: this.scrollBarWidth,
1677
2739
  gap: this.gap,
2740
+ gridArea: this.gridArea,
1678
2741
  gridAutoFlow: this.gridAutoFlow,
1679
2742
  gridAutoColumns: this.gridAutoColumns,
1680
2743
  gridAutoRows: this.gridAutoRows,
1681
2744
  gridColumn: this.gridColumn,
1682
2745
  gridRow: this.gridRow,
2746
+ gridTemplateRows: this.gridTemplateRows,
2747
+ gridTemplateColumns: this.gridTemplateColumns,
2748
+ filter: this.filter,
1683
2749
  };
1684
2750
  }
1685
2751
  }