peachsim 0.1.2738 → 0.1.2743
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +310 -185
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-Q6ATHJ5Q.mjs → acorn-4LW63VJO.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-WCK2HANP.mjs → chunk-23OQSLRP.mjs} +289 -182
- package/dist-lib/esm-chunks/{chunk-PKLW5P4C.mjs → chunk-2HP5FPCA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V3CW4EN6.mjs → chunk-6FHNPTCA.mjs} +13 -7
- package/dist-lib/esm-chunks/{chunk-7JFDXIZQ.mjs → chunk-7NBU6OXB.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-5NOBLXKV.mjs → chunk-B3F4HKM6.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-3FBJGWPT.mjs → chunk-BJSA6VP6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YMCYBEB7.mjs → chunk-BNJ5YG7V.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-BQW3EWAQ.mjs → chunk-BQUYNIMY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-EU6UNSUW.mjs → chunk-BW3KZJV5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YU4ISPGO.mjs → chunk-EAAYQS4L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZXORDMAT.mjs → chunk-EES2SLJK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XJDM6LFX.mjs → chunk-GIZQHA6L.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-ONFP5RP7.mjs → chunk-HOUFNDEV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3CPES2EZ.mjs → chunk-JHOZWSFF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NMGEJJ2J.mjs → chunk-LVCSLWR2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GI5VVEKN.mjs → chunk-OEQBNK6V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-P72RUOTY.mjs → chunk-SG7MN2KW.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-6Q3JLKPD.mjs → chunk-THJMTM3L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KDIDYS42.mjs → chunk-THSR72MV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HLWFKLLD.mjs → chunk-V3SRJIBE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TBX7JBPC.mjs → chunk-VJKLZAU2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JDLZMI2L.mjs → chunk-WKGJ6LAU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2FSMFZ42.mjs → chunk-XP5F6PNN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2EW5XIGF.mjs → chunk-ZLQX4SVV.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-R2UJPOJL.mjs → metro-layout-parser-L57PU3TD.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-W34QYBXU.mjs → swift-package-prebuilt-UNXWJN7B.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-RO5AZPWM.mjs → swift-sdk-app-module-DZV3XYCP.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-CWTI76JI.mjs → swift-sdk-image-WRYMP64Z.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-JGTU2ZCE.mjs → swift-sdk-image-producer-D6DOCCCR.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +310 -185
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +3782 -1684
- package/dist-lib/host/fetch-proxy-handler.cjs +41 -10
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +88 -86
- package/dist-lib/public-origins-lib.json +86 -72
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +4213 -2115
- package/dist-lib/swift-compile.cjs +303 -178
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/effects-shader-registry.d.ts +2 -12
- package/dist-types/packages/peach-engine/src/engine/native-font-dataContract.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/native-style-store.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-native-binding.d.ts +0 -1
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +17 -1
- package/package.json +1 -1
- package/src/one-direct-host-source.ts +254 -0
- package/src/one-native-controls-package.ts +99 -21
- package/src/swift-compile.ts +145 -120
- package/src/swift-sdk-image-map.ts +35 -0
- package/src/swift-sdk-image.ts +12 -2
|
@@ -1488,6 +1488,208 @@ static inline uint32_t nodeHi(peach_node node) { return static_cast<uint32_t>(no
|
|
|
1488
1488
|
@implementation PeachSafeAreaView
|
|
1489
1489
|
@end
|
|
1490
1490
|
|
|
1491
|
+
@interface PeachDirectStackRoute : UIViewController
|
|
1492
|
+
@property(nonatomic, copy) NSString* routeKey;
|
|
1493
|
+
@property(nonatomic) peach_node node;
|
|
1494
|
+
@property(nonatomic) BOOL headerHidden;
|
|
1495
|
+
@property(nonatomic) BOOL gestureEnabled;
|
|
1496
|
+
@property(nonatomic) BOOL skipAnimation;
|
|
1497
|
+
@property(nonatomic, copy) NSDictionary* header;
|
|
1498
|
+
@property(nonatomic, copy) PeachContainerEmit emit;
|
|
1499
|
+
@end
|
|
1500
|
+
|
|
1501
|
+
@implementation PeachDirectStackRoute
|
|
1502
|
+
- (void)viewWillAppear:(BOOL)animated {
|
|
1503
|
+
[super viewWillAppear:animated];
|
|
1504
|
+
self.emit(@"transitionStart", @{@"key": self.routeKey, @"closing": @NO});
|
|
1505
|
+
}
|
|
1506
|
+
- (void)viewDidAppear:(BOOL)animated {
|
|
1507
|
+
[super viewDidAppear:animated];
|
|
1508
|
+
self.emit(@"transitionEnd", @{@"key": self.routeKey, @"closing": @NO});
|
|
1509
|
+
}
|
|
1510
|
+
- (void)viewWillDisappear:(BOOL)animated {
|
|
1511
|
+
[super viewWillDisappear:animated];
|
|
1512
|
+
self.emit(@"transitionStart", @{@"key": self.routeKey, @"closing": @YES});
|
|
1513
|
+
}
|
|
1514
|
+
- (void)viewDidDisappear:(BOOL)animated {
|
|
1515
|
+
[super viewDidDisappear:animated];
|
|
1516
|
+
self.emit(@"transitionEnd", @{@"key": self.routeKey, @"closing": @YES});
|
|
1517
|
+
}
|
|
1518
|
+
@end
|
|
1519
|
+
|
|
1520
|
+
@interface PeachDirectStack : NSObject <PeachContainer, UINavigationControllerDelegate>
|
|
1521
|
+
@end
|
|
1522
|
+
|
|
1523
|
+
@implementation PeachDirectStack {
|
|
1524
|
+
UINavigationController* _navigation;
|
|
1525
|
+
NSArray<NSDictionary*>* _routes;
|
|
1526
|
+
NSArray<PeachDirectStackRoute*>* _applied;
|
|
1527
|
+
PeachContainerEmit _emit;
|
|
1528
|
+
BOOL _waiting;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
- (void)configure:(NSDictionary*)spec emit:(PeachContainerEmit)emit {
|
|
1532
|
+
_routes = spec[@"routes"];
|
|
1533
|
+
_emit = emit;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
- (void)child:(peach_node)node {}
|
|
1537
|
+
|
|
1538
|
+
- (NSArray<UIBarButtonItem*>*)customBarItems:(NSArray<NSDictionary*>*)items views:(id<PeachViewLookup>)views {
|
|
1539
|
+
NSMutableArray<UIBarButtonItem*>* buttons = [NSMutableArray arrayWithCapacity:items.count];
|
|
1540
|
+
for (NSDictionary* item in items) {
|
|
1541
|
+
if (![item[@"type"] isEqualToString:@"custom"]) {
|
|
1542
|
+
[NSException raise:NSInvalidArgumentException format:@"unsupported One direct stack bar item %@", item[@"type"]];
|
|
1543
|
+
}
|
|
1544
|
+
NSString* rawNode = item[@"node"];
|
|
1545
|
+
const auto node = [rawNode isKindOfClass:NSString.class] ? strtoull(rawNode.UTF8String, nullptr, 10) : 0;
|
|
1546
|
+
if (!node) [NSException raise:NSInvalidArgumentException format:@"a One direct stack bar item requires its view node"];
|
|
1547
|
+
UIView* custom = PeachTakeControllerView(views, node);
|
|
1548
|
+
CGSize size = [views layoutSizeForNode:node];
|
|
1549
|
+
if (item[@"width"]) size.width = [item[@"width"] doubleValue];
|
|
1550
|
+
if (item[@"height"]) size.height = [item[@"height"] doubleValue];
|
|
1551
|
+
custom.frame = CGRectMake(0, 0, size.width, size.height);
|
|
1552
|
+
UIBarButtonItem* button = [[UIBarButtonItem alloc] initWithCustomView:custom];
|
|
1553
|
+
button.hidesSharedBackground = [item[@"hidesSharedBackground"] boolValue];
|
|
1554
|
+
[buttons addObject:button];
|
|
1555
|
+
}
|
|
1556
|
+
return buttons;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
- (void)mountIn:(UIView*)container views:(id<PeachViewLookup>)views {
|
|
1560
|
+
UIViewController* parent = PeachContainingController(container);
|
|
1561
|
+
if (!parent) return;
|
|
1562
|
+
if (!_navigation) {
|
|
1563
|
+
_navigation = [UINavigationController new];
|
|
1564
|
+
_navigation.delegate = self;
|
|
1565
|
+
[parent addChildViewController:_navigation];
|
|
1566
|
+
_navigation.view.frame = container.bounds;
|
|
1567
|
+
_navigation.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
1568
|
+
[container addSubview:_navigation.view];
|
|
1569
|
+
[_navigation didMoveToParentViewController:parent];
|
|
1570
|
+
}
|
|
1571
|
+
_navigation.view.frame = container.bounds;
|
|
1572
|
+
|
|
1573
|
+
id<UIViewControllerTransitionCoordinator> transition = _navigation.transitionCoordinator;
|
|
1574
|
+
if (transition) {
|
|
1575
|
+
if (_waiting) return;
|
|
1576
|
+
__weak PeachDirectStack* weakSelf = self;
|
|
1577
|
+
_waiting = [transition animateAlongsideTransition:nil
|
|
1578
|
+
completion:^(id<UIViewControllerTransitionCoordinatorContext>) {
|
|
1579
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1580
|
+
PeachDirectStack* stack = weakSelf;
|
|
1581
|
+
if (!stack || stack->_navigation.view.superview != container) return;
|
|
1582
|
+
stack->_waiting = NO;
|
|
1583
|
+
[stack mountIn:container views:views];
|
|
1584
|
+
[PeachOneDirectStage.shared markDirty];
|
|
1585
|
+
});
|
|
1586
|
+
}];
|
|
1587
|
+
if (_waiting) return;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
NSMutableDictionary<NSString*, PeachDirectStackRoute*>* existing = [NSMutableDictionary dictionary];
|
|
1591
|
+
for (PeachDirectStackRoute* route in _applied) existing[route.routeKey] = route;
|
|
1592
|
+
NSMutableArray<PeachDirectStackRoute*>* next = [NSMutableArray arrayWithCapacity:_routes.count];
|
|
1593
|
+
for (NSDictionary* spec in _routes) {
|
|
1594
|
+
NSString* key = spec[@"key"];
|
|
1595
|
+
NSString* rawNode = spec[@"node"];
|
|
1596
|
+
NSString* animation = spec[@"animation"];
|
|
1597
|
+
NSDictionary* header = spec[@"header"];
|
|
1598
|
+
const auto node = [rawNode isKindOfClass:NSString.class] ? strtoull(rawNode.UTF8String, nullptr, 10) : 0;
|
|
1599
|
+
if (!key.length || !node || ![spec[@"presentation"] isEqualToString:@"card"] ||
|
|
1600
|
+
(animation && ![animation isEqualToString:@"default"] && ![animation isEqualToString:@"none"]) ||
|
|
1601
|
+
spec[@"preferredTransition"] || spec[@"transitioningDelegate"] || spec[@"zoom"] ||
|
|
1602
|
+
[spec[@"guardsRemoval"] boolValue] || [spec[@"replaceWithPop"] boolValue] ||
|
|
1603
|
+
[spec[@"verticalGesture"] boolValue] || [spec[@"fullScreenGestureEnabled"] boolValue] ||
|
|
1604
|
+
[spec[@"searchBar"] isKindOfClass:NSDictionary.class]) {
|
|
1605
|
+
[NSException raise:NSInvalidArgumentException format:@"unsupported One direct stack route %@", key];
|
|
1606
|
+
}
|
|
1607
|
+
PeachDirectStackRoute* route = existing[key];
|
|
1608
|
+
if (!route || route.node != node) {
|
|
1609
|
+
route = [PeachDirectStackRoute new];
|
|
1610
|
+
route.routeKey = key;
|
|
1611
|
+
route.node = node;
|
|
1612
|
+
route.view = PeachTakeControllerView(views, node);
|
|
1613
|
+
route.edgesForExtendedLayout = UIRectEdgeAll;
|
|
1614
|
+
route.extendedLayoutIncludesOpaqueBars = YES;
|
|
1615
|
+
}
|
|
1616
|
+
route.title = spec[@"title"];
|
|
1617
|
+
route.headerHidden = [spec[@"headerHidden"] boolValue];
|
|
1618
|
+
route.gestureEnabled = [spec[@"gestureEnabled"] boolValue];
|
|
1619
|
+
route.skipAnimation = [animation isEqualToString:@"none"];
|
|
1620
|
+
route.emit = _emit;
|
|
1621
|
+
UINavigationItem* previous = next.lastObject.navigationItem;
|
|
1622
|
+
previous.backButtonTitle = header[@"backTitle"];
|
|
1623
|
+
NSString* displayMode = header[@"backButtonDisplayMode"];
|
|
1624
|
+
previous.backButtonDisplayMode = [displayMode isEqualToString:@"minimal"] ? UINavigationItemBackButtonDisplayModeMinimal
|
|
1625
|
+
: [displayMode isEqualToString:@"generic"] ? UINavigationItemBackButtonDisplayModeGeneric : UINavigationItemBackButtonDisplayModeDefault;
|
|
1626
|
+
if (![route.header isEqualToDictionary:header]) {
|
|
1627
|
+
route.header = header;
|
|
1628
|
+
UINavigationBarAppearance* appearance = nil;
|
|
1629
|
+
NSString* blur = header[@"blurEffect"];
|
|
1630
|
+
if ([header[@"transparent"] boolValue] || blur) {
|
|
1631
|
+
appearance = [_navigation.navigationBar.standardAppearance copy];
|
|
1632
|
+
if ([header[@"transparent"] boolValue]) {
|
|
1633
|
+
[appearance configureWithTransparentBackground];
|
|
1634
|
+
if (!blur || [blur isEqualToString:@"none"]) appearance.backgroundColor = UIColor.clearColor;
|
|
1635
|
+
}
|
|
1636
|
+
if (blur && ![blur isEqualToString:@"systemDefault"]) appearance.backgroundEffect = PeachBlurEffect(blur);
|
|
1637
|
+
if (header[@"shadowVisible"] && ![header[@"shadowVisible"] boolValue]) appearance.shadowColor = nil;
|
|
1638
|
+
}
|
|
1639
|
+
route.navigationItem.standardAppearance = appearance;
|
|
1640
|
+
route.navigationItem.scrollEdgeAppearance = appearance;
|
|
1641
|
+
route.navigationItem.leftBarButtonItems = [self customBarItems:header[@"leftItems"] views:views];
|
|
1642
|
+
route.navigationItem.rightBarButtonItems = [self customBarItems:header[@"rightItems"] views:views];
|
|
1643
|
+
}
|
|
1644
|
+
[next addObject:route];
|
|
1645
|
+
}
|
|
1646
|
+
PeachDirectStackRoute* previous = static_cast<PeachDirectStackRoute*>(_navigation.topViewController);
|
|
1647
|
+
PeachDirectStackRoute* top = next.lastObject;
|
|
1648
|
+
const BOOL animated = previous && top && !([_applied containsObject:top] ? previous : top).skipAnimation;
|
|
1649
|
+
_applied = next;
|
|
1650
|
+
if (![_navigation.viewControllers isEqualToArray:next]) {
|
|
1651
|
+
[_navigation setViewControllers:next animated:animated];
|
|
1652
|
+
}
|
|
1653
|
+
[self showRoute:top];
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
- (void)showRoute:(PeachDirectStackRoute*)route {
|
|
1657
|
+
[_navigation setNavigationBarHidden:route.headerHidden animated:NO];
|
|
1658
|
+
_navigation.interactivePopGestureRecognizer.enabled = route.gestureEnabled;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
- (void)navigationController:(UINavigationController*)navigation
|
|
1662
|
+
willShowViewController:(UIViewController*)controller animated:(BOOL)animated {
|
|
1663
|
+
[self showRoute:static_cast<PeachDirectStackRoute*>(controller)];
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
- (void)navigationController:(UINavigationController*)navigation
|
|
1667
|
+
didShowViewController:(UIViewController*)controller animated:(BOOL)animated {
|
|
1668
|
+
if (navigation.topViewController != controller || navigation.viewControllers.count >= _applied.count) return;
|
|
1669
|
+
PeachDirectStackRoute* route = static_cast<PeachDirectStackRoute*>(controller);
|
|
1670
|
+
_applied = static_cast<NSArray<PeachDirectStackRoute*>*>(navigation.viewControllers);
|
|
1671
|
+
_emit(@"dismissed", @{@"key": route.routeKey, @"closing": @YES});
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
- (BOOL)ownsView:(UIView*)view {
|
|
1675
|
+
for (PeachDirectStackRoute* route in _applied) if (route.view == view) return YES;
|
|
1676
|
+
return NO;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
- (void)unmount {
|
|
1680
|
+
if (!_navigation) return;
|
|
1681
|
+
[_navigation willMoveToParentViewController:nil];
|
|
1682
|
+
[_navigation.view removeFromSuperview];
|
|
1683
|
+
[_navigation removeFromParentViewController];
|
|
1684
|
+
_navigation.delegate = nil;
|
|
1685
|
+
_navigation = nil;
|
|
1686
|
+
_applied = nil;
|
|
1687
|
+
_waiting = NO;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
- (void)detach { [self unmount]; }
|
|
1691
|
+
@end
|
|
1692
|
+
|
|
1491
1693
|
uint32_t peach_node_css_color(peach_core*, peach_node node, const char* source, size_t size,
|
|
1492
1694
|
double rgba[4]) {
|
|
1493
1695
|
if (!source || !rgba) return 0;
|
|
@@ -1581,6 +1783,52 @@ static NSArray<NSDictionary*>* SwiftSwipeActions(id items) {
|
|
|
1581
1783
|
}
|
|
1582
1784
|
@end
|
|
1583
1785
|
|
|
1786
|
+
#if PEACH_ONE_SWIFT_HOST
|
|
1787
|
+
@interface PeachDirectSwiftHost : NSObject <PeachContainer>
|
|
1788
|
+
- (instancetype)initWithNode:(peach_node)node;
|
|
1789
|
+
@end
|
|
1790
|
+
|
|
1791
|
+
@implementation PeachDirectSwiftHost {
|
|
1792
|
+
OneSwiftHostView* _view;
|
|
1793
|
+
PeachLeafMeasure* _measure;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
- (instancetype)initWithNode:(peach_node)node {
|
|
1797
|
+
if ((self = [super init])) {
|
|
1798
|
+
_view = [OneSwiftHostView new];
|
|
1799
|
+
_measure = [[PeachLeafMeasure alloc] initWithView:_view];
|
|
1800
|
+
_view.onEvent = ^(NSString* event, NSString* args) {
|
|
1801
|
+
NSData* name = [event dataUsingEncoding:NSUTF8StringEncoding];
|
|
1802
|
+
NSData* payload = [args dataUsingEncoding:NSUTF8StringEncoding];
|
|
1803
|
+
peach_one_emit_container_event(nodeLo(node), nodeHi(node),
|
|
1804
|
+
static_cast<const char*>(name.bytes), static_cast<uint32_t>(name.length),
|
|
1805
|
+
static_cast<const char*>(payload.bytes), static_cast<uint32_t>(payload.length));
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
return self;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
- (void)configure:(NSDictionary*)spec emit:(PeachContainerEmit)emit {
|
|
1812
|
+
[_view configureWithPackageName:spec[@"packageName"] view:spec[@"view"]
|
|
1813
|
+
contractHash:spec[@"contractHash"] props:spec[@"props"] fill:[spec[@"fill"] boolValue]];
|
|
1814
|
+
}
|
|
1815
|
+
- (void)child:(peach_node)node {}
|
|
1816
|
+
- (void)mountIn:(UIView*)container views:(id<PeachViewLookup>)views {
|
|
1817
|
+
if (_view.superview != container) [container addSubview:_view];
|
|
1818
|
+
_view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
1819
|
+
_view.frame = container.bounds;
|
|
1820
|
+
}
|
|
1821
|
+
- (BOOL)ownsView:(UIView*)view { return view && view == _view; }
|
|
1822
|
+
- (CGSize)sizeThatFits:(CGSize)proposal { return [_measure sizeWithWidth:proposal.width height:proposal.height]; }
|
|
1823
|
+
- (void)unmount { [_view removeFromSuperview]; }
|
|
1824
|
+
- (void)detach {
|
|
1825
|
+
[self unmount];
|
|
1826
|
+
_view.onEvent = nil;
|
|
1827
|
+
[_view dropHeldProps];
|
|
1828
|
+
}
|
|
1829
|
+
@end
|
|
1830
|
+
#endif
|
|
1831
|
+
|
|
1584
1832
|
@interface PeachDirectTableListContainer : NSObject <PeachContainer>
|
|
1585
1833
|
- (void)refreshLayoutIn:(UIView*)container views:(id<PeachViewLookup>)views;
|
|
1586
1834
|
@end
|
|
@@ -1733,6 +1981,9 @@ int32_t emitEventToHost(peach_node node, NSString* event, NSDictionary* payload)
|
|
|
1733
1981
|
}
|
|
1734
1982
|
|
|
1735
1983
|
id<PeachContainer> makeContainer(NSString* kind, peach_node node, NSDictionary* spec) {
|
|
1984
|
+
#if PEACH_ONE_SWIFT_HOST
|
|
1985
|
+
if ([kind isEqualToString:@"swiftHost"]) return [[PeachDirectSwiftHost alloc] initWithNode:node];
|
|
1986
|
+
#endif
|
|
1736
1987
|
if ([kind isEqualToString:@"swiftUI"]) {
|
|
1737
1988
|
PeachSwiftUI* swift = [PeachSwiftUI new];
|
|
1738
1989
|
NSString* control = spec[@"control"];
|
|
@@ -1753,6 +2004,7 @@ id<PeachContainer> makeContainer(NSString* kind, peach_node node, NSDictionary*
|
|
|
1753
2004
|
if ([kind isEqualToString:@"contextMenu"]) return [PeachContextMenu new];
|
|
1754
2005
|
if ([kind isEqualToString:@"swipeActions"]) return [PeachDirectSwipeActionsContainer new];
|
|
1755
2006
|
if ([kind isEqualToString:@"tableList"]) return [PeachDirectTableListContainer new];
|
|
2007
|
+
if ([kind isEqualToString:@"stack"]) return [PeachDirectStack new];
|
|
1756
2008
|
if ([kind isEqualToString:@"popover"]) {
|
|
1757
2009
|
return [[PeachPopover alloc] initWithDismissRequest:^BOOL(NSInteger revision) {
|
|
1758
2010
|
return emitEventToHost(node, @"shouldDismiss", @{@"revision": @(revision)}) != 0;
|
|
@@ -1835,6 +2087,8 @@ void PeachOneDirectHostInit(void) {
|
|
|
1835
2087
|
} else if ([record.container isKindOfClass:PeachPopover.class] &&
|
|
1836
2088
|
record.frame.size.width > 0 && record.frame.size.height > 0) {
|
|
1837
2089
|
[record.container mountIn:record.hostView views:viewLookup()];
|
|
2090
|
+
} else if ([record.container isKindOfClass:PeachDirectStack.class]) {
|
|
2091
|
+
[record.container mountIn:record.hostView views:viewLookup()];
|
|
1838
2092
|
}
|
|
1839
2093
|
}
|
|
1840
2094
|
}
|
|
@@ -5,6 +5,10 @@ import fs from 'node:fs'
|
|
|
5
5
|
import { createRequire } from 'node:module'
|
|
6
6
|
import path from 'node:path'
|
|
7
7
|
import { fileURLToPath } from 'node:url'
|
|
8
|
+
import {
|
|
9
|
+
renderSwiftSourceGlue,
|
|
10
|
+
writeSwiftPackageArtifacts,
|
|
11
|
+
} from '../../one-bundler/src/nativeSourceContract'
|
|
8
12
|
import { swiftGuestControls } from '../../peach-globals/build/one-swift-control-source'
|
|
9
13
|
import { swiftUIControls } from '../../peach-globals/build/one-swift-ui-controls'
|
|
10
14
|
import {
|
|
@@ -242,13 +246,21 @@ private final class ControlSyncState {
|
|
|
242
246
|
|
|
243
247
|
deinit { OneNativeSyncRegistry.destroy(id) }
|
|
244
248
|
|
|
245
|
-
static func receive(
|
|
249
|
+
static func receive(
|
|
250
|
+
_ hostID: Int, value: NSObject, revision: Int, animated: Bool = false, animation: String? = nil
|
|
251
|
+
) -> ControlSyncState {
|
|
246
252
|
let key = NSNumber(value: hostID)
|
|
247
253
|
if let state = states.object(forKey: key) {
|
|
248
254
|
if revision > state.revision {
|
|
249
255
|
state.revision = revision
|
|
250
256
|
if OneNativeSyncRegistry.get(state.id)?.isEqual(value) != true {
|
|
251
|
-
|
|
257
|
+
if animated {
|
|
258
|
+
withAnimation(animation.map(oneNativeAnimation(named:)) ?? .default) {
|
|
259
|
+
OneNativeSyncRegistry.set(state.id, value: value)
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
OneNativeSyncRegistry.set(state.id, value: value)
|
|
263
|
+
}
|
|
252
264
|
}
|
|
253
265
|
}
|
|
254
266
|
return state
|
|
@@ -377,7 +389,13 @@ private class ControlComposition {
|
|
|
377
389
|
let snapshot = spec["syncState"] as? Spec,
|
|
378
390
|
let value = snapshot["value"] as? NSObject,
|
|
379
391
|
let revision = snapshot["revision"] as? Int {
|
|
380
|
-
let state = ControlSyncState.receive(
|
|
392
|
+
let state = ControlSyncState.receive(
|
|
393
|
+
hostID,
|
|
394
|
+
value: value,
|
|
395
|
+
revision: revision,
|
|
396
|
+
animated: snapshot["animated"] as? Bool ?? false,
|
|
397
|
+
animation: snapshot["animation"] as? String
|
|
398
|
+
)
|
|
381
399
|
syncStates[id] = state
|
|
382
400
|
guestSpec["syncStateId"] = Int(state.id)
|
|
383
401
|
guestSpec["value"] = OneNativeSyncRegistry.get(state.id)
|
|
@@ -1100,19 +1118,31 @@ public func oneStartupProfileView() -> AnyView {
|
|
|
1100
1118
|
}
|
|
1101
1119
|
`
|
|
1102
1120
|
|
|
1103
|
-
|
|
1121
|
+
function guestMainSwift(appPackages: readonly string[]) {
|
|
1122
|
+
const apps = appPackages.length > 0
|
|
1123
|
+
const imports = apps
|
|
1124
|
+
? [
|
|
1125
|
+
'import Foundation',
|
|
1126
|
+
...appPackages.map((name) => 'import PeachApp_' + name),
|
|
1127
|
+
'',
|
|
1128
|
+
].join('\n')
|
|
1129
|
+
: ''
|
|
1130
|
+
const retainClasses = appPackages
|
|
1131
|
+
.map((name) => ' _ = NSStringFromClass(OneNativeSourceViews_' + name + '.self)\n')
|
|
1132
|
+
.join('')
|
|
1133
|
+
return `${imports}import SwiftUI
|
|
1104
1134
|
import PeachJSON
|
|
1105
1135
|
import OneNativeControlsCore
|
|
1106
1136
|
import OneNativeControlsHost
|
|
1107
1137
|
|
|
1108
1138
|
@main
|
|
1109
|
-
struct OneNativeControlsGuest: PeachPackage {
|
|
1139
|
+
struct OneNativeControlsGuest: ${apps ? 'SwiftUI.' : ''}PeachPackage {
|
|
1110
1140
|
init() {
|
|
1111
|
-
PeachOneDirectHostInit()
|
|
1141
|
+
${retainClasses} PeachOneDirectHostInit()
|
|
1112
1142
|
_ = peach_register_views
|
|
1113
1143
|
}
|
|
1114
1144
|
|
|
1115
|
-
@ViewBuilder func view(props: JSON) -> some View {
|
|
1145
|
+
@ViewBuilder func view(props: ${apps ? 'PeachJSON.' : ''}JSON) -> some View {
|
|
1116
1146
|
if props["oneDirectStage"] != nil {
|
|
1117
1147
|
OneDirectStageView()
|
|
1118
1148
|
} else {
|
|
@@ -1129,6 +1159,7 @@ struct OneNativeControlsGuest: PeachPackage {
|
|
|
1129
1159
|
}
|
|
1130
1160
|
}
|
|
1131
1161
|
`
|
|
1162
|
+
}
|
|
1132
1163
|
|
|
1133
1164
|
function resolveOneNativeAppleIosDir(appRoot?: string): string {
|
|
1134
1165
|
if (appRoot && fs.existsSync(path.join(appRoot, 'package.json'))) {
|
|
@@ -1785,9 +1816,21 @@ export async function oneNativeControlsPackage(
|
|
|
1785
1816
|
appRoot?: string,
|
|
1786
1817
|
linkedGroups?: readonly string[],
|
|
1787
1818
|
sdk?: OneNativeControlsSDKInput | null,
|
|
1819
|
+
appPackages: readonly string[] = [],
|
|
1788
1820
|
): Promise<OneNativeControlsPackage> {
|
|
1789
1821
|
const iosDir = resolveOneNativeAppleIosDir(appRoot)
|
|
1790
1822
|
const coreAbiIosDir = resolveCoreAbiIosDir()
|
|
1823
|
+
const appViews = appPackages
|
|
1824
|
+
.map((directory) => ({ directory, ...writeSwiftPackageArtifacts(directory) }))
|
|
1825
|
+
.filter(({ views }) => Object.keys(views).length > 0)
|
|
1826
|
+
const appTargets = new Set<string>()
|
|
1827
|
+
for (const { packageId, defaultViewFiles } of appViews) {
|
|
1828
|
+
if (defaultViewFiles.length)
|
|
1829
|
+
throw new Error('typed Swift views need a library source package: ' + packageId)
|
|
1830
|
+
if (appTargets.has(packageId))
|
|
1831
|
+
throw new Error('duplicate Swift view package: ' + packageId)
|
|
1832
|
+
appTargets.add(packageId)
|
|
1833
|
+
}
|
|
1791
1834
|
const generated = swiftGuestControls(
|
|
1792
1835
|
path.dirname(iosDir),
|
|
1793
1836
|
[
|
|
@@ -1843,8 +1886,11 @@ export async function oneNativeControlsPackage(
|
|
|
1843
1886
|
const sdkSources = new Set(ONE_SDK_RUNTIME_SOURCES.map((file) => path.basename(file)))
|
|
1844
1887
|
for (const folder of ['', 'Generated', 'SDK']) {
|
|
1845
1888
|
for (const name of fs.readdirSync(path.join(iosDir, folder)).sort()) {
|
|
1846
|
-
|
|
1847
|
-
|
|
1889
|
+
if (
|
|
1890
|
+
!name.endsWith('.swift') ||
|
|
1891
|
+
(name === 'OneSwiftPackage.swift' && !appViews.length)
|
|
1892
|
+
)
|
|
1893
|
+
continue
|
|
1848
1894
|
if (bindings && sdkSources.has(name)) continue
|
|
1849
1895
|
if (paths.has(name))
|
|
1850
1896
|
throw new Error(`duplicate Swift filename ${name} in OneNativeControls`)
|
|
@@ -1864,7 +1910,11 @@ export async function oneNativeControlsPackage(
|
|
|
1864
1910
|
Object.entries(
|
|
1865
1911
|
collectSwiftSourceClosure(
|
|
1866
1912
|
sources,
|
|
1867
|
-
[
|
|
1913
|
+
[
|
|
1914
|
+
...DIRECT_HOST_SWIFT_SEEDS,
|
|
1915
|
+
...hostControls.viewClasses,
|
|
1916
|
+
...(appViews.length ? ['OneSwiftHostView'] : []),
|
|
1917
|
+
],
|
|
1868
1918
|
swiftCodeMask,
|
|
1869
1919
|
new Set(['View']),
|
|
1870
1920
|
),
|
|
@@ -1935,7 +1985,19 @@ export async function oneNativeControlsPackage(
|
|
|
1935
1985
|
watched.add(sourcePath)
|
|
1936
1986
|
}
|
|
1937
1987
|
files.set('Sources/ControlsHost/ios/PeachOneDirectHost.mm', PEACH_ONE_DIRECT_HOST_MM)
|
|
1938
|
-
|
|
1988
|
+
for (const { directory, packageId, contracts, files: sources } of appViews) {
|
|
1989
|
+
const prefix = 'Sources/PeachApp_' + packageId + '/'
|
|
1990
|
+
for (const name of Object.keys(sources)) {
|
|
1991
|
+
const file = path.join(directory, name)
|
|
1992
|
+
files.set(prefix + name, fs.readFileSync(file, 'utf8'))
|
|
1993
|
+
watched.add(file)
|
|
1994
|
+
}
|
|
1995
|
+
files.set(
|
|
1996
|
+
prefix + 'OneNativeSource.generated.swift',
|
|
1997
|
+
renderSwiftSourceGlue(packageId, contracts, true).source,
|
|
1998
|
+
)
|
|
1999
|
+
}
|
|
2000
|
+
files.set(GUEST_ENTRY, guestMainSwift([...appTargets]))
|
|
1939
2001
|
if (bindings) {
|
|
1940
2002
|
files.set('Sources/One/One.swift', oneSDKModule)
|
|
1941
2003
|
for (const relative of ONE_SDK_RUNTIME_SOURCES) {
|
|
@@ -1963,9 +2025,10 @@ export async function oneNativeControlsPackage(
|
|
|
1963
2025
|
const swiftDefines = (flags: Iterable<string>) =>
|
|
1964
2026
|
Array.from(flags, (flag) => '.define(' + JSON.stringify(flag) + ')')
|
|
1965
2027
|
const groupDefines = [...defines].filter((flag) => flag.startsWith('ONE_GROUP_'))
|
|
1966
|
-
const hostClangDefines =
|
|
1967
|
-
|
|
1968
|
-
|
|
2028
|
+
const hostClangDefines = [
|
|
2029
|
+
...groupDefines,
|
|
2030
|
+
...(appViews.length ? ['PEACH_ONE_SWIFT_HOST'] : []),
|
|
2031
|
+
].map((flag) => '.define(' + JSON.stringify(flag) + ', to: "1")')
|
|
1969
2032
|
const bindingSettings = [
|
|
1970
2033
|
...swiftDefines(bindings?.defines ?? []),
|
|
1971
2034
|
'.unsafeFlags(["-suppress-warnings"])',
|
|
@@ -2008,6 +2071,14 @@ export async function oneNativeControlsPackage(
|
|
|
2008
2071
|
` .target(name: "OneNativeControlsHost", dependencies: [${bindings ? '"One", ' : ''}"OneNativeControlsCore"], path: "Sources/ControlsHost", publicHeadersPath: "include"${hostSettings}),`,
|
|
2009
2072
|
]
|
|
2010
2073
|
|
|
2074
|
+
const appDependencies = [...appTargets].map((packageId) => `"PeachApp_${packageId}"`)
|
|
2075
|
+
const appSourceTargets = appDependencies.map(
|
|
2076
|
+
(name) =>
|
|
2077
|
+
` .target(name: ${name}, dependencies: ["OneNativeControlsCore"], swiftSettings: [.swiftLanguageMode(.v5), .unsafeFlags(["-Xfrontend", "-import-module", "-Xfrontend", "OneNativeControlsCore"])]),`,
|
|
2078
|
+
)
|
|
2079
|
+
const appTargetDependencies = appDependencies.length
|
|
2080
|
+
? `, ${appDependencies.join(', ')}`
|
|
2081
|
+
: ''
|
|
2011
2082
|
let manifest: string
|
|
2012
2083
|
if (bindings) {
|
|
2013
2084
|
manifest = [
|
|
@@ -2017,7 +2088,8 @@ export async function oneNativeControlsPackage(
|
|
|
2017
2088
|
' .target(name: "One", path: "Sources/One"),',
|
|
2018
2089
|
` .target(name: "OneSDKBindings", dependencies: ["One"], path: "Sources/OneSDKBindings", swiftSettings: [${bindingSettings.join(', ')}]),`,
|
|
2019
2090
|
...coreTargets,
|
|
2020
|
-
|
|
2091
|
+
...appSourceTargets,
|
|
2092
|
+
` .executableTarget(name: "Controls", dependencies: ["One", "OneSDKBindings", "OneNativeControlsCore", "OneNativeControlsHost"${appTargetDependencies}], path: "Sources/Controls", swiftSettings: [${controlSettings.join(', ')}]),`,
|
|
2021
2093
|
'])',
|
|
2022
2094
|
'',
|
|
2023
2095
|
].join('\n')
|
|
@@ -2027,7 +2099,8 @@ export async function oneNativeControlsPackage(
|
|
|
2027
2099
|
'import PackageDescription',
|
|
2028
2100
|
`let package = Package(name: "${ONE_NATIVE_CONTROLS_PACKAGE}", platforms: [.iOS(.v17)], targets: [`,
|
|
2029
2101
|
...coreTargets,
|
|
2030
|
-
|
|
2102
|
+
...appSourceTargets,
|
|
2103
|
+
` .executableTarget(name: "${ONE_NATIVE_CONTROLS_PACKAGE}", dependencies: ["OneNativeControlsCore", "OneNativeControlsHost"${appTargetDependencies}], path: "Sources/Controls", swiftSettings: [${controlSettings.join(', ')}]),`,
|
|
2031
2104
|
'])',
|
|
2032
2105
|
'',
|
|
2033
2106
|
].join('\n')
|
|
@@ -2062,6 +2135,7 @@ interface OneNativeControlsBuildOptions {
|
|
|
2062
2135
|
moduleRoot?: string
|
|
2063
2136
|
startupRuntimeUrl?: URL
|
|
2064
2137
|
sdk?: OneNativeControlsSDKInput | null
|
|
2138
|
+
appPackages?: readonly string[]
|
|
2065
2139
|
}
|
|
2066
2140
|
|
|
2067
2141
|
async function compileOneNativeControls<T>(
|
|
@@ -2079,7 +2153,9 @@ async function compileOneNativeControls<T>(
|
|
|
2079
2153
|
defaultSwiftModuleRoot() ??
|
|
2080
2154
|
(original?.reemitForWasi ? await swiftDistributionRoot() : undefined)
|
|
2081
2155
|
let sdk = original
|
|
2082
|
-
|
|
2156
|
+
const prepare = (sdk: OneNativeControlsSDKInput | null | undefined) =>
|
|
2157
|
+
oneNativeControlsPackage(appRoot, linkedGroups, sdk, options?.appPackages)
|
|
2158
|
+
let prepared = await prepare(sdk)
|
|
2083
2159
|
let receipt: string | undefined
|
|
2084
2160
|
let restored = false
|
|
2085
2161
|
if (sdk?.reemitForWasi && moduleRoot) {
|
|
@@ -2092,7 +2168,7 @@ async function compileOneNativeControls<T>(
|
|
|
2092
2168
|
const cached = cachedWasiBindings(receipt, sdk.files)
|
|
2093
2169
|
if (cached) {
|
|
2094
2170
|
sdk = { ...sdk, files: cached }
|
|
2095
|
-
prepared = await
|
|
2171
|
+
prepared = await prepare(sdk)
|
|
2096
2172
|
restored = true
|
|
2097
2173
|
}
|
|
2098
2174
|
}
|
|
@@ -2110,7 +2186,7 @@ async function compileOneNativeControls<T>(
|
|
|
2110
2186
|
const files = await sdk.reemitForWasi(diagnostic)
|
|
2111
2187
|
if (!files) throw error
|
|
2112
2188
|
sdk = { ...sdk, files }
|
|
2113
|
-
prepared = await
|
|
2189
|
+
prepared = await prepare(sdk)
|
|
2114
2190
|
}
|
|
2115
2191
|
}
|
|
2116
2192
|
}
|
|
@@ -2134,10 +2210,11 @@ export async function stageOneNativeControlsArtifact(
|
|
|
2134
2210
|
appRoot: string,
|
|
2135
2211
|
sdk: OneNativeControlsSDKInput | undefined,
|
|
2136
2212
|
linkedGroups?: readonly string[],
|
|
2213
|
+
appPackages?: readonly string[],
|
|
2137
2214
|
) {
|
|
2138
2215
|
const { artifact } = await compileOneNativeControls(
|
|
2139
2216
|
appRoot,
|
|
2140
|
-
{ sdk },
|
|
2217
|
+
{ sdk, appPackages },
|
|
2141
2218
|
linkedGroups,
|
|
2142
2219
|
(project, moduleRoot) => artifactFor(project, GUEST_ENTRY, moduleRoot),
|
|
2143
2220
|
)
|
|
@@ -2149,6 +2226,7 @@ export async function stageOneNativeControlsRelease(
|
|
|
2149
2226
|
options?: OneNativeControlsBuildOptions,
|
|
2150
2227
|
linkedGroups?: readonly string[],
|
|
2151
2228
|
): Promise<{
|
|
2229
|
+
packagePath: string
|
|
2152
2230
|
metadataPath: string
|
|
2153
2231
|
metadata: SwiftEntryModuleArgs
|
|
2154
2232
|
files: Map<string, Blob>
|
|
@@ -2180,5 +2258,5 @@ export async function stageOneNativeControlsRelease(
|
|
|
2180
2258
|
ONE_NATIVE_CONTROLS_PACKAGE,
|
|
2181
2259
|
metadata,
|
|
2182
2260
|
)
|
|
2183
|
-
return { metadataPath, metadata, files, oneSDKModules }
|
|
2261
|
+
return { packagePath, metadataPath, metadata, files, oneSDKModules }
|
|
2184
2262
|
}
|