Skip to content

Commit 0a206f5

Browse files
committed
feat(update): minor changes
1 parent e5c900a commit 0a206f5

File tree

7 files changed

+49
-9
lines changed

7 files changed

+49
-9
lines changed

example/ios/RNSwiftUIExample.xcodeproj/project.pbxproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
2DCB0BAB44E92647C561E09E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
1313
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
1414
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
15+
C0115C47A29A482B8166D4DA /* EurostileUnicaseLTW04-Rg.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0F6A574EC71C41998DB2ABC2 /* EurostileUnicaseLTW04-Rg.ttf */; };
1516
/* End PBXBuildFile section */
1617

1718
/* Begin PBXFileReference section */
19+
0F6A574EC71C41998DB2ABC2 /* EurostileUnicaseLTW04-Rg.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "EurostileUnicaseLTW04-Rg.ttf"; path = "../assets/fonts/EurostileUnicaseLTW04-Rg.ttf"; sourceTree = "<group>"; };
1820
13B07F961A680F5B00A75B9A /* RNSwiftUIExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNSwiftUIExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1921
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNSwiftUIExample/Images.xcassets; sourceTree = "<group>"; };
2022
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNSwiftUIExample/Info.plist; sourceTree = "<group>"; };
@@ -60,6 +62,15 @@
6062
name = Frameworks;
6163
sourceTree = "<group>";
6264
};
65+
7DDB2888B55047CB8255E265 /* Resources */ = {
66+
isa = PBXGroup;
67+
children = (
68+
0F6A574EC71C41998DB2ABC2 /* EurostileUnicaseLTW04-Rg.ttf */,
69+
);
70+
name = Resources;
71+
path = "";
72+
sourceTree = "<group>";
73+
};
6374
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
6475
isa = PBXGroup;
6576
children = (
@@ -75,6 +86,7 @@
7586
83CBBA001A601CBA00E9B192 /* Products */,
7687
2D16E6871FA4F8E400B85C8A /* Frameworks */,
7788
BBD78D7AC51CEA395F1C20DB /* Pods */,
89+
7DDB2888B55047CB8255E265 /* Resources */,
7890
);
7991
indentWidth = 2;
8092
sourceTree = "<group>";
@@ -161,6 +173,7 @@
161173
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
162174
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
163175
2DCB0BAB44E92647C561E09E /* PrivacyInfo.xcprivacy in Resources */,
176+
C0115C47A29A482B8166D4DA /* EurostileUnicaseLTW04-Rg.ttf in Resources */,
164177
);
165178
runOnlyForDeploymentPostprocessing = 0;
166179
};

example/ios/RNSwiftUIExample/Info.plist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626
<true/>
2727
<key>NSAppTransportSecurity</key>
2828
<dict>
29-
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
3029
<key>NSAllowsArbitraryLoads</key>
3130
<false/>
3231
<key>NSAllowsLocalNetworking</key>
3332
<true/>
3433
</dict>
3534
<key>NSLocationWhenInUseUsageDescription</key>
36-
<string></string>
35+
<string/>
3736
<key>UILaunchStoryboardName</key>
3837
<string>LaunchScreen</string>
3938
<key>UIRequiredDeviceCapabilities</key>
@@ -48,5 +47,9 @@
4847
</array>
4948
<key>UIViewControllerBasedStatusBarAppearance</key>
5049
<false/>
50+
<key>UIAppFonts</key>
51+
<array>
52+
<string>EurostileUnicaseLTW04-Rg.ttf</string>
53+
</array>
5154
</dict>
5255
</plist>

scripts/exportProject.sh

100644100755
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,18 @@ if [ -n "$readme_path" ]; then
8080
echo " - name: \"$readme_path\"" >> "$OUTPUT_FILE"
8181
echo " content: |" >> "$OUTPUT_FILE"
8282
sed 's/^/ /' "$readme_path" >> "$OUTPUT_FILE"
83+
echo "" >> "$OUTPUT_FILE"
8384
fi
8485
for filepath in "${OTHER_PATHS[@]}"; do
8586
echo " - name: \"$filepath\"" >> "$OUTPUT_FILE"
8687
echo " content: |" >> "$OUTPUT_FILE"
8788
sed 's/^/ /' "$filepath" >> "$OUTPUT_FILE"
89+
echo "" >> "$OUTPUT_FILE"
8890
done
8991

9092
# Clean up temporary files
9193
rm "$TEMP_FILE" "$TEMP_PATHS"
9294
echo "YAML file created: $OUTPUT_FILE"
93-
echo "Hi, I’d like your assistance with a coding project I’m working on. To get you up to speed, I’ve attached a YAML file outlining the project, its file structure, and the contents of each file. Could you review it and let me know how you can help with development, debugging, or any other suggestions?"
95+
PROMPT="Hi, I’d like your assistance with a coding project I’m working on. To get you up to speed, I’ve attached a YAML file outlining the project, its file structure, and the contents of each file. Could you review it and help me with the following task?"
96+
echo -e "\n$PROMPT"
97+
echo $PROMPT | pbcopy

src/components/Button.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { type PropsWithChildren } from "react";
2+
import { SwiftUIParentIdProvider } from "../contexts";
13
import { useSwiftUINode } from "../hooks";
24
import type { FunctionComponentWithId, NativeTextStyle } from "../types";
35

@@ -18,8 +20,12 @@ export type NativeButtonProps = {
1820
onPress?: () => void;
1921
};
2022

21-
export const Button: FunctionComponentWithId<NativeButtonProps> = ({ onPress, ...otherProps }) => {
22-
useSwiftUINode("Button", otherProps, { press: onPress });
23-
return null;
23+
export const Button: FunctionComponentWithId<PropsWithChildren<NativeButtonProps>> = ({
24+
children,
25+
onPress,
26+
...otherProps
27+
}) => {
28+
const { id } = useSwiftUINode("Button", otherProps, { press: onPress });
29+
return <SwiftUIParentIdProvider id={id}>{children}</SwiftUIParentIdProvider>;
2430
};
2531
Button.displayName = "Button";

src/components/TextField.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useSwiftUINode } from "../hooks";
2-
import type { FunctionComponentWithId } from "../types";
2+
import type { FunctionComponentWithId, NativeTextStyle } from "../types";
33

44
export type NativeKeyboardType = "default" | "numberPad" | "emailAddress" | "decimalPad";
55
export type NativeTextContentType = "username" | "password" | "emailAddress";
@@ -18,6 +18,7 @@ export type NativeTextFieldProps = {
1818
maxLength?: number | null;
1919
multiline?: boolean;
2020
disabled?: boolean;
21+
style?: NativeTextStyle;
2122
onChange?: (value: string) => void;
2223
onFocus?: () => void;
2324
onBlur?: () => void;

src/styles/buttonStyles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { NativeTextStyle } from "../types";
22

33
export const pickerButtonStyles: NativeTextStyle = {
44
color: "label",
5-
backgroundColor: "#efeff0",
5+
backgroundColor: "tertiarySystemFill",
66
paddingVertical: 7,
77
paddingHorizontal: 12,
88
borderRadius: 8,

src/types/style.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,27 @@ export type NativeViewStyle = Pick<
99
| "padding"
1010
| "paddingHorizontal"
1111
| "paddingVertical"
12+
| "paddingLeft"
13+
| "paddingRight"
14+
| "paddingTop"
15+
| "paddingBottom"
1216
| "width"
17+
| "minWidth"
18+
| "maxWidth"
1319
| "height"
20+
| "minHeight"
21+
| "maxHeight"
22+
| "position"
23+
| "top"
24+
| "left"
25+
| "right"
26+
| "bottom"
1427
> & {
1528
cornerRadius?: number;
1629
};
1730

1831
export type NativeTextStyle = NativeViewStyle &
19-
Pick<TextStyle, "color" | "fontSize" | "fontWeight" | "textAlign"> & {
32+
Pick<TextStyle, "color" | "fontSize" | "fontWeight" | "textAlign" | "fontFamily"> & {
2033
foregroundColor?: string;
2134
font?: NativeFont;
2235
};

0 commit comments

Comments
 (0)