@triniwiz/nativescript-masonkit 1.0.0-alpha.7 → 1.0.0-alpha.9

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 (343) hide show
  1. package/common.d.ts +53 -28
  2. package/common.js +355 -704
  3. package/common.js.map +1 -1
  4. package/helpers.d.ts +98 -98
  5. package/helpers.js +395 -2945
  6. package/helpers.js.map +1 -1
  7. package/index.android.d.ts +28 -24
  8. package/index.android.js +109 -82
  9. package/index.android.js.map +1 -1
  10. package/index.d.ts +56 -19
  11. package/index.ios.d.ts +42 -24
  12. package/index.ios.js +279 -121
  13. package/index.ios.js.map +1 -1
  14. package/node.d.ts +2 -0
  15. package/node.js +3 -0
  16. package/node.js.map +1 -0
  17. package/package.json +3 -3
  18. package/platforms/android/masonkit-release.aar +0 -0
  19. package/platforms/ios/Mason.xcframework/Info.plist +4 -0
  20. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +251 -267
  21. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +11 -0
  22. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +213 -843
  23. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  24. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +17822 -19248
  27. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +404 -310
  28. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  29. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +404 -310
  30. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/module.modulemap +1 -1
  31. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  32. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +1937 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +502 -534
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +11 -0
  35. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +213 -843
  36. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +17822 -19248
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +404 -310
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  43. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +404 -310
  44. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +17822 -19248
  45. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +404 -310
  46. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  47. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +404 -310
  48. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/module.modulemap +1 -1
  49. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +33 -97
  50. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  51. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +1937 -0
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +1888 -0
  53. package/platforms/ios/Podfile +1 -1
  54. package/platforms/ios/build.xcconfig +5 -1
  55. package/platforms/ios/prebuild.sh +101 -0
  56. package/{pods → src-native/pods}/NativeScript.podspec +1 -1
  57. package/style.d.ts +166 -0
  58. package/style.js +1686 -0
  59. package/style.js.map +1 -0
  60. package/platforms/ios/src/MasonV8Module.h +0 -583
  61. package/platforms/ios/src/MasonV8Module.mm +0 -1005
  62. package/platforms/ios/src/cpp/include/mason_native.h +0 -972
  63. package/platforms/ios/src/cpp/include/robin_hood.h +0 -2544
  64. package/platforms/ios/src/module.modulemap +0 -4
  65. /package/{pods → src-native/pods}/Headers/include/APIDesign.md +0 -0
  66. /package/{pods → src-native/pods}/Headers/include/DEPS +0 -0
  67. /package/{pods → src-native/pods}/Headers/include/DIR_METADATA +0 -0
  68. /package/{pods → src-native/pods}/Headers/include/OWNERS +0 -0
  69. /package/{pods → src-native/pods}/Headers/include/cppgc/DEPS +0 -0
  70. /package/{pods → src-native/pods}/Headers/include/cppgc/OWNERS +0 -0
  71. /package/{pods → src-native/pods}/Headers/include/cppgc/README.md +0 -0
  72. /package/{pods → src-native/pods}/Headers/include/cppgc/allocation.h +0 -0
  73. /package/{pods → src-native/pods}/Headers/include/cppgc/common.h +0 -0
  74. /package/{pods → src-native/pods}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
  75. /package/{pods → src-native/pods}/Headers/include/cppgc/custom-space.h +0 -0
  76. /package/{pods → src-native/pods}/Headers/include/cppgc/default-platform.h +0 -0
  77. /package/{pods → src-native/pods}/Headers/include/cppgc/ephemeron-pair.h +0 -0
  78. /package/{pods → src-native/pods}/Headers/include/cppgc/explicit-management.h +0 -0
  79. /package/{pods → src-native/pods}/Headers/include/cppgc/garbage-collected.h +0 -0
  80. /package/{pods → src-native/pods}/Headers/include/cppgc/heap-consistency.h +0 -0
  81. /package/{pods → src-native/pods}/Headers/include/cppgc/heap-state.h +0 -0
  82. /package/{pods → src-native/pods}/Headers/include/cppgc/heap-statistics.h +0 -0
  83. /package/{pods → src-native/pods}/Headers/include/cppgc/heap.h +0 -0
  84. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/api-constants.h +0 -0
  85. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
  86. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
  87. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
  88. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
  89. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/gc-info.h +0 -0
  90. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/logging.h +0 -0
  91. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/name-trait.h +0 -0
  92. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/persistent-node.h +0 -0
  93. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
  94. /package/{pods → src-native/pods}/Headers/include/cppgc/internal/write-barrier.h +0 -0
  95. /package/{pods → src-native/pods}/Headers/include/cppgc/liveness-broker.h +0 -0
  96. /package/{pods → src-native/pods}/Headers/include/cppgc/macros.h +0 -0
  97. /package/{pods → src-native/pods}/Headers/include/cppgc/member.h +0 -0
  98. /package/{pods → src-native/pods}/Headers/include/cppgc/name-provider.h +0 -0
  99. /package/{pods → src-native/pods}/Headers/include/cppgc/object-size-trait.h +0 -0
  100. /package/{pods → src-native/pods}/Headers/include/cppgc/persistent.h +0 -0
  101. /package/{pods → src-native/pods}/Headers/include/cppgc/platform.h +0 -0
  102. /package/{pods → src-native/pods}/Headers/include/cppgc/prefinalizer.h +0 -0
  103. /package/{pods → src-native/pods}/Headers/include/cppgc/process-heap-statistics.h +0 -0
  104. /package/{pods → src-native/pods}/Headers/include/cppgc/sentinel-pointer.h +0 -0
  105. /package/{pods → src-native/pods}/Headers/include/cppgc/source-location.h +0 -0
  106. /package/{pods → src-native/pods}/Headers/include/cppgc/testing.h +0 -0
  107. /package/{pods → src-native/pods}/Headers/include/cppgc/trace-trait.h +0 -0
  108. /package/{pods → src-native/pods}/Headers/include/cppgc/type-traits.h +0 -0
  109. /package/{pods → src-native/pods}/Headers/include/cppgc/visitor.h +0 -0
  110. /package/{pods → src-native/pods}/Headers/include/js_protocol-1.2.json +0 -0
  111. /package/{pods → src-native/pods}/Headers/include/js_protocol-1.3.json +0 -0
  112. /package/{pods → src-native/pods}/Headers/include/js_protocol.pdl +0 -0
  113. /package/{pods → src-native/pods}/Headers/include/libffi/arm64/ffi.h +0 -0
  114. /package/{pods → src-native/pods}/Headers/include/libffi/arm64/ffitarget.h +0 -0
  115. /package/{pods → src-native/pods}/Headers/include/libffi/x86_64/ffi.h +0 -0
  116. /package/{pods → src-native/pods}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
  117. /package/{pods → src-native/pods}/Headers/include/libffi.h +0 -0
  118. /package/{pods → src-native/pods}/Headers/include/libplatform/DEPS +0 -0
  119. /package/{pods → src-native/pods}/Headers/include/libplatform/libplatform-export.h +0 -0
  120. /package/{pods → src-native/pods}/Headers/include/libplatform/libplatform.h +0 -0
  121. /package/{pods → src-native/pods}/Headers/include/libplatform/v8-tracing.h +0 -0
  122. /package/{pods → src-native/pods}/Headers/include/v8-array-buffer.h +0 -0
  123. /package/{pods → src-native/pods}/Headers/include/v8-callbacks.h +0 -0
  124. /package/{pods → src-native/pods}/Headers/include/v8-container.h +0 -0
  125. /package/{pods → src-native/pods}/Headers/include/v8-context.h +0 -0
  126. /package/{pods → src-native/pods}/Headers/include/v8-cppgc.h +0 -0
  127. /package/{pods → src-native/pods}/Headers/include/v8-data.h +0 -0
  128. /package/{pods → src-native/pods}/Headers/include/v8-date.h +0 -0
  129. /package/{pods → src-native/pods}/Headers/include/v8-debug.h +0 -0
  130. /package/{pods → src-native/pods}/Headers/include/v8-embedder-heap.h +0 -0
  131. /package/{pods → src-native/pods}/Headers/include/v8-embedder-state-scope.h +0 -0
  132. /package/{pods → src-native/pods}/Headers/include/v8-exception.h +0 -0
  133. /package/{pods → src-native/pods}/Headers/include/v8-extension.h +0 -0
  134. /package/{pods → src-native/pods}/Headers/include/v8-external.h +0 -0
  135. /package/{pods → src-native/pods}/Headers/include/v8-fast-api-calls.h +0 -0
  136. /package/{pods → src-native/pods}/Headers/include/v8-forward.h +0 -0
  137. /package/{pods → src-native/pods}/Headers/include/v8-function-callback.h +0 -0
  138. /package/{pods → src-native/pods}/Headers/include/v8-function.h +0 -0
  139. /package/{pods → src-native/pods}/Headers/include/v8-initialization.h +0 -0
  140. /package/{pods → src-native/pods}/Headers/include/v8-inspector-protocol.h +0 -0
  141. /package/{pods → src-native/pods}/Headers/include/v8-inspector.h +0 -0
  142. /package/{pods → src-native/pods}/Headers/include/v8-internal.h +0 -0
  143. /package/{pods → src-native/pods}/Headers/include/v8-isolate.h +0 -0
  144. /package/{pods → src-native/pods}/Headers/include/v8-json.h +0 -0
  145. /package/{pods → src-native/pods}/Headers/include/v8-local-handle.h +0 -0
  146. /package/{pods → src-native/pods}/Headers/include/v8-locker.h +0 -0
  147. /package/{pods → src-native/pods}/Headers/include/v8-maybe.h +0 -0
  148. /package/{pods → src-native/pods}/Headers/include/v8-memory-span.h +0 -0
  149. /package/{pods → src-native/pods}/Headers/include/v8-message.h +0 -0
  150. /package/{pods → src-native/pods}/Headers/include/v8-metrics.h +0 -0
  151. /package/{pods → src-native/pods}/Headers/include/v8-microtask-queue.h +0 -0
  152. /package/{pods → src-native/pods}/Headers/include/v8-microtask.h +0 -0
  153. /package/{pods → src-native/pods}/Headers/include/v8-object.h +0 -0
  154. /package/{pods → src-native/pods}/Headers/include/v8-persistent-handle.h +0 -0
  155. /package/{pods → src-native/pods}/Headers/include/v8-platform.h +0 -0
  156. /package/{pods → src-native/pods}/Headers/include/v8-primitive-object.h +0 -0
  157. /package/{pods → src-native/pods}/Headers/include/v8-primitive.h +0 -0
  158. /package/{pods → src-native/pods}/Headers/include/v8-profiler.h +0 -0
  159. /package/{pods → src-native/pods}/Headers/include/v8-promise.h +0 -0
  160. /package/{pods → src-native/pods}/Headers/include/v8-proxy.h +0 -0
  161. /package/{pods → src-native/pods}/Headers/include/v8-regexp.h +0 -0
  162. /package/{pods → src-native/pods}/Headers/include/v8-script.h +0 -0
  163. /package/{pods → src-native/pods}/Headers/include/v8-snapshot.h +0 -0
  164. /package/{pods → src-native/pods}/Headers/include/v8-statistics.h +0 -0
  165. /package/{pods → src-native/pods}/Headers/include/v8-template.h +0 -0
  166. /package/{pods → src-native/pods}/Headers/include/v8-traced-handle.h +0 -0
  167. /package/{pods → src-native/pods}/Headers/include/v8-typed-array.h +0 -0
  168. /package/{pods → src-native/pods}/Headers/include/v8-unwinder-state.h +0 -0
  169. /package/{pods → src-native/pods}/Headers/include/v8-unwinder.h +0 -0
  170. /package/{pods → src-native/pods}/Headers/include/v8-util.h +0 -0
  171. /package/{pods → src-native/pods}/Headers/include/v8-value-serializer-version.h +0 -0
  172. /package/{pods → src-native/pods}/Headers/include/v8-value-serializer.h +0 -0
  173. /package/{pods → src-native/pods}/Headers/include/v8-value.h +0 -0
  174. /package/{pods → src-native/pods}/Headers/include/v8-version-string.h +0 -0
  175. /package/{pods → src-native/pods}/Headers/include/v8-version.h +0 -0
  176. /package/{pods → src-native/pods}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
  177. /package/{pods → src-native/pods}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
  178. /package/{pods → src-native/pods}/Headers/include/v8-wasm.h +0 -0
  179. /package/{pods → src-native/pods}/Headers/include/v8-weak-callback-info.h +0 -0
  180. /package/{pods → src-native/pods}/Headers/include/v8.h +0 -0
  181. /package/{pods → src-native/pods}/Headers/include/v8config.h +0 -0
  182. /package/{pods → src-native/pods}/Headers/inspector/InspectorServer.h +0 -0
  183. /package/{pods → src-native/pods}/Headers/inspector/JsV8InspectorClient.h +0 -0
  184. /package/{pods → src-native/pods}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
  185. /package/{pods → src-native/pods}/Headers/inspector/base64.h +0 -0
  186. /package/{pods → src-native/pods}/Headers/inspector/src/base/address-region.h +0 -0
  187. /package/{pods → src-native/pods}/Headers/inspector/src/base/atomic-utils.h +0 -0
  188. /package/{pods → src-native/pods}/Headers/inspector/src/base/atomicops.h +0 -0
  189. /package/{pods → src-native/pods}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
  190. /package/{pods → src-native/pods}/Headers/inspector/src/base/base-export.h +0 -0
  191. /package/{pods → src-native/pods}/Headers/inspector/src/base/bits.h +0 -0
  192. /package/{pods → src-native/pods}/Headers/inspector/src/base/build_config.h +0 -0
  193. /package/{pods → src-native/pods}/Headers/inspector/src/base/compiler-specific.h +0 -0
  194. /package/{pods → src-native/pods}/Headers/inspector/src/base/export-template.h +0 -0
  195. /package/{pods → src-native/pods}/Headers/inspector/src/base/flags.h +0 -0
  196. /package/{pods → src-native/pods}/Headers/inspector/src/base/immediate-crash.h +0 -0
  197. /package/{pods → src-native/pods}/Headers/inspector/src/base/lazy-instance.h +0 -0
  198. /package/{pods → src-native/pods}/Headers/inspector/src/base/logging.h +0 -0
  199. /package/{pods → src-native/pods}/Headers/inspector/src/base/macros.h +0 -0
  200. /package/{pods → src-native/pods}/Headers/inspector/src/base/memory.h +0 -0
  201. /package/{pods → src-native/pods}/Headers/inspector/src/base/once.h +0 -0
  202. /package/{pods → src-native/pods}/Headers/inspector/src/base/optional.h +0 -0
  203. /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/mutex.h +0 -0
  204. /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/platform.h +0 -0
  205. /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/semaphore.h +0 -0
  206. /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/v8-time.h +0 -0
  207. /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/wrappers.h +0 -0
  208. /package/{pods → src-native/pods}/Headers/inspector/src/base/safe_conversions.h +0 -0
  209. /package/{pods → src-native/pods}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
  210. /package/{pods → src-native/pods}/Headers/inspector/src/base/template-utils.h +0 -0
  211. /package/{pods → src-native/pods}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
  212. /package/{pods → src-native/pods}/Headers/inspector/src/common/checks.h +0 -0
  213. /package/{pods → src-native/pods}/Headers/inspector/src/common/globals.h +0 -0
  214. /package/{pods → src-native/pods}/Headers/inspector/src/debug/debug-interface.h +0 -0
  215. /package/{pods → src-native/pods}/Headers/inspector/src/debug/interface-types.h +0 -0
  216. /package/{pods → src-native/pods}/Headers/inspector/src/init/v8.h +0 -0
  217. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/custom-preview.h +0 -0
  218. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/injected-script.h +0 -0
  219. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/inspected-context.h +0 -0
  220. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
  221. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
  222. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
  223. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
  224. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
  225. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
  226. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
  227. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
  228. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
  229. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
  230. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
  231. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
  232. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
  233. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
  234. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
  235. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
  236. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/search-util.h +0 -0
  237. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/string-16.h +0 -0
  238. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/string-util.h +0 -0
  239. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
  240. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
  241. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console.h +0 -0
  242. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
  243. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
  244. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
  245. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
  246. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
  247. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
  248. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
  249. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
  250. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
  251. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
  252. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
  253. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
  254. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
  255. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
  256. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
  257. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-regex.h +0 -0
  258. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
  259. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
  260. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
  261. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
  262. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
  263. /package/{pods → src-native/pods}/Headers/inspector/src/inspector/value-mirror.h +0 -0
  264. /package/{pods → src-native/pods}/Headers/inspector/src/libplatform/default-platform.h +0 -0
  265. /package/{pods → src-native/pods}/Headers/inspector/src/logging/tracing-flags.h +0 -0
  266. /package/{pods → src-native/pods}/Headers/inspector/src/numbers/conversions.h +0 -0
  267. /package/{pods → src-native/pods}/Headers/inspector/src/tracing/trace-event.h +0 -0
  268. /package/{pods → src-native/pods}/Headers/inspector/src/utils/allocation.h +0 -0
  269. /package/{pods → src-native/pods}/Headers/inspector/src/utils/vector.h +0 -0
  270. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
  271. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
  272. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
  273. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
  274. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
  275. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
  276. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
  277. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
  278. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
  279. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
  280. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
  281. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
  282. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
  283. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
  284. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
  285. /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
  286. /package/{pods → src-native/pods}/Headers/inspector/utils.h +0 -0
  287. /package/{pods → src-native/pods}/Headers/inspector/v8-inspector-platform.h +0 -0
  288. /package/{pods → src-native/pods}/Headers/jsi/decorator.h +0 -0
  289. /package/{pods → src-native/pods}/Headers/jsi/instrumentation.h +0 -0
  290. /package/{pods → src-native/pods}/Headers/jsi/jsi-inl.h +0 -0
  291. /package/{pods → src-native/pods}/Headers/jsi/jsi.h +0 -0
  292. /package/{pods → src-native/pods}/Headers/jsi/jsilib.h +0 -0
  293. /package/{pods → src-native/pods}/Headers/jsi/threadsafe.h +0 -0
  294. /package/{pods → src-native/pods}/Headers/runtime/ArgConverter.h +0 -0
  295. /package/{pods → src-native/pods}/Headers/runtime/ArrayAdapter.h +0 -0
  296. /package/{pods → src-native/pods}/Headers/runtime/Caches.h +0 -0
  297. /package/{pods → src-native/pods}/Headers/runtime/ClassBuilder.h +0 -0
  298. /package/{pods → src-native/pods}/Headers/runtime/Common.h +0 -0
  299. /package/{pods → src-native/pods}/Headers/runtime/ConcurrentMap.h +0 -0
  300. /package/{pods → src-native/pods}/Headers/runtime/ConcurrentQueue.h +0 -0
  301. /package/{pods → src-native/pods}/Headers/runtime/Console.h +0 -0
  302. /package/{pods → src-native/pods}/Headers/runtime/Constants.h +0 -0
  303. /package/{pods → src-native/pods}/Headers/runtime/DataWrapper.h +0 -0
  304. /package/{pods → src-native/pods}/Headers/runtime/DictionaryAdapter.h +0 -0
  305. /package/{pods → src-native/pods}/Headers/runtime/ExtVector.h +0 -0
  306. /package/{pods → src-native/pods}/Headers/runtime/FFICall.h +0 -0
  307. /package/{pods → src-native/pods}/Headers/runtime/FastEnumerationAdapter.h +0 -0
  308. /package/{pods → src-native/pods}/Headers/runtime/FunctionReference.h +0 -0
  309. /package/{pods → src-native/pods}/Headers/runtime/Helpers.h +0 -0
  310. /package/{pods → src-native/pods}/Headers/runtime/InlineFunctions.h +0 -0
  311. /package/{pods → src-native/pods}/Headers/runtime/Interop.h +0 -0
  312. /package/{pods → src-native/pods}/Headers/runtime/KnownUnknownClassPair.h +0 -0
  313. /package/{pods → src-native/pods}/Headers/runtime/Metadata.h +0 -0
  314. /package/{pods → src-native/pods}/Headers/runtime/MetadataBuilder.h +0 -0
  315. /package/{pods → src-native/pods}/Headers/runtime/MetadataInlines.h +0 -0
  316. /package/{pods → src-native/pods}/Headers/runtime/ModuleInternal.h +0 -0
  317. /package/{pods → src-native/pods}/Headers/runtime/NSDataAdapter.h +0 -0
  318. /package/{pods → src-native/pods}/Headers/runtime/NativeScriptException.h +0 -0
  319. /package/{pods → src-native/pods}/Headers/runtime/ObjectManager.h +0 -0
  320. /package/{pods → src-native/pods}/Headers/runtime/OneByteStringResource.h +0 -0
  321. /package/{pods → src-native/pods}/Headers/runtime/Pointer.h +0 -0
  322. /package/{pods → src-native/pods}/Headers/runtime/PromiseProxy.h +0 -0
  323. /package/{pods → src-native/pods}/Headers/runtime/Reference.h +0 -0
  324. /package/{pods → src-native/pods}/Headers/runtime/Runtime.h +0 -0
  325. /package/{pods → src-native/pods}/Headers/runtime/RuntimeConfig.h +0 -0
  326. /package/{pods → src-native/pods}/Headers/runtime/SetTimeout.h +0 -0
  327. /package/{pods → src-native/pods}/Headers/runtime/SimpleAllocator.h +0 -0
  328. /package/{pods → src-native/pods}/Headers/runtime/StringHasher.h +0 -0
  329. /package/{pods → src-native/pods}/Headers/runtime/SymbolIterator.h +0 -0
  330. /package/{pods → src-native/pods}/Headers/runtime/SymbolLoader.h +0 -0
  331. /package/{pods → src-native/pods}/Headers/runtime/TNSDerivedClass.h +0 -0
  332. /package/{pods → src-native/pods}/Headers/runtime/TSHelpers.h +0 -0
  333. /package/{pods → src-native/pods}/Headers/runtime/Tasks.h +0 -0
  334. /package/{pods → src-native/pods}/Headers/runtime/UnmanagedType.h +0 -0
  335. /package/{pods → src-native/pods}/Headers/runtime/WeakRef.h +0 -0
  336. /package/{pods → src-native/pods}/Headers/runtime/Worker.h +0 -0
  337. /package/{pods → src-native/pods}/Headers/runtime/robin_hood.h +0 -0
  338. /package/{pods → src-native/pods}/Headers/v8runtime/HostProxy.h +0 -0
  339. /package/{pods → src-native/pods}/Headers/v8runtime/JSIV8ValueConverter.h +0 -0
  340. /package/{pods → src-native/pods}/Headers/v8runtime/V8PointerValue.h +0 -0
  341. /package/{pods → src-native/pods}/Headers/v8runtime/V8Runtime.h +0 -0
  342. /package/{pods → src-native/pods}/Headers/v8runtime/V8RuntimeConfig.h +0 -0
  343. /package/{pods → src-native/pods}/Headers/v8runtime/V8RuntimeFactory.h +0 -0
package/style.js ADDED
@@ -0,0 +1,1686 @@
1
+ import { layout } from '@nativescript/core/utils';
2
+ var StyleKeys;
3
+ (function (StyleKeys) {
4
+ StyleKeys[StyleKeys["DISPLAY"] = 0] = "DISPLAY";
5
+ StyleKeys[StyleKeys["POSITION"] = 4] = "POSITION";
6
+ StyleKeys[StyleKeys["DIRECTION"] = 8] = "DIRECTION";
7
+ StyleKeys[StyleKeys["FLEX_DIRECTION"] = 12] = "FLEX_DIRECTION";
8
+ StyleKeys[StyleKeys["FLEX_WRAP"] = 16] = "FLEX_WRAP";
9
+ StyleKeys[StyleKeys["OVERFLOW_X"] = 20] = "OVERFLOW_X";
10
+ StyleKeys[StyleKeys["OVERFLOW_Y"] = 24] = "OVERFLOW_Y";
11
+ StyleKeys[StyleKeys["ALIGN_ITEMS"] = 28] = "ALIGN_ITEMS";
12
+ StyleKeys[StyleKeys["ALIGN_SELF"] = 32] = "ALIGN_SELF";
13
+ StyleKeys[StyleKeys["ALIGN_CONTENT"] = 36] = "ALIGN_CONTENT";
14
+ StyleKeys[StyleKeys["JUSTIFY_ITEMS"] = 40] = "JUSTIFY_ITEMS";
15
+ StyleKeys[StyleKeys["JUSTIFY_SELF"] = 44] = "JUSTIFY_SELF";
16
+ StyleKeys[StyleKeys["JUSTIFY_CONTENT"] = 48] = "JUSTIFY_CONTENT";
17
+ StyleKeys[StyleKeys["INSET_LEFT_TYPE"] = 52] = "INSET_LEFT_TYPE";
18
+ StyleKeys[StyleKeys["INSET_LEFT_VALUE"] = 56] = "INSET_LEFT_VALUE";
19
+ StyleKeys[StyleKeys["INSET_RIGHT_TYPE"] = 60] = "INSET_RIGHT_TYPE";
20
+ StyleKeys[StyleKeys["INSET_RIGHT_VALUE"] = 64] = "INSET_RIGHT_VALUE";
21
+ StyleKeys[StyleKeys["INSET_TOP_TYPE"] = 68] = "INSET_TOP_TYPE";
22
+ StyleKeys[StyleKeys["INSET_TOP_VALUE"] = 72] = "INSET_TOP_VALUE";
23
+ StyleKeys[StyleKeys["INSET_BOTTOM_TYPE"] = 76] = "INSET_BOTTOM_TYPE";
24
+ StyleKeys[StyleKeys["INSET_BOTTOM_VALUE"] = 80] = "INSET_BOTTOM_VALUE";
25
+ StyleKeys[StyleKeys["MARGIN_LEFT_TYPE"] = 84] = "MARGIN_LEFT_TYPE";
26
+ StyleKeys[StyleKeys["MARGIN_LEFT_VALUE"] = 88] = "MARGIN_LEFT_VALUE";
27
+ StyleKeys[StyleKeys["MARGIN_RIGHT_TYPE"] = 92] = "MARGIN_RIGHT_TYPE";
28
+ StyleKeys[StyleKeys["MARGIN_RIGHT_VALUE"] = 96] = "MARGIN_RIGHT_VALUE";
29
+ StyleKeys[StyleKeys["MARGIN_TOP_TYPE"] = 100] = "MARGIN_TOP_TYPE";
30
+ StyleKeys[StyleKeys["MARGIN_TOP_VALUE"] = 104] = "MARGIN_TOP_VALUE";
31
+ StyleKeys[StyleKeys["MARGIN_BOTTOM_TYPE"] = 108] = "MARGIN_BOTTOM_TYPE";
32
+ StyleKeys[StyleKeys["MARGIN_BOTTOM_VALUE"] = 112] = "MARGIN_BOTTOM_VALUE";
33
+ StyleKeys[StyleKeys["PADDING_LEFT_TYPE"] = 116] = "PADDING_LEFT_TYPE";
34
+ StyleKeys[StyleKeys["PADDING_LEFT_VALUE"] = 120] = "PADDING_LEFT_VALUE";
35
+ StyleKeys[StyleKeys["PADDING_RIGHT_TYPE"] = 124] = "PADDING_RIGHT_TYPE";
36
+ StyleKeys[StyleKeys["PADDING_RIGHT_VALUE"] = 128] = "PADDING_RIGHT_VALUE";
37
+ StyleKeys[StyleKeys["PADDING_TOP_TYPE"] = 132] = "PADDING_TOP_TYPE";
38
+ StyleKeys[StyleKeys["PADDING_TOP_VALUE"] = 136] = "PADDING_TOP_VALUE";
39
+ StyleKeys[StyleKeys["PADDING_BOTTOM_TYPE"] = 140] = "PADDING_BOTTOM_TYPE";
40
+ StyleKeys[StyleKeys["PADDING_BOTTOM_VALUE"] = 144] = "PADDING_BOTTOM_VALUE";
41
+ StyleKeys[StyleKeys["BORDER_LEFT_TYPE"] = 148] = "BORDER_LEFT_TYPE";
42
+ StyleKeys[StyleKeys["BORDER_LEFT_VALUE"] = 152] = "BORDER_LEFT_VALUE";
43
+ StyleKeys[StyleKeys["BORDER_RIGHT_TYPE"] = 156] = "BORDER_RIGHT_TYPE";
44
+ StyleKeys[StyleKeys["BORDER_RIGHT_VALUE"] = 160] = "BORDER_RIGHT_VALUE";
45
+ StyleKeys[StyleKeys["BORDER_TOP_TYPE"] = 164] = "BORDER_TOP_TYPE";
46
+ StyleKeys[StyleKeys["BORDER_TOP_VALUE"] = 168] = "BORDER_TOP_VALUE";
47
+ StyleKeys[StyleKeys["BORDER_BOTTOM_TYPE"] = 172] = "BORDER_BOTTOM_TYPE";
48
+ StyleKeys[StyleKeys["BORDER_BOTTOM_VALUE"] = 176] = "BORDER_BOTTOM_VALUE";
49
+ StyleKeys[StyleKeys["FLEX_GROW"] = 180] = "FLEX_GROW";
50
+ StyleKeys[StyleKeys["FLEX_SHRINK"] = 184] = "FLEX_SHRINK";
51
+ StyleKeys[StyleKeys["FLEX_BASIS_TYPE"] = 188] = "FLEX_BASIS_TYPE";
52
+ StyleKeys[StyleKeys["FLEX_BASIS_VALUE"] = 192] = "FLEX_BASIS_VALUE";
53
+ StyleKeys[StyleKeys["WIDTH_TYPE"] = 196] = "WIDTH_TYPE";
54
+ StyleKeys[StyleKeys["WIDTH_VALUE"] = 200] = "WIDTH_VALUE";
55
+ StyleKeys[StyleKeys["HEIGHT_TYPE"] = 204] = "HEIGHT_TYPE";
56
+ StyleKeys[StyleKeys["HEIGHT_VALUE"] = 208] = "HEIGHT_VALUE";
57
+ StyleKeys[StyleKeys["MIN_WIDTH_TYPE"] = 212] = "MIN_WIDTH_TYPE";
58
+ StyleKeys[StyleKeys["MIN_WIDTH_VALUE"] = 216] = "MIN_WIDTH_VALUE";
59
+ StyleKeys[StyleKeys["MIN_HEIGHT_TYPE"] = 220] = "MIN_HEIGHT_TYPE";
60
+ StyleKeys[StyleKeys["MIN_HEIGHT_VALUE"] = 224] = "MIN_HEIGHT_VALUE";
61
+ StyleKeys[StyleKeys["MAX_WIDTH_TYPE"] = 228] = "MAX_WIDTH_TYPE";
62
+ StyleKeys[StyleKeys["MAX_WIDTH_VALUE"] = 232] = "MAX_WIDTH_VALUE";
63
+ StyleKeys[StyleKeys["MAX_HEIGHT_TYPE"] = 236] = "MAX_HEIGHT_TYPE";
64
+ StyleKeys[StyleKeys["MAX_HEIGHT_VALUE"] = 240] = "MAX_HEIGHT_VALUE";
65
+ StyleKeys[StyleKeys["GAP_ROW_TYPE"] = 244] = "GAP_ROW_TYPE";
66
+ StyleKeys[StyleKeys["GAP_ROW_VALUE"] = 248] = "GAP_ROW_VALUE";
67
+ StyleKeys[StyleKeys["GAP_COLUMN_TYPE"] = 252] = "GAP_COLUMN_TYPE";
68
+ StyleKeys[StyleKeys["GAP_COLUMN_VALUE"] = 256] = "GAP_COLUMN_VALUE";
69
+ StyleKeys[StyleKeys["ASPECT_RATIO"] = 260] = "ASPECT_RATIO";
70
+ StyleKeys[StyleKeys["GRID_AUTO_FLOW"] = 264] = "GRID_AUTO_FLOW";
71
+ StyleKeys[StyleKeys["GRID_COLUMN_START_TYPE"] = 268] = "GRID_COLUMN_START_TYPE";
72
+ StyleKeys[StyleKeys["GRID_COLUMN_START_VALUE"] = 272] = "GRID_COLUMN_START_VALUE";
73
+ StyleKeys[StyleKeys["GRID_COLUMN_END_TYPE"] = 276] = "GRID_COLUMN_END_TYPE";
74
+ StyleKeys[StyleKeys["GRID_COLUMN_END_VALUE"] = 280] = "GRID_COLUMN_END_VALUE";
75
+ StyleKeys[StyleKeys["GRID_ROW_START_TYPE"] = 284] = "GRID_ROW_START_TYPE";
76
+ StyleKeys[StyleKeys["GRID_ROW_START_VALUE"] = 288] = "GRID_ROW_START_VALUE";
77
+ StyleKeys[StyleKeys["GRID_ROW_END_TYPE"] = 292] = "GRID_ROW_END_TYPE";
78
+ StyleKeys[StyleKeys["GRID_ROW_END_VALUE"] = 296] = "GRID_ROW_END_VALUE";
79
+ StyleKeys[StyleKeys["SCROLLBAR_WIDTH"] = 300] = "SCROLLBAR_WIDTH";
80
+ StyleKeys[StyleKeys["TEXT_ALIGN"] = 304] = "TEXT_ALIGN";
81
+ StyleKeys[StyleKeys["BOX_SIZING"] = 308] = "BOX_SIZING";
82
+ StyleKeys[StyleKeys["OVERFLOW"] = 312] = "OVERFLOW";
83
+ StyleKeys[StyleKeys["ITEM_IS_TABLE"] = 316] = "ITEM_IS_TABLE";
84
+ })(StyleKeys || (StyleKeys = {}));
85
+ var TextStyleKeys;
86
+ (function (TextStyleKeys) {
87
+ 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";
98
+ })(TextStyleKeys || (TextStyleKeys = {}));
99
+ function parseLengthPercentageAuto(type, value) {
100
+ switch (type) {
101
+ case 0:
102
+ return 'auto';
103
+ case 1:
104
+ return { value, unit: 'px' };
105
+ case 2:
106
+ return { value, unit: '%' };
107
+ }
108
+ }
109
+ function parseLengthPercentage(type, value) {
110
+ switch (type) {
111
+ case 0:
112
+ return { value, unit: 'px' };
113
+ case 1:
114
+ return { value, unit: '%' };
115
+ }
116
+ }
117
+ class StateKeys {
118
+ constructor(bits) {
119
+ this.bits = bits;
120
+ }
121
+ or(other) {
122
+ return new StateKeys(this.bits | other.bits);
123
+ }
124
+ and(other) {
125
+ return new StateKeys(this.bits & other.bits);
126
+ }
127
+ hasFlag(flag) {
128
+ return (this.bits & flag.bits) !== 0n;
129
+ }
130
+ }
131
+ StateKeys.DISPLAY = new StateKeys(1n << 0n);
132
+ StateKeys.POSITION = new StateKeys(1n << 1n);
133
+ StateKeys.DIRECTION = new StateKeys(1n << 2n);
134
+ StateKeys.FLEX_DIRECTION = new StateKeys(1n << 3n);
135
+ StateKeys.FLEX_WRAP = new StateKeys(1n << 4n);
136
+ StateKeys.OVERFLOW_X = new StateKeys(1n << 5n);
137
+ StateKeys.OVERFLOW_Y = new StateKeys(1n << 6n);
138
+ StateKeys.ALIGN_ITEMS = new StateKeys(1n << 7n);
139
+ StateKeys.ALIGN_SELF = new StateKeys(1n << 8n);
140
+ StateKeys.ALIGN_CONTENT = new StateKeys(1n << 9n);
141
+ StateKeys.JUSTIFY_ITEMS = new StateKeys(1n << 10n);
142
+ StateKeys.JUSTIFY_SELF = new StateKeys(1n << 11n);
143
+ StateKeys.JUSTIFY_CONTENT = new StateKeys(1n << 12n);
144
+ StateKeys.INSET = new StateKeys(1n << 13n);
145
+ StateKeys.MARGIN = new StateKeys(1n << 14n);
146
+ StateKeys.PADDING = new StateKeys(1n << 15n);
147
+ StateKeys.BORDER = new StateKeys(1n << 16n);
148
+ StateKeys.FLEX_GROW = new StateKeys(1n << 17n);
149
+ StateKeys.FLEX_SHRINK = new StateKeys(1n << 18n);
150
+ StateKeys.FLEX_BASIS = new StateKeys(1n << 19n);
151
+ StateKeys.SIZE = new StateKeys(1n << 20n);
152
+ StateKeys.MIN_SIZE = new StateKeys(1n << 21n);
153
+ StateKeys.MAX_SIZE = new StateKeys(1n << 22n);
154
+ StateKeys.GAP = new StateKeys(1n << 23n);
155
+ StateKeys.ASPECT_RATIO = new StateKeys(1n << 24n);
156
+ StateKeys.GRID_AUTO_FLOW = new StateKeys(1n << 25n);
157
+ StateKeys.GRID_COLUMN = new StateKeys(1n << 26n);
158
+ StateKeys.GRID_ROW = new StateKeys(1n << 27n);
159
+ StateKeys.SCROLLBAR_WIDTH = new StateKeys(1n << 28n);
160
+ StateKeys.TEXT_ALIGN = new StateKeys(1n << 29n);
161
+ StateKeys.BOX_SIZING = new StateKeys(1n << 30n);
162
+ StateKeys.OVERFLOW = new StateKeys(1n << 31n);
163
+ StateKeys.ITEM_IS_TABLE = new StateKeys(1n << 32n);
164
+ class TextStateKeys {
165
+ constructor(bits) {
166
+ this.bits = bits;
167
+ }
168
+ or(other) {
169
+ return new TextStateKeys(this.bits | other.bits);
170
+ }
171
+ and(other) {
172
+ return new TextStateKeys(this.bits & other.bits);
173
+ }
174
+ hasFlag(flag) {
175
+ return (this.bits & flag.bits) !== 0n;
176
+ }
177
+ }
178
+ 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);
188
+ TextStateKeys.TEXT_WRAP = new TextStateKeys(1n << 10n);
189
+ const getUint32 = (view, offset) => {
190
+ return view.getUint32(offset, true);
191
+ };
192
+ const setUint32 = (view, offset, value) => {
193
+ view.setUint32(offset, value, true);
194
+ };
195
+ const getInt32 = (view, offset) => {
196
+ return view.getInt32(offset, true);
197
+ };
198
+ const setInt32 = (view, offset, value) => {
199
+ view.setInt32(offset, value, true);
200
+ };
201
+ const getFloat32 = (view, offset) => {
202
+ return view.getFloat32(offset, true);
203
+ };
204
+ const setFloat32 = (view, offset, value) => {
205
+ view.setFloat32(offset, value, true);
206
+ };
207
+ export class Style {
208
+ constructor() {
209
+ this.isDirty = -1n;
210
+ this.isTextDirty = -1n;
211
+ this.inBatch = false;
212
+ }
213
+ static fromView(view, nativeView, isText = false) {
214
+ //console.time('fromView');
215
+ const ret = new Style();
216
+ ret.view_ = view;
217
+ 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);
231
+ }
232
+ }
233
+ 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);
251
+ }
252
+ }
253
+ //console.timeEnd('fromView');
254
+ return ret;
255
+ }
256
+ resetState() {
257
+ this.isDirty = -1n;
258
+ this.isTextDirty = -1n;
259
+ }
260
+ syncStyle(isText = false) {
261
+ // console.time('syncStyle');
262
+ 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
+ }
271
+ }
272
+ 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
+ }
281
+ }
282
+ this.resetState();
283
+ // console.timeEnd('syncStyle');
284
+ }
285
+ setOrAppendState(value) {
286
+ if (this.isDirty == -1n) {
287
+ this.isDirty = value.bits;
288
+ }
289
+ else {
290
+ this.isDirty = this.isDirty | value.bits;
291
+ }
292
+ if (!this.inBatch) {
293
+ this.syncStyle(this.text_style_view != null);
294
+ }
295
+ }
296
+ setOrAppendTextState(value) {
297
+ if (this.isTextDirty == -1n) {
298
+ this.isTextDirty = value.bits;
299
+ }
300
+ else {
301
+ this.isTextDirty = this.isTextDirty | value.bits;
302
+ }
303
+ if (!this.inBatch) {
304
+ this.syncStyle(this.text_style_view != null);
305
+ }
306
+ }
307
+ batch(fn) {
308
+ this.inBatch = true;
309
+ fn(this);
310
+ this.inBatch = false;
311
+ this.syncStyle(this.text_style_view != null);
312
+ }
313
+ get view() {
314
+ return this.view_;
315
+ }
316
+ get color() {
317
+ if (!this.text_style_view) {
318
+ // BLACK ?
319
+ return 0;
320
+ }
321
+ return getUint32(this.text_style_view, TextStyleKeys.COLOR);
322
+ }
323
+ set color(value) {
324
+ if (!this.text_style_view) {
325
+ return;
326
+ }
327
+ setUint32(this.text_style_view, TextStyleKeys.COLOR, value);
328
+ this.setOrAppendTextState(TextStateKeys.COLOR);
329
+ }
330
+ get backgroundColor() {
331
+ if (!this.text_style_view) {
332
+ // BLACK ?
333
+ return 0;
334
+ }
335
+ return getUint32(this.text_style_view, TextStyleKeys.BACKGROUND_COLOR);
336
+ }
337
+ set backgroundColor(value) {
338
+ if (!this.text_style_view) {
339
+ return;
340
+ }
341
+ setUint32(this.text_style_view, TextStyleKeys.BACKGROUND_COLOR, value);
342
+ this.setOrAppendTextState(TextStateKeys.BACKGROUND_COLOR);
343
+ }
344
+ get textWrap() {
345
+ if (!this.text_style_view) {
346
+ // BLACK ?
347
+ return 0;
348
+ }
349
+ return getInt32(this.text_style_view, TextStyleKeys.TEXT_ALIGN);
350
+ }
351
+ set textWrap(value) {
352
+ if (!this.text_style_view) {
353
+ return;
354
+ }
355
+ setInt32(this.text_style_view, TextStyleKeys.TEXT_WRAP, value);
356
+ this.setOrAppendTextState(TextStateKeys.TEXT_WRAP);
357
+ }
358
+ get styleView() {
359
+ return this.style_view;
360
+ }
361
+ get display() {
362
+ switch (getInt32(this.style_view, StyleKeys.DISPLAY)) {
363
+ case 0:
364
+ return 'none';
365
+ case 1:
366
+ return 'flex';
367
+ case 2:
368
+ return 'grid';
369
+ case 3:
370
+ return 'block';
371
+ }
372
+ }
373
+ set display(value) {
374
+ let display = -1;
375
+ switch (value) {
376
+ case 'none':
377
+ display = 0;
378
+ break;
379
+ case 'flex':
380
+ display = 1;
381
+ break;
382
+ case 'grid':
383
+ display = 2;
384
+ break;
385
+ case 'block':
386
+ display = 3;
387
+ break;
388
+ }
389
+ if (display != -1) {
390
+ setInt32(this.style_view, StyleKeys.DISPLAY, display);
391
+ this.setOrAppendState(StateKeys.DISPLAY);
392
+ }
393
+ }
394
+ get position() {
395
+ switch (getInt32(this.style_view, StyleKeys.POSITION)) {
396
+ case 0:
397
+ return 'relative';
398
+ case 1:
399
+ return 'absolute';
400
+ }
401
+ }
402
+ set position(value) {
403
+ let position = -1;
404
+ switch (value) {
405
+ case 'relative':
406
+ position = 0;
407
+ break;
408
+ case 'absolute':
409
+ position = 1;
410
+ break;
411
+ }
412
+ if (position != -1) {
413
+ setInt32(this.style_view, StyleKeys.POSITION, position);
414
+ this.setOrAppendState(StateKeys.POSITION);
415
+ }
416
+ }
417
+ get flexDirection() {
418
+ switch (getInt32(this.style_view, StyleKeys.FLEX_DIRECTION)) {
419
+ case 0:
420
+ return 'column';
421
+ case 1:
422
+ return 'row';
423
+ case 2:
424
+ return 'column-reverse';
425
+ case 3:
426
+ return 'row-reverse';
427
+ }
428
+ }
429
+ set flexDirection(value) {
430
+ let flex = -1;
431
+ switch (value) {
432
+ case 'column':
433
+ flex = 0;
434
+ break;
435
+ case 'row':
436
+ flex = 1;
437
+ break;
438
+ case 'column-reverse':
439
+ flex = 2;
440
+ break;
441
+ case 'row-reverse':
442
+ flex = 3;
443
+ break;
444
+ }
445
+ if (flex != -1) {
446
+ setInt32(this.style_view, StyleKeys.FLEX_DIRECTION, flex);
447
+ this.setOrAppendState(StateKeys.FLEX_DIRECTION);
448
+ }
449
+ }
450
+ get flexWrap() {
451
+ switch (getInt32(this.style_view, StyleKeys.FLEX_WRAP)) {
452
+ case 0:
453
+ return 'no-wrap';
454
+ case 1:
455
+ return 'wrap';
456
+ case 2:
457
+ return 'wrap-reverse';
458
+ }
459
+ }
460
+ set flexWrap(value) {
461
+ let wrap = -1;
462
+ switch (value) {
463
+ case 'no-wrap':
464
+ wrap = 0;
465
+ break;
466
+ case 'wrap':
467
+ wrap = 1;
468
+ break;
469
+ case 'wrap-reverse':
470
+ wrap = 2;
471
+ break;
472
+ }
473
+ if (wrap != -1) {
474
+ setInt32(this.style_view, StyleKeys.FLEX_WRAP, wrap);
475
+ this.setOrAppendState(StateKeys.FLEX_WRAP);
476
+ }
477
+ }
478
+ // get flex(): string | 'auto' | 'none' | number | 'initial' {
479
+ // return this.style[StyleKeys.FLEX];
480
+ // }
481
+ // get flexFlow(): string
482
+ get minWidth() {
483
+ const type = getInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE);
484
+ const value = getFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE);
485
+ return parseLengthPercentageAuto(type, value);
486
+ }
487
+ set minWidth(value) {
488
+ switch (typeof value) {
489
+ case 'string':
490
+ setInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 0);
491
+ break;
492
+ case 'number':
493
+ setInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 1);
494
+ setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, layout.toDevicePixels(value));
495
+ break;
496
+ case 'object':
497
+ switch (value.unit) {
498
+ case 'dip':
499
+ setInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 1);
500
+ setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, layout.toDevicePixels(value.value));
501
+ break;
502
+ case 'px':
503
+ setInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 1);
504
+ setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, value.value);
505
+ break;
506
+ case '%':
507
+ setInt32(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 2);
508
+ setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, value.value);
509
+ break;
510
+ }
511
+ break;
512
+ }
513
+ this.setOrAppendState(StateKeys.MIN_SIZE);
514
+ }
515
+ get minHeight() {
516
+ const type = getInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE);
517
+ const value = getFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE);
518
+ return parseLengthPercentageAuto(type, value);
519
+ }
520
+ set minHeight(value) {
521
+ switch (typeof value) {
522
+ case 'string':
523
+ setInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 0);
524
+ break;
525
+ case 'number':
526
+ setInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 1);
527
+ setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, layout.toDevicePixels(value));
528
+ break;
529
+ case 'object':
530
+ switch (value.unit) {
531
+ case 'dip':
532
+ setInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 1);
533
+ setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, layout.toDevicePixels(value.value));
534
+ break;
535
+ case 'px':
536
+ setInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 1);
537
+ setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, value.value);
538
+ break;
539
+ case '%':
540
+ setInt32(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 2);
541
+ setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, value.value);
542
+ break;
543
+ }
544
+ break;
545
+ }
546
+ this.setOrAppendState(StateKeys.MIN_SIZE);
547
+ }
548
+ get width() {
549
+ const type = getInt32(this.style_view, StyleKeys.WIDTH_TYPE);
550
+ const value = getFloat32(this.style_view, StyleKeys.WIDTH_VALUE);
551
+ return parseLengthPercentageAuto(type, value);
552
+ }
553
+ set width(value) {
554
+ console.log('set width', value);
555
+ switch (typeof value) {
556
+ case 'string':
557
+ setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 0);
558
+ break;
559
+ case 'number':
560
+ setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 1);
561
+ setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, layout.toDevicePixels(value));
562
+ break;
563
+ case 'object':
564
+ switch (value.unit) {
565
+ case 'dip':
566
+ setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 1);
567
+ setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, layout.toDevicePixels(value.value));
568
+ break;
569
+ case 'px':
570
+ setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 1);
571
+ setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, value.value);
572
+ break;
573
+ case '%':
574
+ setInt32(this.style_view, StyleKeys.WIDTH_TYPE, 2);
575
+ setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, value.value);
576
+ break;
577
+ }
578
+ break;
579
+ }
580
+ this.setOrAppendState(StateKeys.SIZE);
581
+ }
582
+ get height() {
583
+ const type = getInt32(this.style_view, StyleKeys.HEIGHT_TYPE);
584
+ const value = getFloat32(this.style_view, StyleKeys.HEIGHT_VALUE);
585
+ return parseLengthPercentageAuto(type, value);
586
+ }
587
+ set height(value) {
588
+ switch (typeof value) {
589
+ case 'string':
590
+ setInt32(this.style_view, StyleKeys.HEIGHT_TYPE, 0);
591
+ setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, 0);
592
+ break;
593
+ case 'number':
594
+ setInt32(this.style_view, StyleKeys.HEIGHT_TYPE, 1);
595
+ setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, layout.toDevicePixels(value));
596
+ break;
597
+ case 'object':
598
+ switch (value.unit) {
599
+ case 'dip':
600
+ setInt32(this.style_view, StyleKeys.HEIGHT_TYPE, 1);
601
+ setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, layout.toDevicePixels(value.value));
602
+ break;
603
+ case 'px':
604
+ setInt32(this.style_view, StyleKeys.HEIGHT_TYPE, 1);
605
+ setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, value.value);
606
+ break;
607
+ case '%':
608
+ setInt32(this.style_view, StyleKeys.HEIGHT_TYPE, 2);
609
+ setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, value.value);
610
+ break;
611
+ }
612
+ break;
613
+ }
614
+ this.setOrAppendState(StateKeys.SIZE);
615
+ }
616
+ get maxWidth() {
617
+ const type = getInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE);
618
+ const value = getFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE);
619
+ return parseLengthPercentageAuto(type, value);
620
+ }
621
+ set maxWidth(value) {
622
+ switch (typeof value) {
623
+ case 'string':
624
+ setInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 0);
625
+ break;
626
+ case 'number':
627
+ setInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 1);
628
+ setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, layout.toDevicePixels(value));
629
+ break;
630
+ case 'object':
631
+ switch (value.unit) {
632
+ case 'dip':
633
+ setInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 1);
634
+ setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, layout.toDevicePixels(value.value));
635
+ break;
636
+ case 'px':
637
+ setInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 1);
638
+ setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, value.value);
639
+ break;
640
+ case '%':
641
+ setInt32(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 2);
642
+ setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, value.value);
643
+ break;
644
+ }
645
+ break;
646
+ }
647
+ this.setOrAppendState(StateKeys.MAX_SIZE);
648
+ }
649
+ get maxHeight() {
650
+ const type = getInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE);
651
+ const value = getFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE);
652
+ return parseLengthPercentageAuto(type, value);
653
+ }
654
+ set maxHeight(value) {
655
+ switch (typeof value) {
656
+ case 'string':
657
+ setInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 0);
658
+ break;
659
+ case 'number':
660
+ setInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 1);
661
+ setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, layout.toDevicePixels(value));
662
+ break;
663
+ case 'object':
664
+ switch (value.unit) {
665
+ case 'dip':
666
+ setInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 1);
667
+ setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, layout.toDevicePixels(value.value));
668
+ break;
669
+ case 'px':
670
+ setInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 1);
671
+ setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, value.value);
672
+ break;
673
+ case '%':
674
+ setInt32(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 2);
675
+ setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, value.value);
676
+ break;
677
+ }
678
+ break;
679
+ }
680
+ this.setOrAppendState(StateKeys.MAX_SIZE);
681
+ }
682
+ get borderLeft() {
683
+ const type = getInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE);
684
+ const value = getFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE);
685
+ return parseLengthPercentage(type, value);
686
+ }
687
+ set borderLeft(value) {
688
+ switch (typeof value) {
689
+ case 'number':
690
+ setInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE, 0);
691
+ setFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE, layout.toDevicePixels(value));
692
+ break;
693
+ case 'object':
694
+ switch (value.unit) {
695
+ case 'dip':
696
+ setInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE, 0);
697
+ setFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE, layout.toDevicePixels(value.value));
698
+ break;
699
+ case 'px':
700
+ setInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE, 0);
701
+ setFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE, value.value);
702
+ break;
703
+ case '%':
704
+ setInt32(this.style_view, StyleKeys.BORDER_LEFT_TYPE, 1);
705
+ setFloat32(this.style_view, StyleKeys.BORDER_LEFT_VALUE, value.value);
706
+ break;
707
+ }
708
+ break;
709
+ }
710
+ this.setOrAppendState(StateKeys.BORDER);
711
+ }
712
+ get borderRight() {
713
+ const type = getInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE);
714
+ const value = getFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE);
715
+ return parseLengthPercentage(type, value);
716
+ }
717
+ set borderRight(value) {
718
+ switch (typeof value) {
719
+ case 'number':
720
+ setInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE, 0);
721
+ setFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE, layout.toDevicePixels(value));
722
+ break;
723
+ case 'object':
724
+ switch (value.unit) {
725
+ case 'dip':
726
+ setInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE, 0);
727
+ setFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE, layout.toDevicePixels(value.value));
728
+ break;
729
+ case 'px':
730
+ setInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE, 0);
731
+ setFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE, value.value);
732
+ break;
733
+ case '%':
734
+ setInt32(this.style_view, StyleKeys.BORDER_RIGHT_TYPE, 1);
735
+ setFloat32(this.style_view, StyleKeys.BORDER_RIGHT_VALUE, value.value);
736
+ break;
737
+ }
738
+ break;
739
+ }
740
+ this.setOrAppendState(StateKeys.BORDER);
741
+ }
742
+ get borderTop() {
743
+ const type = getInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE);
744
+ const value = getFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE);
745
+ return parseLengthPercentage(type, value);
746
+ }
747
+ set borderTop(value) {
748
+ switch (typeof value) {
749
+ case 'number':
750
+ setInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE, 0);
751
+ setFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE, layout.toDevicePixels(value));
752
+ break;
753
+ case 'object':
754
+ switch (value.unit) {
755
+ case 'dip':
756
+ setInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE, 0);
757
+ setFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE, layout.toDevicePixels(value.value));
758
+ break;
759
+ case 'px':
760
+ setInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE, 0);
761
+ setFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE, value.value);
762
+ break;
763
+ case '%':
764
+ setInt32(this.style_view, StyleKeys.BORDER_TOP_TYPE, 1);
765
+ setFloat32(this.style_view, StyleKeys.BORDER_TOP_VALUE, value.value);
766
+ break;
767
+ }
768
+ break;
769
+ }
770
+ this.setOrAppendState(StateKeys.BORDER);
771
+ }
772
+ get borderBottom() {
773
+ const type = getInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE);
774
+ const value = getFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE);
775
+ return parseLengthPercentage(type, value);
776
+ }
777
+ set borderBottom(value) {
778
+ switch (typeof value) {
779
+ case 'number':
780
+ setInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE, 0);
781
+ setFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE, layout.toDevicePixels(value));
782
+ break;
783
+ case 'object':
784
+ switch (value.unit) {
785
+ case 'dip':
786
+ setInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE, 0);
787
+ setFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE, layout.toDevicePixels(value.value));
788
+ break;
789
+ case 'px':
790
+ setInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE, 0);
791
+ setFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE, value.value);
792
+ break;
793
+ case '%':
794
+ setInt32(this.style_view, StyleKeys.BORDER_BOTTOM_TYPE, 1);
795
+ setFloat32(this.style_view, StyleKeys.BORDER_BOTTOM_VALUE, value.value);
796
+ break;
797
+ }
798
+ break;
799
+ }
800
+ this.setOrAppendState(StateKeys.BORDER);
801
+ }
802
+ get left() {
803
+ const type = getInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE);
804
+ const value = getFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE);
805
+ return parseLengthPercentage(type, value);
806
+ }
807
+ set left(value) {
808
+ switch (typeof value) {
809
+ case 'number':
810
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
811
+ setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, layout.toDevicePixels(value));
812
+ break;
813
+ case 'object':
814
+ switch (value.unit) {
815
+ case 'dip':
816
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
817
+ setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, layout.toDevicePixels(value.value));
818
+ break;
819
+ case 'px':
820
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 0);
821
+ setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, value.value);
822
+ break;
823
+ case '%':
824
+ setInt32(this.style_view, StyleKeys.INSET_LEFT_TYPE, 1);
825
+ setFloat32(this.style_view, StyleKeys.INSET_LEFT_VALUE, value.value);
826
+ break;
827
+ }
828
+ break;
829
+ }
830
+ this.setOrAppendState(StateKeys.INSET);
831
+ }
832
+ get right() {
833
+ const type = getInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE);
834
+ const value = getFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE);
835
+ return parseLengthPercentage(type, value);
836
+ }
837
+ set right(value) {
838
+ switch (typeof value) {
839
+ case 'number':
840
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
841
+ setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, layout.toDevicePixels(value));
842
+ break;
843
+ case 'object':
844
+ switch (value.unit) {
845
+ case 'dip':
846
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
847
+ setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, layout.toDevicePixels(value.value));
848
+ break;
849
+ case 'px':
850
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 0);
851
+ setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, value.value);
852
+ break;
853
+ case '%':
854
+ setInt32(this.style_view, StyleKeys.INSET_RIGHT_TYPE, 1);
855
+ setFloat32(this.style_view, StyleKeys.INSET_RIGHT_VALUE, value.value);
856
+ break;
857
+ }
858
+ break;
859
+ }
860
+ this.setOrAppendState(StateKeys.INSET);
861
+ }
862
+ get top() {
863
+ const type = getInt32(this.style_view, StyleKeys.INSET_TOP_TYPE);
864
+ const value = getFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE);
865
+ return parseLengthPercentage(type, value);
866
+ }
867
+ set top(value) {
868
+ switch (typeof value) {
869
+ case 'number':
870
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
871
+ setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, layout.toDevicePixels(value));
872
+ break;
873
+ case 'object':
874
+ switch (value.unit) {
875
+ case 'dip':
876
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
877
+ setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, layout.toDevicePixels(value.value));
878
+ break;
879
+ case 'px':
880
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 0);
881
+ setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, value.value);
882
+ break;
883
+ case '%':
884
+ setInt32(this.style_view, StyleKeys.INSET_TOP_TYPE, 1);
885
+ setFloat32(this.style_view, StyleKeys.INSET_TOP_VALUE, value.value);
886
+ break;
887
+ }
888
+ break;
889
+ }
890
+ this.setOrAppendState(StateKeys.INSET);
891
+ }
892
+ get bottom() {
893
+ const type = getInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE);
894
+ const value = getFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE);
895
+ return parseLengthPercentage(type, value);
896
+ }
897
+ set bottom(value) {
898
+ switch (typeof value) {
899
+ case 'number':
900
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
901
+ setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, layout.toDevicePixels(value));
902
+ break;
903
+ case 'object':
904
+ switch (value.unit) {
905
+ case 'dip':
906
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
907
+ setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, layout.toDevicePixels(value.value));
908
+ break;
909
+ case 'px':
910
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 0);
911
+ setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, value.value);
912
+ break;
913
+ case '%':
914
+ setInt32(this.style_view, StyleKeys.INSET_BOTTOM_TYPE, 1);
915
+ setFloat32(this.style_view, StyleKeys.INSET_BOTTOM_VALUE, value.value);
916
+ break;
917
+ }
918
+ break;
919
+ }
920
+ this.setOrAppendState(StateKeys.INSET);
921
+ }
922
+ get marginLeft() {
923
+ const type = getInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE);
924
+ const value = getFloat32(this.style_view, StyleKeys.MARGIN_LEFT_VALUE);
925
+ return parseLengthPercentageAuto(type, value);
926
+ }
927
+ set marginLeft(value) {
928
+ switch (typeof value) {
929
+ case 'string':
930
+ setInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE, 0);
931
+ break;
932
+ case 'number':
933
+ setInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE, 1);
934
+ setFloat32(this.style_view, StyleKeys.MARGIN_LEFT_VALUE, layout.toDevicePixels(value));
935
+ break;
936
+ case 'object':
937
+ switch (value.unit) {
938
+ case 'dip':
939
+ setInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE, 1);
940
+ setFloat32(this.style_view, StyleKeys.MARGIN_LEFT_VALUE, layout.toDevicePixels(value.value));
941
+ break;
942
+ case 'px':
943
+ setInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE, 1);
944
+ setFloat32(this.style_view, StyleKeys.MARGIN_LEFT_VALUE, value.value);
945
+ break;
946
+ case '%':
947
+ setInt32(this.style_view, StyleKeys.MARGIN_LEFT_TYPE, 2);
948
+ setFloat32(this.style_view, StyleKeys.MARGIN_LEFT_VALUE, value.value);
949
+ break;
950
+ }
951
+ break;
952
+ }
953
+ this.setOrAppendState(StateKeys.INSET);
954
+ }
955
+ get marginRight() {
956
+ const type = getInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE);
957
+ const value = getFloat32(this.style_view, StyleKeys.MARGIN_RIGHT_VALUE);
958
+ return parseLengthPercentageAuto(type, value);
959
+ }
960
+ set marginRight(value) {
961
+ switch (typeof value) {
962
+ case 'string':
963
+ setInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE, 0);
964
+ break;
965
+ case 'number':
966
+ setInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE, 1);
967
+ setFloat32(this.style_view, StyleKeys.MARGIN_RIGHT_VALUE, layout.toDevicePixels(value));
968
+ break;
969
+ case 'object':
970
+ switch (value.unit) {
971
+ case 'dip':
972
+ setInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE, 1);
973
+ setFloat32(this.style_view, StyleKeys.MARGIN_RIGHT_VALUE, layout.toDevicePixels(value.value));
974
+ break;
975
+ case 'px':
976
+ setInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE, 1);
977
+ setFloat32(this.style_view, StyleKeys.MARGIN_RIGHT_VALUE, value.value);
978
+ break;
979
+ case '%':
980
+ setInt32(this.style_view, StyleKeys.MARGIN_RIGHT_TYPE, 2);
981
+ setFloat32(this.style_view, StyleKeys.MARGIN_RIGHT_VALUE, value.value);
982
+ break;
983
+ }
984
+ break;
985
+ }
986
+ this.setOrAppendState(StateKeys.MARGIN);
987
+ }
988
+ get marginTop() {
989
+ const type = getInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE);
990
+ const value = getFloat32(this.style_view, StyleKeys.MARGIN_TOP_VALUE);
991
+ return parseLengthPercentageAuto(type, value);
992
+ }
993
+ set marginTop(value) {
994
+ switch (typeof value) {
995
+ case 'string':
996
+ setInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE, 0);
997
+ break;
998
+ case 'number':
999
+ setInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE, 1);
1000
+ setFloat32(this.style_view, StyleKeys.MARGIN_TOP_VALUE, layout.toDevicePixels(value));
1001
+ break;
1002
+ case 'object':
1003
+ switch (value.unit) {
1004
+ case 'dip':
1005
+ setInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE, 1);
1006
+ setFloat32(this.style_view, StyleKeys.MARGIN_TOP_VALUE, layout.toDevicePixels(value.value));
1007
+ break;
1008
+ case 'px':
1009
+ setInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE, 1);
1010
+ setFloat32(this.style_view, StyleKeys.MARGIN_TOP_VALUE, value.value);
1011
+ break;
1012
+ case '%':
1013
+ setInt32(this.style_view, StyleKeys.MARGIN_TOP_TYPE, 2);
1014
+ setFloat32(this.style_view, StyleKeys.MARGIN_TOP_VALUE, value.value);
1015
+ break;
1016
+ }
1017
+ break;
1018
+ }
1019
+ this.setOrAppendState(StateKeys.MARGIN);
1020
+ }
1021
+ get marginBottom() {
1022
+ const type = getInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE);
1023
+ const value = getFloat32(this.style_view, StyleKeys.MARGIN_BOTTOM_VALUE);
1024
+ return parseLengthPercentageAuto(type, value);
1025
+ }
1026
+ set marginBottom(value) {
1027
+ switch (typeof value) {
1028
+ case 'string':
1029
+ setInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE, 0);
1030
+ break;
1031
+ case 'number':
1032
+ setInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE, 1);
1033
+ setFloat32(this.style_view, StyleKeys.MARGIN_BOTTOM_VALUE, layout.toDevicePixels(value));
1034
+ break;
1035
+ case 'object':
1036
+ switch (value.unit) {
1037
+ case 'dip':
1038
+ setInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE, 1);
1039
+ setFloat32(this.style_view, StyleKeys.MARGIN_BOTTOM_VALUE, layout.toDevicePixels(value.value));
1040
+ break;
1041
+ case 'px':
1042
+ setInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE, 1);
1043
+ setFloat32(this.style_view, StyleKeys.MARGIN_BOTTOM_VALUE, value.value);
1044
+ break;
1045
+ case '%':
1046
+ setInt32(this.style_view, StyleKeys.MARGIN_BOTTOM_TYPE, 2);
1047
+ setFloat32(this.style_view, StyleKeys.MARGIN_BOTTOM_VALUE, value.value);
1048
+ break;
1049
+ }
1050
+ break;
1051
+ }
1052
+ this.setOrAppendState(StateKeys.MARGIN);
1053
+ }
1054
+ set padding(value) {
1055
+ this.inBatch = true;
1056
+ this.paddingBottom = this.paddingLeft = this.paddingRight = this.paddingTop = value;
1057
+ this.inBatch = false;
1058
+ this.setOrAppendState(StateKeys.PADDING);
1059
+ }
1060
+ get paddingLeft() {
1061
+ const type = getInt32(this.style_view, StyleKeys.PADDING_LEFT_TYPE);
1062
+ const value = getFloat32(this.style_view, StyleKeys.PADDING_LEFT_VALUE);
1063
+ return parseLengthPercentage(type, value);
1064
+ }
1065
+ set paddingLeft(value) {
1066
+ switch (typeof value) {
1067
+ case 'number':
1068
+ setInt32(this.style_view, StyleKeys.PADDING_LEFT_TYPE, 0);
1069
+ setFloat32(this.style_view, StyleKeys.PADDING_LEFT_VALUE, layout.toDevicePixels(value));
1070
+ break;
1071
+ case 'object':
1072
+ switch (value.unit) {
1073
+ case 'dip':
1074
+ setInt32(this.style_view, StyleKeys.PADDING_LEFT_TYPE, 0);
1075
+ setFloat32(this.style_view, StyleKeys.PADDING_LEFT_VALUE, layout.toDevicePixels(value.value));
1076
+ break;
1077
+ case 'px':
1078
+ setInt32(this.style_view, StyleKeys.PADDING_LEFT_TYPE, 0);
1079
+ setFloat32(this.style_view, StyleKeys.PADDING_LEFT_VALUE, value.value);
1080
+ break;
1081
+ case '%':
1082
+ setInt32(this.style_view, StyleKeys.PADDING_LEFT_TYPE, 1);
1083
+ setFloat32(this.style_view, StyleKeys.PADDING_LEFT_VALUE, value.value);
1084
+ break;
1085
+ }
1086
+ break;
1087
+ }
1088
+ this.setOrAppendState(StateKeys.PADDING);
1089
+ }
1090
+ get paddingRight() {
1091
+ const type = getInt32(this.style_view, StyleKeys.PADDING_RIGHT_TYPE);
1092
+ const value = getFloat32(this.style_view, StyleKeys.PADDING_RIGHT_VALUE);
1093
+ return parseLengthPercentage(type, value);
1094
+ }
1095
+ set paddingRight(value) {
1096
+ switch (typeof value) {
1097
+ case 'number':
1098
+ setInt32(this.style_view, StyleKeys.PADDING_RIGHT_TYPE, 0);
1099
+ setFloat32(this.style_view, StyleKeys.PADDING_RIGHT_VALUE, layout.toDevicePixels(value));
1100
+ break;
1101
+ case 'object':
1102
+ switch (value.unit) {
1103
+ case 'dip':
1104
+ setInt32(this.style_view, StyleKeys.PADDING_RIGHT_TYPE, 0);
1105
+ setFloat32(this.style_view, StyleKeys.PADDING_RIGHT_VALUE, layout.toDevicePixels(value.value));
1106
+ break;
1107
+ case 'px':
1108
+ setInt32(this.style_view, StyleKeys.PADDING_RIGHT_TYPE, 0);
1109
+ setFloat32(this.style_view, StyleKeys.PADDING_RIGHT_VALUE, value.value);
1110
+ break;
1111
+ case '%':
1112
+ setInt32(this.style_view, StyleKeys.PADDING_RIGHT_TYPE, 1);
1113
+ setFloat32(this.style_view, StyleKeys.PADDING_RIGHT_VALUE, value.value);
1114
+ break;
1115
+ }
1116
+ break;
1117
+ }
1118
+ this.setOrAppendState(StateKeys.PADDING);
1119
+ }
1120
+ get paddingTop() {
1121
+ const type = getInt32(this.style_view, StyleKeys.PADDING_TOP_TYPE);
1122
+ const value = getFloat32(this.style_view, StyleKeys.PADDING_TOP_VALUE);
1123
+ return parseLengthPercentage(type, value);
1124
+ }
1125
+ set paddingTop(value) {
1126
+ switch (typeof value) {
1127
+ case 'number':
1128
+ setInt32(this.style_view, StyleKeys.PADDING_TOP_TYPE, 0);
1129
+ setFloat32(this.style_view, StyleKeys.PADDING_TOP_VALUE, layout.toDevicePixels(value));
1130
+ break;
1131
+ case 'object':
1132
+ switch (value.unit) {
1133
+ case 'dip':
1134
+ setInt32(this.style_view, StyleKeys.PADDING_TOP_TYPE, 0);
1135
+ setFloat32(this.style_view, StyleKeys.PADDING_TOP_VALUE, layout.toDevicePixels(value.value));
1136
+ break;
1137
+ case 'px':
1138
+ setInt32(this.style_view, StyleKeys.PADDING_TOP_TYPE, 0);
1139
+ setFloat32(this.style_view, StyleKeys.PADDING_TOP_VALUE, value.value);
1140
+ break;
1141
+ case '%':
1142
+ setInt32(this.style_view, StyleKeys.PADDING_TOP_TYPE, 1);
1143
+ setFloat32(this.style_view, StyleKeys.PADDING_TOP_VALUE, value.value);
1144
+ break;
1145
+ }
1146
+ break;
1147
+ }
1148
+ this.setOrAppendState(StateKeys.PADDING);
1149
+ }
1150
+ get paddingBottom() {
1151
+ const type = getInt32(this.style_view, StyleKeys.PADDING_BOTTOM_TYPE);
1152
+ const value = getFloat32(this.style_view, StyleKeys.PADDING_BOTTOM_VALUE);
1153
+ return parseLengthPercentage(type, value);
1154
+ }
1155
+ set paddingBottom(value) {
1156
+ switch (typeof value) {
1157
+ case 'number':
1158
+ setInt32(this.style_view, StyleKeys.PADDING_BOTTOM_TYPE, 0);
1159
+ setFloat32(this.style_view, StyleKeys.PADDING_BOTTOM_VALUE, layout.toDevicePixels(value));
1160
+ break;
1161
+ case 'object':
1162
+ switch (value.unit) {
1163
+ case 'dip':
1164
+ setInt32(this.style_view, StyleKeys.PADDING_BOTTOM_TYPE, 0);
1165
+ setFloat32(this.style_view, StyleKeys.PADDING_BOTTOM_VALUE, layout.toDevicePixels(value.value));
1166
+ break;
1167
+ case 'px':
1168
+ setInt32(this.style_view, StyleKeys.PADDING_BOTTOM_TYPE, 0);
1169
+ setFloat32(this.style_view, StyleKeys.PADDING_BOTTOM_VALUE, value.value);
1170
+ break;
1171
+ case '%':
1172
+ setInt32(this.style_view, StyleKeys.PADDING_BOTTOM_TYPE, 1);
1173
+ setFloat32(this.style_view, StyleKeys.PADDING_BOTTOM_VALUE, value.value);
1174
+ break;
1175
+ }
1176
+ break;
1177
+ }
1178
+ this.setOrAppendState(StateKeys.PADDING);
1179
+ }
1180
+ get gap() {
1181
+ return `${this.rowGap} ${this.columnGap}`;
1182
+ }
1183
+ get rowGap() {
1184
+ const type = getInt32(this.style_view, StyleKeys.GAP_ROW_TYPE);
1185
+ const value = getFloat32(this.style_view, StyleKeys.GAP_ROW_VALUE);
1186
+ return parseLengthPercentage(type, value);
1187
+ }
1188
+ set rowGap(value) {
1189
+ switch (typeof value) {
1190
+ case 'number':
1191
+ setInt32(this.style_view, StyleKeys.GAP_ROW_TYPE, 0);
1192
+ setFloat32(this.style_view, StyleKeys.GAP_ROW_VALUE, layout.toDevicePixels(value));
1193
+ break;
1194
+ case 'object':
1195
+ switch (value.unit) {
1196
+ case 'dip':
1197
+ setInt32(this.style_view, StyleKeys.GAP_ROW_TYPE, 0);
1198
+ setFloat32(this.style_view, StyleKeys.GAP_ROW_VALUE, layout.toDevicePixels(value.value));
1199
+ break;
1200
+ case 'px':
1201
+ setInt32(this.style_view, StyleKeys.GAP_ROW_TYPE, 0);
1202
+ setFloat32(this.style_view, StyleKeys.GAP_ROW_VALUE, value.value);
1203
+ break;
1204
+ case '%':
1205
+ setInt32(this.style_view, StyleKeys.GAP_ROW_TYPE, 1);
1206
+ setFloat32(this.style_view, StyleKeys.GAP_ROW_VALUE, value.value);
1207
+ break;
1208
+ }
1209
+ break;
1210
+ }
1211
+ this.setOrAppendState(StateKeys.GAP);
1212
+ }
1213
+ get columnGap() {
1214
+ const type = getInt32(this.style_view, StyleKeys.GAP_COLUMN_TYPE);
1215
+ const value = getFloat32(this.style_view, StyleKeys.GAP_COLUMN_VALUE);
1216
+ return parseLengthPercentage(type, value);
1217
+ }
1218
+ set columnGap(value) {
1219
+ switch (typeof value) {
1220
+ case 'number':
1221
+ setInt32(this.style_view, StyleKeys.GAP_COLUMN_TYPE, 0);
1222
+ setFloat32(this.style_view, StyleKeys.GAP_COLUMN_VALUE, layout.toDevicePixels(value));
1223
+ break;
1224
+ case 'object':
1225
+ switch (value.unit) {
1226
+ case 'dip':
1227
+ setInt32(this.style_view, StyleKeys.GAP_COLUMN_TYPE, 0);
1228
+ setFloat32(this.style_view, StyleKeys.GAP_COLUMN_VALUE, layout.toDevicePixels(value.value));
1229
+ break;
1230
+ case 'px':
1231
+ setInt32(this.style_view, StyleKeys.GAP_COLUMN_TYPE, 0);
1232
+ setFloat32(this.style_view, StyleKeys.GAP_COLUMN_VALUE, value.value);
1233
+ break;
1234
+ case '%':
1235
+ setInt32(this.style_view, StyleKeys.GAP_COLUMN_TYPE, 1);
1236
+ setFloat32(this.style_view, StyleKeys.GAP_COLUMN_VALUE, value.value);
1237
+ break;
1238
+ }
1239
+ break;
1240
+ }
1241
+ this.setOrAppendState(StateKeys.GAP);
1242
+ }
1243
+ get aspectRatio() {
1244
+ return getFloat32(this.style_view, StyleKeys.ASPECT_RATIO);
1245
+ }
1246
+ set aspectRatio(value) {
1247
+ setFloat32(this.style_view, StyleKeys.ASPECT_RATIO, value);
1248
+ this.setOrAppendState(StateKeys.ASPECT_RATIO);
1249
+ }
1250
+ get flexBasis() {
1251
+ const type = getInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE);
1252
+ const value = getFloat32(this.style_view, StyleKeys.FLEX_BASIS_VALUE);
1253
+ return parseLengthPercentageAuto(type, value);
1254
+ }
1255
+ set flexBasis(value) {
1256
+ switch (typeof value) {
1257
+ case 'string':
1258
+ setInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE, 0);
1259
+ break;
1260
+ case 'number':
1261
+ setInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE, 1);
1262
+ setFloat32(this.style_view, StyleKeys.FLEX_BASIS_VALUE, layout.toDevicePixels(value));
1263
+ break;
1264
+ case 'object':
1265
+ switch (value.unit) {
1266
+ case 'dip':
1267
+ setInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE, 1);
1268
+ setFloat32(this.style_view, StyleKeys.FLEX_BASIS_VALUE, layout.toDevicePixels(value.value));
1269
+ break;
1270
+ case 'px':
1271
+ setInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE, 1);
1272
+ setFloat32(this.style_view, StyleKeys.FLEX_BASIS_VALUE, value.value);
1273
+ break;
1274
+ case '%':
1275
+ setInt32(this.style_view, StyleKeys.FLEX_BASIS_TYPE, 2);
1276
+ setFloat32(this.style_view, StyleKeys.FLEX_BASIS_VALUE, value.value);
1277
+ break;
1278
+ }
1279
+ break;
1280
+ }
1281
+ this.setOrAppendState(StateKeys.FLEX_BASIS);
1282
+ }
1283
+ get alignItems() {
1284
+ switch (getInt32(this.style_view, StyleKeys.ALIGN_ITEMS)) {
1285
+ case -1 /* AlignItems.Normal */:
1286
+ return 'normal';
1287
+ case 0 /* AlignItems.Start */:
1288
+ return 'start';
1289
+ case 1 /* AlignItems.End */:
1290
+ return 'end';
1291
+ case 5 /* AlignItems.FlexStart */:
1292
+ return 'flex-start';
1293
+ case 6 /* AlignItems.FlexEnd */:
1294
+ return 'flex-end';
1295
+ case 2 /* AlignItems.Center */:
1296
+ return 'center';
1297
+ case 3 /* AlignItems.Baseline */:
1298
+ return 'baseline';
1299
+ case 4 /* AlignItems.Stretch */:
1300
+ return 'stretch';
1301
+ }
1302
+ }
1303
+ set alignItems(value) {
1304
+ switch (value) {
1305
+ case 'normal':
1306
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, -1 /* AlignItems.Normal */);
1307
+ break;
1308
+ case 'start':
1309
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 0 /* AlignItems.Start */);
1310
+ break;
1311
+ case 'end':
1312
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 1 /* AlignItems.End */);
1313
+ break;
1314
+ case 'flex-start':
1315
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 5 /* AlignItems.FlexStart */);
1316
+ break;
1317
+ case 'flex-end':
1318
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 6 /* AlignItems.FlexEnd */);
1319
+ break;
1320
+ case 'center':
1321
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 2 /* AlignItems.Center */);
1322
+ break;
1323
+ case 'baseline':
1324
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 3 /* AlignItems.Baseline */);
1325
+ break;
1326
+ case 'stretch':
1327
+ setInt32(this.style_view, StyleKeys.ALIGN_ITEMS, 4 /* AlignItems.Stretch */);
1328
+ break;
1329
+ }
1330
+ this.setOrAppendState(StateKeys.ALIGN_ITEMS);
1331
+ }
1332
+ get alignSelf() {
1333
+ switch (getInt32(this.style_view, StyleKeys.ALIGN_SELF)) {
1334
+ case -1 /* AlignSelf.Normal */:
1335
+ return 'normal';
1336
+ case 0 /* AlignSelf.Start */:
1337
+ return 'start';
1338
+ case 1 /* AlignSelf.End */:
1339
+ return 'end';
1340
+ case 2 /* AlignSelf.Center */:
1341
+ return 'center';
1342
+ case 3 /* AlignSelf.Baseline */:
1343
+ return 'baseline';
1344
+ case 4 /* AlignSelf.Stretch */:
1345
+ return 'stretch';
1346
+ case 5 /* AlignSelf.FlexStart */:
1347
+ return 'flex-start';
1348
+ case 6 /* AlignSelf.FlexEnd */:
1349
+ return 'flex-end';
1350
+ }
1351
+ }
1352
+ set alignSelf(value) {
1353
+ let align = -2;
1354
+ switch (value) {
1355
+ case 'normal':
1356
+ align = -1 /* AlignSelf.Normal */;
1357
+ break;
1358
+ case 'start':
1359
+ align = 0 /* AlignSelf.Start */;
1360
+ break;
1361
+ case 'end':
1362
+ align = 1 /* AlignSelf.End */;
1363
+ break;
1364
+ case 'center':
1365
+ align = 2 /* AlignSelf.Center */;
1366
+ break;
1367
+ case 'baseline':
1368
+ align = 3 /* AlignSelf.Baseline */;
1369
+ break;
1370
+ case 'stretch':
1371
+ align = 4 /* AlignSelf.Stretch */;
1372
+ break;
1373
+ case 'flex-start':
1374
+ align = 5 /* AlignSelf.FlexStart */;
1375
+ break;
1376
+ case 'flex-end':
1377
+ align = 6 /* AlignSelf.FlexEnd */;
1378
+ break;
1379
+ }
1380
+ if (align === -2) {
1381
+ setInt32(this.style_view, StyleKeys.ALIGN_SELF, align);
1382
+ this.setOrAppendState(StateKeys.ALIGN_SELF);
1383
+ }
1384
+ }
1385
+ get alignContent() {
1386
+ switch (getInt32(this.style_view, StyleKeys.ALIGN_CONTENT)) {
1387
+ case -1 /* AlignContent.Normal */:
1388
+ return 'normal';
1389
+ case 5 /* AlignContent.SpaceAround */:
1390
+ return 'space-around';
1391
+ case 4 /* AlignContent.SpaceBetween */:
1392
+ return 'space-between';
1393
+ case 6 /* AlignContent.SpaceEvenly */:
1394
+ return 'space-evenly';
1395
+ case 2 /* AlignContent.Center */:
1396
+ return 'center';
1397
+ case 1 /* AlignContent.End */:
1398
+ return 'end';
1399
+ case 0 /* AlignContent.Start */:
1400
+ return 'start';
1401
+ case 3 /* AlignContent.Stretch */:
1402
+ return 'stretch';
1403
+ }
1404
+ }
1405
+ set alignContent(value) {
1406
+ switch (value) {
1407
+ case 'normal':
1408
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, -1 /* AlignContent.Normal */);
1409
+ break;
1410
+ case 'space-around':
1411
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 5 /* AlignContent.SpaceAround */);
1412
+ break;
1413
+ case 'space-between':
1414
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 4 /* AlignContent.SpaceBetween */);
1415
+ break;
1416
+ case 'space-evenly':
1417
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 6 /* AlignContent.SpaceEvenly */);
1418
+ break;
1419
+ case 'center':
1420
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 2 /* AlignContent.Center */);
1421
+ break;
1422
+ case 'end':
1423
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 1 /* AlignContent.End */);
1424
+ break;
1425
+ case 'start':
1426
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 0 /* AlignContent.Start */);
1427
+ break;
1428
+ case 'stretch':
1429
+ setInt32(this.style_view, StyleKeys.ALIGN_CONTENT, 3 /* AlignContent.Stretch */);
1430
+ break;
1431
+ }
1432
+ this.setOrAppendState(StateKeys.ALIGN_CONTENT);
1433
+ }
1434
+ get justifyContent() {
1435
+ switch (getInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT)) {
1436
+ case -1 /* JustifyContent.Normal */:
1437
+ return 'normal';
1438
+ case 0 /* JustifyContent.Start */:
1439
+ return 'start';
1440
+ case 1 /* JustifyContent.End */:
1441
+ return 'end';
1442
+ case 2 /* JustifyContent.Center */:
1443
+ return 'center';
1444
+ case 3 /* JustifyContent.Stretch */:
1445
+ return 'stretch';
1446
+ case 4 /* JustifyContent.SpaceBetween */:
1447
+ return 'space-between';
1448
+ case 5 /* JustifyContent.SpaceAround */:
1449
+ return 'space-around';
1450
+ case 6 /* JustifyContent.SpaceEvenly */:
1451
+ return 'space-evenly';
1452
+ case 7 /* JustifyContent.FlexStart */:
1453
+ return 'flex-start';
1454
+ case 8 /* JustifyContent.FlexEnd */:
1455
+ return 'flex-end';
1456
+ }
1457
+ }
1458
+ set justifyContent(value) {
1459
+ switch (value) {
1460
+ case 'normal':
1461
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, -1 /* JustifyContent.Normal */);
1462
+ break;
1463
+ case 'space-around':
1464
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 5 /* JustifyContent.SpaceAround */);
1465
+ break;
1466
+ case 'space-between':
1467
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 4 /* JustifyContent.SpaceBetween */);
1468
+ break;
1469
+ case 'space-evenly':
1470
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 6 /* JustifyContent.SpaceEvenly */);
1471
+ break;
1472
+ case 'center':
1473
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 2 /* JustifyContent.Center */);
1474
+ break;
1475
+ case 'end':
1476
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 1 /* JustifyContent.End */);
1477
+ break;
1478
+ case 'start':
1479
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 0 /* JustifyContent.Start */);
1480
+ break;
1481
+ case 'stretch':
1482
+ setInt32(this.style_view, StyleKeys.JUSTIFY_CONTENT, 3 /* JustifyContent.Stretch */);
1483
+ break;
1484
+ }
1485
+ this.setOrAppendState(StateKeys.JUSTIFY_CONTENT);
1486
+ }
1487
+ get gridAutoFlow() {
1488
+ switch (getInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW)) {
1489
+ case 0:
1490
+ return 'row';
1491
+ case 1:
1492
+ return 'column';
1493
+ case 2:
1494
+ return 'row dense';
1495
+ case 3:
1496
+ return 'column dense';
1497
+ }
1498
+ }
1499
+ set gridAutoFlow(value) {
1500
+ switch (value) {
1501
+ case 'row':
1502
+ setInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW, 0);
1503
+ break;
1504
+ case 'column':
1505
+ setInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW, 1);
1506
+ break;
1507
+ case 'row dense':
1508
+ setInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW, 2);
1509
+ break;
1510
+ case 'column dense':
1511
+ setInt32(this.style_view, StyleKeys.GRID_AUTO_FLOW, 3);
1512
+ break;
1513
+ }
1514
+ }
1515
+ get overflow() {
1516
+ const x = this.overflowX;
1517
+ const y = this.overflowY;
1518
+ if (x === y) {
1519
+ return x;
1520
+ }
1521
+ return `${x} ${y}`;
1522
+ }
1523
+ set overflow(value) {
1524
+ switch (value) {
1525
+ case 'visible':
1526
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 0);
1527
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 0);
1528
+ break;
1529
+ case 'hidden':
1530
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 1);
1531
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 1);
1532
+ break;
1533
+ case 'scroll':
1534
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 2);
1535
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 2);
1536
+ break;
1537
+ default:
1538
+ {
1539
+ const values = value.split(' ');
1540
+ switch (values[0]) {
1541
+ case 'visible':
1542
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 0);
1543
+ break;
1544
+ case 'hidden':
1545
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 1);
1546
+ break;
1547
+ case 'scroll':
1548
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 2);
1549
+ break;
1550
+ }
1551
+ switch (values[1]) {
1552
+ case 'visible':
1553
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 0);
1554
+ break;
1555
+ case 'hidden':
1556
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 1);
1557
+ break;
1558
+ case 'scroll':
1559
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 2);
1560
+ break;
1561
+ }
1562
+ }
1563
+ break;
1564
+ }
1565
+ }
1566
+ get overflowX() {
1567
+ switch (getInt32(this.style_view, StyleKeys.OVERFLOW_X)) {
1568
+ case 0:
1569
+ return 'visible';
1570
+ case 1:
1571
+ return 'hidden';
1572
+ case 2:
1573
+ return 'scroll';
1574
+ }
1575
+ }
1576
+ set overflowX(value) {
1577
+ switch (value) {
1578
+ case 'visible':
1579
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 0);
1580
+ break;
1581
+ case 'hidden':
1582
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 1);
1583
+ break;
1584
+ case 'scroll':
1585
+ setInt32(this.style_view, StyleKeys.OVERFLOW_X, 2);
1586
+ break;
1587
+ }
1588
+ }
1589
+ get overflowY() {
1590
+ switch (getInt32(this.style_view, StyleKeys.OVERFLOW_Y)) {
1591
+ case 0:
1592
+ return 'visible';
1593
+ case 1:
1594
+ return 'hidden';
1595
+ case 2:
1596
+ return 'scroll';
1597
+ }
1598
+ }
1599
+ set overflowY(value) {
1600
+ switch (value) {
1601
+ case 'visible':
1602
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 0);
1603
+ break;
1604
+ case 'hidden':
1605
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 1);
1606
+ break;
1607
+ case 'scroll':
1608
+ setInt32(this.style_view, StyleKeys.OVERFLOW_Y, 2);
1609
+ break;
1610
+ }
1611
+ }
1612
+ get flexGrow() {
1613
+ return getFloat32(this.style_view, StyleKeys.FLEX_GROW);
1614
+ }
1615
+ set flexGrow(value) {
1616
+ setFloat32(this.style_view, StyleKeys.FLEX_GROW, value);
1617
+ }
1618
+ get flexShrink() {
1619
+ return getFloat32(this.style_view, StyleKeys.FLEX_SHRINK);
1620
+ }
1621
+ set flexShrink(value) {
1622
+ setFloat32(this.style_view, StyleKeys.FLEX_SHRINK, value);
1623
+ }
1624
+ get scrollBarWidth() {
1625
+ return getFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH);
1626
+ }
1627
+ set scrollBarWidth(value) {
1628
+ if (typeof value === 'number') {
1629
+ setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, value);
1630
+ }
1631
+ else if (typeof value === 'object') {
1632
+ switch (value.unit) {
1633
+ case 'dip':
1634
+ setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, layout.toDevicePixels(value.value));
1635
+ break;
1636
+ case 'px':
1637
+ setFloat32(this.style_view, StyleKeys.SCROLLBAR_WIDTH, value.value);
1638
+ break;
1639
+ }
1640
+ }
1641
+ }
1642
+ toJSON() {
1643
+ return {
1644
+ display: this.display,
1645
+ position: this.position,
1646
+ flexDirection: this.flexDirection,
1647
+ flexWrap: this.flexWrap,
1648
+ justifyContent: this.justifyContent,
1649
+ alignItems: this.alignItems,
1650
+ alignContent: this.alignContent,
1651
+ alignSelf: this.alignSelf,
1652
+ flexGrow: this.flexGrow,
1653
+ minWidth: this.minWidth,
1654
+ minHeight: this.minHeight,
1655
+ maxWidth: this.maxWidth,
1656
+ maxHeight: this.maxHeight,
1657
+ width: this.width,
1658
+ height: this.height,
1659
+ inset: {
1660
+ left: this.left,
1661
+ right: this.right,
1662
+ top: this.top,
1663
+ bottom: this.bottom,
1664
+ },
1665
+ margin: {
1666
+ left: this.marginLeft,
1667
+ right: this.marginRight,
1668
+ top: this.marginTop,
1669
+ bottom: this.marginBottom,
1670
+ },
1671
+ padding: {
1672
+ left: this.paddingLeft,
1673
+ right: this.paddingRight,
1674
+ top: this.paddingTop,
1675
+ bottom: this.paddingBottom,
1676
+ },
1677
+ gap: this.gap,
1678
+ gridAutoFlow: this.gridAutoFlow,
1679
+ gridAutoColumns: this.gridAutoColumns,
1680
+ gridAutoRows: this.gridAutoRows,
1681
+ gridColumn: this.gridColumn,
1682
+ gridRow: this.gridRow,
1683
+ };
1684
+ }
1685
+ }
1686
+ //# sourceMappingURL=style.js.map