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

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