From 5e90c8ef952ba4995dbef68f381bdcc051e036bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 3 May 2025 01:47:41 +0000 Subject: [PATCH] Fix typos --- CONTRIBUTING.md | 2 +- USAGE.md | 2 +- android/src/main/java/com/horcrux/svg/PathParser.java | 6 +++--- apple/Elements/RNSVGDefs.h | 2 +- apple/Elements/RNSVGSymbol.h | 2 +- apple/Elements/RNSVGUse.h | 2 +- apple/Filters/RNSVGFeGaussianBlur.mm | 2 +- apple/RNSVGNode.h | 2 +- apple/RNSVGNode.mm | 2 +- apps/common/test/PointerEventsBoxNone.tsx | 2 +- .../windows/FabricExample/FabricExample.cpp | 2 +- .../windows/FabricExample/FabricExample.vcxproj | 2 +- scripts/codegen-utils.js | 2 +- src/css/LocalSvg.tsx | 2 +- src/web/types.ts | 2 +- windows/RNSVG/Fabric/RenderableView.cpp | 2 +- windows/RNSVG/Fabric/RenderableView.h | 4 ++-- windows/RNSVG/Fabric/SvgView.cpp | 4 ++-- windows/RNSVG/Fabric/SvgView.h | 2 +- windows/RNSVG/PathView.cpp | 4 ++-- windows/RNSVG/RNSVG.vcxproj | 4 ++-- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bfc519d1..8c5e62164 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ actions for all opened pull requests. ### To add new E2E test cases, proceed as follows: 1. Put an SVG file of your selection into the `e2e/cases` directory. -2. Execute `yarn generateE2eRefrences`. This action launches a headless Chrome browser via Puppeteer, capturing +2. Execute `yarn generateE2eReferences`. This action launches a headless Chrome browser via Puppeteer, capturing snapshots of all rendered SVGs as .png files. These files will serve as a reference during testing. 3. Check the `e2e/references` directory to observe newly created .png files. 4. When you rerun the E2E tests, the new test case(s) you've added will be incorporated. diff --git a/USAGE.md b/USAGE.md index 6e9b21557..5db72c3d1 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1327,7 +1327,7 @@ Not supported yet: - FeTile - FeTurbulence -Exmaple use of filters: +Example use of filters: ```jsx import React from 'react'; diff --git a/android/src/main/java/com/horcrux/svg/PathParser.java b/android/src/main/java/com/horcrux/svg/PathParser.java index 3f3c0ba15..5a46d251f 100644 --- a/android/src/main/java/com/horcrux/svg/PathParser.java +++ b/android/src/main/java/com/horcrux/svg/PathParser.java @@ -230,7 +230,7 @@ static Path parse(String d) { default: { throw new IllegalArgumentException( - String.format("Unexpected comand '%c' (s=%s)", cmd, s)); + String.format("Unexpected command '%c' (s=%s)", cmd, s)); } } @@ -628,7 +628,7 @@ private static float parse_number() { } } else if (c != '.') { throw new IllegalArgumentException( - String.format("Invalid number formating character '%c' (i=%d, s=%s)", c, i, s)); + String.format("Invalid number formatting character '%c' (i=%d, s=%s)", c, i, s)); } // Consume fraction. @@ -654,7 +654,7 @@ private static float parse_number() { skip_digits(); } else { throw new IllegalArgumentException( - String.format("Invalid number formating character '%c' (i=%d, s=%s)", c, i, s)); + String.format("Invalid number formatting character '%c' (i=%d, s=%s)", c, i, s)); } } } diff --git a/apple/Elements/RNSVGDefs.h b/apple/Elements/RNSVGDefs.h index be73cfdf4..28d45f80c 100644 --- a/apple/Elements/RNSVGDefs.h +++ b/apple/Elements/RNSVGDefs.h @@ -9,7 +9,7 @@ #import "RNSVGNode.h" /** - * RNSVG defination are implemented as abstract views for all elements inside Defs. + * RNSVG definition are implemented as abstract views for all elements inside Defs. */ @interface RNSVGDefs : RNSVGNode diff --git a/apple/Elements/RNSVGSymbol.h b/apple/Elements/RNSVGSymbol.h index b9297b211..eac3334a1 100644 --- a/apple/Elements/RNSVGSymbol.h +++ b/apple/Elements/RNSVGSymbol.h @@ -9,7 +9,7 @@ #import "RNSVGGroup.h" /** - * RNSVG defination are implemented as abstract UIViews for all elements inside Defs. + * RNSVG definition are implemented as abstract UIViews for all elements inside Defs. */ @interface RNSVGSymbol : RNSVGGroup diff --git a/apple/Elements/RNSVGUse.h b/apple/Elements/RNSVGUse.h index 7c89bbcc5..284def4b8 100644 --- a/apple/Elements/RNSVGUse.h +++ b/apple/Elements/RNSVGUse.h @@ -10,7 +10,7 @@ #import "RNSVGRenderable.h" /** - * RNSVG defination are implemented as abstract UIViews for all elements inside Defs. + * RNSVG definition are implemented as abstract UIViews for all elements inside Defs. */ @interface RNSVGUse : RNSVGRenderable diff --git a/apple/Filters/RNSVGFeGaussianBlur.mm b/apple/Filters/RNSVGFeGaussianBlur.mm index 4fa00c9ca..965f24133 100644 --- a/apple/Filters/RNSVGFeGaussianBlur.mm +++ b/apple/Filters/RNSVGFeGaussianBlur.mm @@ -69,7 +69,7 @@ - (CIImage *)applyFilter:(NSMutableDictionary *)results p return nil; } - // We need to multiply stdDeviation by screenScale to achive the same results as on web + // We need to multiply stdDeviation by screenScale to achieve the same results as on web CGFloat screenScale = [RNSVGRenderUtils getScreenScale]; CIFilter *filter = [CIFilter filterWithName:(_stdDeviationX == _stdDeviationY ? @"CIGaussianBlur" : @"CIMotionBlur")]; diff --git a/apple/RNSVGNode.h b/apple/RNSVGNode.h index 1ad9f40b3..2efacc537 100644 --- a/apple/RNSVGNode.h +++ b/apple/RNSVGNode.h @@ -65,7 +65,7 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE; @property (nonatomic, copy) RCTDirectEventBlock onLayout; /** - * RNSVGSvgView which ownes current RNSVGNode + * RNSVGSvgView which owns current RNSVGNode */ @property (nonatomic, readonly, weak) RNSVGSvgView *svgView; @property (nonatomic, readonly, weak) RNSVGGroup *textRoot; diff --git a/apple/RNSVGNode.mm b/apple/RNSVGNode.mm index 7e7b98fc8..aa57a904b 100644 --- a/apple/RNSVGNode.mm +++ b/apple/RNSVGNode.mm @@ -407,7 +407,7 @@ - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect // abstract } -// hitTest delagate +// hitTest delegate - (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { // abstract diff --git a/apps/common/test/PointerEventsBoxNone.tsx b/apps/common/test/PointerEventsBoxNone.tsx index 1123295f6..337d3346c 100644 --- a/apps/common/test/PointerEventsBoxNone.tsx +++ b/apps/common/test/PointerEventsBoxNone.tsx @@ -12,7 +12,7 @@ import Svg, {Path} from 'react-native-svg'; | | SVG depicted above is a box of 7x4 (without a background) with a colored rectangle inside occupying 5x2 - On iOS only the area with the actual drawing reactangle with 5x2 can be tapped. + On iOS only the area with the actual drawing rectangle with 5x2 can be tapped. However on Android things are different. For React Native on Android the whole SVG element will be touchable regardless of having or not a visible drawing in it. diff --git a/apps/fabric-windows-example/windows/FabricExample/FabricExample.cpp b/apps/fabric-windows-example/windows/FabricExample/FabricExample.cpp index eac183ee9..8a2fb429b 100644 --- a/apps/fabric-windows-example/windows/FabricExample/FabricExample.cpp +++ b/apps/fabric-windows-example/windows/FabricExample/FabricExample.cpp @@ -146,7 +146,7 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR rootView.ScaleFactor(scaleFactor); - // Set the intialSize of the root view + // Set the initialSize of the root view UpdateRootViewSizeToAppWindow(rootView, window); bridge.Show(); diff --git a/apps/fabric-windows-example/windows/FabricExample/FabricExample.vcxproj b/apps/fabric-windows-example/windows/FabricExample/FabricExample.vcxproj index f11c014fc..2cdb7bce8 100644 --- a/apps/fabric-windows-example/windows/FabricExample/FabricExample.vcxproj +++ b/apps/fabric-windows-example/windows/FabricExample/FabricExample.vcxproj @@ -78,7 +78,7 @@ stdcpp20 - shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices) + shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependencies) Windows true diff --git a/scripts/codegen-utils.js b/scripts/codegen-utils.js index 1f480a4ce..021bc765d 100644 --- a/scripts/codegen-utils.js +++ b/scripts/codegen-utils.js @@ -112,7 +112,7 @@ function compareFileAtTwoPaths(filename, firstPath, secondPath) { if (fileA !== fileB) { throw new Error( - `[${ERROR_PREFIX}] File ${filename} is different at ${firstPath} and ${secondPath}. Make sure you commited codegen autogenerated files.` + `[${ERROR_PREFIX}] File ${filename} is different at ${firstPath} and ${secondPath}. Make sure you committed codegen autogenerated files.` ); } } diff --git a/src/css/LocalSvg.tsx b/src/css/LocalSvg.tsx index 23279f4f2..84e509636 100644 --- a/src/css/LocalSvg.tsx +++ b/src/css/LocalSvg.tsx @@ -26,7 +26,7 @@ export async function loadAndroidRawResource(uri: string) { try { // eslint-disable-next-line @typescript-eslint/no-explicit-any const RNSVGRenderableModule: any = - // neeeded for new arch + // needed for new arch // eslint-disable-next-line @typescript-eslint/no-var-requires require('../fabric/NativeSvgRenderableModule').default; return await RNSVGRenderableModule.getRawResource(uri); diff --git a/src/web/types.ts b/src/web/types.ts index 81add91b1..f5490d341 100644 --- a/src/web/types.ts +++ b/src/web/types.ts @@ -60,7 +60,7 @@ export interface BaseProps { | React.MutableRefObject; style?: Iterable; - // different tranform props + // different transform props gradientTransform?: TransformProps['transform']; patternTransform?: TransformProps['transform']; } diff --git a/windows/RNSVG/Fabric/RenderableView.cpp b/windows/RNSVG/Fabric/RenderableView.cpp index fb6a70ceb..e081615bd 100644 --- a/windows/RNSVG/Fabric/RenderableView.cpp +++ b/windows/RNSVG/Fabric/RenderableView.cpp @@ -149,7 +149,7 @@ void RenderableView::UpdateProps( m_props = props; } -void RenderableView::FinalizeUpates( +void RenderableView::FinalizeUpdates( const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask) noexcept { Invalidate(view); diff --git a/windows/RNSVG/Fabric/RenderableView.h b/windows/RNSVG/Fabric/RenderableView.h index f48326cef..faf5e25d5 100644 --- a/windows/RNSVG/Fabric/RenderableView.h +++ b/windows/RNSVG/Fabric/RenderableView.h @@ -134,7 +134,7 @@ struct __declspec(uuid("a03986c0-b06e-4fb8-a86e-16fcc47b2f31")) RenderableView : const winrt::Microsoft::ReactNative::IComponentProps &props, const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept; - virtual void FinalizeUpates( + virtual void FinalizeUpdates( const winrt::Microsoft::ReactNative::ComponentView & /*view*/, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept; @@ -284,7 +284,7 @@ void RegisterRenderableComponent( builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = winrt::get_self(view.UserData()); - userData->FinalizeUpates(view, mask); + userData->FinalizeUpdates(view, mask); }); builder.SetMountChildComponentViewHandler( [](const winrt::Microsoft::ReactNative::ComponentView &view, diff --git a/windows/RNSVG/Fabric/SvgView.cpp b/windows/RNSVG/Fabric/SvgView.cpp index 1f1f4080f..35c8e50ae 100644 --- a/windows/RNSVG/Fabric/SvgView.cpp +++ b/windows/RNSVG/Fabric/SvgView.cpp @@ -109,7 +109,7 @@ void SvgView::UpdateProps( } } -void SvgView::FinalizeUpates( +void SvgView::FinalizeUpdates( const winrt::Microsoft::ReactNative::ComponentView & /*view*/, winrt::Microsoft::ReactNative::ComponentViewUpdateMask) noexcept { Invalidate(); // Move to finalize @@ -188,7 +188,7 @@ void SvgView::RegisterComponent(const winrt::Microsoft::ReactNative::IReactPacka [](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = winrt::get_self(view.UserData()); - userData->FinalizeUpates(view, mask); + userData->FinalizeUpdates(view, mask); }); builder.SetMountChildComponentViewHandler( diff --git a/windows/RNSVG/Fabric/SvgView.h b/windows/RNSVG/Fabric/SvgView.h index f9ba7c651..d33c339fb 100644 --- a/windows/RNSVG/Fabric/SvgView.h +++ b/windows/RNSVG/Fabric/SvgView.h @@ -72,7 +72,7 @@ struct SvgView : winrt::implementsstdcpp20 - + %(AdditionalOptions) /noattributename - dxguid.lib;shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices) + dxguid.lib;shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependencies) Console true RNSVG.def