react-nitro-yoga 0.0.0-stage → 0.0.1-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.
- package/Generated/.gitattributes +1 -0
- package/Generated/api.d.ts +100 -0
- package/Generated/ffigen_yoga_adapters.h +52 -0
- package/Generated/native.d.ts +84 -0
- package/Generated/native.ts +283 -0
- package/Generated/yoga.c +1087 -0
- package/LICENSE +21 -0
- package/Package.swift +57 -0
- package/README.md +61 -2
- package/Sources/ReactNitroYoga/InstallHermesBindings.cpp +11 -0
- package/Sources/ReactNitroYoga/SHUnit.h +16 -0
- package/include/ReactNitroYoga/InstallHermesBindings.hpp +12 -0
- package/package.json +26 -4
- package/yoga/.clang-format +109 -0
- package/yoga/.clang-tidy +217 -0
- package/yoga/.editorconfig +11 -0
- package/yoga/.eslintrc.cjs +84 -0
- package/yoga/.github/ISSUE_TEMPLATE.md +21 -0
- package/yoga/.github/actions/black/action.yml +25 -0
- package/yoga/.github/actions/cache-emsdk/action.yml +10 -0
- package/yoga/.github/actions/install-ninja/action.yml +14 -0
- package/yoga/.github/actions/setup-android/action.yml +12 -0
- package/yoga/.github/actions/setup-apple/action.yml +8 -0
- package/yoga/.github/actions/setup-cpp/action.yml +34 -0
- package/yoga/.github/actions/setup-js/action.yml +18 -0
- package/yoga/.github/workflows/publish-android-release.yml +38 -0
- package/yoga/.github/workflows/publish-android-snashot.yml +36 -0
- package/yoga/.github/workflows/publish-npm-release.yml +25 -0
- package/yoga/.github/workflows/validate-android.yml +30 -0
- package/yoga/.github/workflows/validate-cpp.yml +101 -0
- package/yoga/.github/workflows/validate-format.yml +36 -0
- package/yoga/.github/workflows/validate-js.yml +119 -0
- package/yoga/.github/workflows/validate-swiftpm.yml +29 -0
- package/yoga/.github/workflows/validate-tests.yml +35 -0
- package/yoga/.github/workflows/validate-website.yml +45 -0
- package/yoga/.prettierignore +3 -0
- package/yoga/.prettierrc.js +16 -0
- package/yoga/.vscode/extensions.json +7 -0
- package/yoga/.vscode/launch.json +25 -0
- package/yoga/.vscode/settings.json +20 -0
- package/yoga/.vscode/tasks.json +23 -0
- package/yoga/CMakeLists.txt +58 -0
- package/yoga/CODE_OF_CONDUCT.md +76 -0
- package/yoga/CONTRIBUTING.md +44 -0
- package/yoga/LICENSE +21 -0
- package/yoga/LICENSE-examples +9 -0
- package/yoga/Package.swift +32 -0
- package/yoga/README.md +36 -0
- package/yoga/benchmark/Benchmark.cpp +400 -0
- package/yoga/benchmark/Benchmark.h +39 -0
- package/yoga/benchmark/CMakeLists.txt +27 -0
- package/yoga/benchmark/TreeDeserialization.cpp +248 -0
- package/yoga/benchmark/TreeDeserialization.h +52 -0
- package/yoga/benchmark/YGBenchmark.c +183 -0
- package/yoga/benchmark/benchmark +15 -0
- package/yoga/benchmark/captures/chat-mac.json +24426 -0
- package/yoga/benchmark/captures/feed-android.json +10335 -0
- package/yoga/benchmark/captures/profile-ios.json +1955 -0
- package/yoga/benchmark/captures/rendering-sample-mac.json +1927 -0
- package/yoga/build.gradle +46 -0
- package/yoga/build_fuzz_tests +28 -0
- package/yoga/capture/CMakeLists.txt +23 -0
- package/yoga/capture/CaptureTree.cpp +100 -0
- package/yoga/capture/CaptureTree.h +47 -0
- package/yoga/capture/NodeToString.cpp +359 -0
- package/yoga/capture/NodeToString.h +40 -0
- package/yoga/cmake/project-defaults.cmake +50 -0
- package/yoga/cmake/yoga-config.cmake.in +10 -0
- package/yoga/enums.py +394 -0
- package/yoga/fuzz/CMakeLists.txt +21 -0
- package/yoga/fuzz/FuzzLayout.cpp +57 -0
- package/yoga/gentest/babel.config.cjs +12 -0
- package/yoga/gentest/fixtures/YGAbsolutePositionTest.html +168 -0
- package/yoga/gentest/fixtures/YGAlignContentTest.html +479 -0
- package/yoga/gentest/fixtures/YGAlignItemsTest.html +227 -0
- package/yoga/gentest/fixtures/YGAlignSelfTest.html +23 -0
- package/yoga/gentest/fixtures/YGAndroidNewsFeed.html +28 -0
- package/yoga/gentest/fixtures/YGAspectRatioTest.html +3 -0
- package/yoga/gentest/fixtures/YGAutoTest.html +25 -0
- package/yoga/gentest/fixtures/YGBorderTest.html +18 -0
- package/yoga/gentest/fixtures/YGBoxSizingTest.html +240 -0
- package/yoga/gentest/fixtures/YGDimensionTest.html +9 -0
- package/yoga/gentest/fixtures/YGDisplayTest.html +89 -0
- package/yoga/gentest/fixtures/YGFlexBasisFitContentTest.html +55 -0
- package/yoga/gentest/fixtures/YGFlexDirectionTest.html +391 -0
- package/yoga/gentest/fixtures/YGFlexTest.html +53 -0
- package/yoga/gentest/fixtures/YGFlexWrapTest.html +160 -0
- package/yoga/gentest/fixtures/YGGapTest.html +233 -0
- package/yoga/gentest/fixtures/YGIntrinsicSizeTest.html +295 -0
- package/yoga/gentest/fixtures/YGJustifyContentTest.html +164 -0
- package/yoga/gentest/fixtures/YGMarginTest.html +157 -0
- package/yoga/gentest/fixtures/YGMinMaxDimensionTest.html +116 -0
- package/yoga/gentest/fixtures/YGPaddingTest.html +29 -0
- package/yoga/gentest/fixtures/YGPercentageTest.html +125 -0
- package/yoga/gentest/fixtures/YGRoundingTest.html +95 -0
- package/yoga/gentest/fixtures/YGSizeOverflowTest.html +17 -0
- package/yoga/gentest/fixtures/YGStaticPositionTest.html +712 -0
- package/yoga/gentest/fonts/Ahem.ttf +0 -0
- package/yoga/gentest/gentest-driver.ts +141 -0
- package/yoga/gentest/gentest-validate.ts +43 -0
- package/yoga/gentest/package.json +24 -0
- package/yoga/gentest/scripts/gentest-validate.ts +43 -0
- package/yoga/gentest/signedsource.d.ts +10 -0
- package/yoga/gentest/src/ChromePool.ts +78 -0
- package/yoga/gentest/src/CssToYoga.ts +958 -0
- package/yoga/gentest/src/buildLayoutTree.ts +98 -0
- package/yoga/gentest/src/cli.ts +163 -0
- package/yoga/gentest/src/emitters/CppEmitter.ts +452 -0
- package/yoga/gentest/src/emitters/Emitter.ts +204 -0
- package/yoga/gentest/src/emitters/JavaEmitter.ts +469 -0
- package/yoga/gentest/src/emitters/JavascriptEmitter.ts +353 -0
- package/yoga/gentest/src/types.ts +41 -0
- package/yoga/gentest/test-template.html +42 -0
- package/yoga/gentest/tsconfig.json +13 -0
- package/yoga/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/yoga/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/yoga/gradle.properties +14 -0
- package/yoga/gradlew +251 -0
- package/yoga/gradlew.bat +94 -0
- package/yoga/java/AndroidManifest.xml +14 -0
- package/yoga/java/CMakeLists.txt +22 -0
- package/yoga/java/build.gradle.kts +127 -0
- package/yoga/java/com/facebook/yoga/LayoutPassReason.kt +35 -0
- package/yoga/java/com/facebook/yoga/YogaAlign.kt +45 -0
- package/yoga/java/com/facebook/yoga/YogaBaselineFunction.kt +16 -0
- package/yoga/java/com/facebook/yoga/YogaBoxSizing.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaConfig.kt +48 -0
- package/yoga/java/com/facebook/yoga/YogaConfigFactory.kt +12 -0
- package/yoga/java/com/facebook/yoga/YogaConfigJNIBase.kt +70 -0
- package/yoga/java/com/facebook/yoga/YogaConfigJNIFinalizer.kt +30 -0
- package/yoga/java/com/facebook/yoga/YogaConstants.kt +18 -0
- package/yoga/java/com/facebook/yoga/YogaDimension.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaDirection.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaDisplay.kt +31 -0
- package/yoga/java/com/facebook/yoga/YogaEdge.kt +41 -0
- package/yoga/java/com/facebook/yoga/YogaErrata.kt +39 -0
- package/yoga/java/com/facebook/yoga/YogaExperimentalFeature.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaFlexDirection.kt +31 -0
- package/yoga/java/com/facebook/yoga/YogaGridTrackType.kt +33 -0
- package/yoga/java/com/facebook/yoga/YogaGutter.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaJustify.kt +43 -0
- package/yoga/java/com/facebook/yoga/YogaLayoutType.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaLogLevel.kt +39 -0
- package/yoga/java/com/facebook/yoga/YogaLogger.kt +19 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureFunction.kt +19 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureMode.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureOutput.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaNative.kt +347 -0
- package/yoga/java/com/facebook/yoga/YogaNode.kt +254 -0
- package/yoga/java/com/facebook/yoga/YogaNodeFactory.kt +14 -0
- package/yoga/java/com/facebook/yoga/YogaNodeJNIBase.kt +762 -0
- package/yoga/java/com/facebook/yoga/YogaNodeJNIFinalizer.kt +33 -0
- package/yoga/java/com/facebook/yoga/YogaNodeType.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaOverflow.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaPositionType.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaProps.kt +205 -0
- package/yoga/java/com/facebook/yoga/YogaStyleInputs.kt +51 -0
- package/yoga/java/com/facebook/yoga/YogaUnit.kt +37 -0
- package/yoga/java/com/facebook/yoga/YogaValue.kt +66 -0
- package/yoga/java/com/facebook/yoga/YogaWrap.kt +29 -0
- package/yoga/java/com/facebook/yoga/annotations/DoNotStrip.kt +19 -0
- package/yoga/java/gen/com/facebook/yoga/BuildConfig.java +15 -0
- package/yoga/java/jni/LayoutContext.cpp +34 -0
- package/yoga/java/jni/LayoutContext.h +29 -0
- package/yoga/java/jni/ScopedGlobalRef.h +140 -0
- package/yoga/java/jni/ScopedLocalRef.h +141 -0
- package/yoga/java/jni/YGJNI.h +77 -0
- package/yoga/java/jni/YGJNIVanilla.cpp +1178 -0
- package/yoga/java/jni/YGJNIVanilla.h +12 -0
- package/yoga/java/jni/YGJTypesVanilla.h +52 -0
- package/yoga/java/jni/YogaJniException.cpp +49 -0
- package/yoga/java/jni/YogaJniException.h +35 -0
- package/yoga/java/jni/common.cpp +109 -0
- package/yoga/java/jni/common.h +73 -0
- package/yoga/java/jni/corefunctions.cpp +91 -0
- package/yoga/java/jni/corefunctions.h +50 -0
- package/yoga/java/jni/macros.h +23 -0
- package/yoga/java/jni/tests/corefunctionsTest.cpp +247 -0
- package/yoga/java/jni/yogajni.cpp +18 -0
- package/yoga/java/proguard-rules.pro +10 -0
- package/yoga/java/res/values/strings.xml +12 -0
- package/yoga/java/tests/com/facebook/yoga/TestParametrization.kt +29 -0
- package/yoga/java/tests/com/facebook/yoga/YGAlignBaselineTest.kt +117 -0
- package/yoga/java/tests/com/facebook/yoga/YogaExceptionTest.kt +140 -0
- package/yoga/java/tests/com/facebook/yoga/YogaLoggerTest.kt +77 -0
- package/yoga/java/tests/com/facebook/yoga/YogaNodeStylePropertiesTest.kt +1020 -0
- package/yoga/java/tests/com/facebook/yoga/YogaNodeTest.kt +319 -0
- package/yoga/java/tests/com/facebook/yoga/YogaValueTest.kt +23 -0
- package/yoga/java/tests/com/facebook/yoga/utils/TestUtils.kt +99 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java +1670 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java +5440 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java +2132 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java +271 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java +313 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java +73 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAutoTest.java +326 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGBorderTest.java +222 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java +2165 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDimensionTest.java +122 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDisplayContentsTest.java +107 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDisplayTest.java +1021 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexBasisFitContentTest.java +391 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java +4118 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexTest.java +630 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java +1863 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGGapTest.java +2988 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java +926 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java +1865 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGMarginTest.java +1796 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java +1210 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGPaddingTest.java +307 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGPercentageTest.java +1345 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGRoundingTest.java +1099 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java +195 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java +5992 -0
- package/yoga/java/yogajni.version +13 -0
- package/yoga/javascript/CMakeLists.txt +59 -0
- package/yoga/javascript/README.md +27 -0
- package/yoga/javascript/babel.config.cjs +30 -0
- package/yoga/javascript/jest.config.js +14 -0
- package/yoga/javascript/jest.setup.js +12 -0
- package/yoga/javascript/just.config.cjs +258 -0
- package/yoga/javascript/package.json +52 -0
- package/yoga/javascript/src/generated/YGEnums.ts +249 -0
- package/yoga/javascript/src/index.ts +23 -0
- package/yoga/javascript/src/load.ts +25 -0
- package/yoga/javascript/src/wasm_bridge.c +155 -0
- package/yoga/javascript/src/wrapAssembly.ts +1025 -0
- package/yoga/javascript/tests/Benchmarks/YGBenchmark.test.ts +110 -0
- package/yoga/javascript/tests/YGAlignBaselineTest.test.ts +104 -0
- package/yoga/javascript/tests/YGComputedBorderTest.test.ts +25 -0
- package/yoga/javascript/tests/YGComputedMarginTest.test.ts +25 -0
- package/yoga/javascript/tests/YGComputedPaddingTest.test.ts +25 -0
- package/yoga/javascript/tests/YGDirtiedTest.test.ts +149 -0
- package/yoga/javascript/tests/YGErrataTest.test.ts +34 -0
- package/yoga/javascript/tests/YGFlexBasisAuto.test.ts +21 -0
- package/yoga/javascript/tests/YGHadOverflowTest.test.ts +110 -0
- package/yoga/javascript/tests/YGHasNewLayout.test.ts +81 -0
- package/yoga/javascript/tests/YGMeasureCacheTest.test.ts +29 -0
- package/yoga/javascript/tests/YGMeasureTest.test.ts +66 -0
- package/yoga/javascript/tests/bin/run-bench.ts +60 -0
- package/yoga/javascript/tests/generated/YGAbsolutePositionTest.test.ts +1531 -0
- package/yoga/javascript/tests/generated/YGAlignContentTest.test.ts +5181 -0
- package/yoga/javascript/tests/generated/YGAlignItemsTest.test.ts +2013 -0
- package/yoga/javascript/tests/generated/YGAlignSelfTest.test.ts +248 -0
- package/yoga/javascript/tests/generated/YGAndroidNewsFeed.test.ts +306 -0
- package/yoga/javascript/tests/generated/YGAspectRatioTest.test.ts +66 -0
- package/yoga/javascript/tests/generated/YGAutoTest.test.ts +303 -0
- package/yoga/javascript/tests/generated/YGBorderTest.test.ts +199 -0
- package/yoga/javascript/tests/generated/YGBoxSizingTest.test.ts +1978 -0
- package/yoga/javascript/tests/generated/YGDimensionTest.test.ts +111 -0
- package/yoga/javascript/tests/generated/YGDisplayContentsTest.test.ts +99 -0
- package/yoga/javascript/tests/generated/YGDisplayTest.test.ts +962 -0
- package/yoga/javascript/tests/generated/YGFlexBasisFitContentTest.test.ts +364 -0
- package/yoga/javascript/tests/generated/YGFlexDirectionTest.test.ts +3903 -0
- package/yoga/javascript/tests/generated/YGFlexTest.test.ts +587 -0
- package/yoga/javascript/tests/generated/YGFlexWrapTest.test.ts +1768 -0
- package/yoga/javascript/tests/generated/YGGapTest.test.ts +2857 -0
- package/yoga/javascript/tests/generated/YGIntrinsicSizeTest.test.ts +843 -0
- package/yoga/javascript/tests/generated/YGJustifyContentTest.test.ts +1750 -0
- package/yoga/javascript/tests/generated/YGMarginTest.test.ts +1657 -0
- package/yoga/javascript/tests/generated/YGMinMaxDimensionTest.test.ts +1111 -0
- package/yoga/javascript/tests/generated/YGPaddingTest.test.ts +276 -0
- package/yoga/javascript/tests/generated/YGPercentageTest.test.ts +1246 -0
- package/yoga/javascript/tests/generated/YGRoundingTest.test.ts +1044 -0
- package/yoga/javascript/tests/generated/YGSizeOverflowTest.test.ts +180 -0
- package/yoga/javascript/tests/generated/YGStaticPositionTest.test.ts +5741 -0
- package/yoga/javascript/tests/tools/MeasureCounter.ts +66 -0
- package/yoga/javascript/tests/tools/globals.ts +19 -0
- package/yoga/javascript/tests/tools/utils.ts +90 -0
- package/yoga/javascript/tsconfig.json +23 -0
- package/yoga/lib/jni/jni.h +13 -0
- package/yoga/lib/jni/real/jni.h +1141 -0
- package/yoga/lib/jsr-305/jsr305.jar +0 -0
- package/yoga/lib/nlohmann/json.hpp +24766 -0
- package/yoga/lib/soloader/soloader-0.5.1.aar +0 -0
- package/yoga/package.json +44 -0
- package/yoga/scripts/clang-format +52 -0
- package/yoga/scripts/clang-format.js +93 -0
- package/yoga/scripts/format-kotlin.js +88 -0
- package/yoga/scripts/format-python.js +150 -0
- package/yoga/scripts/format-utils.js +82 -0
- package/yoga/set-version.py +37 -0
- package/yoga/settings.gradle.kts +29 -0
- package/yoga/test/AssertFatalTest.cpp +70 -0
- package/yoga/tests/.clang-tidy +7 -0
- package/yoga/tests/CMakeLists.txt +35 -0
- package/yoga/tests/CacheTest.cpp +229 -0
- package/yoga/tests/EventPublisherTest.cpp +162 -0
- package/yoga/tests/EventsTest.cpp +362 -0
- package/yoga/tests/FlexGapTest.cpp +93 -0
- package/yoga/tests/FloatOptionalTest.cpp +214 -0
- package/yoga/tests/GridStyleTest.cpp +103 -0
- package/yoga/tests/OrdinalsTest.cpp +35 -0
- package/yoga/tests/SmallValueBufferTest.cpp +161 -0
- package/yoga/tests/StyleTest.cpp +48 -0
- package/yoga/tests/StyleValuePoolTest.cpp +146 -0
- package/yoga/tests/YGAlignBaselineTest.cpp +837 -0
- package/yoga/tests/YGAspectRatioTest.cpp +898 -0
- package/yoga/tests/YGAutoMinSizeTest.cpp +581 -0
- package/yoga/tests/YGBaselineFuncTest.cpp +62 -0
- package/yoga/tests/YGCloneNodeTest.cpp +131 -0
- package/yoga/tests/YGComputedMarginTest.cpp +117 -0
- package/yoga/tests/YGComputedPaddingTest.cpp +119 -0
- package/yoga/tests/YGConfigTest.cpp +239 -0
- package/yoga/tests/YGContentsNodeHasNewLayoutTest.cpp +190 -0
- package/yoga/tests/YGDefaultValuesTest.cpp +175 -0
- package/yoga/tests/YGDirtiedTest.cpp +110 -0
- package/yoga/tests/YGDirtyMarkingTest.cpp +341 -0
- package/yoga/tests/YGEdgeTest.cpp +161 -0
- package/yoga/tests/YGFirstChildMinWidthTest.cpp +133 -0
- package/yoga/tests/YGFlexBasisFitContentTest.cpp +241 -0
- package/yoga/tests/YGFlexShrinkBorderBugTest.cpp +48 -0
- package/yoga/tests/YGHadOverflowTest.cpp +135 -0
- package/yoga/tests/YGLayoutableChildrenTest.cpp +191 -0
- package/yoga/tests/YGMeasureCacheTest.cpp +178 -0
- package/yoga/tests/YGMeasureModeTest.cpp +332 -0
- package/yoga/tests/YGMeasureTest.cpp +1010 -0
- package/yoga/tests/YGNodeCallbackTest.cpp +80 -0
- package/yoga/tests/YGNodeChildTest.cpp +68 -0
- package/yoga/tests/YGPersistenceTest.cpp +291 -0
- package/yoga/tests/YGPersistentNodeCloningTest.cpp +214 -0
- package/yoga/tests/YGRelayoutTest.cpp +255 -0
- package/yoga/tests/YGRoundingFunctionTest.cpp +186 -0
- package/yoga/tests/YGRoundingMeasureFuncTest.cpp +139 -0
- package/yoga/tests/YGScaleChangeTest.cpp +176 -0
- package/yoga/tests/YGStyleTest.cpp +75 -0
- package/yoga/tests/YGTreeMutationTest.cpp +115 -0
- package/yoga/tests/YGValueTest.cpp +23 -0
- package/yoga/tests/YGZeroOutLayoutRecursivelyTest.cpp +37 -0
- package/yoga/tests/generated/YGAbsolutePositionTest.cpp +1685 -0
- package/yoga/tests/generated/YGAlignContentTest.cpp +5485 -0
- package/yoga/tests/generated/YGAlignItemsTest.cpp +2142 -0
- package/yoga/tests/generated/YGAlignSelfTest.cpp +257 -0
- package/yoga/tests/generated/YGAndroidNewsFeed.cpp +295 -0
- package/yoga/tests/generated/YGAspectRatioTest.cpp +55 -0
- package/yoga/tests/generated/YGAutoTest.cpp +312 -0
- package/yoga/tests/generated/YGBorderTest.cpp +208 -0
- package/yoga/tests/generated/YGBoxSizingTest.cpp +2192 -0
- package/yoga/tests/generated/YGDimensionTest.cpp +105 -0
- package/yoga/tests/generated/YGDisplayContentsTest.cpp +89 -0
- package/yoga/tests/generated/YGDisplayTest.cpp +1016 -0
- package/yoga/tests/generated/YGFlexBasisFitContentTest.cpp +378 -0
- package/yoga/tests/generated/YGFlexDirectionTest.cpp +4152 -0
- package/yoga/tests/generated/YGFlexTest.cpp +621 -0
- package/yoga/tests/generated/YGFlexWrapTest.cpp +1867 -0
- package/yoga/tests/generated/YGGapTest.cpp +3001 -0
- package/yoga/tests/generated/YGIntrinsicSizeTest.cpp +924 -0
- package/yoga/tests/generated/YGJustifyContentTest.cpp +1874 -0
- package/yoga/tests/generated/YGMarginTest.cpp +1811 -0
- package/yoga/tests/generated/YGMinMaxDimensionTest.cpp +1215 -0
- package/yoga/tests/generated/YGPaddingTest.cpp +295 -0
- package/yoga/tests/generated/YGPercentageTest.cpp +1350 -0
- package/yoga/tests/generated/YGRoundingTest.cpp +1093 -0
- package/yoga/tests/generated/YGSizeOverflowTest.cpp +179 -0
- package/yoga/tests/generated/YGStaticPositionTest.cpp +6035 -0
- package/yoga/tests/util/TestUtil.cpp +164 -0
- package/yoga/tests/util/TestUtil.h +43 -0
- package/yoga/unit_tests +25 -0
- package/yoga/unit_tests.bat +28 -0
- package/yoga/website/.eslintrc.cjs +26 -0
- package/yoga/website/README.md +41 -0
- package/yoga/website/babel.config.cjs +10 -0
- package/yoga/website/blog/2023-06-30-announcing-yoga-2.0.md +183 -0
- package/yoga/website/blog/2024-06-24-announcing-yoga-3.1.md +67 -0
- package/yoga/website/blog/2024-12-02-announcing-yoga-3.2.md +84 -0
- package/yoga/website/blog/authors.yml +10 -0
- package/yoga/website/blog/yoga-3-release/2024-03-14-announcing-yoga-3.0.md +586 -0
- package/yoga/website/blog/yoga-3-release/img/image1.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image10.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image11.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image12.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image13.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image14.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image15.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image16.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image17.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image2.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image3.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image4.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image5.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image6.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image7.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image8.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image9.png +0 -0
- package/yoga/website/docs/about-yoga.md +13 -0
- package/yoga/website/docs/advanced/_category_.json +4 -0
- package/yoga/website/docs/advanced/containing-block.md +89 -0
- package/yoga/website/docs/advanced/external-layout-systems.mdx +106 -0
- package/yoga/website/docs/advanced/incremental-layout.mdx +87 -0
- package/yoga/website/docs/getting-started/_category_.json +4 -0
- package/yoga/website/docs/getting-started/configuring-yoga.mdx +165 -0
- package/yoga/website/docs/getting-started/laying-out-a-tree.mdx +178 -0
- package/yoga/website/docs/img/config-contextual.svg +17 -0
- package/yoga/website/docs/img/config-per-node.svg +17 -0
- package/yoga/website/docs/img/config-uniform.svg +17 -0
- package/yoga/website/docs/img/invalidation-clean-tree.svg +17 -0
- package/yoga/website/docs/img/invalidation-dirtied-tree.svg +17 -0
- package/yoga/website/docs/img/invalidation-new-layout-tree.svg +17 -0
- package/yoga/website/docs/img/pixel-grid-after.png +0 -0
- package/yoga/website/docs/img/pixel-grid-before.png +0 -0
- package/yoga/website/docs/img/wireframe-example.svg +105 -0
- package/yoga/website/docs/styling/_category_.json +4 -0
- package/yoga/website/docs/styling/align-content.mdx +47 -0
- package/yoga/website/docs/styling/align-items-self.mdx +48 -0
- package/yoga/website/docs/styling/aspect-ratio.mdx +27 -0
- package/yoga/website/docs/styling/display.mdx +25 -0
- package/yoga/website/docs/styling/flex-basis-grow-shrink.mdx +65 -0
- package/yoga/website/docs/styling/flex-direction.mdx +37 -0
- package/yoga/website/docs/styling/flex-wrap.mdx +33 -0
- package/yoga/website/docs/styling/gap.mdx +49 -0
- package/yoga/website/docs/styling/index.md +48 -0
- package/yoga/website/docs/styling/insets.mdx +62 -0
- package/yoga/website/docs/styling/justify-content.mdx +43 -0
- package/yoga/website/docs/styling/layout-direction.mdx +34 -0
- package/yoga/website/docs/styling/margin-padding-border.mdx +41 -0
- package/yoga/website/docs/styling/min-max-width-height.mdx +52 -0
- package/yoga/website/docs/styling/position.mdx +37 -0
- package/yoga/website/docs/styling/width-height.mdx +37 -0
- package/yoga/website/docusaurus.config.js +113 -0
- package/yoga/website/package.json +43 -0
- package/yoga/website/sidebars.cjs +27 -0
- package/yoga/website/src/components/EditorToolbar.module.css +77 -0
- package/yoga/website/src/components/EditorToolbar.tsx +72 -0
- package/yoga/website/src/components/FlexStyle.ts +439 -0
- package/yoga/website/src/components/LayoutBox.module.css +68 -0
- package/yoga/website/src/components/LayoutBox.tsx +61 -0
- package/yoga/website/src/components/Playground.module.css +130 -0
- package/yoga/website/src/components/Playground.tsx +187 -0
- package/yoga/website/src/components/YogaViewer.tsx +128 -0
- package/yoga/website/src/css/custom.css +37 -0
- package/yoga/website/src/pages/index.module.css +34 -0
- package/yoga/website/src/pages/index.tsx +84 -0
- package/yoga/website/src/pages/markdown-page.md +7 -0
- package/yoga/website/src/pages/playground.module.css +11 -0
- package/yoga/website/src/pages/playground.tsx +56 -0
- package/yoga/website/static/.nojekyll +0 -0
- package/yoga/website/static/img/docusaurus.png +0 -0
- package/yoga/website/static/img/favicon.svg +17 -0
- package/yoga/website/static/img/link.svg +4 -0
- package/yoga/website/static/img/logo.svg +17 -0
- package/yoga/website/static/img/meta_oss.svg +1 -0
- package/yoga/website/static/img/opengraph.png +0 -0
- package/yoga/website/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/yoga/website/static/img/undraw_docusaurus_react.svg +170 -0
- package/yoga/website/static/img/undraw_docusaurus_tree.svg +40 -0
- package/yoga/website/tsconfig.json +10 -0
- package/yoga/yarn.lock +11499 -0
- package/yoga/yoga/CMakeLists.txt +41 -0
- package/yoga/yoga/YGConfig.cpp +92 -0
- package/yoga/yoga/YGConfig.h +158 -0
- package/yoga/yoga/YGEnums.cpp +304 -0
- package/yoga/yoga/YGEnums.h +163 -0
- package/yoga/yoga/YGMacros.h +101 -0
- package/yoga/yoga/YGNode.cpp +407 -0
- package/yoga/yoga/YGNode.h +373 -0
- package/yoga/yoga/YGNodeLayout.cpp +100 -0
- package/yoga/yoga/YGNodeLayout.h +43 -0
- package/yoga/yoga/YGNodeStyle.cpp +774 -0
- package/yoga/yoga/YGNodeStyle.h +243 -0
- package/yoga/yoga/YGPixelGrid.cpp +22 -0
- package/yoga/yoga/YGPixelGrid.h +29 -0
- package/yoga/yoga/YGValue.cpp +20 -0
- package/yoga/yoga/YGValue.h +83 -0
- package/yoga/yoga/Yoga.h +21 -0
- package/yoga/yoga/algorithm/AbsoluteLayout.cpp +595 -0
- package/yoga/yoga/algorithm/AbsoluteLayout.h +41 -0
- package/yoga/yoga/algorithm/Align.h +83 -0
- package/yoga/yoga/algorithm/Baseline.cpp +78 -0
- package/yoga/yoga/algorithm/Baseline.h +21 -0
- package/yoga/yoga/algorithm/BoundAxis.h +79 -0
- package/yoga/yoga/algorithm/Cache.cpp +121 -0
- package/yoga/yoga/algorithm/Cache.h +30 -0
- package/yoga/yoga/algorithm/CalculateLayout.cpp +2968 -0
- package/yoga/yoga/algorithm/CalculateLayout.h +60 -0
- package/yoga/yoga/algorithm/FlexDirection.h +120 -0
- package/yoga/yoga/algorithm/FlexLine.cpp +124 -0
- package/yoga/yoga/algorithm/FlexLine.h +75 -0
- package/yoga/yoga/algorithm/PixelGrid.cpp +138 -0
- package/yoga/yoga/algorithm/PixelGrid.h +29 -0
- package/yoga/yoga/algorithm/SizingMode.h +73 -0
- package/yoga/yoga/algorithm/TrailingPosition.h +44 -0
- package/yoga/yoga/config/Config.cpp +135 -0
- package/yoga/yoga/config/Config.h +93 -0
- package/yoga/yoga/debug/AssertFatal.cpp +54 -0
- package/yoga/yoga/debug/AssertFatal.h +29 -0
- package/yoga/yoga/debug/Log.cpp +107 -0
- package/yoga/yoga/debug/Log.h +34 -0
- package/yoga/yoga/enums/Align.h +49 -0
- package/yoga/yoga/enums/BoxSizing.h +40 -0
- package/yoga/yoga/enums/Dimension.h +40 -0
- package/yoga/yoga/enums/Direction.h +41 -0
- package/yoga/yoga/enums/Display.h +42 -0
- package/yoga/yoga/enums/Edge.h +47 -0
- package/yoga/yoga/enums/Errata.h +43 -0
- package/yoga/yoga/enums/ExperimentalFeature.h +40 -0
- package/yoga/yoga/enums/FlexDirection.h +42 -0
- package/yoga/yoga/enums/GridTrackType.h +43 -0
- package/yoga/yoga/enums/Gutter.h +41 -0
- package/yoga/yoga/enums/Justify.h +48 -0
- package/yoga/yoga/enums/LogLevel.h +44 -0
- package/yoga/yoga/enums/MeasureMode.h +41 -0
- package/yoga/yoga/enums/NodeType.h +40 -0
- package/yoga/yoga/enums/Overflow.h +41 -0
- package/yoga/yoga/enums/PhysicalEdge.h +21 -0
- package/yoga/yoga/enums/PositionType.h +41 -0
- package/yoga/yoga/enums/Unit.h +45 -0
- package/yoga/yoga/enums/Wrap.h +41 -0
- package/yoga/yoga/enums/YogaEnums.h +84 -0
- package/yoga/yoga/event/event.cpp +89 -0
- package/yoga/yoga/event/event.h +131 -0
- package/yoga/yoga/module.modulemap +21 -0
- package/yoga/yoga/node/CachedMeasurement.h +53 -0
- package/yoga/yoga/node/LayoutResults.cpp +48 -0
- package/yoga/yoga/node/LayoutResults.h +136 -0
- package/yoga/yoga/node/LayoutableChildren.h +148 -0
- package/yoga/yoga/node/Node.cpp +509 -0
- package/yoga/yoga/node/Node.h +372 -0
- package/yoga/yoga/numeric/Comparison.h +81 -0
- package/yoga/yoga/numeric/FloatOptional.h +84 -0
- package/yoga/yoga/style/GridLine.h +53 -0
- package/yoga/yoga/style/GridStyle.h +80 -0
- package/yoga/yoga/style/GridTrack.h +63 -0
- package/yoga/yoga/style/SmallValueBuffer.h +133 -0
- package/yoga/yoga/style/Style.h +932 -0
- package/yoga/yoga/style/StyleLength.h +121 -0
- package/yoga/yoga/style/StyleSizeLength.h +152 -0
- package/yoga/yoga/style/StyleValueHandle.h +114 -0
- package/yoga/yoga/style/StyleValuePool.h +194 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: Cache the installed copy of emsdk and its build artifacts
|
|
2
|
+
|
|
3
|
+
runs:
|
|
4
|
+
using: 'composite'
|
|
5
|
+
steps:
|
|
6
|
+
- name: Cache emsdk
|
|
7
|
+
uses: actions/cache@v3
|
|
8
|
+
with:
|
|
9
|
+
path: javascript/.emsdk
|
|
10
|
+
key: emsdk-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock', 'javascript/package.json', 'javascript/just.config.cjs')}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: Install Ninja
|
|
2
|
+
|
|
3
|
+
runs:
|
|
4
|
+
using: 'composite'
|
|
5
|
+
steps:
|
|
6
|
+
- name: Install ninja (Linux)
|
|
7
|
+
if: ${{ runner.os == 'Linux' }}
|
|
8
|
+
shell: bash
|
|
9
|
+
run: sudo apt-get install -y ninja-build
|
|
10
|
+
|
|
11
|
+
- name: Install ninja (Windows)
|
|
12
|
+
if: ${{ runner.os == 'Windows' }}
|
|
13
|
+
shell: powershell
|
|
14
|
+
run: choco install ninja
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Setup C++ envirionment
|
|
2
|
+
inputs:
|
|
3
|
+
toolchain:
|
|
4
|
+
description: Compiler toolchain to use (Clang, GCC, or MSVC)
|
|
5
|
+
required: false
|
|
6
|
+
default: 'Clang'
|
|
7
|
+
|
|
8
|
+
runs:
|
|
9
|
+
using: 'composite'
|
|
10
|
+
steps:
|
|
11
|
+
- name: Install Ninja
|
|
12
|
+
if: ${{ runner.os != 'Windows' }}
|
|
13
|
+
uses: ./.github/actions/install-ninja
|
|
14
|
+
|
|
15
|
+
- name: Set Clang as compiler
|
|
16
|
+
if: ${{ inputs.toolchain == 'Clang' }}
|
|
17
|
+
shell: bash
|
|
18
|
+
run: |
|
|
19
|
+
sudo apt-get install -y libc++-dev libc++abi-dev
|
|
20
|
+
echo "CC=/usr/bin/clang" >> $GITHUB_ENV
|
|
21
|
+
echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV
|
|
22
|
+
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
|
|
23
|
+
echo "LDFLAGS=-stdlib=libc++" >> $GITHUB_ENV
|
|
24
|
+
|
|
25
|
+
- name: Set GCC as compiler
|
|
26
|
+
if: ${{ inputs.toolchain == 'GCC' }}
|
|
27
|
+
shell: bash
|
|
28
|
+
run: |
|
|
29
|
+
echo "CC=/usr/bin/gcc" >> $GITHUB_ENV
|
|
30
|
+
echo "CXX=/usr/bin/g++" >> $GITHUB_ENV
|
|
31
|
+
|
|
32
|
+
- name: Setup VS Developer Command Prompt
|
|
33
|
+
if: ${{ runner.os == 'Windows' }}
|
|
34
|
+
uses: ilammy/msvc-dev-cmd@v1
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Setup JavaScript envirionment
|
|
2
|
+
|
|
3
|
+
runs:
|
|
4
|
+
using: 'composite'
|
|
5
|
+
steps:
|
|
6
|
+
- name: Setup Node environment
|
|
7
|
+
uses: actions/setup-node@v3
|
|
8
|
+
with:
|
|
9
|
+
node-version: 20.x
|
|
10
|
+
cache: yarn
|
|
11
|
+
cache-dependency-path: yarn.lock
|
|
12
|
+
env:
|
|
13
|
+
# https://github.com/actions/setup-node/issues/317
|
|
14
|
+
FORCE_COLOR: 0
|
|
15
|
+
|
|
16
|
+
- name: yarn install
|
|
17
|
+
shell: bash
|
|
18
|
+
run: yarn install --frozen-lockfile
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish Android Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
name: Publish to Maven Central
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- name: Setup
|
|
18
|
+
uses: ./.github/actions/setup-android
|
|
19
|
+
|
|
20
|
+
- name: Publish to Maven Local
|
|
21
|
+
run: ./gradlew publishToMavenLocal
|
|
22
|
+
env:
|
|
23
|
+
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
|
24
|
+
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
|
25
|
+
|
|
26
|
+
- name: Upload Build Artifacts
|
|
27
|
+
uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: 'snapshot-artifacts'
|
|
30
|
+
path: '~/.m2/repository/'
|
|
31
|
+
|
|
32
|
+
- name: Publish to the Maven Central
|
|
33
|
+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
|
34
|
+
env:
|
|
35
|
+
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
|
36
|
+
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
|
37
|
+
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
|
38
|
+
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish Android Snapshot
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
name: Publish Snapshot
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- name: Setup
|
|
18
|
+
uses: ./.github/actions/setup-android
|
|
19
|
+
|
|
20
|
+
- name: Publish to Maven Local
|
|
21
|
+
run: ./gradlew publishToMavenLocal
|
|
22
|
+
env:
|
|
23
|
+
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true
|
|
24
|
+
|
|
25
|
+
- name: Upload Build Artifacts
|
|
26
|
+
uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: 'snapshot-artifacts'
|
|
29
|
+
path: '~/.m2/repository/'
|
|
30
|
+
|
|
31
|
+
- name: Publish to the Snapshot Repository
|
|
32
|
+
run: ./gradlew publishToSonatype
|
|
33
|
+
env:
|
|
34
|
+
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
|
35
|
+
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
|
36
|
+
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish NPM Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
name: Publish to npmjs registry
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- name: Setup
|
|
18
|
+
uses: ./.github/actions/setup-js
|
|
19
|
+
|
|
20
|
+
- name: Store auth token in config file
|
|
21
|
+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
22
|
+
|
|
23
|
+
- name: yarn publish
|
|
24
|
+
run: yarn publish
|
|
25
|
+
working-directory: javascript
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Validate Android
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- 'release-*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build [${{ matrix.os }}][${{ matrix.mode }}]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
mode: [Debug, Release]
|
|
21
|
+
os: [ubuntu-latest, windows-latest]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v3
|
|
25
|
+
|
|
26
|
+
- name: Setup
|
|
27
|
+
uses: ./.github/actions/setup-android
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: ./gradlew assemble${{ matrix.mode }} --stacktrace
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Validate C++
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- 'release-*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
GTEST_COLOR: 1
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
name: Build and Test [${{ matrix.toolchain }}][${{ matrix.mode }}]
|
|
20
|
+
runs-on: ${{ (matrix.toolchain == 'MSVC') && 'windows-latest' || 'ubuntu-latest' }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
mode: [Debug, Release]
|
|
24
|
+
toolchain: [Clang, GCC] # TODO: fix issues building GTest Binary with MSVC in GitHub Actions
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
|
|
29
|
+
- name: Setup
|
|
30
|
+
uses: ./.github/actions/setup-cpp
|
|
31
|
+
with:
|
|
32
|
+
toolchain: ${{ matrix.toolchain }}
|
|
33
|
+
|
|
34
|
+
- name: Unit tests
|
|
35
|
+
run: ./unit_tests ${{ matrix.mode }}
|
|
36
|
+
|
|
37
|
+
build_fuzzers:
|
|
38
|
+
name: Build fuzzers [${{ matrix.toolchain }}][${{ matrix.mode }}]
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
mode: [Debug, Release]
|
|
43
|
+
toolchain: [Clang]
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v3
|
|
47
|
+
|
|
48
|
+
- name: Setup
|
|
49
|
+
uses: ./.github/actions/setup-cpp
|
|
50
|
+
with:
|
|
51
|
+
toolchain: ${{ matrix.toolchain }}
|
|
52
|
+
|
|
53
|
+
- name: Unit tests
|
|
54
|
+
run: ./build_fuzz_tests ${{ matrix.mode }}
|
|
55
|
+
|
|
56
|
+
benchmark:
|
|
57
|
+
name: Benchmark [${{ matrix.toolchain }}]
|
|
58
|
+
runs-on: ${{ (matrix.toolchain == 'MSVC') && 'windows-latest' || 'ubuntu-latest' }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
toolchain: [Clang, GCC, MSVC]
|
|
62
|
+
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v3
|
|
65
|
+
|
|
66
|
+
- name: Setup
|
|
67
|
+
uses: ./.github/actions/setup-cpp
|
|
68
|
+
with:
|
|
69
|
+
toolchain: ${{ matrix.toolchain }}
|
|
70
|
+
|
|
71
|
+
- name: Build and run benchmark
|
|
72
|
+
run: |
|
|
73
|
+
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
|
|
74
|
+
cmake --build build
|
|
75
|
+
./build/benchmark ./captures
|
|
76
|
+
working-directory: benchmark
|
|
77
|
+
|
|
78
|
+
- name: Build and run benchmarklegacy
|
|
79
|
+
run: ./build/benchmarklegacy
|
|
80
|
+
working-directory: benchmark
|
|
81
|
+
|
|
82
|
+
capture:
|
|
83
|
+
name: Capture [${{ matrix.toolchain }}]
|
|
84
|
+
runs-on: ${{ (matrix.toolchain == 'MSVC') && 'windows-latest' || 'ubuntu-latest' }}
|
|
85
|
+
strategy:
|
|
86
|
+
matrix:
|
|
87
|
+
toolchain: [Clang, GCC, MSVC]
|
|
88
|
+
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v3
|
|
91
|
+
|
|
92
|
+
- name: Setup
|
|
93
|
+
uses: ./.github/actions/setup-cpp
|
|
94
|
+
with:
|
|
95
|
+
toolchain: ${{ matrix.toolchain }}
|
|
96
|
+
|
|
97
|
+
- name: Build capture
|
|
98
|
+
run: |
|
|
99
|
+
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
|
|
100
|
+
cmake --build build
|
|
101
|
+
working-directory: capture
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Validate Formatting
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- 'release-*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
format:
|
|
16
|
+
name: Format
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v3
|
|
20
|
+
|
|
21
|
+
- name: Setup JavaScript
|
|
22
|
+
uses: ./.github/actions/setup-js
|
|
23
|
+
|
|
24
|
+
- name: Setup Java
|
|
25
|
+
uses: actions/setup-java@v4
|
|
26
|
+
with:
|
|
27
|
+
distribution: temurin
|
|
28
|
+
java-version: 17
|
|
29
|
+
|
|
30
|
+
- name: Setup Python
|
|
31
|
+
uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: '3.12'
|
|
34
|
+
|
|
35
|
+
- name: Check formatting
|
|
36
|
+
run: yarn format-check
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: Validate JavaScript
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- 'release-*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
FORCE_COLOR: 3
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
benchmark:
|
|
19
|
+
name: Benchmark [${{ matrix.os }}]
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, windows-latest]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v3
|
|
26
|
+
|
|
27
|
+
- name: Setup
|
|
28
|
+
uses: ./.github/actions/setup-js
|
|
29
|
+
|
|
30
|
+
- name: Restore emsdk
|
|
31
|
+
uses: ./.github/actions/cache-emsdk
|
|
32
|
+
|
|
33
|
+
- name: yarn benchmark
|
|
34
|
+
run: yarn benchmark
|
|
35
|
+
working-directory: javascript
|
|
36
|
+
|
|
37
|
+
build:
|
|
38
|
+
name: Build [${{ matrix.os }}]
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
os: [ubuntu-latest, windows-latest]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v3
|
|
45
|
+
|
|
46
|
+
- name: Setup
|
|
47
|
+
uses: ./.github/actions/setup-js
|
|
48
|
+
|
|
49
|
+
- name: Restore emsdk
|
|
50
|
+
uses: ./.github/actions/cache-emsdk
|
|
51
|
+
|
|
52
|
+
- name: yarn build
|
|
53
|
+
run: yarn build --verbose
|
|
54
|
+
working-directory: javascript
|
|
55
|
+
|
|
56
|
+
test:
|
|
57
|
+
name: Test [${{ matrix.os }}]
|
|
58
|
+
runs-on: ${{ matrix.os }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
os: [ubuntu-latest, windows-latest]
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v3
|
|
64
|
+
|
|
65
|
+
- name: Setup
|
|
66
|
+
uses: ./.github/actions/setup-js
|
|
67
|
+
|
|
68
|
+
- name: Restore emsdk
|
|
69
|
+
uses: ./.github/actions/cache-emsdk
|
|
70
|
+
|
|
71
|
+
- name: yarn test
|
|
72
|
+
run: yarn test
|
|
73
|
+
working-directory: javascript
|
|
74
|
+
|
|
75
|
+
lint:
|
|
76
|
+
name: ESLint (All Packages)
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v3
|
|
80
|
+
|
|
81
|
+
- name: Setup
|
|
82
|
+
uses: ./.github/actions/setup-js
|
|
83
|
+
|
|
84
|
+
- name: yarn lint
|
|
85
|
+
run: yarn lint
|
|
86
|
+
|
|
87
|
+
typecheck:
|
|
88
|
+
name: Typecheck
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v3
|
|
92
|
+
|
|
93
|
+
- name: Setup
|
|
94
|
+
uses: ./.github/actions/setup-js
|
|
95
|
+
|
|
96
|
+
- name: yarn tsc
|
|
97
|
+
run: yarn tsc
|
|
98
|
+
working-directory: javascript
|
|
99
|
+
|
|
100
|
+
pack:
|
|
101
|
+
name: Pack
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@v3
|
|
105
|
+
|
|
106
|
+
- name: Setup
|
|
107
|
+
uses: ./.github/actions/setup-js
|
|
108
|
+
|
|
109
|
+
- name: Restore emsdk
|
|
110
|
+
uses: ./.github/actions/cache-emsdk
|
|
111
|
+
|
|
112
|
+
- name: yarn pack
|
|
113
|
+
run: yarn pack --filename yoga-layout.tar.gz
|
|
114
|
+
working-directory: javascript
|
|
115
|
+
|
|
116
|
+
- uses: actions/upload-artifact@v4
|
|
117
|
+
with:
|
|
118
|
+
name: npm-package
|
|
119
|
+
path: javascript/yoga-layout.tar.gz
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Validate SwiftPM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- 'release-*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
name: Build
|
|
17
|
+
runs-on: macos-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v3
|
|
21
|
+
|
|
22
|
+
- name: Setup
|
|
23
|
+
uses: ./.github/actions/setup-apple
|
|
24
|
+
|
|
25
|
+
- name: Build Debug
|
|
26
|
+
run: swift build -c debug
|
|
27
|
+
|
|
28
|
+
- name: Build Release
|
|
29
|
+
run: swift build -c release
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Validate Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
validate:
|
|
15
|
+
name: Validate
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v3
|
|
19
|
+
|
|
20
|
+
- name: Setup JS
|
|
21
|
+
uses: ./.github/actions/setup-js
|
|
22
|
+
|
|
23
|
+
- name: yarn gentest-validate
|
|
24
|
+
run: yarn gentest-validate
|
|
25
|
+
|
|
26
|
+
- name: yarn gentest
|
|
27
|
+
run: yarn gentest -h
|
|
28
|
+
|
|
29
|
+
- name: Check for modified tests
|
|
30
|
+
run: |
|
|
31
|
+
if [[ -n $(git status -s) ]]; then
|
|
32
|
+
git status -s
|
|
33
|
+
echo "yarn gentest modified these tests. Please run yarn gentest to resolve."
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Validate Website
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build_next:
|
|
17
|
+
name: Build
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
|
|
23
|
+
- name: Setup
|
|
24
|
+
uses: ./.github/actions/setup-js
|
|
25
|
+
|
|
26
|
+
- name: Restore emsdk
|
|
27
|
+
uses: ./.github/actions/cache-emsdk
|
|
28
|
+
|
|
29
|
+
- name: Build Website
|
|
30
|
+
run: yarn build
|
|
31
|
+
working-directory: website
|
|
32
|
+
|
|
33
|
+
typecheck:
|
|
34
|
+
name: Typecheck [Docusaurus]
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v3
|
|
39
|
+
|
|
40
|
+
- name: Setup
|
|
41
|
+
uses: ./.github/actions/setup-js
|
|
42
|
+
|
|
43
|
+
- name: yarn tsc
|
|
44
|
+
run: yarn tsc
|
|
45
|
+
working-directory: website
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
arrowParens: 'avoid',
|
|
12
|
+
bracketSameLine: true,
|
|
13
|
+
bracketSpacing: false,
|
|
14
|
+
singleQuote: true,
|
|
15
|
+
trailingComma: 'all',
|
|
16
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Debug C++ Unit tests (lldb)",
|
|
9
|
+
"type": "cppdbg",
|
|
10
|
+
"MIMode": "lldb",
|
|
11
|
+
"request": "launch",
|
|
12
|
+
"program": "${workspaceFolder}/tests/build/yogatests",
|
|
13
|
+
"cwd": "${workspaceFolder}",
|
|
14
|
+
"preLaunchTask": "Build Unit Tests"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "Debug C++ Unit tests (vsdbg)",
|
|
18
|
+
"type": "cppvsdbg",
|
|
19
|
+
"request": "launch",
|
|
20
|
+
"program": "${workspaceFolder}/tests/build/yogatests",
|
|
21
|
+
"cwd": "${workspaceFolder}",
|
|
22
|
+
"preLaunchTask": "Build Unit Tests"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.formatOnSave": true,
|
|
3
|
+
"editor.codeActionsOnSave": {
|
|
4
|
+
"source.fixAll.eslint": true
|
|
5
|
+
},
|
|
6
|
+
"eslint.format.enable": true,
|
|
7
|
+
"eslint.packageManager": "yarn",
|
|
8
|
+
"eslint.enable": true,
|
|
9
|
+
"eslint.validate": [
|
|
10
|
+
"javascript",
|
|
11
|
+
"javascriptreact",
|
|
12
|
+
"typescript",
|
|
13
|
+
"typescriptreact"
|
|
14
|
+
],
|
|
15
|
+
"eslint.workingDirectories": [
|
|
16
|
+
{
|
|
17
|
+
"mode": "auto"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
}
|