@blotch/angular-lynx-native 22.2.21 → 22.2.22
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/README.md +4 -0
- package/dist/android/build.d.ts +6 -1
- package/dist/android/build.d.ts.map +1 -1
- package/dist/android/build.js +14 -3
- package/dist/android/run.d.ts +10 -1
- package/dist/android/run.d.ts.map +1 -1
- package/dist/android/run.js +46 -1
- package/dist/dev-build.d.ts +16 -0
- package/dist/dev-build.d.ts.map +1 -0
- package/dist/dev-build.js +44 -0
- package/dist/generate.d.ts +24 -5
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +14 -6
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +65 -9
- package/dist/ios/build.d.ts +14 -1
- package/dist/ios/build.d.ts.map +1 -1
- package/dist/ios/build.js +10 -6
- package/dist/ios/iphone.d.ts +1 -1
- package/dist/ios/iphone.d.ts.map +1 -1
- package/dist/ios/iphone.js +4 -1
- package/dist/ios/project.d.ts +8 -1
- package/dist/ios/project.d.ts.map +1 -1
- package/dist/ios/project.js +17 -3
- package/dist/ios/run.d.ts +1 -1
- package/dist/ios/run.d.ts.map +1 -1
- package/dist/ios/run.js +4 -1
- package/dist/run.d.ts +42 -2
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +16 -1
- package/package.json +1 -1
- package/templates/android/app/src/debug/java/dev/angularlynx/shell/DevServer.kt +159 -0
- package/templates/android/app/src/debug/java/dev/angularlynx/shell/DevServerModules.kt +163 -0
- package/templates/android/app/src/debug/res/xml/network_security_config.xml +13 -0
- package/templates/android/app/src/main/java/dev/angularlynx/shell/AssetsModule.kt +22 -0
- package/templates/android/app/src/main/java/dev/angularlynx/shell/MainActivity.kt +8 -1
- package/templates/android/app/src/main/java/dev/angularlynx/shell/ResourceFetchers.kt +12 -6
- package/templates/android/app/src/release/java/dev/angularlynx/shell/DevServer.kt +24 -0
- package/templates/ios/App/AssetsModule.swift +21 -3
- package/templates/ios/App/BundleResourceFetcher.swift +46 -2
- package/templates/ios/App/DevServer.swift +190 -0
- package/templates/ios/App/DevServerModules.swift +223 -0
- package/templates/ios/App/LynxViewController.swift +9 -1
|
@@ -40,6 +40,8 @@ final class LynxViewController: UIViewController {
|
|
|
40
40
|
}
|
|
41
41
|
// Bundled files for the main thread's fetch and Image (AssetsModule).
|
|
42
42
|
config.register(AssetsModule.self)
|
|
43
|
+
// `ng serve --platform ios`'s live reload, in the development build.
|
|
44
|
+
DevServer.shared.register(in: config)
|
|
43
45
|
let lynxView = LynxView { builder in
|
|
44
46
|
builder.config = config
|
|
45
47
|
// Lets main-thread code, where Angular runs, call the config's modules
|
|
@@ -59,7 +61,13 @@ final class LynxViewController: UIViewController {
|
|
|
59
61
|
|
|
60
62
|
layoutLynxView()
|
|
61
63
|
lynxView.updateGlobalProps(with: globalProps())
|
|
62
|
-
|
|
64
|
+
// The bundle inside the app, or in the development build, the dev
|
|
65
|
+
// server's, which it loads again on every edit.
|
|
66
|
+
let templateURL = DevServer.shared.templateURL
|
|
67
|
+
lynxView.loadTemplate(fromURL: templateURL, initData: nil)
|
|
68
|
+
DevServer.shared.attach(to: view) { [weak self] in
|
|
69
|
+
self?.lynxView?.loadTemplate(fromURL: templateURL, initData: nil)
|
|
70
|
+
}
|
|
63
71
|
|
|
64
72
|
// Send the new theme when the phone switches between light and dark
|
|
65
73
|
// while the app is open. Before iOS 17, traitCollectionDidChange does.
|