@octane-xplat/ui 0.7.2 → 0.9.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 (219) hide show
  1. package/README.md +4 -3
  2. package/dist/native/Button.tsrx.js +1 -1
  3. package/dist/native/CommandPalette.tsrx.js +7 -1
  4. package/dist/native/Grid.tsrx.js +31 -2
  5. package/dist/native/KeyboardAvoiding.mobile.tsrx.js +2 -2
  6. package/dist/native/Markdown.tsrx.js +233 -0
  7. package/dist/native/Overlay.tsrx.js +15 -26
  8. package/dist/native/Pagination.tsrx.js +15 -12
  9. package/dist/native/PinInput.tsrx.js +25 -7
  10. package/dist/native/Popover.tsrx.js +33 -23
  11. package/dist/native/Pressable.tsrx.js +4 -1
  12. package/dist/native/Screen.tsrx.js +1 -1
  13. package/dist/native/SearchInput.tsrx.js +6 -3
  14. package/dist/native/Sheet.tsrx.js +23 -38
  15. package/dist/native/Slider.tsrx.js +23 -14
  16. package/dist/native/Text.tsrx.js +16 -0
  17. package/dist/native/TextArea.tsrx.js +6 -3
  18. package/dist/native/TextInput.tsrx.js +6 -3
  19. package/dist/native/VirtualList.tsrx.js +305 -121
  20. package/dist/native/WebView.tsrx.js +17 -2
  21. package/dist/native/_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js +9 -0
  22. package/dist/native/escape-props.js +2 -0
  23. package/dist/native/grid-auto-placement.js +83 -0
  24. package/dist/native/grid-placement.js +20 -0
  25. package/dist/native/index.shared.js +7 -5
  26. package/dist/native/keyboard-inset.mobile.js +5 -5
  27. package/dist/native/navigation-request.js +26 -0
  28. package/dist/native/octane-client-build.json +1 -1
  29. package/dist/native/overlay-lifetime.mobile.js +65 -0
  30. package/dist/native/pan.tsrx.js +16 -2
  31. package/dist/native/route-table.js +90 -10
  32. package/dist/native/route.js +26 -16
  33. package/dist/native/shared.js +7 -5
  34. package/dist/native/sheet-service.js +2 -2
  35. package/dist/native/svg.mobile.js +1 -1
  36. package/dist/native/{tap-to-blur.mobile.js → tap-to-blur.ios.js} +20 -32
  37. package/dist/native/text-focus.js +10 -0
  38. package/dist/native/text-write.js +18 -11
  39. package/dist/native/toast-anchor.tsrx.js +1 -1
  40. package/dist/native/ui.js +7 -6
  41. package/dist/native/useMeasure.tsrx.js +17 -18
  42. package/dist/native/vendor/ui-svg/index.android.js +2 -2
  43. package/dist/native/vendor/ui-svg/index.ios.js +2 -2
  44. package/dist/native/vendor/ui-svg/{index.common.js → src/index.common.js} +1 -1
  45. package/dist/native/virtual-list-cell-pool.js +63 -0
  46. package/dist/web/Button.web.tsrx.js +1 -1
  47. package/dist/web/KeyboardAvoiding.web.tsrx.js +78 -0
  48. package/dist/web/Markdown.tsrx.js +98 -0
  49. package/dist/web/Overlay.web.tsrx.js +81 -32
  50. package/dist/web/PinInput.web.tsrx.js +24 -10
  51. package/dist/web/Pressable.web.tsrx.js +169 -53
  52. package/dist/web/SearchInput.web.tsrx.js +2 -2
  53. package/dist/web/Sheet.web.tsrx.js +20 -7
  54. package/dist/web/TextArea.web.tsrx.js +22 -17
  55. package/dist/web/TextInput.web.tsrx.js +2 -2
  56. package/dist/web/VirtualList.web.tsrx.js +220 -109
  57. package/dist/web/WebView.web.tsrx.js +3 -3
  58. package/dist/web/{index.shared.js → index.shared.web.js} +7 -5
  59. package/dist/web/modal-focus.web.js +95 -0
  60. package/dist/web/navigation-request.js +26 -0
  61. package/dist/web/octane-client-build.json +1 -1
  62. package/dist/web/pan.web.tsrx.js +27 -10
  63. package/dist/web/route-table.js +90 -10
  64. package/dist/web/route.web.js +88 -22
  65. package/dist/web/sheet-service.web.js +8 -0
  66. package/dist/web/theme/colorScheme.web.js +31 -4
  67. package/dist/web/ui.js +8 -6
  68. package/dist/web/virtual-list-cell-pool.js +63 -0
  69. package/package.json +21 -19
  70. package/platforms/android/native-api-usage.json +7 -7
  71. package/src/CommandPalette.tsrx +8 -1
  72. package/src/Grid.tsrx +32 -1
  73. package/src/Icon.macos.tsrx +1 -0
  74. package/src/KeyboardAvoiding.macos.tsrx +7 -1
  75. package/src/KeyboardAvoiding.mobile.tsrx +2 -2
  76. package/src/KeyboardAvoiding.tsrx +15 -0
  77. package/src/KeyboardAvoiding.web.tsrx +15 -0
  78. package/src/Markdown.tsrx +121 -0
  79. package/src/Meter.tsrx +1 -0
  80. package/src/Overlay.tsrx +15 -30
  81. package/src/Overlay.web.tsrx +12 -3
  82. package/src/Pagination.tsrx +6 -4
  83. package/src/PinInput.macos.tsrx +20 -6
  84. package/src/PinInput.mobile.test.ts +107 -0
  85. package/src/PinInput.tsrx +20 -6
  86. package/src/PinInput.web.test.tsrx +42 -0
  87. package/src/PinInput.web.tsrx +20 -6
  88. package/src/Popover.tsrx +36 -22
  89. package/src/Pressable.tsrx +1 -1
  90. package/src/Pressable.web.test.tsrx +36 -0
  91. package/src/Pressable.web.tsrx +37 -6
  92. package/src/RouteHost.macos.tsrx +1 -0
  93. package/src/Screen.tsrx +1 -1
  94. package/src/SearchInput.tsrx +4 -3
  95. package/src/SearchInput.web.tsrx +1 -1
  96. package/src/Sheet.tsrx +21 -42
  97. package/src/Sheet.web.tsrx +9 -1
  98. package/src/Slider.tsrx +13 -11
  99. package/src/Text.tsrx +36 -0
  100. package/src/TextArea.tsrx +6 -5
  101. package/src/TextArea.web.test.tsrx +39 -0
  102. package/src/TextArea.web.tsrx +7 -5
  103. package/src/TextInput.tsrx +6 -6
  104. package/src/TextInput.web.tsrx +1 -1
  105. package/src/VirtualList.macos.tsrx +93 -6
  106. package/src/VirtualList.mobile.test.tsrx +232 -0
  107. package/src/VirtualList.tsrx +285 -81
  108. package/src/VirtualList.web.tsrx +131 -25
  109. package/src/WebView.tsrx +20 -10
  110. package/src/WebView.web.tsrx +3 -0
  111. package/src/android/BottomNavigationView.android.tsrx +1 -0
  112. package/src/android/MaterialDialog.android.tsrx +1 -0
  113. package/src/anim.macos.tsrx +1 -0
  114. package/src/apply-native-modifiers.native.ts +4 -1
  115. package/src/child-array.ts +12 -7
  116. package/src/colorScheme.macos.ts +1 -0
  117. package/src/controls.macos.tsrx +4 -1
  118. package/src/data-driver.mobile.test.ts +120 -0
  119. package/src/data-lifecycle.mobile.test.ts +251 -0
  120. package/src/escape-props.ts +13 -1
  121. package/src/grid-auto-placement.ts +163 -0
  122. package/src/grid-placement.ts +29 -0
  123. package/src/hosted-unsupported.macos.tsrx +1 -0
  124. package/src/index.macos.ts +23 -3
  125. package/src/index.mobile.ts +0 -1
  126. package/src/index.shared.ts +22 -1
  127. package/src/index.shared.web.ts +291 -0
  128. package/src/index.web.ts +1 -1
  129. package/src/input-readiness.web.test.tsrx +82 -0
  130. package/src/ios/UITabBar.ios.tsrx +1 -0
  131. package/src/keyboard-inset.mobile.test.ts +62 -0
  132. package/src/keyboard-inset.mobile.ts +63 -43
  133. package/src/layout-shells.macos.tsrx +1 -5
  134. package/src/macos-extras.macos.tsrx +2 -0
  135. package/src/modal-focus.web.test.tsrx +63 -0
  136. package/src/modal-focus.web.ts +162 -0
  137. package/src/navigation-request.ts +37 -0
  138. package/src/overlay-lifecycle.mobile.test.ts +316 -0
  139. package/src/overlay-lifetime.mobile.ts +107 -0
  140. package/src/pan.mobile.test.tsrx +116 -0
  141. package/src/pan.tsrx +20 -2
  142. package/src/pan.web.tsrx +35 -7
  143. package/src/platformProps.ts +1 -0
  144. package/src/popover.mobile.test.ts +9 -1
  145. package/src/pressable-accessibility.mobile.test.ts +30 -0
  146. package/src/props.ts +163 -3
  147. package/src/refresh.ts +6 -1
  148. package/src/refresh.web.test.ts +77 -77
  149. package/src/route-android.test.ts +162 -0
  150. package/src/route-history.web.test.ts +80 -0
  151. package/src/route-navigation.web.test.ts +173 -0
  152. package/src/route-table.test.ts +188 -9
  153. package/src/route-table.ts +138 -10
  154. package/src/route.macos.ts +56 -13
  155. package/src/route.ts +54 -24
  156. package/src/route.web.ts +141 -24
  157. package/src/sheet-detents.ts +5 -3
  158. package/src/sheet-service.macos.ts +5 -1
  159. package/src/sheet-service.ts +1 -1
  160. package/src/sheet-service.web.ts +8 -0
  161. package/src/sheet-snap.test.ts +23 -23
  162. package/src/sheet-snap.ts +6 -1
  163. package/src/svg.mobile.ts +9 -3
  164. package/src/tap-to-blur.ios.ts +106 -0
  165. package/src/tap-to-blur.mobile.ts +21 -95
  166. package/src/text-focus.ts +12 -0
  167. package/src/text-input.mobile.test.ts +89 -0
  168. package/src/text-write.ts +21 -11
  169. package/src/theme/colorScheme.linux.ts +2 -4
  170. package/src/theme/colorScheme.web.ts +51 -4
  171. package/src/theme/theme-scheme.macos.ts +8 -2
  172. package/src/theme/tokens.css +1740 -1718
  173. package/src/translate.macos.ts +4 -1
  174. package/src/useMeasure.tsrx +20 -21
  175. package/src/virtual-list-cell-pool.test.ts +53 -0
  176. package/src/virtual-list-cell-pool.ts +81 -0
  177. package/src/virtual-list-layout.test.ts +11 -8
  178. package/src/virtual-list-layout.ts +4 -8
  179. package/src/windows.linux.ts +7 -2
  180. package/src/windows.macos.ts +1 -0
  181. package/types/generated/.tsrx-typegen-manifest.json +16 -3
  182. package/types/generated/Grid.d.ts +0 -1
  183. package/types/generated/KeyboardAvoiding.d.ts +3 -0
  184. package/types/generated/KeyboardAvoiding.web.d.ts +2 -0
  185. package/types/generated/Markdown.d.ts +59 -0
  186. package/types/generated/TextArea.d.ts +2 -2
  187. package/types/generated/TextArea.web.d.ts +1 -1
  188. package/types/generated/TextInput.d.ts +2 -3
  189. package/types/generated/VirtualList.d.ts +3 -3
  190. package/types/generated/escape-props.d.ts +4 -0
  191. package/types/generated/grid-auto-placement.d.ts +13 -0
  192. package/types/generated/grid-placement.d.ts +5 -0
  193. package/types/generated/index.mobile.d.ts +0 -1
  194. package/types/generated/index.shared.d.ts +6 -3
  195. package/types/generated/index.shared.web.d.ts +114 -0
  196. package/types/generated/index.web.d.ts +1 -1
  197. package/types/generated/modal-focus.web.d.ts +3 -0
  198. package/types/generated/navigation-request.d.ts +10 -0
  199. package/types/generated/overlay-lifetime.mobile.d.ts +10 -0
  200. package/types/generated/props.d.ts +111 -3
  201. package/types/generated/route-table.d.ts +14 -3
  202. package/types/generated/svg.mobile.d.ts +2 -2
  203. package/types/generated/tap-to-blur.ios.d.ts +13 -0
  204. package/types/generated/tap-to-blur.mobile.d.ts +1 -15
  205. package/types/generated/text-focus.d.ts +3 -0
  206. package/types/generated/text-write.d.ts +3 -1
  207. package/types/generated/theme/colorScheme.web.d.ts +5 -0
  208. package/types/generated/virtual-list-cell-pool.d.ts +18 -0
  209. package/types/index.macos.d.ts +15 -3
  210. /package/src/vendor/ui-svg/{index.android.ts → src/index.android.ts} +0 -0
  211. /package/src/vendor/ui-svg/{index.common.ts → src/index.common.ts} +0 -0
  212. /package/src/vendor/ui-svg/{index.ios.ts → src/index.ios.ts} +0 -0
  213. /package/src/vendor/ui-svg/{index.ts → src/index.ts} +0 -0
  214. /package/src/vendor/ui-svg/{typings → src/typings}/SVGKit.d.ts +0 -0
  215. /package/src/vendor/ui-svg/{typings → src/typings}/android.d.ts +0 -0
  216. /package/src/vendor/ui-svg/{typings → src/typings}/ios.d.ts +0 -0
  217. /package/types/generated/vendor/ui-svg/{index.common.d.ts → src/index.common.d.ts} +0 -0
  218. /package/types/generated/vendor/ui-svg/{index.d.ts → src/index.d.ts} +0 -0
  219. /package/types/generated/vendor/ui-svg/{index.ios.d.ts → src/index.ios.d.ts} +0 -0
@@ -0,0 +1,114 @@
1
+ export { View } from './View.js';
2
+ export { View as Column } from './View.js';
3
+ export { Row } from './Row.js';
4
+ export { Grid } from './Grid.js';
5
+ export { Stack } from './Stack.js';
6
+ export { Absolute } from './Absolute.js';
7
+ export type { PanEvent, SwipeEvent, SetTranslate } from './props.js';
8
+ export { setTranslate } from './translate.web.js';
9
+ export { Spacer } from './Spacer.js';
10
+ export { Text } from './Text.js';
11
+ export { Markdown, MarkdownScreen } from './Markdown.js';
12
+ export type { MdDoc, MdNode, MdInline } from './Markdown.js';
13
+ export { RichText, RichTextSpan } from './RichText.js';
14
+ export { Pressable } from './Pressable.js';
15
+ export { Button } from './Button.js';
16
+ export { Collapsible } from './Collapsible.js';
17
+ export { Accordion } from './Accordion.js';
18
+ export { Checkbox } from './Checkbox.js';
19
+ export { RadioGroup } from './RadioGroup.js';
20
+ export { DropdownMenu } from './DropdownMenu.js';
21
+ export { ContextMenu } from './ContextMenu.js';
22
+ export { Badge } from './Badge.js';
23
+ export { Separator } from './Separator.js';
24
+ export { Skeleton } from './Skeleton.js';
25
+ export { Avatar } from './Avatar.js';
26
+ export { AvatarGroup } from './AvatarGroup.js';
27
+ export type { AccordionItemSpec, AccordionProps, AvatarGroupProps, AvatarProps, BadgeProps, ButtonProps, CheckboxProps, CollapsibleProps, ContextMenuProps, DropdownMenuProps, MenuItem, RadioGroupProps, RadioOption, SegmentedControlProps, SeparatorProps, SkeletonProps, } from './props.js';
28
+ export { FormField } from './FormField.js';
29
+ export { FieldGroup } from './FieldGroup.js';
30
+ export { ListItem } from './ListItem.js';
31
+ export { InputNumber } from './InputNumber.js';
32
+ export { PinInput } from './PinInput.js';
33
+ export { Select } from './Select.js';
34
+ export { SelectMenu, Combobox, InputMenu } from './aliases.js';
35
+ export { InputTags } from './InputTags.js';
36
+ export { InputRating } from './InputRating.js';
37
+ export { CheckboxGroup } from './CheckboxGroup.js';
38
+ export type { CheckboxGroupProps, FieldGroupProps, ListItemComponent, ListItemProps, ListItemSlotProps, FormFieldProps, InputNumberProps, InputRatingProps, InputTagsProps, PinInputProps, SelectOption, SelectProps, } from './props.js';
39
+ export { Breadcrumb } from './Breadcrumb.js';
40
+ export { Pagination } from './Pagination.js';
41
+ export { Stepper } from './Stepper.js';
42
+ export { NavigationMenu } from './NavigationMenu.js';
43
+ export { CommandPalette } from './CommandPalette.js';
44
+ export type { BreadcrumbItem, BreadcrumbProps, CommandPaletteProps, NavigationMenuItem, NavigationMenuProps, PaginationProps, StepperProps, StepperStep, } from './props.js';
45
+ export { Table } from './Table.js';
46
+ export { Timeline } from './Timeline.js';
47
+ export { Tree } from './Tree.js';
48
+ export { Alert } from './Alert.js';
49
+ export { Card } from './Card.js';
50
+ export { Chip } from './Chip.js';
51
+ export { Kbd } from './Kbd.js';
52
+ export { Empty } from './Empty.js';
53
+ export { Banner } from './Banner.js';
54
+ export { User } from './User.js';
55
+ export { ProgressGroup } from './ProgressGroup.js';
56
+ export type { AlertProps, BannerProps, CardProps, ChipProps, EmptyProps, KbdProps, ProgressGroupProps, TableColumn, TableProps, TimelineItem, TimelineProps, TreeNode, TreeProps, UserProps, } from './props.js';
57
+ export { Link } from './Link.js';
58
+ export { NavLink } from './NavLink.js';
59
+ export { TextInput } from './TextInput.js';
60
+ export { TextArea } from './TextArea.js';
61
+ export { SearchInput } from './SearchInput.js';
62
+ export { SegmentedControl } from './SegmentedControl.js';
63
+ export { ScrollBox } from './ScrollBox.js';
64
+ export { ScrollView } from './ScrollView.js';
65
+ export { VirtualList } from './VirtualList.js';
66
+ export type { VirtualListProps } from './props.js';
67
+ export { Image } from './Image.js';
68
+ export { WebView } from './WebView.js';
69
+ export type { WebViewContentSize, WebViewHandle, WebViewLoadEvent, WebViewProps } from './props.js';
70
+ export { Overlay } from './Overlay.js';
71
+ export { Popover } from './Popover.js';
72
+ export { Hoverable } from './Hoverable.js';
73
+ export { Tooltip } from './Tooltip.js';
74
+ export { showToast } from './toast-anchor.js';
75
+ export type { HoverableProps, OverlayProps, PopoverAnchorRef, PopoverProps, PopoverPlacement, ToastContent, ToastOptions, ToastPosition, TooltipProps, } from './props.js';
76
+ export { useAnimation } from './anim.js';
77
+ export type { AnimatedValue } from './anim.js';
78
+ export { useThemeScheme, getThemeScheme, setThemePreference, getThemePreference, themeSchemeClasses, onThemeSchemeChange, applyThemeClasses, } from './theme/theme-scheme.js';
79
+ export { useColorScheme, getColorScheme } from './theme/colorScheme.web.js';
80
+ export type { ColorScheme } from './theme/colorScheme.web.js';
81
+ export { styled } from './styled.js';
82
+ export { openWindow } from './windows.web.js';
83
+ export { Screen } from './Screen.js';
84
+ export { Tabs } from './Tabs.js';
85
+ export type { TabSpec } from './Tabs.js';
86
+ export { Switch } from './Switch.js';
87
+ export { SafeArea } from './SafeArea.js';
88
+ export { KeyboardAvoiding } from './KeyboardAvoiding.js';
89
+ export { Drawer } from './Drawer.js';
90
+ export { useSafeAreaInsets } from './safeAreaInsets.js';
91
+ export type { SafeAreaInsets } from './safeAreaInsets.js';
92
+ export { useMeasure } from './useMeasure.js';
93
+ export type { MeasureBounds, MeasureResult, UseMeasureOptions } from './props.js';
94
+ export { ActivityIndicator } from './ActivityIndicator.js';
95
+ export { Meter } from './Meter.js';
96
+ export { Slider } from './Slider.js';
97
+ export { Icon } from './Icon.js';
98
+ export { Heading } from './Heading.js';
99
+ export { registerIcon, registerIcons } from './icons.js';
100
+ export type { IconGlyph } from './icons.js';
101
+ export type { ActivityIndicatorProps, HeadingProps, IconProps, MeterProps, RefreshProps, SearchInputProps, SliderProps, } from './props.js';
102
+ export { isNative } from './platform.web.js';
103
+ export { registerStack, getStack, stackEntries } from './stacks.web.js';
104
+ export { pushRoute, popRoute, routeStacks, pushDeepLink, routeFor, currentRoute, currentModalRoute, canGoBack, useCanGoBack, useRoute, useModalRoute, redirect, addBackInterceptor, registerScreens, registerRoutes, addRoutes, screenFor, hrefFor, layoutsForRoute, } from './route.web.js';
105
+ export { useBackInterceptor } from './use-back.js';
106
+ export { deriveRouteManifest, defineRoutes, mergeRouteManifests, manifestToJson, } from './route-table.js';
107
+ export type { BeforeLoad, BeforeLoadArgs, LinkProps, NavLinkProps, Route, RouteContext, RouteHead, RouteHeadExport, RouteMeta, RouteManifest, RouteManifestJson, RouteJson, RouteDataMode, RouteNameOfPath, RouteParamsFromSpecs, RoutePathParams, RoutePresentationsFromSpecs, RouteSpec, RouteSpecSet, ManifestRouteNames, ManifestRouteParams, ManifestRoutePresentations, SpecRouteInfo, ScreenTable, ModalOpenResult, OpenWindowOptions, } from './props.js';
108
+ export { createStore } from './store.js';
109
+ export type { Store, ReadableStore } from './store.js';
110
+ export { useStore } from './use-store.js';
111
+ export { Sheet } from './Sheet.js';
112
+ export { openSheet, closeSheet } from './sheet-service.web.js';
113
+ export type { SheetProps, SheetOpenOptions, OpenSheet } from './props.js';
114
+ export type { AbsoluteProps, DrawerProps, GridProps, ImageProps, KeyboardAvoidingProps, LayoutChildProps, PressableProps, RichTextProps, RichTextSpanProps, RowProps, ScreenProps, SafeAreaProps, ScrollBoxProps, ScrollViewProps, SpacerProps, StackProps, SwitchProps, TabsProps, TextAreaProps, TextInputProps, TextProps, ViewProps, } from './props.js';
@@ -1 +1 @@
1
- export * from './index.shared.js';
1
+ export * from './index.shared.web.js';
@@ -0,0 +1,3 @@
1
+ /** Own keyboard focus only for a modal body portal. Inert preserves the
2
+ * background's state while hiding it from both focus and the browser AX tree. */
3
+ export declare function isolateModalFocus(layer: HTMLElement, panel: HTMLElement, dismiss: () => void): () => void;
@@ -0,0 +1,10 @@
1
+ /** A redirect shares its request with the original stack. Claiming another
2
+ * stack supersedes its pending navigation without reviving a stale request. */
3
+ export interface NavigationRequest {
4
+ isCurrent(): boolean;
5
+ claim(stack: string): boolean;
6
+ }
7
+ export declare function createNavigationRequests(): {
8
+ invalidate: (stack: string) => number;
9
+ begin(stack: string): NavigationRequest;
10
+ };
@@ -0,0 +1,10 @@
1
+ import type { GridLayout, RootLayout, RootLayoutOptions } from '@nativescript/core';
2
+ /** Own the resources of one independently mounted overlay. RootLayout emits
3
+ * closed before removing the host, so that notification must never reenter close. */
4
+ export declare function createOverlayLifetime(owner: RootLayout, host: GridLayout, root: {
5
+ unmount(): void;
6
+ }, label: string, onFinish: (dismissed: boolean) => void): {
7
+ own(cleanup: () => void): void;
8
+ close(): void;
9
+ open(options?: RootLayoutOptions, afterOpen?: () => void | Promise<void>): void;
10
+ };
@@ -319,7 +319,8 @@ export interface TextAreaProps extends TextInputProps {
319
319
  * minHeight at the widget's measured line height. With `autoGrow` it
320
320
  * becomes the starting height instead of a fixed one. */
321
321
  rows?: number;
322
- /** Grow to fit content, capped by `maxRows`. Native TextView grows by
322
+ /** Grow on input and value updates, capped by `maxRows`, including when
323
+ * `value` is omitted. Native TextView grows by
323
324
  * default — this prop exists so web (<textarea> is fixed-rows) matches;
324
325
  * without it, native gets a fixed `rows`-high box like web. */
325
326
  autoGrow?: boolean;
@@ -917,14 +918,23 @@ export interface RouteMeta {
917
918
  /** Optional `loader` named export — a prefetch hook, not a data layer.
918
919
  * pushRoute fires it (fire-and-forget) before navigating so the
919
920
  * screen's `query$` reads hit a warm cache; boot/deep-link routes
920
- * skip it (the screen mounts in the same tick anyway). */
921
+ * skip it (the screen mounts in the same tick anyway). Ignored when
922
+ * `dataMode: 'baked'` — baked routes resolve from `manifest.baked`. */
921
923
  loader?: (params: Record<string, unknown>) => unknown;
924
+ /** Data provenance: 'live' (default) runs `loader` at navigation;
925
+ * 'baked' reads build-time output from the manifest's `baked` map —
926
+ * for file routes the loader lives in a `<route>.loader.ts` sibling
927
+ * that `xplat routes`/`xplat build` executes and never bundles. */
928
+ dataMode?: RouteDataMode;
922
929
  /** Optional guard awaited before a push commits. A thrown `redirect(...)`
923
930
  * short-circuits the attempted route. */
924
931
  beforeLoad?: BeforeLoad;
925
932
  /** Optional route title/meta declaration, or a params-only function. */
926
933
  head?: RouteHeadExport;
927
934
  }
935
+ /** How a route's data is produced — `'live'` runs the loader at navigation,
936
+ * `'baked'` freezes loader output into the bundle at build time. */
937
+ export type RouteDataMode = 'live' | 'baked';
928
938
  /** Output of `deriveRouteManifest` — `screens` feeds `registerScreens`
929
939
  * (native pushRoute + web outlet fallback), `routes` feeds web URL
930
940
  * matching, `layouts` catalogs `_layout` files by directory ('' = root). */
@@ -933,6 +943,10 @@ export interface RouteManifest {
933
943
  routes: RouteMeta[];
934
944
  layouts: Record<string, any>;
935
945
  loaders?: Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>;
946
+ /** Build-time loader output for `dataMode: 'baked'` routes — the
947
+ * generated `routes.gen.*` glue assigns it from `routes.gen.data`;
948
+ * programmatic hosts pass it on `RouteSpecSet`/`addRoutes` directly. */
949
+ baked?: Record<string, unknown>;
936
950
  }
937
951
  /** One programmatic route entry for `defineRoutes` — the manifest fields a
938
952
  * route file would have produced, supplied directly. `path` uses the
@@ -944,6 +958,7 @@ export interface RouteSpec {
944
958
  /** Default presentation, like a `+modal`/`+fade` filename suffix. */
945
959
  presentation?: 'push' | 'modal' | 'fade';
946
960
  loader?: RouteMeta['loader'];
961
+ dataMode?: RouteDataMode;
947
962
  beforeLoad?: BeforeLoad;
948
963
  head?: RouteHeadExport;
949
964
  /** Diagnostics label recorded on `RouteMeta.file` (warn strings). */
@@ -951,11 +966,103 @@ export interface RouteSpec {
951
966
  }
952
967
  /** Input to `defineRoutes`: the route list plus optional path-keyed layouts
953
968
  * — `layouts: { docs: Shell }` plays the `_layout.tsrx` role for every
954
- * route under `docs/*`. */
969
+ * route under `docs/*`. `baked` carries build-time data for
970
+ * `dataMode: 'baked'` specs — the host computes it (a content dir read, a
971
+ * build step) and ships it in the manifest. */
955
972
  export interface RouteSpecSet {
956
973
  routes: readonly RouteSpec[];
957
974
  layouts?: Record<string, any>;
975
+ baked?: Record<string, unknown>;
976
+ }
977
+ /** The host-consumable route schema — what `xplat routes` writes to
978
+ * `routes.gen.manifest.json` and `manifestToJson` produces from any
979
+ * RouteManifest. Same shape whether the routes came from the file dir
980
+ * or `defineRoutes`, so an external host (e.g. a web SSR tier) consumes
981
+ * one normalized list. `loader`/`guard`/`head` are presence flags — the
982
+ * functions don't cross the JSON boundary. */
983
+ export interface RouteManifestJson {
984
+ version: 1;
985
+ /** Layout dirs present, '' = the root `_layout` — sorted. */
986
+ layouts: string[];
987
+ /** Registered screen names, including any without a URL pattern. */
988
+ screens: string[];
989
+ routes: RouteJson[];
990
+ }
991
+ export interface RouteJson {
992
+ name: string;
993
+ /** Colon-syntax path — 'docs/:slug', '' for the root index. */
994
+ path: string;
995
+ params: string[];
996
+ presentation?: 'push' | 'modal' | 'fade';
997
+ dataMode?: RouteDataMode;
998
+ /** Layout dirs applying to this route, root '' first, innermost last. */
999
+ layouts: string[];
1000
+ /** Source label — file path or `programmatic:<path>`. */
1001
+ source: string;
1002
+ loader: boolean;
1003
+ guard: boolean;
1004
+ head: boolean;
1005
+ }
1006
+ /** Phantom key carrying a `defineRoutes` manifest's spec-derived route
1007
+ * types — type-level only, never present at runtime. Module-private so the
1008
+ * published declarations carry no value binding for it. */
1009
+ declare const specRouteTypes: unique symbol;
1010
+ /** ':id' or '[id]' segment → 'id'; a static segment contributes nothing. */
1011
+ type RouteParamOf<S extends string> = S extends `:${infer P}` ? P : S extends `[${infer P}]` ? P : never;
1012
+ type TrimSlashes<P extends string> = P extends `/${infer R}` ? TrimSlashes<R> : P extends `${infer R}/` ? TrimSlashes<R> : P;
1013
+ /** Route-dir vocabulary at the type level: '[id]' normalizes to ':id'. */
1014
+ type NormSegment<S extends string> = S extends `[${infer P}]` ? `:${P}` : S;
1015
+ type NormPath<P extends string> = P extends `${infer Head}/${infer Tail}` ? `${NormSegment<Head>}/${NormPath<Tail>}` : NormSegment<P>;
1016
+ /** The route name a spec `path` produces — `''`/`'index'` and a trailing
1017
+ * 'index' segment normalize like `specSegments` does at runtime. */
1018
+ export type RouteNameOfPath<P extends string> = NormPath<TrimSlashes<P>> extends infer N extends string ? N extends '' | 'index' ? 'index' : N extends `${infer R}/index` ? R : N : never;
1019
+ /** Param names in a spec path — `'docs/[slug]'` and `'docs/:slug'` both
1020
+ * give `'slug'`; static-only paths give `never`. */
1021
+ export type RoutePathParams<Path extends string> = TrimSlashes<Path> extends infer P extends string ? P extends `${infer Head}/${infer Tail}` ? RouteParamOf<Head> | RoutePathParams<Tail> : RouteParamOf<P> : never;
1022
+ type RouteParamRecord<Path extends string> = {
1023
+ [K in RoutePathParams<Path>]: string;
1024
+ };
1025
+ type SpecPaths<Specs extends readonly RouteSpec[]> = Specs[number] extends infer S ? S extends {
1026
+ path: infer P extends string;
1027
+ } ? P : never : never;
1028
+ type SpecsToParamMap<P extends string> = P extends string ? {
1029
+ [N in RouteNameOfPath<P>]: RouteParamRecord<P>;
1030
+ } : never;
1031
+ type UnionToIntersection<U> = (U extends unknown ? (value: U) => void : never) extends (value: infer I) => void ? I : never;
1032
+ /** name → params map for a spec list — same shape `routes.gen.types.ts`
1033
+ * emits for file routes, so the two merge with `&`/`|`. */
1034
+ export type RouteParamsFromSpecs<Specs extends readonly RouteSpec[]> = UnionToIntersection<SpecsToParamMap<SpecPaths<Specs>>>;
1035
+ type SpecPresentations<S> = S extends {
1036
+ path: infer P extends string;
1037
+ presentation: infer Pr;
1038
+ } ? {
1039
+ [N in RouteNameOfPath<P>]: Pr;
1040
+ } : {};
1041
+ export type RoutePresentationsFromSpecs<Specs extends readonly RouteSpec[]> = UnionToIntersection<SpecPresentations<Specs[number]>>;
1042
+ /** The spec-derived typing record `defineRoutes` brands onto its manifest
1043
+ * return — read it with the `ManifestRoute*` helpers, never directly. */
1044
+ export interface SpecRouteInfo<Specs extends readonly RouteSpec[]> {
1045
+ readonly [specRouteTypes]: {
1046
+ params: RouteParamsFromSpecs<Specs>;
1047
+ presentations: RoutePresentationsFromSpecs<Specs>;
1048
+ };
958
1049
  }
1050
+ /** Pull the `{name: params}` map out of a `defineRoutes` manifest's type —
1051
+ * `RouteParams & ManifestRouteParams<typeof manifest>` merges file and
1052
+ * programmatic routes into one typed navigation surface. A plain
1053
+ * `RouteManifest` (untagged) extracts to `{}`, so `ManifestRouteNames`
1054
+ * is `never` and unions degrade to the file-derived names. */
1055
+ export type ManifestRouteParams<M> = M extends {
1056
+ readonly [specRouteTypes]: {
1057
+ params: infer P;
1058
+ };
1059
+ } ? P : {};
1060
+ export type ManifestRouteNames<M> = keyof ManifestRouteParams<M> & string;
1061
+ export type ManifestRoutePresentations<M> = M extends {
1062
+ readonly [specRouteTypes]: {
1063
+ presentations: infer P;
1064
+ };
1065
+ } ? P : {};
959
1066
  export interface OpenWindowOptions {
960
1067
  /** Data made available to the native window content resolver. */
961
1068
  data?: Record<string, unknown>;
@@ -1624,3 +1731,4 @@ export interface ReadableStore<T> {
1624
1731
  export interface Store<T> extends ReadableStore<T> {
1625
1732
  set(next: T | ((prev: T) => T)): void;
1626
1733
  }
1734
+ export {};
@@ -29,7 +29,7 @@
29
29
  * platform's file and is skipped entirely; unsuffixed files are the
30
30
  * fallback (rank = prefer.length). Web callers pass ['web']; mobile
31
31
  * callers pass the running OS first. */
32
- import type { Route, RouteManifest, RouteMeta, RouteSpec, RouteSpecSet } from './props.js';
32
+ import type { Route, RouteManifest, RouteManifestJson, RouteMeta, RouteSpec, RouteSpecSet, SpecRouteInfo } from './props.js';
33
33
  /** Internal error carrier used by the public `redirect()` helper. Keeping
34
34
  * this in the shared route table gives both platform leaves the same guard
35
35
  * behavior without importing a platform runtime. */
@@ -43,8 +43,15 @@ export declare function deriveRouteManifest(files: Record<string, any>, prefer:
43
43
  * from their own sources, e.g. `readdirSync` over a content dir). Each
44
44
  * spec's `path` uses the route-dir vocabulary; `layouts` keys are path
45
45
  * prefixes playing the `_layout` role. Same-name duplicates inside the
46
- * set keep the later entry with a warn, matching merge precedence. */
47
- export declare function defineRoutes(input: readonly RouteSpec[] | RouteSpecSet): RouteManifest;
46
+ * set keep the later entry with a warn, matching merge precedence.
47
+ *
48
+ * The return is branded with the spec-derived route types — read them
49
+ * with `ManifestRouteParams`/`ManifestRouteNames`/
50
+ * `ManifestRoutePresentations` to merge programmatic names into the
51
+ * app's typed navigation surface (`RouteName | …`, `RouteParams & …`). */
52
+ export declare function defineRoutes<const Specs extends readonly RouteSpec[]>(input: Specs | (Omit<RouteSpecSet, 'routes'> & {
53
+ routes: Specs;
54
+ })): RouteManifest & SpecRouteInfo<Specs>;
48
55
  /** Compose manifests into one — file-derived base plus any number of
49
56
  * programmatic sets (`registerRoutes(mergeRouteManifests(fromDir, dynamic))`).
50
57
  * Registration order is precedence: on a same-name collision the later
@@ -52,6 +59,10 @@ export declare function defineRoutes(input: readonly RouteSpec[] | RouteSpecSet)
52
59
  * a warn fires once per colliding name. `layouts` merge key-wise the same
53
60
  * way. `matchRoute` order is rebuilt by specificity after the merge. */
54
61
  export declare function mergeRouteManifests(...manifests: RouteManifest[]): RouteManifest;
62
+ /** Serialize a manifest to the normalized `RouteManifestJson` shape — the
63
+ * same list `xplat routes` emits for file routes, produced here for
64
+ * programmatic/merged manifests so hosts consume one schema. */
65
+ export declare function manifestToJson(manifest: RouteManifest): RouteManifestJson;
55
66
  /** Match URL path segments against a manifest — returns the winning meta
56
67
  * plus extracted params, or null. First hit wins (routes are pre-sorted
57
68
  * by specificity). */
@@ -1,8 +1,8 @@
1
- import { SVGView } from './vendor/ui-svg/index.js';
1
+ import { SVGView } from './vendor/ui-svg/src/index.js';
2
2
  import type { IconGlyph } from './props.js';
3
3
  declare module '@nativescript-community/octane/intrinsics' {
4
4
  interface NativeScriptElements {
5
- svgview: Omit<Attributes<typeof SVGView>, 'src'> & {
5
+ svgview: Omit<import('@nativescript-community/octane/intrinsics').Attributes<typeof SVGView>, 'src'> & {
6
6
  /** SVGView awaits promise srcs — remote .svg URLs arrive as fetched markup. */
7
7
  src?: string | Promise<string>;
8
8
  stretch?: 'none' | 'fill' | 'aspectFit' | 'aspectFill';
@@ -0,0 +1,13 @@
1
+ /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
2
+ * responder until something else takes it, so a tap on blank chrome never
3
+ * dismisses the keyboard on its own.
4
+ *
5
+ * iOS: a single window-level UITapGestureRecognizer (ref-counted across
6
+ * attach calls) sees every touch in the app window — popups/sheets included —
7
+ * where a recognizer on an intermediate container proved unreliable. On each
8
+ * tap we hit-test and resign first responder unless the hit view is an
9
+ * editable text view (otherwise the field would focus-then-blur in the same
10
+ * tap — recognizers fire on touch-up, after the field's touch-down focus).
11
+ * Keyboard taps live in a separate UIWindow, so they never reach it.
12
+ * `cancelsTouchesInView` stays false so taps still reach buttons. */
13
+ export declare function attachTapToBlur(view: any): () => void;
@@ -1,16 +1,2 @@
1
- /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
2
- * responder until something else takes it, so a tap on blank chrome never
3
- * dismisses the keyboard on its own.
4
- *
5
- * iOS: a single window-level UITapGestureRecognizer (ref-counted across
6
- * attach calls) sees every touch in the app window — popups/sheets included —
7
- * where a recognizer on an intermediate container proved unreliable. On each
8
- * tap we hit-test and resign first responder unless the hit view is an
9
- * editable text view (otherwise the field would focus-then-blur in the same
10
- * tap — recognizers fire on touch-up, after the field's touch-down focus).
11
- * Keyboard taps live in a separate UIWindow, so they never reach it.
12
- * `cancelsTouchesInView` stays false so taps still reach buttons.
13
- *
14
- * Android: hides the soft keyboard from the currently focused view when a
15
- * tap lands on the attached container. */
1
+ /** Hide the Android soft keyboard when the user taps the attached view. */
16
2
  export declare function attachTapToBlur(view: any): () => void;
@@ -0,0 +1,3 @@
1
+ /** Dismiss the keyboard and release native editing focus. NativeScript's
2
+ * dismissSoftInput returns void; its return value is not a fallback signal. */
3
+ export declare function blurText(view: any): void;
@@ -1,4 +1,6 @@
1
- /** Controlled `text` write for TextInput/TextArea leaves. The driver's
1
+ /** Whether a textChange is the synchronous echo of our controlled write. */
2
+ export declare function isWritingText(view: object): boolean;
3
+ /** Controlled `text` write for TextInput/TextArea/SearchInput leaves. The driver's
2
4
  * generic prop path writes view.text verbatim; on Android the EditText
3
5
  * setText resets the cursor to 0 on every controlled write. Park and
4
6
  * restore the selection around the write (clamped to the new length so an
@@ -0,0 +1,5 @@
1
+ export type { ColorScheme } from '../props.js';
2
+ import type { ColorScheme } from '../props.js';
3
+ export declare function getColorScheme(): ColorScheme;
4
+ export declare function subscribeSystemScheme(cb: () => void): () => void;
5
+ export declare function useColorScheme(): ColorScheme;
@@ -0,0 +1,18 @@
1
+ import type { VirtualListEntry } from './virtual-list-layout.js';
2
+ export interface VirtualListCell<T> {
3
+ id: number;
4
+ typeKey: string;
5
+ generation: number;
6
+ entry: VirtualListEntry<T> | null;
7
+ rows: readonly VirtualListEntry<T>[];
8
+ }
9
+ /** Reuse physical hosts without retaining an off-window logical row subtree. */
10
+ export declare class VirtualListCellPool<T> {
11
+ private cells;
12
+ private byId;
13
+ private nextId;
14
+ update(entries: readonly VirtualListEntry<T>[]): readonly VirtualListCell<T>[];
15
+ get(id: number): VirtualListCell<T> | undefined;
16
+ isCurrent(id: number, rowKey: string, generation: number): boolean;
17
+ clear(): void;
18
+ }
@@ -67,7 +67,10 @@ export declare const SegmentedControl: Component<P.SegmentedControlProps>
67
67
  export declare const ScrollBox: Component<P.ScrollViewProps>
68
68
  export declare const ScrollView: Component<P.ScrollViewProps>
69
69
  /** AppKit fallback with keyed rows and one nonvirtualized scroll view. */
70
- export declare function VirtualList<T = any>(props: P.VirtualListProps<T> & { children?: any }): unknown
70
+ export declare function VirtualList<T = any>(
71
+ props: P.VirtualListProps<T> & { children?: any },
72
+ ): unknown
73
+
71
74
  export declare const Image: Component<P.ImageProps>
72
75
  export declare const WebView: Component<P.WebViewProps>
73
76
  export declare const CameraView: Component
@@ -75,6 +78,7 @@ export declare const Overlay: Component<P.OverlayProps>
75
78
  export declare const Popover: Component<P.PopoverProps>
76
79
  export declare const Hoverable: Component<P.HoverableProps>
77
80
  export declare const Tooltip: Component<P.TooltipProps>
81
+ export { Markdown, MarkdownScreen } from './generated/Markdown.js'
78
82
  export declare const Sheet: Component<P.SheetProps>
79
83
  export declare const Tabs: Component<P.TabsProps>
80
84
  export declare const Screen: Component<P.ScreenProps>
@@ -132,8 +136,16 @@ export declare function addRoutes(manifest: P.RouteManifest): void
132
136
  export declare function screenFor(name: string): P.ScreenTable[string] | undefined
133
137
  export declare function hrefFor(route: P.Route): string
134
138
  export declare function layoutsForRoute(name: string): any[]
135
- export declare function deriveRouteManifest(files: Record<string, any>, prefer: readonly string[], dir?: string): P.RouteManifest
136
- export declare function defineRoutes(input: readonly P.RouteSpec[] | P.RouteSpecSet): P.RouteManifest
139
+ export declare function deriveRouteManifest(
140
+ files: Record<string, any>,
141
+ prefer: readonly string[],
142
+ dir?: string,
143
+ ): P.RouteManifest
144
+
145
+ export declare function defineRoutes(
146
+ input: readonly P.RouteSpec[] | P.RouteSpecSet,
147
+ ): P.RouteManifest
148
+
137
149
  export declare function mergeRouteManifests(...manifests: P.RouteManifest[]): P.RouteManifest
138
150
  export declare function createStore<T>(initial: T): P.Store<T>
139
151
  export declare function useStore<T>(store: P.ReadableStore<T>): T
File without changes