@thelacanians/vue-native-cli 0.4.10 → 0.4.11
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/cli.js +1 -1
- package/native/android/VueNativeCore/build.gradle.kts +1 -1
- package/native/ios/VueNativeCore/Sources/VueNativeCore/Bridge/NativeBridge.swift +3 -2
- package/native/ios/VueNativeCore/Sources/VueNativeCore/Components/Factories/VSafeAreaFactory.swift +1 -1
- package/native/ios/VueNativeCore/Sources/VueNativeCore/Components/NativeComponentFactory.swift +4 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import { join, dirname } from "path";
|
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
import { existsSync } from "fs";
|
|
12
12
|
import pc from "picocolors";
|
|
13
|
-
var VERSION = "0.4.
|
|
13
|
+
var VERSION = "0.4.11";
|
|
14
14
|
var createCommand = new Command("create").description("Create a new Vue Native project").argument("<name>", "project name").option("-t, --template <template>", "project template (blank, tabs, drawer)", "blank").action(async (name, options) => {
|
|
15
15
|
const template = options.template;
|
|
16
16
|
if (!["blank", "tabs", "drawer"].includes(template)) {
|
|
@@ -352,7 +352,7 @@ public final class NativeBridge {
|
|
|
352
352
|
if let factory = ComponentRegistry.factory(for: parentView) {
|
|
353
353
|
factory.insertChild(childView, into: container, before: nil)
|
|
354
354
|
} else {
|
|
355
|
-
container.
|
|
355
|
+
container.flex.addItem(childView)
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
|
|
@@ -385,9 +385,10 @@ public final class NativeBridge {
|
|
|
385
385
|
if let factory = ComponentRegistry.factory(for: parentView) {
|
|
386
386
|
factory.insertChild(childView, into: container, before: beforeView)
|
|
387
387
|
} else if let index = container.subviews.firstIndex(of: beforeView) {
|
|
388
|
+
container.flex.addItem(childView)
|
|
388
389
|
container.insertSubview(childView, at: index)
|
|
389
390
|
} else {
|
|
390
|
-
container.
|
|
391
|
+
container.flex.addItem(childView)
|
|
391
392
|
}
|
|
392
393
|
}
|
|
393
394
|
|
package/native/ios/VueNativeCore/Sources/VueNativeCore/Components/Factories/VSafeAreaFactory.swift
CHANGED
|
@@ -49,7 +49,7 @@ final class SafeAreaView: UIView {
|
|
|
49
49
|
/// we reach vc.view or UIWindow which are NOT part of the Yoga tree.
|
|
50
50
|
private func findFlexRoot() -> UIView? {
|
|
51
51
|
var v: UIView? = self
|
|
52
|
-
while let parent = v?.superview, parent.
|
|
52
|
+
while let parent = v?.superview, parent.isFlexEnabled {
|
|
53
53
|
v = parent
|
|
54
54
|
}
|
|
55
55
|
return v
|
package/native/ios/VueNativeCore/Sources/VueNativeCore/Components/NativeComponentFactory.swift
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#if canImport(UIKit)
|
|
2
2
|
import UIKit
|
|
3
|
+
import FlexLayout
|
|
3
4
|
|
|
4
5
|
/// Protocol that all native component factories must implement.
|
|
5
6
|
/// Each factory knows how to create a UIView, update its properties,
|
|
@@ -40,9 +41,11 @@ extension NativeComponentFactory {
|
|
|
40
41
|
|
|
41
42
|
func insertChild(_ child: UIView, into parent: UIView, before anchor: UIView?) {
|
|
42
43
|
if let anchor = anchor, let idx = parent.subviews.firstIndex(of: anchor) {
|
|
44
|
+
parent.flex.addItem(child)
|
|
45
|
+
// Move to correct position after adding
|
|
43
46
|
parent.insertSubview(child, at: idx)
|
|
44
47
|
} else {
|
|
45
|
-
parent.
|
|
48
|
+
parent.flex.addItem(child)
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
|