@octane-xplat/ui 0.4.0 → 0.6.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 +3 -0
- package/dist/native/Absolute.native.tsrx.js +43 -0
- package/dist/native/Accordion.native.tsrx.js +75 -0
- package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
- package/dist/native/Alert.native.tsrx.js +74 -0
- package/dist/native/Avatar.native.tsrx.js +76 -0
- package/dist/native/AvatarGroup.native.tsrx.js +84 -0
- package/dist/native/Badge.native.tsrx.js +29 -0
- package/dist/native/Banner.native.tsrx.js +80 -0
- package/dist/native/Breadcrumb.native.tsrx.js +66 -0
- package/dist/native/Button.native.tsrx.js +62 -0
- package/dist/native/CameraView.native.tsrx.js +165 -0
- package/dist/native/Card.native.tsrx.js +64 -0
- package/dist/native/Checkbox.native.tsrx.js +58 -0
- package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
- package/dist/native/Chip.native.tsrx.js +83 -0
- package/dist/native/Collapsible.native.tsrx.js +74 -0
- package/dist/native/CommandPalette.native.tsrx.js +143 -0
- package/dist/native/ContextMenu.native.tsrx.js +140 -0
- package/dist/native/Drawer.native.tsrx.js +60 -0
- package/dist/native/DropdownMenu.native.tsrx.js +155 -0
- package/dist/native/Empty.native.tsrx.js +82 -0
- package/dist/native/FieldGroup.native.tsrx.js +39 -0
- package/dist/native/FormField.native.tsrx.js +53 -0
- package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
- package/dist/native/{ui56.js → Heading.native.tsrx.js} +2 -2
- package/dist/native/{ui55.js → Icon.native.tsrx.js} +4 -4
- package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
- package/dist/native/InputNumber.native.tsrx.js +146 -0
- package/dist/native/InputRating.native.tsrx.js +74 -0
- package/dist/native/InputTags.native.tsrx.js +131 -0
- package/dist/native/Kbd.native.tsrx.js +29 -0
- package/dist/native/{ui48.js → KeyboardAvoiding.native.tsrx.js} +1 -1
- package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
- package/dist/native/{ui52.js → Meter.native.tsrx.js} +2 -2
- package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
- package/dist/native/NavigationMenu.native.tsrx.js +67 -0
- package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
- package/dist/native/Pager.native.tsrx.js +282 -0
- package/dist/native/Pagination.native.tsrx.js +107 -0
- package/dist/native/PinInput.native.tsrx.js +94 -0
- package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
- package/dist/native/{ui16.js → Pressable.native.tsrx.js} +21 -15
- package/dist/native/ProgressGroup.native.tsrx.js +66 -0
- package/dist/native/RadioGroup.native.tsrx.js +85 -0
- package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
- package/dist/native/Row.native.tsrx.js +98 -0
- package/dist/native/{ui47.js → SafeArea.native.tsrx.js} +2 -2
- package/dist/native/{ui43.js → Screen.native.tsrx.js} +3 -3
- package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
- package/dist/native/ScrollView.native.tsrx.js +233 -0
- package/dist/native/SearchInput.native.tsrx.js +151 -0
- package/dist/native/SegmentedControl.native.tsrx.js +75 -0
- package/dist/native/Select.native.tsrx.js +202 -0
- package/dist/native/Separator.native.tsrx.js +25 -0
- package/dist/native/{ui60.js → Sheet.native.tsrx.js} +15 -7
- package/dist/native/Skeleton.native.tsrx.js +28 -0
- package/dist/native/Slider.native.tsrx.js +98 -0
- package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
- package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
- package/dist/native/Stepper.native.tsrx.js +75 -0
- package/dist/native/Switch.native.tsrx.js +33 -0
- package/dist/native/Table.native.tsrx.js +103 -0
- package/dist/native/Tabs.native.tsrx.js +163 -0
- package/dist/native/{ui14.js → Text.native.tsrx.js} +19 -3
- package/dist/native/{ui24.js → TextArea.native.tsrx.js} +19 -17
- package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
- package/dist/native/Timeline.native.tsrx.js +112 -0
- package/dist/native/Tree.native.tsrx.js +140 -0
- package/dist/native/User.native.tsrx.js +95 -0
- package/dist/native/Video.native.tsrx.js +248 -0
- package/dist/native/{ui6.js → View.native.tsrx.js} +39 -25
- package/dist/native/WebView.native.tsrx.js +110 -0
- package/dist/native/aliases.native.tsrx.js +38 -0
- package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
- package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
- package/dist/native/{ui49.js → android/DrawerLayout.android.tsrx.js} +5 -7
- package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
- package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
- package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
- package/dist/native/android/SeekBar.android.tsrx.js +34 -0
- package/dist/native/android/index.js +9 -0
- package/dist/native/android/openModal.android.js +39 -0
- package/dist/native/camera-permission.native.js +47 -0
- package/dist/native/child-array.js +15 -0
- package/dist/native/{ui3.js → escape-props.native.js} +22 -1
- package/dist/native/icons.js +25 -0
- package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
- package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
- package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
- package/dist/native/{ui50.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
- package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
- package/dist/native/{ui53.js → ios/UISlider.ios.tsrx.js} +5 -5
- package/dist/native/{ui45.js → ios/UISwitch.ios.tsrx.js} +5 -5
- package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
- package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
- package/dist/native/ios/index.js +11 -0
- package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
- package/dist/native/modal-presenter.native.js +19 -0
- package/dist/native/native/index.js +4 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/pan.native.tsrx.js +66 -0
- package/dist/native/platform.native.js +10 -0
- package/dist/native/refresh-metrics.js +9 -0
- package/dist/native/refresh.native.js +177 -0
- package/dist/native/{ui34.js → root-layout.native.js} +6 -1
- package/dist/native/{ui21.js → route.native.js} +96 -12
- package/dist/native/sheet-detents.native.js +102 -0
- package/dist/native/{ui61.js → sheet-service.native.js} +19 -9
- package/dist/native/sheet-snap.js +35 -0
- package/dist/native/text-write.native.js +27 -0
- package/dist/native/theme/status-bar-scheme.native.js +17 -0
- package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
- package/dist/native/toast-anchor.native.tsrx.js +185 -0
- package/dist/native/translate.native.js +11 -0
- package/dist/native/ui.js +93 -52
- package/dist/native/use-back.native.tsrx.js +9 -0
- package/dist/native/useMeasure.native.tsrx.js +64 -0
- package/dist/native/video-chrome.native.tsrx.js +365 -0
- package/dist/web/Absolute.web.tsrx.js +47 -0
- package/dist/web/Accordion.web.tsrx.js +85 -0
- package/dist/web/{ui46.js → ActivityIndicator.web.tsrx.js} +1 -1
- package/dist/web/Alert.web.tsrx.js +79 -0
- package/dist/web/Avatar.web.tsrx.js +106 -0
- package/dist/web/AvatarGroup.web.tsrx.js +108 -0
- package/dist/web/Badge.web.tsrx.js +37 -0
- package/dist/web/Banner.web.tsrx.js +79 -0
- package/dist/web/Breadcrumb.web.tsrx.js +135 -0
- package/dist/web/Button.web.tsrx.js +45 -0
- package/dist/web/CameraView.web.tsrx.js +310 -0
- package/dist/web/Card.web.tsrx.js +73 -0
- package/dist/web/Checkbox.web.tsrx.js +89 -0
- package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
- package/dist/web/Chip.web.tsrx.js +64 -0
- package/dist/web/Collapsible.web.tsrx.js +94 -0
- package/dist/web/CommandPalette.web.tsrx.js +125 -0
- package/dist/web/ContextMenu.web.tsrx.js +154 -0
- package/dist/web/{ui44.js → Drawer.web.tsrx.js} +13 -9
- package/dist/web/DropdownMenu.web.tsrx.js +162 -0
- package/dist/web/Empty.web.tsrx.js +89 -0
- package/dist/web/FieldGroup.web.tsrx.js +57 -0
- package/dist/web/FormField.web.tsrx.js +92 -0
- package/dist/web/Grid.web.tsrx.js +65 -0
- package/dist/web/{ui52.js → Heading.web.tsrx.js} +2 -2
- package/dist/web/Icon.web.tsrx.js +273 -0
- package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
- package/dist/web/InputNumber.web.tsrx.js +99 -0
- package/dist/web/InputRating.web.tsrx.js +72 -0
- package/dist/web/InputTags.web.tsrx.js +122 -0
- package/dist/web/Kbd.web.tsrx.js +37 -0
- package/dist/web/{ui48.js → Meter.web.tsrx.js} +1 -1
- package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
- package/dist/web/NavigationMenu.web.tsrx.js +118 -0
- package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
- package/dist/web/Pager.web.tsrx.js +337 -0
- package/dist/web/Pagination.web.tsrx.js +80 -0
- package/dist/web/PinInput.web.tsrx.js +72 -0
- package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
- package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
- package/dist/web/ProgressGroup.web.tsrx.js +109 -0
- package/dist/web/RadioGroup.web.tsrx.js +69 -0
- package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
- package/dist/web/Row.web.tsrx.js +250 -0
- package/dist/web/{ui42.js → SafeArea.web.tsrx.js} +1 -1
- package/dist/web/{ui38.js → Screen.web.tsrx.js} +1 -1
- package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
- package/dist/web/ScrollView.web.tsrx.js +388 -0
- package/dist/web/SearchInput.web.tsrx.js +137 -0
- package/dist/web/SegmentedControl.web.tsrx.js +75 -0
- package/dist/web/Select.web.tsrx.js +149 -0
- package/dist/web/Separator.web.tsrx.js +42 -0
- package/dist/web/Sheet.web.tsrx.js +81 -0
- package/dist/web/Skeleton.web.tsrx.js +56 -0
- package/dist/web/Slider.web.tsrx.js +97 -0
- package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
- package/dist/web/Stack.web.tsrx.js +47 -0
- package/dist/web/Stepper.web.tsrx.js +65 -0
- package/dist/web/Switch.web.tsrx.js +59 -0
- package/dist/web/Table.web.tsrx.js +161 -0
- package/dist/web/{ui39.js → Tabs.web.tsrx.js} +33 -16
- package/dist/web/{ui13.js → Text.web.tsrx.js} +79 -46
- package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
- package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
- package/dist/web/Timeline.web.tsrx.js +172 -0
- package/dist/web/Tree.web.tsrx.js +146 -0
- package/dist/web/User.web.tsrx.js +116 -0
- package/dist/web/Video.web.tsrx.js +400 -0
- package/dist/web/View.web.tsrx.js +250 -0
- package/dist/web/WebView.web.tsrx.js +235 -0
- package/dist/web/aliases.web.tsrx.js +24 -0
- package/dist/web/{ui35.js → anim.web.tsrx.js} +3 -2
- package/dist/web/child-array.js +15 -0
- package/dist/web/icons.js +25 -0
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/pan.web.tsrx.js +66 -0
- package/dist/web/platform.web.js +9 -0
- package/dist/web/refresh-metrics.js +9 -0
- package/dist/web/refresh.web.js +133 -0
- package/dist/web/{ui18.js → route.web.js} +14 -2
- package/dist/web/sheet-detents.web.js +103 -0
- package/dist/web/{ui58.js → sheet-service.web.js} +5 -1
- package/dist/web/sheet-snap.js +35 -0
- package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
- package/dist/web/toast-anchor.web.tsrx.js +142 -0
- package/dist/web/transform.web.js +43 -0
- package/dist/web/translate.web.js +13 -0
- package/dist/web/ui.js +91 -51
- package/dist/web/use-back.web.tsrx.js +9 -0
- package/dist/web/useMeasure.web.tsrx.js +50 -0
- package/dist/web/video-chrome.web.tsrx.js +207 -0
- package/dist/web/web/Hoverable.web.tsrx.js +150 -0
- package/dist/web/web/Tooltip.web.tsrx.js +183 -0
- package/dist/web/web/index.js +3 -0
- package/package.json +34 -3
- package/src/theme/tokens.css +1599 -194
- package/types/android.d.ts +53 -0
- package/types/index.d.ts +39 -14
- package/types/index.native.d.ts +273 -0
- package/types/index.web.d.ts +272 -0
- package/types/ios.d.ts +59 -0
- package/types/native.d.ts +5 -0
- package/types/props.d.ts +989 -44
- package/types/web.d.ts +17 -0
- package/dist/native/ui10.js +0 -32
- package/dist/native/ui25.js +0 -141
- package/dist/native/ui27.js +0 -61
- package/dist/native/ui39.js +0 -105
- package/dist/native/ui4.js +0 -24
- package/dist/native/ui44.js +0 -267
- package/dist/native/ui54.js +0 -17
- package/dist/native/ui57.js +0 -14
- package/dist/native/ui7.js +0 -52
- package/dist/web/ui10.js +0 -46
- package/dist/web/ui11.js +0 -42
- package/dist/web/ui22.js +0 -108
- package/dist/web/ui23.js +0 -96
- package/dist/web/ui26.js +0 -45
- package/dist/web/ui3.js +0 -31
- package/dist/web/ui30.js +0 -34
- package/dist/web/ui34.js +0 -70
- package/dist/web/ui40.js +0 -43
- package/dist/web/ui43.js +0 -42
- package/dist/web/ui49.js +0 -47
- package/dist/web/ui5.js +0 -168
- package/dist/web/ui50.js +0 -17
- package/dist/web/ui51.js +0 -149
- package/dist/web/ui53.js +0 -17
- package/dist/web/ui57.js +0 -44
- package/dist/web/ui6.js +0 -94
- package/dist/web/ui7.js +0 -62
- package/dist/web/ui8.js +0 -46
- package/dist/web/ui9.js +0 -46
- /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
- /package/dist/native/{ui40.js → anim.native.tsrx.js} +0 -0
- /package/dist/native/{ui2.js → cx.js} +0 -0
- /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
- /package/dist/native/{ui51.js → meter-math.js} +0 -0
- /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
- /package/dist/native/{ui37.js → popover-position.js} +0 -0
- /package/dist/native/{ui19.js → route-table.js} +0 -0
- /package/dist/native/{ui46.js → safeAreaInsets.native.tsrx.js} +0 -0
- /package/dist/native/{ui18.js → stacks.native.js} +0 -0
- /package/dist/native/{ui58.js → store.js} +0 -0
- /package/dist/native/{ui41.js → styled.native.tsrx.js} +0 -0
- /package/dist/native/{ui28.js → svg.native.js} +0 -0
- /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
- /package/dist/native/{ui59.js → use-store.native.tsrx.js} +0 -0
- /package/dist/native/{ui42.js → windows.native.js} +0 -0
- /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
- /package/dist/web/{ui28.js → cx.js} +0 -0
- /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
- /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
- /package/dist/web/{ui47.js → meter-math.js} +0 -0
- /package/dist/web/{ui45.js → platformProps.web.js} +0 -0
- /package/dist/web/{ui32.js → popover-position.js} +0 -0
- /package/dist/web/{ui17.js → route-table.js} +0 -0
- /package/dist/web/{ui41.js → safeAreaInsets.web.tsrx.js} +0 -0
- /package/dist/web/{ui54.js → stacks.web.js} +0 -0
- /package/dist/web/{ui55.js → store.js} +0 -0
- /package/dist/web/{ui36.js → styled.web.tsrx.js} +0 -0
- /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
- /package/dist/web/{ui56.js → use-store.web.tsrx.js} +0 -0
- /package/dist/web/{ui37.js → windows.web.js} +0 -0
package/types/props.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export interface PanEvent {
|
|
|
17
17
|
export interface SwipeEvent {
|
|
18
18
|
direction: number;
|
|
19
19
|
}
|
|
20
|
+
/** Public shape of `setTranslate` — the imperative translate write on a
|
|
21
|
+
* bound view (a leaf's `bind` target). Web composes into the element's
|
|
22
|
+
* `transform`; native sets the view's translateX/translateY props.
|
|
23
|
+
* Both axes default to 0, so `setTranslate(el)` resets. */
|
|
24
|
+
export type SetTranslate = (el: any, x?: number, y?: number) => void;
|
|
20
25
|
/** Metadata read by parent layouts. Native forwards NativeScript attached
|
|
21
26
|
* attributes; web folds the CSS equivalents into the child's style. */
|
|
22
27
|
export interface LayoutChildProps {
|
|
@@ -59,27 +64,18 @@ export interface GlassConfig {
|
|
|
59
64
|
/** Effect-change animation in ms (default 300). */
|
|
60
65
|
animateChangeDuration?: number;
|
|
61
66
|
}
|
|
62
|
-
|
|
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 {
|
|
67
|
+
export interface GridProps extends AccessibilityProps {
|
|
71
68
|
className?: any;
|
|
72
69
|
style?: any;
|
|
73
70
|
children?: any;
|
|
74
71
|
rows?: string;
|
|
75
72
|
columns?: string;
|
|
76
|
-
gap?: number | string;
|
|
77
73
|
ios?: Record<string, any>;
|
|
78
74
|
android?: Record<string, any>;
|
|
79
75
|
web?: Record<string, any>;
|
|
80
76
|
id?: string;
|
|
81
77
|
}
|
|
82
|
-
export interface StackProps extends
|
|
78
|
+
export interface StackProps extends AccessibilityProps {
|
|
83
79
|
className?: any;
|
|
84
80
|
style?: any;
|
|
85
81
|
children?: any;
|
|
@@ -88,7 +84,7 @@ export interface StackProps extends GlassSurfaceProps {
|
|
|
88
84
|
web?: Record<string, any>;
|
|
89
85
|
id?: string;
|
|
90
86
|
}
|
|
91
|
-
export interface AbsoluteProps extends
|
|
87
|
+
export interface AbsoluteProps extends AccessibilityProps {
|
|
92
88
|
className?: any;
|
|
93
89
|
style?: any;
|
|
94
90
|
children?: any;
|
|
@@ -135,7 +131,23 @@ export interface SpacerProps {
|
|
|
135
131
|
web?: Record<string, any>;
|
|
136
132
|
id?: string;
|
|
137
133
|
}
|
|
138
|
-
|
|
134
|
+
/** The shared accessibility prop set — `Role` and friends are declared
|
|
135
|
+
* below; containers and leaf components carry the same names so ARIA on
|
|
136
|
+
* web and NativeScript's accessibility properties stay aligned. */
|
|
137
|
+
export interface AccessibilityProps {
|
|
138
|
+
accessible?: boolean;
|
|
139
|
+
accessibilityLabel?: string;
|
|
140
|
+
accessibilityRole?: Role;
|
|
141
|
+
accessibilityHint?: string;
|
|
142
|
+
accessibilityValue?: string;
|
|
143
|
+
accessibilityState?: {
|
|
144
|
+
disabled?: boolean;
|
|
145
|
+
selected?: boolean;
|
|
146
|
+
checked?: boolean;
|
|
147
|
+
};
|
|
148
|
+
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
|
|
149
|
+
}
|
|
150
|
+
export interface ViewProps extends LayoutChildProps, FlexContainerProps, AccessibilityProps {
|
|
139
151
|
className?: any;
|
|
140
152
|
style?: any;
|
|
141
153
|
children?: any;
|
|
@@ -150,34 +162,40 @@ export interface ViewProps extends LayoutChildProps, FlexContainerProps, GlassSu
|
|
|
150
162
|
android?: any;
|
|
151
163
|
web?: any;
|
|
152
164
|
}
|
|
153
|
-
export interface RowProps extends LayoutChildProps, FlexContainerProps,
|
|
165
|
+
export interface RowProps extends LayoutChildProps, FlexContainerProps, AccessibilityProps {
|
|
154
166
|
className?: any;
|
|
155
167
|
style?: any;
|
|
156
168
|
children?: any;
|
|
157
169
|
id?: string;
|
|
170
|
+
/** `ref` is runtime-reserved on component elements — leaves expose
|
|
171
|
+
* `bind` to reach the native/DOM node. */
|
|
172
|
+
bind?: (el: any) => void;
|
|
173
|
+
onPan?: (e: PanEvent) => void;
|
|
174
|
+
onSwipe?: (e: SwipeEvent) => void;
|
|
158
175
|
/** Platform-specific properties are applied after shared props. */
|
|
159
176
|
ios?: any;
|
|
160
177
|
android?: any;
|
|
161
178
|
web?: any;
|
|
162
179
|
}
|
|
180
|
+
/** Shared accessibility roles. The native leaf maps the ARIA spellings that
|
|
181
|
+
* NativeScript names differently (for example `heading` → `header`). */
|
|
182
|
+
export type Role = 'button' | 'link' | 'search' | 'image' | 'heading' | 'adjustable' | 'summary' | 'text' | 'none' | 'progressbar' | 'checkbox' | 'switch' | 'radio' | 'spinbutton' | 'tab';
|
|
163
183
|
export interface TextProps extends LayoutChildProps {
|
|
164
184
|
className?: any;
|
|
165
185
|
style?: any;
|
|
166
186
|
children?: any;
|
|
167
187
|
id?: string;
|
|
168
188
|
numberOfLines?: number;
|
|
169
|
-
/** Native Label does not expose text selection; implemented with CSS on web. */
|
|
170
|
-
selectable?: boolean;
|
|
171
189
|
ellipsize?: boolean;
|
|
190
|
+
accessible?: boolean;
|
|
191
|
+
accessibilityLabel?: string;
|
|
192
|
+
accessibilityRole?: Role;
|
|
172
193
|
accessibilityHint?: string;
|
|
173
194
|
accessibilityValue?: string;
|
|
174
|
-
/** NativeScript supports one state at a time (disabled/selected/checked); busy and expanded are web-only. */
|
|
175
195
|
accessibilityState?: {
|
|
176
196
|
disabled?: boolean;
|
|
177
197
|
selected?: boolean;
|
|
178
198
|
checked?: boolean;
|
|
179
|
-
busy?: boolean;
|
|
180
|
-
expanded?: boolean;
|
|
181
199
|
};
|
|
182
200
|
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
|
|
183
201
|
/** Platform-specific properties are applied after shared props. */
|
|
@@ -210,33 +228,33 @@ export interface RichTextSpanProps {
|
|
|
210
228
|
android?: any;
|
|
211
229
|
web?: any;
|
|
212
230
|
}
|
|
213
|
-
export interface PressableProps extends LayoutChildProps, FlexContainerProps
|
|
231
|
+
export interface PressableProps extends LayoutChildProps, FlexContainerProps {
|
|
214
232
|
className?: any;
|
|
215
233
|
style?: any;
|
|
216
234
|
children?: any;
|
|
217
235
|
id?: string;
|
|
218
236
|
disabled?: boolean;
|
|
237
|
+
/** `ref` is runtime-reserved on component elements — leaves expose
|
|
238
|
+
* `bind` to reach the native/DOM node. */
|
|
239
|
+
bind?: (el: any) => void;
|
|
240
|
+
onPan?: (e: PanEvent) => void;
|
|
241
|
+
onSwipe?: (e: SwipeEvent) => void;
|
|
219
242
|
onPress?: () => void;
|
|
220
243
|
/** ~500ms press-and-hold (web: timer over pointerdown/up). */
|
|
221
244
|
onLongPress?: () => void;
|
|
222
245
|
accessible?: boolean;
|
|
223
246
|
accessibilityLabel?: string;
|
|
224
|
-
accessibilityRole?:
|
|
247
|
+
accessibilityRole?: Role;
|
|
225
248
|
onPressIn?: () => void;
|
|
226
249
|
onPressOut?: () => void;
|
|
227
250
|
onDoublePress?: () => void;
|
|
228
251
|
hitSlop?: number;
|
|
229
|
-
/** NativeScript supports a per-view TouchManager animation opt-out; web has no press scaling. */
|
|
230
|
-
ignoreTouchAnimation?: boolean;
|
|
231
252
|
accessibilityHint?: string;
|
|
232
253
|
accessibilityValue?: string;
|
|
233
|
-
/** NativeScript supports one state at a time (disabled/selected/checked); busy and expanded are web-only. */
|
|
234
254
|
accessibilityState?: {
|
|
235
255
|
disabled?: boolean;
|
|
236
256
|
selected?: boolean;
|
|
237
257
|
checked?: boolean;
|
|
238
|
-
busy?: boolean;
|
|
239
|
-
expanded?: boolean;
|
|
240
258
|
};
|
|
241
259
|
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
|
|
242
260
|
/** Platform-specific properties are applied after shared props. */
|
|
@@ -255,8 +273,6 @@ export interface TextInputProps {
|
|
|
255
273
|
id?: string;
|
|
256
274
|
value?: string;
|
|
257
275
|
placeholder?: string;
|
|
258
|
-
/** NativeScript's term for placeholder — web maps hint → placeholder. */
|
|
259
|
-
hint?: string;
|
|
260
276
|
onChange?: (value: string) => void;
|
|
261
277
|
bind?: (h: TextInputHandle) => void;
|
|
262
278
|
secure?: boolean;
|
|
@@ -273,6 +289,9 @@ export interface TextInputProps {
|
|
|
273
289
|
web?: any;
|
|
274
290
|
}
|
|
275
291
|
export interface TextAreaProps extends TextInputProps {
|
|
292
|
+
/** Submit on native only when `returnKeyType` is `done` or `send`; other
|
|
293
|
+
* returns insert newlines because TextView emits returnPress per newline.
|
|
294
|
+
* Web submits on Cmd/Ctrl+Enter. */
|
|
276
295
|
/** Height in text rows. Web: the `rows` attr (fixed box); native:
|
|
277
296
|
* minHeight at the widget's measured line height. With `autoGrow` it
|
|
278
297
|
* becomes the starting height instead of a fixed one. */
|
|
@@ -286,17 +305,64 @@ export interface TextAreaProps extends TextInputProps {
|
|
|
286
305
|
* sets truncation on iOS — not a cap). */
|
|
287
306
|
maxRows?: number;
|
|
288
307
|
}
|
|
289
|
-
|
|
308
|
+
/** Chrome-reset search field — TextInput with a leading glyph and a clear
|
|
309
|
+
* affordance, normalized: the web leaf is `<input type="search">` with the
|
|
310
|
+
* engine's own clear button hidden (the leaf draws the same one native
|
|
311
|
+
* gets), the native leaf is a styled TextField with `returnKeyType`
|
|
312
|
+
* `'search'`. Not UISearchBar — OS search chrome is deliberately absent. */
|
|
313
|
+
export interface SearchInputProps {
|
|
314
|
+
className?: any;
|
|
315
|
+
style?: any;
|
|
316
|
+
id?: string;
|
|
317
|
+
/** Controlled text — pair with `onChange`. */
|
|
318
|
+
value?: string;
|
|
319
|
+
/** Initial text for uncontrolled use. */
|
|
320
|
+
defaultValue?: string;
|
|
321
|
+
onChange?: (value: string) => void;
|
|
322
|
+
/** Enter on web, the keyboard's `search` return key on native. */
|
|
323
|
+
onSubmit?: () => void;
|
|
324
|
+
/** The clear button tapped — fires after `onChange('')`. */
|
|
325
|
+
onClear?: () => void;
|
|
326
|
+
onFocus?: () => void;
|
|
327
|
+
onBlur?: () => void;
|
|
328
|
+
placeholder?: string;
|
|
329
|
+
editable?: boolean;
|
|
330
|
+
/** Leading glyph — a registered icon name. Defaults to the built-in
|
|
331
|
+
* `'xplat-search'` glyph; `false` renders no glyph. */
|
|
332
|
+
icon?: string | false;
|
|
333
|
+
bind?: (h: TextInputHandle) => void;
|
|
334
|
+
accessibilityLabel?: string;
|
|
335
|
+
/** Platform-specific properties are applied after shared props. */
|
|
336
|
+
ios?: any;
|
|
337
|
+
android?: any;
|
|
338
|
+
web?: any;
|
|
339
|
+
}
|
|
340
|
+
/** Pull-to-refresh contract — shared by `ScrollView` and the platform
|
|
341
|
+
* lists (`UITableView`/`RecyclerView`). The indicator is self-drawn (the
|
|
342
|
+
* `vx-spinner` ring), not the OS spinner, so the affordance is the same
|
|
343
|
+
* pixels on every target. The pull gesture is enabled by `onRefresh`;
|
|
344
|
+
* `refreshing` is controlled — set it true while reloading to keep the
|
|
345
|
+
* indicator docked, false to collapse it. */
|
|
346
|
+
export interface RefreshProps {
|
|
347
|
+
/** True while a refresh is in flight — docks the indicator strip above
|
|
348
|
+
* the content. Read-only after the initial pull: the app owns it. */
|
|
349
|
+
refreshing?: boolean;
|
|
350
|
+
/** Enables the pull gesture; fires when the user pulls past
|
|
351
|
+
* `refreshThreshold` and releases. */
|
|
352
|
+
onRefresh?: () => void;
|
|
353
|
+
/** Pull distance past the top edge (px on web, dip on native) whose
|
|
354
|
+
* release fires `onRefresh`. Defaults to the indicator strip height
|
|
355
|
+
* (64). */
|
|
356
|
+
refreshThreshold?: number;
|
|
357
|
+
}
|
|
358
|
+
export interface ListProps extends RefreshProps {
|
|
290
359
|
className?: any;
|
|
291
360
|
style?: any;
|
|
292
361
|
id?: string;
|
|
293
362
|
items: any[];
|
|
294
363
|
renderItem: (item: any, index: number) => any;
|
|
295
364
|
renderEmpty?: () => any;
|
|
296
|
-
/**
|
|
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. */
|
|
365
|
+
/** iOS row-height estimate (UITableView only). */
|
|
300
366
|
estimatedItemHeight?: number;
|
|
301
367
|
/** Called when the list approaches its end. */
|
|
302
368
|
onEndReached?: () => void;
|
|
@@ -305,7 +371,33 @@ export interface ListProps {
|
|
|
305
371
|
android?: Record<string, any>;
|
|
306
372
|
web?: Record<string, any>;
|
|
307
373
|
}
|
|
308
|
-
|
|
374
|
+
/** Paged horizontal swipe container — onboarding flows, media galleries.
|
|
375
|
+
* Chrome-reset OS paging on native (ViewPager2 / UICollectionView paging via
|
|
376
|
+
* @nativescript-community/ui-pager), a scroll-snap scroller on web. Follows
|
|
377
|
+
* the platform-list contract: `items` + `renderItem`, no children — each
|
|
378
|
+
* page is a full-host-size cell. No indicator is built in; compose dots
|
|
379
|
+
* from `Row` + `View` driven by `page`/`onPageChange`. */
|
|
380
|
+
export interface PagerProps extends LayoutChildProps, AccessibilityProps {
|
|
381
|
+
className?: any;
|
|
382
|
+
style?: any;
|
|
383
|
+
id?: string;
|
|
384
|
+
items: any[];
|
|
385
|
+
renderItem: (item: any, index: number) => any;
|
|
386
|
+
renderEmpty?: () => any;
|
|
387
|
+
/** Controlled page index — pass with `onPageChange` to own the page.
|
|
388
|
+
* Writes scroll/settle to the page; user swipes call `onPageChange`. */
|
|
389
|
+
page?: number;
|
|
390
|
+
/** Starting page for uncontrolled use (default 0). */
|
|
391
|
+
defaultPage?: number;
|
|
392
|
+
/** Fires when the settled page changes — a completed swipe on both
|
|
393
|
+
* targets. Programmatic `page` writes do not echo back through it. */
|
|
394
|
+
onPageChange?: (index: number) => void;
|
|
395
|
+
/** Platform escape hatches, applied after the shared props. */
|
|
396
|
+
ios?: Record<string, any>;
|
|
397
|
+
android?: Record<string, any>;
|
|
398
|
+
web?: Record<string, any>;
|
|
399
|
+
}
|
|
400
|
+
export interface ScrollViewProps extends LayoutChildProps, AccessibilityProps, RefreshProps {
|
|
309
401
|
className?: any;
|
|
310
402
|
style?: any;
|
|
311
403
|
id?: string;
|
|
@@ -319,7 +411,7 @@ export interface ScrollViewProps extends LayoutChildProps, GlassSurfaceProps {
|
|
|
319
411
|
/** Scrollable ordinary content on web. Native is an inline flex container so
|
|
320
412
|
* a child ListView can own the scrolling without nesting recycling views in a
|
|
321
413
|
* native ScrollView. */
|
|
322
|
-
export interface ScrollBoxProps extends LayoutChildProps,
|
|
414
|
+
export interface ScrollBoxProps extends LayoutChildProps, AccessibilityProps {
|
|
323
415
|
className?: any;
|
|
324
416
|
style?: any;
|
|
325
417
|
id?: string;
|
|
@@ -329,6 +421,70 @@ export interface ScrollBoxProps extends LayoutChildProps, GlassSurfaceProps {
|
|
|
329
421
|
android?: any;
|
|
330
422
|
web?: any;
|
|
331
423
|
}
|
|
424
|
+
export interface WebViewHandle {
|
|
425
|
+
/** Re-request the current document. */
|
|
426
|
+
reload(): void;
|
|
427
|
+
/** Frame-local history navigation. */
|
|
428
|
+
goBack(): void;
|
|
429
|
+
goForward(): void;
|
|
430
|
+
stopLoading(): void;
|
|
431
|
+
/** The platform view (`HTMLIFrameElement` / NS `WebView`). */
|
|
432
|
+
native: any;
|
|
433
|
+
}
|
|
434
|
+
export interface WebViewLoadEvent {
|
|
435
|
+
/** The loaded document URL when the platform reports one — absent for
|
|
436
|
+
* `html` documents. */
|
|
437
|
+
url?: string;
|
|
438
|
+
/** Failure description; present only on the `onError` path. */
|
|
439
|
+
error?: string;
|
|
440
|
+
}
|
|
441
|
+
/** Embedded web document — chrome-reset bucket: web renders a sandboxed
|
|
442
|
+
* `<iframe>`, native renders the OS web view (`webview` → WKWebView /
|
|
443
|
+
* android.webkit.WebView). The *frame* is normalized; the document's
|
|
444
|
+
* pixels belong to each platform's engine, same as TextInput's IME.
|
|
445
|
+
* No JS bridge: iframe `postMessage`, WKScriptMessageHandler, and
|
|
446
|
+
* `addJavascriptInterface` have different page-side contracts, so a
|
|
447
|
+
* shared one would be fake parity — reach it through the escape bags. */
|
|
448
|
+
export interface WebViewProps extends LayoutChildProps, AccessibilityProps {
|
|
449
|
+
className?: any;
|
|
450
|
+
style?: any;
|
|
451
|
+
id?: string;
|
|
452
|
+
/** Remote document URL. Native also accepts `~/` bundle paths and
|
|
453
|
+
* absolute file paths (NS `src` grammar). */
|
|
454
|
+
src?: string;
|
|
455
|
+
/** Inline HTML document — web `srcdoc`; native loads it through the
|
|
456
|
+
* `src` property's data path (`loadHTMLString`/`loadDataWithBaseURL`).
|
|
457
|
+
* Takes precedence over `src` when both are set. Treated as trusted
|
|
458
|
+
* content — the default web sandbox keeps `allow-same-origin`, so a
|
|
459
|
+
* srcdoc document can reach the embedding page. */
|
|
460
|
+
html?: string;
|
|
461
|
+
/** After each successful document load (web `load`; native
|
|
462
|
+
* `loadFinished` without an error). */
|
|
463
|
+
onLoad?: (e: WebViewLoadEvent) => void;
|
|
464
|
+
/** On load failure. Native reports the NS `loadFinished` error string;
|
|
465
|
+
* web maps the iframe `error` event, which does not fire reliably
|
|
466
|
+
* cross-browser — treat as best-effort there. */
|
|
467
|
+
onError?: (e: WebViewLoadEvent) => void;
|
|
468
|
+
/** Default true. `false` freezes inner scrolling: web writes
|
|
469
|
+
* `scrolling="no"`, iOS clears the WKWebView scrollView's
|
|
470
|
+
* `scrollEnabled`, Android eats move touch events on the view (link
|
|
471
|
+
* taps still pass; drag text selection inside the frame is lost). */
|
|
472
|
+
scrollEnabled?: boolean;
|
|
473
|
+
/** Web only — the iframe `sandbox` token list. Defaults to
|
|
474
|
+
* `'allow-scripts allow-same-origin allow-forms allow-modals'`: the
|
|
475
|
+
* capabilities NS WebView content already has, while top navigation,
|
|
476
|
+
* popups, and downloads stay contained. Pass a token list to tighten,
|
|
477
|
+
* `false` for no sandbox attribute. Ignored on native — the OS web
|
|
478
|
+
* views are already isolated processes. */
|
|
479
|
+
sandbox?: string | false;
|
|
480
|
+
/** Imperative handle — reload/back/forward/stop plus `native` for
|
|
481
|
+
* anything the shared props don't cover. */
|
|
482
|
+
bind?: (h: WebViewHandle) => void;
|
|
483
|
+
/** Platform-specific properties are applied after shared props. */
|
|
484
|
+
ios?: any;
|
|
485
|
+
android?: any;
|
|
486
|
+
web?: any;
|
|
487
|
+
}
|
|
332
488
|
export interface ImageProps extends LayoutChildProps {
|
|
333
489
|
className?: any;
|
|
334
490
|
style?: any;
|
|
@@ -376,6 +532,8 @@ export interface DrawerProps {
|
|
|
376
532
|
main?: any;
|
|
377
533
|
drawer?: any;
|
|
378
534
|
open?: boolean;
|
|
535
|
+
/** Backdrop tap — the self-drawn leaf fires it on both platforms. */
|
|
536
|
+
onDismiss?: () => void;
|
|
379
537
|
ios?: Record<string, any>;
|
|
380
538
|
android?: Record<string, any>;
|
|
381
539
|
web?: Record<string, any>;
|
|
@@ -439,8 +597,11 @@ export interface IconProps {
|
|
|
439
597
|
/** One registered icon representation. `svg` contains path `d` data;
|
|
440
598
|
* `markup` is full inner-SVG markup (groups, transforms, several paths)
|
|
441
599
|
* rendered inside an `<svg viewBox>` shell on web and through `svgview`
|
|
442
|
-
* (ui-svg) on native. `font`, `src`, and `text` are
|
|
443
|
-
*
|
|
600
|
+
* (ui-svg) on native. `font`, `src`, and `text` are fallback
|
|
601
|
+
* representations, in that order after SVG. `src` may be a raster source or
|
|
602
|
+
* an SVG source; SVG is auto-detected for inline markup, SVG data URIs, and
|
|
603
|
+
* `.svg` paths/URLs. Opaque resource names need `markup`/`svg` when their
|
|
604
|
+
* format cannot be inferred from the string. */
|
|
444
605
|
export interface IconGlyph {
|
|
445
606
|
svg?: string;
|
|
446
607
|
markup?: string;
|
|
@@ -462,9 +623,6 @@ export interface HeadingProps {
|
|
|
462
623
|
android?: Record<string, any>;
|
|
463
624
|
web?: Record<string, any>;
|
|
464
625
|
}
|
|
465
|
-
export interface PlatformBadgeProps {
|
|
466
|
-
className?: any;
|
|
467
|
-
}
|
|
468
626
|
export interface OverlayProps {
|
|
469
627
|
open?: boolean;
|
|
470
628
|
onDismiss?: () => void;
|
|
@@ -496,15 +654,71 @@ export interface PopoverProps {
|
|
|
496
654
|
android?: Record<string, any>;
|
|
497
655
|
web?: Record<string, any>;
|
|
498
656
|
}
|
|
657
|
+
export interface HoverableProps {
|
|
658
|
+
/** Content shown after the pointer rests over the children on web. */
|
|
659
|
+
card: any;
|
|
660
|
+
/** Styling for the card's wrapper view inside the popover — e.g. a
|
|
661
|
+
* pointer bridge covering the anchor↔card gap or a positional offset. */
|
|
662
|
+
cardClassName?: any;
|
|
663
|
+
cardStyle?: any;
|
|
664
|
+
children?: any;
|
|
665
|
+
openDelay?: number;
|
|
666
|
+
closeDelay?: number;
|
|
667
|
+
placement?: PopoverPlacement;
|
|
668
|
+
className?: any;
|
|
669
|
+
style?: any;
|
|
670
|
+
ios?: Record<string, any>;
|
|
671
|
+
android?: Record<string, any>;
|
|
672
|
+
web?: Record<string, any>;
|
|
673
|
+
}
|
|
674
|
+
/** Web-only tooltip (`@octane-xplat/ui/web`, decision #47) — `trigger` is
|
|
675
|
+
* the anchor content, `content` the tooltip body. Hover-intent delay plus
|
|
676
|
+
* keyboard focus; wires `aria-describedby` onto the focusable trigger and
|
|
677
|
+
* dismisses on Escape, blur, or scroll. */
|
|
678
|
+
export interface TooltipProps {
|
|
679
|
+
trigger: any;
|
|
680
|
+
content: any;
|
|
681
|
+
/** Styling for the tooltip panel inside the popover. */
|
|
682
|
+
contentClassName?: any;
|
|
683
|
+
contentStyle?: any;
|
|
684
|
+
openDelay?: number;
|
|
685
|
+
closeDelay?: number;
|
|
686
|
+
placement?: PopoverPlacement;
|
|
687
|
+
disabled?: boolean;
|
|
688
|
+
className?: any;
|
|
689
|
+
style?: any;
|
|
690
|
+
ios?: Record<string, any>;
|
|
691
|
+
android?: Record<string, any>;
|
|
692
|
+
web?: Record<string, any>;
|
|
693
|
+
}
|
|
499
694
|
export type ToastContent = string | (() => any);
|
|
500
|
-
export type ToastPosition = 'top' | 'bottom';
|
|
695
|
+
export type ToastPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
|
501
696
|
export interface ToastOptions {
|
|
502
697
|
duration?: number;
|
|
503
698
|
position?: ToastPosition;
|
|
699
|
+
/** When set, the toast is positioned by Popover relative to this view. */
|
|
700
|
+
anchor?: PopoverAnchorRef;
|
|
701
|
+
/** Placement used with `anchor`; `position` supplies the top/bottom default. */
|
|
702
|
+
placement?: PopoverPlacement;
|
|
504
703
|
ios?: Record<string, any>;
|
|
505
704
|
android?: Record<string, any>;
|
|
506
705
|
web?: Record<string, any>;
|
|
507
706
|
}
|
|
707
|
+
export interface MeasureBounds {
|
|
708
|
+
x: number;
|
|
709
|
+
y: number;
|
|
710
|
+
width: number;
|
|
711
|
+
height: number;
|
|
712
|
+
}
|
|
713
|
+
export interface UseMeasureOptions {
|
|
714
|
+
/** Re-measure on layout, resize, scroll, and content-size changes. Defaults to true. */
|
|
715
|
+
observe?: boolean;
|
|
716
|
+
}
|
|
717
|
+
export interface MeasureResult {
|
|
718
|
+
/** Pass to a View's `bind` prop. */
|
|
719
|
+
bind: (element: any) => void;
|
|
720
|
+
bounds: MeasureBounds | null;
|
|
721
|
+
}
|
|
508
722
|
export interface ModalProps {
|
|
509
723
|
open?: boolean;
|
|
510
724
|
onClose?: (result?: ModalOpenResult) => void;
|
|
@@ -543,6 +757,14 @@ export interface SheetProps {
|
|
|
543
757
|
onDismiss?: () => void;
|
|
544
758
|
/** Dim backdrop + tap-to-dismiss (default true). */
|
|
545
759
|
shadeCover?: boolean;
|
|
760
|
+
/** Snap heights as viewport-height fractions, e.g. `[0.25, 0.5, 1]` —
|
|
761
|
+
* sorted ascending; the sheet opens at the smallest and drags between
|
|
762
|
+
* detents via the grabber strip, releasing below half of the smallest
|
|
763
|
+
* dismisses (same dismissal as a shade tap — `onDismiss` / resolve).
|
|
764
|
+
* Absent → the panel keeps its content-sized height. In-window on
|
|
765
|
+
* every target; OS sheet presentations stay in the platform
|
|
766
|
+
* subpaths. */
|
|
767
|
+
detents?: number[];
|
|
546
768
|
className?: any;
|
|
547
769
|
style?: any;
|
|
548
770
|
children?: any;
|
|
@@ -553,6 +775,8 @@ export interface SheetProps {
|
|
|
553
775
|
/** Options for the imperative `openSheet` service. */
|
|
554
776
|
export interface SheetOpenOptions {
|
|
555
777
|
shadeCover?: boolean;
|
|
778
|
+
/** Same contract as `SheetProps.detents`. */
|
|
779
|
+
detents?: number[];
|
|
556
780
|
}
|
|
557
781
|
/** Imperative sheet: mounts `component` on a dedicated root in a bottom
|
|
558
782
|
* sheet and resolves with the value passed to `close(result)`. The
|
|
@@ -560,10 +784,18 @@ export interface SheetOpenOptions {
|
|
|
560
784
|
export type OpenSheet = (component: any, params?: any, options?: SheetOpenOptions) => Promise<ModalOpenResult>;
|
|
561
785
|
export interface TabSpec {
|
|
562
786
|
title: string;
|
|
787
|
+
/** Registered icon name (see `registerIcons`). The shared self-drawn
|
|
788
|
+
* `Tabs` renders the glyph through `Icon` on every platform. The
|
|
789
|
+
* platform tab bars (`UITabBar`/`BottomNavigationView` in the ios/
|
|
790
|
+
* android subpaths) consume the glyph's `src` (a NativeScript
|
|
791
|
+
* iconSource URI — `sys://` SF Symbol, `res://`, `font://`, file
|
|
792
|
+
* path) or `font`/`text` representation; `svg`/`markup`-only glyphs
|
|
793
|
+
* warn and render title-only there. */
|
|
794
|
+
icon?: string;
|
|
563
795
|
render: () => any;
|
|
564
|
-
/** Named parallel stack —
|
|
565
|
-
*
|
|
566
|
-
*
|
|
796
|
+
/** Named parallel stack — the pane is the route outlet for `stack`
|
|
797
|
+
* (pushed screens render in place). The platform tab bars host a real
|
|
798
|
+
* Frame per such pane. */
|
|
567
799
|
stack?: string;
|
|
568
800
|
}
|
|
569
801
|
export interface TabsProps {
|
|
@@ -664,6 +896,13 @@ export interface OpenWindowOptions {
|
|
|
664
896
|
/** Optional URL used by the web window. */
|
|
665
897
|
url?: string;
|
|
666
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* Value returned by `useAnimation(initial, prop)`. On web, `prop` supports
|
|
901
|
+
* translateX/translateY/translateZ, scale/scaleX/scaleY, rotate/rotateX/
|
|
902
|
+
* rotateY, and skewX/skewY as CSS transforms, plus `opacity` and other CSS
|
|
903
|
+
* style properties. On NativeScript, `prop` is the name of a NativeScript
|
|
904
|
+
* view property (for example, `translateX` or `opacity`).
|
|
905
|
+
*/
|
|
667
906
|
export interface AnimatedValue {
|
|
668
907
|
readonly value: number;
|
|
669
908
|
bind(el: any): void;
|
|
@@ -676,6 +915,712 @@ export interface AnimatedValue {
|
|
|
676
915
|
}): void;
|
|
677
916
|
stop(): void;
|
|
678
917
|
}
|
|
918
|
+
/** Button composes Pressable — same-props/same-pixels, self-drawn. `loading`
|
|
919
|
+
* shows the spinner and blocks presses. */
|
|
920
|
+
export interface ButtonProps extends PressableProps {
|
|
921
|
+
loading?: boolean;
|
|
922
|
+
/** Content rendered before children (e.g. an Icon). */
|
|
923
|
+
leading?: any;
|
|
924
|
+
/** Content rendered after children. */
|
|
925
|
+
trailing?: any;
|
|
926
|
+
}
|
|
927
|
+
/** Collapsible shows/hides `children` behind a `trigger`. Controlled via
|
|
928
|
+
* `open`/`onOpenChange` or uncontrolled via `defaultOpen`. */
|
|
929
|
+
export interface CollapsibleProps {
|
|
930
|
+
className?: any;
|
|
931
|
+
style?: any;
|
|
932
|
+
id?: string;
|
|
933
|
+
trigger?: any;
|
|
934
|
+
children?: any;
|
|
935
|
+
open?: boolean;
|
|
936
|
+
defaultOpen?: boolean;
|
|
937
|
+
disabled?: boolean;
|
|
938
|
+
onOpenChange?: (open: boolean) => void;
|
|
939
|
+
accessibilityLabel?: string;
|
|
940
|
+
/** Platform-specific properties are applied after shared props. */
|
|
941
|
+
ios?: any;
|
|
942
|
+
android?: any;
|
|
943
|
+
web?: any;
|
|
944
|
+
}
|
|
945
|
+
export interface AccordionItemSpec {
|
|
946
|
+
key: string;
|
|
947
|
+
header?: any;
|
|
948
|
+
content?: any;
|
|
949
|
+
disabled?: boolean;
|
|
950
|
+
}
|
|
951
|
+
/** Accordion — a list of Collapsibles. `open` is the open key (or keys with
|
|
952
|
+
* `multiple`); omit it for uncontrolled via `defaultOpen`. */
|
|
953
|
+
export interface AccordionProps {
|
|
954
|
+
className?: any;
|
|
955
|
+
style?: any;
|
|
956
|
+
id?: string;
|
|
957
|
+
items: AccordionItemSpec[];
|
|
958
|
+
multiple?: boolean;
|
|
959
|
+
open?: string | string[];
|
|
960
|
+
defaultOpen?: string | string[];
|
|
961
|
+
onOpenChange?: (open: string | string[]) => void;
|
|
962
|
+
/** Platform-specific properties are applied after shared props. */
|
|
963
|
+
ios?: any;
|
|
964
|
+
android?: any;
|
|
965
|
+
web?: any;
|
|
966
|
+
}
|
|
967
|
+
/** Self-drawn checkbox — box + check mark, identical pixels across targets. */
|
|
968
|
+
export interface CheckboxProps {
|
|
969
|
+
className?: any;
|
|
970
|
+
style?: any;
|
|
971
|
+
id?: string;
|
|
972
|
+
checked?: boolean;
|
|
973
|
+
disabled?: boolean;
|
|
974
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
975
|
+
label?: string;
|
|
976
|
+
accessibilityLabel?: string;
|
|
977
|
+
/** Platform-specific properties are applied after shared props. */
|
|
978
|
+
ios?: any;
|
|
979
|
+
android?: any;
|
|
980
|
+
web?: any;
|
|
981
|
+
}
|
|
982
|
+
export interface RadioOption {
|
|
983
|
+
value: string;
|
|
984
|
+
label?: string;
|
|
985
|
+
disabled?: boolean;
|
|
986
|
+
}
|
|
987
|
+
/** Self-drawn radio group — dot options in a column/row. */
|
|
988
|
+
export interface RadioGroupProps {
|
|
989
|
+
className?: any;
|
|
990
|
+
style?: any;
|
|
991
|
+
id?: string;
|
|
992
|
+
options: RadioOption[];
|
|
993
|
+
value?: string;
|
|
994
|
+
disabled?: boolean;
|
|
995
|
+
horizontal?: boolean;
|
|
996
|
+
onValueChange?: (value: string) => void;
|
|
997
|
+
accessibilityLabel?: string;
|
|
998
|
+
/** Platform-specific properties are applied after shared props. */
|
|
999
|
+
ios?: any;
|
|
1000
|
+
android?: any;
|
|
1001
|
+
web?: any;
|
|
1002
|
+
}
|
|
1003
|
+
/** Self-drawn segmented control — a row of equal-width segments in a track,
|
|
1004
|
+
* one selected (UISegmentedControl / Material segmented-button shape, no OS
|
|
1005
|
+
* chrome). `value`/`onValueChange` for controlled, `defaultValue` for
|
|
1006
|
+
* uncontrolled; `disabled` on the group or per-option. Sizes come from
|
|
1007
|
+
* className, matching the Button family. */
|
|
1008
|
+
export interface SegmentedControlProps {
|
|
1009
|
+
className?: any;
|
|
1010
|
+
style?: any;
|
|
1011
|
+
id?: string;
|
|
1012
|
+
options: RadioOption[];
|
|
1013
|
+
value?: string;
|
|
1014
|
+
defaultValue?: string;
|
|
1015
|
+
onValueChange?: (value: string) => void;
|
|
1016
|
+
disabled?: boolean;
|
|
1017
|
+
accessibilityLabel?: string;
|
|
1018
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1019
|
+
ios?: any;
|
|
1020
|
+
android?: any;
|
|
1021
|
+
web?: any;
|
|
1022
|
+
}
|
|
1023
|
+
export interface MenuItem {
|
|
1024
|
+
key: string;
|
|
1025
|
+
label?: string;
|
|
1026
|
+
icon?: string;
|
|
1027
|
+
disabled?: boolean;
|
|
1028
|
+
onSelect?: () => void;
|
|
1029
|
+
}
|
|
1030
|
+
/** DropdownMenu — `trigger` anchored to a self-drawn item list via Popover.
|
|
1031
|
+
* Same anchored listbox on every target (decision #48). */
|
|
1032
|
+
export interface DropdownMenuProps {
|
|
1033
|
+
className?: any;
|
|
1034
|
+
style?: any;
|
|
1035
|
+
id?: string;
|
|
1036
|
+
/** Anchor content — rendered inside the trigger Pressable. */
|
|
1037
|
+
trigger?: any;
|
|
1038
|
+
items: MenuItem[];
|
|
1039
|
+
open?: boolean;
|
|
1040
|
+
defaultOpen?: boolean;
|
|
1041
|
+
onOpenChange?: (open: boolean) => void;
|
|
1042
|
+
placement?: PopoverPlacement;
|
|
1043
|
+
disabled?: boolean;
|
|
1044
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1045
|
+
ios?: any;
|
|
1046
|
+
android?: any;
|
|
1047
|
+
web?: any;
|
|
1048
|
+
}
|
|
1049
|
+
/** ContextMenu — same anchored list as DropdownMenu, opened by right-click
|
|
1050
|
+
* on web and long-press on native. */
|
|
1051
|
+
export interface ContextMenuProps {
|
|
1052
|
+
className?: any;
|
|
1053
|
+
style?: any;
|
|
1054
|
+
id?: string;
|
|
1055
|
+
items: MenuItem[];
|
|
1056
|
+
open?: boolean;
|
|
1057
|
+
defaultOpen?: boolean;
|
|
1058
|
+
onOpenChange?: (open: boolean) => void;
|
|
1059
|
+
children?: any;
|
|
1060
|
+
disabled?: boolean;
|
|
1061
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1062
|
+
ios?: any;
|
|
1063
|
+
android?: any;
|
|
1064
|
+
web?: any;
|
|
1065
|
+
}
|
|
1066
|
+
/** Badge — inline label chip. Pure composition, unstyled beyond layout. */
|
|
1067
|
+
export interface BadgeProps {
|
|
1068
|
+
className?: any;
|
|
1069
|
+
style?: any;
|
|
1070
|
+
id?: string;
|
|
1071
|
+
children?: any;
|
|
1072
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1073
|
+
ios?: any;
|
|
1074
|
+
android?: any;
|
|
1075
|
+
web?: any;
|
|
1076
|
+
}
|
|
1077
|
+
/** Separator — hairline rule between content. */
|
|
1078
|
+
export interface SeparatorProps {
|
|
1079
|
+
className?: any;
|
|
1080
|
+
style?: any;
|
|
1081
|
+
id?: string;
|
|
1082
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1083
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1084
|
+
ios?: any;
|
|
1085
|
+
android?: any;
|
|
1086
|
+
web?: any;
|
|
1087
|
+
}
|
|
1088
|
+
/** Skeleton — placeholder block shown while content loads. */
|
|
1089
|
+
export interface SkeletonProps {
|
|
1090
|
+
className?: any;
|
|
1091
|
+
style?: any;
|
|
1092
|
+
id?: string;
|
|
1093
|
+
width?: number;
|
|
1094
|
+
height?: number;
|
|
1095
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1096
|
+
ios?: any;
|
|
1097
|
+
android?: any;
|
|
1098
|
+
web?: any;
|
|
1099
|
+
}
|
|
1100
|
+
/** Avatar — circular image with a text fallback. */
|
|
1101
|
+
export interface AvatarProps {
|
|
1102
|
+
className?: any;
|
|
1103
|
+
style?: any;
|
|
1104
|
+
id?: string;
|
|
1105
|
+
src?: string;
|
|
1106
|
+
alt?: string;
|
|
1107
|
+
/** Fallback text (initials) shown when `src` is missing/fails. */
|
|
1108
|
+
fallback?: string;
|
|
1109
|
+
size?: number;
|
|
1110
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1111
|
+
ios?: any;
|
|
1112
|
+
android?: any;
|
|
1113
|
+
web?: any;
|
|
1114
|
+
}
|
|
1115
|
+
/** AvatarGroup — overlapping row of avatars with an optional `+N` overflow. */
|
|
1116
|
+
export interface AvatarGroupProps {
|
|
1117
|
+
className?: any;
|
|
1118
|
+
style?: any;
|
|
1119
|
+
id?: string;
|
|
1120
|
+
children?: any;
|
|
1121
|
+
/** Max avatars rendered; the rest collapse into a `+N` avatar. */
|
|
1122
|
+
max?: number;
|
|
1123
|
+
size?: number;
|
|
1124
|
+
/** Platform-specific properties are applied after shared props. */
|
|
1125
|
+
ios?: any;
|
|
1126
|
+
android?: any;
|
|
1127
|
+
web?: any;
|
|
1128
|
+
}
|
|
1129
|
+
/** FormField wraps a control with a label, hint, and error text. The error
|
|
1130
|
+
* replaces the hint when present. Children is the control element. */
|
|
1131
|
+
export interface FormFieldProps {
|
|
1132
|
+
className?: any;
|
|
1133
|
+
style?: any;
|
|
1134
|
+
id?: string;
|
|
1135
|
+
label?: string;
|
|
1136
|
+
hint?: string;
|
|
1137
|
+
error?: string;
|
|
1138
|
+
required?: boolean;
|
|
1139
|
+
children?: any;
|
|
1140
|
+
ios?: any;
|
|
1141
|
+
android?: any;
|
|
1142
|
+
web?: any;
|
|
1143
|
+
}
|
|
1144
|
+
/** FieldGroup — labeled group of related fields (role=group). */
|
|
1145
|
+
export interface FieldGroupProps {
|
|
1146
|
+
className?: any;
|
|
1147
|
+
style?: any;
|
|
1148
|
+
id?: string;
|
|
1149
|
+
label?: string;
|
|
1150
|
+
children?: any;
|
|
1151
|
+
ios?: any;
|
|
1152
|
+
android?: any;
|
|
1153
|
+
web?: any;
|
|
1154
|
+
}
|
|
1155
|
+
/** InputNumber — normalized TextInput (number keyboard) flanked by −/+
|
|
1156
|
+
* steppers. `value`/`onValueChange` for controlled, `defaultValue` for
|
|
1157
|
+
* uncontrolled. `step` defaults to 1; `min`/`max` clamp. */
|
|
1158
|
+
export interface InputNumberProps {
|
|
1159
|
+
className?: any;
|
|
1160
|
+
style?: any;
|
|
1161
|
+
id?: string;
|
|
1162
|
+
value?: number;
|
|
1163
|
+
defaultValue?: number;
|
|
1164
|
+
min?: number;
|
|
1165
|
+
max?: number;
|
|
1166
|
+
step?: number;
|
|
1167
|
+
disabled?: boolean;
|
|
1168
|
+
placeholder?: string;
|
|
1169
|
+
onValueChange?: (value: number) => void;
|
|
1170
|
+
ios?: any;
|
|
1171
|
+
android?: any;
|
|
1172
|
+
web?: any;
|
|
1173
|
+
}
|
|
1174
|
+
/** PinInput — a row of single-character cells that auto-advance on entry.
|
|
1175
|
+
* `onComplete` fires when all `length` cells are filled. */
|
|
1176
|
+
export interface PinInputProps {
|
|
1177
|
+
className?: any;
|
|
1178
|
+
style?: any;
|
|
1179
|
+
id?: string;
|
|
1180
|
+
length?: number;
|
|
1181
|
+
value?: string;
|
|
1182
|
+
onValueChange?: (value: string) => void;
|
|
1183
|
+
onComplete?: (value: string) => void;
|
|
1184
|
+
secure?: boolean;
|
|
1185
|
+
disabled?: boolean;
|
|
1186
|
+
ios?: any;
|
|
1187
|
+
android?: any;
|
|
1188
|
+
web?: any;
|
|
1189
|
+
}
|
|
1190
|
+
export interface SelectOption {
|
|
1191
|
+
value: string;
|
|
1192
|
+
label?: string;
|
|
1193
|
+
disabled?: boolean;
|
|
1194
|
+
}
|
|
1195
|
+
/** Select — anchored self-drawn listbox on every target (decision #48).
|
|
1196
|
+
* `multiple` keeps the listbox open and reports string[]; `searchable`
|
|
1197
|
+
* puts a normalized TextInput filter at the top of the listbox. */
|
|
1198
|
+
export interface SelectProps {
|
|
1199
|
+
className?: any;
|
|
1200
|
+
style?: any;
|
|
1201
|
+
id?: string;
|
|
1202
|
+
options: SelectOption[];
|
|
1203
|
+
value?: string | string[];
|
|
1204
|
+
defaultValue?: string | string[];
|
|
1205
|
+
multiple?: boolean;
|
|
1206
|
+
searchable?: boolean;
|
|
1207
|
+
placeholder?: string;
|
|
1208
|
+
open?: boolean;
|
|
1209
|
+
defaultOpen?: boolean;
|
|
1210
|
+
onOpenChange?: (open: boolean) => void;
|
|
1211
|
+
onValueChange?: (value: string | string[]) => void;
|
|
1212
|
+
disabled?: boolean;
|
|
1213
|
+
placement?: PopoverPlacement;
|
|
1214
|
+
accessibilityLabel?: string;
|
|
1215
|
+
ios?: any;
|
|
1216
|
+
android?: any;
|
|
1217
|
+
web?: any;
|
|
1218
|
+
}
|
|
1219
|
+
/** InputTags — chip list + trailing normalized TextInput. Enter commits a
|
|
1220
|
+
* tag, Backspace on an empty field removes the last tag. */
|
|
1221
|
+
export interface InputTagsProps {
|
|
1222
|
+
className?: any;
|
|
1223
|
+
style?: any;
|
|
1224
|
+
id?: string;
|
|
1225
|
+
value?: string[];
|
|
1226
|
+
defaultValue?: string[];
|
|
1227
|
+
onValueChange?: (tags: string[]) => void;
|
|
1228
|
+
placeholder?: string;
|
|
1229
|
+
max?: number;
|
|
1230
|
+
disabled?: boolean;
|
|
1231
|
+
ios?: any;
|
|
1232
|
+
android?: any;
|
|
1233
|
+
web?: any;
|
|
1234
|
+
}
|
|
1235
|
+
/** InputRating — row of tappable glyphs reporting a 1..max score. */
|
|
1236
|
+
export interface InputRatingProps {
|
|
1237
|
+
className?: any;
|
|
1238
|
+
style?: any;
|
|
1239
|
+
id?: string;
|
|
1240
|
+
value?: number;
|
|
1241
|
+
defaultValue?: number;
|
|
1242
|
+
max?: number;
|
|
1243
|
+
/** Glyph per cell — a Text character (default ★) or a registered Icon name. */
|
|
1244
|
+
icon?: string;
|
|
1245
|
+
onValueChange?: (value: number) => void;
|
|
1246
|
+
disabled?: boolean;
|
|
1247
|
+
accessibilityLabel?: string;
|
|
1248
|
+
ios?: any;
|
|
1249
|
+
android?: any;
|
|
1250
|
+
web?: any;
|
|
1251
|
+
}
|
|
1252
|
+
/** CheckboxGroup — multi-select list of self-drawn checkboxes. */
|
|
1253
|
+
export interface CheckboxGroupProps {
|
|
1254
|
+
className?: any;
|
|
1255
|
+
style?: any;
|
|
1256
|
+
id?: string;
|
|
1257
|
+
options: RadioOption[];
|
|
1258
|
+
value?: string[];
|
|
1259
|
+
defaultValue?: string[];
|
|
1260
|
+
onValueChange?: (values: string[]) => void;
|
|
1261
|
+
disabled?: boolean;
|
|
1262
|
+
horizontal?: boolean;
|
|
1263
|
+
accessibilityLabel?: string;
|
|
1264
|
+
ios?: any;
|
|
1265
|
+
android?: any;
|
|
1266
|
+
web?: any;
|
|
1267
|
+
}
|
|
1268
|
+
export interface BreadcrumbItem {
|
|
1269
|
+
label: string;
|
|
1270
|
+
onSelect?: () => void;
|
|
1271
|
+
}
|
|
1272
|
+
/** Breadcrumb — ancestor trail. Items render as pressable links separated
|
|
1273
|
+
* by `separator` (default /). */
|
|
1274
|
+
export interface BreadcrumbProps {
|
|
1275
|
+
className?: any;
|
|
1276
|
+
style?: any;
|
|
1277
|
+
id?: string;
|
|
1278
|
+
items: BreadcrumbItem[];
|
|
1279
|
+
separator?: string;
|
|
1280
|
+
accessibilityLabel?: string;
|
|
1281
|
+
ios?: any;
|
|
1282
|
+
android?: any;
|
|
1283
|
+
web?: any;
|
|
1284
|
+
}
|
|
1285
|
+
/** Pagination — prev/next + a windowed run of page buttons around `page`. */
|
|
1286
|
+
export interface PaginationProps {
|
|
1287
|
+
className?: any;
|
|
1288
|
+
style?: any;
|
|
1289
|
+
id?: string;
|
|
1290
|
+
page: number;
|
|
1291
|
+
pageCount: number;
|
|
1292
|
+
/** Pages shown to each side of `page` (default 1). */
|
|
1293
|
+
siblingCount?: number;
|
|
1294
|
+
onPageChange?: (page: number) => void;
|
|
1295
|
+
disabled?: boolean;
|
|
1296
|
+
accessibilityLabel?: string;
|
|
1297
|
+
ios?: any;
|
|
1298
|
+
android?: any;
|
|
1299
|
+
web?: any;
|
|
1300
|
+
}
|
|
1301
|
+
export interface StepperStep {
|
|
1302
|
+
key: string;
|
|
1303
|
+
label?: string;
|
|
1304
|
+
icon?: string;
|
|
1305
|
+
disabled?: boolean;
|
|
1306
|
+
}
|
|
1307
|
+
/** Stepper — numbered step row. Steps before `current` show a done mark;
|
|
1308
|
+
* tapping a non-disabled step calls `onStepChange`. */
|
|
1309
|
+
export interface StepperProps {
|
|
1310
|
+
className?: any;
|
|
1311
|
+
style?: any;
|
|
1312
|
+
id?: string;
|
|
1313
|
+
steps: StepperStep[];
|
|
1314
|
+
current?: number;
|
|
1315
|
+
onStepChange?: (index: number) => void;
|
|
1316
|
+
accessibilityLabel?: string;
|
|
1317
|
+
ios?: any;
|
|
1318
|
+
android?: any;
|
|
1319
|
+
web?: any;
|
|
1320
|
+
}
|
|
1321
|
+
export interface NavigationMenuItem {
|
|
1322
|
+
key: string;
|
|
1323
|
+
label?: string;
|
|
1324
|
+
icon?: string;
|
|
1325
|
+
active?: boolean;
|
|
1326
|
+
disabled?: boolean;
|
|
1327
|
+
onSelect?: () => void;
|
|
1328
|
+
}
|
|
1329
|
+
/** NavigationMenu — row (or column) of nav items; mostly a desktop/web
|
|
1330
|
+
* idiom — the mobile equivalent is Tabs/Drawer. */
|
|
1331
|
+
export interface NavigationMenuProps {
|
|
1332
|
+
className?: any;
|
|
1333
|
+
style?: any;
|
|
1334
|
+
id?: string;
|
|
1335
|
+
items: NavigationMenuItem[];
|
|
1336
|
+
horizontal?: boolean;
|
|
1337
|
+
accessibilityLabel?: string;
|
|
1338
|
+
ios?: any;
|
|
1339
|
+
android?: any;
|
|
1340
|
+
web?: any;
|
|
1341
|
+
}
|
|
1342
|
+
/** CommandPalette — overlay with a search field over a filtered action
|
|
1343
|
+
* list. Esc/outside dismisses, Enter selects the highlighted match. */
|
|
1344
|
+
export interface CommandPaletteProps {
|
|
1345
|
+
className?: any;
|
|
1346
|
+
style?: any;
|
|
1347
|
+
id?: string;
|
|
1348
|
+
open?: boolean;
|
|
1349
|
+
onOpenChange?: (open: boolean) => void;
|
|
1350
|
+
items: MenuItem[];
|
|
1351
|
+
placeholder?: string;
|
|
1352
|
+
ios?: any;
|
|
1353
|
+
android?: any;
|
|
1354
|
+
web?: any;
|
|
1355
|
+
}
|
|
1356
|
+
export interface TableColumn {
|
|
1357
|
+
key: string;
|
|
1358
|
+
label?: string;
|
|
1359
|
+
/** Column width in dips; omit to share the remaining space evenly. */
|
|
1360
|
+
width?: number;
|
|
1361
|
+
align?: 'left' | 'center' | 'right';
|
|
1362
|
+
}
|
|
1363
|
+
/** Table — self-drawn grid via rows + cells. Bounded and unvirtualized:
|
|
1364
|
+
* large datasets belong to the platform UITableView/RecyclerView
|
|
1365
|
+
* subpaths, not this component. */
|
|
1366
|
+
export interface TableProps {
|
|
1367
|
+
className?: any;
|
|
1368
|
+
style?: any;
|
|
1369
|
+
id?: string;
|
|
1370
|
+
columns: TableColumn[];
|
|
1371
|
+
rows: Record<string, any>[];
|
|
1372
|
+
/** Cell override — default renders row[col.key] as text. */
|
|
1373
|
+
renderCell?: (row: Record<string, any>, column: TableColumn, rowIndex: number) => any;
|
|
1374
|
+
/** Row key; defaults to the row index. */
|
|
1375
|
+
keyFor?: (row: Record<string, any>, rowIndex: number) => string;
|
|
1376
|
+
onRowPress?: (row: Record<string, any>, rowIndex: number) => void;
|
|
1377
|
+
empty?: any;
|
|
1378
|
+
ios?: any;
|
|
1379
|
+
android?: any;
|
|
1380
|
+
web?: any;
|
|
1381
|
+
}
|
|
1382
|
+
export interface TimelineItem {
|
|
1383
|
+
key: string;
|
|
1384
|
+
title?: string;
|
|
1385
|
+
description?: string;
|
|
1386
|
+
time?: string;
|
|
1387
|
+
icon?: string;
|
|
1388
|
+
}
|
|
1389
|
+
/** Timeline — vertical list of events with dot + connector. */
|
|
1390
|
+
export interface TimelineProps {
|
|
1391
|
+
className?: any;
|
|
1392
|
+
style?: any;
|
|
1393
|
+
id?: string;
|
|
1394
|
+
items: TimelineItem[];
|
|
1395
|
+
ios?: any;
|
|
1396
|
+
android?: any;
|
|
1397
|
+
web?: any;
|
|
1398
|
+
}
|
|
1399
|
+
export interface TreeNode {
|
|
1400
|
+
key: string;
|
|
1401
|
+
label?: string;
|
|
1402
|
+
children?: TreeNode[];
|
|
1403
|
+
disabled?: boolean;
|
|
1404
|
+
}
|
|
1405
|
+
/** Tree — recursive indent + collapse. `defaultExpanded` seeds the open
|
|
1406
|
+
* set; `onToggle` reports changes. */
|
|
1407
|
+
export interface TreeProps {
|
|
1408
|
+
className?: any;
|
|
1409
|
+
style?: any;
|
|
1410
|
+
id?: string;
|
|
1411
|
+
nodes: TreeNode[];
|
|
1412
|
+
defaultExpanded?: string[];
|
|
1413
|
+
onToggle?: (key: string, open: boolean) => void;
|
|
1414
|
+
onSelect?: (node: TreeNode) => void;
|
|
1415
|
+
ios?: any;
|
|
1416
|
+
android?: any;
|
|
1417
|
+
web?: any;
|
|
1418
|
+
}
|
|
1419
|
+
/** Alert — status callout. `tone` maps to a class modifier; error tone
|
|
1420
|
+
* gets role=alert on web, others role=status. */
|
|
1421
|
+
export interface AlertProps {
|
|
1422
|
+
className?: any;
|
|
1423
|
+
style?: any;
|
|
1424
|
+
id?: string;
|
|
1425
|
+
tone?: 'info' | 'success' | 'warning' | 'error';
|
|
1426
|
+
icon?: string;
|
|
1427
|
+
title?: string;
|
|
1428
|
+
children?: any;
|
|
1429
|
+
ios?: any;
|
|
1430
|
+
android?: any;
|
|
1431
|
+
web?: any;
|
|
1432
|
+
}
|
|
1433
|
+
/** Card — container with optional header/footer slots. */
|
|
1434
|
+
export interface CardProps {
|
|
1435
|
+
className?: any;
|
|
1436
|
+
style?: any;
|
|
1437
|
+
id?: string;
|
|
1438
|
+
header?: any;
|
|
1439
|
+
footer?: any;
|
|
1440
|
+
children?: any;
|
|
1441
|
+
ios?: any;
|
|
1442
|
+
android?: any;
|
|
1443
|
+
web?: any;
|
|
1444
|
+
}
|
|
1445
|
+
/** Chip — small action/filter element: pressable, optional selected state,
|
|
1446
|
+
* optional ✕ remove affordance. */
|
|
1447
|
+
export interface ChipProps {
|
|
1448
|
+
className?: any;
|
|
1449
|
+
style?: any;
|
|
1450
|
+
id?: string;
|
|
1451
|
+
children?: any;
|
|
1452
|
+
selected?: boolean;
|
|
1453
|
+
disabled?: boolean;
|
|
1454
|
+
onSelect?: () => void;
|
|
1455
|
+
onRemove?: () => void;
|
|
1456
|
+
accessibilityLabel?: string;
|
|
1457
|
+
ios?: any;
|
|
1458
|
+
android?: any;
|
|
1459
|
+
web?: any;
|
|
1460
|
+
}
|
|
1461
|
+
/** Kbd — keyboard key glyph (⌘K styling hook). */
|
|
1462
|
+
export interface KbdProps {
|
|
1463
|
+
className?: any;
|
|
1464
|
+
style?: any;
|
|
1465
|
+
id?: string;
|
|
1466
|
+
children?: any;
|
|
1467
|
+
ios?: any;
|
|
1468
|
+
android?: any;
|
|
1469
|
+
web?: any;
|
|
1470
|
+
}
|
|
1471
|
+
/** Empty — empty-state block: icon + title + description + actions. */
|
|
1472
|
+
export interface EmptyProps {
|
|
1473
|
+
className?: any;
|
|
1474
|
+
style?: any;
|
|
1475
|
+
id?: string;
|
|
1476
|
+
icon?: string;
|
|
1477
|
+
title?: string;
|
|
1478
|
+
description?: string;
|
|
1479
|
+
children?: any;
|
|
1480
|
+
ios?: any;
|
|
1481
|
+
android?: any;
|
|
1482
|
+
web?: any;
|
|
1483
|
+
}
|
|
1484
|
+
/** Banner — inline notice strip with optional dismiss. */
|
|
1485
|
+
export interface BannerProps {
|
|
1486
|
+
className?: any;
|
|
1487
|
+
style?: any;
|
|
1488
|
+
id?: string;
|
|
1489
|
+
icon?: string;
|
|
1490
|
+
children?: any;
|
|
1491
|
+
onDismiss?: () => void;
|
|
1492
|
+
ios?: any;
|
|
1493
|
+
android?: any;
|
|
1494
|
+
web?: any;
|
|
1495
|
+
}
|
|
1496
|
+
/** User — avatar + name/description row. */
|
|
1497
|
+
export interface UserProps {
|
|
1498
|
+
className?: any;
|
|
1499
|
+
style?: any;
|
|
1500
|
+
id?: string;
|
|
1501
|
+
name?: string;
|
|
1502
|
+
description?: string;
|
|
1503
|
+
src?: string;
|
|
1504
|
+
fallback?: string;
|
|
1505
|
+
size?: number;
|
|
1506
|
+
onSelect?: () => void;
|
|
1507
|
+
ios?: any;
|
|
1508
|
+
android?: any;
|
|
1509
|
+
web?: any;
|
|
1510
|
+
}
|
|
1511
|
+
/** ProgressGroup — stacked labeled Meter rows. */
|
|
1512
|
+
export interface ProgressGroupProps {
|
|
1513
|
+
className?: any;
|
|
1514
|
+
style?: any;
|
|
1515
|
+
id?: string;
|
|
1516
|
+
items: {
|
|
1517
|
+
key: string;
|
|
1518
|
+
label?: string;
|
|
1519
|
+
value: number;
|
|
1520
|
+
max?: number;
|
|
1521
|
+
}[];
|
|
1522
|
+
ios?: any;
|
|
1523
|
+
android?: any;
|
|
1524
|
+
web?: any;
|
|
1525
|
+
}
|
|
1526
|
+
export type VideoFit = 'contain' | 'cover' | 'fill';
|
|
1527
|
+
export interface VideoEvent {
|
|
1528
|
+
/** Playback position in milliseconds. */
|
|
1529
|
+
position?: number;
|
|
1530
|
+
/** Clip duration in milliseconds, once known (0 before then). */
|
|
1531
|
+
duration?: number;
|
|
1532
|
+
/** Failure description. */
|
|
1533
|
+
message?: string;
|
|
1534
|
+
}
|
|
1535
|
+
export interface VideoHandle {
|
|
1536
|
+
play(): void;
|
|
1537
|
+
pause(): void;
|
|
1538
|
+
/** Seek to a position in milliseconds. */
|
|
1539
|
+
seekTo(ms: number): void;
|
|
1540
|
+
/** Current playback position in ms (0 before metadata loads). */
|
|
1541
|
+
currentTime(): number;
|
|
1542
|
+
/** Clip duration in ms (0 before metadata loads). */
|
|
1543
|
+
duration(): number;
|
|
1544
|
+
/** The platform surface (`HTMLVideoElement` / plugin `Video`). */
|
|
1545
|
+
native: any;
|
|
1546
|
+
}
|
|
1547
|
+
/** Embedded video — surface-hosted bucket: the OS engine owns the pixels
|
|
1548
|
+
* (web `<video>` / `@nstudio/nativescript-exoplayer` → AVPlayerViewController
|
|
1549
|
+
* + ExoPlayer2), all chrome is self-drawn so `controls` looks identical on
|
|
1550
|
+
* every target. Times are milliseconds on every platform. */
|
|
1551
|
+
export interface VideoProps extends LayoutChildProps, AccessibilityProps {
|
|
1552
|
+
className?: any;
|
|
1553
|
+
style?: any;
|
|
1554
|
+
id?: string;
|
|
1555
|
+
/** Remote URL; native also accepts `~/` bundle paths and absolute files. */
|
|
1556
|
+
src: string;
|
|
1557
|
+
/** Frame shown until playback starts. */
|
|
1558
|
+
poster?: string;
|
|
1559
|
+
/** Controlled playback — pair with `onPlayingChange`. Leave unset for
|
|
1560
|
+
* uncontrolled playback (the transport and `bind` handle still work). */
|
|
1561
|
+
playing?: boolean;
|
|
1562
|
+
/** Uncontrolled start-playing shorthand. Browsers block unmuted
|
|
1563
|
+
* autoplay — pair with `muted` when `autoPlay` matters on web. */
|
|
1564
|
+
autoPlay?: boolean;
|
|
1565
|
+
muted?: boolean;
|
|
1566
|
+
loop?: boolean;
|
|
1567
|
+
/** Self-drawn transport overlay (play/pause, scrubber, time, mute) —
|
|
1568
|
+
* tap the surface to show/hide. Default true. */
|
|
1569
|
+
controls?: boolean;
|
|
1570
|
+
/** Content fitting inside the frame: `contain` (letterbox, default),
|
|
1571
|
+
* `cover` (crop to fill), `fill` (stretch). */
|
|
1572
|
+
fit?: VideoFit;
|
|
1573
|
+
/** Playback metadata is loaded; `e.duration` is the clip length in ms. */
|
|
1574
|
+
onReady?: (e: VideoEvent) => void;
|
|
1575
|
+
onEnded?: () => void;
|
|
1576
|
+
/** Fires on user toggles and controlled `playing` writes. */
|
|
1577
|
+
onPlayingChange?: (playing: boolean) => void;
|
|
1578
|
+
/** Fires when the transport's mute button toggles. */
|
|
1579
|
+
onMutedChange?: (muted: boolean) => void;
|
|
1580
|
+
/** Web only — the plugin players surface no error event on native. */
|
|
1581
|
+
onError?: (e: VideoEvent) => void;
|
|
1582
|
+
/** Imperative handle — play/pause/seek/time plus `native` for anything
|
|
1583
|
+
* the shared props don't cover. */
|
|
1584
|
+
bind?: (h: VideoHandle) => void;
|
|
1585
|
+
/** Platform escape hatches, applied after the shared props. */
|
|
1586
|
+
ios?: Record<string, any>;
|
|
1587
|
+
android?: Record<string, any>;
|
|
1588
|
+
web?: Record<string, any>;
|
|
1589
|
+
}
|
|
1590
|
+
export interface CameraViewHandle {
|
|
1591
|
+
/** The platform view (`HTMLVideoElement` / plugin `CameraPlus`). */
|
|
1592
|
+
native: any;
|
|
1593
|
+
}
|
|
1594
|
+
/** Live camera preview — surface-hosted: web runs `getUserMedia` into a
|
|
1595
|
+
* `<video>`, native embeds `CameraPlus` (@nstudio/nativescript-camera-plus;
|
|
1596
|
+
* AVCaptureSession preview / CameraX FancyCamera) with its built-in
|
|
1597
|
+
* buttons switched off. Still capture is deliberately not on the handle —
|
|
1598
|
+
* `media.capturePhoto` in `@octane-xplat/platform` owns that; reach the
|
|
1599
|
+
* preview's own capture (e.g. `CameraPlus.takePicture`) through `bind`'s
|
|
1600
|
+
* `native` when the intent UI won't do. The leaf owns the permission
|
|
1601
|
+
* request on both platforms. */
|
|
1602
|
+
export interface CameraViewProps extends LayoutChildProps, AccessibilityProps {
|
|
1603
|
+
className?: any;
|
|
1604
|
+
style?: any;
|
|
1605
|
+
id?: string;
|
|
1606
|
+
/** Lens — default `'back'`. */
|
|
1607
|
+
facing?: 'front' | 'back';
|
|
1608
|
+
/** Default true. `false` tears down the preview stream/session. */
|
|
1609
|
+
active?: boolean;
|
|
1610
|
+
/** The preview surface is live (web: first frame; native: view loaded
|
|
1611
|
+
* after permission — the sensor may still be warming). */
|
|
1612
|
+
onReady?: () => void;
|
|
1613
|
+
onError?: (e: {
|
|
1614
|
+
message?: string;
|
|
1615
|
+
}) => void;
|
|
1616
|
+
/** Imperative handle — `native` for anything the shared props don't
|
|
1617
|
+
* cover (torch, zoom, preview-frame capture). */
|
|
1618
|
+
bind?: (h: CameraViewHandle) => void;
|
|
1619
|
+
/** Platform escape hatches, applied after the shared props. */
|
|
1620
|
+
ios?: Record<string, any>;
|
|
1621
|
+
android?: Record<string, any>;
|
|
1622
|
+
web?: Record<string, any>;
|
|
1623
|
+
}
|
|
679
1624
|
export type ColorScheme = 'light' | 'dark';
|
|
680
1625
|
/** Minimal external-store contract `useStore` subscribes to. */
|
|
681
1626
|
export interface ReadableStore<T> {
|