one 2.12.1 → 2.13.1
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/cjs/platform/NavigationSplitView.native.cjs +1 -1
- package/dist/cjs/platform/NavigationSplitView.native.js +1 -1
- package/dist/cjs/platform/NavigationSplitView.native.js.map +1 -1
- package/dist/cjs/platform/NavigationStack.native.cjs +22 -2
- package/dist/cjs/platform/NavigationStack.native.js +22 -2
- package/dist/cjs/platform/NavigationStack.native.js.map +1 -1
- package/dist/cjs/platform/TabView.native.cjs +1 -0
- package/dist/cjs/platform/TabView.native.js +1 -0
- package/dist/cjs/platform/TabView.native.js.map +1 -1
- package/dist/cjs/platform/generated/swiftui.cjs +5 -0
- package/dist/cjs/platform/generated/swiftui.native.cjs +5 -0
- package/dist/cjs/platform/generated/swiftui.native.js +5 -0
- package/dist/cjs/platform/generated/swiftui.native.js.map +1 -1
- package/dist/cjs/platform/index.native.cjs +1 -0
- package/dist/cjs/platform/index.native.js +1 -0
- package/dist/cjs/platform/index.native.js.map +1 -1
- package/dist/cjs/platform/specs/OneNativeToolbarDefaultItemNativeComponent.cjs +33 -0
- package/dist/cjs/platform/specs/OneNativeToolbarDefaultItemNativeComponent.native.cjs +33 -0
- package/dist/cjs/platform/specs/OneNativeToolbarDefaultItemNativeComponent.native.js +34 -0
- package/dist/cjs/platform/specs/OneNativeToolbarDefaultItemNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/unsupported.cjs +4 -0
- package/dist/cjs/platform/unsupported.native.cjs +4 -0
- package/dist/cjs/platform/unsupported.native.js +4 -0
- package/dist/cjs/platform/unsupported.native.js.map +1 -1
- package/dist/esm/platform/NavigationSplitView.native.js +2 -2
- package/dist/esm/platform/NavigationSplitView.native.js.map +1 -1
- package/dist/esm/platform/NavigationStack.native.js +22 -3
- package/dist/esm/platform/NavigationStack.native.js.map +1 -1
- package/dist/esm/platform/TabView.native.js +1 -0
- package/dist/esm/platform/TabView.native.js.map +1 -1
- package/dist/esm/platform/generated/swiftui.mjs +5 -0
- package/dist/esm/platform/generated/swiftui.mjs.map +1 -1
- package/dist/esm/platform/generated/swiftui.native.js +5 -0
- package/dist/esm/platform/generated/swiftui.native.js.map +1 -1
- package/dist/esm/platform/index.native.js +2 -1
- package/dist/esm/platform/index.native.js.map +1 -1
- package/dist/esm/platform/specs/OneNativeToolbarDefaultItemNativeComponent.mjs +15 -0
- package/dist/esm/platform/specs/OneNativeToolbarDefaultItemNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneNativeToolbarDefaultItemNativeComponent.native.js +15 -0
- package/dist/esm/platform/specs/OneNativeToolbarDefaultItemNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/unsupported.mjs +4 -0
- package/dist/esm/platform/unsupported.mjs.map +1 -1
- package/dist/esm/platform/unsupported.native.js +4 -0
- package/dist/esm/platform/unsupported.native.js.map +1 -1
- package/ios/Generated/OneNativeNavigationStackComponentView.h +2 -0
- package/ios/Generated/OneNativeNavigationStackComponentView.mm +38 -4
- package/ios/Generated/OneNativeSwiftUI.swift +13 -0
- package/ios/Generated/OneNativeTabViewView.swift +23 -10
- package/ios/Generated/OneNativeToolbarView.swift +16 -5
- package/ios/OneNativeComposition.swift +14 -9
- package/package.json +17 -16
- package/schema.json +26 -0
- package/src/platform/NavigationSplitView.native.tsx +3 -1
- package/src/platform/NavigationStack.native.tsx +37 -2
- package/src/platform/README.md +5 -0
- package/src/platform/TabView.native.tsx +2 -0
- package/src/platform/generated/containerTypes.ts +5 -0
- package/src/platform/generated/swiftui.ts +6 -0
- package/src/platform/generated/types.ts +2 -0
- package/src/platform/index.native.ts +2 -0
- package/src/platform/specs/OneNativeToolbarDefaultItemNativeComponent.ts +9 -0
- package/src/platform/types.ts +4 -0
- package/src/platform/unsupported.ts +7 -0
- package/types/platform/NavigationSplitView.native.d.ts.map +1 -1
- package/types/platform/NavigationStack.native.d.ts +2 -1
- package/types/platform/NavigationStack.native.d.ts.map +1 -1
- package/types/platform/TabView.native.d.ts.map +1 -1
- package/types/platform/generated/containerTypes.d.ts +5 -1
- package/types/platform/generated/containerTypes.d.ts.map +1 -1
- package/types/platform/generated/swiftui.d.ts +6 -0
- package/types/platform/generated/swiftui.d.ts.map +1 -1
- package/types/platform/generated/types.d.ts +1 -1
- package/types/platform/generated/types.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +2 -1
- package/types/platform/index.native.d.ts.map +1 -1
- package/types/platform/specs/OneNativeToolbarDefaultItemNativeComponent.d.ts +8 -0
- package/types/platform/specs/OneNativeToolbarDefaultItemNativeComponent.d.ts.map +1 -0
- package/types/platform/types.d.ts +1 -0
- package/types/platform/types.d.ts.map +1 -1
- package/types/platform/unsupported.d.ts +3 -1
- package/types/platform/unsupported.d.ts.map +1 -1
|
@@ -379,6 +379,19 @@ enum OneNativeGenerated {
|
|
|
379
379
|
default: preconditionFailure("invalid SpacerSizing: \(value)")
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
+
static func toolbarDefaultItemKind(_ value: String) -> ToolbarDefaultItemKind {
|
|
383
|
+
switch value {
|
|
384
|
+
case "sidebarToggle":
|
|
385
|
+
return .sidebarToggle
|
|
386
|
+
case "title":
|
|
387
|
+
if #available(iOS 18, *) { return .title }
|
|
388
|
+
preconditionFailure("ToolbarDefaultItemKind.title requires iOS 18")
|
|
389
|
+
case "search":
|
|
390
|
+
if #available(iOS 26, *) { return .search }
|
|
391
|
+
preconditionFailure("ToolbarDefaultItemKind.search requires iOS 26")
|
|
392
|
+
default: preconditionFailure("invalid ToolbarDefaultItemKind: \(value)")
|
|
393
|
+
}
|
|
394
|
+
}
|
|
382
395
|
#if ONE_GROUP_WALLET
|
|
383
396
|
static func payWithApplePayButtonLabel(_ value: String) -> PayWithApplePayButtonLabel {
|
|
384
397
|
switch value {
|
|
@@ -19,6 +19,7 @@ struct OneNativeSectionAction: Decodable, Equatable, Identifiable {
|
|
|
19
19
|
struct OneNativeTabModifiers: Decodable, Equatable {
|
|
20
20
|
var image: String?
|
|
21
21
|
var labelStyle: String?
|
|
22
|
+
var navigationStack: Bool?
|
|
22
23
|
var section: String?
|
|
23
24
|
var disabled: Bool?
|
|
24
25
|
var hidden: Bool?
|
|
@@ -509,17 +510,22 @@ private struct TabViewContent: View {
|
|
|
509
510
|
@TabContentBuilder<String>
|
|
510
511
|
private func tab(_ page: OneNativeTabItem) -> some TabContent<String> {
|
|
511
512
|
Tab(value: page.id, role: OneNativeGenerated.tabRole(page.role)) {
|
|
512
|
-
|
|
513
|
-
slot(page)
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
513
|
+
if page.modifiers.navigationStack == false {
|
|
514
|
+
styled(slot(page).background(ActionTabHook(host: host, page: page.view)), page)
|
|
515
|
+
} else {
|
|
516
|
+
NavigationStack {
|
|
517
|
+
styled(
|
|
518
|
+
slot(page)
|
|
519
|
+
.background(ActionTabHook(host: host, page: page.view))
|
|
520
|
+
.containerBackground(.clear, for: .navigation),
|
|
521
|
+
page
|
|
522
|
+
)
|
|
523
|
+
.toolbar {
|
|
524
|
+
ForEach(model.toolbarEntries) { entry in
|
|
525
|
+
OneNativeToolbarEntryContent(entry: entry)
|
|
526
|
+
}
|
|
521
527
|
}
|
|
522
|
-
|
|
528
|
+
}
|
|
523
529
|
}
|
|
524
530
|
} label: {
|
|
525
531
|
if let image = page.modifiers.image {
|
|
@@ -534,6 +540,13 @@ private struct TabViewContent: View {
|
|
|
534
540
|
.oneNativeTabContent(page.modifiers)
|
|
535
541
|
}
|
|
536
542
|
|
|
543
|
+
@available(iOS 18.0, *)
|
|
544
|
+
private func styled(_ content: some View, _ page: OneNativeTabItem) -> some View {
|
|
545
|
+
content
|
|
546
|
+
.oneNativeStyle(page.style, emit: page.emit)
|
|
547
|
+
.toolbarVisibility(OneNativeGenerated.visibility(model.tabBarVisibility), for: .tabBar)
|
|
548
|
+
}
|
|
549
|
+
|
|
537
550
|
private var legacyTabView: some View {
|
|
538
551
|
TabView(selection: Binding(get: { model.controlled.value }, set: { model.select($0) })) {
|
|
539
552
|
ForEach(model.groups.flatMap(\.tabs)) { page in
|
|
@@ -7,7 +7,7 @@ import UIKit
|
|
|
7
7
|
// that is what .toolbar { } builds, and the hosting NavigationStack renders the entries
|
|
8
8
|
// with a ForEach the way SwiftUI itself composes toolbar content.
|
|
9
9
|
struct OneNativeToolbarEntry: Identifiable {
|
|
10
|
-
enum Kind { case item, group, spacer }
|
|
10
|
+
enum Kind { case item, group, spacer, defaultItem }
|
|
11
11
|
|
|
12
12
|
let id: ObjectIdentifier
|
|
13
13
|
let kind: Kind
|
|
@@ -15,6 +15,7 @@ struct OneNativeToolbarEntry: Identifiable {
|
|
|
15
15
|
let sizing: String
|
|
16
16
|
let label: String
|
|
17
17
|
let systemImage: String
|
|
18
|
+
let defaultItem: String
|
|
18
19
|
let content: AnyView?
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -51,6 +52,12 @@ struct OneNativeToolbarEntryContent: ToolbarContent {
|
|
|
51
52
|
OneNativeGenerated.spacerSizing(entry.sizing),
|
|
52
53
|
placement: OneNativeGenerated.toolbarItemPlacement(entry.placement))
|
|
53
54
|
}
|
|
55
|
+
case .defaultItem:
|
|
56
|
+
if #available(iOS 26.0, *) {
|
|
57
|
+
DefaultToolbarItem(
|
|
58
|
+
kind: OneNativeGenerated.toolbarDefaultItemKind(entry.defaultItem),
|
|
59
|
+
placement: OneNativeGenerated.toolbarItemPlacement(entry.placement))
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
}
|
|
@@ -61,6 +68,7 @@ final class OneNativeToolbarMarkerModel: ObservableObject {
|
|
|
61
68
|
@Published var sizing = "flexible"
|
|
62
69
|
@Published var label = ""
|
|
63
70
|
@Published var systemImage = ""
|
|
71
|
+
@Published var defaultItem = ""
|
|
64
72
|
@Published var swiftStyle = OneNativeStyle()
|
|
65
73
|
var onEntryChange: (() -> Void)?
|
|
66
74
|
var onSDKEvent: ((String, String) -> Void)?
|
|
@@ -77,7 +85,7 @@ private struct OneNativeToolbarMarkerContent: View {
|
|
|
77
85
|
}
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
// a ToolbarItem, a ToolbarItemGroup, or a
|
|
88
|
+
// a ToolbarItem, a ToolbarItemGroup, a ToolbarSpacer, or a DefaultToolbarItem. all four are the same marker:
|
|
81
89
|
// they compose their children and hand the hosting bar one entry to render, and they
|
|
82
90
|
// render nothing where they sit.
|
|
83
91
|
@objcMembers
|
|
@@ -94,13 +102,14 @@ public final class OneNativeToolbarMarkerView: OneNativeContainerView {
|
|
|
94
102
|
|
|
95
103
|
required init?(coder: NSCoder) { fatalError("init(coder:) is unavailable") }
|
|
96
104
|
|
|
97
|
-
public func configure(kind: String, placement: String, sizing: String, label: String, systemImage: String) {
|
|
105
|
+
public func configure(kind: String, placement: String, sizing: String, label: String, systemImage: String, defaultItem: String) {
|
|
98
106
|
var changed = false
|
|
99
107
|
if model.kind != kind { model.kind = kind; changed = true }
|
|
100
108
|
if model.placement != placement { model.placement = placement; changed = true }
|
|
101
109
|
if model.sizing != sizing { model.sizing = sizing; changed = true }
|
|
102
110
|
if model.label != label { model.label = label; changed = true }
|
|
103
111
|
if model.systemImage != systemImage { model.systemImage = systemImage; changed = true }
|
|
112
|
+
if model.defaultItem != defaultItem { model.defaultItem = defaultItem; changed = true }
|
|
104
113
|
if changed { model.onEntryChange?() }
|
|
105
114
|
}
|
|
106
115
|
|
|
@@ -114,7 +123,8 @@ public final class OneNativeToolbarMarkerView: OneNativeContainerView {
|
|
|
114
123
|
|
|
115
124
|
func entry() -> OneNativeToolbarEntry {
|
|
116
125
|
let kind: OneNativeToolbarEntry.Kind =
|
|
117
|
-
model.kind == "group" ? .group : model.kind == "spacer" ? .spacer
|
|
126
|
+
model.kind == "group" ? .group : model.kind == "spacer" ? .spacer
|
|
127
|
+
: model.kind == "defaultItem" ? .defaultItem : .item
|
|
118
128
|
return OneNativeToolbarEntry(
|
|
119
129
|
id: ObjectIdentifier(self),
|
|
120
130
|
kind: kind,
|
|
@@ -122,6 +132,7 @@ public final class OneNativeToolbarMarkerView: OneNativeContainerView {
|
|
|
122
132
|
sizing: model.sizing,
|
|
123
133
|
label: model.label,
|
|
124
134
|
systemImage: model.systemImage,
|
|
135
|
+
defaultItem: model.defaultItem,
|
|
125
136
|
content: compositionContent()
|
|
126
137
|
)
|
|
127
138
|
}
|
|
@@ -165,7 +176,7 @@ public final class OneNativeToolbarView: OneNativeContainerView {
|
|
|
165
176
|
public override func insertChild(_ child: UIView, at index: Int) {
|
|
166
177
|
guard let marker = child as? OneNativeToolbarMarkerView else {
|
|
167
178
|
preconditionFailure(
|
|
168
|
-
"Swift.Toolbar takes Swift.ToolbarItem, Swift.ToolbarItemGroup, and Swift.
|
|
179
|
+
"Swift.Toolbar takes Swift.ToolbarItem, Swift.ToolbarItemGroup, Swift.ToolbarSpacer, and Swift.DefaultToolbarItem children")
|
|
169
180
|
}
|
|
170
181
|
marker.setOnEntryChange { [weak self] in self?.entryChanged() }
|
|
171
182
|
super.insertChild(child, at: index)
|
|
@@ -64,17 +64,22 @@ struct OneNativeMeasuredStandalone<Content: View>: View {
|
|
|
64
64
|
// update pass; a UIKit-side measurement would need explicit scheduling. composed, the
|
|
65
65
|
// parent measures it instead.
|
|
66
66
|
extension View {
|
|
67
|
-
|
|
67
|
+
// composed, no measuring wrapper at all: any modifier outside the row's own style
|
|
68
|
+
// hides its list tag from the enclosing List, so a tagged row would never select.
|
|
69
|
+
@ViewBuilder func oneNativeMeasured(
|
|
68
70
|
_ standalone: Bool, _ onHeight: ((CGFloat) -> Void)?
|
|
69
71
|
) -> some View {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
if standalone {
|
|
73
|
+
self
|
|
74
|
+
.fixedSize(horizontal: false, vertical: true)
|
|
75
|
+
.onGeometryChange(for: CGFloat.self) { proxy in
|
|
76
|
+
proxy.size.height
|
|
77
|
+
} action: { height in
|
|
78
|
+
onHeight?(height)
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
self
|
|
82
|
+
}
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
@ViewBuilder func oneNativeScheme(_ standalone: Bool, _ scheme: ColorScheme) -> some View {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "one",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"description": "One is a React framework for web, iOS, and Android apps.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"sideEffects": [
|
|
@@ -282,15 +282,15 @@
|
|
|
282
282
|
"@react-navigation/routers": "8.0.0-alpha.21",
|
|
283
283
|
"@rozenite/middleware": "^2.5.0",
|
|
284
284
|
"@ungap/structured-clone": "^1.2.0",
|
|
285
|
-
"@vxrn/color-scheme": "2.
|
|
286
|
-
"@vxrn/compiler": "2.
|
|
287
|
-
"@vxrn/resolve": "2.
|
|
288
|
-
"@vxrn/tslib-lite": "2.
|
|
289
|
-
"@vxrn/use-isomorphic-layout-effect": "2.
|
|
290
|
-
"@vxrn/utils": "2.
|
|
285
|
+
"@vxrn/color-scheme": "2.13.1",
|
|
286
|
+
"@vxrn/compiler": "2.13.1",
|
|
287
|
+
"@vxrn/resolve": "2.13.1",
|
|
288
|
+
"@vxrn/tslib-lite": "2.13.1",
|
|
289
|
+
"@vxrn/use-isomorphic-layout-effect": "2.13.1",
|
|
290
|
+
"@vxrn/utils": "2.13.1",
|
|
291
291
|
"citty": "^0.1.6",
|
|
292
292
|
"core-js": "^3.38.1",
|
|
293
|
-
"create-vxrn": "2.
|
|
293
|
+
"create-vxrn": "2.13.1",
|
|
294
294
|
"escape-string-regexp": "^5.0.0",
|
|
295
295
|
"fast-deep-equal": "^3.1.3",
|
|
296
296
|
"fast-glob": "^3.3.3",
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
"tsconfig-paths": "^4",
|
|
313
313
|
"use-latest-callback": "^0.3.5",
|
|
314
314
|
"vite": "^8.2.2",
|
|
315
|
-
"vxrn": "2.
|
|
315
|
+
"vxrn": "2.13.1",
|
|
316
316
|
"web-streams-polyfill": "^4.3.0",
|
|
317
317
|
"ws": "^8.21.0",
|
|
318
318
|
"xxhashjs": "^0.2.2"
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"@babel/types": "^7.28.5",
|
|
343
343
|
"babel-dead-code-elimination": "1.0.10",
|
|
344
344
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
345
|
-
"@vxrn/vite-plugin-metro": "2.
|
|
345
|
+
"@vxrn/vite-plugin-metro": "2.13.1"
|
|
346
346
|
},
|
|
347
347
|
"peerDependenciesMeta": {
|
|
348
348
|
"@react-native/babel-preset": {
|
|
@@ -404,19 +404,19 @@
|
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
406
|
"devDependencies": {
|
|
407
|
-
"@tamagui/sheet": "3.1.
|
|
407
|
+
"@tamagui/sheet": "3.1.9",
|
|
408
408
|
"@callstack/liquid-glass": "^0.8.1",
|
|
409
409
|
"@react-native/babel-plugin-codegen": "0.88.0",
|
|
410
410
|
"@react-native/codegen": "^0.88.0",
|
|
411
411
|
"@react-navigation/core": "8.0.0-alpha.41",
|
|
412
412
|
"@react-navigation/drawer": "8.0.0-alpha.58",
|
|
413
413
|
"@react-navigation/native": "8.0.0-alpha.51",
|
|
414
|
-
"@tamagui/build": "3.1.
|
|
414
|
+
"@tamagui/build": "3.1.9",
|
|
415
415
|
"@types/node": "^24.10.0",
|
|
416
416
|
"@types/react-dom": "^19.3.0",
|
|
417
417
|
"@types/react-test-renderer": "^19.1.0",
|
|
418
418
|
"@types/xxhashjs": "^0.2.4",
|
|
419
|
-
"@vxrn/emitter": "2.
|
|
419
|
+
"@vxrn/emitter": "2.13.1",
|
|
420
420
|
"depcheck": "^1.4.7",
|
|
421
421
|
"esbuild": "^0.25.12",
|
|
422
422
|
"immer": "^10.1.1",
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
"typescript": "7.0.2",
|
|
436
436
|
"vitest": "^4.1.0",
|
|
437
437
|
"yoga-layout": "^3.2.1",
|
|
438
|
-
"@tamagui/web": "3.1.
|
|
438
|
+
"@tamagui/web": "3.1.9",
|
|
439
439
|
"@babel/core": "^7.28.5",
|
|
440
440
|
"@babel/generator": "7.29.7",
|
|
441
441
|
"@babel/parser": "^7.28.5",
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
"@babel/types": "^7.28.5",
|
|
445
445
|
"babel-dead-code-elimination": "1.0.10",
|
|
446
446
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
447
|
-
"@vxrn/vite-plugin-metro": "2.
|
|
447
|
+
"@vxrn/vite-plugin-metro": "2.13.1"
|
|
448
448
|
},
|
|
449
449
|
"publishConfig": {
|
|
450
450
|
"access": "public"
|
|
@@ -600,6 +600,7 @@
|
|
|
600
600
|
"OneNativeToolbarItem": "OneNativeToolbarItemComponentView",
|
|
601
601
|
"OneNativeToolbarItemGroup": "OneNativeToolbarItemGroupComponentView",
|
|
602
602
|
"OneNativeToolbarSpacer": "OneNativeToolbarSpacerComponentView",
|
|
603
|
+
"OneNativeToolbarDefaultItem": "OneNativeToolbarDefaultItemComponentView",
|
|
603
604
|
"OneNativeNavigationStackContent": "OneNativeNavigationStackContentComponentView",
|
|
604
605
|
"OneNativeNavigationSplitViewColumn": "OneNativeNavigationSplitViewColumnComponentView",
|
|
605
606
|
"OneNativeTableCell": "OneNativeTableCellComponentView",
|
|
@@ -611,7 +612,7 @@
|
|
|
611
612
|
}
|
|
612
613
|
}
|
|
613
614
|
},
|
|
614
|
-
"releaseSourceCommit": "
|
|
615
|
+
"releaseSourceCommit": "7a20439ac72b4e1e7cc5232404e296661f634d41",
|
|
615
616
|
"repository": {
|
|
616
617
|
"type": "git",
|
|
617
618
|
"url": "git+https://github.com/onejs/one.git",
|
package/schema.json
CHANGED
|
@@ -4875,6 +4875,27 @@
|
|
|
4875
4875
|
"slots": [],
|
|
4876
4876
|
"interfaceOnly": false
|
|
4877
4877
|
},
|
|
4878
|
+
{
|
|
4879
|
+
"name": "OneNativeToolbarDefaultItem",
|
|
4880
|
+
"publicName": "DefaultToolbarItem",
|
|
4881
|
+
"props": {
|
|
4882
|
+
"kind": {
|
|
4883
|
+
"type": "string",
|
|
4884
|
+
"enum": "ToolbarDefaultItemKind"
|
|
4885
|
+
},
|
|
4886
|
+
"placement": {
|
|
4887
|
+
"type": "string",
|
|
4888
|
+
"enum": "ToolbarItemPlacement"
|
|
4889
|
+
}
|
|
4890
|
+
},
|
|
4891
|
+
"events": {},
|
|
4892
|
+
"actions": [],
|
|
4893
|
+
"layout": {
|
|
4894
|
+
"kind": "container"
|
|
4895
|
+
},
|
|
4896
|
+
"slots": [],
|
|
4897
|
+
"interfaceOnly": false
|
|
4898
|
+
},
|
|
4878
4899
|
{
|
|
4879
4900
|
"name": "OneNativeNavigationStackContent",
|
|
4880
4901
|
"publicName": null,
|
|
@@ -5543,6 +5564,11 @@
|
|
|
5543
5564
|
"flexible": 26,
|
|
5544
5565
|
"fixed": 26
|
|
5545
5566
|
},
|
|
5567
|
+
"ToolbarDefaultItemKind": {
|
|
5568
|
+
"sidebarToggle": 17,
|
|
5569
|
+
"title": 18,
|
|
5570
|
+
"search": 26
|
|
5571
|
+
},
|
|
5546
5572
|
"PayWithApplePayButtonLabel": {
|
|
5547
5573
|
"plain": 16,
|
|
5548
5574
|
"buy": 16,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
ToolbarItemGroup,
|
|
19
19
|
ToolbarNode,
|
|
20
20
|
ToolbarSpacer,
|
|
21
|
+
DefaultToolbarItem,
|
|
21
22
|
} from './NavigationStack.native'
|
|
22
23
|
import { viewportStyle } from './viewportStyle'
|
|
23
24
|
import type {
|
|
@@ -84,7 +85,8 @@ function toolbarItem(child: ReactNode) {
|
|
|
84
85
|
return (
|
|
85
86
|
child.type === ToolbarItem ||
|
|
86
87
|
child.type === ToolbarItemGroup ||
|
|
87
|
-
child.type === ToolbarSpacer
|
|
88
|
+
child.type === ToolbarSpacer ||
|
|
89
|
+
child.type === DefaultToolbarItem
|
|
88
90
|
)
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -15,6 +15,7 @@ import NativeToolbar from './specs/OneNativeToolbarNativeComponent'
|
|
|
15
15
|
import NativeToolbarItem from './specs/OneNativeToolbarItemNativeComponent'
|
|
16
16
|
import NativeToolbarItemGroup from './specs/OneNativeToolbarItemGroupNativeComponent'
|
|
17
17
|
import NativeToolbarSpacer from './specs/OneNativeToolbarSpacerNativeComponent'
|
|
18
|
+
import NativeToolbarDefaultItem from './specs/OneNativeToolbarDefaultItemNativeComponent'
|
|
18
19
|
import { viewportStyle } from './viewportStyle'
|
|
19
20
|
import type {
|
|
20
21
|
NavigationStackProps,
|
|
@@ -23,6 +24,7 @@ import type {
|
|
|
23
24
|
ToolbarProps,
|
|
24
25
|
ToolbarContentProps,
|
|
25
26
|
ToolbarSpacerProps,
|
|
27
|
+
DefaultToolbarItemProps,
|
|
26
28
|
} from './generated/containerTypes'
|
|
27
29
|
|
|
28
30
|
// the root content is a Fabric child of the stack that hosts the React Native subtree in
|
|
@@ -30,7 +32,7 @@ import type {
|
|
|
30
32
|
const CONTENT_STYLE = { position: 'absolute', left: 0, top: 0 } as const
|
|
31
33
|
|
|
32
34
|
const TOOLBAR_CHILDREN =
|
|
33
|
-
'Swift.ToolbarItem, Swift.ToolbarItemGroup, and Swift.
|
|
35
|
+
'Swift.ToolbarItem, Swift.ToolbarItemGroup, Swift.ToolbarSpacer, and Swift.DefaultToolbarItem'
|
|
34
36
|
|
|
35
37
|
// the three markers are read by Swift.Toolbar and Swift.NavigationStack and never render
|
|
36
38
|
// where they are written, exactly like Swift.Tab inside Swift.TabView.
|
|
@@ -58,6 +60,10 @@ export function ToolbarSpacer(_props: ToolbarSpacerProps): never {
|
|
|
58
60
|
throw new Error('Swift.ToolbarSpacer must be a direct child of Swift.Toolbar')
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
export function DefaultToolbarItem(_props: DefaultToolbarItemProps): never {
|
|
64
|
+
throw new Error('Swift.DefaultToolbarItem must be a direct child of Swift.Toolbar')
|
|
65
|
+
}
|
|
66
|
+
|
|
61
67
|
// every placement the SDK declares is accepted, and one it does not is rejected before a
|
|
62
68
|
// native prop carries it.
|
|
63
69
|
function toolbarPlacement(value: string | undefined, owner: string, iosVersion: number) {
|
|
@@ -144,6 +150,26 @@ function ToolbarSpacerNode({
|
|
|
144
150
|
)
|
|
145
151
|
}
|
|
146
152
|
|
|
153
|
+
function DefaultToolbarItemNode({
|
|
154
|
+
element,
|
|
155
|
+
iosVersion,
|
|
156
|
+
}: {
|
|
157
|
+
element: ReactElement<DefaultToolbarItemProps>
|
|
158
|
+
iosVersion: number
|
|
159
|
+
}) {
|
|
160
|
+
const props = element.props
|
|
161
|
+
if (Children.count(props.children) !== 0)
|
|
162
|
+
throw new Error('Swift.DefaultToolbarItem takes no children')
|
|
163
|
+
if (iosVersion < 26) throw new Error('Swift.DefaultToolbarItem requires iOS 26 or later')
|
|
164
|
+
assertSwiftUIValue('ToolbarDefaultItemKind', props.kind, iosVersion)
|
|
165
|
+
return (
|
|
166
|
+
<NativeToolbarDefaultItem
|
|
167
|
+
{...props}
|
|
168
|
+
placement={toolbarPlacement(props.placement, 'Swift.DefaultToolbarItem', iosVersion)}
|
|
169
|
+
/>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
|
|
147
173
|
// one Swift.Toolbar becomes one native toolbar: its markers read as toolbar entries in
|
|
148
174
|
// the order they are written, and the stack merges every toolbar it is given.
|
|
149
175
|
export function ToolbarNode({
|
|
@@ -192,6 +218,14 @@ export function ToolbarNode({
|
|
|
192
218
|
iosVersion={iosVersion}
|
|
193
219
|
/>
|
|
194
220
|
)
|
|
221
|
+
if (element.type === DefaultToolbarItem)
|
|
222
|
+
return (
|
|
223
|
+
<DefaultToolbarItemNode
|
|
224
|
+
key={key}
|
|
225
|
+
element={child as ReactElement<DefaultToolbarItemProps>}
|
|
226
|
+
iosVersion={iosVersion}
|
|
227
|
+
/>
|
|
228
|
+
)
|
|
195
229
|
throw new Error(`Swift.Toolbar accepts ${TOOLBAR_CHILDREN} elements as children`)
|
|
196
230
|
})
|
|
197
231
|
return <NativeToolbar>{items}</NativeToolbar>
|
|
@@ -221,7 +255,8 @@ export function NavigationStack({
|
|
|
221
255
|
if (
|
|
222
256
|
child.type === ToolbarItem ||
|
|
223
257
|
child.type === ToolbarItemGroup ||
|
|
224
|
-
child.type === ToolbarSpacer
|
|
258
|
+
child.type === ToolbarSpacer ||
|
|
259
|
+
child.type === DefaultToolbarItem
|
|
225
260
|
)
|
|
226
261
|
throw new Error(
|
|
227
262
|
`Swift.NavigationStack accepts Swift.Toolbar elements or React Native content as children; ${TOOLBAR_CHILDREN} belong inside Swift.Toolbar`
|
package/src/platform/README.md
CHANGED
|
@@ -1189,6 +1189,11 @@ initializer, which renders the label the way a menu-style group does.
|
|
|
1189
1189
|
`flexible` (the default) or `fixed`, and it takes the same `placement`. It holds no
|
|
1190
1190
|
children.
|
|
1191
1191
|
|
|
1192
|
+
`One.iOS.DefaultToolbarItem` is SwiftUI's `DefaultToolbarItem`, also iOS 26 and later. `kind`
|
|
1193
|
+
names the system item (`search`) and `placement` says where it goes; with `bottomBar` and a
|
|
1194
|
+
`searchToolbarBehavior` of `minimize` on the searchable list it becomes the detached search
|
|
1195
|
+
circle. It holds no children.
|
|
1196
|
+
|
|
1192
1197
|
The bar itself is configured through `swiftStyle`, because every navigation and toolbar
|
|
1193
1198
|
modifier SwiftUI declares as a scalar is derived into it: `navigationTitleWithText`
|
|
1194
1199
|
(`navigationTitle(_: Text)`), `navigationTitleWithBindingString` for the `Binding<String>`
|
|
@@ -63,6 +63,7 @@ function tabContentModifiers(
|
|
|
63
63
|
props: TabContentProps & {
|
|
64
64
|
image?: string
|
|
65
65
|
labelStyle?: string
|
|
66
|
+
navigationStack?: boolean
|
|
66
67
|
section?: string
|
|
67
68
|
tabPlacement?: string
|
|
68
69
|
defaultSectionExpansion?: string
|
|
@@ -94,6 +95,7 @@ function tabContentModifiers(
|
|
|
94
95
|
return JSON.stringify({
|
|
95
96
|
image: props.image,
|
|
96
97
|
labelStyle: props.labelStyle,
|
|
98
|
+
navigationStack: props.navigationStack,
|
|
97
99
|
section: props.section,
|
|
98
100
|
disabled: props.disabled,
|
|
99
101
|
hidden: props.hidden,
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
ControlSize,
|
|
16
16
|
DynamicTypeSize,
|
|
17
17
|
SpacerSizing,
|
|
18
|
+
ToolbarDefaultItemKind,
|
|
18
19
|
ToolbarItemPlacement,
|
|
19
20
|
} from './swiftui'
|
|
20
21
|
import type { SFSymbolName } from './sfSymbolNames'
|
|
@@ -151,6 +152,10 @@ export interface ToolbarSpacerProps extends ViewProps {
|
|
|
151
152
|
sizing?: SpacerSizing
|
|
152
153
|
placement?: ToolbarItemPlacement
|
|
153
154
|
}
|
|
155
|
+
export interface DefaultToolbarItemProps extends ViewProps {
|
|
156
|
+
kind: ToolbarDefaultItemKind
|
|
157
|
+
placement?: ToolbarItemPlacement
|
|
158
|
+
}
|
|
154
159
|
export const hStackAlignments = [
|
|
155
160
|
'top',
|
|
156
161
|
'center',
|
|
@@ -80,6 +80,7 @@ export type ToolbarItemPlacement =
|
|
|
80
80
|
| 'subtitle'
|
|
81
81
|
| 'largeSubtitle'
|
|
82
82
|
export type SpacerSizing = 'flexible' | 'fixed'
|
|
83
|
+
export type ToolbarDefaultItemKind = 'sidebarToggle' | 'title' | 'search'
|
|
83
84
|
export type PayWithApplePayButtonLabel =
|
|
84
85
|
| 'plain'
|
|
85
86
|
| 'buy'
|
|
@@ -274,6 +275,11 @@ export const swiftUIValues = {
|
|
|
274
275
|
flexible: 26,
|
|
275
276
|
fixed: 26,
|
|
276
277
|
},
|
|
278
|
+
ToolbarDefaultItemKind: {
|
|
279
|
+
sidebarToggle: 17,
|
|
280
|
+
title: 18,
|
|
281
|
+
search: 26,
|
|
282
|
+
},
|
|
277
283
|
PayWithApplePayButtonLabel: {
|
|
278
284
|
plain: 16,
|
|
279
285
|
buy: 16,
|
|
@@ -32,6 +32,7 @@ import type {
|
|
|
32
32
|
ListStyle,
|
|
33
33
|
ToolbarItemPlacement,
|
|
34
34
|
SpacerSizing,
|
|
35
|
+
ToolbarDefaultItemKind,
|
|
35
36
|
PayWithApplePayButtonLabel,
|
|
36
37
|
} from './swiftui'
|
|
37
38
|
export type {
|
|
@@ -63,6 +64,7 @@ export type {
|
|
|
63
64
|
ListStyle,
|
|
64
65
|
ToolbarItemPlacement,
|
|
65
66
|
SpacerSizing,
|
|
67
|
+
ToolbarDefaultItemKind,
|
|
66
68
|
PayWithApplePayButtonLabel,
|
|
67
69
|
} from './swiftui'
|
|
68
70
|
export interface SwiftMenuAction {
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
ToolbarItem,
|
|
51
51
|
ToolbarItemGroup,
|
|
52
52
|
ToolbarSpacer,
|
|
53
|
+
DefaultToolbarItem,
|
|
53
54
|
} from './NavigationStack.native'
|
|
54
55
|
import { NavigationSplitView } from './NavigationSplitView.native'
|
|
55
56
|
import { FullScreenCover, Sheet } from './Sheet.native'
|
|
@@ -175,6 +176,7 @@ export const Swift =
|
|
|
175
176
|
ToolbarItem,
|
|
176
177
|
ToolbarItemGroup,
|
|
177
178
|
ToolbarSpacer,
|
|
179
|
+
DefaultToolbarItem,
|
|
178
180
|
Spacer,
|
|
179
181
|
Slot,
|
|
180
182
|
withAnimation,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// generated by bun run generate from the SwiftUI SDK and codegen/catalog.ts.
|
|
2
|
+
// edit the generator or catalog, then regenerate.
|
|
3
|
+
import type { ViewProps } from 'react-native'
|
|
4
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'
|
|
5
|
+
interface NativeProps extends ViewProps {
|
|
6
|
+
kind: string
|
|
7
|
+
placement: string
|
|
8
|
+
}
|
|
9
|
+
export default codegenNativeComponent<NativeProps>('OneNativeToolbarDefaultItem')
|
package/src/platform/types.ts
CHANGED
|
@@ -71,6 +71,10 @@ export interface TabProps extends TabContentProps {
|
|
|
71
71
|
role?: TabRole
|
|
72
72
|
tabPlacement?: TabPlacement
|
|
73
73
|
testID?: string
|
|
74
|
+
// each page sits in a NavigationStack, which gives it a title and toolbar. pass false for a
|
|
75
|
+
// page that is its own navigation container, such as Swift.NavigationSplitView: SwiftUI
|
|
76
|
+
// renders no columns for a split view nested in a stack.
|
|
77
|
+
navigationStack?: boolean
|
|
74
78
|
// an action tab carries onPress instead of a page. Swift.TabView requires exactly one of them.
|
|
75
79
|
onPress?: () => void
|
|
76
80
|
// View modifiers on the page's content, as SwiftUI applies them inside a Tab.
|
|
@@ -64,6 +64,7 @@ import type {
|
|
|
64
64
|
ToolbarProps,
|
|
65
65
|
ToolbarContentProps,
|
|
66
66
|
ToolbarSpacerProps,
|
|
67
|
+
DefaultToolbarItemProps,
|
|
67
68
|
ZStackProps,
|
|
68
69
|
SDKAnimationValue,
|
|
69
70
|
WithAnimationCompletionCriteria,
|
|
@@ -303,6 +304,11 @@ function ToolbarSpacer(_props: ToolbarSpacerProps): never {
|
|
|
303
304
|
'Swift.ToolbarSpacer requires an iOS native build'
|
|
304
305
|
)
|
|
305
306
|
}
|
|
307
|
+
function DefaultToolbarItem(_props: DefaultToolbarItemProps): never {
|
|
308
|
+
throw new Error(
|
|
309
|
+
'Swift.DefaultToolbarItem requires an iOS native build'
|
|
310
|
+
)
|
|
311
|
+
}
|
|
306
312
|
import { ArrangementView } from './ArrangementView'
|
|
307
313
|
import type { KeyframeAnimatorProps, KeyframeValue, PhaseAnimatorProps } from './animatorTypes'
|
|
308
314
|
import { CubicKeyframe, KeyframeTrack, LinearKeyframe, MoveKeyframe, SpringKeyframe } from './keyframes'
|
|
@@ -387,6 +393,7 @@ export const Swift = {
|
|
|
387
393
|
ToolbarItem,
|
|
388
394
|
ToolbarItemGroup,
|
|
389
395
|
ToolbarSpacer,
|
|
396
|
+
DefaultToolbarItem,
|
|
390
397
|
PhaseAnimator,
|
|
391
398
|
KeyframeAnimator,
|
|
392
399
|
KeyframeTrack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSplitView.native.d.ts","sourceRoot":"","sources":["../../src/platform/NavigationSplitView.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationSplitView.native.d.ts","sourceRoot":"","sources":["../../src/platform/NavigationSplitView.native.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAEV,8BAA8B,EAC9B,wBAAwB,EAGzB,MAAM,4BAA4B,CAAA;AAmBnC,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE,8BAA8B,KAAK,KAAK,CAAA;AAEnE,eAAO,MAAM,OAAO,EAAE,WAIrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,WAIrB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,WAIpB,CAAA;AAoFD,iBAAS,uBAAuB,CAAC,EAC/B,QAAQ,EACR,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,wBAAwB,+BAuF1B;AAED,eAAO,MAAM,mBAAmB;;;;CAI9B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { NavigationStackProps, ToolbarItemGroupProps, ToolbarItemProps, ToolbarProps, ToolbarContentProps, ToolbarSpacerProps } from './generated/containerTypes';
|
|
2
|
+
import type { NavigationStackProps, ToolbarItemGroupProps, ToolbarItemProps, ToolbarProps, ToolbarContentProps, ToolbarSpacerProps, DefaultToolbarItemProps } from './generated/containerTypes';
|
|
3
3
|
declare function ToolbarMarker(_props: ToolbarProps): never;
|
|
4
4
|
export declare function ToolbarContent(_props: ToolbarContentProps): never;
|
|
5
5
|
export declare const Toolbar: typeof ToolbarMarker & {
|
|
@@ -8,6 +8,7 @@ export declare const Toolbar: typeof ToolbarMarker & {
|
|
|
8
8
|
export declare function ToolbarItem(_props: ToolbarItemProps): never;
|
|
9
9
|
export declare function ToolbarItemGroup(_props: ToolbarItemGroupProps): never;
|
|
10
10
|
export declare function ToolbarSpacer(_props: ToolbarSpacerProps): never;
|
|
11
|
+
export declare function DefaultToolbarItem(_props: DefaultToolbarItemProps): never;
|
|
11
12
|
export declare function ToolbarNode({ children, iosVersion, }: {
|
|
12
13
|
children: ReactNode;
|
|
13
14
|
iosVersion: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationStack.native.d.ts","sourceRoot":"","sources":["../../src/platform/NavigationStack.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"NavigationStack.native.d.ts","sourceRoot":"","sources":["../../src/platform/NavigationStack.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAad,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AAWnC,iBAAS,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAIlD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,KAAK,CAEjE;AAED,eAAO,MAAM,OAAO;;CAA4D,CAAA;AAEhF,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,KAAK,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,KAAK,CAErE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,KAAK,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,KAAK,CAEzE;AA8GD,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB,+BAmDA;AAMD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,+BA8CtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabView.native.d.ts","sourceRoot":"","sources":["../../src/platform/TabView.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAahB,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,2BAA2B,GAAG,KAAK,CAEjF;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,KAAK,CAE3D;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,GAAG,KAAK,CAEzD;AAED,wBAAgB,GAAG,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,CAE3C;
|
|
1
|
+
{"version":3,"file":"TabView.native.d.ts","sourceRoot":"","sources":["../../src/platform/TabView.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAahB,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,2BAA2B,GAAG,KAAK,CAEjF;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,KAAK,CAE3D;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,GAAG,KAAK,CAEzD;AAED,wBAAgB,GAAG,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,CAE3C;AAqFD,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,QAAY,EACZ,YAA0B,EAC1B,gBAA8B,EAC9B,aAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,YAAY,+BA6Nd"}
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { ColorValue, ViewProps } from 'react-native';
|
|
3
3
|
import type { GlassEffect, GlassEffectShape, Material, OneNativeStyle, OneNativeViewProps } from './controlTypes';
|
|
4
4
|
import type * as Styles from './swiftui';
|
|
5
|
-
import type { ColorScheme, ControlSize, DynamicTypeSize, SpacerSizing, ToolbarItemPlacement } from './swiftui';
|
|
5
|
+
import type { ColorScheme, ControlSize, DynamicTypeSize, SpacerSizing, ToolbarDefaultItemKind, ToolbarItemPlacement } from './swiftui';
|
|
6
6
|
import type { SFSymbolName } from './sfSymbolNames';
|
|
7
7
|
export type HStackAlignment = 'top' | 'center' | 'bottom' | 'firstTextBaseline' | 'lastTextBaseline';
|
|
8
8
|
export type VStackAlignment = 'leading' | 'center' | 'trailing' | 'listRowSeparatorLeading' | 'listRowSeparatorTrailing';
|
|
@@ -114,6 +114,10 @@ export interface ToolbarSpacerProps extends ViewProps {
|
|
|
114
114
|
sizing?: SpacerSizing;
|
|
115
115
|
placement?: ToolbarItemPlacement;
|
|
116
116
|
}
|
|
117
|
+
export interface DefaultToolbarItemProps extends ViewProps {
|
|
118
|
+
kind: ToolbarDefaultItemKind;
|
|
119
|
+
placement?: ToolbarItemPlacement;
|
|
120
|
+
}
|
|
117
121
|
export declare const hStackAlignments: readonly ['top', 'center', 'bottom', 'firstTextBaseline', 'lastTextBaseline'];
|
|
118
122
|
export declare const vStackAlignments: readonly ['leading', 'center', 'trailing', 'listRowSeparatorLeading', 'listRowSeparatorTrailing'];
|
|
119
123
|
export declare const zStackAlignments: readonly ['topLeading', 'top', 'topTrailing', 'leading', 'center', 'trailing', 'bottomLeading', 'bottom', 'bottomTrailing'];
|