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

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 (345) hide show
  1. package/common.d.ts +7 -9
  2. package/common.js +277 -552
  3. package/common.js.map +1 -1
  4. package/helpers.d.ts +32 -10
  5. package/helpers.js +772 -286
  6. package/helpers.js.map +1 -1
  7. package/index.android.d.ts +6 -2
  8. package/index.android.js +21 -3
  9. package/index.android.js.map +1 -1
  10. package/index.d.ts +64 -7
  11. package/index.ios.d.ts +9 -6
  12. package/index.ios.js +39 -25
  13. package/index.ios.js.map +1 -1
  14. package/package.json +1 -1
  15. package/platforms/android/include.gradle +18 -1
  16. package/platforms/android/masonkit-release.aar +0 -0
  17. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
  18. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
  19. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  20. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  21. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  22. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +7002 -1194
  23. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
  24. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
  26. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  27. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
  28. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
  29. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  30. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  32. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +7002 -1194
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
  35. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +7002 -1194
  38. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  43. package/platforms/ios/build.xcconfig +1 -2
  44. package/platforms/ios/src/MasonV8Module.h +583 -0
  45. package/platforms/ios/src/MasonV8Module.mm +1005 -0
  46. package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
  47. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  48. package/platforms/ios/src/module.modulemap +2 -2
  49. package/platforms/new_native_src/cpp/Caches.cpp +36 -0
  50. package/platforms/new_native_src/cpp/Caches.h +42 -0
  51. package/platforms/new_native_src/cpp/Common.h +34 -0
  52. package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
  53. package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
  54. package/platforms/new_native_src/cpp/Helpers.h +364 -0
  55. package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
  56. package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
  57. package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
  58. package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
  59. package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
  60. package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
  61. package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
  62. package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
  63. package/pods/Headers/include/APIDesign.md +72 -0
  64. package/pods/Headers/include/DEPS +10 -0
  65. package/pods/Headers/include/DIR_METADATA +11 -0
  66. package/pods/Headers/include/OWNERS +23 -0
  67. package/pods/Headers/include/cppgc/DEPS +8 -0
  68. package/pods/Headers/include/cppgc/OWNERS +2 -0
  69. package/pods/Headers/include/cppgc/README.md +133 -0
  70. package/pods/Headers/include/cppgc/allocation.h +310 -0
  71. package/pods/Headers/include/cppgc/common.h +29 -0
  72. package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
  73. package/pods/Headers/include/cppgc/custom-space.h +97 -0
  74. package/pods/Headers/include/cppgc/default-platform.h +67 -0
  75. package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
  76. package/pods/Headers/include/cppgc/explicit-management.h +100 -0
  77. package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
  78. package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
  79. package/pods/Headers/include/cppgc/heap-state.h +82 -0
  80. package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
  81. package/pods/Headers/include/cppgc/heap.h +206 -0
  82. package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
  83. package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
  84. package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
  85. package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
  86. package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
  87. package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
  88. package/pods/Headers/include/cppgc/internal/logging.h +50 -0
  89. package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
  90. package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
  91. package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
  92. package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
  93. package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
  94. package/pods/Headers/include/cppgc/macros.h +26 -0
  95. package/pods/Headers/include/cppgc/member.h +291 -0
  96. package/pods/Headers/include/cppgc/name-provider.h +65 -0
  97. package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
  98. package/pods/Headers/include/cppgc/persistent.h +370 -0
  99. package/pods/Headers/include/cppgc/platform.h +156 -0
  100. package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
  101. package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
  102. package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
  103. package/pods/Headers/include/cppgc/source-location.h +92 -0
  104. package/pods/Headers/include/cppgc/testing.h +106 -0
  105. package/pods/Headers/include/cppgc/trace-trait.h +116 -0
  106. package/pods/Headers/include/cppgc/type-traits.h +240 -0
  107. package/pods/Headers/include/cppgc/visitor.h +379 -0
  108. package/pods/Headers/include/js_protocol-1.2.json +936 -0
  109. package/pods/Headers/include/js_protocol-1.3.json +1112 -0
  110. package/pods/Headers/include/js_protocol.pdl +1709 -0
  111. package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
  112. package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
  113. package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
  114. package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
  115. package/pods/Headers/include/libffi.h +12 -0
  116. package/pods/Headers/include/libplatform/DEPS +9 -0
  117. package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
  118. package/pods/Headers/include/libplatform/libplatform.h +106 -0
  119. package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
  120. package/pods/Headers/include/v8-array-buffer.h +433 -0
  121. package/pods/Headers/include/v8-callbacks.h +397 -0
  122. package/pods/Headers/include/v8-container.h +129 -0
  123. package/pods/Headers/include/v8-context.h +407 -0
  124. package/pods/Headers/include/v8-cppgc.h +215 -0
  125. package/pods/Headers/include/v8-data.h +80 -0
  126. package/pods/Headers/include/v8-date.h +43 -0
  127. package/pods/Headers/include/v8-debug.h +168 -0
  128. package/pods/Headers/include/v8-embedder-heap.h +218 -0
  129. package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
  130. package/pods/Headers/include/v8-exception.h +217 -0
  131. package/pods/Headers/include/v8-extension.h +62 -0
  132. package/pods/Headers/include/v8-external.h +37 -0
  133. package/pods/Headers/include/v8-fast-api-calls.h +939 -0
  134. package/pods/Headers/include/v8-forward.h +81 -0
  135. package/pods/Headers/include/v8-function-callback.h +475 -0
  136. package/pods/Headers/include/v8-function.h +125 -0
  137. package/pods/Headers/include/v8-initialization.h +315 -0
  138. package/pods/Headers/include/v8-inspector-protocol.h +13 -0
  139. package/pods/Headers/include/v8-inspector.h +376 -0
  140. package/pods/Headers/include/v8-internal.h +661 -0
  141. package/pods/Headers/include/v8-isolate.h +1709 -0
  142. package/pods/Headers/include/v8-json.h +47 -0
  143. package/pods/Headers/include/v8-local-handle.h +455 -0
  144. package/pods/Headers/include/v8-locker.h +149 -0
  145. package/pods/Headers/include/v8-maybe.h +137 -0
  146. package/pods/Headers/include/v8-memory-span.h +43 -0
  147. package/pods/Headers/include/v8-message.h +216 -0
  148. package/pods/Headers/include/v8-metrics.h +255 -0
  149. package/pods/Headers/include/v8-microtask-queue.h +152 -0
  150. package/pods/Headers/include/v8-microtask.h +28 -0
  151. package/pods/Headers/include/v8-object.h +775 -0
  152. package/pods/Headers/include/v8-persistent-handle.h +590 -0
  153. package/pods/Headers/include/v8-platform.h +1092 -0
  154. package/pods/Headers/include/v8-primitive-object.h +118 -0
  155. package/pods/Headers/include/v8-primitive.h +866 -0
  156. package/pods/Headers/include/v8-profiler.h +1198 -0
  157. package/pods/Headers/include/v8-promise.h +174 -0
  158. package/pods/Headers/include/v8-proxy.h +50 -0
  159. package/pods/Headers/include/v8-regexp.h +105 -0
  160. package/pods/Headers/include/v8-script.h +748 -0
  161. package/pods/Headers/include/v8-snapshot.h +196 -0
  162. package/pods/Headers/include/v8-statistics.h +217 -0
  163. package/pods/Headers/include/v8-template.h +1079 -0
  164. package/pods/Headers/include/v8-traced-handle.h +420 -0
  165. package/pods/Headers/include/v8-typed-array.h +282 -0
  166. package/pods/Headers/include/v8-unwinder-state.h +31 -0
  167. package/pods/Headers/include/v8-unwinder.h +132 -0
  168. package/pods/Headers/include/v8-util.h +658 -0
  169. package/pods/Headers/include/v8-value-serializer-version.h +24 -0
  170. package/pods/Headers/include/v8-value-serializer.h +279 -0
  171. package/pods/Headers/include/v8-value.h +526 -0
  172. package/pods/Headers/include/v8-version-string.h +38 -0
  173. package/pods/Headers/include/v8-version.h +20 -0
  174. package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
  175. package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
  176. package/pods/Headers/include/v8-wasm.h +257 -0
  177. package/pods/Headers/include/v8-weak-callback-info.h +86 -0
  178. package/pods/Headers/include/v8.h +88 -0
  179. package/pods/Headers/include/v8config.h +605 -0
  180. package/pods/Headers/inspector/InspectorServer.h +20 -0
  181. package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
  182. package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
  183. package/pods/Headers/inspector/base64.h +9 -0
  184. package/pods/Headers/inspector/src/base/address-region.h +95 -0
  185. package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
  186. package/pods/Headers/inspector/src/base/atomicops.h +332 -0
  187. package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
  188. package/pods/Headers/inspector/src/base/base-export.h +31 -0
  189. package/pods/Headers/inspector/src/base/bits.h +343 -0
  190. package/pods/Headers/inspector/src/base/build_config.h +234 -0
  191. package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
  192. package/pods/Headers/inspector/src/base/export-template.h +163 -0
  193. package/pods/Headers/inspector/src/base/flags.h +130 -0
  194. package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
  195. package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
  196. package/pods/Headers/inspector/src/base/logging.h +417 -0
  197. package/pods/Headers/inspector/src/base/macros.h +423 -0
  198. package/pods/Headers/inspector/src/base/memory.h +89 -0
  199. package/pods/Headers/inspector/src/base/once.h +108 -0
  200. package/pods/Headers/inspector/src/base/optional.h +882 -0
  201. package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
  202. package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
  203. package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
  204. package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
  205. package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
  206. package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
  207. package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
  208. package/pods/Headers/inspector/src/base/template-utils.h +113 -0
  209. package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
  210. package/pods/Headers/inspector/src/common/checks.h +38 -0
  211. package/pods/Headers/inspector/src/common/globals.h +1842 -0
  212. package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
  213. package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
  214. package/pods/Headers/inspector/src/init/v8.h +52 -0
  215. package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
  216. package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
  217. package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
  218. package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
  219. package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
  220. package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
  221. package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
  222. package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
  223. package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
  224. package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
  225. package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
  226. package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
  227. package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
  228. package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
  229. package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
  230. package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
  231. package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
  232. package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
  233. package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
  234. package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
  235. package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
  236. package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
  237. package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
  238. package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
  239. package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
  240. package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
  241. package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
  242. package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
  243. package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
  244. package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
  245. package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
  246. package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
  247. package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
  248. package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
  249. package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
  250. package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
  251. package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
  252. package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
  253. package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
  254. package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
  255. package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
  256. package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
  257. package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
  258. package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
  259. package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
  260. package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
  261. package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
  262. package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
  263. package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
  264. package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
  265. package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
  266. package/pods/Headers/inspector/src/utils/allocation.h +367 -0
  267. package/pods/Headers/inspector/src/utils/vector.h +324 -0
  268. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
  269. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
  270. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
  271. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
  272. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
  273. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
  274. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
  275. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
  276. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
  277. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
  278. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
  279. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
  280. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
  281. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
  282. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
  283. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
  284. package/pods/Headers/inspector/utils.h +32 -0
  285. package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
  286. package/pods/Headers/jsi/decorator.h +762 -0
  287. package/pods/Headers/jsi/instrumentation.h +117 -0
  288. package/pods/Headers/jsi/jsi-inl.h +322 -0
  289. package/pods/Headers/jsi/jsi.h +1387 -0
  290. package/pods/Headers/jsi/jsilib.h +59 -0
  291. package/pods/Headers/jsi/threadsafe.h +79 -0
  292. package/pods/Headers/runtime/ArgConverter.h +61 -0
  293. package/pods/Headers/runtime/ArrayAdapter.h +13 -0
  294. package/pods/Headers/runtime/Caches.h +98 -0
  295. package/pods/Headers/runtime/ClassBuilder.h +61 -0
  296. package/pods/Headers/runtime/Common.h +9 -0
  297. package/pods/Headers/runtime/ConcurrentMap.h +55 -0
  298. package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
  299. package/pods/Headers/runtime/Console.h +27 -0
  300. package/pods/Headers/runtime/Constants.h +15 -0
  301. package/pods/Headers/runtime/DataWrapper.h +671 -0
  302. package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
  303. package/pods/Headers/runtime/ExtVector.h +21 -0
  304. package/pods/Headers/runtime/FFICall.h +105 -0
  305. package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
  306. package/pods/Headers/runtime/FunctionReference.h +18 -0
  307. package/pods/Headers/runtime/Helpers.h +84 -0
  308. package/pods/Headers/runtime/InlineFunctions.h +16 -0
  309. package/pods/Headers/runtime/Interop.h +202 -0
  310. package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
  311. package/pods/Headers/runtime/Metadata.h +981 -0
  312. package/pods/Headers/runtime/MetadataBuilder.h +72 -0
  313. package/pods/Headers/runtime/MetadataInlines.h +157 -0
  314. package/pods/Headers/runtime/ModuleInternal.h +59 -0
  315. package/pods/Headers/runtime/NSDataAdapter.h +13 -0
  316. package/pods/Headers/runtime/NativeScriptException.h +27 -0
  317. package/pods/Headers/runtime/ObjectManager.h +31 -0
  318. package/pods/Headers/runtime/OneByteStringResource.h +21 -0
  319. package/pods/Headers/runtime/Pointer.h +26 -0
  320. package/pods/Headers/runtime/PromiseProxy.h +15 -0
  321. package/pods/Headers/runtime/Reference.h +38 -0
  322. package/pods/Headers/runtime/Runtime.h +67 -0
  323. package/pods/Headers/runtime/RuntimeConfig.h +17 -0
  324. package/pods/Headers/runtime/SetTimeout.h +34 -0
  325. package/pods/Headers/runtime/SimpleAllocator.h +23 -0
  326. package/pods/Headers/runtime/StringHasher.h +315 -0
  327. package/pods/Headers/runtime/SymbolIterator.h +18 -0
  328. package/pods/Headers/runtime/SymbolLoader.h +27 -0
  329. package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
  330. package/pods/Headers/runtime/TSHelpers.h +15 -0
  331. package/pods/Headers/runtime/Tasks.h +19 -0
  332. package/pods/Headers/runtime/UnmanagedType.h +21 -0
  333. package/pods/Headers/runtime/WeakRef.h +15 -0
  334. package/pods/Headers/runtime/Worker.h +26 -0
  335. package/pods/Headers/runtime/robin_hood.h +2184 -0
  336. package/pods/Headers/v8runtime/HostProxy.h +71 -0
  337. package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
  338. package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
  339. package/pods/Headers/v8runtime/V8Runtime.h +215 -0
  340. package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
  341. package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
  342. package/pods/NativeScript.podspec +68 -0
  343. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
  344. package/platforms/ios/src/JSIModule.h +0 -217
  345. package/platforms/ios/src/JSIModule.mm +0 -2788
@@ -0,0 +1,1005 @@
1
+ #import "MasonV8Module.h"
2
+ #import "Mason/Mason-Swift.h"
3
+
4
+ using namespace std;
5
+
6
+ void destroy_c_mason_track_sizing_function(CMasonTrackSizingFunction tracking){
7
+ switch (tracking.tag) {
8
+ case Repeat:
9
+ {
10
+ auto array = tracking.repeat._2;
11
+ if(array != nullptr){
12
+ free(array->array);
13
+ free(array);
14
+ };
15
+ }
16
+ break;
17
+ default:
18
+ break;
19
+ }
20
+ }
21
+
22
+ std::vector<CMasonMinMax>
23
+ toNonRepeatedTrackSizingFunction(v8::Isolate *isolate, v8::Local<v8::Array> &array) {
24
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
25
+ auto len = array->Length();
26
+
27
+ std::vector<CMasonMinMax> buffer;
28
+
29
+ if (len == 0) {
30
+ return buffer;
31
+ }
32
+
33
+ buffer.reserve(len);
34
+
35
+
36
+ for (int i = 0; i < len; i++) {
37
+ auto value = array->Get(context, i).ToLocalChecked().As<v8::Object>();
38
+
39
+ // object {type: number, min_type: number, min_value: number, max_type: number, max_value: number};
40
+ auto min_type = value->Get(context,
41
+ STRING_TO_V8_VALUE("min_type")).ToLocalChecked()->Int32Value(
42
+ context).FromJust();
43
+ auto min_value = (float) value->Get(context, STRING_TO_V8_VALUE(
44
+ "min_value")).ToLocalChecked()->NumberValue(context).FromJust();
45
+
46
+ auto max_type = value->Get(context,
47
+ STRING_TO_V8_VALUE("max_type")).ToLocalChecked()->Int32Value(
48
+ context).FromJust();
49
+ auto max_value = (float) value->Get(context, STRING_TO_V8_VALUE(
50
+ "max_value")).ToLocalChecked()->NumberValue(context).FromJust();
51
+
52
+ CMasonMinMax minMax;
53
+ minMax.min_type = min_type;
54
+ minMax.min_value = min_value;
55
+ minMax.max_type = max_type;
56
+ minMax.max_value = max_value;
57
+
58
+ buffer.push_back(minMax);
59
+ }
60
+
61
+ return buffer;
62
+ }
63
+
64
+ std::vector<CMasonTrackSizingFunction>
65
+ toTrackSizingFunction(v8::Isolate *isolate, v8::Local<v8::Array> &array) {
66
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
67
+ auto len = array->Length();
68
+
69
+ std::vector<CMasonTrackSizingFunction> buffer;
70
+
71
+ if (len == 0) {
72
+ return buffer;
73
+ }
74
+
75
+ buffer.reserve(len);
76
+
77
+ for (int i = 0; i < len; i++) {
78
+ auto object = array->Get(context, i).ToLocalChecked().As<v8::Object>();
79
+ bool is_repeating = object->Get(context, STRING_TO_V8_VALUE(
80
+ "is_repeating")).ToLocalChecked()->BooleanValue(isolate);
81
+ auto repeating_type = object->Get(context, STRING_TO_V8_VALUE(
82
+ "repeating_type")).ToLocalChecked()->Int32Value(context).FromJust();
83
+ auto repeating_count = (short) object->Get(context, STRING_TO_V8_VALUE(
84
+ "repeating_count")).ToLocalChecked()->Int32Value(context).FromJust();
85
+
86
+ auto value = object->Get(context, STRING_TO_V8_VALUE("value"));
87
+ if (is_repeating) {
88
+ auto value_array = value.ToLocalChecked().As<v8::Array>();
89
+ auto repeating_length = value_array->Length();
90
+
91
+ auto min_max_size = sizeof(CMasonMinMax);
92
+ auto tracks = (CMasonMinMax*)malloc(repeating_length * min_max_size);
93
+
94
+ for (int j = 0; j < repeating_length; j++) {
95
+ auto repeat_object = value_array->Get(context, i).ToLocalChecked().As<v8::Object>();
96
+
97
+ auto min_type = repeat_object->Get(context, STRING_TO_V8_VALUE(
98
+ "min_type")).ToLocalChecked()->Int32Value(context).FromJust();
99
+ auto min_value = (float) repeat_object->Get(context, STRING_TO_V8_VALUE(
100
+ "min_value")).ToLocalChecked()->NumberValue(context).FromJust();
101
+
102
+ auto max_type = repeat_object->Get(context, STRING_TO_V8_VALUE(
103
+ "max_type")).ToLocalChecked()->Int32Value(context).FromJust();
104
+ auto max_value = (float) repeat_object->Get(context, STRING_TO_V8_VALUE(
105
+ "max_value")).ToLocalChecked()->NumberValue(context).FromJust();
106
+
107
+ CMasonMinMax minMax;
108
+ minMax.min_type = min_type;
109
+ minMax.min_value = min_value;
110
+
111
+ minMax.max_type = max_type;
112
+ minMax.max_value = max_value;
113
+
114
+ tracks[i * min_max_size] = minMax;;
115
+ }
116
+
117
+ CMasonTrackSizingFunction repeat;
118
+ repeat.tag = Repeat;
119
+ Repeat_Body body;
120
+ body._0 = repeating_type;
121
+ auto array = (CMasonNonRepeatedTrackSizingFunctionArray*)malloc(sizeof(CMasonNonRepeatedTrackSizingFunctionArray));
122
+ array->array = tracks;
123
+ array->length = repeating_length;
124
+ body._1 = repeating_count;
125
+ body._2 = array;
126
+ repeat.repeat = body;
127
+ buffer.emplace_back(repeat);
128
+
129
+ } else {
130
+
131
+ CMasonTrackSizingFunction single;
132
+ single.tag = Single;
133
+
134
+ auto single_object = value.ToLocalChecked().As<v8::Object>();
135
+
136
+ auto min_type = single_object->Get(context, STRING_TO_V8_VALUE(
137
+ "min_type")).ToLocalChecked()->Int32Value(context).FromJust();
138
+ auto min_value = (float) single_object->Get(context, STRING_TO_V8_VALUE(
139
+ "min_value")).ToLocalChecked()->NumberValue(context).FromJust();
140
+
141
+ auto max_type = single_object->Get(context, STRING_TO_V8_VALUE(
142
+ "max_type")).ToLocalChecked()->Int32Value(context).FromJust();
143
+ auto max_value = (float) single_object->Get(context, STRING_TO_V8_VALUE(
144
+ "max_value")).ToLocalChecked()->NumberValue(context).FromJust();
145
+
146
+ CMasonMinMax minMax;
147
+ minMax.min_type = min_type;
148
+ minMax.min_value = min_value;
149
+
150
+ minMax.max_type = max_type;
151
+ minMax.max_value = max_value;
152
+
153
+ single.single = minMax;
154
+
155
+ buffer.emplace_back(single);
156
+ }
157
+ }
158
+
159
+ return buffer;
160
+ }
161
+
162
+
163
+ void installV8Module(v8::Isolate *isolate) {
164
+
165
+ CREATE_V8_MODULE("MasonV8Module", [](v8::Local<v8::Object> moduleObject) {
166
+
167
+ CREATE_FUNCTION("updateNodeAndStyle", {
168
+ MASON_ENTER_WITH_NODE_AND_STYLE
169
+ [MasonReexports node_set_style:mason :node :style];
170
+ RETURN_UNDEFINED
171
+ })
172
+
173
+ // Width
174
+ MASON_SET_DIMENSION_PROPERTY("setWidth", style_set_width)
175
+ MASON_GET_DIMENSION_PROPERTY("getWidth", style_get_width)
176
+
177
+ MASON_SET_DIMENSION_PROPERTY("setMinWidth", style_set_min_width)
178
+ MASON_GET_DIMENSION_PROPERTY("getMinWidth", style_get_min_width)
179
+
180
+ MASON_SET_DIMENSION_PROPERTY("setMaxWidth", style_set_min_width)
181
+ MASON_GET_DIMENSION_PROPERTY("getMaxWidth", style_get_min_width)
182
+
183
+ // Height
184
+ MASON_SET_DIMENSION_PROPERTY("setHeight", style_set_height)
185
+ MASON_GET_DIMENSION_PROPERTY("getHeight", style_get_height)
186
+
187
+ MASON_SET_DIMENSION_PROPERTY("setMinHeight", style_set_min_width)
188
+ MASON_GET_DIMENSION_PROPERTY("getMinHeight", style_get_min_width)
189
+
190
+ MASON_SET_DIMENSION_PROPERTY("setMaxHeight", style_set_min_width)
191
+ MASON_GET_DIMENSION_PROPERTY("getMaxHeight", style_get_min_width)
192
+
193
+ CREATE_FUNCTION("compute", {
194
+ MASON_ENTER_WITH_NODE
195
+ [MasonReexports node_compute:mason :node];
196
+ RETURN_UNDEFINED
197
+ })
198
+
199
+ CREATE_FUNCTION("computeWH", {
200
+ MASON_ENTER_WITH_NODE
201
+
202
+ GET_FLOAT_ARG(2, width);
203
+ GET_FLOAT_ARG(3, height);
204
+ [MasonReexports node_compute_wh:mason :node width:width height:height];
205
+ RETURN_UNDEFINED
206
+ })
207
+
208
+ CREATE_FUNCTION("computeMaxContent", {
209
+ MASON_ENTER_WITH_NODE
210
+ [MasonReexports node_compute_max_content:mason :node];
211
+ RETURN_UNDEFINED
212
+ })
213
+
214
+ CREATE_FUNCTION("computeMinContent", {
215
+ MASON_ENTER_WITH_NODE
216
+ [MasonReexports node_compute_min_content:mason :node];
217
+ RETURN_UNDEFINED
218
+ })
219
+
220
+
221
+ CREATE_FUNCTION("updateStyleWithValues", {
222
+ MASON_ENTER_WITH_STYLE
223
+
224
+ GET_INT_ARG(1, display)
225
+ GET_INT_ARG(2, position)
226
+ GET_INT_ARG(3, direction)
227
+
228
+ GET_INT_ARG(4, flexDirection)
229
+ GET_INT_ARG(5, flexWrap)
230
+ GET_INT_ARG(6, overflow)
231
+
232
+ GET_INT_ARG(7, alignItems)
233
+ GET_INT_ARG(8, alignSelf)
234
+ GET_INT_ARG(9, alignContent)
235
+
236
+ GET_INT_ARG(10, justifyItems)
237
+ GET_INT_ARG(11, justifySelf)
238
+ GET_INT_ARG(12, justifyContent)
239
+
240
+ GET_INT_ARG(13, insetLeftType)
241
+ GET_FLOAT_ARG(14, insetLeftValue)
242
+
243
+ GET_INT_ARG(15, insetRightType)
244
+ GET_FLOAT_ARG(16, insetRightValue)
245
+
246
+ GET_INT_ARG(17, insetTopType)
247
+ GET_FLOAT_ARG(18, insetTopValue)
248
+
249
+ GET_INT_ARG(19, insetBottomType)
250
+ GET_FLOAT_ARG(20, insetBottomValue)
251
+
252
+ GET_INT_ARG(21, marginLeftType)
253
+ GET_FLOAT_ARG(22, marginLeftValue)
254
+
255
+ GET_INT_ARG(23, marginRightType)
256
+ GET_FLOAT_ARG(24, marginRightValue)
257
+
258
+ GET_INT_ARG(25, marginTopType)
259
+ GET_FLOAT_ARG(26, marginTopValue)
260
+
261
+ GET_INT_ARG(27, marginBottomType)
262
+ GET_FLOAT_ARG(28, marginBottomValue)
263
+
264
+ GET_INT_ARG(29, paddingLeftType)
265
+ GET_FLOAT_ARG(30, paddingLeftValue)
266
+
267
+ GET_INT_ARG(31, paddingRightType)
268
+ GET_FLOAT_ARG(32, paddingRightValue)
269
+
270
+ GET_INT_ARG(33, paddingTopType)
271
+ GET_FLOAT_ARG(34, paddingTopValue)
272
+
273
+ GET_INT_ARG(35, paddingBottomType)
274
+ GET_FLOAT_ARG(36, paddingBottomValue)
275
+
276
+ GET_INT_ARG(37, borderLeftType)
277
+ GET_FLOAT_ARG(38, borderLeftValue)
278
+
279
+ GET_INT_ARG(39, borderRightType)
280
+ GET_FLOAT_ARG(40, borderRightValue)
281
+
282
+ GET_INT_ARG(41, borderTopType)
283
+ GET_FLOAT_ARG(42, borderTopValue)
284
+
285
+ GET_INT_ARG(43, borderBottomType)
286
+ GET_FLOAT_ARG(44, borderBottomValue)
287
+
288
+ GET_FLOAT_ARG(45, flexGrow)
289
+ GET_FLOAT_ARG(46, flexShrink)
290
+
291
+ GET_INT_ARG(47, flexBasisType)
292
+ GET_FLOAT_ARG(48, flexBasisValue)
293
+
294
+ GET_INT_ARG(49, widthType)
295
+ GET_FLOAT_ARG(50, widthValue)
296
+
297
+ GET_INT_ARG(51, heightType)
298
+ GET_FLOAT_ARG(52, heightValue)
299
+
300
+ GET_INT_ARG(53, minWidthType)
301
+ GET_FLOAT_ARG(54, minWidthValue)
302
+
303
+ GET_INT_ARG(55, minHeightType)
304
+ GET_FLOAT_ARG(56, minHeightValue)
305
+
306
+ GET_INT_ARG(57, maxWidthType)
307
+ GET_FLOAT_ARG(58, maxWidthValue)
308
+
309
+ GET_INT_ARG(59, maxHeightType)
310
+ GET_FLOAT_ARG(60, maxHeightValue)
311
+
312
+ GET_INT_ARG(61, gapRowType)
313
+ GET_FLOAT_ARG(62, gapRowValue)
314
+
315
+ GET_INT_ARG(63, gapColumnType)
316
+ GET_FLOAT_ARG(64, gapColumnValue)
317
+
318
+ GET_FLOAT_ARG(65, aspectRatio)
319
+
320
+ auto gridAutoRowsValue = info[66].As<v8::Array>();
321
+ auto gridAutoRowsBuffer = toNonRepeatedTrackSizingFunction(isolate,
322
+ gridAutoRowsValue);
323
+
324
+ CMasonNonRepeatedTrackSizingFunctionArray gridAutoRows = {};
325
+ gridAutoRows.array = gridAutoRowsBuffer.data();
326
+ gridAutoRows.length = gridAutoRowsBuffer.size();
327
+
328
+ auto gridAutoColumnsValue = info[67].As<v8::Array>();
329
+ auto gridAutoColumnsBuffer = toNonRepeatedTrackSizingFunction(isolate,
330
+ gridAutoColumnsValue);
331
+
332
+ CMasonNonRepeatedTrackSizingFunctionArray gridAutoColumns = {};
333
+ gridAutoColumns.array = gridAutoColumnsBuffer.data();
334
+ gridAutoColumns.length = gridAutoColumnsBuffer.size();
335
+
336
+
337
+ GET_INT_ARG(68, gridAutoFlow)
338
+
339
+ GET_INT_ARG(69, gridColumnStartType)
340
+ GET_FLOAT_ARG(70, gridColumnStartValue)
341
+
342
+ GET_INT_ARG(71, gridColumnEndType)
343
+ GET_FLOAT_ARG(72, gridColumnEndValue)
344
+
345
+ GET_INT_ARG(73, gridRowStartType)
346
+ GET_FLOAT_ARG(74, gridRowStartValue)
347
+
348
+ GET_INT_ARG(75, gridRowEndType)
349
+ GET_FLOAT_ARG(76, gridRowEndValue)
350
+
351
+
352
+ auto gridTemplateRowsValue = info[77].As<v8::Array>();
353
+ auto gridTemplateColumnsValue = info[78].As<v8::Array>();
354
+
355
+ auto gridTemplateRowsBuffer = toTrackSizingFunction(isolate, gridTemplateRowsValue);
356
+
357
+ CMasonTrackSizingFunctionArray gridTemplateRows = {};
358
+
359
+ gridTemplateRows.array = gridTemplateRowsBuffer.data();
360
+ gridTemplateRows.length = gridTemplateRowsBuffer.size();
361
+
362
+ auto gridTemplateColumnsBuffer = toTrackSizingFunction(isolate, gridTemplateColumnsValue);
363
+
364
+ CMasonTrackSizingFunctionArray gridTemplateColumns = {};
365
+
366
+ gridTemplateColumns.array = gridTemplateColumnsBuffer.data();
367
+ gridTemplateColumns.length = gridTemplateColumnsBuffer.size();
368
+
369
+ GET_INT_ARG(79, overflowX)
370
+ GET_INT_ARG(80, overflowY)
371
+ GET_FLOAT_ARG(81, scrollbarWidth)
372
+
373
+ [MasonReexports style_update_with_values
374
+ :style
375
+ :display
376
+ :position
377
+ :direction
378
+ :flexDirection
379
+ :flexWrap
380
+ :overflow
381
+ :alignItems
382
+ :alignSelf
383
+ :alignContent
384
+ :justifyItems
385
+ :justifySelf
386
+ :justifyContent
387
+
388
+ :insetLeftType :insetLeftValue
389
+ :insetRightType :insetRightValue
390
+ :insetTopType :insetTopValue
391
+ :insetBottomType :insetBottomValue
392
+
393
+ :marginLeftType :marginLeftValue
394
+ :marginRightType :marginRightValue
395
+ :marginTopType :marginTopValue
396
+ :marginBottomType :marginBottomValue
397
+
398
+ :paddingLeftType :paddingLeftValue
399
+ :paddingRightType :paddingRightValue
400
+ :paddingTopType :paddingTopValue
401
+ :paddingBottomType :paddingBottomValue
402
+
403
+ :borderLeftType :borderLeftValue
404
+ :borderRightType :borderRightValue
405
+ :borderTopType :borderTopValue
406
+ :borderBottomType :borderBottomValue
407
+
408
+ :flexGrow :flexShrink
409
+ :flexBasisType :flexBasisValue
410
+
411
+ :widthType :widthValue
412
+ :heightType :heightValue
413
+
414
+ :minWidthType :minWidthValue
415
+ :minHeightType :minHeightValue
416
+
417
+ :maxWidthType :maxWidthValue
418
+ :maxHeightType :maxHeightValue
419
+
420
+ :gapRowType :gapRowValue
421
+ :gapColumnType :gapColumnValue
422
+ :aspectRatio
423
+ :&gridAutoRows :&gridAutoColumns
424
+ :gridAutoFlow
425
+ :gridColumnStartType :gridColumnStartValue
426
+ :gridColumnEndType :gridColumnEndValue
427
+ :gridRowStartType :gridRowStartValue
428
+ :gridRowEndType :gridRowEndValue
429
+ :&gridTemplateRows
430
+ :&gridTemplateColumns
431
+ :overflowX
432
+ :overflowY
433
+ scrollBarWidth:scrollbarWidth];
434
+
435
+ for(int i = 0; i < gridTemplateRowsBuffer.size();i++){
436
+ auto it = gridTemplateRowsBuffer[i];
437
+ destroy_c_mason_track_sizing_function(it);
438
+ }
439
+
440
+ for(int i = 0; i < gridTemplateColumnsBuffer.size();i++){
441
+ auto it = gridTemplateColumnsBuffer[i];
442
+ destroy_c_mason_track_sizing_function(it);
443
+ }
444
+
445
+ })
446
+
447
+ CREATE_FUNCTION("isDirty", {
448
+ MASON_ENTER_WITH_NODE
449
+ auto value = [MasonReexports node_dirty:mason :node];
450
+ info.GetReturnValue().Set(value);
451
+ })
452
+
453
+ CREATE_FUNCTION("markDirty", {
454
+ MASON_ENTER_WITH_NODE
455
+ [MasonReexports node_mark_dirty:mason :node];
456
+ })
457
+
458
+
459
+ MASON_SET_NUMBER_PROPERTY("setScrollbarWidth", style_set_scrollbar_width)
460
+ MASON_GET_NUMBER_PROPERTY("getScrollbarWidth", style_get_scrollbar_width)
461
+
462
+ MASON_SET_NUMBER_PROPERTY("setOverflow", style_set_overflow)
463
+
464
+ MASON_SET_NUMBER_PROPERTY("setOverflowX", style_set_overflow_x)
465
+ MASON_GET_NUMBER_PROPERTY("getOverflowX", style_get_overflow_x)
466
+
467
+ MASON_SET_NUMBER_PROPERTY("setOverflowY", style_set_overflow_y)
468
+ MASON_GET_NUMBER_PROPERTY("getOverflowY", style_get_overflow_y)
469
+
470
+
471
+ MASON_SET_NUMBER_PROPERTY("setDisplay", style_set_display)
472
+ MASON_GET_NUMBER_PROPERTY("getDisplay", style_get_display)
473
+
474
+ MASON_SET_NUMBER_PROPERTY("setPosition", style_set_position)
475
+ MASON_GET_NUMBER_PROPERTY("getPosition", style_get_position)
476
+
477
+ MASON_SET_NUMBER_PROPERTY("setFlexWrap", style_set_flex_wrap)
478
+ MASON_GET_NUMBER_PROPERTY("getFlexWrap", style_get_flex_wrap)
479
+
480
+ MASON_SET_NUMBER_PROPERTY("setAlignItems", style_set_align_items)
481
+ MASON_GET_NUMBER_PROPERTY("getAlignItems", style_get_align_items)
482
+
483
+ MASON_SET_NUMBER_PROPERTY("setAlignContent", style_set_align_content)
484
+ MASON_GET_NUMBER_PROPERTY("getAlignContent", style_get_align_content)
485
+
486
+ MASON_SET_NUMBER_PROPERTY("setAlignSelf", style_set_align_self)
487
+ MASON_GET_NUMBER_PROPERTY("getAlignSelf", style_get_align_self)
488
+
489
+ MASON_SET_NUMBER_PROPERTY("setJustifyItems", style_set_justify_items)
490
+ MASON_GET_NUMBER_PROPERTY("getJustifyItems", style_get_justify_items)
491
+
492
+ MASON_SET_NUMBER_PROPERTY("setJustifySelf", style_set_justify_self)
493
+ MASON_GET_NUMBER_PROPERTY("getJustifySelf", style_get_justify_self)
494
+
495
+ MASON_SET_NUMBER_PROPERTY("setJustifyContent", style_set_justify_content)
496
+ MASON_GET_NUMBER_PROPERTY("getJustifyContent", style_get_justify_content)
497
+
498
+ MASON_SET_LENGTH_PROPERTY("setInset", style_set_inset)
499
+
500
+ MASON_SET_LENGTH_PROPERTY("setInsetTop", style_set_inset_top)
501
+ MASON_GET_LENGTH_PROPERTY("getInsetTop", style_get_inset_top)
502
+
503
+ MASON_SET_LENGTH_PROPERTY("setInsetLeft", style_set_inset_left)
504
+ MASON_GET_LENGTH_PROPERTY("getInsetLeft", style_get_inset_left)
505
+
506
+ MASON_SET_LENGTH_PROPERTY("setInsetBottom", style_set_inset_bottom)
507
+ MASON_GET_LENGTH_PROPERTY("getInsetBottom", style_get_inset_bottom)
508
+
509
+ MASON_SET_LENGTH_PROPERTY("setInsetRight", style_set_inset_right)
510
+ MASON_GET_LENGTH_PROPERTY("getInsetRight", style_get_inset_right)
511
+
512
+
513
+ MASON_SET_LENGTH_PROPERTY_ALL_SIDES("setInset", style_set_margin)
514
+
515
+ MASON_SET_LENGTH_PROPERTY("setMarginTop", style_set_margin_top)
516
+ MASON_GET_LENGTH_PROPERTY("getMarginTop", style_get_margin_top)
517
+
518
+ MASON_SET_LENGTH_PROPERTY("setMarginLeft", style_set_margin_left)
519
+ MASON_GET_LENGTH_PROPERTY("getMarginLeft", style_get_margin_left)
520
+
521
+ MASON_SET_LENGTH_PROPERTY("setMarginBottom", style_set_margin_bottom)
522
+ MASON_GET_LENGTH_PROPERTY("getMarginBottom", style_get_margin_bottom)
523
+
524
+ MASON_SET_LENGTH_PROPERTY("setMarginRight", style_set_margin_right)
525
+ MASON_GET_LENGTH_PROPERTY("getMarginRight", style_get_margin_right)
526
+
527
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO_ALL_SIDES("setPadding", style_set_padding)
528
+
529
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setPaddingTop", style_set_padding_top)
530
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getPaddingTop", style_get_padding_top)
531
+
532
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setPaddingLeft", style_set_padding_left)
533
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getPaddingLeft", style_get_padding_left)
534
+
535
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setPaddingBottom", style_set_padding_bottom)
536
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getPaddingBottom", style_get_padding_bottom)
537
+
538
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setPaddingRight", style_set_padding_right)
539
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getPaddingRight", style_get_padding_right)
540
+
541
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO_ALL_SIDES("setBorder", style_set_border)
542
+
543
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setBorderTop", style_set_border_top)
544
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getBorderTop", style_get_border_top)
545
+
546
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setBorderLeft", style_set_border_left)
547
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getBorderLeft", style_get_border_left)
548
+
549
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setBorderBottom", style_set_border_bottom)
550
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getBorderBottom", style_get_border_bottom)
551
+
552
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setBorderRight", style_set_border_right)
553
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getBorderRight", style_get_border_right)
554
+
555
+ MASON_SET_FLOAT_PROPERTY("setFlexGrow", style_set_flex_grow)
556
+ MASON_GET_NUMBER_PROPERTY("getFlexGrow", style_get_flex_grow)
557
+
558
+ MASON_SET_FLOAT_PROPERTY("setFlexShrink", style_set_flex_shrink)
559
+ MASON_GET_NUMBER_PROPERTY("getFlexShrink", style_get_flex_shrink)
560
+
561
+ MASON_SET_DIMENSION_PROPERTY("setFlexBasis", style_set_flex_basis)
562
+ MASON_GET_DIMENSION_PROPERTY("getFlexBasis", style_get_flex_basis)
563
+
564
+
565
+ MASON_SET_SIZE_PROPERTY("setGap", style_set_gap)
566
+ MASON_GET_SIZE_PROPERTY("getGap", style_get_gap)
567
+
568
+
569
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setRowGap", style_set_row_gap)
570
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getRowGap", style_get_row_gap)
571
+
572
+ MASON_SET_LENGTH_PROPERTY_NO_AUTO("setColumnGap", style_set_column_gap)
573
+ MASON_GET_LENGTH_PROPERTY_NO_AUTO("getColumnGap", style_get_column_gap)
574
+
575
+ MASON_SET_FLOAT_PROPERTY("setAspectRatio", style_set_aspect_ratio)
576
+ MASON_GET_NUMBER_PROPERTY("getAspectRatio", style_get_aspect_ratio)
577
+
578
+ MASON_SET_NUMBER_PROPERTY("setFlexDirection", style_set_flex_direction)
579
+ MASON_GET_NUMBER_PROPERTY("getFlexDirection", style_get_flex_direction)
580
+
581
+ MASON_SET_NUMBER_PROPERTY("setAutoFlow", style_set_grid_auto_flow)
582
+ MASON_GET_NUMBER_PROPERTY("getAutoFlow", style_get_grid_auto_flow)
583
+
584
+
585
+ CREATE_FUNCTION("getGridAutoRows", {
586
+ MASON_ENTER_WITH_NODE_AND_STYLE
587
+ auto rows = [MasonReexports style_get_grid_auto_rows:style];
588
+ auto parsed = [MasonReexports util_parse_non_repeated_track_sizing_function:rows];
589
+
590
+ [MasonReexports destroyWithNonRepeatedTrackSizingFunctionArray:rows];
591
+ info.GetReturnValue().Set(STRING_TO_V8_VALUE(parsed.UTF8String));
592
+ })
593
+
594
+ CREATE_FUNCTION("setGridAutoRows", {
595
+ MASON_ENTER_WITH_NODE_AND_STYLE
596
+ auto array = info[3].As<v8::Array>();
597
+ auto value = toNonRepeatedTrackSizingFunction(isolate, array);
598
+
599
+ CMasonNonRepeatedTrackSizingFunctionArray val;
600
+ val.array = value.data();
601
+ val.length = value.size();
602
+
603
+ [MasonReexports style_set_grid_auto_rows:style :&val];
604
+ MASON_UPDATE_NODE(info[4])
605
+ })
606
+
607
+ CREATE_FUNCTION("getGridAutoColumns", {
608
+ MASON_ENTER_WITH_NODE_AND_STYLE
609
+ auto columns =[MasonReexports style_get_grid_auto_columns:style];
610
+ auto parsed = [MasonReexports util_parse_non_repeated_track_sizing_function:columns];
611
+ [MasonReexports destroyWithNonRepeatedTrackSizingFunctionArray:columns];
612
+
613
+ info.GetReturnValue().Set(STRING_TO_V8_VALUE(parsed.UTF8String));
614
+ })
615
+
616
+ CREATE_FUNCTION("setGridAutoColumns", {
617
+ MASON_ENTER_WITH_NODE_AND_STYLE
618
+ auto array = info[3].As<v8::Array>();
619
+ auto value = toNonRepeatedTrackSizingFunction(isolate, array);
620
+
621
+ CMasonNonRepeatedTrackSizingFunctionArray val;
622
+ val.array = value.data();
623
+ val.length = value.size();
624
+
625
+ [MasonReexports style_set_grid_auto_columns:style :&val];
626
+ MASON_UPDATE_NODE(info[4])
627
+ })
628
+
629
+ CREATE_FUNCTION("getArea", {
630
+ MASON_ENTER_WITH_STYLE
631
+ auto row_start = [MasonReexports style_get_grid_row_start:style];
632
+ auto row_end = [MasonReexports style_get_grid_row_start:style];
633
+
634
+ auto col_start = [MasonReexports style_get_grid_column_start:style];
635
+ auto col_end = [MasonReexports style_get_grid_column_start:style];
636
+
637
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
638
+ object->Set(context, STRING_TO_V8_VALUE("col_start_type"), v8::Int32::New(isolate, (int) col_start.value_type)).Check();
639
+ object->Set(context, STRING_TO_V8_VALUE("col_start_value"), v8::Int32::New(isolate, (int) col_start.value)).Check();
640
+
641
+ object->Set(context, STRING_TO_V8_VALUE("col_end_type"), v8::Int32::New(isolate, (int) col_end.value_type)).Check();
642
+ object->Set(context, STRING_TO_V8_VALUE("col_end_value"), v8::Int32::New(isolate, (int) col_end.value)).Check();
643
+
644
+ object->Set(context, STRING_TO_V8_VALUE("row_start_type"), v8::Int32::New(isolate, (int) row_start.value_type)).Check();
645
+ object->Set(context, STRING_TO_V8_VALUE("row_start_value"), v8::Int32::New(isolate, (int) row_start.value)).Check();
646
+
647
+ object->Set(context, STRING_TO_V8_VALUE("row_end_type"), v8::Int32::New(isolate, (int) row_end.value_type)).Check();
648
+ object->Set(context, STRING_TO_V8_VALUE("row_end_value"), v8::Int32::New(isolate, (int) row_end.value)).Check();
649
+
650
+ std::stringstream ss;
651
+ if (col_start.value == col_end.value &&
652
+ col_start.value_type == col_end.value_type) {
653
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
654
+ ss << "auto";
655
+ } else {
656
+ ss << col_start.value;
657
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
658
+ ss << " span";
659
+ }
660
+ }
661
+ } else {
662
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
663
+ ss << "auto";
664
+ } else {
665
+ ss << col_start.value;
666
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
667
+ ss << " span";
668
+ }
669
+ }
670
+
671
+ ss << " / ";
672
+
673
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
674
+ ss << "auto";
675
+ } else {
676
+ ss << col_end.value;
677
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
678
+ ss << " span";
679
+ }
680
+ }
681
+ }
682
+ object->Set(context, STRING_TO_V8_VALUE("colFormatted"), STRING_TO_V8_VALUE(ss.str().c_str())).Check();
683
+
684
+ std::stringstream row_ss;
685
+ if (row_start.value == row_end.value &&
686
+ row_start.value_type == row_end.value_type) {
687
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
688
+ row_ss << "auto";
689
+ } else {
690
+ row_ss << row_start.value;
691
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
692
+ row_ss << " span";
693
+ }
694
+ }
695
+ } else {
696
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
697
+ row_ss << "auto";
698
+ } else {
699
+ row_ss << row_start.value;
700
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
701
+ row_ss << " span";
702
+ }
703
+ }
704
+
705
+ row_ss << " / ";
706
+
707
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
708
+ row_ss << "auto";
709
+ } else {
710
+ row_ss << row_end.value;
711
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
712
+ row_ss << " span";
713
+ }
714
+ }
715
+ }
716
+ object->Set(context, STRING_TO_V8_VALUE("rowFormatted"), STRING_TO_V8_VALUE(ss.str().c_str())).Check();
717
+
718
+ info.GetReturnValue().Set(object);
719
+
720
+ })
721
+
722
+ CREATE_FUNCTION("setArea", {
723
+ MASON_ENTER_WITH_NODE_AND_STYLE
724
+
725
+ auto object = info[3].As<v8::Object>();
726
+
727
+ auto rowStartType = (int) object->Get(context,
728
+ STRING_TO_V8_VALUE("row_start_type")).ToLocalChecked()->Int32Value(context).FromJust();
729
+
730
+ auto rowStartValue = (short) object->Get(context,
731
+ STRING_TO_V8_VALUE("row_start_value")).ToLocalChecked()->Int32Value(context).FromJust();
732
+
733
+ auto rowEndType = (int) object->Get(context,
734
+ STRING_TO_V8_VALUE("row_end_type")).ToLocalChecked()->Int32Value(context).FromJust();
735
+ auto rowEndValue = (short) object->Get(context,
736
+ STRING_TO_V8_VALUE("row_end_value")).ToLocalChecked()->Int32Value(context).FromJust();
737
+
738
+ auto columnStartType = (int) object->Get(context,
739
+ STRING_TO_V8_VALUE("col_start_value")).ToLocalChecked()->Int32Value(context).FromJust();
740
+ auto columnStartValue = (short) object->Get(context,
741
+ STRING_TO_V8_VALUE("col_start_type")).ToLocalChecked()->Int32Value(context).FromJust();
742
+
743
+ auto columnEndType = (int) object->Get(context,
744
+ STRING_TO_V8_VALUE("col_end_type")).ToLocalChecked()->Int32Value(context).FromJust();
745
+ auto columnEndValue = (short) object->Get(context,
746
+ STRING_TO_V8_VALUE("col_end_value")).ToLocalChecked()->Int32Value(context).FromJust();
747
+
748
+ [MasonReexports style_set_grid_area
749
+ :style
750
+ :jsToGridPlacement(rowStartValue, rowStartType)
751
+ :jsToGridPlacement(rowEndValue, rowEndType)
752
+ :jsToGridPlacement(columnStartValue, columnStartType)
753
+ :jsToGridPlacement(columnEndValue, columnEndType)];
754
+
755
+ MASON_UPDATE_NODE(info[4])
756
+
757
+ })
758
+
759
+ CREATE_FUNCTION("getColumn", {
760
+ MASON_ENTER_WITH_STYLE
761
+
762
+ auto col_start = [MasonReexports style_get_grid_column_start:style];
763
+ auto col_end = [MasonReexports style_get_grid_column_start:style];
764
+
765
+
766
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
767
+ object->Set(context, STRING_TO_V8_VALUE("col_start_type"), v8::Int32::New(isolate, (int) col_start.value_type)).Check();
768
+ object->Set(context, STRING_TO_V8_VALUE("col_start_value"), v8::Int32::New(isolate, (int) col_start.value)).Check();
769
+
770
+ object->Set(context, STRING_TO_V8_VALUE("col_end_type"), v8::Int32::New(isolate, (int) col_end.value_type)).Check();
771
+ object->Set(context, STRING_TO_V8_VALUE("col_end_value"), v8::Int32::New(isolate, (int) col_end.value)).Check();
772
+
773
+ std::stringstream ss;
774
+ if (col_start.value == col_end.value &&
775
+ col_start.value_type == col_end.value_type) {
776
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
777
+ ss << "auto";
778
+ } else {
779
+ ss << col_start.value;
780
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
781
+ ss << " span";
782
+ }
783
+ }
784
+ } else {
785
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
786
+ ss << "auto";
787
+ } else {
788
+ ss << col_start.value;
789
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
790
+ ss << " span";
791
+ }
792
+ }
793
+
794
+ ss << " / ";
795
+
796
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
797
+ ss << "auto";
798
+ } else {
799
+ ss << col_end.value;
800
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
801
+ ss << " span";
802
+ }
803
+ }
804
+ }
805
+ object->Set(context, STRING_TO_V8_VALUE("colFormatted"), STRING_TO_V8_VALUE(ss.str().c_str())).Check();
806
+
807
+ info.GetReturnValue().Set(object);
808
+ })
809
+
810
+
811
+ CREATE_FUNCTION("setColumn", {
812
+ MASON_ENTER_WITH_NODE_AND_STYLE
813
+
814
+ auto object = info[3].As<v8::Object>();
815
+
816
+ auto columnStartType = (int) object->Get(context,
817
+ STRING_TO_V8_VALUE("col_start_value")).ToLocalChecked()->Int32Value(context).FromJust();
818
+ auto columnStartValue = (short) object->Get(context,
819
+ STRING_TO_V8_VALUE("col_start_type")).ToLocalChecked()->Int32Value(context).FromJust();
820
+
821
+ auto columnEndType = (int) object->Get(context,
822
+ STRING_TO_V8_VALUE("col_end_type")).ToLocalChecked()->Int32Value(context).FromJust();
823
+ auto columnEndValue = (short) object->Get(context,
824
+ STRING_TO_V8_VALUE("col_end_value")).ToLocalChecked()->Int32Value(context).FromJust();
825
+
826
+ [MasonReexports style_set_grid_column
827
+ :style
828
+ :jsToGridPlacement(columnStartValue, columnStartType)
829
+ :jsToGridPlacement(columnEndValue, columnEndType)];
830
+
831
+ MASON_UPDATE_NODE(info[4])
832
+
833
+ })
834
+
835
+
836
+ CREATE_FUNCTION("getRow", {
837
+ MASON_ENTER_WITH_STYLE
838
+
839
+ auto row_start = [MasonReexports style_get_grid_row_start:style];
840
+ auto row_end = [MasonReexports style_get_grid_row_start:style];
841
+
842
+
843
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
844
+
845
+ object->Set(context, STRING_TO_V8_VALUE("row_start_type"), v8::Int32::New(isolate, (int) row_start.value_type)).Check();
846
+ object->Set(context, STRING_TO_V8_VALUE("row_start_value"), v8::Int32::New(isolate, (int) row_start.value)).Check();
847
+
848
+ object->Set(context, STRING_TO_V8_VALUE("row_end_type"), v8::Int32::New(isolate, (int) row_end.value_type)).Check();
849
+ object->Set(context, STRING_TO_V8_VALUE("row_end_value"), v8::Int32::New(isolate, (int) row_end.value)).Check();
850
+
851
+ std::stringstream row_ss;
852
+ if (row_start.value == row_end.value &&
853
+ row_start.value_type == row_end.value_type) {
854
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
855
+ row_ss << "auto";
856
+ } else {
857
+ row_ss << row_start.value;
858
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
859
+ row_ss << " span";
860
+ }
861
+ }
862
+ } else {
863
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
864
+ row_ss << "auto";
865
+ } else {
866
+ row_ss << row_start.value;
867
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
868
+ row_ss << " span";
869
+ }
870
+ }
871
+
872
+ row_ss << " / ";
873
+
874
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
875
+ row_ss << "auto";
876
+ } else {
877
+ row_ss << row_end.value;
878
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
879
+ row_ss << " span";
880
+ }
881
+ }
882
+ }
883
+ object->Set(context, STRING_TO_V8_VALUE("rowFormatted"), STRING_TO_V8_VALUE(row_ss.str().c_str())).Check();
884
+
885
+ info.GetReturnValue().Set(object);
886
+ })
887
+
888
+
889
+ CREATE_FUNCTION("setRow", {
890
+ MASON_ENTER_WITH_NODE_AND_STYLE
891
+
892
+ auto object = info[3].As<v8::Object>();
893
+
894
+ auto rowStartType = (int) object->Get(context,
895
+ STRING_TO_V8_VALUE("row_start_type")).ToLocalChecked()->Int32Value(context).FromJust();
896
+
897
+ auto rowStartValue = (short) object->Get(context,
898
+ STRING_TO_V8_VALUE("row_start_value")).ToLocalChecked()->Int32Value(context).FromJust();
899
+
900
+ auto rowEndType = (int) object->Get(context,
901
+ STRING_TO_V8_VALUE("row_end_type")).ToLocalChecked()->Int32Value(context).FromJust();
902
+ auto rowEndValue = (short) object->Get(context,
903
+ STRING_TO_V8_VALUE("row_end_value")).ToLocalChecked()->Int32Value(context).FromJust();
904
+
905
+ [MasonReexports style_set_grid_row
906
+ :style
907
+ :jsToGridPlacement(rowStartValue, rowStartType)
908
+ :jsToGridPlacement(rowEndValue, rowEndType)];
909
+
910
+ MASON_UPDATE_NODE(info[4])
911
+
912
+ })
913
+
914
+
915
+ MASON_GET_GRID_PROPERTY("getColumnStart", style_get_grid_column_start)
916
+ MASON_GET_GRID_PROPERTY("getColumnEnd", style_get_grid_column_end)
917
+ MASON_GET_GRID_PROPERTY("getRowStart", style_get_grid_row_start)
918
+ MASON_GET_GRID_PROPERTY("getRowEnd", style_get_grid_row_end)
919
+
920
+ MASON_SET_GRID_PROPERTY("setColumnStart", style_set_grid_column_start)
921
+ MASON_SET_GRID_PROPERTY("setColumnEnd", style_set_grid_column_end)
922
+ MASON_SET_GRID_PROPERTY("setRowStart", style_set_grid_row_start)
923
+ MASON_SET_GRID_PROPERTY("setRowEnd", style_set_grid_row_end)
924
+
925
+
926
+ CREATE_FUNCTION("getGridTemplateRows", {
927
+ MASON_ENTER_WITH_STYLE
928
+ auto rows = [MasonReexports style_get_grid_template_rows:style];
929
+ auto parsed = [MasonReexports util_parse_auto_repeating_track_sizing_function:rows];
930
+ [MasonReexports destroyWithTrackSizingFunctionArray:rows];
931
+ info.GetReturnValue().Set(STRING_TO_V8_VALUE(parsed.UTF8String));
932
+
933
+ })
934
+
935
+ CREATE_FUNCTION("getGridTemplateColumns", {
936
+ MASON_ENTER_WITH_STYLE
937
+ auto columns = [MasonReexports style_get_grid_template_columns:style];
938
+ auto parsed = [MasonReexports util_parse_auto_repeating_track_sizing_function:columns];
939
+ [MasonReexports destroyWithTrackSizingFunctionArray:columns];
940
+ info.GetReturnValue().Set(STRING_TO_V8_VALUE(parsed.UTF8String));
941
+ })
942
+
943
+ CREATE_FUNCTION("setGridTemplateRows", {
944
+ MASON_ENTER_WITH_NODE_AND_STYLE
945
+
946
+ auto array = info[3].As<v8::Array>();
947
+ auto value = toTrackSizingFunction(isolate, array);
948
+ CMasonTrackSizingFunctionArray rows = {};
949
+ rows.array = value.data();
950
+ rows.length = value.size();
951
+
952
+ [MasonReexports style_set_grid_template_rows:style :&rows];
953
+
954
+ for(int i = 0; i < value.size();i++){
955
+ auto it = value[i];
956
+ destroy_c_mason_track_sizing_function(it);
957
+ }
958
+
959
+ MASON_UPDATE_NODE(info[4])
960
+
961
+ })
962
+
963
+ CREATE_FUNCTION("setGridTemplateColumns", {
964
+ MASON_ENTER_WITH_NODE_AND_STYLE
965
+
966
+ auto array = info[3].As<v8::Array>();
967
+ auto value = toTrackSizingFunction(isolate, array);
968
+ CMasonTrackSizingFunctionArray columns = {};
969
+ columns.array = value.data();
970
+ columns.length = value.size();
971
+
972
+ [MasonReexports style_set_grid_template_columns:style :&columns];
973
+
974
+ for(int i = 0; i < value.size();i++){
975
+ auto it = value[i];
976
+ destroy_c_mason_track_sizing_function(it);
977
+ }
978
+
979
+ MASON_UPDATE_NODE(info[4])
980
+
981
+ })
982
+
983
+ CREATE_FUNCTION("layout", {
984
+ MASON_ENTER_WITH_NODE
985
+
986
+ // TODO
987
+ })
988
+
989
+ CREATE_FUNCTION("getComputedLayout", {
990
+ MASON_ENTER_WITH_NODE
991
+ // TODO
992
+ })
993
+
994
+ });
995
+ }
996
+
997
+
998
+ @implementation MasonV8ModuleInstaller
999
+
1000
+ - (void )install {
1001
+ v8::Isolate* isolate = tns::Runtime::GetCurrentRuntime()->GetIsolate();
1002
+ installV8Module(isolate);
1003
+ }
1004
+
1005
+ @end