@octane-xplat/ui 0.2.1 → 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.
Files changed (126) hide show
  1. package/README.md +46 -0
  2. package/dist/native/octane-client-build.json +1 -1
  3. package/dist/native/ui.js +52 -19
  4. package/dist/native/ui10.js +25 -45
  5. package/dist/native/ui11.js +52 -57
  6. package/dist/native/ui12.js +47 -16
  7. package/dist/native/ui13.js +24 -18
  8. package/dist/native/ui14.js +117 -12
  9. package/dist/native/ui15.js +78 -17
  10. package/dist/native/ui16.js +88 -115
  11. package/dist/native/ui17.js +29 -19
  12. package/dist/native/ui18.js +34 -12
  13. package/dist/native/ui19.js +244 -8
  14. package/dist/native/ui2.js +10 -48
  15. package/dist/native/ui20.js +28 -0
  16. package/dist/native/ui21.js +383 -0
  17. package/dist/native/ui22.js +36 -0
  18. package/dist/native/ui23.js +55 -0
  19. package/dist/native/ui24.js +83 -0
  20. package/dist/native/ui25.js +141 -0
  21. package/dist/native/ui26.js +12 -0
  22. package/dist/native/ui27.js +61 -0
  23. package/dist/native/ui28.js +40 -0
  24. package/dist/native/ui29.js +108 -0
  25. package/dist/native/ui3.js +17 -20
  26. package/dist/native/ui30.js +18 -0
  27. package/dist/native/ui31.js +58 -0
  28. package/dist/native/ui32.js +58 -0
  29. package/dist/native/ui33.js +38 -0
  30. package/dist/native/ui34.js +53 -0
  31. package/dist/native/ui35.js +105 -0
  32. package/dist/native/ui36.js +10 -0
  33. package/dist/native/ui37.js +44 -0
  34. package/dist/native/ui38.js +197 -0
  35. package/dist/native/ui39.js +105 -0
  36. package/dist/native/ui4.js +23 -48
  37. package/dist/native/ui40.js +58 -0
  38. package/dist/native/ui41.js +19 -0
  39. package/dist/native/ui42.js +8 -0
  40. package/dist/native/ui43.js +38 -0
  41. package/dist/native/ui44.js +267 -0
  42. package/dist/native/ui45.js +28 -0
  43. package/dist/native/ui46.js +35 -0
  44. package/dist/native/ui47.js +41 -0
  45. package/dist/native/ui48.js +72 -0
  46. package/dist/native/ui49.js +66 -0
  47. package/dist/native/ui5.js +37 -34
  48. package/dist/native/ui50.js +27 -0
  49. package/dist/native/ui51.js +13 -0
  50. package/dist/native/ui52.js +92 -0
  51. package/dist/native/ui53.js +34 -0
  52. package/dist/native/ui54.js +17 -0
  53. package/dist/native/ui55.js +156 -0
  54. package/dist/native/ui56.js +33 -0
  55. package/dist/native/ui57.js +14 -0
  56. package/dist/native/ui58.js +22 -0
  57. package/dist/native/ui59.js +8 -0
  58. package/dist/native/ui6.js +79 -20
  59. package/dist/native/ui60.js +108 -0
  60. package/dist/native/ui61.js +76 -0
  61. package/dist/native/ui7.js +44 -65
  62. package/dist/native/ui8.js +25 -17
  63. package/dist/native/ui9.js +24 -12
  64. package/dist/web/octane-client-build.json +1 -1
  65. package/dist/web/ui.js +51 -19
  66. package/dist/web/ui10.js +33 -30
  67. package/dist/web/ui11.js +40 -55
  68. package/dist/web/ui12.js +36 -15
  69. package/dist/web/ui13.js +212 -20
  70. package/dist/web/ui14.js +84 -14
  71. package/dist/web/ui15.js +425 -46
  72. package/dist/web/ui16.js +12 -93
  73. package/dist/web/ui17.js +246 -28
  74. package/dist/web/ui18.js +238 -15
  75. package/dist/web/ui19.js +36 -8
  76. package/dist/web/ui2.js +15 -103
  77. package/dist/web/ui20.js +85 -0
  78. package/dist/web/ui21.js +111 -0
  79. package/dist/web/ui22.js +108 -0
  80. package/dist/web/ui23.js +96 -0
  81. package/dist/web/ui24.js +32 -0
  82. package/dist/web/ui25.js +108 -0
  83. package/dist/web/ui26.js +45 -0
  84. package/dist/web/ui27.js +16 -0
  85. package/dist/web/ui28.js +11 -0
  86. package/dist/web/ui29.js +58 -0
  87. package/dist/web/ui3.js +30 -27
  88. package/dist/web/ui30.js +34 -0
  89. package/dist/web/ui31.js +123 -0
  90. package/dist/web/ui32.js +44 -0
  91. package/dist/web/ui33.js +159 -0
  92. package/dist/web/ui34.js +70 -0
  93. package/dist/web/ui35.js +57 -0
  94. package/dist/web/ui36.js +22 -0
  95. package/dist/web/ui37.js +7 -0
  96. package/dist/web/ui38.js +38 -0
  97. package/dist/web/ui39.js +154 -0
  98. package/dist/web/ui4.js +46 -24
  99. package/dist/web/ui40.js +43 -0
  100. package/dist/web/ui41.js +42 -0
  101. package/dist/web/ui42.js +76 -0
  102. package/dist/web/ui43.js +42 -0
  103. package/dist/web/ui44.js +62 -0
  104. package/dist/web/ui45.js +9 -0
  105. package/dist/web/ui46.js +45 -0
  106. package/dist/web/ui47.js +13 -0
  107. package/dist/web/ui48.js +63 -0
  108. package/dist/web/ui49.js +47 -0
  109. package/dist/web/ui5.js +158 -52
  110. package/dist/web/ui50.js +17 -0
  111. package/dist/web/ui51.js +149 -0
  112. package/dist/web/ui52.js +42 -0
  113. package/dist/web/ui53.js +17 -0
  114. package/dist/web/ui54.js +9 -0
  115. package/dist/web/ui55.js +22 -0
  116. package/dist/web/ui56.js +8 -0
  117. package/dist/web/ui57.js +44 -0
  118. package/dist/web/ui58.js +46 -0
  119. package/dist/web/ui6.js +85 -22
  120. package/dist/web/ui7.js +46 -41
  121. package/dist/web/ui8.js +28 -11
  122. package/dist/web/ui9.js +32 -13
  123. package/package.json +18 -6
  124. package/src/theme/tokens.css +444 -47
  125. package/types/index.d.ts +180 -29
  126. package/types/props.d.ts +553 -8
package/types/props.d.ts CHANGED
@@ -17,7 +17,125 @@ export interface PanEvent {
17
17
  export interface SwipeEvent {
18
18
  direction: number;
19
19
  }
20
- export interface ViewProps {
20
+ /** Metadata read by parent layouts. Native forwards NativeScript attached
21
+ * attributes; web folds the CSS equivalents into the child's style. */
22
+ export interface LayoutChildProps {
23
+ row?: number;
24
+ col?: number;
25
+ rowSpan?: number;
26
+ colSpan?: number;
27
+ dock?: 'left' | 'top' | 'right' | 'bottom';
28
+ left?: number;
29
+ top?: number;
30
+ flexGrow?: number;
31
+ flexShrink?: number;
32
+ alignSelf?: string;
33
+ order?: number;
34
+ }
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 {
71
+ className?: any;
72
+ style?: any;
73
+ children?: any;
74
+ rows?: string;
75
+ columns?: string;
76
+ gap?: number | string;
77
+ ios?: Record<string, any>;
78
+ android?: Record<string, any>;
79
+ web?: Record<string, any>;
80
+ id?: string;
81
+ }
82
+ export interface StackProps extends GlassSurfaceProps {
83
+ className?: any;
84
+ style?: any;
85
+ children?: any;
86
+ ios?: Record<string, any>;
87
+ android?: Record<string, any>;
88
+ web?: Record<string, any>;
89
+ id?: string;
90
+ }
91
+ export interface AbsoluteProps extends GlassSurfaceProps {
92
+ className?: any;
93
+ style?: any;
94
+ children?: any;
95
+ ios?: Record<string, any>;
96
+ android?: Record<string, any>;
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>;
129
+ }
130
+ export interface SpacerProps {
131
+ className?: any;
132
+ style?: any;
133
+ ios?: Record<string, any>;
134
+ android?: Record<string, any>;
135
+ web?: Record<string, any>;
136
+ id?: string;
137
+ }
138
+ export interface ViewProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
21
139
  className?: any;
22
140
  style?: any;
23
141
  children?: any;
@@ -27,18 +145,72 @@ export interface ViewProps {
27
145
  bind?: (el: any) => void;
28
146
  onPan?: (e: PanEvent) => void;
29
147
  onSwipe?: (e: SwipeEvent) => void;
148
+ /** Platform-specific properties are applied after shared props. */
149
+ ios?: any;
150
+ android?: any;
151
+ web?: any;
30
152
  }
31
- export interface RowProps {
153
+ export interface RowProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
32
154
  className?: any;
33
155
  style?: any;
34
156
  children?: any;
157
+ id?: string;
158
+ /** Platform-specific properties are applied after shared props. */
159
+ ios?: any;
160
+ android?: any;
161
+ web?: any;
162
+ }
163
+ export interface TextProps extends LayoutChildProps {
164
+ className?: any;
165
+ style?: any;
166
+ children?: any;
167
+ id?: string;
168
+ numberOfLines?: number;
169
+ /** Native Label does not expose text selection; implemented with CSS on web. */
170
+ selectable?: boolean;
171
+ ellipsize?: boolean;
172
+ accessibilityHint?: string;
173
+ accessibilityValue?: string;
174
+ /** NativeScript supports one state at a time (disabled/selected/checked); busy and expanded are web-only. */
175
+ accessibilityState?: {
176
+ disabled?: boolean;
177
+ selected?: boolean;
178
+ checked?: boolean;
179
+ busy?: boolean;
180
+ expanded?: boolean;
181
+ };
182
+ accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
183
+ /** Platform-specific properties are applied after shared props. */
184
+ ios?: any;
185
+ android?: any;
186
+ web?: any;
187
+ }
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;
35
199
  }
36
- export interface TextProps {
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 {
37
203
  className?: any;
38
204
  style?: any;
39
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;
40
212
  }
41
- export interface PressableProps {
213
+ export interface PressableProps extends LayoutChildProps, FlexContainerProps, GlassSurfaceProps {
42
214
  className?: any;
43
215
  style?: any;
44
216
  children?: any;
@@ -50,42 +222,163 @@ export interface PressableProps {
50
222
  accessible?: boolean;
51
223
  accessibilityLabel?: string;
52
224
  accessibilityRole?: string;
225
+ onPressIn?: () => void;
226
+ onPressOut?: () => void;
227
+ onDoublePress?: () => void;
228
+ hitSlop?: number;
229
+ /** NativeScript supports a per-view TouchManager animation opt-out; web has no press scaling. */
230
+ ignoreTouchAnimation?: boolean;
231
+ accessibilityHint?: string;
232
+ accessibilityValue?: string;
233
+ /** NativeScript supports one state at a time (disabled/selected/checked); busy and expanded are web-only. */
234
+ accessibilityState?: {
235
+ disabled?: boolean;
236
+ selected?: boolean;
237
+ checked?: boolean;
238
+ busy?: boolean;
239
+ expanded?: boolean;
240
+ };
241
+ accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
242
+ /** Platform-specific properties are applied after shared props. */
243
+ ios?: any;
244
+ android?: any;
245
+ web?: any;
246
+ }
247
+ export interface TextInputHandle {
248
+ focus(): void;
249
+ blur(): void;
250
+ native: any;
53
251
  }
54
252
  export interface TextInputProps {
55
253
  className?: any;
56
254
  style?: any;
255
+ id?: string;
57
256
  value?: string;
58
257
  placeholder?: string;
59
258
  /** NativeScript's term for placeholder — web maps hint → placeholder. */
60
259
  hint?: string;
61
260
  onChange?: (value: string) => void;
261
+ bind?: (h: TextInputHandle) => void;
262
+ secure?: boolean;
263
+ keyboardType?: 'default' | 'email' | 'number' | 'decimal' | 'phone' | 'url';
264
+ returnKeyType?: 'done' | 'next' | 'go' | 'search' | 'send';
265
+ onSubmit?: () => void;
266
+ onFocus?: () => void;
267
+ onBlur?: () => void;
268
+ editable?: boolean;
269
+ placeholderTextColor?: string;
270
+ /** Platform-specific properties are applied after shared props. */
271
+ ios?: any;
272
+ android?: any;
273
+ web?: any;
274
+ }
275
+ export interface TextAreaProps extends TextInputProps {
276
+ /** Height in text rows. Web: the `rows` attr (fixed box); native:
277
+ * minHeight at the widget's measured line height. With `autoGrow` it
278
+ * becomes the starting height instead of a fixed one. */
279
+ rows?: number;
280
+ /** Grow to fit content, capped by `maxRows`. Native TextView grows by
281
+ * default — this prop exists so web (<textarea> is fixed-rows) matches;
282
+ * without it, native gets a fixed `rows`-high box like web. */
283
+ autoGrow?: boolean;
284
+ /** Growth cap in rows — past it the field scrolls internally. Native:
285
+ * maxHeight at measured line height (TextView's own `maxLines` only
286
+ * sets truncation on iOS — not a cap). */
287
+ maxRows?: number;
62
288
  }
63
289
  export interface ListProps {
64
290
  className?: any;
65
291
  style?: any;
66
292
  id?: string;
67
293
  items: any[];
68
- renderItem: (item: any) => any;
294
+ renderItem: (item: any, index: number) => any;
69
295
  renderEmpty?: () => any;
296
+ /** Stable item key for web reconciliation. Falls back to `item.id`; native
297
+ * ListView recycles by index and does not consume keys. */
298
+ keyFor?: (item: any) => string | number;
299
+ /** Native iOS row-height estimate. Web virtualization is not enabled in v1. */
300
+ estimatedItemHeight?: number;
301
+ /** Called when the list approaches its end. */
302
+ onEndReached?: () => void;
303
+ /** Platform escape hatches, applied after the shared props. */
304
+ ios?: Record<string, any>;
305
+ android?: Record<string, any>;
306
+ web?: Record<string, any>;
70
307
  }
71
- export interface ScrollViewProps {
308
+ export interface ScrollViewProps extends LayoutChildProps, GlassSurfaceProps {
72
309
  className?: any;
73
310
  style?: any;
74
311
  id?: string;
75
312
  horizontal?: boolean;
76
313
  children?: any;
314
+ /** Platform-specific properties are applied after shared props. */
315
+ ios?: any;
316
+ android?: any;
317
+ web?: any;
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;
77
331
  }
78
- export interface ImageProps {
332
+ export interface ImageProps extends LayoutChildProps {
79
333
  className?: any;
80
334
  style?: any;
81
335
  id?: string;
82
336
  src: string;
83
337
  alt?: string;
338
+ /** Platform-specific properties are applied after shared props. */
339
+ ios?: any;
340
+ android?: any;
341
+ web?: any;
84
342
  }
85
343
  export interface ScreenProps {
86
344
  className?: any;
87
345
  style?: any;
88
346
  children?: any;
347
+ /** Platform-specific properties are applied after shared props. */
348
+ ios?: any;
349
+ android?: any;
350
+ web?: any;
351
+ id?: string;
352
+ }
353
+ export interface SafeAreaProps {
354
+ className?: any;
355
+ style?: any;
356
+ children?: any;
357
+ /** NativeScript props applied to the host after shared props. */
358
+ ios?: Record<string, any>;
359
+ android?: Record<string, any>;
360
+ web?: Record<string, any>;
361
+ id?: string;
362
+ }
363
+ export interface KeyboardAvoidingProps {
364
+ className?: any;
365
+ style?: any;
366
+ children?: any;
367
+ ios?: Record<string, any>;
368
+ android?: Record<string, any>;
369
+ web?: Record<string, any>;
370
+ id?: string;
371
+ }
372
+ export interface DrawerProps {
373
+ className?: any;
374
+ style?: any;
375
+ id?: string;
376
+ main?: any;
377
+ drawer?: any;
378
+ open?: boolean;
379
+ ios?: Record<string, any>;
380
+ android?: Record<string, any>;
381
+ web?: Record<string, any>;
89
382
  }
90
383
  export interface SwitchProps {
91
384
  className?: any;
@@ -93,16 +386,178 @@ export interface SwitchProps {
93
386
  id?: string;
94
387
  checked?: boolean;
95
388
  onCheckedChange?: (checked: boolean) => void;
389
+ /** Platform-specific properties are applied after shared props. */
390
+ ios?: any;
391
+ android?: any;
392
+ web?: any;
393
+ }
394
+ export interface ActivityIndicatorProps {
395
+ className?: any;
396
+ style?: any;
397
+ id?: string;
398
+ busy?: boolean;
399
+ ios?: Record<string, any>;
400
+ android?: Record<string, any>;
401
+ web?: Record<string, any>;
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
+ }
416
+ export interface SliderProps {
417
+ className?: any;
418
+ style?: any;
419
+ id?: string;
420
+ value: number;
421
+ minValue?: number;
422
+ maxValue?: number;
423
+ disabled?: boolean;
424
+ onValueChange?: (value: number) => void;
425
+ ios?: Record<string, any>;
426
+ android?: Record<string, any>;
427
+ web?: Record<string, any>;
428
+ }
429
+ export interface IconProps {
430
+ className?: any;
431
+ id?: string;
432
+ name: string;
433
+ size?: number;
434
+ color?: string;
435
+ ios?: Record<string, any>;
436
+ android?: Record<string, any>;
437
+ web?: Record<string, any>;
438
+ }
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. */
444
+ export interface IconGlyph {
445
+ svg?: string;
446
+ markup?: string;
447
+ viewBox?: string;
448
+ text?: string;
449
+ font?: {
450
+ family: string;
451
+ glyph: string;
452
+ };
453
+ src?: string;
454
+ }
455
+ export interface HeadingProps {
456
+ className?: any;
457
+ style?: any;
458
+ children?: any;
459
+ id?: string;
460
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
461
+ ios?: Record<string, any>;
462
+ android?: Record<string, any>;
463
+ web?: Record<string, any>;
96
464
  }
97
465
  export interface PlatformBadgeProps {
98
466
  className?: any;
99
467
  }
468
+ export interface OverlayProps {
469
+ open?: boolean;
470
+ onDismiss?: () => void;
471
+ /** Enables a RootLayout shade that dismisses when tapped. */
472
+ shadeCover?: boolean;
473
+ className?: any;
474
+ style?: any;
475
+ children?: any;
476
+ ios?: Record<string, any>;
477
+ android?: Record<string, any>;
478
+ web?: Record<string, any>;
479
+ }
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
+ }
485
+ export interface PopoverProps {
486
+ /** Ref to a native view or web element, commonly populated by `bind`. */
487
+ anchor: PopoverAnchorRef;
488
+ open?: boolean;
489
+ placement?: PopoverPlacement;
490
+ dismissOnOutsideTap?: boolean;
491
+ onDismiss?: () => void;
492
+ className?: any;
493
+ style?: any;
494
+ children?: any;
495
+ ios?: Record<string, any>;
496
+ android?: Record<string, any>;
497
+ web?: Record<string, any>;
498
+ }
499
+ export type ToastContent = string | (() => any);
500
+ export type ToastPosition = 'top' | 'bottom';
501
+ export interface ToastOptions {
502
+ duration?: number;
503
+ position?: ToastPosition;
504
+ ios?: Record<string, any>;
505
+ android?: Record<string, any>;
506
+ web?: Record<string, any>;
507
+ }
100
508
  export interface ModalProps {
101
509
  open?: boolean;
102
- onClose?: () => void;
510
+ onClose?: (result?: ModalOpenResult) => void;
511
+ fullscreen?: boolean;
512
+ /** Native: sheet uses fullscreen=false (iOS form sheet; Android centered
513
+ * dialog), fullscreen uses fullscreen=true. Web: dialog is a centered
514
+ * card, sheet is bottom-anchored, fullscreen is the default dialog size. */
515
+ presentation?: 'sheet' | 'fullscreen' | 'dialog';
516
+ /** Component reference rendered inside the modal's separate root. When
517
+ * both component and children are set, component takes precedence. */
518
+ component?: any;
519
+ /** Props passed to component. Context and theme do not cross modal roots. */
520
+ params?: any;
521
+ children?: any;
522
+ }
523
+ /** Options for `openModal`. `fullscreen` is retained for callers using the
524
+ * NativeScript option directly; `presentation` takes precedence when set.
525
+ * Android's non-fullscreen modal is a centered dialog, not a bottom sheet. */
526
+ export interface ModalOpenOptions {
527
+ presentation?: 'sheet' | 'fullscreen' | 'dialog';
103
528
  fullscreen?: boolean;
529
+ animated?: boolean;
530
+ }
531
+ /** Value supplied to a modal close callback and returned by `openModal`. */
532
+ export type ModalOpenResult = unknown;
533
+ /** Public function shape of the imperative modal service. */
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;
104
548
  children?: any;
549
+ ios?: Record<string, any>;
550
+ android?: Record<string, any>;
551
+ web?: Record<string, any>;
105
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>;
106
561
  export interface TabSpec {
107
562
  title: string;
108
563
  render: () => any;
@@ -126,6 +581,88 @@ export interface Route {
126
581
  stack: string;
127
582
  name: string;
128
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;
622
+ }
623
+ /** name → screen component table for `registerScreens` — the app owns the
624
+ * route table; native `pushRoute` resolves `route.name` through it and
625
+ * web outlets fall back to it via `screenFor`. Values are component
626
+ * functions (`() => Element` / UniversalComponent shapes both fit). */
627
+ export type ScreenTable = Record<string, any>;
628
+ /** One route file's entry in the derived manifest. `name` is the file
629
+ * path under the route dir with `[param]` segments normalized to
630
+ * `:param` (`app/demo/[id].tsrx` → `demo/:id`); `segments` is the URL
631
+ * pattern used for web path matching/substitution. */
632
+ export interface RouteMeta {
633
+ name: string;
634
+ segments: string[];
635
+ params: string[];
636
+ /** Source file (glob key) — diagnostics only. */
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;
651
+ }
652
+ /** Output of `deriveRouteManifest` — `screens` feeds `registerScreens`
653
+ * (native pushRoute + web outlet fallback), `routes` feeds web URL
654
+ * matching, `layouts` catalogs `_layout` files by directory ('' = root). */
655
+ export interface RouteManifest {
656
+ screens: ScreenTable;
657
+ routes: RouteMeta[];
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;
129
666
  }
130
667
  export interface AnimatedValue {
131
668
  readonly value: number;
@@ -140,3 +677,11 @@ export interface AnimatedValue {
140
677
  stop(): void;
141
678
  }
142
679
  export type ColorScheme = 'light' | 'dark';
680
+ /** Minimal external-store contract `useStore` subscribes to. */
681
+ export interface ReadableStore<T> {
682
+ get(): T;
683
+ subscribe(notify: () => void): () => void;
684
+ }
685
+ export interface Store<T> extends ReadableStore<T> {
686
+ set(next: T | ((prev: T) => T)): void;
687
+ }