Skip to content

Fix typos #2675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ Not supported yet:
- FeTile
- FeTurbulence

Exmaple use of filters:
Example use of filters:

```jsx
import React from 'react';
Expand Down
6 changes: 3 additions & 3 deletions android/src/main/java/com/horcrux/svg/PathParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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.
Expand All @@ -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));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion apple/Elements/RNSVGDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apple/Elements/RNSVGSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apple/Elements/RNSVGUse.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apple/Filters/RNSVGFeGaussianBlur.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (CIImage *)applyFilter:(NSMutableDictionary<NSString *, CIImage *> *)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")];
Expand Down
2 changes: 1 addition & 1 deletion apple/RNSVGNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion apple/RNSVGNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect
// abstract
}

// hitTest delagate
// hitTest delegate
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
// abstract
Expand Down
2 changes: 1 addition & 1 deletion apps/common/test/PointerEventsBoxNone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices)</AdditionalDependencies>
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion scripts/codegen-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/css/LocalSvg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/web/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface BaseProps {
| React.MutableRefObject<SVGElement | null>;
style?: Iterable<unknown>;

// different tranform props
// different transform props
gradientTransform?: TransformProps['transform'];
patternTransform?: TransformProps['transform'];
}
2 changes: 1 addition & 1 deletion windows/RNSVG/Fabric/RenderableView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions windows/RNSVG/Fabric/RenderableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<TUserData>(view.UserData());
userData->FinalizeUpates(view, mask);
userData->FinalizeUpdates(view, mask);
});
builder.SetMountChildComponentViewHandler(
[](const winrt::Microsoft::ReactNative::ComponentView &view,
Expand Down
4 changes: 2 additions & 2 deletions windows/RNSVG/Fabric/SvgView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<SvgView>(view.UserData());
userData->FinalizeUpates(view, mask);
userData->FinalizeUpdates(view, mask);
});

builder.SetMountChildComponentViewHandler(
Expand Down
2 changes: 1 addition & 1 deletion windows/RNSVG/Fabric/SvgView.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct SvgView : winrt::implements<SvgView, winrt::Windows::Foundation::IInspect
const winrt::Microsoft::ReactNative::ComponentView& view,
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs& args) noexcept;

void FinalizeUpates(
void FinalizeUpdates(
const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept;

Expand Down
4 changes: 2 additions & 2 deletions windows/RNSVG/PathView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ float PathView::ParseNumber(size_t &index) {
c = m_d.at(index);
}
} else if (c != '.') {
throw hresult_invalid_argument(L"Invalid number formating character.");
throw hresult_invalid_argument(L"Invalid number formatting character.");
}

// Consume fraction.
Expand All @@ -280,7 +280,7 @@ float PathView::ParseNumber(size_t &index) {
} else if (IsDigit(c)) {
SkipDigits(index);
} else {
throw hresult_invalid_argument(L"Invalid number formating character.");
throw hresult_invalid_argument(L"Invalid number formatting character.");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions windows/RNSVG/RNSVG.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Midl Condition="'$(UseFabric)'!='true'">
<!-- This allows applications targetting older Windows SDKs (e.g. RNW 0.65 apps) to consume the library generated WinMD -->
<!-- This allows applications targeting older Windows SDKs (e.g. RNW 0.65 apps) to consume the library generated WinMD -->
<AdditionalOptions>%(AdditionalOptions) /noattributename</AdditionalOptions>
</Midl>
<Link>
<AdditionalDependencies>dxguid.lib;shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices)</AdditionalDependencies>
<AdditionalDependencies>dxguid.lib;shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
<ModuleDefinitionFile>RNSVG.def</ModuleDefinitionFile>
Expand Down
Loading