Skip to content

Commit 78d4024

Browse files
chore: rename id property to origin
1 parent 1ce7339 commit 78d4024

File tree

15 files changed

+56
-48
lines changed

15 files changed

+56
-48
lines changed

apps/demo/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ PODS:
20192019
- React-timing
20202020
- React-utils
20212021
- SocketRocket
2022-
- React-Sandbox (0.2.0):
2022+
- React-Sandbox (0.4.0):
20232023
- boost
20242024
- DoubleConversion
20252025
- fast_float
@@ -2451,7 +2451,7 @@ SPEC CHECKSUMS:
24512451
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
24522452
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
24532453
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2454-
React-Sandbox: 789583cf1f6db8c2bf95e54125aef4314fe9d8ca
2454+
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
24552455
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
24562456
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
24572457
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

apps/fs-experiment/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ PODS:
20192019
- React-timing
20202020
- React-utils
20212021
- SocketRocket
2022-
- React-Sandbox (0.2.0):
2022+
- React-Sandbox (0.4.0):
20232023
- boost
20242024
- DoubleConversion
20252025
- fast_float
@@ -2491,7 +2491,7 @@ SPEC CHECKSUMS:
24912491
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
24922492
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
24932493
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2494-
React-Sandbox: 789583cf1f6db8c2bf95e54125aef4314fe9d8ca
2494+
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
24952495
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
24962496
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
24972497
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

apps/p2p-chat/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ PODS:
20192019
- React-timing
20202020
- React-utils
20212021
- SocketRocket
2022-
- React-Sandbox (0.3.0):
2022+
- React-Sandbox (0.4.0):
20232023
- boost
20242024
- DoubleConversion
20252025
- fast_float
@@ -2451,7 +2451,7 @@ SPEC CHECKSUMS:
24512451
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
24522452
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
24532453
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2454-
React-Sandbox: 7f628c364e1e4f691c2f7f2eb82bd9aaca1989fa
2454+
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
24552455
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
24562456
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
24572457
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

apps/p2p-chat/src/components/ChatCarousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const ChatInstanceView: React.FC<ChatInstanceViewProps> = ({
8282
delete sandboxRefs.current[chat.id]
8383
}
8484
}}
85-
id={chat.id}
85+
origin={chat.id}
8686
componentName="ChatApp"
8787
initialProperties={{
8888
userId: chat.id,

apps/p2p-counter/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function CounterSandboxView({
5656
/>
5757
</View>
5858
<SandboxReactNativeView
59-
id={sourceName}
59+
origin={sourceName}
6060
ref={sandboxRef}
6161
jsBundleSource={'sandbox'}
6262
componentName={'CounterApp'}

apps/p2p-counter/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ PODS:
20512051
- React-timing
20522052
- React-utils
20532053
- SocketRocket
2054-
- React-Sandbox (0.3.0):
2054+
- React-Sandbox (0.4.0):
20552055
- boost
20562056
- DoubleConversion
20572057
- fast_float
@@ -2493,7 +2493,7 @@ SPEC CHECKSUMS:
24932493
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
24942494
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
24952495
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2496-
React-Sandbox: 7f628c364e1e4f691c2f7f2eb82bd9aaca1989fa
2496+
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
24972497
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
24982498
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
24992499
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

apps/side-by-side/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ PODS:
20192019
- React-timing
20202020
- React-utils
20212021
- SocketRocket
2022-
- React-Sandbox (0.3.0):
2022+
- React-Sandbox (0.4.0):
20232023
- boost
20242024
- DoubleConversion
20252025
- fast_float
@@ -2603,7 +2603,7 @@ SPEC CHECKSUMS:
26032603
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
26042604
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
26052605
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2606-
React-Sandbox: 7f628c364e1e4f691c2f7f2eb82bd9aaca1989fa
2606+
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
26072607
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
26082608
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
26092609
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

bun.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@
137137
"version": "1.0.0",
138138
"dependencies": {
139139
"@callstack/react-native-sandbox": "workspace:*",
140+
"@react-native/new-app-screen": "^0.80.2",
140141
"react": "19.1.0",
141142
"react-native": "0.80.1",
143+
"react-native-linear-gradient": "^2.8.3",
142144
},
143145
"devDependencies": {
144146
"@babel/core": "^7.25.2",
@@ -177,7 +179,7 @@
177179
},
178180
"packages/react-native-sandbox": {
179181
"name": "@callstack/react-native-sandbox",
180-
"version": "0.3.0",
182+
"version": "0.4.0",
181183
"devDependencies": {
182184
"react": "19.1.0",
183185
"react-native": "0.80.1",
@@ -729,6 +731,8 @@
729731

730732
"@react-native/metro-config": ["@react-native/metro-config@0.80.1", "", { "dependencies": { "@react-native/js-polyfills": "0.80.1", "@react-native/metro-babel-transformer": "0.80.1", "metro-config": "^0.82.2", "metro-runtime": "^0.82.2" } }, "sha512-VLfHJ1G/lHvpE0YzxPal3sslfr5e5RNQVFeVebMwS3zSf57ZiZbfAevWJJT+7/gfGADMIoiX7AUteCVlbxMu/g=="],
731733

734+
"@react-native/new-app-screen": ["@react-native/new-app-screen@0.80.2", "", { "peerDependencies": { "@types/react": "^19.0.0", "react": "*", "react-native": "*" }, "optionalPeers": ["@types/react"] }, "sha512-cszaO1s1WJNBSkvb9bYGxv9CYcHDbGMMmtgemhpe1HyzcoE2kKp9FLn6aAUxIP+aZ2RBP1Zya1Wt8oRuCyTNjQ=="],
735+
732736
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.74.89", "", {}, "sha512-qoMMXddVKVhZ8PA1AbUCk83trpd6N+1nF2A6k1i6LsQObyS92fELuk8kU/lQs6M7BsMHwqyLCpQJ1uFgNvIQXg=="],
733737

734738
"@react-native/typescript-config": ["@react-native/typescript-config@0.80.1", "", {}, "sha512-rcDV6BMh+rjsYIh/f0pd6mWOKN4eTS9nov7CyeU2cAfuIEslScEJ7Kv6YZtlLZ5PgC9teUf5L9pqzx9GwmzY/w=="],
@@ -2219,6 +2223,8 @@
22192223

22202224
"react-native-is-edge-to-edge": ["react-native-is-edge-to-edge@1.1.7", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-EH6i7E8epJGIcu7KpfXYXiV2JFIYITtq+rVS8uEb+92naMRBdxhTuS8Wn2Q7j9sqyO0B+Xbaaf9VdipIAmGW4w=="],
22212225

2226+
"react-native-linear-gradient": ["react-native-linear-gradient@2.8.3", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-KflAXZcEg54PXkLyflaSZQ3PJp4uC4whM7nT/Uot9m0e/qxFV3p6uor1983D1YOBJbJN7rrWdqIjq0T42jOJyA=="],
2227+
22222228
"react-native-reanimated": ["react-native-reanimated@3.19.0", "", { "dependencies": { "@babel/plugin-transform-arrow-functions": "^7.0.0-0", "@babel/plugin-transform-class-properties": "^7.0.0-0", "@babel/plugin-transform-classes": "^7.0.0-0", "@babel/plugin-transform-nullish-coalescing-operator": "^7.0.0-0", "@babel/plugin-transform-optional-chaining": "^7.0.0-0", "@babel/plugin-transform-shorthand-properties": "^7.0.0-0", "@babel/plugin-transform-template-literals": "^7.0.0-0", "@babel/plugin-transform-unicode-regex": "^7.0.0-0", "@babel/preset-typescript": "^7.16.7", "convert-source-map": "^2.0.0", "invariant": "^2.2.4", "react-native-is-edge-to-edge": "1.1.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0", "react": "*", "react-native": "*" } }, "sha512-FNfqLuPuVHsW9KcsZtnJqIPlMQvuySnSFJXgSt9fVDPqptbSUkiAF6MthUwd4Mxt05hCRcbV+T65CENgVS5iCg=="],
22232229

22242230
"react-native-toast-message": ["react-native-toast-message@2.3.3", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-4IIUHwUPvKHu4gjD0Vj2aGQzqPATiblL1ey8tOqsxOWRPGGu52iIbL8M/mCz4uyqecvPdIcMY38AfwRuUADfQQ=="],

packages/react-native-sandbox/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import SandboxReactNativeView from '@callstack/react-native-sandbox';
4949
| `componentName` | `string` | :ballot_box_with_check: | - | Name of the component registered through `AppRegistry.registerComponent` call inside the bundle file specified in `jsBundleSource` |
5050
| `moduleName` | `string` | :white_large_square: | - | **⚠️ Deprecated**: Use `componentName` instead. Will be removed in a future version. |
5151
| `jsBundleSource` | `string` | :ballot_box_with_check: | - | Name on file storage or URL to the JavaScript bundle to load |
52+
| `origin` | `string` | :white_large_square: | React Native view ID | Unique origin identifier for the sandbox instance (web-compatible) |
5253
| `initialProperties` | `object` | :white_large_square: | `{}` | Initial props for the sandboxed app |
5354
| `launchOptions` | `object` | :white_large_square: | `{}` | Launch configuration options |
5455
| `allowedTurboModules` | `string[]` | :white_large_square: | [check here](https://github.com/callstackincubator/react-native-sandbox/blob/main/packages/react-native-sandbox/src/index.tsx#L18) | Additional TurboModules to allow |
@@ -100,10 +101,11 @@ Use `allowedTurboModules` to control which native modules the sandbox can access
100101
101102
#### Message Origin Control
102103

103-
Use `allowedOrigins` to specify which sandbox IDs are allowed to send messages to this sandbox:
104+
Use `allowedOrigins` to specify which sandbox origins are allowed to send messages to this sandbox:
104105

105106
```tsx
106107
<SandboxReactNativeView
108+
origin="my-sandbox"
107109
allowedOrigins={['sandbox1', 'sandbox2']}
108110
// ... other props
109111
/>

packages/react-native-sandbox/ios/SandboxReactNativeDelegate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525
@property (nonatomic) std::shared_ptr<const facebook::react::SandboxReactNativeViewEventEmitter> eventEmitter;
2626
@property (nonatomic, assign) BOOL hasOnMessageHandler;
2727
@property (nonatomic, assign) BOOL hasOnErrorHandler;
28-
@property (nonatomic, copy, nullable) NSString *sandboxId;
28+
@property (nonatomic, copy, nullable) NSString *origin;
2929
@property (nonatomic, copy, nullable) NSString *jsBundleSource;
3030

3131
/**
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
3636

3737
/**
3838
* Sets the list of allowed origins for this sandbox instance.
39-
* Only sandboxes with IDs in this list can send messages to this sandbox.
39+
* Only sandboxes with origins in this list can send messages to this sandbox.
4040
*/
4141
@property (nonatomic, copy) NSArray<NSString *> *allowedOrigins;
4242

0 commit comments

Comments
 (0)