@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,2181 @@
1
+ //
2
+ // Created by Osei Fortune on 01/01/2024.
3
+ //
4
+
5
+ #include "MasonStyleImpl.h"
6
+ #include "Caches.h"
7
+
8
+
9
+ /*
10
+
11
+ [[maybe_unused]] rust::Vec<CMasonNonRepeatedTrackSizingFunction>
12
+ toNonRepeatedTrackSizingFunction(v8::Isolate *isolate, v8::Local<v8::Array> &array)
13
+ {
14
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
15
+ auto len = array->Length();
16
+
17
+ auto auto_vec = rust::Vec<CMasonNonRepeatedTrackSizingFunction>();
18
+
19
+ if (len == 0)
20
+ {
21
+ return std::move(auto_vec);
22
+ }
23
+
24
+ auto_vec.reserve(len);
25
+
26
+ for (int i = 0; i < len; i++)
27
+ {
28
+ auto value = array->Get(context, i).ToLocalChecked().As<v8::Object>();
29
+
30
+ // object {type: number, min_type: number, min_value: number, max_type: number, max_value: number};
31
+ auto min_type = value->Get(context,
32
+ STRING_TO_V8_VALUE("min_type"))
33
+ .ToLocalChecked()
34
+ ->Int32Value(
35
+ context)
36
+ .FromJust();
37
+ auto min_value = (float)value->Get(context, STRING_TO_V8_VALUE(
38
+ "min_value"))
39
+ .ToLocalChecked()
40
+ ->NumberValue(context)
41
+ .FromJust();
42
+
43
+ auto max_type = value->Get(context,
44
+ STRING_TO_V8_VALUE("max_type"))
45
+ .ToLocalChecked()
46
+ ->Int32Value(
47
+ context)
48
+ .FromJust();
49
+ auto max_value = (float)value->Get(context, STRING_TO_V8_VALUE(
50
+ "max_value"))
51
+ .ToLocalChecked()
52
+ ->NumberValue(context)
53
+ .FromJust();
54
+
55
+ CMasonMinMax minMax = {};
56
+ minMax.min_type = min_type;
57
+ minMax.min_value = min_value;
58
+ minMax.max_type = max_type;
59
+ minMax.max_value = max_value;
60
+
61
+ mason_util_create_non_repeated_track_sizing_function(minMax, -1, auto_vec);
62
+ }
63
+
64
+ return std::move(auto_vec);
65
+ }
66
+
67
+ [[maybe_unused]] rust::Vec<CMasonTrackSizingFunction>
68
+ toTrackSizingFunction(v8::Isolate *isolate, v8::Local<v8::Array> &array)
69
+ {
70
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
71
+ auto len = array->Length();
72
+
73
+ auto auto_vec = rust::Vec<CMasonTrackSizingFunction>();
74
+
75
+ if (len == 0)
76
+ {
77
+ return std::move(auto_vec);
78
+ }
79
+
80
+ auto_vec.reserve(len);
81
+
82
+ for (int i = 0; i < len; i++)
83
+ {
84
+ auto object = array->Get(context, i).ToLocalChecked().As<v8::Object>();
85
+ bool is_repeating = object->Get(context, STRING_TO_V8_VALUE(
86
+ "is_repeating"))
87
+ .ToLocalChecked()
88
+ ->BooleanValue(isolate);
89
+ auto repeating_type = object->Get(context, STRING_TO_V8_VALUE(
90
+ "repeating_type"))
91
+ .ToLocalChecked()
92
+ ->Int32Value(context)
93
+ .FromJust();
94
+ auto repeating_count = (short)object->Get(context, STRING_TO_V8_VALUE(
95
+ "repeating_count"))
96
+ .ToLocalChecked()
97
+ ->Int32Value(context)
98
+ .FromJust();
99
+
100
+ auto value = object->Get(context, STRING_TO_V8_VALUE("value"));
101
+ if (is_repeating)
102
+ {
103
+ auto value_array = value.ToLocalChecked().As<v8::Array>();
104
+ auto repeating_length = value_array->Length();
105
+
106
+ rust::Vec<CMasonMinMax> vec;
107
+ vec.reserve(repeating_length);
108
+
109
+ for (int j = 0; j < repeating_length; j++)
110
+ {
111
+ auto repeat_object = value_array->Get(context, i).ToLocalChecked().As<v8::Object>();
112
+
113
+ auto min_type = repeat_object->Get(context, STRING_TO_V8_VALUE(
114
+ "min_type"))
115
+ .ToLocalChecked()
116
+ ->Int32Value(context)
117
+ .FromJust();
118
+ auto min_value = (float)repeat_object->Get(context, STRING_TO_V8_VALUE(
119
+ "min_value"))
120
+ .ToLocalChecked()
121
+ ->NumberValue(context)
122
+ .FromJust();
123
+
124
+ auto max_type = repeat_object->Get(context, STRING_TO_V8_VALUE(
125
+ "max_type"))
126
+ .ToLocalChecked()
127
+ ->Int32Value(context)
128
+ .FromJust();
129
+ auto max_value = (float)repeat_object->Get(context, STRING_TO_V8_VALUE(
130
+ "max_value"))
131
+ .ToLocalChecked()
132
+ ->NumberValue(context)
133
+ .FromJust();
134
+
135
+ CMasonMinMax minMax{};
136
+ minMax.min_type = min_type;
137
+ minMax.min_value = min_value;
138
+
139
+ minMax.max_type = max_type;
140
+ minMax.max_value = max_value;
141
+
142
+ vec.emplace_back(minMax);
143
+ }
144
+
145
+ mason_util_create_auto_repeating_track_sizing_function(
146
+ repeating_type, repeating_count, std::move(vec), -1, auto_vec);
147
+ }
148
+ else
149
+ {
150
+ auto single_object = value.ToLocalChecked().As<v8::Object>();
151
+
152
+ auto min_type = single_object->Get(context, STRING_TO_V8_VALUE(
153
+ "min_type"))
154
+ .ToLocalChecked()
155
+ ->Int32Value(context)
156
+ .FromJust();
157
+ auto min_value = (float)single_object->Get(context, STRING_TO_V8_VALUE(
158
+ "min_value"))
159
+ .ToLocalChecked()
160
+ ->NumberValue(context)
161
+ .FromJust();
162
+
163
+ auto max_type = single_object->Get(context, STRING_TO_V8_VALUE(
164
+ "max_type"))
165
+ .ToLocalChecked()
166
+ ->Int32Value(context)
167
+ .FromJust();
168
+ auto max_value = (float)single_object->Get(context, STRING_TO_V8_VALUE(
169
+ "max_value"))
170
+ .ToLocalChecked()
171
+ ->NumberValue(context)
172
+ .FromJust();
173
+
174
+ CMasonMinMax minMax{};
175
+ minMax.min_type = min_type;
176
+ minMax.min_value = min_value;
177
+
178
+ minMax.max_type = max_type;
179
+ minMax.max_value = max_value;
180
+
181
+ mason_util_create_single_track_sizing_function(minMax, -1, auto_vec);
182
+ }
183
+ }
184
+
185
+ return std::move(auto_vec);
186
+ }
187
+
188
+ */
189
+
190
+
191
+ void MasonStyleImpl::Init(v8::Isolate *isolate) {
192
+ v8::Locker locker(isolate);
193
+ v8::Isolate::Scope isolate_scope(isolate);
194
+ v8::HandleScope handle_scope(isolate);
195
+
196
+ auto ctor = GetCtor(isolate);
197
+ auto context = isolate->GetCurrentContext();
198
+ auto global = context->Global();
199
+ auto func = ctor->GetFunction(context).ToLocalChecked();
200
+
201
+ global->Set(context, Helpers::ConvertToV8String(isolate, "NSCMasonStyle"), func);
202
+ }
203
+
204
+ MasonStyleImpl *MasonStyleImpl::GetPointer(v8::Local<v8::Object> object) {
205
+ auto ptr = object->GetInternalField(0).As<v8::External>()->Value();
206
+ if (ptr == nullptr) {
207
+ return nullptr;
208
+ }
209
+ return static_cast<MasonStyleImpl *>(ptr);
210
+ }
211
+
212
+ v8::Local<v8::FunctionTemplate> MasonStyleImpl::GetCtor(v8::Isolate *isolate) {
213
+ auto cache = Caches::Get(isolate);
214
+ auto ctor = cache->MasonStyleTmpl.get();
215
+ if (ctor != nullptr) {
216
+ return ctor->Get(isolate);
217
+ }
218
+
219
+ v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate, nullptr);
220
+
221
+ ctorTmpl->InstanceTemplate()->SetInternalFieldCount(1);
222
+ ctorTmpl->SetClassName(Helpers::ConvertToV8String(isolate, "NSCMasonStyle"));
223
+
224
+ auto tmpl = ctorTmpl->InstanceTemplate();
225
+ tmpl->SetInternalFieldCount(1);
226
+
227
+
228
+ tmpl->SetAccessor(
229
+ Helpers::ConvertToV8String(isolate, "display"),
230
+ &GetDisplay,
231
+ &SetDisplay
232
+ );
233
+
234
+
235
+ tmpl->SetAccessor(
236
+ Helpers::ConvertToV8String(isolate, "scrollbarWidth"),
237
+ &GetScrollbarWidth,
238
+ &SetScrollbarWidth
239
+ );
240
+
241
+
242
+ tmpl->SetAccessor(
243
+ Helpers::ConvertToV8String(isolate, "overflow"),
244
+ nullptr,
245
+ &SetOverflow
246
+ );
247
+
248
+ tmpl->SetAccessor(
249
+ Helpers::ConvertToV8String(isolate, "overflowX"),
250
+ &GetOverflowX,
251
+ &SetOverflowX
252
+ );
253
+
254
+ tmpl->SetAccessor(
255
+ Helpers::ConvertToV8String(isolate, "overflowY"),
256
+ &GetOverflowY,
257
+ &SetOverflowY
258
+ );
259
+
260
+ tmpl->SetAccessor(
261
+ Helpers::ConvertToV8String(isolate, "position"),
262
+ &GetPosition,
263
+ &SetPosition
264
+ );
265
+
266
+
267
+ tmpl->SetAccessor(
268
+ Helpers::ConvertToV8String(isolate, "flexWrap"),
269
+ &GetFlexWrap,
270
+ &SetFlexWrap
271
+ );
272
+
273
+ tmpl->SetAccessor(
274
+ Helpers::ConvertToV8String(isolate, "alignItems"),
275
+ &GetAlignItems,
276
+ &SetAlignItems
277
+ );
278
+
279
+
280
+ tmpl->SetAccessor(
281
+ Helpers::ConvertToV8String(isolate, "alignContent"),
282
+ &GetAlignContent,
283
+ &SetAlignContent
284
+ );
285
+
286
+
287
+ tmpl->SetAccessor(
288
+ Helpers::ConvertToV8String(isolate, "alignSelf"),
289
+ &GetAlignSelf,
290
+ &SetAlignSelf
291
+ );
292
+
293
+
294
+ tmpl->SetAccessor(
295
+ Helpers::ConvertToV8String(isolate, "justifyItems"),
296
+ &GetJustifyItems,
297
+ &SetJustifyItems
298
+ );
299
+
300
+
301
+ tmpl->SetAccessor(
302
+ Helpers::ConvertToV8String(isolate, "justifyContent"),
303
+ &GetJustifyContent,
304
+ &SetJustifyContent
305
+ );
306
+
307
+
308
+ tmpl->SetAccessor(
309
+ Helpers::ConvertToV8String(isolate, "justifySelf"),
310
+ &GetJustifySelf,
311
+ &SetJustifySelf
312
+ );
313
+
314
+
315
+ cache->MasonStyleTmpl =
316
+ std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
317
+
318
+ return ctorTmpl;
319
+
320
+ }
321
+
322
+ MasonStyleImpl::MasonStyleImpl(void *style) : style_(style) {}
323
+
324
+
325
+ void MasonStyleImpl::GetDisplay(v8::Local<v8::String> property,
326
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
327
+ MasonStyleImpl *ptr = GetPointer(info.This());
328
+ if (ptr == nullptr) {
329
+ info.GetReturnValue().Set(0);
330
+ return;
331
+ }
332
+
333
+ auto ret = mason_style_get_display(ptr->style_);
334
+
335
+ info.GetReturnValue().Set(ret);
336
+
337
+ }
338
+
339
+ void MasonStyleImpl::SetDisplay(v8::Local<v8::String> property,
340
+ v8::Local<v8::Value> value,
341
+ const v8::PropertyCallbackInfo<void> &info) {
342
+ MasonStyleImpl *ptr = GetPointer(info.This());
343
+ if (ptr == nullptr) {
344
+ return;
345
+ }
346
+ auto isolate = info.GetIsolate();
347
+ auto context = isolate->GetCurrentContext();
348
+ auto val = value->Int32Value(context).ToChecked();
349
+ mason_style_set_display(ptr->style_, val);
350
+ }
351
+
352
+
353
+ void MasonStyleImpl::GetScrollbarWidth(v8::Local<v8::String> property,
354
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
355
+ MasonStyleImpl *ptr = GetPointer(info.This());
356
+ if (ptr == nullptr) {
357
+ info.GetReturnValue().Set(0);
358
+ return;
359
+ }
360
+
361
+ auto ret = mason_style_get_scrollbar_width(ptr->style_);
362
+
363
+ info.GetReturnValue().Set((double) ret);
364
+
365
+ }
366
+
367
+ void MasonStyleImpl::SetScrollbarWidth(v8::Local<v8::String> property,
368
+ v8::Local<v8::Value> value,
369
+ const v8::PropertyCallbackInfo<void> &info) {
370
+ MasonStyleImpl *ptr = GetPointer(info.This());
371
+ if (ptr == nullptr) {
372
+ return;
373
+ }
374
+ auto isolate = info.GetIsolate();
375
+ auto context = isolate->GetCurrentContext();
376
+ auto val = (float) value->NumberValue(context).ToChecked();
377
+ mason_style_set_scrollbar_width(ptr->style_, val);
378
+ }
379
+
380
+
381
+ void MasonStyleImpl::GetOverflow(v8::Local<v8::String> property,
382
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
383
+
384
+
385
+ }
386
+
387
+ void MasonStyleImpl::SetOverflow(v8::Local<v8::String> property,
388
+ v8::Local<v8::Value> value,
389
+ const v8::PropertyCallbackInfo<void> &info) {
390
+ MasonStyleImpl *ptr = GetPointer(info.This());
391
+ if (ptr == nullptr) {
392
+ return;
393
+ }
394
+ auto isolate = info.GetIsolate();
395
+ auto context = isolate->GetCurrentContext();
396
+ auto val = value->Int32Value(context).ToChecked();
397
+ mason_style_set_overflow(ptr->style_, val);
398
+ }
399
+
400
+ void MasonStyleImpl::GetOverflowX(v8::Local<v8::String> property,
401
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
402
+ MasonStyleImpl *ptr = GetPointer(info.This());
403
+ if (ptr == nullptr) {
404
+ info.GetReturnValue().Set(0);
405
+ return;
406
+ }
407
+
408
+ auto ret = mason_style_get_overflow_x(ptr->style_);
409
+
410
+ info.GetReturnValue().Set((double) ret);
411
+
412
+ }
413
+
414
+ void MasonStyleImpl::SetOverflowX(v8::Local<v8::String> property,
415
+ v8::Local<v8::Value> value,
416
+ const v8::PropertyCallbackInfo<void> &info) {
417
+ MasonStyleImpl *ptr = GetPointer(info.This());
418
+ if (ptr == nullptr) {
419
+ return;
420
+ }
421
+ auto isolate = info.GetIsolate();
422
+ auto context = isolate->GetCurrentContext();
423
+ auto val = value->Int32Value(context).ToChecked();
424
+ mason_style_set_overflow_x(ptr->style_, val);
425
+ }
426
+
427
+ void MasonStyleImpl::GetOverflowY(v8::Local<v8::String> property,
428
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
429
+ MasonStyleImpl *ptr = GetPointer(info.This());
430
+ if (ptr == nullptr) {
431
+ info.GetReturnValue().Set(0);
432
+ return;
433
+ }
434
+
435
+ auto ret = mason_style_get_overflow_y(ptr->style_);
436
+
437
+ info.GetReturnValue().Set((double) ret);
438
+
439
+ }
440
+
441
+ void MasonStyleImpl::SetOverflowY(v8::Local<v8::String> property,
442
+ v8::Local<v8::Value> value,
443
+ const v8::PropertyCallbackInfo<void> &info) {
444
+ MasonStyleImpl *ptr = GetPointer(info.This());
445
+ if (ptr == nullptr) {
446
+ return;
447
+ }
448
+ auto isolate = info.GetIsolate();
449
+ auto context = isolate->GetCurrentContext();
450
+ auto val = value->Int32Value(context).ToChecked();
451
+ mason_style_set_overflow_y(ptr->style_, val);
452
+ }
453
+
454
+ void MasonStyleImpl::GetPosition(v8::Local<v8::String> property,
455
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
456
+ MasonStyleImpl *ptr = GetPointer(info.This());
457
+ if (ptr == nullptr) {
458
+ info.GetReturnValue().Set(0);
459
+ return;
460
+ }
461
+
462
+ auto ret = mason_style_get_position(ptr->style_);
463
+
464
+ info.GetReturnValue().Set(ret);
465
+
466
+ }
467
+
468
+ void MasonStyleImpl::SetPosition(v8::Local<v8::String> property,
469
+ v8::Local<v8::Value> value,
470
+ const v8::PropertyCallbackInfo<void> &info) {
471
+ MasonStyleImpl *ptr = GetPointer(info.This());
472
+ if (ptr == nullptr) {
473
+ return;
474
+ }
475
+ auto isolate = info.GetIsolate();
476
+ auto context = isolate->GetCurrentContext();
477
+ auto val = value->Int32Value(context).ToChecked();
478
+ mason_style_set_position(ptr->style_, val);
479
+ }
480
+
481
+ void MasonStyleImpl::GetFlexWrap(v8::Local<v8::String> property,
482
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
483
+ MasonStyleImpl *ptr = GetPointer(info.This());
484
+ if (ptr == nullptr) {
485
+ info.GetReturnValue().Set(0);
486
+ return;
487
+ }
488
+
489
+ auto ret = mason_style_get_flex_wrap(ptr->style_);
490
+
491
+ info.GetReturnValue().Set(ret);
492
+
493
+ }
494
+
495
+ void MasonStyleImpl::SetFlexWrap(v8::Local<v8::String> property,
496
+ v8::Local<v8::Value> value,
497
+ const v8::PropertyCallbackInfo<void> &info) {
498
+ MasonStyleImpl *ptr = GetPointer(info.This());
499
+ if (ptr == nullptr) {
500
+ return;
501
+ }
502
+ auto isolate = info.GetIsolate();
503
+ auto context = isolate->GetCurrentContext();
504
+ auto val = value->Int32Value(context).ToChecked();
505
+ mason_style_set_flex_wrap(ptr->style_, val);
506
+ }
507
+
508
+ void MasonStyleImpl::GetAlignItems(v8::Local<v8::String> property,
509
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
510
+ MasonStyleImpl *ptr = GetPointer(info.This());
511
+ if (ptr == nullptr) {
512
+ info.GetReturnValue().Set(0);
513
+ return;
514
+ }
515
+
516
+ auto ret = mason_style_get_align_items(ptr->style_);
517
+
518
+ info.GetReturnValue().Set(ret);
519
+
520
+ }
521
+
522
+ void MasonStyleImpl::SetAlignItems(v8::Local<v8::String> property,
523
+ v8::Local<v8::Value> value,
524
+ const v8::PropertyCallbackInfo<void> &info) {
525
+ MasonStyleImpl *ptr = GetPointer(info.This());
526
+ if (ptr == nullptr) {
527
+ return;
528
+ }
529
+ auto isolate = info.GetIsolate();
530
+ auto context = isolate->GetCurrentContext();
531
+ auto val = value->Int32Value(context).ToChecked();
532
+ mason_style_set_align_items(ptr->style_, val);
533
+ }
534
+
535
+ void MasonStyleImpl::GetAlignContent(v8::Local<v8::String> property,
536
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
537
+ MasonStyleImpl *ptr = GetPointer(info.This());
538
+ if (ptr == nullptr) {
539
+ info.GetReturnValue().Set(0);
540
+ return;
541
+ }
542
+
543
+ auto ret = mason_style_get_align_content(ptr->style_);
544
+
545
+ info.GetReturnValue().Set(ret);
546
+
547
+ }
548
+
549
+ void MasonStyleImpl::SetAlignContent(v8::Local<v8::String> property,
550
+ v8::Local<v8::Value> value,
551
+ const v8::PropertyCallbackInfo<void> &info) {
552
+ MasonStyleImpl *ptr = GetPointer(info.This());
553
+ if (ptr == nullptr) {
554
+ return;
555
+ }
556
+ auto isolate = info.GetIsolate();
557
+ auto context = isolate->GetCurrentContext();
558
+ auto val = value->Int32Value(context).ToChecked();
559
+ mason_style_set_align_content(ptr->style_, val);
560
+ }
561
+
562
+ void MasonStyleImpl::GetAlignSelf(v8::Local<v8::String> property,
563
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
564
+ MasonStyleImpl *ptr = GetPointer(info.This());
565
+ if (ptr == nullptr) {
566
+ info.GetReturnValue().Set(0);
567
+ return;
568
+ }
569
+
570
+ auto ret = mason_style_get_align_self(ptr->style_);
571
+
572
+ info.GetReturnValue().Set(ret);
573
+
574
+ }
575
+
576
+ void MasonStyleImpl::SetAlignSelf(v8::Local<v8::String> property,
577
+ v8::Local<v8::Value> value,
578
+ const v8::PropertyCallbackInfo<void> &info) {
579
+ MasonStyleImpl *ptr = GetPointer(info.This());
580
+ if (ptr == nullptr) {
581
+ return;
582
+ }
583
+ auto isolate = info.GetIsolate();
584
+ auto context = isolate->GetCurrentContext();
585
+ auto val = value->Int32Value(context).ToChecked();
586
+ mason_style_set_align_self(ptr->style_, val);
587
+ }
588
+
589
+ void MasonStyleImpl::GetJustifyItems(v8::Local<v8::String> property,
590
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
591
+ MasonStyleImpl *ptr = GetPointer(info.This());
592
+ if (ptr == nullptr) {
593
+ info.GetReturnValue().Set(0);
594
+ return;
595
+ }
596
+
597
+ auto ret = mason_style_get_justify_items(ptr->style_);
598
+
599
+ info.GetReturnValue().Set(ret);
600
+
601
+ }
602
+
603
+ void MasonStyleImpl::SetJustifyItems(v8::Local<v8::String> property,
604
+ v8::Local<v8::Value> value,
605
+ const v8::PropertyCallbackInfo<void> &info) {
606
+ MasonStyleImpl *ptr = GetPointer(info.This());
607
+ if (ptr == nullptr) {
608
+ return;
609
+ }
610
+ auto isolate = info.GetIsolate();
611
+ auto context = isolate->GetCurrentContext();
612
+ auto val = value->Int32Value(context).ToChecked();
613
+ mason_style_set_justify_items(ptr->style_, val);
614
+ }
615
+
616
+
617
+ void MasonStyleImpl::GetJustifyContent(v8::Local<v8::String> property,
618
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
619
+ MasonStyleImpl *ptr = GetPointer(info.This());
620
+ if (ptr == nullptr) {
621
+ info.GetReturnValue().Set(0);
622
+ return;
623
+ }
624
+
625
+ auto ret = mason_style_get_justify_content(ptr->style_);
626
+
627
+ info.GetReturnValue().Set(ret);
628
+
629
+ }
630
+
631
+ void MasonStyleImpl::SetJustifyContent(v8::Local<v8::String> property,
632
+ v8::Local<v8::Value> value,
633
+ const v8::PropertyCallbackInfo<void> &info) {
634
+ MasonStyleImpl *ptr = GetPointer(info.This());
635
+ if (ptr == nullptr) {
636
+ return;
637
+ }
638
+ auto isolate = info.GetIsolate();
639
+ auto context = isolate->GetCurrentContext();
640
+ auto val = value->Int32Value(context).ToChecked();
641
+ mason_style_set_justify_content(ptr->style_, val);
642
+ }
643
+
644
+ void MasonStyleImpl::GetJustifySelf(v8::Local<v8::String> property,
645
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
646
+ MasonStyleImpl *ptr = GetPointer(info.This());
647
+ if (ptr == nullptr) {
648
+ info.GetReturnValue().Set(0);
649
+ return;
650
+ }
651
+
652
+ auto ret = mason_style_get_justify_self(ptr->style_);
653
+
654
+ info.GetReturnValue().Set(ret);
655
+
656
+ }
657
+
658
+ void MasonStyleImpl::SetJustifySelf(v8::Local<v8::String> property,
659
+ v8::Local<v8::Value> value,
660
+ const v8::PropertyCallbackInfo<void> &info) {
661
+ MasonStyleImpl *ptr = GetPointer(info.This());
662
+ if (ptr == nullptr) {
663
+ return;
664
+ }
665
+ auto isolate = info.GetIsolate();
666
+ auto context = isolate->GetCurrentContext();
667
+ auto val = value->Int32Value(context).ToChecked();
668
+ mason_style_set_justify_self(ptr->style_, val);
669
+ }
670
+
671
+ void MasonStyleImpl::GetInset(v8::Local<v8::String> property,
672
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
673
+
674
+
675
+ }
676
+
677
+ void MasonStyleImpl::SetInset(v8::Local<v8::String> property,
678
+ v8::Local<v8::Value> value,
679
+ const v8::PropertyCallbackInfo<void> &info) {
680
+ // MasonStyleImpl *ptr = GetPointer(info.This());
681
+ // if (ptr == nullptr) {
682
+ // return;
683
+ // }
684
+ // auto isolate = info.GetIsolate();
685
+ // auto context = isolate->GetCurrentContext();
686
+ // auto val = value->Int32Value(context).ToChecked();
687
+ // mason_style_set_inset(ptr->style_, val);
688
+ }
689
+
690
+
691
+ void MasonStyleImpl::GetInsetLeft(v8::Local<v8::String> property,
692
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
693
+ MasonStyleImpl *ptr = GetPointer(info.This());
694
+ if (ptr == nullptr) {
695
+ info.GetReturnValue().Set(0);
696
+ return;
697
+ }
698
+
699
+ auto ret = mason_style_get_inset_left(ptr->style_);
700
+
701
+ info.GetReturnValue().Set(ret);
702
+
703
+ }
704
+
705
+ void MasonStyleImpl::SetInsetLeft(v8::Local<v8::String> property,
706
+ v8::Local<v8::Value> value,
707
+ const v8::PropertyCallbackInfo<void> &info) {
708
+ MasonStyleImpl *ptr = GetPointer(info.This());
709
+ if (ptr == nullptr) {
710
+ return;
711
+ }
712
+ auto isolate = info.GetIsolate();
713
+ auto context = isolate->GetCurrentContext();
714
+ auto val = value->Int32Value(context).ToChecked();
715
+ mason_style_set_inset_left(ptr->style_, val);
716
+ }
717
+
718
+
719
+ void MasonStyleImpl::GetInsetTop(v8::Local<v8::String> property,
720
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
721
+ MasonStyleImpl *ptr = GetPointer(info.This());
722
+ if (ptr == nullptr) {
723
+ info.GetReturnValue().Set(0);
724
+ return;
725
+ }
726
+
727
+ auto ret = mason_style_get_inset_top(ptr->style_);
728
+
729
+ info.GetReturnValue().Set(ret);
730
+
731
+ }
732
+
733
+ void MasonStyleImpl::SetInsetTop(v8::Local<v8::String> property,
734
+ v8::Local<v8::Value> value,
735
+ const v8::PropertyCallbackInfo<void> &info) {
736
+ MasonStyleImpl *ptr = GetPointer(info.This());
737
+ if (ptr == nullptr) {
738
+ return;
739
+ }
740
+ auto isolate = info.GetIsolate();
741
+ auto context = isolate->GetCurrentContext();
742
+ auto val = value->Int32Value(context).ToChecked();
743
+ mason_style_set_inset_top(ptr->style_, val);
744
+ }
745
+
746
+
747
+ void MasonStyleImpl::GetInsetRight(v8::Local<v8::String> property,
748
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
749
+ MasonStyleImpl *ptr = GetPointer(info.This());
750
+ if (ptr == nullptr) {
751
+ info.GetReturnValue().Set(0);
752
+ return;
753
+ }
754
+
755
+ auto ret = mason_style_get_inset_right(ptr->style_);
756
+
757
+ info.GetReturnValue().Set(ret);
758
+
759
+ }
760
+
761
+ void MasonStyleImpl::SetInsetRight(v8::Local<v8::String> property,
762
+ v8::Local<v8::Value> value,
763
+ const v8::PropertyCallbackInfo<void> &info) {
764
+ MasonStyleImpl *ptr = GetPointer(info.This());
765
+ if (ptr == nullptr) {
766
+ return;
767
+ }
768
+ auto isolate = info.GetIsolate();
769
+ auto context = isolate->GetCurrentContext();
770
+ auto val = value->Int32Value(context).ToChecked();
771
+ mason_style_set_inset_right(ptr->style_, val);
772
+ }
773
+
774
+
775
+ void MasonStyleImpl::GetInsetBottom(v8::Local<v8::String> property,
776
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
777
+ MasonStyleImpl *ptr = GetPointer(info.This());
778
+ if (ptr == nullptr) {
779
+ info.GetReturnValue().Set(0);
780
+ return;
781
+ }
782
+
783
+ auto ret = mason_style_get_inset_bottom(ptr->style_);
784
+
785
+ info.GetReturnValue().Set(ret);
786
+
787
+ }
788
+
789
+ void MasonStyleImpl::SetInsetBottom(v8::Local<v8::String> property,
790
+ v8::Local<v8::Value> value,
791
+ const v8::PropertyCallbackInfo<void> &info) {
792
+ MasonStyleImpl *ptr = GetPointer(info.This());
793
+ if (ptr == nullptr) {
794
+ return;
795
+ }
796
+ auto isolate = info.GetIsolate();
797
+ auto context = isolate->GetCurrentContext();
798
+ auto val = value->Int32Value(context).ToChecked();
799
+ mason_style_set_inset_bottom(ptr->style_, val);
800
+ }
801
+
802
+
803
+ void MasonStyleImpl::GetMargin(v8::Local<v8::String> property,
804
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
805
+
806
+
807
+ }
808
+
809
+ void MasonStyleImpl::SetMargin(v8::Local<v8::String> property,
810
+ v8::Local<v8::Value> value,
811
+ const v8::PropertyCallbackInfo<void> &info) {
812
+ // MasonStyleImpl *ptr = GetPointer(info.This());
813
+ // if (ptr == nullptr) {
814
+ // return;
815
+ // }
816
+ // auto isolate = info.GetIsolate();
817
+ // auto context = isolate->GetCurrentContext();
818
+ // auto val = value->Int32Value(context).ToChecked();
819
+ // mason_style_set_Margin(ptr->style_, val);
820
+ }
821
+
822
+
823
+ void MasonStyleImpl::GetMarginLeft(v8::Local<v8::String> property,
824
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
825
+ MasonStyleImpl *ptr = GetPointer(info.This());
826
+ if (ptr == nullptr) {
827
+ info.GetReturnValue().Set(0);
828
+ return;
829
+ }
830
+
831
+ auto ret = mason_style_get_margin_left(ptr->style_);
832
+
833
+ info.GetReturnValue().Set(ret);
834
+
835
+ }
836
+
837
+ void MasonStyleImpl::SetMarginLeft(v8::Local<v8::String> property,
838
+ v8::Local<v8::Value> value,
839
+ const v8::PropertyCallbackInfo<void> &info) {
840
+ MasonStyleImpl *ptr = GetPointer(info.This());
841
+ if (ptr == nullptr) {
842
+ return;
843
+ }
844
+ auto isolate = info.GetIsolate();
845
+ auto context = isolate->GetCurrentContext();
846
+ auto val = value->Int32Value(context).ToChecked();
847
+ mason_style_set_margin_left(ptr->style_, val);
848
+ }
849
+
850
+
851
+ void MasonStyleImpl::GetMarginTop(v8::Local<v8::String> property,
852
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
853
+ MasonStyleImpl *ptr = GetPointer(info.This());
854
+ if (ptr == nullptr) {
855
+ info.GetReturnValue().Set(0);
856
+ return;
857
+ }
858
+
859
+ auto ret = mason_style_get_margin_top(ptr->style_);
860
+
861
+ info.GetReturnValue().Set(ret);
862
+
863
+ }
864
+
865
+ void MasonStyleImpl::SetMarginTop(v8::Local<v8::String> property,
866
+ v8::Local<v8::Value> value,
867
+ const v8::PropertyCallbackInfo<void> &info) {
868
+ MasonStyleImpl *ptr = GetPointer(info.This());
869
+ if (ptr == nullptr) {
870
+ return;
871
+ }
872
+ auto isolate = info.GetIsolate();
873
+ auto context = isolate->GetCurrentContext();
874
+ auto val = value->Int32Value(context).ToChecked();
875
+ mason_style_set_margin_top(ptr->style_, val);
876
+ }
877
+
878
+
879
+ void MasonStyleImpl::GetMarginRight(v8::Local<v8::String> property,
880
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
881
+ MasonStyleImpl *ptr = GetPointer(info.This());
882
+ if (ptr == nullptr) {
883
+ info.GetReturnValue().Set(0);
884
+ return;
885
+ }
886
+
887
+ auto ret = mason_style_get_margin_right(ptr->style_);
888
+
889
+ info.GetReturnValue().Set(ret);
890
+
891
+ }
892
+
893
+ void MasonStyleImpl::SetMarginRight(v8::Local<v8::String> property,
894
+ v8::Local<v8::Value> value,
895
+ const v8::PropertyCallbackInfo<void> &info) {
896
+ MasonStyleImpl *ptr = GetPointer(info.This());
897
+ if (ptr == nullptr) {
898
+ return;
899
+ }
900
+ auto isolate = info.GetIsolate();
901
+ auto context = isolate->GetCurrentContext();
902
+ auto val = value->Int32Value(context).ToChecked();
903
+ mason_style_set_margin_right(ptr->style_, val);
904
+ }
905
+
906
+
907
+ void MasonStyleImpl::GetMarginBottom(v8::Local<v8::String> property,
908
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
909
+ MasonStyleImpl *ptr = GetPointer(info.This());
910
+ if (ptr == nullptr) {
911
+ info.GetReturnValue().Set(0);
912
+ return;
913
+ }
914
+
915
+ auto ret = mason_style_get_margin_bottom(ptr->style_);
916
+
917
+ info.GetReturnValue().Set(ret);
918
+
919
+ }
920
+
921
+ void MasonStyleImpl::SetMarginBottom(v8::Local<v8::String> property,
922
+ v8::Local<v8::Value> value,
923
+ const v8::PropertyCallbackInfo<void> &info) {
924
+ MasonStyleImpl *ptr = GetPointer(info.This());
925
+ if (ptr == nullptr) {
926
+ return;
927
+ }
928
+ auto isolate = info.GetIsolate();
929
+ auto context = isolate->GetCurrentContext();
930
+ auto val = value->Int32Value(context).ToChecked();
931
+ mason_style_set_margin_bottom(ptr->style_, val);
932
+ }
933
+
934
+
935
+ void MasonStyleImpl::GetPadding(v8::Local<v8::String> property,
936
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
937
+
938
+
939
+ }
940
+
941
+ void MasonStyleImpl::SetPadding(v8::Local<v8::String> property,
942
+ v8::Local<v8::Value> value,
943
+ const v8::PropertyCallbackInfo<void> &info) {
944
+ // MasonStyleImpl *ptr = GetPointer(info.This());
945
+ // if (ptr == nullptr) {
946
+ // return;
947
+ // }
948
+ // auto isolate = info.GetIsolate();
949
+ // auto context = isolate->GetCurrentContext();
950
+ // auto val = value->Int32Value(context).ToChecked();
951
+ // mason_style_set_Padding(ptr->style_, val);
952
+ }
953
+
954
+
955
+ void MasonStyleImpl::GetPaddingLeft(v8::Local<v8::String> property,
956
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
957
+ MasonStyleImpl *ptr = GetPointer(info.This());
958
+ if (ptr == nullptr) {
959
+ info.GetReturnValue().Set(0);
960
+ return;
961
+ }
962
+
963
+ auto ret = mason_style_get_padding_left(ptr->style_);
964
+
965
+ info.GetReturnValue().Set(ret);
966
+
967
+ }
968
+
969
+ void MasonStyleImpl::SetPaddingLeft(v8::Local<v8::String> property,
970
+ v8::Local<v8::Value> value,
971
+ const v8::PropertyCallbackInfo<void> &info) {
972
+ MasonStyleImpl *ptr = GetPointer(info.This());
973
+ if (ptr == nullptr) {
974
+ return;
975
+ }
976
+ auto isolate = info.GetIsolate();
977
+ auto context = isolate->GetCurrentContext();
978
+ auto val = value->Int32Value(context).ToChecked();
979
+ mason_style_set_padding_left(ptr->style_, val);
980
+ }
981
+
982
+
983
+ void MasonStyleImpl::GetPaddingTop(v8::Local<v8::String> property,
984
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
985
+ MasonStyleImpl *ptr = GetPointer(info.This());
986
+ if (ptr == nullptr) {
987
+ info.GetReturnValue().Set(0);
988
+ return;
989
+ }
990
+
991
+ auto ret = mason_style_get_padding_top(ptr->style_);
992
+
993
+ info.GetReturnValue().Set(ret);
994
+
995
+ }
996
+
997
+ void MasonStyleImpl::SetPaddingTop(v8::Local<v8::String> property,
998
+ v8::Local<v8::Value> value,
999
+ const v8::PropertyCallbackInfo<void> &info) {
1000
+ MasonStyleImpl *ptr = GetPointer(info.This());
1001
+ if (ptr == nullptr) {
1002
+ return;
1003
+ }
1004
+ auto isolate = info.GetIsolate();
1005
+ auto context = isolate->GetCurrentContext();
1006
+ auto val = value->Int32Value(context).ToChecked();
1007
+ mason_style_set_padding_top(ptr->style_, val);
1008
+ }
1009
+
1010
+
1011
+ void MasonStyleImpl::GetPaddingRight(v8::Local<v8::String> property,
1012
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1013
+ MasonStyleImpl *ptr = GetPointer(info.This());
1014
+ if (ptr == nullptr) {
1015
+ info.GetReturnValue().Set(0);
1016
+ return;
1017
+ }
1018
+
1019
+ auto ret = mason_style_get_padding_right(ptr->style_);
1020
+
1021
+ info.GetReturnValue().Set(ret);
1022
+
1023
+ }
1024
+
1025
+ void MasonStyleImpl::SetPaddingRight(v8::Local<v8::String> property,
1026
+ v8::Local<v8::Value> value,
1027
+ const v8::PropertyCallbackInfo<void> &info) {
1028
+ MasonStyleImpl *ptr = GetPointer(info.This());
1029
+ if (ptr == nullptr) {
1030
+ return;
1031
+ }
1032
+ auto isolate = info.GetIsolate();
1033
+ auto context = isolate->GetCurrentContext();
1034
+ auto val = value->Int32Value(context).ToChecked();
1035
+ mason_style_set_padding_right(ptr->style_, val);
1036
+ }
1037
+
1038
+
1039
+ void MasonStyleImpl::GetPaddingBottom(v8::Local<v8::String> property,
1040
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1041
+ MasonStyleImpl *ptr = GetPointer(info.This());
1042
+ if (ptr == nullptr) {
1043
+ info.GetReturnValue().Set(0);
1044
+ return;
1045
+ }
1046
+
1047
+ auto ret = mason_style_get_padding_bottom(ptr->style_);
1048
+
1049
+ info.GetReturnValue().Set(ret);
1050
+
1051
+ }
1052
+
1053
+ void MasonStyleImpl::SetPaddingBottom(v8::Local<v8::String> property,
1054
+ v8::Local<v8::Value> value,
1055
+ const v8::PropertyCallbackInfo<void> &info) {
1056
+ MasonStyleImpl *ptr = GetPointer(info.This());
1057
+ if (ptr == nullptr) {
1058
+ return;
1059
+ }
1060
+ auto isolate = info.GetIsolate();
1061
+ auto context = isolate->GetCurrentContext();
1062
+ auto val = value->Int32Value(context).ToChecked();
1063
+ mason_style_set_padding_bottom(ptr->style_, val);
1064
+ }
1065
+
1066
+
1067
+ void MasonStyleImpl::GetBorder(v8::Local<v8::String> property,
1068
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1069
+
1070
+
1071
+ }
1072
+
1073
+ void MasonStyleImpl::SetBorder(v8::Local<v8::String> property,
1074
+ v8::Local<v8::Value> value,
1075
+ const v8::PropertyCallbackInfo<void> &info) {
1076
+ // MasonStyleImpl *ptr = GetPointer(info.This());
1077
+ // if (ptr == nullptr) {
1078
+ // return;
1079
+ // }
1080
+ // auto isolate = info.GetIsolate();
1081
+ // auto context = isolate->GetCurrentContext();
1082
+ // auto val = value->Int32Value(context).ToChecked();
1083
+ // mason_style_set_Border(ptr->style_, val);
1084
+ }
1085
+
1086
+
1087
+ void MasonStyleImpl::GetBorderLeft(v8::Local<v8::String> property,
1088
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1089
+ MasonStyleImpl *ptr = GetPointer(info.This());
1090
+ if (ptr == nullptr) {
1091
+ info.GetReturnValue().Set(0);
1092
+ return;
1093
+ }
1094
+
1095
+ auto ret = mason_style_get_border_left(ptr->style_);
1096
+
1097
+ info.GetReturnValue().Set(ret);
1098
+
1099
+ }
1100
+
1101
+ void MasonStyleImpl::SetBorderLeft(v8::Local<v8::String> property,
1102
+ v8::Local<v8::Value> value,
1103
+ const v8::PropertyCallbackInfo<void> &info) {
1104
+ MasonStyleImpl *ptr = GetPointer(info.This());
1105
+ if (ptr == nullptr) {
1106
+ return;
1107
+ }
1108
+ auto isolate = info.GetIsolate();
1109
+ auto context = isolate->GetCurrentContext();
1110
+ auto val = value->Int32Value(context).ToChecked();
1111
+ mason_style_set_border_left(ptr->style_, val);
1112
+ }
1113
+
1114
+
1115
+ void MasonStyleImpl::GetBorderTop(v8::Local<v8::String> property,
1116
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1117
+ MasonStyleImpl *ptr = GetPointer(info.This());
1118
+ if (ptr == nullptr) {
1119
+ info.GetReturnValue().Set(0);
1120
+ return;
1121
+ }
1122
+
1123
+ auto ret = mason_style_get_border_top(ptr->style_);
1124
+
1125
+ info.GetReturnValue().Set(ret);
1126
+
1127
+ }
1128
+
1129
+ void MasonStyleImpl::SetBorderTop(v8::Local<v8::String> property,
1130
+ v8::Local<v8::Value> value,
1131
+ const v8::PropertyCallbackInfo<void> &info) {
1132
+ MasonStyleImpl *ptr = GetPointer(info.This());
1133
+ if (ptr == nullptr) {
1134
+ return;
1135
+ }
1136
+ auto isolate = info.GetIsolate();
1137
+ auto context = isolate->GetCurrentContext();
1138
+ auto val = value->Int32Value(context).ToChecked();
1139
+ mason_style_set_border_top(ptr->style_, val);
1140
+ }
1141
+
1142
+
1143
+ void MasonStyleImpl::GetBorderRight(v8::Local<v8::String> property,
1144
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1145
+ MasonStyleImpl *ptr = GetPointer(info.This());
1146
+ if (ptr == nullptr) {
1147
+ info.GetReturnValue().Set(0);
1148
+ return;
1149
+ }
1150
+
1151
+ auto ret = mason_style_get_border_right(ptr->style_);
1152
+
1153
+ info.GetReturnValue().Set(ret);
1154
+
1155
+ }
1156
+
1157
+ void MasonStyleImpl::SetBorderRight(v8::Local<v8::String> property,
1158
+ v8::Local<v8::Value> value,
1159
+ const v8::PropertyCallbackInfo<void> &info) {
1160
+ MasonStyleImpl *ptr = GetPointer(info.This());
1161
+ if (ptr == nullptr) {
1162
+ return;
1163
+ }
1164
+ auto isolate = info.GetIsolate();
1165
+ auto context = isolate->GetCurrentContext();
1166
+ auto val = value->Int32Value(context).ToChecked();
1167
+ mason_style_set_border_right(ptr->style_, val);
1168
+ }
1169
+
1170
+
1171
+ void MasonStyleImpl::GetBorderBottom(v8::Local<v8::String> property,
1172
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1173
+ MasonStyleImpl *ptr = GetPointer(info.This());
1174
+ if (ptr == nullptr) {
1175
+ info.GetReturnValue().Set(0);
1176
+ return;
1177
+ }
1178
+
1179
+ auto ret = mason_style_get_border_bottom(ptr->style_);
1180
+
1181
+ info.GetReturnValue().Set(ret);
1182
+
1183
+ }
1184
+
1185
+ void MasonStyleImpl::SetBorderBottom(v8::Local<v8::String> property,
1186
+ v8::Local<v8::Value> value,
1187
+ const v8::PropertyCallbackInfo<void> &info) {
1188
+ MasonStyleImpl *ptr = GetPointer(info.This());
1189
+ if (ptr == nullptr) {
1190
+ return;
1191
+ }
1192
+ auto isolate = info.GetIsolate();
1193
+ auto context = isolate->GetCurrentContext();
1194
+ auto val = value->Int32Value(context).ToChecked();
1195
+ mason_style_set_border_bottom(ptr->style_, val);
1196
+ }
1197
+
1198
+
1199
+ void MasonStyleImpl::GetBorder(v8::Local<v8::String> property,
1200
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1201
+
1202
+
1203
+ }
1204
+
1205
+ void MasonStyleImpl::SetBorder(v8::Local<v8::String> property,
1206
+ v8::Local<v8::Value> value,
1207
+ const v8::PropertyCallbackInfo<void> &info) {
1208
+ // MasonStyleImpl *ptr = GetPointer(info.This());
1209
+ // if (ptr == nullptr) {
1210
+ // return;
1211
+ // }
1212
+ // auto isolate = info.GetIsolate();
1213
+ // auto context = isolate->GetCurrentContext();
1214
+ // auto val = value->Int32Value(context).ToChecked();
1215
+ // mason_style_set_Border(ptr->style_, val);
1216
+ }
1217
+
1218
+
1219
+ void MasonStyleImpl::GetBorderLeft(v8::Local<v8::String> property,
1220
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1221
+ MasonStyleImpl *ptr = GetPointer(info.This());
1222
+ if (ptr == nullptr) {
1223
+ info.GetReturnValue().Set(0);
1224
+ return;
1225
+ }
1226
+
1227
+ auto ret = mason_style_get_border_left(ptr->style_);
1228
+
1229
+ info.GetReturnValue().Set(ret);
1230
+
1231
+ }
1232
+
1233
+ void MasonStyleImpl::SetBorderLeft(v8::Local<v8::String> property,
1234
+ v8::Local<v8::Value> value,
1235
+ const v8::PropertyCallbackInfo<void> &info) {
1236
+ MasonStyleImpl *ptr = GetPointer(info.This());
1237
+ if (ptr == nullptr) {
1238
+ return;
1239
+ }
1240
+ auto isolate = info.GetIsolate();
1241
+ auto context = isolate->GetCurrentContext();
1242
+ auto val = value->Int32Value(context).ToChecked();
1243
+ mason_style_set_border_left(ptr->style_, val);
1244
+ }
1245
+
1246
+
1247
+ void MasonStyleImpl::GetBorderTop(v8::Local<v8::String> property,
1248
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1249
+ MasonStyleImpl *ptr = GetPointer(info.This());
1250
+ if (ptr == nullptr) {
1251
+ info.GetReturnValue().Set(0);
1252
+ return;
1253
+ }
1254
+
1255
+ auto ret = mason_style_get_border_top(ptr->style_);
1256
+
1257
+ info.GetReturnValue().Set(ret);
1258
+
1259
+ }
1260
+
1261
+ void MasonStyleImpl::SetBorderTop(v8::Local<v8::String> property,
1262
+ v8::Local<v8::Value> value,
1263
+ const v8::PropertyCallbackInfo<void> &info) {
1264
+ MasonStyleImpl *ptr = GetPointer(info.This());
1265
+ if (ptr == nullptr) {
1266
+ return;
1267
+ }
1268
+ auto isolate = info.GetIsolate();
1269
+ auto context = isolate->GetCurrentContext();
1270
+ auto val = value->Int32Value(context).ToChecked();
1271
+ mason_style_set_border_top(ptr->style_, val);
1272
+ }
1273
+
1274
+
1275
+ void MasonStyleImpl::GetBorderRight(v8::Local<v8::String> property,
1276
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1277
+ MasonStyleImpl *ptr = GetPointer(info.This());
1278
+ if (ptr == nullptr) {
1279
+ info.GetReturnValue().Set(0);
1280
+ return;
1281
+ }
1282
+
1283
+ auto ret = mason_style_get_border_right(ptr->style_);
1284
+
1285
+ info.GetReturnValue().Set(ret);
1286
+
1287
+ }
1288
+
1289
+ void MasonStyleImpl::SetBorderRight(v8::Local<v8::String> property,
1290
+ v8::Local<v8::Value> value,
1291
+ const v8::PropertyCallbackInfo<void> &info) {
1292
+ MasonStyleImpl *ptr = GetPointer(info.This());
1293
+ if (ptr == nullptr) {
1294
+ return;
1295
+ }
1296
+ auto isolate = info.GetIsolate();
1297
+ auto context = isolate->GetCurrentContext();
1298
+ auto val = value->Int32Value(context).ToChecked();
1299
+ mason_style_set_border_right(ptr->style_, val);
1300
+ }
1301
+
1302
+
1303
+ void MasonStyleImpl::GetBorderBottom(v8::Local<v8::String> property,
1304
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1305
+ MasonStyleImpl *ptr = GetPointer(info.This());
1306
+ if (ptr == nullptr) {
1307
+ info.GetReturnValue().Set(0);
1308
+ return;
1309
+ }
1310
+
1311
+ auto ret = mason_style_get_border_bottom(ptr->style_);
1312
+
1313
+ info.GetReturnValue().Set(ret);
1314
+
1315
+ }
1316
+
1317
+ void MasonStyleImpl::SetBorderBottom(v8::Local<v8::String> property,
1318
+ v8::Local<v8::Value> value,
1319
+ const v8::PropertyCallbackInfo<void> &info) {
1320
+ MasonStyleImpl *ptr = GetPointer(info.This());
1321
+ if (ptr == nullptr) {
1322
+ return;
1323
+ }
1324
+ auto isolate = info.GetIsolate();
1325
+ auto context = isolate->GetCurrentContext();
1326
+ auto val = value->Int32Value(context).ToChecked();
1327
+ mason_style_set_border_bottom(ptr->style_, val);
1328
+ }
1329
+
1330
+
1331
+ void MasonStyleImpl::GetFlexGrow(v8::Local<v8::String> property,
1332
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1333
+ MasonStyleImpl *ptr = GetPointer(info.This());
1334
+ if (ptr == nullptr) {
1335
+ info.GetReturnValue().Set(0);
1336
+ return;
1337
+ }
1338
+
1339
+ auto ret = mason_style_get_flex_grow(ptr->style_);
1340
+
1341
+ info.GetReturnValue().Set((double) ret);
1342
+
1343
+ }
1344
+
1345
+ void MasonStyleImpl::SetFlexGrow(v8::Local<v8::String> property,
1346
+ v8::Local<v8::Value> value,
1347
+ const v8::PropertyCallbackInfo<void> &info) {
1348
+ MasonStyleImpl *ptr = GetPointer(info.This());
1349
+ if (ptr == nullptr) {
1350
+ return;
1351
+ }
1352
+ auto isolate = info.GetIsolate();
1353
+ auto context = isolate->GetCurrentContext();
1354
+ auto val = (float) value->NumberValue(context).ToChecked();
1355
+ mason_style_set_flex_grow(ptr->style_, val);
1356
+ }
1357
+
1358
+ void MasonStyleImpl::GetFlexShrink(v8::Local<v8::String> property,
1359
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1360
+ MasonStyleImpl *ptr = GetPointer(info.This());
1361
+ if (ptr == nullptr) {
1362
+ info.GetReturnValue().Set(0);
1363
+ return;
1364
+ }
1365
+
1366
+ auto ret = mason_style_get_flex_shrink(ptr->style_);
1367
+
1368
+ info.GetReturnValue().Set((double) ret);
1369
+
1370
+ }
1371
+
1372
+ void MasonStyleImpl::SetFlexShrink(v8::Local<v8::String> property,
1373
+ v8::Local<v8::Value> value,
1374
+ const v8::PropertyCallbackInfo<void> &info) {
1375
+ MasonStyleImpl *ptr = GetPointer(info.This());
1376
+ if (ptr == nullptr) {
1377
+ return;
1378
+ }
1379
+ auto isolate = info.GetIsolate();
1380
+ auto context = isolate->GetCurrentContext();
1381
+ auto val = (float) value->NumberValue(context).ToChecked();
1382
+ mason_style_set_flex_shrink(ptr->style_, val);
1383
+ }
1384
+
1385
+ void MasonStyleImpl::GetFlexBasis(v8::Local<v8::String> property,
1386
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1387
+ MasonStyleImpl *ptr = GetPointer(info.This());
1388
+ if (ptr == nullptr) {
1389
+ info.GetReturnValue().Set(0);
1390
+ return;
1391
+ }
1392
+
1393
+ auto ret = mason_style_get_flex_basis(ptr->style_);
1394
+
1395
+ info.GetReturnValue().Set(ret);
1396
+
1397
+ }
1398
+
1399
+ void MasonStyleImpl::SetFlexBasis(v8::Local<v8::String> property,
1400
+ v8::Local<v8::Value> value,
1401
+ const v8::PropertyCallbackInfo<void> &info) {
1402
+ MasonStyleImpl *ptr = GetPointer(info.This());
1403
+ if (ptr == nullptr) {
1404
+ return;
1405
+ }
1406
+ auto isolate = info.GetIsolate();
1407
+ auto context = isolate->GetCurrentContext();
1408
+ auto val = (float) value->NumberValue(context).ToChecked();
1409
+ mason_style_set_flex_basis(ptr->style_, val);
1410
+ }
1411
+
1412
+
1413
+ void MasonStyleImpl::GetGap(v8::Local<v8::String> property,
1414
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1415
+ MasonStyleImpl *ptr = GetPointer(info.This());
1416
+ if (ptr == nullptr) {
1417
+ info.GetReturnValue().Set(0);
1418
+ return;
1419
+ }
1420
+
1421
+ auto ret = mason_style_get_gap(ptr->style_);
1422
+
1423
+ info.GetReturnValue().Set(ret);
1424
+
1425
+ }
1426
+
1427
+ void MasonStyleImpl::SetGap(v8::Local<v8::String> property,
1428
+ v8::Local<v8::Value> value,
1429
+ const v8::PropertyCallbackInfo<void> &info) {
1430
+ MasonStyleImpl *ptr = GetPointer(info.This());
1431
+ if (ptr == nullptr) {
1432
+ return;
1433
+ }
1434
+ auto isolate = info.GetIsolate();
1435
+ auto context = isolate->GetCurrentContext();
1436
+ auto val = (float) value->NumberValue(context).ToChecked();
1437
+ mason_style_set_gap(ptr->style_, val);
1438
+ }
1439
+
1440
+
1441
+ void MasonStyleImpl::GetRowGap(v8::Local<v8::String> property,
1442
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1443
+ MasonStyleImpl *ptr = GetPointer(info.This());
1444
+ if (ptr == nullptr) {
1445
+ info.GetReturnValue().Set(0);
1446
+ return;
1447
+ }
1448
+
1449
+ auto ret = mason_style_get_row_gap(ptr->style_);
1450
+
1451
+ info.GetReturnValue().Set(ret);
1452
+
1453
+ }
1454
+
1455
+ void MasonStyleImpl::SetRowGap(v8::Local<v8::String> property,
1456
+ v8::Local<v8::Value> value,
1457
+ const v8::PropertyCallbackInfo<void> &info) {
1458
+ MasonStyleImpl *ptr = GetPointer(info.This());
1459
+ if (ptr == nullptr) {
1460
+ return;
1461
+ }
1462
+ auto isolate = info.GetIsolate();
1463
+ auto context = isolate->GetCurrentContext();
1464
+ auto val = (float) value->NumberValue(context).ToChecked();
1465
+ mason_style_set_row_gap(ptr->style_, val);
1466
+ }
1467
+
1468
+
1469
+
1470
+ void MasonStyleImpl::GetColumnGap(v8::Local<v8::String> property,
1471
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1472
+ MasonStyleImpl *ptr = GetPointer(info.This());
1473
+ if (ptr == nullptr) {
1474
+ info.GetReturnValue().Set(0);
1475
+ return;
1476
+ }
1477
+
1478
+ auto ret = mason_style_get_column_gap(ptr->style_);
1479
+
1480
+ info.GetReturnValue().Set(ret);
1481
+
1482
+ }
1483
+
1484
+ void MasonStyleImpl::SetColumnGap(v8::Local<v8::String> property,
1485
+ v8::Local<v8::Value> value,
1486
+ const v8::PropertyCallbackInfo<void> &info) {
1487
+ MasonStyleImpl *ptr = GetPointer(info.This());
1488
+ if (ptr == nullptr) {
1489
+ return;
1490
+ }
1491
+ auto isolate = info.GetIsolate();
1492
+ auto context = isolate->GetCurrentContext();
1493
+ auto val = (float) value->NumberValue(context).ToChecked();
1494
+ mason_style_set_column_gap(ptr->style_, val);
1495
+ }
1496
+
1497
+
1498
+ void MasonStyleImpl::GetAspectRatio(v8::Local<v8::String> property,
1499
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1500
+ MasonStyleImpl *ptr = GetPointer(info.This());
1501
+ if (ptr == nullptr) {
1502
+ info.GetReturnValue().Set(0);
1503
+ return;
1504
+ }
1505
+
1506
+ auto ret = mason_style_get_aspect_ratio(ptr->style_);
1507
+
1508
+ info.GetReturnValue().Set((double )ret);
1509
+
1510
+ }
1511
+
1512
+ void MasonStyleImpl::SetAspectRatio(v8::Local<v8::String> property,
1513
+ v8::Local<v8::Value> value,
1514
+ const v8::PropertyCallbackInfo<void> &info) {
1515
+ MasonStyleImpl *ptr = GetPointer(info.This());
1516
+ if (ptr == nullptr) {
1517
+ return;
1518
+ }
1519
+ auto isolate = info.GetIsolate();
1520
+ auto context = isolate->GetCurrentContext();
1521
+ auto val = (float) value->NumberValue(context).ToChecked();
1522
+ mason_style_set_aspect_ratio(ptr->style_, val);
1523
+ }
1524
+
1525
+ void MasonStyleImpl::GetFlexDirection(v8::Local<v8::String> property,
1526
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1527
+ MasonStyleImpl *ptr = GetPointer(info.This());
1528
+ if (ptr == nullptr) {
1529
+ info.GetReturnValue().Set(0);
1530
+ return;
1531
+ }
1532
+
1533
+ auto ret = mason_style_get_flex_direction(ptr->style_);
1534
+
1535
+ info.GetReturnValue().Set(ret);
1536
+
1537
+ }
1538
+
1539
+ void MasonStyleImpl::SetFlexDirection(v8::Local<v8::String> property,
1540
+ v8::Local<v8::Value> value,
1541
+ const v8::PropertyCallbackInfo<void> &info) {
1542
+ MasonStyleImpl *ptr = GetPointer(info.This());
1543
+ if (ptr == nullptr) {
1544
+ return;
1545
+ }
1546
+ auto isolate = info.GetIsolate();
1547
+ auto context = isolate->GetCurrentContext();
1548
+ auto val = value->Int32Value(context).ToChecked();
1549
+ mason_style_set_flex_direction(ptr->style_, val);
1550
+ }
1551
+
1552
+ void MasonStyleImpl::GetGridAutoRows(v8::Local<v8::String> property,
1553
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1554
+ auto isolate = info.GetIsolate();
1555
+ MasonStyleImpl *ptr = GetPointer(info.This());
1556
+ if (ptr == nullptr) {
1557
+ info.GetReturnValue().Set(0);
1558
+ return;
1559
+ }
1560
+
1561
+ auto rows = mason_style_get_grid_auto_rows(ptr->style_);
1562
+ auto parsed = mason_util_parse_non_repeated_track_sizing_function(rows);
1563
+ info.GetReturnValue().Set(Helpers::ConvertToV8String(isolate, parsed));
1564
+
1565
+ }
1566
+
1567
+ void MasonStyleImpl::SetGridAutoRows(v8::Local<v8::String> property,
1568
+ v8::Local<v8::Value> value,
1569
+ const v8::PropertyCallbackInfo<void> &info) {
1570
+ MasonStyleImpl *ptr = GetPointer(info.This());
1571
+ if (ptr == nullptr) {
1572
+ return;
1573
+ }
1574
+ auto isolate = info.GetIsolate();
1575
+ auto context = isolate->GetCurrentContext();
1576
+ auto val = value->Int32Value(context).ToChecked();
1577
+ mason_style_set_grid_auto_rows(ptr->style_, val);
1578
+ }
1579
+
1580
+
1581
+ void MasonStyleImpl::GetGridAutoColumns(v8::Local<v8::String> property,
1582
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1583
+ auto isolate = info.GetIsolate();
1584
+ MasonStyleImpl *ptr = GetPointer(info.This());
1585
+ if (ptr == nullptr) {
1586
+ info.GetReturnValue().SetEmptyString();
1587
+ return;
1588
+ }
1589
+
1590
+ auto columns = mason_style_get_grid_auto_columns(ptr->style_);
1591
+ auto parsed = mason_util_parse_non_repeated_track_sizing_function(columns);
1592
+ info.GetReturnValue().Set(Helpers::ConvertToV8String(isolate, parsed));
1593
+ }
1594
+
1595
+ void MasonStyleImpl::SetGridAutoColumns(v8::Local<v8::String> property,
1596
+ v8::Local<v8::Value> value,
1597
+ const v8::PropertyCallbackInfo<void> &info) {
1598
+ MasonStyleImpl *ptr = GetPointer(info.This());
1599
+ if (ptr == nullptr) {
1600
+ return;
1601
+ }
1602
+ auto isolate = info.GetIsolate();
1603
+ auto context = isolate->GetCurrentContext();
1604
+ auto val = value->Int32Value(context).ToChecked();
1605
+ mason_style_set_grid_auto_columns(ptr->style_, val);
1606
+ }
1607
+
1608
+
1609
+
1610
+ void MasonStyleImpl::GetArea(v8::Local<v8::String> property,
1611
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1612
+
1613
+ auto isolate = info.GetIsolate();
1614
+ auto context = isolate->GetCurrentContext();
1615
+ MasonStyleImpl *ptr = GetPointer(info.This());
1616
+ if (ptr == nullptr) {
1617
+ info.GetReturnValue().SetEmptyString();
1618
+ return;
1619
+ }
1620
+
1621
+ auto row_start = mason_style_get_grid_row_start(ptr->style_);
1622
+ auto row_end = mason_style_get_grid_row_start(ptr->style_);
1623
+
1624
+ auto col_start = mason_style_get_grid_column_start(ptr->style_);
1625
+ auto col_end = mason_style_get_grid_column_start(ptr->style_);
1626
+
1627
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
1628
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_start_type"), v8::Int32::New(isolate, (int)col_start.value_type)).Check();
1629
+ object->Set(context, Helpers::ConvertToV8String(isolate,"col_start_value"), v8::Int32::New(isolate, (int)col_start.value)).Check();
1630
+
1631
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_end_type"), v8::Int32::New(isolate, (int)col_end.value_type)).Check();
1632
+ object->Set(context, Helpers::ConvertToV8String(isolate,"col_end_value"), v8::Int32::New(isolate, (int)col_end.value)).Check();
1633
+
1634
+ object->Set(context, Helpers::ConvertToV8String(isolate,"row_start_type"), v8::Int32::New(isolate, (int)row_start.value_type)).Check();
1635
+ object->Set(context, Helpers::ConvertToV8String(isolate,"row_start_value"), v8::Int32::New(isolate, (int)row_start.value)).Check();
1636
+
1637
+ object->Set(context, Helpers::ConvertToV8String(isolate,"row_end_type"), v8::Int32::New(isolate, (int)row_end.value_type)).Check();
1638
+ object->Set(context, Helpers::ConvertToV8String(isolate,"row_end_value"), v8::Int32::New(isolate, (int)row_end.value)).Check();
1639
+
1640
+ std::stringstream ss;
1641
+ if (col_start.value == col_end.value &&
1642
+ col_start.value_type == col_end.value_type)
1643
+ {
1644
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1645
+ ss << "auto";
1646
+ } else {
1647
+ ss << col_start.value;
1648
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1649
+ ss << " span";
1650
+ }
1651
+ }
1652
+ }
1653
+ else
1654
+ {
1655
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1656
+ ss << "auto";
1657
+ } else {
1658
+ ss << col_start.value;
1659
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1660
+ ss << " span";
1661
+ }
1662
+ }
1663
+
1664
+ ss << " / ";
1665
+
1666
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1667
+ ss << "auto";
1668
+ } else {
1669
+ ss << col_end.value;
1670
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1671
+ ss << " span";
1672
+ }
1673
+ }
1674
+ }
1675
+ object->Set(context, Helpers::ConvertToV8String(isolate,"colFormatted"), STRING_TO_V8_VALUE(ss.str().c_str())).Check();
1676
+
1677
+ std::stringstream row_ss;
1678
+ if (row_start.value == row_end.value &&
1679
+ row_start.value_type == row_end.value_type)
1680
+ {
1681
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1682
+ row_ss << "auto";
1683
+ } else {
1684
+ row_ss << row_start.value;
1685
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1686
+ row_ss << " span";
1687
+ }
1688
+ }
1689
+ }
1690
+ else
1691
+ {
1692
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1693
+ row_ss << "auto";
1694
+ } else {
1695
+ row_ss << row_start.value;
1696
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1697
+ row_ss << " span";
1698
+ }
1699
+ }
1700
+
1701
+ row_ss << " / ";
1702
+
1703
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1704
+ row_ss << "auto";
1705
+ } else {
1706
+ row_ss << row_end.value;
1707
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1708
+ row_ss << " span";
1709
+ }
1710
+ }
1711
+ }
1712
+ object->Set(context, Helpers::ConvertToV8String(isolate,"rowFormatted"), STRING_TO_V8_VALUE(ss.str().c_str())).Check();
1713
+
1714
+ info.GetReturnValue().Set(object);
1715
+
1716
+
1717
+ }
1718
+
1719
+ void MasonStyleImpl::SetArea(v8::Local<v8::String> property,
1720
+ v8::Local<v8::Value> value,
1721
+ const v8::PropertyCallbackInfo<void> &info) {
1722
+ MasonStyleImpl *ptr = GetPointer(info.This());
1723
+ if (ptr == nullptr) {
1724
+ return;
1725
+ }
1726
+ auto isolate = info.GetIsolate();
1727
+ auto context = isolate->GetCurrentContext();
1728
+
1729
+
1730
+ auto object = value.As<v8::Object>();
1731
+
1732
+ auto rowStartType = (int)object->Get(context,
1733
+ Helpers::ConvertToV8String(isolate, "row_start_type"))
1734
+ .ToLocalChecked()
1735
+ ->Int32Value(context)
1736
+ .FromJust();
1737
+
1738
+ auto rowStartValue = (short)object->Get(context,
1739
+ Helpers::ConvertToV8String(isolate, "row_start_value"))
1740
+ .ToLocalChecked()
1741
+ ->Int32Value(context)
1742
+ .FromJust();
1743
+
1744
+ auto rowEndType = (int)object->Get(context,
1745
+ Helpers::ConvertToV8String(isolate, "row_end_type"))
1746
+ .ToLocalChecked()
1747
+ ->Int32Value(context)
1748
+ .FromJust();
1749
+ auto rowEndValue = (short)object->Get(context,
1750
+ Helpers::ConvertToV8String(isolate, "row_end_value"))
1751
+ .ToLocalChecked()
1752
+ ->Int32Value(context)
1753
+ .FromJust();
1754
+
1755
+ auto columnStartType = (int)object->Get(context,
1756
+ Helpers::ConvertToV8String(isolate, "col_start_value"))
1757
+ .ToLocalChecked()
1758
+ ->Int32Value(context)
1759
+ .FromJust();
1760
+ auto columnStartValue = (short)object->Get(context,
1761
+ Helpers::ConvertToV8String(isolate, "col_start_type"))
1762
+ .ToLocalChecked()
1763
+ ->Int32Value(context)
1764
+ .FromJust();
1765
+
1766
+ auto columnEndType = (int)object->Get(context,
1767
+ Helpers::ConvertToV8String(isolate, "col_end_type"))
1768
+ .ToLocalChecked()
1769
+ ->Int32Value(context)
1770
+ .FromJust();
1771
+ auto columnEndValue = (short)object->Get(context,
1772
+ Helpers::ConvertToV8String(isolate, "col_end_value"))
1773
+ .ToLocalChecked()
1774
+ ->Int32Value(context)
1775
+ .FromJust();
1776
+
1777
+ mason_style_set_grid_area(
1778
+ ptr->style_,
1779
+ jsToGridPlacement(rowStartValue, rowStartType),
1780
+ jsToGridPlacement(rowEndValue, rowEndType),
1781
+ jsToGridPlacement(columnStartValue, columnStartType),
1782
+ jsToGridPlacement(columnEndValue, columnEndType));
1783
+
1784
+ // MASON_UPDATE_NODE(info[4])
1785
+
1786
+ }
1787
+
1788
+
1789
+ void MasonStyleImpl::GetColumn(v8::Local<v8::String> property,
1790
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1791
+
1792
+ auto isolate = info.GetIsolate();
1793
+ auto context = isolate->GetCurrentContext();
1794
+ MasonStyleImpl *ptr = GetPointer(info.This());
1795
+ if (ptr == nullptr) {
1796
+ info.GetReturnValue().SetEmptyString();
1797
+ return;
1798
+ }
1799
+
1800
+
1801
+ auto col_start = mason_style_get_grid_column_start(ptr->style_);
1802
+ auto col_end = mason_style_get_grid_column_start(ptr->style_);
1803
+
1804
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
1805
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_start_type"), v8::Int32::New(isolate, (int)col_start.value_type)).Check();
1806
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_start_value"), v8::Int32::New(isolate, (int)col_start.value)).Check();
1807
+
1808
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_end_type"), v8::Int32::New(isolate, (int)col_end.value_type)).Check();
1809
+ object->Set(context, Helpers::ConvertToV8String(isolate, "col_end_value"), v8::Int32::New(isolate, (int)col_end.value)).Check();
1810
+
1811
+ std::stringstream ss;
1812
+ if (col_start.value == col_end.value &&
1813
+ col_start.value_type == col_end.value_type)
1814
+ {
1815
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1816
+ ss << "auto";
1817
+ } else {
1818
+ ss << col_start.value;
1819
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1820
+ ss << " span";
1821
+ }
1822
+ }
1823
+ }
1824
+ else
1825
+ {
1826
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1827
+ ss << "auto";
1828
+ } else {
1829
+ ss << col_start.value;
1830
+ if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1831
+ ss << " span";
1832
+ }
1833
+ }
1834
+
1835
+ ss << " / ";
1836
+
1837
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1838
+ ss << "auto";
1839
+ } else {
1840
+ ss << col_end.value;
1841
+ if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1842
+ ss << " span";
1843
+ }
1844
+ }
1845
+ }
1846
+
1847
+ object->Set(context, Helpers::ConvertToV8String(isolate, "colFormatted"), Helpers::ConvertToV8String(isolate, ss.c_str())).Check();
1848
+
1849
+ info.GetReturnValue().Set(object);
1850
+
1851
+ }
1852
+
1853
+ void MasonStyleImpl::SetColumn(v8::Local<v8::String> property,
1854
+ v8::Local<v8::Value> value,
1855
+ const v8::PropertyCallbackInfo<void> &info) {
1856
+ MasonStyleImpl *ptr = GetPointer(info.This());
1857
+ if (ptr == nullptr) {
1858
+ return;
1859
+ }
1860
+ auto isolate = info.GetIsolate();
1861
+ auto context = isolate->GetCurrentContext();
1862
+
1863
+
1864
+ auto object = value.As<v8::Object>();
1865
+
1866
+ auto columnStartType = (int)object->Get(context,
1867
+ Helpers::ConvertToV8String(isolate, "col_start_value"))
1868
+ .ToLocalChecked()
1869
+ ->Int32Value(context)
1870
+ .FromJust();
1871
+ auto columnStartValue = (short)object->Get(context,
1872
+ Helpers::ConvertToV8String(isolate, "col_start_type"))
1873
+ .ToLocalChecked()
1874
+ ->Int32Value(context)
1875
+ .FromJust();
1876
+
1877
+ auto columnEndType = (int)object->Get(context,
1878
+ Helpers::ConvertToV8String(isolate, "col_end_type"))
1879
+ .ToLocalChecked()
1880
+ ->Int32Value(context)
1881
+ .FromJust();
1882
+ auto columnEndValue = (short)object->Get(context,
1883
+ Helpers::ConvertToV8String(isolate, "col_end_value"))
1884
+ .ToLocalChecked()
1885
+ ->Int32Value(context)
1886
+ .FromJust();
1887
+
1888
+ mason_style_set_grid_column(
1889
+ ptr->style_,
1890
+ jsToGridPlacement(columnStartValue, columnStartType),
1891
+ jsToGridPlacement(columnEndValue, columnEndType));
1892
+
1893
+ // MASON_UPDATE_NODE(info[4])
1894
+ }
1895
+
1896
+
1897
+ void MasonStyleImpl::GetRow(v8::Local<v8::String> property,
1898
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1899
+
1900
+ auto isolate = info.GetIsolate();
1901
+ auto context = isolate->GetCurrentContext();
1902
+ MasonStyleImpl *ptr = GetPointer(info.This());
1903
+ if (ptr == nullptr) {
1904
+ info.GetReturnValue().SetNull();
1905
+ return;
1906
+ }
1907
+
1908
+
1909
+ auto row_start = mason_style_get_grid_row_start(ptr->style_);
1910
+ auto row_end = mason_style_get_grid_row_start(ptr->style_);
1911
+
1912
+ v8::Local<v8::Object> object = v8::Object::New((isolate));
1913
+
1914
+ object->Set(context, Helpers::ConvertToV8String(isolate, "row_start_type"), v8::Int32::New(isolate, (int)row_start.value_type)).Check();
1915
+ object->Set(context, Helpers::ConvertToV8String(isolate, "row_start_value"), v8::Int32::New(isolate, (int)row_start.value)).Check();
1916
+
1917
+ object->Set(context, Helpers::ConvertToV8String(isolate, "row_end_type"), v8::Int32::New(isolate, (int)row_end.value_type)).Check();
1918
+ object->Set(context, Helpers::ConvertToV8String(isolate, "row_end_value"), v8::Int32::New(isolate, (int)row_end.value)).Check();
1919
+
1920
+ std::stringstream row_ss;
1921
+ if (row_start.value == row_end.value &&
1922
+ row_start.value_type == row_end.value_type)
1923
+ {
1924
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1925
+ row_ss << "auto";
1926
+ } else {
1927
+ row_ss << row_start.value;
1928
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1929
+ row_ss << " span";
1930
+ }
1931
+ }
1932
+ }
1933
+ else
1934
+ {
1935
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1936
+ row_ss << "auto";
1937
+ } else {
1938
+ row_ss << row_start.value;
1939
+ if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1940
+ row_ss << " span";
1941
+ }
1942
+ }
1943
+
1944
+ row_ss << " / ";
1945
+
1946
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
1947
+ row_ss << "auto";
1948
+ } else {
1949
+ row_ss << row_end.value;
1950
+ if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
1951
+ row_ss << " span";
1952
+ }
1953
+ }
1954
+ }
1955
+ object->Set(context, Helpers::ConvertToV8String(isolate, "rowFormatted"), Helpers::ConvertToV8String(isolate, row_ss.c_str())).Check();
1956
+
1957
+ info.GetReturnValue().Set(object);
1958
+
1959
+ }
1960
+
1961
+ void MasonStyleImpl::SetRow(v8::Local<v8::String> property,
1962
+ v8::Local<v8::Value> value,
1963
+ const v8::PropertyCallbackInfo<void> &info) {
1964
+ MasonStyleImpl *ptr = GetPointer(info.This());
1965
+ if (ptr == nullptr) {
1966
+ return;
1967
+ }
1968
+ auto isolate = info.GetIsolate();
1969
+ auto context = isolate->GetCurrentContext();
1970
+
1971
+
1972
+ auto object = value.As<v8::Object>();
1973
+
1974
+ auto rowStartType = (int)object->Get(context,
1975
+ Helpers::ConvertToV8String(isolate, "row_start_type"))
1976
+ .ToLocalChecked()
1977
+ ->Int32Value(context)
1978
+ .FromJust();
1979
+
1980
+ auto rowStartValue = (short)object->Get(context,
1981
+ Helpers::ConvertToV8String(isolate, "row_start_value"))
1982
+ .ToLocalChecked()
1983
+ ->Int32Value(context)
1984
+ .FromJust();
1985
+
1986
+ auto rowEndType = (int)object->Get(context,
1987
+ Helpers::ConvertToV8String(isolate, "row_end_type"))
1988
+ .ToLocalChecked()
1989
+ ->Int32Value(context)
1990
+ .FromJust();
1991
+ auto rowEndValue = (short)object->Get(context,
1992
+ Helpers::ConvertToV8String(isolate, "row_end_value"))
1993
+ .ToLocalChecked()
1994
+ ->Int32Value(context)
1995
+ .FromJust();
1996
+
1997
+ mason_style_set_grid_row(
1998
+ ptr->style_,
1999
+ jsToGridPlacement(rowStartValue, rowStartType),
2000
+ jsToGridPlacement(rowEndValue, rowEndType));
2001
+
2002
+ // MASON_UPDATE_NODE(info[4])
2003
+ }
2004
+
2005
+
2006
+ void MasonStyleImpl::GetColumnStart(v8::Local<v8::String> property,
2007
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2008
+
2009
+ auto isolate = info.GetIsolate();
2010
+ auto context = isolate->GetCurrentContext();
2011
+ MasonStyleImpl *ptr = GetPointer(info.This());
2012
+ if (ptr == nullptr) {
2013
+ info.GetReturnValue().SetNull();
2014
+ return;
2015
+ }
2016
+
2017
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2018
+
2019
+ }
2020
+
2021
+ void MasonStyleImpl::SetColumnStart(v8::Local<v8::String> property,
2022
+ v8::Local<v8::Value> value,
2023
+ const v8::PropertyCallbackInfo<void> &info) {
2024
+ MasonStyleImpl *ptr = GetPointer(info.This());
2025
+ if (ptr == nullptr) {
2026
+ return;
2027
+ }
2028
+ auto isolate = info.GetIsolate();
2029
+ auto context = isolate->GetCurrentContext();
2030
+
2031
+
2032
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2033
+ }
2034
+
2035
+
2036
+ void MasonStyleImpl::GetColumnEnd(v8::Local<v8::String> property,
2037
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2038
+
2039
+ auto isolate = info.GetIsolate();
2040
+ auto context = isolate->GetCurrentContext();
2041
+ MasonStyleImpl *ptr = GetPointer(info.This());
2042
+ if (ptr == nullptr) {
2043
+ info.GetReturnValue().SetNull();
2044
+ return;
2045
+ }
2046
+
2047
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2048
+
2049
+ }
2050
+
2051
+ void MasonStyleImpl::SetColumnEnd(v8::Local<v8::String> property,
2052
+ v8::Local<v8::Value> value,
2053
+ const v8::PropertyCallbackInfo<void> &info) {
2054
+ MasonStyleImpl *ptr = GetPointer(info.This());
2055
+ if (ptr == nullptr) {
2056
+ return;
2057
+ }
2058
+ auto isolate = info.GetIsolate();
2059
+ auto context = isolate->GetCurrentContext();
2060
+
2061
+
2062
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2063
+ }
2064
+
2065
+
2066
+ void MasonStyleImpl::GetRowStart(v8::Local<v8::String> property,
2067
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2068
+
2069
+ auto isolate = info.GetIsolate();
2070
+ auto context = isolate->GetCurrentContext();
2071
+ MasonStyleImpl *ptr = GetPointer(info.This());
2072
+ if (ptr == nullptr) {
2073
+ info.GetReturnValue().SetNull();
2074
+ return;
2075
+ }
2076
+
2077
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2078
+
2079
+ }
2080
+
2081
+ void MasonStyleImpl::SetRowStart(v8::Local<v8::String> property,
2082
+ v8::Local<v8::Value> value,
2083
+ const v8::PropertyCallbackInfo<void> &info) {
2084
+ MasonStyleImpl *ptr = GetPointer(info.This());
2085
+ if (ptr == nullptr) {
2086
+ return;
2087
+ }
2088
+ auto isolate = info.GetIsolate();
2089
+ auto context = isolate->GetCurrentContext();
2090
+
2091
+
2092
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2093
+ }
2094
+
2095
+ void MasonStyleImpl::GetRowEnd(v8::Local<v8::String> property,
2096
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2097
+
2098
+ auto isolate = info.GetIsolate();
2099
+ auto context = isolate->GetCurrentContext();
2100
+ MasonStyleImpl *ptr = GetPointer(info.This());
2101
+ if (ptr == nullptr) {
2102
+ info.GetReturnValue().SetNull();
2103
+ return;
2104
+ }
2105
+
2106
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2107
+
2108
+ }
2109
+
2110
+ void MasonStyleImpl::SetRowEnd(v8::Local<v8::String> property,
2111
+ v8::Local<v8::Value> value,
2112
+ const v8::PropertyCallbackInfo<void> &info) {
2113
+ MasonStyleImpl *ptr = GetPointer(info.This());
2114
+ if (ptr == nullptr) {
2115
+ return;
2116
+ }
2117
+ auto isolate = info.GetIsolate();
2118
+ auto context = isolate->GetCurrentContext();
2119
+
2120
+
2121
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2122
+ }
2123
+
2124
+ void MasonStyleImpl::GetGridTemplateRows(v8::Local<v8::String> property,
2125
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2126
+
2127
+ auto isolate = info.GetIsolate();
2128
+ auto context = isolate->GetCurrentContext();
2129
+ MasonStyleImpl *ptr = GetPointer(info.This());
2130
+ if (ptr == nullptr) {
2131
+ info.GetReturnValue().SetNull();
2132
+ return;
2133
+ }
2134
+
2135
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2136
+
2137
+ }
2138
+
2139
+ void MasonStyleImpl::SetGridTemplateRows(v8::Local<v8::String> property,
2140
+ v8::Local<v8::Value> value,
2141
+ const v8::PropertyCallbackInfo<void> &info) {
2142
+ MasonStyleImpl *ptr = GetPointer(info.This());
2143
+ if (ptr == nullptr) {
2144
+ return;
2145
+ }
2146
+ auto isolate = info.GetIsolate();
2147
+ auto context = isolate->GetCurrentContext();
2148
+
2149
+
2150
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2151
+ }
2152
+
2153
+
2154
+ void MasonStyleImpl::GetGridTemplateColumns(v8::Local<v8::String> property,
2155
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
2156
+
2157
+ auto isolate = info.GetIsolate();
2158
+ auto context = isolate->GetCurrentContext();
2159
+ MasonStyleImpl *ptr = GetPointer(info.This());
2160
+ if (ptr == nullptr) {
2161
+ info.GetReturnValue().SetNull();
2162
+ return;
2163
+ }
2164
+
2165
+ auto ret = mason_style_get_grid_column_start(ptr->style_);
2166
+
2167
+ }
2168
+
2169
+ void MasonStyleImpl::SetGridTemplateColumns(v8::Local<v8::String> property,
2170
+ v8::Local<v8::Value> value,
2171
+ const v8::PropertyCallbackInfo<void> &info) {
2172
+ MasonStyleImpl *ptr = GetPointer(info.This());
2173
+ if (ptr == nullptr) {
2174
+ return;
2175
+ }
2176
+ auto isolate = info.GetIsolate();
2177
+ auto context = isolate->GetCurrentContext();
2178
+
2179
+
2180
+ auto ret = mason_style_set_grid_column_start(ptr->style_);
2181
+ }