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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Margelo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Package.swift
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// swift-tools-version: 6.4
|
|
2
|
+
|
|
3
|
+
import Foundation
|
|
4
|
+
import PackageDescription
|
|
5
|
+
|
|
6
|
+
let manifestURL = URL(fileURLWithPath: #filePath)
|
|
7
|
+
let packageURL = manifestURL.deletingLastPathComponent()
|
|
8
|
+
let hermesURL = packageURL.appendingPathComponent("../react-nitro-hermes")
|
|
9
|
+
let hermesDirectory = hermesURL.path
|
|
10
|
+
|
|
11
|
+
let package = Package(
|
|
12
|
+
name: "ReactNitroYoga",
|
|
13
|
+
platforms: [.iOS(.v16), .macOS(.v13)],
|
|
14
|
+
products: [
|
|
15
|
+
.library(name: "Yoga", targets: ["YogaCore"]),
|
|
16
|
+
.library(name: "ReactNitroYoga", targets: ["ReactNitroYoga"]),
|
|
17
|
+
],
|
|
18
|
+
dependencies: [
|
|
19
|
+
.package(path: "../react-nitro-hermes"),
|
|
20
|
+
],
|
|
21
|
+
targets: [
|
|
22
|
+
.target(
|
|
23
|
+
name: "YogaCore",
|
|
24
|
+
path: "yoga",
|
|
25
|
+
sources: ["yoga"],
|
|
26
|
+
publicHeadersPath: ".",
|
|
27
|
+
cxxSettings: [
|
|
28
|
+
.define("NDEBUG", .when(configuration: .release)),
|
|
29
|
+
.headerSearchPath("."),
|
|
30
|
+
]
|
|
31
|
+
),
|
|
32
|
+
.target(
|
|
33
|
+
name: "ReactNitroYoga",
|
|
34
|
+
dependencies: [
|
|
35
|
+
"YogaCore",
|
|
36
|
+
.product(name: "Hermes", package: "react-nitro-hermes"),
|
|
37
|
+
],
|
|
38
|
+
path: ".",
|
|
39
|
+
sources: ["Generated/yoga.c", "Sources/ReactNitroYoga/InstallHermesBindings.cpp"],
|
|
40
|
+
publicHeadersPath: "include",
|
|
41
|
+
cSettings: [
|
|
42
|
+
.define("STATIC_HERMES"),
|
|
43
|
+
.define("NDEBUG", .when(configuration: .release)),
|
|
44
|
+
.headerSearchPath("Generated"),
|
|
45
|
+
// Match the VM layout used by the pinned Hermes Swift package.
|
|
46
|
+
.unsafeFlags([
|
|
47
|
+
"-I\(hermesDirectory)/Generated/include",
|
|
48
|
+
"-I\(hermesDirectory)/hermes/include",
|
|
49
|
+
"-fno-strict-aliasing",
|
|
50
|
+
"-fno-strict-overflow",
|
|
51
|
+
]),
|
|
52
|
+
]
|
|
53
|
+
),
|
|
54
|
+
],
|
|
55
|
+
cLanguageStandard: .gnu11,
|
|
56
|
+
cxxLanguageStandard: .cxx20
|
|
57
|
+
)
|
package/README.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Nitro Yoga
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This package owns Yoga's native build, generated FFI bindings, and Hermes runtime
|
|
4
|
+
initialization. The `yoga` Git submodule is pinned to
|
|
5
|
+
`9d159f2d3d8dbc777e1f82c20b94e369c113d608`.
|
|
6
|
+
|
|
7
|
+
`ffi.config.ts` selects the C functions to expose. It uses `yoga/yoga` as the CMake
|
|
8
|
+
source directory and `yogacore` as the native target. The shared builder in
|
|
9
|
+
`react-nitro-ffigen` handles generation, type checking, native compilation, and
|
|
10
|
+
the exported Static Hermes unit.
|
|
11
|
+
|
|
12
|
+
From the repository root:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
git submodule update --init --recursive
|
|
16
|
+
bun install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The build needs Bun, Clang, CMake, and Ninja. The root postinstall runs the
|
|
20
|
+
workspace `build` scripts in dependency order: Hermes's compiler is built
|
|
21
|
+
before this package builds native Yoga and generates its bindings. Native
|
|
22
|
+
builds are incremental and target the macOS host.
|
|
23
|
+
|
|
24
|
+
To rebuild only Yoga after editing its FFI configuration, run
|
|
25
|
+
`bun run --cwd packages/react-nitro-yoga build` from the repository root.
|
|
26
|
+
|
|
27
|
+
Outputs belong to this package:
|
|
28
|
+
|
|
29
|
+
- `Generated/native.ts`, `native.d.ts`, `api.d.ts`, and `ffigen_yoga_adapters.h`
|
|
30
|
+
- `Generated/yoga.c`, the exported Static Hermes unit
|
|
31
|
+
- `.build/yoga/libyogacore.a`, the native library for the host target
|
|
32
|
+
|
|
33
|
+
The generated sources are checked in so Xcode does not need Bun or CMake during
|
|
34
|
+
an app build. Regenerate them with this package's `build` command; do not edit
|
|
35
|
+
them by hand.
|
|
36
|
+
The generated native declarations import shared Hermes types from
|
|
37
|
+
`react-nitro-ffigen/hermes`.
|
|
38
|
+
|
|
39
|
+
Import public types from this package:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import type { YGNodeRef } from "react-nitro-yoga";
|
|
43
|
+
|
|
44
|
+
const node: YGNodeRef = globalThis.yoga.YGNodeNew();
|
|
45
|
+
globalThis.yoga.YGNodeFreeRecursive(node);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Declare `react-nitro-yoga` as a dependency of the consuming package. The type
|
|
49
|
+
import also declares `globalThis.yoga`; native initialization must run before
|
|
50
|
+
application JavaScript uses it.
|
|
51
|
+
|
|
52
|
+
`Package.swift` exposes two products:
|
|
53
|
+
|
|
54
|
+
- `Yoga` compiles the submodule's native C++ sources and exposes `<yoga/Yoga.h>`
|
|
55
|
+
and `import yoga`. The renderer depends on this product.
|
|
56
|
+
- `ReactNitroYoga` compiles the generated C unit and the C++ runtime initializer. It
|
|
57
|
+
depends on `Yoga` and `Hermes`. `ReactNitroRuntime` calls
|
|
58
|
+
`margelo::nitro::yoga::installHermesBindings` for each new Hermes runtime, before
|
|
59
|
+
application JavaScript runs.
|
|
60
|
+
|
|
61
|
+
The renderer has no dependency on the Hermes bridge. Its Nitro bindings still
|
|
62
|
+
use JSI through `NitroModules`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#include <ReactNitroYoga/InstallHermesBindings.hpp>
|
|
2
|
+
#include "SHUnit.h"
|
|
3
|
+
#include <hermes/hermes.h>
|
|
4
|
+
|
|
5
|
+
namespace margelo::nitro::yoga {
|
|
6
|
+
|
|
7
|
+
void installHermesBindings(facebook::hermes::HermesRuntime& runtime) {
|
|
8
|
+
runtime.evaluateSHUnit(sh_export_yoga);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
} // namespace margelo::nitro::yoga
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
namespace facebook::hermes {
|
|
4
|
+
class HermesRuntime;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
namespace margelo::nitro::yoga {
|
|
8
|
+
|
|
9
|
+
/** Install React Nitro's Yoga bindings before application JavaScript runs. */
|
|
10
|
+
void installHermesBindings(facebook::hermes::HermesRuntime& runtime);
|
|
11
|
+
|
|
12
|
+
} // namespace margelo::nitro::yoga
|
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-nitro-yoga",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1-alpha.7",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"tag": "latest",
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./Generated/api.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/margelo/react-nitro.git",
|
|
19
|
+
"directory": "packages/react-nitro-yoga"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"Package.swift",
|
|
23
|
+
"Sources",
|
|
24
|
+
"Generated",
|
|
25
|
+
"include",
|
|
26
|
+
"yoga"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
AccessModifierOffset: -1
|
|
2
|
+
AlignAfterOpenBracket: AlwaysBreak
|
|
3
|
+
AlignConsecutiveMacros: false
|
|
4
|
+
AlignConsecutiveAssignments: false
|
|
5
|
+
AlignConsecutiveBitFields: false
|
|
6
|
+
AlignConsecutiveDeclarations: false
|
|
7
|
+
AlignEscapedNewlines: Left
|
|
8
|
+
AlignOperands: DontAlign
|
|
9
|
+
AlignTrailingComments: false
|
|
10
|
+
AllowAllArgumentsOnNextLine: true
|
|
11
|
+
AllowAllConstructorInitializersOnNextLine: true
|
|
12
|
+
AllowAllParametersOfDeclarationOnNextLine: false
|
|
13
|
+
AllowShortEnumsOnASingleLine: true
|
|
14
|
+
AllowShortBlocksOnASingleLine: Never
|
|
15
|
+
AllowShortCaseLabelsOnASingleLine: false
|
|
16
|
+
AllowShortFunctionsOnASingleLine: Empty
|
|
17
|
+
AllowShortLambdasOnASingleLine: All
|
|
18
|
+
AllowShortIfStatementsOnASingleLine: Never
|
|
19
|
+
AllowShortLoopsOnASingleLine: false
|
|
20
|
+
AlwaysBreakAfterReturnType: None
|
|
21
|
+
AlwaysBreakBeforeMultilineStrings: true
|
|
22
|
+
AlwaysBreakTemplateDeclarations: Yes
|
|
23
|
+
BinPackArguments: false
|
|
24
|
+
BinPackParameters: false
|
|
25
|
+
BreakBeforeBinaryOperators: None
|
|
26
|
+
BreakBeforeBraces: Attach
|
|
27
|
+
BreakInheritanceList: BeforeColon
|
|
28
|
+
BreakBeforeTernaryOperators: true
|
|
29
|
+
BreakConstructorInitializers: BeforeColon
|
|
30
|
+
BreakAfterJavaFieldAnnotations: false
|
|
31
|
+
BreakStringLiterals: false
|
|
32
|
+
ColumnLimit: 80
|
|
33
|
+
CommentPragmas: '^ IWYU pragma:'
|
|
34
|
+
CompactNamespaces: false
|
|
35
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
36
|
+
ConstructorInitializerIndentWidth: 4
|
|
37
|
+
ContinuationIndentWidth: 4
|
|
38
|
+
Cpp11BracedListStyle: true
|
|
39
|
+
DeriveLineEnding: true
|
|
40
|
+
DerivePointerAlignment: false
|
|
41
|
+
DisableFormat: false
|
|
42
|
+
FixNamespaceComments: true
|
|
43
|
+
ForEachMacros:
|
|
44
|
+
- FOR_EACH
|
|
45
|
+
- FOR_EACH_R
|
|
46
|
+
- FOR_EACH_RANGE
|
|
47
|
+
IncludeBlocks: Preserve
|
|
48
|
+
IncludeCategories:
|
|
49
|
+
- Regex: '^<.*\.h(pp)?>'
|
|
50
|
+
Priority: 1
|
|
51
|
+
- Regex: '^<.*'
|
|
52
|
+
Priority: 2
|
|
53
|
+
- Regex: '.*'
|
|
54
|
+
Priority: 3
|
|
55
|
+
IndentCaseLabels: true
|
|
56
|
+
IndentCaseBlocks: false
|
|
57
|
+
IndentGotoLabels: true
|
|
58
|
+
IndentPPDirectives: None
|
|
59
|
+
IndentExternBlock: AfterExternBlock
|
|
60
|
+
IndentWidth: 2
|
|
61
|
+
IndentWrappedFunctionNames: false
|
|
62
|
+
InsertTrailingCommas: None
|
|
63
|
+
JavaScriptQuotes: Leave
|
|
64
|
+
JavaScriptWrapImports: true
|
|
65
|
+
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
66
|
+
MacroBlockBegin: ''
|
|
67
|
+
MacroBlockEnd: ''
|
|
68
|
+
MaxEmptyLinesToKeep: 1
|
|
69
|
+
NamespaceIndentation: None
|
|
70
|
+
ObjCBinPackProtocolList: Auto
|
|
71
|
+
ObjCBlockIndentWidth: 2
|
|
72
|
+
ObjCBreakBeforeNestedBlockParam: true
|
|
73
|
+
ObjCSpaceAfterProperty: false
|
|
74
|
+
ObjCSpaceBeforeProtocolList: false
|
|
75
|
+
PenaltyBreakAssignment: 2
|
|
76
|
+
PenaltyBreakBeforeFirstCallParameter: 1
|
|
77
|
+
PenaltyBreakComment: 300
|
|
78
|
+
PenaltyBreakFirstLessLess: 120
|
|
79
|
+
PenaltyBreakString: 1000
|
|
80
|
+
PenaltyBreakTemplateDeclaration: 10
|
|
81
|
+
PenaltyExcessCharacter: 1000000
|
|
82
|
+
PenaltyReturnTypeOnItsOwnLine: 200
|
|
83
|
+
PointerAlignment: Left
|
|
84
|
+
ReflowComments: true
|
|
85
|
+
SortIncludes: true
|
|
86
|
+
SortUsingDeclarations: true
|
|
87
|
+
SpaceAfterCStyleCast: false
|
|
88
|
+
SpaceAfterLogicalNot: false
|
|
89
|
+
SpaceAfterTemplateKeyword: true
|
|
90
|
+
SpaceBeforeAssignmentOperators: true
|
|
91
|
+
SpaceBeforeCpp11BracedList: false
|
|
92
|
+
SpaceBeforeCtorInitializerColon: true
|
|
93
|
+
SpaceBeforeInheritanceColon: true
|
|
94
|
+
SpaceBeforeParens: ControlStatements
|
|
95
|
+
SpaceBeforeRangeBasedForLoopColon: true
|
|
96
|
+
SpaceInEmptyBlock: false
|
|
97
|
+
SpaceInEmptyParentheses: false
|
|
98
|
+
SpacesBeforeTrailingComments: 1
|
|
99
|
+
SpacesInAngles: false
|
|
100
|
+
SpacesInConditionalStatement: false
|
|
101
|
+
SpacesInContainerLiterals: true
|
|
102
|
+
SpacesInCStyleCastParentheses: false
|
|
103
|
+
SpacesInParentheses: false
|
|
104
|
+
SpacesInSquareBrackets: false
|
|
105
|
+
SpaceBeforeSquareBrackets: false
|
|
106
|
+
Standard: Latest
|
|
107
|
+
TabWidth: 8
|
|
108
|
+
UseCRLF: false
|
|
109
|
+
UseTab: Never
|
package/yoga/.clang-tidy
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
InheritParentConfig: true
|
|
3
|
+
Checks: '>
|
|
4
|
+
bugprone-argument-comment,
|
|
5
|
+
bugprone-assert-side-effect,
|
|
6
|
+
bugprone-bool-pointer-implicit-conversion,
|
|
7
|
+
bugprone-copy-constructor-init,
|
|
8
|
+
bugprone-dangling-handle,
|
|
9
|
+
bugprone-exception-escape,
|
|
10
|
+
bugprone-fold-init-type,
|
|
11
|
+
bugprone-forward-declaration-namespace,
|
|
12
|
+
bugprone-forwarding-reference-overload,
|
|
13
|
+
bugprone-incorrect-enable-if,
|
|
14
|
+
bugprone-inaccurate-erase,
|
|
15
|
+
bugprone-incorrect-roundings,
|
|
16
|
+
bugprone-infinite-loop,
|
|
17
|
+
bugprone-integer-division,
|
|
18
|
+
bugprone-macro-parentheses,
|
|
19
|
+
bugprone-macro-repeated-side-effects,
|
|
20
|
+
bugprone-misplaced-operator-in-strlen-in-alloc,
|
|
21
|
+
bugprone-misplaced-widening-cast,
|
|
22
|
+
bugprone-move-forwarding-reference,
|
|
23
|
+
bugprone-multiple-statement-macro,
|
|
24
|
+
bugprone-optional-value-conversion,
|
|
25
|
+
bugprone-parent-virtual-call,
|
|
26
|
+
bugprone-redundant-branch-condition,
|
|
27
|
+
bugprone-shared-ptr-array-mismatch,
|
|
28
|
+
bugprone-signed-char-misuse,
|
|
29
|
+
bugprone-sizeof-container,
|
|
30
|
+
bugprone-sizeof-expression,
|
|
31
|
+
bugprone-string-constructor,
|
|
32
|
+
bugprone-string-integer-assignment,
|
|
33
|
+
bugprone-string-literal-with-embedded-nul,
|
|
34
|
+
bugprone-suspicious-enum-usage,
|
|
35
|
+
bugprone-suspicious-memset-usage,
|
|
36
|
+
bugprone-suspicious-missing-comma,
|
|
37
|
+
bugprone-suspicious-semicolon,
|
|
38
|
+
bugprone-suspicious-string-compare,
|
|
39
|
+
bugprone-swapped-arguments,
|
|
40
|
+
bugprone-terminating-continue,
|
|
41
|
+
bugprone-throw-keyword-missing,
|
|
42
|
+
bugprone-too-small-loop-variable,
|
|
43
|
+
bugprone-undefined-memory-manipulation,
|
|
44
|
+
bugprone-undelegated-constructor,
|
|
45
|
+
bugprone-unique-ptr-array-mismatch,
|
|
46
|
+
bugprone-unsafe-functions,
|
|
47
|
+
bugprone-unused-raii,
|
|
48
|
+
bugprone-unused-return-value,
|
|
49
|
+
bugprone-use-after-move,
|
|
50
|
+
bugprone-virtual-near-miss,
|
|
51
|
+
clang-analyzer-apiModeling.google.GTest,
|
|
52
|
+
clang-analyzer-apiModeling.StdCLibraryFunctions,
|
|
53
|
+
clang-analyzer-apiModeling.TrustNonnull,
|
|
54
|
+
clang-analyzer-core.builtin.BuiltinFunctions,
|
|
55
|
+
clang-analyzer-core.builtin.NoReturnFunctions,
|
|
56
|
+
clang-analyzer-core.CallAndMessage,
|
|
57
|
+
clang-analyzer-core.DivideZero,
|
|
58
|
+
clang-analyzer-core.DynamicTypePropagation,
|
|
59
|
+
clang-analyzer-core.NonnilStringConstants,
|
|
60
|
+
clang-analyzer-core.NonNullParamChecker,
|
|
61
|
+
clang-analyzer-core.NullDereference,
|
|
62
|
+
clang-analyzer-core.StackAddressEscape,
|
|
63
|
+
clang-analyzer-core.UndefinedBinaryOperatorResult,
|
|
64
|
+
clang-analyzer-core.uninitialized.ArraySubscript,
|
|
65
|
+
clang-analyzer-core.uninitialized.Assign,
|
|
66
|
+
clang-analyzer-core.uninitialized.Branch,
|
|
67
|
+
clang-analyzer-core.uninitialized.CapturedBlockVariable,
|
|
68
|
+
clang-analyzer-core.uninitialized.UndefReturn,
|
|
69
|
+
clang-analyzer-core.VLASize,
|
|
70
|
+
clang-analyzer-cplusplus.InnerPointer,
|
|
71
|
+
clang-analyzer-cplusplus.Move,
|
|
72
|
+
clang-analyzer-cplusplus.NewDelete,
|
|
73
|
+
clang-analyzer-cplusplus.NewDeleteLeaks,
|
|
74
|
+
clang-analyzer-cplusplus.SelfAssignment,
|
|
75
|
+
clang-analyzer-deadcode.DeadStores,
|
|
76
|
+
clang-analyzer-nullability.NullableDereferenced,
|
|
77
|
+
clang-analyzer-nullability.NullablePassedToNonnull,
|
|
78
|
+
clang-analyzer-nullability.NullableReturnedFromNonnull,
|
|
79
|
+
clang-analyzer-nullability.NullPassedToNonnull,
|
|
80
|
+
clang-analyzer-nullability.NullReturnedFromNonnull,
|
|
81
|
+
clang-analyzer-optin.cplusplus.VirtualCall,
|
|
82
|
+
clang-analyzer-optin.mpi.MPI-Checker,
|
|
83
|
+
clang-analyzer-optin.performance.GCDAntipattern,
|
|
84
|
+
clang-analyzer-optin.performance.Padding,
|
|
85
|
+
clang-analyzer-optin.portability.UnixAPI,
|
|
86
|
+
clang-analyzer-security.FloatLoopCounter,
|
|
87
|
+
clang-analyzer-security.insecureAPI.bcmp,
|
|
88
|
+
clang-analyzer-security.insecureAPI.bcopy,
|
|
89
|
+
clang-analyzer-security.insecureAPI.bzero,
|
|
90
|
+
clang-analyzer-security.insecureAPI.getpw,
|
|
91
|
+
clang-analyzer-security.insecureAPI.gets,
|
|
92
|
+
clang-analyzer-security.insecureAPI.mkstemp,
|
|
93
|
+
clang-analyzer-security.insecureAPI.mktemp,
|
|
94
|
+
clang-analyzer-security.insecureAPI.rand,
|
|
95
|
+
clang-analyzer-security.insecureAPI.strcpy,
|
|
96
|
+
clang-analyzer-security.insecureAPI.UncheckedReturn,
|
|
97
|
+
clang-analyzer-security.insecureAPI.vfork,
|
|
98
|
+
clang-analyzer-unix.API,
|
|
99
|
+
clang-analyzer-unix.cstring.BadSizeArg,
|
|
100
|
+
clang-analyzer-unix.cstring.NullArg,
|
|
101
|
+
clang-analyzer-unix.Malloc,
|
|
102
|
+
clang-analyzer-unix.MallocSizeof,
|
|
103
|
+
clang-analyzer-unix.MismatchedDeallocator,
|
|
104
|
+
clang-analyzer-unix.Vfork,
|
|
105
|
+
clang-analyzer-valist.CopyToSelf,
|
|
106
|
+
clang-analyzer-valist.Uninitialized,
|
|
107
|
+
clang-analyzer-valist.Unterminated,
|
|
108
|
+
clang-diagnostic-*,
|
|
109
|
+
cppcoreguidelines-avoid-const-or-ref-data-members,
|
|
110
|
+
cppcoreguidelines-avoid-non-const-global-variables,
|
|
111
|
+
cppcoreguidelines-init-variables,
|
|
112
|
+
cppcoreguidelines-interfaces-global-init,
|
|
113
|
+
cppcoreguidelines-macro-usage,
|
|
114
|
+
cppcoreguidelines-missing-std-forward,
|
|
115
|
+
cppcoreguidelines-narrowing-conversions,
|
|
116
|
+
cppcoreguidelines-no-malloc,
|
|
117
|
+
cppcoreguidelines-prefer-member-initializer,
|
|
118
|
+
cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
119
|
+
cppcoreguidelines-pro-type-const-cast,
|
|
120
|
+
cppcoreguidelines-pro-type-cstyle-cast,
|
|
121
|
+
cppcoreguidelines-pro-type-member-init,
|
|
122
|
+
cppcoreguidelines-pro-type-reinterpret-cast,
|
|
123
|
+
cppcoreguidelines-pro-type-union-access,
|
|
124
|
+
cppcoreguidelines-pro-type-vararg,
|
|
125
|
+
cppcoreguidelines-slicing,
|
|
126
|
+
cppcoreguidelines-special-member-functions,
|
|
127
|
+
facebook-hte-BadEnum,
|
|
128
|
+
facebook-hte-MissingStatic,
|
|
129
|
+
google-build-using-namespace,
|
|
130
|
+
misc-definitions-in-headers,
|
|
131
|
+
misc-header-include-cycle,
|
|
132
|
+
misc-misplaced-const,
|
|
133
|
+
misc-new-delete-overloads,
|
|
134
|
+
misc-non-copyable-objects,
|
|
135
|
+
misc-static-assert,
|
|
136
|
+
misc-throw-by-value-catch-by-reference,
|
|
137
|
+
misc-unconventional-assign-operator,
|
|
138
|
+
misc-uniqueptr-reset-release,
|
|
139
|
+
misc-unused-alias-decls,
|
|
140
|
+
misc-unused-parameters,
|
|
141
|
+
misc-unused-using-decls,
|
|
142
|
+
modernize-avoid-bind,
|
|
143
|
+
modernize-avoid-c-arrays,
|
|
144
|
+
modernize-concat-nested-namespaces,
|
|
145
|
+
modernize-deprecated-headers,
|
|
146
|
+
modernize-deprecated-ios-base-aliases,
|
|
147
|
+
modernize-loop-convert,
|
|
148
|
+
modernize-make-shared,
|
|
149
|
+
modernize-make-unique,
|
|
150
|
+
modernize-pass-by-value,
|
|
151
|
+
modernize-raw-string-literal,
|
|
152
|
+
modernize-redundant-void-arg,
|
|
153
|
+
modernize-replace-auto-ptr,
|
|
154
|
+
modernize-replace-random-shuffle,
|
|
155
|
+
modernize-return-braced-init-list,
|
|
156
|
+
modernize-shrink-to-fit,
|
|
157
|
+
modernize-unary-static-assert,
|
|
158
|
+
modernize-use-auto,
|
|
159
|
+
modernize-use-bool-literals,
|
|
160
|
+
modernize-use-constraints,
|
|
161
|
+
modernize-use-default-member-init,
|
|
162
|
+
modernize-use-designated-initializers,
|
|
163
|
+
modernize-use-emplace,
|
|
164
|
+
modernize-use-equals-default,
|
|
165
|
+
modernize-use-equals-delete,
|
|
166
|
+
modernize-use-noexcept,
|
|
167
|
+
modernize-use-nullptr,
|
|
168
|
+
modernize-use-override,
|
|
169
|
+
modernize-use-starts-ends-with,
|
|
170
|
+
modernize-use-transparent-functors,
|
|
171
|
+
modernize-use-using,
|
|
172
|
+
performance-faster-string-find,
|
|
173
|
+
performance-for-range-copy,
|
|
174
|
+
performance-implicit-conversion-in-loop,
|
|
175
|
+
performance-inefficient-algorithm,
|
|
176
|
+
performance-inefficient-string-concatenation,
|
|
177
|
+
performance-inefficient-vector-operation,
|
|
178
|
+
performance-move-const-arg,
|
|
179
|
+
performance-move-constructor-init,
|
|
180
|
+
performance-noexcept-move-constructor,
|
|
181
|
+
performance-type-promotion-in-math-fn,
|
|
182
|
+
performance-unnecessary-copy-initialization,
|
|
183
|
+
performance-unnecessary-value-param,
|
|
184
|
+
readability-avoid-const-params-in-decls,
|
|
185
|
+
readability-braces-around-statements,
|
|
186
|
+
readability-const-return-type,
|
|
187
|
+
readability-container-size-empty,
|
|
188
|
+
readability-delete-null-pointer,
|
|
189
|
+
readability-deleted-default,
|
|
190
|
+
readability-implicit-bool-conversion,
|
|
191
|
+
readability-inconsistent-declaration-parameter-name,
|
|
192
|
+
readability-isolate-declaration,
|
|
193
|
+
readability-misplaced-array-index,
|
|
194
|
+
readability-named-parameter,
|
|
195
|
+
readability-non-const-parameter,
|
|
196
|
+
readability-redundant-control-flow,
|
|
197
|
+
readability-redundant-declaration,
|
|
198
|
+
readability-redundant-function-ptr-dereference,
|
|
199
|
+
readability-redundant-preprocessor,
|
|
200
|
+
readability-redundant-smartptr-get,
|
|
201
|
+
readability-redundant-string-cstr,
|
|
202
|
+
readability-redundant-string-init,
|
|
203
|
+
readability-simplify-boolean-expr,
|
|
204
|
+
readability-simplify-subscript-expr,
|
|
205
|
+
readability-static-accessed-through-instance,
|
|
206
|
+
readability-static-definition-in-anonymous-namespace,
|
|
207
|
+
readability-string-compare,
|
|
208
|
+
readability-uniqueptr-delete-release,
|
|
209
|
+
'
|
|
210
|
+
|
|
211
|
+
CheckOptions:
|
|
212
|
+
- key: performance-unnecessary-value-param.AllowedTypes
|
|
213
|
+
value: '[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;'
|
|
214
|
+
- key: performance-unnecessary-copy-initialization.AllowedTypes
|
|
215
|
+
value: '[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$'
|
|
216
|
+
|
|
217
|
+
...
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
root: true,
|
|
12
|
+
ignorePatterns: ['**/binaries/**', '**/build/**', '**/generated/**'],
|
|
13
|
+
overrides: [
|
|
14
|
+
// Catch-all
|
|
15
|
+
{
|
|
16
|
+
files: ['**/*.?(m|c){j,t}s?(x)'],
|
|
17
|
+
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
|
|
18
|
+
plugins: ['prettier'],
|
|
19
|
+
rules: {
|
|
20
|
+
'no-unused-vars': ['error', {argsIgnorePattern: '^_'}],
|
|
21
|
+
'no-var': 'error',
|
|
22
|
+
'prefer-arrow-callback': 'error',
|
|
23
|
+
'prefer-const': 'error',
|
|
24
|
+
'prefer-object-spread': 'error',
|
|
25
|
+
'prefer-spread': 'error',
|
|
26
|
+
'require-await': 'error',
|
|
27
|
+
},
|
|
28
|
+
env: {
|
|
29
|
+
es2020: true,
|
|
30
|
+
'shared-node-browser': true,
|
|
31
|
+
},
|
|
32
|
+
parserOptions: {
|
|
33
|
+
ecmaVersion: 'latest',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
// ES Modules
|
|
37
|
+
{
|
|
38
|
+
files: ['**/*.?(m){j,t}s?(x)'],
|
|
39
|
+
parserOptions: {
|
|
40
|
+
sourceType: 'module',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
// CommonJS Modules
|
|
44
|
+
{
|
|
45
|
+
files: ['**/*.c{j,t}s?(x)'],
|
|
46
|
+
env: {
|
|
47
|
+
commonjs: true,
|
|
48
|
+
},
|
|
49
|
+
parserOptions: {
|
|
50
|
+
sourceType: 'commonjs',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
// TypeScript
|
|
54
|
+
{
|
|
55
|
+
files: ['**/*.?(m|c)ts?(x)'],
|
|
56
|
+
extends: ['plugin:@typescript-eslint/recommended'],
|
|
57
|
+
parser: '@typescript-eslint/parser',
|
|
58
|
+
parserOptions: {
|
|
59
|
+
project: true,
|
|
60
|
+
},
|
|
61
|
+
plugins: ['@typescript-eslint'],
|
|
62
|
+
rules: {
|
|
63
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
64
|
+
'@typescript-eslint/no-unused-vars': [
|
|
65
|
+
'error',
|
|
66
|
+
{argsIgnorePattern: '^_'},
|
|
67
|
+
],
|
|
68
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
// Node
|
|
72
|
+
{
|
|
73
|
+
files: ['**/.*rc.(c){j,t}s', '**/*.config.?(c){j,t}s', 'scripts/**/*.js'],
|
|
74
|
+
env: {
|
|
75
|
+
node: true,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
// Jest
|
|
79
|
+
{
|
|
80
|
+
files: ['**/tests/**'],
|
|
81
|
+
extends: ['plugin:jest/recommended'],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Report
|
|
2
|
+
|
|
3
|
+
- [ ] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate
|
|
4
|
+
|
|
5
|
+
# Issues and Steps to Reproduce
|
|
6
|
+
|
|
7
|
+
_**Replaces this with steps to repro your issue.**_
|
|
8
|
+
|
|
9
|
+
# Expected Behavior
|
|
10
|
+
|
|
11
|
+
_**Describe what you expected would happen.**_
|
|
12
|
+
|
|
13
|
+
# Actual Behavior
|
|
14
|
+
|
|
15
|
+
_**Describe what actually happened.**_
|
|
16
|
+
|
|
17
|
+
# Link to Code
|
|
18
|
+
|
|
19
|
+
_**If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.**_
|
|
20
|
+
|
|
21
|
+
_**When applicable, use this [fiddle](https://jsfiddle.net/emilsjolander/jckmwztt/) to post a web repro.**_
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Black Formatter
|
|
2
|
+
inputs:
|
|
3
|
+
directory:
|
|
4
|
+
description: Directory to Lint
|
|
5
|
+
required: true
|
|
6
|
+
version:
|
|
7
|
+
description: pypi version of "black" to use
|
|
8
|
+
required: false
|
|
9
|
+
default: 22.3.0
|
|
10
|
+
|
|
11
|
+
runs:
|
|
12
|
+
using: 'composite'
|
|
13
|
+
steps:
|
|
14
|
+
- name: Ensure supported Python selected
|
|
15
|
+
uses: actions/setup-python@v4
|
|
16
|
+
with:
|
|
17
|
+
python-version: '>=3.6.2'
|
|
18
|
+
|
|
19
|
+
- name: pip install
|
|
20
|
+
shell: bash
|
|
21
|
+
run: pip install black==${{ inputs.version }}
|
|
22
|
+
|
|
23
|
+
- name: black
|
|
24
|
+
shell: bash
|
|
25
|
+
run: black --check ${{ inputs.directory }}
|