@octane-xplat/ui 0.3.0 → 0.5.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 +55 -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 +133 -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 +79 -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/ui3.js +22 -1
- 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 -26
- package/dist/native/ui4.js +22 -20
- package/dist/native/ui40.js +179 -8
- package/dist/native/ui41.js +52 -98
- package/dist/native/ui42.js +14 -145
- package/dist/native/ui43.js +16 -19
- package/dist/native/ui44.js +6 -6
- package/dist/native/ui45.js +38 -0
- package/dist/native/ui46.js +267 -0
- package/dist/native/ui47.js +28 -0
- package/dist/native/ui48.js +35 -0
- package/dist/native/ui49.js +41 -0
- package/dist/native/ui5.js +37 -77
- package/dist/native/ui50.js +72 -0
- package/dist/native/ui51.js +66 -0
- package/dist/native/ui52.js +64 -0
- package/dist/native/ui53.js +27 -0
- package/dist/native/ui54.js +13 -0
- package/dist/native/ui55.js +92 -0
- package/dist/native/ui56.js +34 -0
- package/dist/native/ui57.js +19 -0
- package/dist/native/ui58.js +156 -0
- package/dist/native/ui59.js +33 -0
- package/dist/native/ui6.js +94 -9
- package/dist/native/ui60.js +14 -0
- package/dist/native/ui61.js +22 -0
- package/dist/native/ui62.js +8 -0
- package/dist/native/ui63.js +108 -0
- package/dist/native/ui64.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 +53 -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 +265 -96
- 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 +145 -62
- package/dist/web/ui35.js +140 -7
- package/dist/web/ui36.js +86 -41
- package/dist/web/ui37.js +19 -44
- package/dist/web/ui38.js +5 -15
- package/dist/web/ui39.js +24 -86
- package/dist/web/ui4.js +46 -152
- package/dist/web/ui40.js +150 -37
- package/dist/web/ui41.js +36 -10
- package/dist/web/ui42.js +40 -7
- package/dist/web/ui43.js +73 -19
- package/dist/web/ui44.js +40 -6
- package/dist/web/ui45.js +62 -0
- package/dist/web/ui46.js +50 -0
- package/dist/web/ui47.js +9 -0
- package/dist/web/ui48.js +45 -0
- package/dist/web/ui49.js +13 -0
- package/dist/web/ui5.js +131 -27
- package/dist/web/ui50.js +63 -0
- package/dist/web/ui51.js +47 -0
- package/dist/web/ui52.js +19 -0
- package/dist/web/ui53.js +273 -0
- package/dist/web/ui54.js +42 -0
- package/dist/web/ui55.js +17 -0
- package/dist/web/ui56.js +9 -0
- package/dist/web/ui57.js +22 -0
- package/dist/web/ui58.js +8 -0
- package/dist/web/ui59.js +44 -0
- package/dist/web/ui6.js +81 -45
- package/dist/web/ui60.js +46 -0
- package/dist/web/ui7.js +43 -21
- package/dist/web/ui8.js +27 -21
- package/dist/web/ui9.js +29 -18
- package/package.json +17 -4
- package/src/theme/tokens.css +597 -141
- package/types/index.d.ts +112 -58
- package/types/props.d.ts +291 -16
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,23 +150,31 @@ 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;
|
|
91
161
|
web?: any;
|
|
92
162
|
}
|
|
163
|
+
/** Shared accessibility roles. The native leaf maps the ARIA spellings that
|
|
164
|
+
* NativeScript names differently (for example `heading` → `header`). */
|
|
165
|
+
export type Role = 'button' | 'link' | 'search' | 'image' | 'heading' | 'adjustable' | 'summary' | 'text' | 'none' | 'progressbar' | 'checkbox' | 'switch' | 'radio' | 'spinbutton' | 'tab';
|
|
93
166
|
export interface TextProps extends LayoutChildProps {
|
|
94
167
|
className?: any;
|
|
95
168
|
style?: any;
|
|
96
169
|
children?: any;
|
|
170
|
+
id?: string;
|
|
97
171
|
numberOfLines?: number;
|
|
98
172
|
/** Native Label does not expose text selection; implemented with CSS on web. */
|
|
99
173
|
selectable?: boolean;
|
|
100
174
|
ellipsize?: boolean;
|
|
175
|
+
accessible?: boolean;
|
|
176
|
+
accessibilityLabel?: string;
|
|
177
|
+
accessibilityRole?: Role;
|
|
101
178
|
accessibilityHint?: string;
|
|
102
179
|
accessibilityValue?: string;
|
|
103
180
|
/** NativeScript supports one state at a time (disabled/selected/checked); busy and expanded are web-only. */
|
|
@@ -114,7 +191,32 @@ export interface TextProps extends LayoutChildProps {
|
|
|
114
191
|
android?: any;
|
|
115
192
|
web?: any;
|
|
116
193
|
}
|
|
117
|
-
|
|
194
|
+
/** Inline rich text container. Children should be RichTextSpan components so
|
|
195
|
+
* the native leaf can preserve each run as a NativeScript Span. */
|
|
196
|
+
export interface RichTextProps extends LayoutChildProps {
|
|
197
|
+
className?: any;
|
|
198
|
+
style?: any;
|
|
199
|
+
children?: any;
|
|
200
|
+
id?: string;
|
|
201
|
+
/** Platform-specific properties are applied after shared props. */
|
|
202
|
+
ios?: any;
|
|
203
|
+
android?: any;
|
|
204
|
+
web?: any;
|
|
205
|
+
}
|
|
206
|
+
/** One styled or tappable inline run inside RichText. `text` is an explicit
|
|
207
|
+
* native-safe escape hatch; a single string child is also accepted. */
|
|
208
|
+
export interface RichTextSpanProps {
|
|
209
|
+
className?: any;
|
|
210
|
+
style?: any;
|
|
211
|
+
children?: any;
|
|
212
|
+
text?: string;
|
|
213
|
+
onPress?: () => void;
|
|
214
|
+
/** Platform-specific properties are applied after shared props. */
|
|
215
|
+
ios?: any;
|
|
216
|
+
android?: any;
|
|
217
|
+
web?: any;
|
|
218
|
+
}
|
|
219
|
+
export interface PressableProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
|
|
118
220
|
className?: any;
|
|
119
221
|
style?: any;
|
|
120
222
|
children?: any;
|
|
@@ -125,7 +227,7 @@ export interface PressableProps extends LayoutChildProps {
|
|
|
125
227
|
onLongPress?: () => void;
|
|
126
228
|
accessible?: boolean;
|
|
127
229
|
accessibilityLabel?: string;
|
|
128
|
-
accessibilityRole?:
|
|
230
|
+
accessibilityRole?: Role;
|
|
129
231
|
onPressIn?: () => void;
|
|
130
232
|
onPressOut?: () => void;
|
|
131
233
|
onDoublePress?: () => void;
|
|
@@ -177,6 +279,9 @@ export interface TextInputProps {
|
|
|
177
279
|
web?: any;
|
|
178
280
|
}
|
|
179
281
|
export interface TextAreaProps extends TextInputProps {
|
|
282
|
+
/** Submit on native only when `returnKeyType` is `done` or `send`; other
|
|
283
|
+
* returns insert newlines because TextView emits returnPress per newline.
|
|
284
|
+
* Web submits on Cmd/Ctrl+Enter. */
|
|
180
285
|
/** Height in text rows. Web: the `rows` attr (fixed box); native:
|
|
181
286
|
* minHeight at the widget's measured line height. With `autoGrow` it
|
|
182
287
|
* becomes the starting height instead of a fixed one. */
|
|
@@ -200,9 +305,6 @@ export interface ListProps {
|
|
|
200
305
|
/** Stable item key for web reconciliation. Falls back to `item.id`; native
|
|
201
306
|
* ListView recycles by index and does not consume keys. */
|
|
202
307
|
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
308
|
/** Native iOS row-height estimate. Web virtualization is not enabled in v1. */
|
|
207
309
|
estimatedItemHeight?: number;
|
|
208
310
|
/** Called when the list approaches its end. */
|
|
@@ -212,7 +314,7 @@ export interface ListProps {
|
|
|
212
314
|
android?: Record<string, any>;
|
|
213
315
|
web?: Record<string, any>;
|
|
214
316
|
}
|
|
215
|
-
export interface ScrollViewProps extends LayoutChildProps {
|
|
317
|
+
export interface ScrollViewProps extends LayoutChildProps, GlassSurfaceProps {
|
|
216
318
|
className?: any;
|
|
217
319
|
style?: any;
|
|
218
320
|
id?: string;
|
|
@@ -223,6 +325,19 @@ export interface ScrollViewProps extends LayoutChildProps {
|
|
|
223
325
|
android?: any;
|
|
224
326
|
web?: any;
|
|
225
327
|
}
|
|
328
|
+
/** Scrollable ordinary content on web. Native is an inline flex container so
|
|
329
|
+
* a child ListView can own the scrolling without nesting recycling views in a
|
|
330
|
+
* native ScrollView. */
|
|
331
|
+
export interface ScrollBoxProps extends LayoutChildProps, GlassSurfaceProps {
|
|
332
|
+
className?: any;
|
|
333
|
+
style?: any;
|
|
334
|
+
id?: string;
|
|
335
|
+
children?: any;
|
|
336
|
+
/** Platform-specific properties are applied after the shared props. */
|
|
337
|
+
ios?: any;
|
|
338
|
+
android?: any;
|
|
339
|
+
web?: any;
|
|
340
|
+
}
|
|
226
341
|
export interface ImageProps extends LayoutChildProps {
|
|
227
342
|
className?: any;
|
|
228
343
|
style?: any;
|
|
@@ -242,6 +357,7 @@ export interface ScreenProps {
|
|
|
242
357
|
ios?: any;
|
|
243
358
|
android?: any;
|
|
244
359
|
web?: any;
|
|
360
|
+
id?: string;
|
|
245
361
|
}
|
|
246
362
|
export interface SafeAreaProps {
|
|
247
363
|
className?: any;
|
|
@@ -251,6 +367,7 @@ export interface SafeAreaProps {
|
|
|
251
367
|
ios?: Record<string, any>;
|
|
252
368
|
android?: Record<string, any>;
|
|
253
369
|
web?: Record<string, any>;
|
|
370
|
+
id?: string;
|
|
254
371
|
}
|
|
255
372
|
export interface KeyboardAvoidingProps {
|
|
256
373
|
className?: any;
|
|
@@ -259,10 +376,12 @@ export interface KeyboardAvoidingProps {
|
|
|
259
376
|
ios?: Record<string, any>;
|
|
260
377
|
android?: Record<string, any>;
|
|
261
378
|
web?: Record<string, any>;
|
|
379
|
+
id?: string;
|
|
262
380
|
}
|
|
263
381
|
export interface DrawerProps {
|
|
264
382
|
className?: any;
|
|
265
383
|
style?: any;
|
|
384
|
+
id?: string;
|
|
266
385
|
main?: any;
|
|
267
386
|
drawer?: any;
|
|
268
387
|
open?: boolean;
|
|
@@ -290,6 +409,19 @@ export interface ActivityIndicatorProps {
|
|
|
290
409
|
android?: Record<string, any>;
|
|
291
410
|
web?: Record<string, any>;
|
|
292
411
|
}
|
|
412
|
+
export interface MeterProps {
|
|
413
|
+
className?: any;
|
|
414
|
+
style?: any;
|
|
415
|
+
id?: string;
|
|
416
|
+
children?: any;
|
|
417
|
+
value: number;
|
|
418
|
+
max?: number;
|
|
419
|
+
size?: number;
|
|
420
|
+
strokeWidth?: number;
|
|
421
|
+
color?: string;
|
|
422
|
+
trackColor?: string;
|
|
423
|
+
accessibilityLabel?: string;
|
|
424
|
+
}
|
|
293
425
|
export interface SliderProps {
|
|
294
426
|
className?: any;
|
|
295
427
|
style?: any;
|
|
@@ -313,9 +445,19 @@ export interface IconProps {
|
|
|
313
445
|
android?: Record<string, any>;
|
|
314
446
|
web?: Record<string, any>;
|
|
315
447
|
}
|
|
316
|
-
/** One registered icon representation. `svg` contains path `d` data
|
|
448
|
+
/** One registered icon representation. `svg` contains path `d` data;
|
|
449
|
+
* `markup` is full inner-SVG markup (groups, transforms, several paths)
|
|
450
|
+
* rendered inside an `<svg viewBox>` shell on web and through `svgview`
|
|
451
|
+
* (ui-svg) on native. `font`, `src`, and `text` are fallback
|
|
452
|
+
* representations, in that order after SVG. `src` may be a raster source or
|
|
453
|
+
* an SVG source; SVG is auto-detected for inline markup, SVG data URIs, and
|
|
454
|
+
* `.svg` paths/URLs. Opaque resource names need `markup`/`svg` when their
|
|
455
|
+
* format cannot be inferred from the string. */
|
|
317
456
|
export interface IconGlyph {
|
|
318
457
|
svg?: string;
|
|
458
|
+
markup?: string;
|
|
459
|
+
viewBox?: string;
|
|
460
|
+
text?: string;
|
|
319
461
|
font?: {
|
|
320
462
|
family: string;
|
|
321
463
|
glyph: string;
|
|
@@ -348,11 +490,17 @@ export interface OverlayProps {
|
|
|
348
490
|
web?: Record<string, any>;
|
|
349
491
|
}
|
|
350
492
|
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
493
|
+
/** A platform-neutral ref to the host view or element that owns a popover. */
|
|
494
|
+
export interface PopoverAnchorRef {
|
|
495
|
+
readonly current: unknown;
|
|
496
|
+
}
|
|
351
497
|
export interface PopoverProps {
|
|
352
|
-
/**
|
|
353
|
-
anchor
|
|
498
|
+
/** Ref to a native view or web element, commonly populated by `bind`. */
|
|
499
|
+
anchor: PopoverAnchorRef;
|
|
354
500
|
open?: boolean;
|
|
355
501
|
placement?: PopoverPlacement;
|
|
502
|
+
dismissOnOutsideTap?: boolean;
|
|
503
|
+
onDismiss?: () => void;
|
|
356
504
|
className?: any;
|
|
357
505
|
style?: any;
|
|
358
506
|
children?: any;
|
|
@@ -360,15 +508,51 @@ export interface PopoverProps {
|
|
|
360
508
|
android?: Record<string, any>;
|
|
361
509
|
web?: Record<string, any>;
|
|
362
510
|
}
|
|
511
|
+
export interface HoverableProps {
|
|
512
|
+
/** Content shown after the pointer rests over the children on web. */
|
|
513
|
+
card: any;
|
|
514
|
+
/** Styling for the card's wrapper view inside the popover — e.g. a
|
|
515
|
+
* pointer bridge covering the anchor↔card gap or a positional offset. */
|
|
516
|
+
cardClassName?: any;
|
|
517
|
+
cardStyle?: any;
|
|
518
|
+
children?: any;
|
|
519
|
+
openDelay?: number;
|
|
520
|
+
closeDelay?: number;
|
|
521
|
+
placement?: PopoverPlacement;
|
|
522
|
+
className?: any;
|
|
523
|
+
style?: any;
|
|
524
|
+
ios?: Record<string, any>;
|
|
525
|
+
android?: Record<string, any>;
|
|
526
|
+
web?: Record<string, any>;
|
|
527
|
+
}
|
|
363
528
|
export type ToastContent = string | (() => any);
|
|
364
|
-
export type ToastPosition = 'top' | 'bottom';
|
|
529
|
+
export type ToastPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
|
365
530
|
export interface ToastOptions {
|
|
366
531
|
duration?: number;
|
|
367
532
|
position?: ToastPosition;
|
|
533
|
+
/** When set, the toast is positioned by Popover relative to this view. */
|
|
534
|
+
anchor?: PopoverAnchorRef;
|
|
535
|
+
/** Placement used with `anchor`; `position` supplies the top/bottom default. */
|
|
536
|
+
placement?: PopoverPlacement;
|
|
368
537
|
ios?: Record<string, any>;
|
|
369
538
|
android?: Record<string, any>;
|
|
370
539
|
web?: Record<string, any>;
|
|
371
540
|
}
|
|
541
|
+
export interface MeasureBounds {
|
|
542
|
+
x: number;
|
|
543
|
+
y: number;
|
|
544
|
+
width: number;
|
|
545
|
+
height: number;
|
|
546
|
+
}
|
|
547
|
+
export interface UseMeasureOptions {
|
|
548
|
+
/** Re-measure on layout, resize, scroll, and content-size changes. Defaults to true. */
|
|
549
|
+
observe?: boolean;
|
|
550
|
+
}
|
|
551
|
+
export interface MeasureResult {
|
|
552
|
+
/** Pass to a View's `bind` prop. */
|
|
553
|
+
bind: (element: any) => void;
|
|
554
|
+
bounds: MeasureBounds | null;
|
|
555
|
+
}
|
|
372
556
|
export interface ModalProps {
|
|
373
557
|
open?: boolean;
|
|
374
558
|
onClose?: (result?: ModalOpenResult) => void;
|
|
@@ -396,6 +580,32 @@ export interface ModalOpenOptions {
|
|
|
396
580
|
export type ModalOpenResult = unknown;
|
|
397
581
|
/** Public function shape of the imperative modal service. */
|
|
398
582
|
export type OpenModal = (component: any, params?: any, options?: ModalOpenOptions) => Promise<ModalOpenResult>;
|
|
583
|
+
/** Declarative in-window sheet: bottom-anchored panel on the enclosing
|
|
584
|
+
* screen's RootLayout (native) or a document-body portal layer (web).
|
|
585
|
+
* Unlike `Modal presentation='sheet'` (system modal), content stays
|
|
586
|
+
* inside the app window — same window region as the declaring page. */
|
|
587
|
+
export interface SheetProps {
|
|
588
|
+
open?: boolean;
|
|
589
|
+
/** Called when the shade is tapped or the sheet is dismissed by the
|
|
590
|
+
* platform — not on programmatic `open`→`false` transitions. */
|
|
591
|
+
onDismiss?: () => void;
|
|
592
|
+
/** Dim backdrop + tap-to-dismiss (default true). */
|
|
593
|
+
shadeCover?: boolean;
|
|
594
|
+
className?: any;
|
|
595
|
+
style?: any;
|
|
596
|
+
children?: any;
|
|
597
|
+
ios?: Record<string, any>;
|
|
598
|
+
android?: Record<string, any>;
|
|
599
|
+
web?: Record<string, any>;
|
|
600
|
+
}
|
|
601
|
+
/** Options for the imperative `openSheet` service. */
|
|
602
|
+
export interface SheetOpenOptions {
|
|
603
|
+
shadeCover?: boolean;
|
|
604
|
+
}
|
|
605
|
+
/** Imperative sheet: mounts `component` on a dedicated root in a bottom
|
|
606
|
+
* sheet and resolves with the value passed to `close(result)`. The
|
|
607
|
+
* component receives `{ params, close }`. */
|
|
608
|
+
export type OpenSheet = (component: any, params?: any, options?: SheetOpenOptions) => Promise<ModalOpenResult>;
|
|
399
609
|
export interface TabSpec {
|
|
400
610
|
title: string;
|
|
401
611
|
render: () => any;
|
|
@@ -419,6 +629,44 @@ export interface Route {
|
|
|
419
629
|
stack: string;
|
|
420
630
|
name: string;
|
|
421
631
|
params: Record<string, unknown>;
|
|
632
|
+
/** 'push' (default) pushes onto the stack · 'modal' opens its own root
|
|
633
|
+
* (native: `showModal`; web: overlay pane, URL preserved) · 'fade' is a
|
|
634
|
+
* push with a fade transition. A `+modal`/`+fade` filename suffix in
|
|
635
|
+
* the route dir sets the manifest default; this field overrides it. */
|
|
636
|
+
presentation?: 'push' | 'modal' | 'fade';
|
|
637
|
+
/** Loader result supplied to the route screen as `data`. */
|
|
638
|
+
loaderData?: unknown;
|
|
639
|
+
/** Loader rejection supplied to the route screen as `error`. */
|
|
640
|
+
loaderError?: unknown;
|
|
641
|
+
/** Context returned by the route's `beforeLoad` export. It is merged into
|
|
642
|
+
* screen props and remains available from `useRoute`. */
|
|
643
|
+
context?: RouteContext;
|
|
644
|
+
}
|
|
645
|
+
/** Values shared by a route guard and the screen it admits. */
|
|
646
|
+
export type RouteContext = Record<string, unknown>;
|
|
647
|
+
export interface BeforeLoadArgs {
|
|
648
|
+
params: Record<string, unknown>;
|
|
649
|
+
context: RouteContext;
|
|
650
|
+
}
|
|
651
|
+
export type BeforeLoad = (args: BeforeLoadArgs) => RouteContext | void | Promise<RouteContext | void>;
|
|
652
|
+
/** The deliberately small cross-platform head surface. `meta` keys become
|
|
653
|
+
* web `<meta name="..." content="...">` tags; native consumes `title`. */
|
|
654
|
+
export interface RouteHead {
|
|
655
|
+
title?: string;
|
|
656
|
+
meta?: Record<string, string>;
|
|
657
|
+
}
|
|
658
|
+
export type RouteHeadExport = RouteHead | ((params: Record<string, unknown>) => RouteHead);
|
|
659
|
+
export interface LinkProps {
|
|
660
|
+
href: string;
|
|
661
|
+
target?: string;
|
|
662
|
+
className?: any;
|
|
663
|
+
children?: any;
|
|
664
|
+
}
|
|
665
|
+
export interface NavLinkProps {
|
|
666
|
+
route: Route;
|
|
667
|
+
activeClassName?: string;
|
|
668
|
+
className?: any;
|
|
669
|
+
children?: any;
|
|
422
670
|
}
|
|
423
671
|
/** name → screen component table for `registerScreens` — the app owns the
|
|
424
672
|
* route table; native `pushRoute` resolves `route.name` through it and
|
|
@@ -435,6 +683,19 @@ export interface RouteMeta {
|
|
|
435
683
|
params: string[];
|
|
436
684
|
/** Source file (glob key) — diagnostics only. */
|
|
437
685
|
file: string;
|
|
686
|
+
/** Declared default presentation — set by a `+modal`/`+fade` filename
|
|
687
|
+
* suffix (`app/settings+modal.tsrx` → route 'settings', modal). */
|
|
688
|
+
presentation?: 'push' | 'modal' | 'fade';
|
|
689
|
+
/** Optional `loader` named export — a prefetch hook, not a data layer.
|
|
690
|
+
* pushRoute fires it (fire-and-forget) before navigating so the
|
|
691
|
+
* screen's `query$` reads hit a warm cache; boot/deep-link routes
|
|
692
|
+
* skip it (the screen mounts in the same tick anyway). */
|
|
693
|
+
loader?: (params: Record<string, unknown>) => unknown;
|
|
694
|
+
/** Optional guard awaited before a push commits. A thrown `redirect(...)`
|
|
695
|
+
* short-circuits the attempted route. */
|
|
696
|
+
beforeLoad?: BeforeLoad;
|
|
697
|
+
/** Optional route title/meta declaration, or a params-only function. */
|
|
698
|
+
head?: RouteHeadExport;
|
|
438
699
|
}
|
|
439
700
|
/** Output of `deriveRouteManifest` — `screens` feeds `registerScreens`
|
|
440
701
|
* (native pushRoute + web outlet fallback), `routes` feeds web URL
|
|
@@ -443,7 +704,21 @@ export interface RouteManifest {
|
|
|
443
704
|
screens: ScreenTable;
|
|
444
705
|
routes: RouteMeta[];
|
|
445
706
|
layouts: Record<string, any>;
|
|
446
|
-
|
|
707
|
+
loaders?: Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>;
|
|
708
|
+
}
|
|
709
|
+
export interface OpenWindowOptions {
|
|
710
|
+
/** Data made available to the native window content resolver. */
|
|
711
|
+
data?: Record<string, unknown>;
|
|
712
|
+
/** Optional URL used by the web window. */
|
|
713
|
+
url?: string;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Value returned by `useAnimation(initial, prop)`. On web, `prop` supports
|
|
717
|
+
* translateX/translateY/translateZ, scale/scaleX/scaleY, rotate/rotateX/
|
|
718
|
+
* rotateY, and skewX/skewY as CSS transforms, plus `opacity` and other CSS
|
|
719
|
+
* style properties. On NativeScript, `prop` is the name of a NativeScript
|
|
720
|
+
* view property (for example, `translateX` or `opacity`).
|
|
721
|
+
*/
|
|
447
722
|
export interface AnimatedValue {
|
|
448
723
|
readonly value: number;
|
|
449
724
|
bind(el: any): void;
|