@octane-xplat/ui 0.5.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.
Files changed (281) hide show
  1. package/README.md +3 -0
  2. package/dist/native/Absolute.native.tsrx.js +43 -0
  3. package/dist/native/Accordion.native.tsrx.js +75 -0
  4. package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
  5. package/dist/native/Alert.native.tsrx.js +74 -0
  6. package/dist/native/Avatar.native.tsrx.js +76 -0
  7. package/dist/native/AvatarGroup.native.tsrx.js +84 -0
  8. package/dist/native/Badge.native.tsrx.js +29 -0
  9. package/dist/native/Banner.native.tsrx.js +80 -0
  10. package/dist/native/Breadcrumb.native.tsrx.js +66 -0
  11. package/dist/native/Button.native.tsrx.js +62 -0
  12. package/dist/native/CameraView.native.tsrx.js +165 -0
  13. package/dist/native/Card.native.tsrx.js +64 -0
  14. package/dist/native/Checkbox.native.tsrx.js +58 -0
  15. package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
  16. package/dist/native/Chip.native.tsrx.js +83 -0
  17. package/dist/native/Collapsible.native.tsrx.js +74 -0
  18. package/dist/native/CommandPalette.native.tsrx.js +143 -0
  19. package/dist/native/ContextMenu.native.tsrx.js +140 -0
  20. package/dist/native/Drawer.native.tsrx.js +60 -0
  21. package/dist/native/DropdownMenu.native.tsrx.js +155 -0
  22. package/dist/native/Empty.native.tsrx.js +82 -0
  23. package/dist/native/FieldGroup.native.tsrx.js +39 -0
  24. package/dist/native/FormField.native.tsrx.js +53 -0
  25. package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
  26. package/dist/native/{ui59.js → Heading.native.tsrx.js} +2 -2
  27. package/dist/native/{ui58.js → Icon.native.tsrx.js} +4 -4
  28. package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
  29. package/dist/native/InputNumber.native.tsrx.js +146 -0
  30. package/dist/native/InputRating.native.tsrx.js +74 -0
  31. package/dist/native/InputTags.native.tsrx.js +131 -0
  32. package/dist/native/Kbd.native.tsrx.js +29 -0
  33. package/dist/native/{ui50.js → KeyboardAvoiding.native.tsrx.js} +1 -1
  34. package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
  35. package/dist/native/{ui55.js → Meter.native.tsrx.js} +2 -2
  36. package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
  37. package/dist/native/NavigationMenu.native.tsrx.js +67 -0
  38. package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
  39. package/dist/native/Pager.native.tsrx.js +282 -0
  40. package/dist/native/Pagination.native.tsrx.js +107 -0
  41. package/dist/native/PinInput.native.tsrx.js +94 -0
  42. package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
  43. package/dist/native/{ui16.js → Pressable.native.tsrx.js} +20 -14
  44. package/dist/native/ProgressGroup.native.tsrx.js +66 -0
  45. package/dist/native/RadioGroup.native.tsrx.js +85 -0
  46. package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
  47. package/dist/native/Row.native.tsrx.js +98 -0
  48. package/dist/native/{ui49.js → SafeArea.native.tsrx.js} +2 -2
  49. package/dist/native/{ui45.js → Screen.native.tsrx.js} +3 -3
  50. package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
  51. package/dist/native/ScrollView.native.tsrx.js +233 -0
  52. package/dist/native/SearchInput.native.tsrx.js +151 -0
  53. package/dist/native/SegmentedControl.native.tsrx.js +75 -0
  54. package/dist/native/Select.native.tsrx.js +202 -0
  55. package/dist/native/Separator.native.tsrx.js +25 -0
  56. package/dist/native/{ui63.js → Sheet.native.tsrx.js} +15 -7
  57. package/dist/native/Skeleton.native.tsrx.js +28 -0
  58. package/dist/native/Slider.native.tsrx.js +98 -0
  59. package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
  60. package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
  61. package/dist/native/Stepper.native.tsrx.js +75 -0
  62. package/dist/native/Switch.native.tsrx.js +33 -0
  63. package/dist/native/Table.native.tsrx.js +103 -0
  64. package/dist/native/Tabs.native.tsrx.js +163 -0
  65. package/dist/native/{ui14.js → Text.native.tsrx.js} +4 -3
  66. package/dist/native/{ui24.js → TextArea.native.tsrx.js} +17 -16
  67. package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
  68. package/dist/native/Timeline.native.tsrx.js +112 -0
  69. package/dist/native/Tree.native.tsrx.js +140 -0
  70. package/dist/native/User.native.tsrx.js +95 -0
  71. package/dist/native/Video.native.tsrx.js +248 -0
  72. package/dist/native/View.native.tsrx.js +98 -0
  73. package/dist/native/WebView.native.tsrx.js +110 -0
  74. package/dist/native/aliases.native.tsrx.js +38 -0
  75. package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
  76. package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
  77. package/dist/native/{ui51.js → android/DrawerLayout.android.tsrx.js} +5 -7
  78. package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
  79. package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
  80. package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
  81. package/dist/native/android/SeekBar.android.tsrx.js +34 -0
  82. package/dist/native/android/index.js +9 -0
  83. package/dist/native/android/openModal.android.js +39 -0
  84. package/dist/native/camera-permission.native.js +47 -0
  85. package/dist/native/child-array.js +15 -0
  86. package/dist/native/icons.js +25 -0
  87. package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
  88. package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
  89. package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
  90. package/dist/native/{ui53.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
  91. package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
  92. package/dist/native/{ui56.js → ios/UISlider.ios.tsrx.js} +5 -5
  93. package/dist/native/{ui47.js → ios/UISwitch.ios.tsrx.js} +5 -5
  94. package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
  95. package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
  96. package/dist/native/ios/index.js +11 -0
  97. package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
  98. package/dist/native/modal-presenter.native.js +19 -0
  99. package/dist/native/native/index.js +4 -0
  100. package/dist/native/octane-client-build.json +1 -1
  101. package/dist/native/{ui6.js → pan.native.tsrx.js} +9 -69
  102. package/dist/native/platform.native.js +10 -0
  103. package/dist/native/refresh-metrics.js +9 -0
  104. package/dist/native/refresh.native.js +177 -0
  105. package/dist/native/{ui34.js → root-layout.native.js} +6 -1
  106. package/dist/native/{ui21.js → route.native.js} +96 -12
  107. package/dist/native/sheet-detents.native.js +102 -0
  108. package/dist/native/{ui64.js → sheet-service.native.js} +19 -9
  109. package/dist/native/sheet-snap.js +35 -0
  110. package/dist/native/text-write.native.js +27 -0
  111. package/dist/native/{ui42.js → theme/status-bar-scheme.native.js} +2 -2
  112. package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
  113. package/dist/native/{ui40.js → toast-anchor.native.tsrx.js} +3 -3
  114. package/dist/native/translate.native.js +11 -0
  115. package/dist/native/ui.js +93 -55
  116. package/dist/native/use-back.native.tsrx.js +9 -0
  117. package/dist/native/{ui52.js → useMeasure.native.tsrx.js} +1 -1
  118. package/dist/native/video-chrome.native.tsrx.js +365 -0
  119. package/dist/web/Absolute.web.tsrx.js +47 -0
  120. package/dist/web/Accordion.web.tsrx.js +85 -0
  121. package/dist/web/{ui48.js → ActivityIndicator.web.tsrx.js} +1 -1
  122. package/dist/web/Alert.web.tsrx.js +79 -0
  123. package/dist/web/Avatar.web.tsrx.js +106 -0
  124. package/dist/web/AvatarGroup.web.tsrx.js +108 -0
  125. package/dist/web/Badge.web.tsrx.js +37 -0
  126. package/dist/web/Banner.web.tsrx.js +79 -0
  127. package/dist/web/Breadcrumb.web.tsrx.js +135 -0
  128. package/dist/web/Button.web.tsrx.js +45 -0
  129. package/dist/web/CameraView.web.tsrx.js +310 -0
  130. package/dist/web/Card.web.tsrx.js +73 -0
  131. package/dist/web/Checkbox.web.tsrx.js +89 -0
  132. package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
  133. package/dist/web/Chip.web.tsrx.js +64 -0
  134. package/dist/web/Collapsible.web.tsrx.js +94 -0
  135. package/dist/web/CommandPalette.web.tsrx.js +125 -0
  136. package/dist/web/ContextMenu.web.tsrx.js +154 -0
  137. package/dist/web/{ui45.js → Drawer.web.tsrx.js} +13 -9
  138. package/dist/web/DropdownMenu.web.tsrx.js +162 -0
  139. package/dist/web/Empty.web.tsrx.js +89 -0
  140. package/dist/web/FieldGroup.web.tsrx.js +57 -0
  141. package/dist/web/FormField.web.tsrx.js +92 -0
  142. package/dist/web/Grid.web.tsrx.js +65 -0
  143. package/dist/web/{ui54.js → Heading.web.tsrx.js} +2 -2
  144. package/dist/web/{ui53.js → Icon.web.tsrx.js} +2 -2
  145. package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
  146. package/dist/web/InputNumber.web.tsrx.js +99 -0
  147. package/dist/web/InputRating.web.tsrx.js +72 -0
  148. package/dist/web/InputTags.web.tsrx.js +122 -0
  149. package/dist/web/Kbd.web.tsrx.js +37 -0
  150. package/dist/web/{ui50.js → Meter.web.tsrx.js} +1 -1
  151. package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
  152. package/dist/web/NavigationMenu.web.tsrx.js +118 -0
  153. package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
  154. package/dist/web/Pager.web.tsrx.js +337 -0
  155. package/dist/web/Pagination.web.tsrx.js +80 -0
  156. package/dist/web/PinInput.web.tsrx.js +72 -0
  157. package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
  158. package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
  159. package/dist/web/ProgressGroup.web.tsrx.js +109 -0
  160. package/dist/web/RadioGroup.web.tsrx.js +69 -0
  161. package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
  162. package/dist/web/Row.web.tsrx.js +250 -0
  163. package/dist/web/{ui43.js → SafeArea.web.tsrx.js} +1 -1
  164. package/dist/web/{ui39.js → Screen.web.tsrx.js} +1 -1
  165. package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
  166. package/dist/web/ScrollView.web.tsrx.js +388 -0
  167. package/dist/web/SearchInput.web.tsrx.js +137 -0
  168. package/dist/web/SegmentedControl.web.tsrx.js +75 -0
  169. package/dist/web/Select.web.tsrx.js +149 -0
  170. package/dist/web/Separator.web.tsrx.js +42 -0
  171. package/dist/web/Sheet.web.tsrx.js +81 -0
  172. package/dist/web/Skeleton.web.tsrx.js +56 -0
  173. package/dist/web/Slider.web.tsrx.js +97 -0
  174. package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
  175. package/dist/web/Stack.web.tsrx.js +47 -0
  176. package/dist/web/Stepper.web.tsrx.js +65 -0
  177. package/dist/web/Switch.web.tsrx.js +59 -0
  178. package/dist/web/Table.web.tsrx.js +161 -0
  179. package/dist/web/{ui40.js → Tabs.web.tsrx.js} +33 -16
  180. package/dist/web/{ui13.js → Text.web.tsrx.js} +18 -50
  181. package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
  182. package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
  183. package/dist/web/Timeline.web.tsrx.js +172 -0
  184. package/dist/web/Tree.web.tsrx.js +146 -0
  185. package/dist/web/User.web.tsrx.js +116 -0
  186. package/dist/web/Video.web.tsrx.js +400 -0
  187. package/dist/web/View.web.tsrx.js +250 -0
  188. package/dist/web/WebView.web.tsrx.js +235 -0
  189. package/dist/web/aliases.web.tsrx.js +24 -0
  190. package/dist/web/{ui36.js → anim.web.tsrx.js} +3 -35
  191. package/dist/web/child-array.js +15 -0
  192. package/dist/web/icons.js +25 -0
  193. package/dist/web/octane-client-build.json +1 -1
  194. package/dist/web/pan.web.tsrx.js +66 -0
  195. package/dist/web/platform.web.js +9 -0
  196. package/dist/web/refresh-metrics.js +9 -0
  197. package/dist/web/refresh.web.js +133 -0
  198. package/dist/web/{ui18.js → route.web.js} +14 -2
  199. package/dist/web/sheet-detents.web.js +103 -0
  200. package/dist/web/{ui60.js → sheet-service.web.js} +5 -1
  201. package/dist/web/sheet-snap.js +35 -0
  202. package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
  203. package/dist/web/{ui35.js → toast-anchor.web.tsrx.js} +3 -3
  204. package/dist/web/transform.web.js +43 -0
  205. package/dist/web/translate.web.js +13 -0
  206. package/dist/web/ui.js +91 -53
  207. package/dist/web/use-back.web.tsrx.js +9 -0
  208. package/dist/web/video-chrome.web.tsrx.js +207 -0
  209. package/dist/web/{ui34.js → web/Hoverable.web.tsrx.js} +6 -6
  210. package/dist/web/web/Tooltip.web.tsrx.js +183 -0
  211. package/dist/web/web/index.js +3 -0
  212. package/package.json +30 -3
  213. package/src/theme/tokens.css +1380 -200
  214. package/types/android.d.ts +53 -0
  215. package/types/index.d.ts +32 -17
  216. package/types/index.native.d.ts +273 -0
  217. package/types/index.web.d.ts +272 -0
  218. package/types/ios.d.ts +59 -0
  219. package/types/native.d.ts +5 -0
  220. package/types/props.d.ts +930 -40
  221. package/types/web.d.ts +17 -0
  222. package/dist/native/ui10.js +0 -32
  223. package/dist/native/ui25.js +0 -141
  224. package/dist/native/ui27.js +0 -61
  225. package/dist/native/ui39.js +0 -103
  226. package/dist/native/ui4.js +0 -24
  227. package/dist/native/ui46.js +0 -267
  228. package/dist/native/ui57.js +0 -19
  229. package/dist/native/ui60.js +0 -14
  230. package/dist/native/ui7.js +0 -52
  231. package/dist/web/ui10.js +0 -46
  232. package/dist/web/ui11.js +0 -42
  233. package/dist/web/ui22.js +0 -108
  234. package/dist/web/ui23.js +0 -96
  235. package/dist/web/ui26.js +0 -45
  236. package/dist/web/ui3.js +0 -31
  237. package/dist/web/ui30.js +0 -34
  238. package/dist/web/ui41.js +0 -43
  239. package/dist/web/ui44.js +0 -42
  240. package/dist/web/ui5.js +0 -168
  241. package/dist/web/ui51.js +0 -47
  242. package/dist/web/ui52.js +0 -19
  243. package/dist/web/ui55.js +0 -17
  244. package/dist/web/ui59.js +0 -44
  245. package/dist/web/ui6.js +0 -94
  246. package/dist/web/ui7.js +0 -62
  247. package/dist/web/ui8.js +0 -46
  248. package/dist/web/ui9.js +0 -46
  249. /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
  250. /package/dist/native/{ui41.js → anim.native.tsrx.js} +0 -0
  251. /package/dist/native/{ui2.js → cx.js} +0 -0
  252. /package/dist/native/{ui3.js → escape-props.native.js} +0 -0
  253. /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
  254. /package/dist/native/{ui54.js → meter-math.js} +0 -0
  255. /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
  256. /package/dist/native/{ui37.js → popover-position.js} +0 -0
  257. /package/dist/native/{ui19.js → route-table.js} +0 -0
  258. /package/dist/native/{ui48.js → safeAreaInsets.native.tsrx.js} +0 -0
  259. /package/dist/native/{ui18.js → stacks.native.js} +0 -0
  260. /package/dist/native/{ui61.js → store.js} +0 -0
  261. /package/dist/native/{ui43.js → styled.native.tsrx.js} +0 -0
  262. /package/dist/native/{ui28.js → svg.native.js} +0 -0
  263. /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
  264. /package/dist/native/{ui62.js → use-store.native.tsrx.js} +0 -0
  265. /package/dist/native/{ui44.js → windows.native.js} +0 -0
  266. /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
  267. /package/dist/web/{ui28.js → cx.js} +0 -0
  268. /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
  269. /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
  270. /package/dist/web/{ui49.js → meter-math.js} +0 -0
  271. /package/dist/web/{ui47.js → platformProps.web.js} +0 -0
  272. /package/dist/web/{ui32.js → popover-position.js} +0 -0
  273. /package/dist/web/{ui17.js → route-table.js} +0 -0
  274. /package/dist/web/{ui42.js → safeAreaInsets.web.tsrx.js} +0 -0
  275. /package/dist/web/{ui56.js → stacks.web.js} +0 -0
  276. /package/dist/web/{ui57.js → store.js} +0 -0
  277. /package/dist/web/{ui37.js → styled.web.tsrx.js} +0 -0
  278. /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
  279. /package/dist/web/{ui58.js → use-store.web.tsrx.js} +0 -0
  280. /package/dist/web/{ui46.js → useMeasure.web.tsrx.js} +0 -0
  281. /package/dist/web/{ui38.js → windows.web.js} +0 -0
@@ -0,0 +1,171 @@
1
+ import { cx } from "../cx.js";
2
+ import "../Text.native.tsrx.js";
3
+ import "../Pressable.native.tsrx.js";
4
+ import { getIcon } from "../icons.js";
5
+ import "../Icon.native.tsrx.js";
6
+ import { registerStack } from "../stacks.native.js";
7
+ import "../RouteHost.native.tsrx.js";
8
+ import "../route.native.js";
9
+ import { createNativeScriptRoot, defineUniversalComponent, markWarm, memo, universalComponent, universalPlan, universalProps, universalValue, useBatch, warmChild } from "@nativescript-community/octane";
10
+ import { Frame, GridLayout, Page, TabViewItem } from "@nativescript/core";
11
+ //#region src/android/BottomNavigationView.android.tsrx
12
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
13
+ "kind": "range",
14
+ "children": [{
15
+ "kind": "slot",
16
+ "slot": 0
17
+ }]
18
+ });
19
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
20
+ "kind": "host",
21
+ "type": "tabview",
22
+ "bindings": [
23
+ ["id", 0],
24
+ ["className", 1],
25
+ ["style", 2],
26
+ ["items", 3],
27
+ ["selectedIndex", 4],
28
+ ["onSelectedIndexChanged", 5],
29
+ ["onLoaded", 6]
30
+ ]
31
+ });
32
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
33
+ "kind": "slot",
34
+ "slot": 0
35
+ });
36
+ var TabPane = defineUniversalComponent("nativescript", function TabPane(props) {
37
+ return universalValue(__octaneUniversalPlan0, [props.render()]);
38
+ }, { "module": "@nativescript-community/octane" });
39
+ var paneRoots = /* @__PURE__ */ new WeakMap();
40
+ var tabsByView = /* @__PURE__ */ new WeakMap();
41
+ var itemsCache = /* @__PURE__ */ new WeakMap();
42
+ var iconWarned = /* @__PURE__ */ new Set();
43
+ function applyIcon(item, name) {
44
+ const glyph = getIcon(name);
45
+ if (!glyph) {
46
+ warnIconOnce(name, `tab icon '${name}' isn't registered — call registerIcons() at boot.`);
47
+ return;
48
+ }
49
+ if (glyph.src) item.iconSource = glyph.src;
50
+ else if (glyph.font) {
51
+ item.iconSource = "font://" + glyph.font.glyph;
52
+ item.iconFontFamily = glyph.font.family;
53
+ } else if (glyph.text) item.iconSource = "font://" + glyph.text;
54
+ else warnIconOnce(name, `tab icon '${name}' has no src/font/text representation — the platform tab bar can't render svg/markup glyphs.`);
55
+ }
56
+ function warnIconOnce(name, msg) {
57
+ if (iconWarned.has(name)) return;
58
+ iconWarned.add(name);
59
+ console.warn("[octane-xplat] " + msg);
60
+ }
61
+ function itemsFor(tabs) {
62
+ let items = itemsCache.get(tabs);
63
+ if (items !== void 0) return items;
64
+ items = tabs.map((t) => {
65
+ const item = new TabViewItem();
66
+ item.title = t.title;
67
+ if (t.icon) applyIcon(item, t.icon);
68
+ if (t.stack) {
69
+ const frame = new Frame();
70
+ frame.once("loaded", () => {
71
+ frame.navigate({ create: () => {
72
+ const page = new Page();
73
+ page.actionBarHidden = true;
74
+ const pane = new GridLayout();
75
+ page.content = pane;
76
+ createNativeScriptRoot(pane).render(TabPane, { render: t.render });
77
+ return page;
78
+ } });
79
+ });
80
+ registerStack(t.stack, frame);
81
+ item.view = frame;
82
+ return item;
83
+ }
84
+ const cv = new GridLayout();
85
+ tabsByView.set(cv, t.render);
86
+ item.view = cv;
87
+ return item;
88
+ });
89
+ itemsCache.set(tabs, items);
90
+ return items;
91
+ }
92
+ function mountPanes(e) {
93
+ const tv = e.object;
94
+ for (const item of tv.items) {
95
+ const cv = item.view;
96
+ if (!(cv instanceof GridLayout) || paneRoots.has(cv)) continue;
97
+ const render = tabsByView.get(cv);
98
+ if (!render) continue;
99
+ const root = createNativeScriptRoot(cv);
100
+ paneRoots.set(cv, root);
101
+ root.render(TabPane, { render });
102
+ }
103
+ }
104
+ var NavInner = defineUniversalComponent("nativescript", function NavInner(props) {
105
+ return universalValue(__octaneUniversalPlan1, [
106
+ props.id,
107
+ cx(props.className),
108
+ props.style,
109
+ itemsFor(props.tabs),
110
+ props.selectedIndex,
111
+ (e) => props.onSelectedIndexChanged?.(e.value),
112
+ mountPanes
113
+ ]);
114
+ }, { "module": "@nativescript-community/octane" });
115
+ var MemoNav = memo(NavInner, (a, b) => a.tabs === b.tabs && a.selectedIndex === b.selectedIndex);
116
+ var BottomNavigationView = defineUniversalComponent("nativescript", markWarm(function BottomNavigationView(props) {
117
+ useBatch([], () => {
118
+ warmChild(MemoNav, {
119
+ id: props.id,
120
+ className: props.className,
121
+ style: props.style,
122
+ tabs: props.tabs,
123
+ selectedIndex: props.selectedIndex,
124
+ onSelectedIndexChanged: props.onSelectedIndexChanged
125
+ });
126
+ });
127
+ return universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", MemoNav, universalProps([
128
+ [
129
+ "set",
130
+ "id",
131
+ props.id
132
+ ],
133
+ [
134
+ "set",
135
+ "className",
136
+ props.className
137
+ ],
138
+ [
139
+ "set",
140
+ "style",
141
+ props.style
142
+ ],
143
+ [
144
+ "set",
145
+ "tabs",
146
+ props.tabs
147
+ ],
148
+ [
149
+ "set",
150
+ "selectedIndex",
151
+ props.selectedIndex
152
+ ],
153
+ [
154
+ "set",
155
+ "onSelectedIndexChanged",
156
+ props.onSelectedIndexChanged
157
+ ]
158
+ ]))]);
159
+ }, (__wp) => {
160
+ const props = __wp;
161
+ warmChild(MemoNav, {
162
+ id: props.id,
163
+ className: props.className,
164
+ style: props.style,
165
+ tabs: props.tabs,
166
+ selectedIndex: props.selectedIndex,
167
+ onSelectedIndexChanged: props.onSelectedIndexChanged
168
+ });
169
+ }), { "module": "@nativescript-community/octane" });
170
+ //#endregion
171
+ export { BottomNavigationView };
@@ -0,0 +1,27 @@
1
+ import { cx } from "../cx.js";
2
+ import { applyNativeProps } from "../platformProps.native.js";
3
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
4
+ //#region src/android/CircularProgressIndicator.android.tsrx
5
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
+ "kind": "host",
7
+ "type": "activityindicator",
8
+ "bindings": [
9
+ ["id", 0],
10
+ ["className", 1],
11
+ ["style", 2],
12
+ ["busy", 3],
13
+ ["ref", 4]
14
+ ]
15
+ });
16
+ var CircularProgressIndicator = defineUniversalComponent("nativescript", function CircularProgressIndicator(props) {
17
+ if (props.busy === false) return null;
18
+ return universalValue(__octaneUniversalPlan0, [
19
+ props.id,
20
+ cx(props.className),
21
+ props.style,
22
+ props.busy ?? true,
23
+ (el) => applyNativeProps(el, props)
24
+ ]);
25
+ }, { "module": "@nativescript-community/octane" });
26
+ //#endregion
27
+ export { CircularProgressIndicator };
@@ -1,8 +1,7 @@
1
- import { cx } from "./ui2.js";
1
+ import { cx } from "../cx.js";
2
2
  import { defineUniversalComponent, hookSlots, registerElement, universalIf, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
3
- import { Application } from "@nativescript/core";
4
3
  import { Drawer, install } from "@nativescript-community/ui-drawer";
5
- //#region src/Drawer.native.tsrx
4
+ //#region src/android/DrawerLayout.android.tsrx
6
5
  var _hs$ = /* @__PURE__ */ hookSlots(2);
7
6
  var _h$0 = /* @__PURE__ */ Symbol(_hs$);
8
7
  var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
@@ -39,9 +38,8 @@ var __octaneUniversalPlan1 = universalPlan("nativescript", {
39
38
  });
40
39
  install();
41
40
  registerElement("drawer", Drawer);
42
- var Drawer$1 = defineUniversalComponent("nativescript", function Drawer(props) {
41
+ var DrawerLayout = defineUniversalComponent("nativescript", function DrawerLayout(props) {
43
42
  const host = useRef(null, _h$0);
44
- const platformProps = Application.ios != null ? props.ios : props.android;
45
43
  useEffect(() => {
46
44
  const d = host.current;
47
45
  if (!d) return;
@@ -52,7 +50,7 @@ var Drawer$1 = defineUniversalComponent("nativescript", function Drawer(props) {
52
50
  props.id,
53
51
  (d) => {
54
52
  host.current = d;
55
- if (d && platformProps) Object.assign(d, platformProps);
53
+ if (d && props.android) Object.assign(d, props.android);
56
54
  },
57
55
  cx("vx-drawer", props.className),
58
56
  props.style,
@@ -63,4 +61,4 @@ var Drawer$1 = defineUniversalComponent("nativescript", function Drawer(props) {
63
61
  ]);
64
62
  }, { "module": "@nativescript-community/octane" });
65
63
  //#endregion
66
- export { Drawer$1 as Drawer };
64
+ export { DrawerLayout };
@@ -0,0 +1,62 @@
1
+ import { applyThemeClasses } from "../theme/theme-scheme.js";
2
+ import { modalPresenter } from "../modal-presenter.native.js";
3
+ import { createNativeScriptRoot, defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
4
+ import { Frame, GridLayout } from "@nativescript/core";
5
+ //#region src/android/MaterialDialog.android.tsrx
6
+ var _hs$ = /* @__PURE__ */ hookSlots(2);
7
+ var _h$0 = /* @__PURE__ */ Symbol(_hs$);
8
+ var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
9
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
10
+ "kind": "range",
11
+ "children": [{
12
+ "kind": "slot",
13
+ "slot": 0
14
+ }]
15
+ });
16
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
17
+ "kind": "range",
18
+ "children": []
19
+ });
20
+ var Panel = defineUniversalComponent("nativescript", function Panel(props) {
21
+ return universalValue(__octaneUniversalPlan0, [props.children]);
22
+ }, { "module": "@nativescript-community/octane" });
23
+ var MaterialDialog = defineUniversalComponent("nativescript", function MaterialDialog(props) {
24
+ const shown = useRef(null, _h$0);
25
+ useEffect(() => {
26
+ if (props.open && !shown.current) {
27
+ const presenter = modalPresenter(Frame.topmost());
28
+ if (!presenter) {
29
+ console.warn("[Modal] open dropped — no live presenter (currentPage mid-navigation or no active frame).");
30
+ return;
31
+ }
32
+ const host = new GridLayout();
33
+ const unbindTheme = applyThemeClasses(host, "vx-modal-host");
34
+ const root = createNativeScriptRoot(host);
35
+ shown.current = {
36
+ host,
37
+ root,
38
+ unbindTheme
39
+ };
40
+ if (props.component) root.render(props.component, props.params ?? {});
41
+ else root.render(Panel, { children: props.children });
42
+ const fullscreen = props.presentation ? props.presentation === "fullscreen" : props.fullscreen ?? true;
43
+ presenter.showModal(host, {
44
+ context: {},
45
+ closeCallback: (result) => {
46
+ shown.current?.unbindTheme?.();
47
+ shown.current = null;
48
+ props.onClose?.(result);
49
+ },
50
+ fullscreen,
51
+ animated: true
52
+ });
53
+ } else if (!props.open && shown.current) {
54
+ const { host } = shown.current;
55
+ shown.current = null;
56
+ host.closeModal();
57
+ }
58
+ }, [props.open], _h$1);
59
+ return universalValue(__octaneUniversalPlan1, []);
60
+ }, { "module": "@nativescript-community/octane" });
61
+ //#endregion
62
+ export { MaterialDialog };
@@ -0,0 +1,28 @@
1
+ import { cx } from "../cx.js";
2
+ import { applyEscapeProps } from "../escape-props.native.js";
3
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
4
+ //#region src/android/MaterialSwitch.android.tsrx
5
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
+ "kind": "host",
7
+ "type": "switch",
8
+ "bindings": [
9
+ ["ref", 0],
10
+ ["id", 1],
11
+ ["className", 2],
12
+ ["style", 3],
13
+ ["checked", 4],
14
+ ["onCheckedChange", 5]
15
+ ]
16
+ });
17
+ var MaterialSwitch = defineUniversalComponent("nativescript", function MaterialSwitch(props) {
18
+ return universalValue(__octaneUniversalPlan0, [
19
+ (v) => applyEscapeProps(v, props),
20
+ props.id,
21
+ cx(props.className),
22
+ props.style,
23
+ props.checked,
24
+ (e) => props.onCheckedChange?.(e.value)
25
+ ]);
26
+ }, { "module": "@nativescript-community/octane" });
27
+ //#endregion
28
+ export { MaterialSwitch };
@@ -0,0 +1,248 @@
1
+ import { cx } from "../cx.js";
2
+ import { ActivityIndicator } from "../ActivityIndicator.native.tsrx.js";
3
+ import { createPullToRefresh } from "../refresh.native.js";
4
+ import { defineUniversalComponent, hookSlots, memo, universalComponent, universalIf, universalPlan, universalProps, universalValue, useEffect, useRef } from "@nativescript-community/octane";
5
+ import { ScrollView } from "@nativescript/core";
6
+ //#region src/android/RecyclerView.android.tsrx
7
+ var _hs$ = /* @__PURE__ */ hookSlots(7);
8
+ var _h$0 = /* @__PURE__ */ Symbol(_hs$);
9
+ var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
10
+ var _h$2 = /* @__PURE__ */ Symbol(_hs$ + 2);
11
+ var _h$3 = /* @__PURE__ */ Symbol(_hs$ + 3);
12
+ var _h$4 = /* @__PURE__ */ Symbol(_hs$ + 4);
13
+ var _h$5 = /* @__PURE__ */ Symbol(_hs$ + 5);
14
+ var _h$6 = /* @__PURE__ */ Symbol(_hs$ + 6);
15
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
16
+ "kind": "host",
17
+ "type": "gridlayout",
18
+ "children": [{
19
+ "kind": "slot",
20
+ "slot": 0
21
+ }]
22
+ });
23
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
24
+ "kind": "host",
25
+ "type": "listview",
26
+ "propsSlot": 0
27
+ });
28
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
29
+ "kind": "host",
30
+ "type": "gridlayout",
31
+ "bindings": [["className", 0], ["style", 1]],
32
+ "children": [{
33
+ "kind": "slot",
34
+ "slot": 2
35
+ }, {
36
+ "kind": "host",
37
+ "type": "flexboxlayout",
38
+ "props": {
39
+ "className": "vx-refresh",
40
+ "verticalAlignment": "top"
41
+ },
42
+ "bindings": [
43
+ ["ref", 3],
44
+ ["height", 4],
45
+ ["translateY", 5]
46
+ ],
47
+ "children": [{
48
+ "kind": "slot",
49
+ "slot": 6
50
+ }]
51
+ }]
52
+ });
53
+ var __octaneUniversalPlan3 = universalPlan("nativescript", {
54
+ "kind": "slot",
55
+ "slot": 0
56
+ });
57
+ var __octaneUniversalPlan4 = universalPlan("nativescript", {
58
+ "kind": "slot",
59
+ "slot": 0
60
+ });
61
+ var __octaneUniversalPlan5 = universalPlan("nativescript", {
62
+ "kind": "range",
63
+ "children": [{
64
+ "kind": "slot",
65
+ "slot": 0
66
+ }]
67
+ });
68
+ var __octaneUniversalPlan6 = universalPlan("nativescript", {
69
+ "kind": "slot",
70
+ "slot": 0
71
+ });
72
+ function rejectNestedScrollView(event) {
73
+ let parent = event.object?.parent;
74
+ while (parent) {
75
+ if (parent instanceof ScrollView) throw new Error("[RecyclerView] cannot be nested inside native ScrollView. Use ScrollBox so the list owns scrolling.");
76
+ parent = parent.parent;
77
+ }
78
+ }
79
+ var RecyclerViewInner = defineUniversalComponent("nativescript", function RecyclerViewInner(props) {
80
+ const lv = useRef(null, _h$0);
81
+ useEffect(() => {
82
+ const bag = props.refresh;
83
+ if (!bag || !lv.current) return;
84
+ bag.ctl.current = createPullToRefresh({
85
+ scroller: lv.current,
86
+ indicator: bag.indicator.current,
87
+ isAtTop: () => (lv.current?.android?.computeVerticalScrollOffset?.() ?? 0) <= 0,
88
+ cfg: bag.cfg
89
+ });
90
+ return () => {
91
+ bag.ctl.current?.detach();
92
+ bag.ctl.current = null;
93
+ };
94
+ }, [], _h$1);
95
+ return universalValue(__octaneUniversalPlan1, [universalProps([
96
+ [
97
+ "set",
98
+ "ref",
99
+ (v) => {
100
+ lv.current = v;
101
+ }
102
+ ],
103
+ [
104
+ "set",
105
+ "id",
106
+ props.id
107
+ ],
108
+ [
109
+ "set",
110
+ "className",
111
+ cx(props.className)
112
+ ],
113
+ [
114
+ "set",
115
+ "style",
116
+ props.style
117
+ ],
118
+ [
119
+ "set",
120
+ "items",
121
+ props.items
122
+ ],
123
+ [
124
+ "set",
125
+ "onLoadMoreItems",
126
+ props.onEndReached
127
+ ],
128
+ [
129
+ "set",
130
+ "onLoaded",
131
+ rejectNestedScrollView
132
+ ],
133
+ [
134
+ "set",
135
+ "renderItem",
136
+ (item, index) => universalValue(__octaneUniversalPlan0, [props.renderItem(item, index)])
137
+ ],
138
+ ["spread", props.android]
139
+ ])]);
140
+ }, { "module": "@nativescript-community/octane" });
141
+ var MemoListView = memo(RecyclerViewInner, (a, b) => a.items === b.items && a.className === b.className && a.style === b.style && a.id === b.id && a.onEndReached === b.onEndReached && a.android === b.android && a.refresh === b.refresh);
142
+ var RecyclerView = defineUniversalComponent("nativescript", function RecyclerView(props) {
143
+ const refreshCapable = props.onRefresh != null || props.refreshing != null;
144
+ const cfg = useRef({}, _h$2);
145
+ cfg.current = {
146
+ onRefresh: props.onRefresh,
147
+ refreshing: props.refreshing,
148
+ threshold: props.refreshThreshold
149
+ };
150
+ const indicator = useRef(null, _h$3);
151
+ const ctl = useRef(null, _h$4);
152
+ const refresh = useRef({
153
+ cfg,
154
+ indicator,
155
+ ctl
156
+ }, _h$5);
157
+ useEffect(() => {
158
+ ctl.current?.sync();
159
+ }, [props.refreshing], _h$6);
160
+ return universalValue(__octaneUniversalPlan6, [universalIf(props.items.length > 0, () => {
161
+ return universalValue(__octaneUniversalPlan4, [universalIf(refreshCapable, () => {
162
+ return universalValue(__octaneUniversalPlan2, [
163
+ cx("vx-refresh-wrap", props.className),
164
+ props.style,
165
+ universalComponent("nativescript", MemoListView, universalProps([
166
+ [
167
+ "set",
168
+ "id",
169
+ props.id
170
+ ],
171
+ [
172
+ "set",
173
+ "items",
174
+ props.items
175
+ ],
176
+ [
177
+ "set",
178
+ "renderItem",
179
+ props.renderItem
180
+ ],
181
+ [
182
+ "set",
183
+ "onEndReached",
184
+ props.onEndReached
185
+ ],
186
+ [
187
+ "set",
188
+ "android",
189
+ props.android
190
+ ],
191
+ [
192
+ "set",
193
+ "refresh",
194
+ refresh.current
195
+ ]
196
+ ])),
197
+ (v) => {
198
+ indicator.current = v;
199
+ },
200
+ 64,
201
+ -64,
202
+ universalComponent("nativescript", ActivityIndicator, universalProps([]))
203
+ ]);
204
+ }, () => {
205
+ return universalValue(__octaneUniversalPlan3, [universalComponent("nativescript", MemoListView, universalProps([
206
+ [
207
+ "set",
208
+ "id",
209
+ props.id
210
+ ],
211
+ [
212
+ "set",
213
+ "items",
214
+ props.items
215
+ ],
216
+ [
217
+ "set",
218
+ "className",
219
+ props.className
220
+ ],
221
+ [
222
+ "set",
223
+ "style",
224
+ props.style
225
+ ],
226
+ [
227
+ "set",
228
+ "renderItem",
229
+ props.renderItem
230
+ ],
231
+ [
232
+ "set",
233
+ "onEndReached",
234
+ props.onEndReached
235
+ ],
236
+ [
237
+ "set",
238
+ "android",
239
+ props.android
240
+ ]
241
+ ]))]);
242
+ })]);
243
+ }, () => {
244
+ return universalValue(__octaneUniversalPlan5, [props.renderEmpty?.()]);
245
+ })]);
246
+ }, { "module": "@nativescript-community/octane" });
247
+ //#endregion
248
+ export { RecyclerView };
@@ -0,0 +1,34 @@
1
+ import { cx } from "../cx.js";
2
+ import { applyNativeProps } from "../platformProps.native.js";
3
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
4
+ //#region src/android/SeekBar.android.tsrx
5
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
+ "kind": "host",
7
+ "type": "slider",
8
+ "bindings": [
9
+ ["id", 0],
10
+ ["className", 1],
11
+ ["style", 2],
12
+ ["value", 3],
13
+ ["minValue", 4],
14
+ ["maxValue", 5],
15
+ ["isEnabled", 6],
16
+ ["onValueChange", 7],
17
+ ["ref", 8]
18
+ ]
19
+ });
20
+ var SeekBar = defineUniversalComponent("nativescript", function SeekBar(props) {
21
+ return universalValue(__octaneUniversalPlan0, [
22
+ props.id,
23
+ cx(props.className),
24
+ props.style,
25
+ props.value,
26
+ props.minValue ?? 0,
27
+ props.maxValue ?? 100,
28
+ props.disabled ? false : true,
29
+ (e) => props.onValueChange?.(e.value),
30
+ (el) => applyNativeProps(el, props)
31
+ ]);
32
+ }, { "module": "@nativescript-community/octane" });
33
+ //#endregion
34
+ export { SeekBar };
@@ -0,0 +1,9 @@
1
+ import { MaterialSwitch } from "./MaterialSwitch.android.tsrx.js";
2
+ import { SeekBar } from "./SeekBar.android.tsrx.js";
3
+ import { CircularProgressIndicator } from "./CircularProgressIndicator.android.tsrx.js";
4
+ import { RecyclerView } from "./RecyclerView.android.tsrx.js";
5
+ import { BottomNavigationView } from "./BottomNavigationView.android.tsrx.js";
6
+ import { MaterialDialog } from "./MaterialDialog.android.tsrx.js";
7
+ import { openModal } from "./openModal.android.js";
8
+ import { DrawerLayout } from "./DrawerLayout.android.tsrx.js";
9
+ export { BottomNavigationView, CircularProgressIndicator, DrawerLayout, MaterialDialog, MaterialSwitch, RecyclerView, SeekBar, openModal };
@@ -0,0 +1,39 @@
1
+ import { applyThemeClasses } from "../theme/theme-scheme.js";
2
+ import { modalPresenter } from "../modal-presenter.native.js";
3
+ import { createNativeScriptRoot } from "@nativescript-community/octane";
4
+ import { Frame, GridLayout } from "@nativescript/core";
5
+ //#region src/android/openModal.android.ts
6
+ /** Open a component in its own NativeScript modal root and resolve on close. */
7
+ var openModal = (Component, params, options = {}) => new Promise((resolve, reject) => {
8
+ const presenter = modalPresenter(Frame.topmost());
9
+ if (!presenter) {
10
+ reject(/* @__PURE__ */ new Error("openModal dropped — no live presenter. The topmost frame has no loaded currentPage (a page mid-navigation), or no frame is active yet."));
11
+ return;
12
+ }
13
+ const host = new GridLayout();
14
+ const unbindTheme = applyThemeClasses(host, "vx-modal-host");
15
+ const root = createNativeScriptRoot(host);
16
+ let finished = false;
17
+ const finish = (result) => {
18
+ if (finished) return;
19
+ finished = true;
20
+ unbindTheme();
21
+ root.unmount?.();
22
+ host.removeChildren?.();
23
+ resolve(result);
24
+ };
25
+ const close = (result) => host.closeModal(result);
26
+ root.render(Component, {
27
+ params,
28
+ close
29
+ });
30
+ const fullscreen = options.presentation ? options.presentation === "fullscreen" : options.fullscreen ?? true;
31
+ presenter.showModal(host, {
32
+ context: {},
33
+ closeCallback: finish,
34
+ fullscreen,
35
+ animated: options.animated ?? true
36
+ });
37
+ });
38
+ //#endregion
39
+ export { openModal };