Skip to content

Commit dd6d535

Browse files
ci(release): publish latest release
1 parent 73b107f commit dd6d535

File tree

717 files changed

+10593
-26278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

717 files changed

+10593
-26278
lines changed

.cursor/rules/mobile/styling.mdc

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,28 @@ alwaysApply: false
66
# Mobile Styling Conventions
77

88
## Component Styling
9-
- Prefer Tamagui inline props over other methods
9+
- Use the `styled` function from `ui/src` for consistent styling
10+
- Prefer Tamagui styling over React Native StyleSheet when possible
11+
- Use StyleSheet.create for performance-critical styles or when Tamagui isn't suitable
12+
13+
## StyleSheet Usage
14+
- Define styles outside of the component body to prevent recreation on renders
15+
- Use descriptive names for style objects
16+
- Group related styles together
17+
18+
Example:
19+
```typescript
20+
const styles = StyleSheet.create({
21+
container: {
22+
flex: 1,
23+
padding: spacing.spacing16,
24+
},
25+
header: {
26+
fontSize: 18,
27+
fontWeight: 'bold',
28+
},
29+
})
30+
```
1031

1132
## Theme Usage
1233
- Use theme tokens from the UI package instead of hardcoded values
@@ -19,11 +40,9 @@ alwaysApply: false
1940
- Minimize view hierarchy depth
2041

2142
## Platform Specific Code
22-
- Use `.<platform>.tsx` extensions for platform-specific components
23-
- The bundler will grab the appropriate file during the build and always fallback to `.tsx`
24-
- The `platform` variable must be one of the following: ios, android, macos, windows, web, native
25-
- Use the `Platform.select` API for inline platform-specific code. This method expects an object keyed by `platform`.
26-
- Also consider using our custom platform variables like `isMobileApp`, `isInterface`, etc. for more specific platform detection needs.
43+
- Use `$platform-web` for platform-specific styling in Tamagui
44+
- Use `.ios.tsx` and `.android.tsx` extensions for platform-specific components
45+
- Use the `Platform.select` API for inline platform-specific code
2746

2847
## Performance
2948
- Memoize complex style calculations
Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,44 @@
11
---
2-
description:
3-
globs:
4-
alwaysApply: true
2+
description: Component Structure and Best Practices
3+
globs:
4+
alwaysApply: false
55
---
66
# Component Structure and Best Practices
77

88
## Component Organization
99
- Place state and hooks at the top of the component
1010
- Group related state variables together
11+
- Extract complex logic into custom hooks
1112
- Define handlers after state declarations
1213
- Place JSX return statement at the end of the component
1314

14-
## Props
15-
- Use interface for component props
16-
- Place prop interface directly above component
17-
- Complex or shared types can be moved to a types.ts file
18-
- Use descriptive prop names
19-
- Provide default props where appropriate
20-
21-
## Performance Optimizations
22-
- Memoize expensive calculations with useMemo
23-
- Memoize event handlers with useCallback or use our custom useEvent hook
24-
- Use React.memo for pure components that render often
25-
- Avoid anonymous functions in render
26-
27-
## Component Size
28-
- Keep components focused on a single responsibility
29-
- Extract complex components into smaller, reusable pieces
30-
- Aim for less than 250 lines per component file
31-
- Extract prop interfaces and types to separate files if they become complex
32-
3315
## Component Structure Example
34-
3516
```typescript
36-
interface ExampleComponentProps {
37-
prop1: string;
38-
prop2: () => void;
39-
}
40-
4117
export function ExampleComponent({ prop1, prop2 }: ExampleComponentProps): JSX.Element {
4218
// State declarations
4319
const [state1, setState1] = useState(false)
4420
const [state2, setState2] = useState<string>('')
4521

46-
// Queries and mutations
47-
const { data, isPending } = useQuery(exampleQueries.getData(prop1))
48-
const mutation = useMutation({
49-
mutationFn: () => exampleService.submit(prop1),
50-
onSuccess: prop2
51-
})
22+
// Custom hooks
23+
const { data, loading } = useCustomHook()
5224

5325
// Derived values
5426
const derivedValue = useMemo(() => {
55-
return someCalculation(state1, data)
56-
}, [state1, data])
27+
return someCalculation(state1, prop1)
28+
}, [state1, prop1])
5729

5830
// Event handlers
5931
const handleClick = useCallback(() => {
6032
setState1(!state1)
61-
mutation.mutate()
62-
}, [state1, mutation])
33+
}, [state1])
6334

6435
// Side effects
6536
useEffect(() => {
6637
// Effect logic
6738
}, [prop2])
6839

6940
// Conditional rendering logic
70-
if (isPending) {
41+
if (loading) {
7142
return <LoadingSpinner />
7243
}
7344

@@ -80,3 +51,21 @@ export function ExampleComponent({ prop1, prop2 }: ExampleComponentProps): JSX.E
8051
)
8152
}
8253
```
54+
55+
## Props
56+
- Use interface for component props
57+
- Place prop interface directly above component or in a types.ts file
58+
- Use descriptive prop names
59+
- Provide default props where appropriate
60+
61+
## Performance Optimizations
62+
- Memoize expensive calculations with useMemo
63+
- Memoize event handlers with useCallback
64+
- Use React.memo for pure components that render often
65+
- Avoid anonymous functions in render
66+
67+
## Component Size
68+
- Keep components focused on a single responsibility
69+
- Extract complex components into smaller, reusable pieces
70+
- Aim for less than 250 lines per component file
71+
- Extract prop interfaces and types to separate files if they become complex

.cursor/rules/shared/data-fetching.mdc

Lines changed: 0 additions & 47 deletions
This file was deleted.

.depcheckrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ ignores: [
66
'i18next',
77
'moti',
88
'wrangler',
9-
'react-router',
109
# Dependencies that depcheck thinks are missing but are actually present or never used
1110
'@yarnpkg/core',
1211
'@yarnpkg/cli',

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ CLAUDE.local.md
6969

7070
# cursor
7171
.cursor/mcp.json
72-
.cursor/rules/local-workflow.mdc
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
diff --git a/registry.js b/registry.js
2+
index 64b2735d3bb5284bd2450bf0d06115c3de5dcf80..489ffa2f59a1d08d71826e2ceb0076d588636c7c 100644
3+
--- a/registry.js
4+
+++ b/registry.js
5+
@@ -8,8 +8,9 @@
6+
* @format
7+
*/
8+
9+
-'use strict';
10+
+"use strict";
11+
12+
+/*::
13+
export type AssetDestPathResolver = 'android' | 'generic';
14+
15+
export type PackagerAsset = {
16+
@@ -25,17 +26,18 @@ export type PackagerAsset = {
17+
+resolver?: AssetDestPathResolver,
18+
...
19+
};
20+
+*/
21+
22+
-const assets: Array<PackagerAsset> = [];
23+
+const assets/*::: Array<PackagerAsset>*/ = [];
24+
25+
-function registerAsset(asset: PackagerAsset): number {
26+
+function registerAsset(asset/*::: PackagerAsset*/)/*::: number*/ {
27+
// `push` returns new array length, so the first asset will
28+
// get id 1 (not 0) to make the value truthy
29+
return assets.push(asset);
30+
}
31+
32+
-function getAssetByID(assetId: number): PackagerAsset {
33+
+function getAssetByID(assetId/*::: number*/)/*::: PackagerAsset*/ {
34+
return assets[assetId - 1];
35+
}
36+
37+
-module.exports = {registerAsset, getAssetByID};
38+
+module.exports = { registerAsset, getAssetByID };

.yarn/patches/@react-native-gradle-plugin-npm-0.77.2-3aa73582db.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
diff --git a/RNFastImage.podspec b/RNFastImage.podspec
2-
index db0fada63fc06191f8620d336d244edde6c3dba3..93d7291b183b9625ad8d50e812ae247a11bad9d3 100644
2+
index db0fada63fc06191f8620d336d244edde6c3dba3..286fa816e47996fdff9f25261644d612c682ae0b 100644
33
--- a/RNFastImage.podspec
44
+++ b/RNFastImage.podspec
55
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
66
s.source_files = "ios/**/*.{h,m}"
77

88
s.dependency 'React-Core'
99
- s.dependency 'SDWebImage', '~> 5.11.1'
10-
- s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
11-
+ s.dependency 'SDWebImage', '~> 5.21.0'
12-
+ s.dependency 'SDWebImageWebPCoder', '~> 0.14.6'
10+
+ s.dependency 'SDWebImage', '~> 5.15.5'
11+
s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
1312
end

CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)