@octane-xplat/ui 0.3.0 → 0.4.0
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 +46 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +52 -40
- package/dist/native/ui10.js +20 -11
- package/dist/native/ui11.js +42 -109
- package/dist/native/ui12.js +17 -84
- package/dist/native/ui13.js +11 -41
- package/dist/native/ui14.js +118 -76
- package/dist/native/ui15.js +43 -92
- package/dist/native/ui16.js +106 -45
- package/dist/native/ui17.js +29 -42
- package/dist/native/ui18.js +34 -53
- package/dist/native/ui19.js +246 -32
- package/dist/native/ui20.js +27 -16
- package/dist/native/ui21.js +376 -86
- package/dist/native/ui22.js +26 -114
- package/dist/native/ui23.js +49 -97
- package/dist/native/ui24.js +78 -53
- package/dist/native/ui25.js +138 -16
- package/dist/native/ui26.js +8 -23
- package/dist/native/ui27.js +60 -34
- package/dist/native/ui28.js +36 -142
- package/dist/native/ui29.js +101 -21
- package/dist/native/ui30.js +14 -31
- package/dist/native/ui31.js +55 -36
- package/dist/native/ui32.js +49 -61
- package/dist/native/ui33.js +36 -28
- package/dist/native/ui34.js +51 -8
- package/dist/native/ui35.js +98 -20
- package/dist/native/ui36.js +9 -33
- package/dist/native/ui37.js +42 -15
- package/dist/native/ui38.js +186 -57
- package/dist/native/ui39.js +96 -24
- package/dist/native/ui4.js +22 -20
- package/dist/native/ui40.js +57 -13
- package/dist/native/ui41.js +15 -100
- package/dist/native/ui42.js +6 -146
- package/dist/native/ui43.js +37 -21
- package/dist/native/ui44.js +265 -6
- package/dist/native/ui45.js +28 -0
- package/dist/native/ui46.js +35 -0
- package/dist/native/ui47.js +41 -0
- package/dist/native/ui48.js +72 -0
- package/dist/native/ui49.js +66 -0
- package/dist/native/ui5.js +37 -77
- package/dist/native/ui50.js +27 -0
- package/dist/native/ui51.js +13 -0
- package/dist/native/ui52.js +92 -0
- package/dist/native/ui53.js +34 -0
- package/dist/native/ui54.js +17 -0
- package/dist/native/ui55.js +156 -0
- package/dist/native/ui56.js +33 -0
- package/dist/native/ui57.js +14 -0
- package/dist/native/ui58.js +22 -0
- package/dist/native/ui59.js +8 -0
- package/dist/native/ui6.js +52 -9
- package/dist/native/ui60.js +108 -0
- package/dist/native/ui61.js +76 -0
- package/dist/native/ui7.js +42 -26
- package/dist/native/ui8.js +22 -12
- package/dist/native/ui9.js +18 -9
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +51 -40
- package/dist/web/ui10.js +33 -186
- package/dist/web/ui11.js +28 -409
- package/dist/web/ui12.js +21 -68
- package/dist/web/ui13.js +201 -97
- package/dist/web/ui14.js +85 -95
- package/dist/web/ui15.js +368 -25
- package/dist/web/ui16.js +13 -101
- package/dist/web/ui17.js +246 -42
- package/dist/web/ui18.js +237 -28
- package/dist/web/ui19.js +36 -10
- package/dist/web/ui20.js +73 -102
- package/dist/web/ui21.js +102 -73
- package/dist/web/ui22.js +95 -55
- package/dist/web/ui23.js +94 -55
- package/dist/web/ui24.js +31 -15
- package/dist/web/ui25.js +105 -19
- package/dist/web/ui26.js +29 -23
- package/dist/web/ui27.js +12 -123
- package/dist/web/ui28.js +9 -110
- package/dist/web/ui29.js +52 -102
- package/dist/web/ui3.js +29 -18
- package/dist/web/ui30.js +32 -41
- package/dist/web/ui31.js +120 -39
- package/dist/web/ui32.js +41 -74
- package/dist/web/ui33.js +148 -32
- package/dist/web/ui34.js +54 -51
- package/dist/web/ui35.js +55 -7
- package/dist/web/ui36.js +18 -41
- package/dist/web/ui37.js +6 -46
- package/dist/web/ui38.js +37 -16
- package/dist/web/ui39.js +135 -81
- package/dist/web/ui4.js +46 -152
- package/dist/web/ui40.js +39 -37
- package/dist/web/ui41.js +41 -16
- package/dist/web/ui42.js +74 -7
- package/dist/web/ui43.js +40 -20
- package/dist/web/ui44.js +60 -6
- package/dist/web/ui45.js +9 -0
- package/dist/web/ui46.js +45 -0
- package/dist/web/ui47.js +13 -0
- package/dist/web/ui48.js +63 -0
- package/dist/web/ui49.js +47 -0
- package/dist/web/ui5.js +131 -27
- package/dist/web/ui50.js +17 -0
- package/dist/web/ui51.js +149 -0
- package/dist/web/ui52.js +42 -0
- package/dist/web/ui53.js +17 -0
- package/dist/web/ui54.js +9 -0
- package/dist/web/ui55.js +22 -0
- package/dist/web/ui56.js +8 -0
- package/dist/web/ui57.js +44 -0
- package/dist/web/ui58.js +46 -0
- package/dist/web/ui6.js +81 -45
- package/dist/web/ui7.js +43 -21
- package/dist/web/ui8.js +27 -21
- package/dist/web/ui9.js +29 -18
- package/package.json +13 -4
- package/src/theme/tokens.css +369 -138
- package/types/index.d.ts +102 -58
- package/types/props.d.ts +233 -13
package/types/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
// emit declarations for .tsrx (upstream: tsrx-org/tsrx#136); this file is
|
|
7
7
|
// what `tsc --emitDeclarationOnly` on pure .ts buys us.
|
|
8
8
|
|
|
9
|
-
import type { UniversalComponent } from 'octane/universal'
|
|
9
|
+
import type { UniversalComponent } from 'octane/universal'
|
|
10
10
|
import type {
|
|
11
11
|
AnimatedValue,
|
|
12
12
|
AbsoluteProps,
|
|
13
13
|
ActivityIndicatorProps,
|
|
14
|
+
BeforeLoad,
|
|
15
|
+
BeforeLoadArgs,
|
|
14
16
|
ColorScheme,
|
|
15
17
|
DrawerProps,
|
|
16
18
|
GridProps,
|
|
@@ -20,20 +22,30 @@ import type {
|
|
|
20
22
|
ImageProps,
|
|
21
23
|
KeyboardAvoidingProps,
|
|
22
24
|
LayoutChildProps,
|
|
25
|
+
LinkProps,
|
|
23
26
|
ListProps,
|
|
27
|
+
MeterProps,
|
|
24
28
|
ModalProps,
|
|
25
29
|
ModalOpenOptions,
|
|
26
30
|
ModalOpenResult,
|
|
31
|
+
NavLinkProps,
|
|
27
32
|
OpenModal,
|
|
33
|
+
OpenWindowOptions,
|
|
28
34
|
OverlayProps,
|
|
35
|
+
PopoverAnchorRef,
|
|
29
36
|
PopoverPlacement,
|
|
30
37
|
PopoverProps,
|
|
31
38
|
PlatformBadgeProps,
|
|
32
39
|
PressableProps,
|
|
33
40
|
ReadableStore,
|
|
34
41
|
Route,
|
|
42
|
+
RouteContext,
|
|
43
|
+
RouteHead,
|
|
44
|
+
RouteHeadExport,
|
|
35
45
|
RouteManifest,
|
|
36
46
|
RouteMeta,
|
|
47
|
+
RichTextProps,
|
|
48
|
+
RichTextSpanProps,
|
|
37
49
|
RowProps,
|
|
38
50
|
ScreenProps,
|
|
39
51
|
SafeAreaProps,
|
|
@@ -53,12 +65,14 @@ import type {
|
|
|
53
65
|
ToastOptions,
|
|
54
66
|
ToastPosition,
|
|
55
67
|
ViewProps,
|
|
56
|
-
} from './props'
|
|
68
|
+
} from './props'
|
|
57
69
|
|
|
58
70
|
export type {
|
|
59
71
|
AbsoluteProps,
|
|
60
72
|
AnimatedValue,
|
|
61
73
|
ActivityIndicatorProps,
|
|
74
|
+
BeforeLoad,
|
|
75
|
+
BeforeLoadArgs,
|
|
62
76
|
ColorScheme,
|
|
63
77
|
DrawerProps,
|
|
64
78
|
GridProps,
|
|
@@ -68,12 +82,16 @@ export type {
|
|
|
68
82
|
ImageProps,
|
|
69
83
|
KeyboardAvoidingProps,
|
|
70
84
|
LayoutChildProps,
|
|
85
|
+
LinkProps,
|
|
71
86
|
ListProps,
|
|
72
87
|
ModalProps,
|
|
73
88
|
ModalOpenOptions,
|
|
74
89
|
ModalOpenResult,
|
|
90
|
+
NavLinkProps,
|
|
75
91
|
OpenModal,
|
|
92
|
+
OpenWindowOptions,
|
|
76
93
|
OverlayProps,
|
|
94
|
+
PopoverAnchorRef,
|
|
77
95
|
PopoverPlacement,
|
|
78
96
|
PopoverProps,
|
|
79
97
|
PanEvent,
|
|
@@ -81,8 +99,13 @@ export type {
|
|
|
81
99
|
PressableProps,
|
|
82
100
|
ReadableStore,
|
|
83
101
|
Route,
|
|
102
|
+
RouteContext,
|
|
103
|
+
RouteHead,
|
|
104
|
+
RouteHeadExport,
|
|
84
105
|
RouteManifest,
|
|
85
106
|
RouteMeta,
|
|
107
|
+
RichTextProps,
|
|
108
|
+
RichTextSpanProps,
|
|
86
109
|
RowProps,
|
|
87
110
|
ScreenProps,
|
|
88
111
|
SafeAreaProps,
|
|
@@ -103,72 +126,87 @@ export type {
|
|
|
103
126
|
ToastOptions,
|
|
104
127
|
ToastPosition,
|
|
105
128
|
ViewProps,
|
|
106
|
-
} from './props'
|
|
129
|
+
} from './props'
|
|
130
|
+
|
|
131
|
+
/** ScrollBox shares ScrollView's public shell props; native renders it inline. */
|
|
132
|
+
export type ScrollBoxProps = ScrollViewProps
|
|
107
133
|
|
|
108
134
|
// ---------- primitives ----------
|
|
109
135
|
|
|
110
|
-
export declare const View: UniversalComponent<ViewProps
|
|
136
|
+
export declare const View: UniversalComponent<ViewProps>
|
|
111
137
|
/** Column-direction alias of View. */
|
|
112
|
-
export declare const Column: UniversalComponent<ViewProps
|
|
113
|
-
export declare const Row: UniversalComponent<RowProps
|
|
114
|
-
export declare const Grid: UniversalComponent<GridProps
|
|
115
|
-
export declare const Stack: UniversalComponent<StackProps
|
|
116
|
-
export declare const Absolute: UniversalComponent<AbsoluteProps
|
|
117
|
-
export declare const Spacer: UniversalComponent<SpacerProps
|
|
118
|
-
export declare const Text: UniversalComponent<TextProps
|
|
119
|
-
export declare const
|
|
120
|
-
export declare const
|
|
121
|
-
export declare const
|
|
122
|
-
export declare const
|
|
123
|
-
export declare const
|
|
124
|
-
export declare const
|
|
125
|
-
export declare const
|
|
126
|
-
export declare const
|
|
127
|
-
export declare const
|
|
128
|
-
export declare const
|
|
129
|
-
export declare const
|
|
130
|
-
export declare const
|
|
131
|
-
export declare const
|
|
132
|
-
export declare const
|
|
133
|
-
export declare const
|
|
134
|
-
export declare const
|
|
135
|
-
|
|
136
|
-
export declare
|
|
137
|
-
export declare
|
|
138
|
+
export declare const Column: UniversalComponent<ViewProps>
|
|
139
|
+
export declare const Row: UniversalComponent<RowProps>
|
|
140
|
+
export declare const Grid: UniversalComponent<GridProps>
|
|
141
|
+
export declare const Stack: UniversalComponent<StackProps>
|
|
142
|
+
export declare const Absolute: UniversalComponent<AbsoluteProps>
|
|
143
|
+
export declare const Spacer: UniversalComponent<SpacerProps>
|
|
144
|
+
export declare const Text: UniversalComponent<TextProps>
|
|
145
|
+
export declare const RichText: UniversalComponent<RichTextProps>
|
|
146
|
+
export declare const RichTextSpan: UniversalComponent<RichTextSpanProps>
|
|
147
|
+
export declare const Pressable: UniversalComponent<PressableProps>
|
|
148
|
+
export declare const Link: UniversalComponent<LinkProps>
|
|
149
|
+
export declare const NavLink: UniversalComponent<NavLinkProps>
|
|
150
|
+
export declare const TextInput: UniversalComponent<TextInputProps>
|
|
151
|
+
export declare const TextArea: UniversalComponent<TextAreaProps>
|
|
152
|
+
export declare const List: UniversalComponent<ListProps>
|
|
153
|
+
export declare const ScrollBox: UniversalComponent<ScrollBoxProps>
|
|
154
|
+
export declare const ScrollView: UniversalComponent<ScrollViewProps>
|
|
155
|
+
export declare const Image: UniversalComponent<ImageProps>
|
|
156
|
+
export declare const Screen: UniversalComponent<ScreenProps>
|
|
157
|
+
export declare const SafeArea: UniversalComponent<SafeAreaProps>
|
|
158
|
+
export declare const KeyboardAvoiding: UniversalComponent<KeyboardAvoidingProps>
|
|
159
|
+
export declare const Drawer: UniversalComponent<DrawerProps>
|
|
160
|
+
export declare const Switch: UniversalComponent<SwitchProps>
|
|
161
|
+
export declare const ActivityIndicator: UniversalComponent<ActivityIndicatorProps>
|
|
162
|
+
export declare const Meter: UniversalComponent<MeterProps>
|
|
163
|
+
export declare const Slider: UniversalComponent<SliderProps>
|
|
164
|
+
export declare const Icon: UniversalComponent<IconProps>
|
|
165
|
+
export declare const Heading: UniversalComponent<HeadingProps>
|
|
166
|
+
export declare const PlatformBadge: UniversalComponent<PlatformBadgeProps>
|
|
167
|
+
|
|
168
|
+
export declare function registerIcon(name: string, glyph: IconGlyph): void
|
|
169
|
+
export declare function registerIcons(record: Record<string, IconGlyph>): void
|
|
138
170
|
|
|
139
171
|
// ---------- overlays / shells ----------
|
|
140
172
|
|
|
141
|
-
export declare const Modal: UniversalComponent<ModalProps
|
|
142
|
-
export declare const openModal: OpenModal
|
|
143
|
-
export declare
|
|
144
|
-
export declare const
|
|
145
|
-
export declare
|
|
146
|
-
export declare
|
|
173
|
+
export declare const Modal: UniversalComponent<ModalProps>
|
|
174
|
+
export declare const openModal: OpenModal
|
|
175
|
+
export declare function openWindow(options?: OpenWindowOptions): any
|
|
176
|
+
export declare const Overlay: UniversalComponent<OverlayProps>
|
|
177
|
+
export declare const Popover: UniversalComponent<PopoverProps>
|
|
178
|
+
export declare function showToast(content: ToastContent, options?: ToastOptions): void
|
|
179
|
+
export declare const Tabs: UniversalComponent<TabsProps>
|
|
147
180
|
|
|
148
181
|
// ---------- stacks (native registry; no-op on web) ----------
|
|
149
182
|
|
|
150
|
-
export declare function registerStack(name: string, frame: any): void
|
|
151
|
-
export declare function getStack(name: string): any
|
|
152
|
-
export declare function stackEntries(): IterableIterator<[string, any]
|
|
183
|
+
export declare function registerStack(name: string, frame: any): void
|
|
184
|
+
export declare function getStack(name: string): any
|
|
185
|
+
export declare function stackEntries(): IterableIterator<[string, any]>
|
|
153
186
|
|
|
154
187
|
// ---------- routes (real on both: URL store on web, Frame stacks on native) ----------
|
|
155
188
|
|
|
156
|
-
export declare function pushRoute(r: Route): void
|
|
157
|
-
export declare function popRoute(stack?: string): void
|
|
158
|
-
export declare function
|
|
159
|
-
export declare function
|
|
160
|
-
export declare function
|
|
189
|
+
export declare function pushRoute(r: Route): void
|
|
190
|
+
export declare function popRoute(stack?: string): void
|
|
191
|
+
export declare function routeStacks(): string[]
|
|
192
|
+
export declare function layoutsForRoute(name: string): any[]
|
|
193
|
+
export declare function routeFor(stack: string): Route | null
|
|
194
|
+
export declare function currentRoute(): Route | null
|
|
195
|
+
export declare function canGoBack(stack?: string): boolean
|
|
196
|
+
export declare function useCanGoBack(stack?: string): boolean
|
|
197
|
+
export declare function redirect(route: Route): never
|
|
198
|
+
export declare function useRoute(stack: string): Route | null
|
|
161
199
|
/** name → screen table; native pushRoute resolves `route.name` through
|
|
162
200
|
* it, web outlets fall back to it via `screenFor`. `manifest` (from
|
|
163
201
|
* deriveRouteManifest) enables path-param URL matching on web. Call
|
|
164
202
|
* once at boot. */
|
|
165
|
-
export declare function registerScreens(table: ScreenTable, manifest?: RouteMeta[]): void
|
|
203
|
+
export declare function registerScreens(table: ScreenTable, manifest?: RouteMeta[]): void
|
|
166
204
|
/** One-call registration for route-dir apps — screens + URL patterns +
|
|
167
205
|
* layouts all come from deriveRouteManifest. */
|
|
168
|
-
export declare function registerRoutes(manifest: RouteManifest): void
|
|
169
|
-
export declare function screenFor(name: string): any
|
|
206
|
+
export declare function registerRoutes(manifest: RouteManifest): void
|
|
207
|
+
export declare function screenFor(name: string): any
|
|
170
208
|
/** Canonical /<stack>/<path> for a Route — Link's href on web. */
|
|
171
|
-
export declare function hrefFor(r: Route): string
|
|
209
|
+
export declare function hrefFor(r: Route): string
|
|
172
210
|
|
|
173
211
|
// ---------- route dir (file → route manifest; docs/navigation-notes.md) ----------
|
|
174
212
|
|
|
@@ -180,25 +218,31 @@ export declare function deriveRouteManifest(
|
|
|
180
218
|
files: Record<string, any>,
|
|
181
219
|
prefer: readonly string[],
|
|
182
220
|
dir?: string,
|
|
183
|
-
): RouteManifest
|
|
221
|
+
): RouteManifest
|
|
184
222
|
|
|
185
223
|
// ---------- animation / theme ----------
|
|
186
224
|
|
|
187
|
-
export declare function useAnimation(initial?: number, prop?: string): AnimatedValue
|
|
188
|
-
export declare function getColorScheme(): ColorScheme
|
|
189
|
-
export declare function useColorScheme(): ColorScheme
|
|
190
|
-
export interface SafeAreaInsets {
|
|
191
|
-
|
|
225
|
+
export declare function useAnimation(initial?: number, prop?: string): AnimatedValue
|
|
226
|
+
export declare function getColorScheme(): ColorScheme
|
|
227
|
+
export declare function useColorScheme(): ColorScheme
|
|
228
|
+
export interface SafeAreaInsets {
|
|
229
|
+
top: number
|
|
230
|
+
right: number
|
|
231
|
+
bottom: number
|
|
232
|
+
left: number
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export declare function useSafeAreaInsets(): SafeAreaInsets
|
|
192
236
|
|
|
193
237
|
// ---------- styled ----------
|
|
194
238
|
|
|
195
239
|
export declare function styled<P extends { className?: any }, V extends Record<string, any>>(
|
|
196
240
|
Base: (props: P) => any,
|
|
197
241
|
def: { base?: any; variants?: V },
|
|
198
|
-
): UniversalComponent<P & { [K in keyof V]?: boolean }
|
|
242
|
+
): UniversalComponent<P & { [K in keyof V]?: boolean }>
|
|
199
243
|
|
|
200
244
|
// ---------- stores ----------
|
|
201
245
|
|
|
202
|
-
export declare function createStore<T>(initial: T): Store<T
|
|
203
|
-
export declare function useStore<T>(store: ReadableStore<T>): T
|
|
204
|
-
export declare function useStore<T, S>(store: ReadableStore<T>, select: (state: T) => S): S
|
|
246
|
+
export declare function createStore<T>(initial: T): Store<T>
|
|
247
|
+
export declare function useStore<T>(store: ReadableStore<T>): T
|
|
248
|
+
export declare function useStore<T, S>(store: ReadableStore<T>, select: (state: T) => S): S
|
package/types/props.d.ts
CHANGED
|
@@ -32,7 +32,42 @@ export interface LayoutChildProps {
|
|
|
32
32
|
alignSelf?: string;
|
|
33
33
|
order?: number;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
/** Flex-container props shared by View/Row/Pressable — RN vocabulary, applied
|
|
36
|
+
* to the host flexboxlayout natively and the element's style on web.
|
|
37
|
+
* `gap` is a dip number (px on web); NS supports it on FlexboxLayout only
|
|
38
|
+
* (GridLayout has no gap). */
|
|
39
|
+
export interface FlexContainerProps {
|
|
40
|
+
justifyContent?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
41
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
42
|
+
flexWrap?: boolean | 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
43
|
+
gap?: number | string;
|
|
44
|
+
rowGap?: number | string;
|
|
45
|
+
columnGap?: number | string;
|
|
46
|
+
}
|
|
47
|
+
/** Liquid Glass material config. Native maps it to `iosGlassEffect`
|
|
48
|
+
* (iOS 26+; inert on Android and older iOS), web to the `vx-glass`
|
|
49
|
+
* backdrop-filter approximation. `variant:'clear'` is the faint,
|
|
50
|
+
* mostly-transparent glass; `'regular'` is Apple's default. */
|
|
51
|
+
export interface GlassConfig {
|
|
52
|
+
variant?: 'regular' | 'clear' | 'identity' | 'none';
|
|
53
|
+
/** Touch-tracking highlight — only meaningful on <LiquidGlass>; the
|
|
54
|
+
* per-view glass applied by `glass` never receives touches upstream. */
|
|
55
|
+
interactive?: boolean;
|
|
56
|
+
tint?: string;
|
|
57
|
+
/** (LiquidGlassContainer only) merge distance between glass siblings. */
|
|
58
|
+
spacing?: number;
|
|
59
|
+
/** Effect-change animation in ms (default 300). */
|
|
60
|
+
animateChangeDuration?: number;
|
|
61
|
+
}
|
|
62
|
+
/** `glass` surface prop value: `true`/string shorthand or a config object.
|
|
63
|
+
* `'none'`/`'identity'`/`false` mean no glass. */
|
|
64
|
+
export type GlassProp = boolean | 'regular' | 'clear' | 'identity' | 'none' | GlassConfig;
|
|
65
|
+
/** Static glass material on container primitives — background glass behind
|
|
66
|
+
* the view's content. Interactive glass needs <LiquidGlass>. */
|
|
67
|
+
export interface GlassSurfaceProps {
|
|
68
|
+
glass?: GlassProp;
|
|
69
|
+
}
|
|
70
|
+
export interface GridProps extends GlassSurfaceProps {
|
|
36
71
|
className?: any;
|
|
37
72
|
style?: any;
|
|
38
73
|
children?: any;
|
|
@@ -42,22 +77,55 @@ export interface GridProps {
|
|
|
42
77
|
ios?: Record<string, any>;
|
|
43
78
|
android?: Record<string, any>;
|
|
44
79
|
web?: Record<string, any>;
|
|
80
|
+
id?: string;
|
|
45
81
|
}
|
|
46
|
-
export interface StackProps {
|
|
82
|
+
export interface StackProps extends GlassSurfaceProps {
|
|
47
83
|
className?: any;
|
|
48
84
|
style?: any;
|
|
49
85
|
children?: any;
|
|
50
86
|
ios?: Record<string, any>;
|
|
51
87
|
android?: Record<string, any>;
|
|
52
88
|
web?: Record<string, any>;
|
|
89
|
+
id?: string;
|
|
53
90
|
}
|
|
54
|
-
export interface AbsoluteProps {
|
|
91
|
+
export interface AbsoluteProps extends GlassSurfaceProps {
|
|
55
92
|
className?: any;
|
|
56
93
|
style?: any;
|
|
57
94
|
children?: any;
|
|
58
95
|
ios?: Record<string, any>;
|
|
59
96
|
android?: Record<string, any>;
|
|
60
97
|
web?: Record<string, any>;
|
|
98
|
+
id?: string;
|
|
99
|
+
}
|
|
100
|
+
/** Interactive glass surface — the element root IS the platform's glass
|
|
101
|
+
* effect view (NS `LiquidGlass`, a UIVisualEffectView hosting children).
|
|
102
|
+
* Real material on iOS 26+; inert layout on Android and older iOS;
|
|
103
|
+
* backdrop-filter approximation on web. */
|
|
104
|
+
export interface LiquidGlassProps extends LayoutChildProps {
|
|
105
|
+
className?: any;
|
|
106
|
+
style?: any;
|
|
107
|
+
children?: any;
|
|
108
|
+
id?: string;
|
|
109
|
+
variant?: 'regular' | 'clear';
|
|
110
|
+
interactive?: boolean;
|
|
111
|
+
tint?: string;
|
|
112
|
+
animateChangeDuration?: number;
|
|
113
|
+
ios?: Record<string, any>;
|
|
114
|
+
android?: Record<string, any>;
|
|
115
|
+
web?: Record<string, any>;
|
|
116
|
+
}
|
|
117
|
+
/** Merged-glass region — sibling glass elements inside morph together
|
|
118
|
+
* across `spacing` dips (NS `LiquidGlassContainer`, an AbsoluteLayout:
|
|
119
|
+
* children position via left/top). */
|
|
120
|
+
export interface LiquidGlassContainerProps extends LayoutChildProps {
|
|
121
|
+
className?: any;
|
|
122
|
+
style?: any;
|
|
123
|
+
children?: any;
|
|
124
|
+
id?: string;
|
|
125
|
+
spacing?: number;
|
|
126
|
+
ios?: Record<string, any>;
|
|
127
|
+
android?: Record<string, any>;
|
|
128
|
+
web?: Record<string, any>;
|
|
61
129
|
}
|
|
62
130
|
export interface SpacerProps {
|
|
63
131
|
className?: any;
|
|
@@ -65,8 +133,9 @@ export interface SpacerProps {
|
|
|
65
133
|
ios?: Record<string, any>;
|
|
66
134
|
android?: Record<string, any>;
|
|
67
135
|
web?: Record<string, any>;
|
|
136
|
+
id?: string;
|
|
68
137
|
}
|
|
69
|
-
export interface ViewProps extends LayoutChildProps {
|
|
138
|
+
export interface ViewProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
|
|
70
139
|
className?: any;
|
|
71
140
|
style?: any;
|
|
72
141
|
children?: any;
|
|
@@ -81,10 +150,11 @@ export interface ViewProps extends LayoutChildProps {
|
|
|
81
150
|
android?: any;
|
|
82
151
|
web?: any;
|
|
83
152
|
}
|
|
84
|
-
export interface RowProps extends LayoutChildProps {
|
|
153
|
+
export interface RowProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
|
|
85
154
|
className?: any;
|
|
86
155
|
style?: any;
|
|
87
156
|
children?: any;
|
|
157
|
+
id?: string;
|
|
88
158
|
/** Platform-specific properties are applied after shared props. */
|
|
89
159
|
ios?: any;
|
|
90
160
|
android?: any;
|
|
@@ -94,6 +164,7 @@ export interface TextProps extends LayoutChildProps {
|
|
|
94
164
|
className?: any;
|
|
95
165
|
style?: any;
|
|
96
166
|
children?: any;
|
|
167
|
+
id?: string;
|
|
97
168
|
numberOfLines?: number;
|
|
98
169
|
/** Native Label does not expose text selection; implemented with CSS on web. */
|
|
99
170
|
selectable?: boolean;
|
|
@@ -114,7 +185,32 @@ export interface TextProps extends LayoutChildProps {
|
|
|
114
185
|
android?: any;
|
|
115
186
|
web?: any;
|
|
116
187
|
}
|
|
117
|
-
|
|
188
|
+
/** Inline rich text container. Children should be RichTextSpan components so
|
|
189
|
+
* the native leaf can preserve each run as a NativeScript Span. */
|
|
190
|
+
export interface RichTextProps extends LayoutChildProps {
|
|
191
|
+
className?: any;
|
|
192
|
+
style?: any;
|
|
193
|
+
children?: any;
|
|
194
|
+
id?: string;
|
|
195
|
+
/** Platform-specific properties are applied after shared props. */
|
|
196
|
+
ios?: any;
|
|
197
|
+
android?: any;
|
|
198
|
+
web?: any;
|
|
199
|
+
}
|
|
200
|
+
/** One styled or tappable inline run inside RichText. `text` is an explicit
|
|
201
|
+
* native-safe escape hatch; a single string child is also accepted. */
|
|
202
|
+
export interface RichTextSpanProps {
|
|
203
|
+
className?: any;
|
|
204
|
+
style?: any;
|
|
205
|
+
children?: any;
|
|
206
|
+
text?: string;
|
|
207
|
+
onPress?: () => void;
|
|
208
|
+
/** Platform-specific properties are applied after shared props. */
|
|
209
|
+
ios?: any;
|
|
210
|
+
android?: any;
|
|
211
|
+
web?: any;
|
|
212
|
+
}
|
|
213
|
+
export interface PressableProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
|
|
118
214
|
className?: any;
|
|
119
215
|
style?: any;
|
|
120
216
|
children?: any;
|
|
@@ -200,9 +296,6 @@ export interface ListProps {
|
|
|
200
296
|
/** Stable item key for web reconciliation. Falls back to `item.id`; native
|
|
201
297
|
* ListView recycles by index and does not consume keys. */
|
|
202
298
|
keyFor?: (item: any) => string | number;
|
|
203
|
-
/** Metadata hint only in v1. Switch heterogeneous row markup in renderItem;
|
|
204
|
-
* the current renderers do not consume this value. */
|
|
205
|
-
kindFor?: (item: any) => string;
|
|
206
299
|
/** Native iOS row-height estimate. Web virtualization is not enabled in v1. */
|
|
207
300
|
estimatedItemHeight?: number;
|
|
208
301
|
/** Called when the list approaches its end. */
|
|
@@ -212,7 +305,7 @@ export interface ListProps {
|
|
|
212
305
|
android?: Record<string, any>;
|
|
213
306
|
web?: Record<string, any>;
|
|
214
307
|
}
|
|
215
|
-
export interface ScrollViewProps extends LayoutChildProps {
|
|
308
|
+
export interface ScrollViewProps extends LayoutChildProps, GlassSurfaceProps {
|
|
216
309
|
className?: any;
|
|
217
310
|
style?: any;
|
|
218
311
|
id?: string;
|
|
@@ -223,6 +316,19 @@ export interface ScrollViewProps extends LayoutChildProps {
|
|
|
223
316
|
android?: any;
|
|
224
317
|
web?: any;
|
|
225
318
|
}
|
|
319
|
+
/** Scrollable ordinary content on web. Native is an inline flex container so
|
|
320
|
+
* a child ListView can own the scrolling without nesting recycling views in a
|
|
321
|
+
* native ScrollView. */
|
|
322
|
+
export interface ScrollBoxProps extends LayoutChildProps, GlassSurfaceProps {
|
|
323
|
+
className?: any;
|
|
324
|
+
style?: any;
|
|
325
|
+
id?: string;
|
|
326
|
+
children?: any;
|
|
327
|
+
/** Platform-specific properties are applied after the shared props. */
|
|
328
|
+
ios?: any;
|
|
329
|
+
android?: any;
|
|
330
|
+
web?: any;
|
|
331
|
+
}
|
|
226
332
|
export interface ImageProps extends LayoutChildProps {
|
|
227
333
|
className?: any;
|
|
228
334
|
style?: any;
|
|
@@ -242,6 +348,7 @@ export interface ScreenProps {
|
|
|
242
348
|
ios?: any;
|
|
243
349
|
android?: any;
|
|
244
350
|
web?: any;
|
|
351
|
+
id?: string;
|
|
245
352
|
}
|
|
246
353
|
export interface SafeAreaProps {
|
|
247
354
|
className?: any;
|
|
@@ -251,6 +358,7 @@ export interface SafeAreaProps {
|
|
|
251
358
|
ios?: Record<string, any>;
|
|
252
359
|
android?: Record<string, any>;
|
|
253
360
|
web?: Record<string, any>;
|
|
361
|
+
id?: string;
|
|
254
362
|
}
|
|
255
363
|
export interface KeyboardAvoidingProps {
|
|
256
364
|
className?: any;
|
|
@@ -259,10 +367,12 @@ export interface KeyboardAvoidingProps {
|
|
|
259
367
|
ios?: Record<string, any>;
|
|
260
368
|
android?: Record<string, any>;
|
|
261
369
|
web?: Record<string, any>;
|
|
370
|
+
id?: string;
|
|
262
371
|
}
|
|
263
372
|
export interface DrawerProps {
|
|
264
373
|
className?: any;
|
|
265
374
|
style?: any;
|
|
375
|
+
id?: string;
|
|
266
376
|
main?: any;
|
|
267
377
|
drawer?: any;
|
|
268
378
|
open?: boolean;
|
|
@@ -290,6 +400,19 @@ export interface ActivityIndicatorProps {
|
|
|
290
400
|
android?: Record<string, any>;
|
|
291
401
|
web?: Record<string, any>;
|
|
292
402
|
}
|
|
403
|
+
export interface MeterProps {
|
|
404
|
+
className?: any;
|
|
405
|
+
style?: any;
|
|
406
|
+
id?: string;
|
|
407
|
+
children?: any;
|
|
408
|
+
value: number;
|
|
409
|
+
max?: number;
|
|
410
|
+
size?: number;
|
|
411
|
+
strokeWidth?: number;
|
|
412
|
+
color?: string;
|
|
413
|
+
trackColor?: string;
|
|
414
|
+
accessibilityLabel?: string;
|
|
415
|
+
}
|
|
293
416
|
export interface SliderProps {
|
|
294
417
|
className?: any;
|
|
295
418
|
style?: any;
|
|
@@ -313,9 +436,16 @@ export interface IconProps {
|
|
|
313
436
|
android?: Record<string, any>;
|
|
314
437
|
web?: Record<string, any>;
|
|
315
438
|
}
|
|
316
|
-
/** One registered icon representation. `svg` contains path `d` data
|
|
439
|
+
/** One registered icon representation. `svg` contains path `d` data;
|
|
440
|
+
* `markup` is full inner-SVG markup (groups, transforms, several paths)
|
|
441
|
+
* rendered inside an `<svg viewBox>` shell on web and through `svgview`
|
|
442
|
+
* (ui-svg) on native. `font`, `src`, and `text` are per-platform
|
|
443
|
+
* fallbacks, in that order. */
|
|
317
444
|
export interface IconGlyph {
|
|
318
445
|
svg?: string;
|
|
446
|
+
markup?: string;
|
|
447
|
+
viewBox?: string;
|
|
448
|
+
text?: string;
|
|
319
449
|
font?: {
|
|
320
450
|
family: string;
|
|
321
451
|
glyph: string;
|
|
@@ -348,11 +478,17 @@ export interface OverlayProps {
|
|
|
348
478
|
web?: Record<string, any>;
|
|
349
479
|
}
|
|
350
480
|
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
481
|
+
/** A platform-neutral ref to the host view or element that owns a popover. */
|
|
482
|
+
export interface PopoverAnchorRef {
|
|
483
|
+
readonly current: unknown;
|
|
484
|
+
}
|
|
351
485
|
export interface PopoverProps {
|
|
352
|
-
/**
|
|
353
|
-
anchor
|
|
486
|
+
/** Ref to a native view or web element, commonly populated by `bind`. */
|
|
487
|
+
anchor: PopoverAnchorRef;
|
|
354
488
|
open?: boolean;
|
|
355
489
|
placement?: PopoverPlacement;
|
|
490
|
+
dismissOnOutsideTap?: boolean;
|
|
491
|
+
onDismiss?: () => void;
|
|
356
492
|
className?: any;
|
|
357
493
|
style?: any;
|
|
358
494
|
children?: any;
|
|
@@ -396,6 +532,32 @@ export interface ModalOpenOptions {
|
|
|
396
532
|
export type ModalOpenResult = unknown;
|
|
397
533
|
/** Public function shape of the imperative modal service. */
|
|
398
534
|
export type OpenModal = (component: any, params?: any, options?: ModalOpenOptions) => Promise<ModalOpenResult>;
|
|
535
|
+
/** Declarative in-window sheet: bottom-anchored panel on the enclosing
|
|
536
|
+
* screen's RootLayout (native) or a document-body portal layer (web).
|
|
537
|
+
* Unlike `Modal presentation='sheet'` (system modal), content stays
|
|
538
|
+
* inside the app window — same window region as the declaring page. */
|
|
539
|
+
export interface SheetProps {
|
|
540
|
+
open?: boolean;
|
|
541
|
+
/** Called when the shade is tapped or the sheet is dismissed by the
|
|
542
|
+
* platform — not on programmatic `open`→`false` transitions. */
|
|
543
|
+
onDismiss?: () => void;
|
|
544
|
+
/** Dim backdrop + tap-to-dismiss (default true). */
|
|
545
|
+
shadeCover?: boolean;
|
|
546
|
+
className?: any;
|
|
547
|
+
style?: any;
|
|
548
|
+
children?: any;
|
|
549
|
+
ios?: Record<string, any>;
|
|
550
|
+
android?: Record<string, any>;
|
|
551
|
+
web?: Record<string, any>;
|
|
552
|
+
}
|
|
553
|
+
/** Options for the imperative `openSheet` service. */
|
|
554
|
+
export interface SheetOpenOptions {
|
|
555
|
+
shadeCover?: boolean;
|
|
556
|
+
}
|
|
557
|
+
/** Imperative sheet: mounts `component` on a dedicated root in a bottom
|
|
558
|
+
* sheet and resolves with the value passed to `close(result)`. The
|
|
559
|
+
* component receives `{ params, close }`. */
|
|
560
|
+
export type OpenSheet = (component: any, params?: any, options?: SheetOpenOptions) => Promise<ModalOpenResult>;
|
|
399
561
|
export interface TabSpec {
|
|
400
562
|
title: string;
|
|
401
563
|
render: () => any;
|
|
@@ -419,6 +581,44 @@ export interface Route {
|
|
|
419
581
|
stack: string;
|
|
420
582
|
name: string;
|
|
421
583
|
params: Record<string, unknown>;
|
|
584
|
+
/** 'push' (default) pushes onto the stack · 'modal' opens its own root
|
|
585
|
+
* (native: `showModal`; web: overlay pane, URL preserved) · 'fade' is a
|
|
586
|
+
* push with a fade transition. A `+modal`/`+fade` filename suffix in
|
|
587
|
+
* the route dir sets the manifest default; this field overrides it. */
|
|
588
|
+
presentation?: 'push' | 'modal' | 'fade';
|
|
589
|
+
/** Loader result supplied to the route screen as `data`. */
|
|
590
|
+
loaderData?: unknown;
|
|
591
|
+
/** Loader rejection supplied to the route screen as `error`. */
|
|
592
|
+
loaderError?: unknown;
|
|
593
|
+
/** Context returned by the route's `beforeLoad` export. It is merged into
|
|
594
|
+
* screen props and remains available from `useRoute`. */
|
|
595
|
+
context?: RouteContext;
|
|
596
|
+
}
|
|
597
|
+
/** Values shared by a route guard and the screen it admits. */
|
|
598
|
+
export type RouteContext = Record<string, unknown>;
|
|
599
|
+
export interface BeforeLoadArgs {
|
|
600
|
+
params: Record<string, unknown>;
|
|
601
|
+
context: RouteContext;
|
|
602
|
+
}
|
|
603
|
+
export type BeforeLoad = (args: BeforeLoadArgs) => RouteContext | void | Promise<RouteContext | void>;
|
|
604
|
+
/** The deliberately small cross-platform head surface. `meta` keys become
|
|
605
|
+
* web `<meta name="..." content="...">` tags; native consumes `title`. */
|
|
606
|
+
export interface RouteHead {
|
|
607
|
+
title?: string;
|
|
608
|
+
meta?: Record<string, string>;
|
|
609
|
+
}
|
|
610
|
+
export type RouteHeadExport = RouteHead | ((params: Record<string, unknown>) => RouteHead);
|
|
611
|
+
export interface LinkProps {
|
|
612
|
+
href: string;
|
|
613
|
+
target?: string;
|
|
614
|
+
className?: any;
|
|
615
|
+
children?: any;
|
|
616
|
+
}
|
|
617
|
+
export interface NavLinkProps {
|
|
618
|
+
route: Route;
|
|
619
|
+
activeClassName?: string;
|
|
620
|
+
className?: any;
|
|
621
|
+
children?: any;
|
|
422
622
|
}
|
|
423
623
|
/** name → screen component table for `registerScreens` — the app owns the
|
|
424
624
|
* route table; native `pushRoute` resolves `route.name` through it and
|
|
@@ -435,6 +635,19 @@ export interface RouteMeta {
|
|
|
435
635
|
params: string[];
|
|
436
636
|
/** Source file (glob key) — diagnostics only. */
|
|
437
637
|
file: string;
|
|
638
|
+
/** Declared default presentation — set by a `+modal`/`+fade` filename
|
|
639
|
+
* suffix (`app/settings+modal.tsrx` → route 'settings', modal). */
|
|
640
|
+
presentation?: 'push' | 'modal' | 'fade';
|
|
641
|
+
/** Optional `loader` named export — a prefetch hook, not a data layer.
|
|
642
|
+
* pushRoute fires it (fire-and-forget) before navigating so the
|
|
643
|
+
* screen's `query$` reads hit a warm cache; boot/deep-link routes
|
|
644
|
+
* skip it (the screen mounts in the same tick anyway). */
|
|
645
|
+
loader?: (params: Record<string, unknown>) => unknown;
|
|
646
|
+
/** Optional guard awaited before a push commits. A thrown `redirect(...)`
|
|
647
|
+
* short-circuits the attempted route. */
|
|
648
|
+
beforeLoad?: BeforeLoad;
|
|
649
|
+
/** Optional route title/meta declaration, or a params-only function. */
|
|
650
|
+
head?: RouteHeadExport;
|
|
438
651
|
}
|
|
439
652
|
/** Output of `deriveRouteManifest` — `screens` feeds `registerScreens`
|
|
440
653
|
* (native pushRoute + web outlet fallback), `routes` feeds web URL
|
|
@@ -443,6 +656,13 @@ export interface RouteManifest {
|
|
|
443
656
|
screens: ScreenTable;
|
|
444
657
|
routes: RouteMeta[];
|
|
445
658
|
layouts: Record<string, any>;
|
|
659
|
+
loaders?: Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>;
|
|
660
|
+
}
|
|
661
|
+
export interface OpenWindowOptions {
|
|
662
|
+
/** Data made available to the native window content resolver. */
|
|
663
|
+
data?: Record<string, unknown>;
|
|
664
|
+
/** Optional URL used by the web window. */
|
|
665
|
+
url?: string;
|
|
446
666
|
}
|
|
447
667
|
export interface AnimatedValue {
|
|
448
668
|
readonly value: number;
|