@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,310 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { layoutChildProps } from "./layout-child.web.js";
3
+ import { __s, bag15, bag4, child, clone, delegateEvents, hookSlots, ifBlock, markDangerouslySetInnerHTMLChildren, queueRefAttach, queueRefDetach, setEventHandler, setStyle, snapshotSpread, template, useEffect, useRef } from "octane";
4
+ import { bindSignalHostPropSources, enableSignalBindings, replaceRef, setAttributeIfChanged } from "octane/internal/client";
5
+ //#region src/CameraView.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ delegateEvents(["playing"]);
8
+ var _t$0 = /* @__PURE__ */ template("<video class=\"vx-cameraview-surface\" autoplay=\"\" playsinline=\"\"></video>");
9
+ var _t$1 = /* @__PURE__ */ template("<div><!></div>");
10
+ var _hs$ = /* @__PURE__ */ hookSlots(3);
11
+ var _rm$1 = [
12
+ "r",
13
+ "b",
14
+ "a"
15
+ ];
16
+ function __then$0(__props, __s, __extra) {
17
+ const el = __extra[0];
18
+ const facing = __extra[1];
19
+ const props = __extra[2];
20
+ const readyFired = __extra[3];
21
+ let _b = __s.slots[0];
22
+ if (_b === void 0) {
23
+ let _m0, _m1;
24
+ const _root = clone(_t$0);
25
+ queueRefAttach(__s, _m1 = (v) => {
26
+ el.current = v;
27
+ if (!v) return;
28
+ applyEscapeProps(v, props);
29
+ props.bind?.({ native: v });
30
+ }, _m0 = _root);
31
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
32
+ setEventHandler(_root, "$$playing", () => {
33
+ if (!readyFired.current) {
34
+ readyFired.current = true;
35
+ props.onReady?.();
36
+ }
37
+ });
38
+ _b = bag4(__s, _root, _m0, _m1, void 0, void 0);
39
+ __s.refFields = _rm$1;
40
+ } else {
41
+ {
42
+ const _r = (v) => {
43
+ el.current = v;
44
+ if (!v) return;
45
+ applyEscapeProps(v, props);
46
+ props.bind?.({ native: v });
47
+ };
48
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
49
+ }
50
+ setEventHandler(_b.a, "$$playing", () => {
51
+ if (!readyFired.current) {
52
+ readyFired.current = true;
53
+ props.onReady?.();
54
+ }
55
+ });
56
+ }
57
+ _b.c = setAttributeIfChanged(true, _b.c, _b.a, "muted");
58
+ {
59
+ const _v = facing === "front" ? { transform: "scaleX(-1)" } : void 0;
60
+ if (_b.d !== _v) {
61
+ setStyle(_b.a, _v, _b.d);
62
+ _b.d = _v;
63
+ }
64
+ }
65
+ }
66
+ var _rm$3 = [
67
+ "s",
68
+ "n",
69
+ "m"
70
+ ];
71
+ var CameraView = /* @__PURE__ */ __s(function CameraView(props, __s, __extra) {
72
+ const el = useRef(null, _hs$ + 0);
73
+ const facing = props.facing ?? "back";
74
+ const active = props.active !== false;
75
+ const readyFired = useRef(false, _hs$ + 1);
76
+ useEffect(() => {
77
+ const v = el.current;
78
+ if (!v || !active) return;
79
+ const md = navigator.mediaDevices;
80
+ if (!md?.getUserMedia) {
81
+ props.onError?.({ message: "camera unsupported" });
82
+ return;
83
+ }
84
+ let stream = null;
85
+ let dead = false;
86
+ readyFired.current = false;
87
+ md.getUserMedia({
88
+ video: { facingMode: facing === "front" ? "user" : "environment" },
89
+ audio: false
90
+ }).then((s) => {
91
+ if (dead) {
92
+ for (const t of s.getTracks()) t.stop();
93
+ return;
94
+ }
95
+ stream = s;
96
+ v.srcObject = s;
97
+ v.play()?.catch(() => {});
98
+ }).catch((e) => {
99
+ props.onError?.({ message: e?.name === "NotAllowedError" ? "camera permission denied" : String(e?.name ?? e) });
100
+ });
101
+ return () => {
102
+ dead = true;
103
+ v.srcObject = null;
104
+ if (stream) for (const t of stream.getTracks()) t.stop();
105
+ };
106
+ }, [active, facing], _hs$ + 2);
107
+ let _b = __s.slots[0];
108
+ if (_b === void 0) {
109
+ let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, _m14;
110
+ const _root = clone(_t$1);
111
+ _m0 = props.id;
112
+ _m1 = [
113
+ "vx-stack",
114
+ "vx-cameraview",
115
+ props.className
116
+ ];
117
+ _m2 = snapshotSpread(layoutChildProps(props, props.style));
118
+ _m3 = props.accessibilityRole;
119
+ _m4 = props.accessibilityLabel;
120
+ _m5 = props.accessible === false ? true : void 0;
121
+ _m6 = props.accessibilityHint;
122
+ _m7 = props.accessibilityValue;
123
+ _m8 = props.accessibilityState?.disabled;
124
+ _m9 = props.accessibilityState?.selected;
125
+ _m10 = props.accessibilityState?.checked;
126
+ _m11 = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
127
+ _m12 = _root;
128
+ _m13 = bindSignalHostPropSources(__s, void 0, _root, [
129
+ [
130
+ false,
131
+ "id",
132
+ _m0
133
+ ],
134
+ [
135
+ false,
136
+ "className",
137
+ _m1
138
+ ],
139
+ [true, _m2],
140
+ [
141
+ false,
142
+ "role",
143
+ _m3
144
+ ],
145
+ [
146
+ false,
147
+ "aria-label",
148
+ _m4
149
+ ],
150
+ [
151
+ false,
152
+ "aria-hidden",
153
+ _m5
154
+ ],
155
+ [
156
+ false,
157
+ "aria-description",
158
+ _m6
159
+ ],
160
+ [
161
+ false,
162
+ "aria-valuetext",
163
+ _m7
164
+ ],
165
+ [
166
+ false,
167
+ "aria-disabled",
168
+ _m8
169
+ ],
170
+ [
171
+ false,
172
+ "aria-selected",
173
+ _m9
174
+ ],
175
+ [
176
+ false,
177
+ "aria-checked",
178
+ _m10
179
+ ],
180
+ [
181
+ false,
182
+ "aria-live",
183
+ _m11
184
+ ]
185
+ ], "b:323f41d4", true);
186
+ markDangerouslySetInnerHTMLChildren(_root);
187
+ _m14 = child(_root);
188
+ _b = bag15(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, _m14);
189
+ __s.refFields = _rm$3;
190
+ } else {
191
+ {
192
+ const _v = props.id;
193
+ if (_b.a !== _v) _b.a = _v;
194
+ }
195
+ {
196
+ const _v = [
197
+ "vx-stack",
198
+ "vx-cameraview",
199
+ props.className
200
+ ];
201
+ if (_b.b !== _v) _b.b = _v;
202
+ }
203
+ _b.c = snapshotSpread(layoutChildProps(props, props.style));
204
+ {
205
+ const _v = props.accessibilityRole;
206
+ if (_b.d !== _v) _b.d = _v;
207
+ }
208
+ {
209
+ const _v = props.accessibilityLabel;
210
+ if (_b.e !== _v) _b.e = _v;
211
+ }
212
+ {
213
+ const _v = props.accessible === false ? true : void 0;
214
+ if (_b.f !== _v) _b.f = _v;
215
+ }
216
+ {
217
+ const _v = props.accessibilityHint;
218
+ if (_b.g !== _v) _b.g = _v;
219
+ }
220
+ {
221
+ const _v = props.accessibilityValue;
222
+ if (_b.h !== _v) _b.h = _v;
223
+ }
224
+ {
225
+ const _v = props.accessibilityState?.disabled;
226
+ if (_b.i !== _v) _b.i = _v;
227
+ }
228
+ {
229
+ const _v = props.accessibilityState?.selected;
230
+ if (_b.j !== _v) _b.j = _v;
231
+ }
232
+ {
233
+ const _v = props.accessibilityState?.checked;
234
+ if (_b.k !== _v) _b.k = _v;
235
+ }
236
+ {
237
+ const _v = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
238
+ if (_b.l !== _v) _b.l = _v;
239
+ }
240
+ _b.n = bindSignalHostPropSources(__s, _b.n, _b.m, [
241
+ [
242
+ false,
243
+ "id",
244
+ _b.a
245
+ ],
246
+ [
247
+ false,
248
+ "className",
249
+ _b.b
250
+ ],
251
+ [true, _b.c],
252
+ [
253
+ false,
254
+ "role",
255
+ _b.d
256
+ ],
257
+ [
258
+ false,
259
+ "aria-label",
260
+ _b.e
261
+ ],
262
+ [
263
+ false,
264
+ "aria-hidden",
265
+ _b.f
266
+ ],
267
+ [
268
+ false,
269
+ "aria-description",
270
+ _b.g
271
+ ],
272
+ [
273
+ false,
274
+ "aria-valuetext",
275
+ _b.h
276
+ ],
277
+ [
278
+ false,
279
+ "aria-disabled",
280
+ _b.i
281
+ ],
282
+ [
283
+ false,
284
+ "aria-selected",
285
+ _b.j
286
+ ],
287
+ [
288
+ false,
289
+ "aria-checked",
290
+ _b.k
291
+ ],
292
+ [
293
+ false,
294
+ "aria-live",
295
+ _b.l
296
+ ]
297
+ ], "b:323f41d4", true);
298
+ }
299
+ {
300
+ const __ifCondition = active;
301
+ ifBlock(__s, 1, _b.m, __ifCondition, __then$0, null, _b.o, __ifCondition ? [
302
+ el,
303
+ facing,
304
+ props,
305
+ readyFired
306
+ ] : void 0);
307
+ }
308
+ });
309
+ //#endregion
310
+ export { CameraView };
@@ -0,0 +1,73 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag10, bag3, child, clone, ifBlock, queueRefAttach, queueRefDetach, setStyle, sibling, template } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/Card.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ var _t$0 = /* @__PURE__ */ template("<div class=\"vx-card-header\"></div>");
7
+ var _t$1 = /* @__PURE__ */ template("<div class=\"vx-card-footer\"></div>");
8
+ var _t$2 = /* @__PURE__ */ template("<div><!><div class=\"vx-card-body\"></div><!></div>");
9
+ function __then$0(__props, __s, __extra) {
10
+ const props = __extra[0];
11
+ let _b = __s.slots[0];
12
+ if (_b === void 0) {
13
+ let _m0;
14
+ const _root = clone(_t$0);
15
+ _m0 = _root;
16
+ _b = bag3(__s, _root, _m0, null, void 0);
17
+ }
18
+ _b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.header, "b:dc519a69", null, void 0, void 0, void 0, true);
19
+ }
20
+ function __then$4(__props, __s, __extra) {
21
+ const props = __extra[0];
22
+ let _b = __s.slots[0];
23
+ if (_b === void 0) {
24
+ let _m0;
25
+ const _root = clone(_t$1);
26
+ _m0 = _root;
27
+ _b = bag3(__s, _root, _m0, null, void 0);
28
+ }
29
+ _b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.footer, "b:b6594fd8", null, void 0, void 0, void 0, true);
30
+ }
31
+ var _rm$7 = [
32
+ "r",
33
+ "b",
34
+ "a"
35
+ ];
36
+ var Card = /* @__PURE__ */ __s(function Card(props, __s, __extra) {
37
+ let _b = __s.slots[0];
38
+ if (_b === void 0) {
39
+ let _m0, _m1, _m5, _m6, _m7;
40
+ const _root = clone(_t$2);
41
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
42
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
43
+ const _el0 = child(_root);
44
+ _m5 = _el0;
45
+ _m6 = sibling(_el0, 2);
46
+ _m7 = sibling(_el0, 1);
47
+ _b = bag10(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, _m6, _m7, null, void 0);
48
+ __s.refFields = _rm$7;
49
+ } else {
50
+ const _r = (e) => applyEscapeProps(e, props);
51
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
52
+ }
53
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:f4037cad", setPlainAttribute);
54
+ _b.d = updateFreshClassName(["vx-card", props.className], _b.d, _b.a);
55
+ {
56
+ const _v = props.style;
57
+ if (_b.e !== _v) {
58
+ setStyle(_b.a, _v, _b.e);
59
+ _b.e = _v;
60
+ }
61
+ }
62
+ {
63
+ const __ifCondition = props.header != null;
64
+ ifBlock(__s, 1, _b.a, __ifCondition, __then$0, null, _b.f, __ifCondition ? [props] : void 0);
65
+ }
66
+ _b.k = bindSignalChild(__s, _b.k, 2, _b.h, props.children, "b:cd506c3e", null, void 0, void 0, void 0, true);
67
+ {
68
+ const __ifCondition$ = props.footer != null;
69
+ ifBlock(__s, 3, _b.a, __ifCondition$, __then$4, null, _b.g, __ifCondition$ ? [props] : void 0);
70
+ }
71
+ });
72
+ //#endregion
73
+ export { Card };
@@ -0,0 +1,89 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { __s, bag0, bag13, bag3, child, clone, delegateEvents, evt2e, evt2u, ifBlock, queueRefAttach, queueRefDetach, setAriaAttribute, setEventHandler, setStyle, sibling, template } from "octane";
3
+ import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
4
+ //#region src/Checkbox.web.tsrx
5
+ enableSignalBindings(1, true);
6
+ delegateEvents(["click", "keydown"]);
7
+ var _t$0 = /* @__PURE__ */ template("<span class=\"vx-checkbox-check\">✓</span>");
8
+ var _t$1 = /* @__PURE__ */ template("<span class=\"vx-checkbox-label\"></span>");
9
+ var _t$2 = /* @__PURE__ */ template("<div role=\"checkbox\"><div class=\"vx-checkbox\" aria-hidden=\"true\"><!></div><!></div>");
10
+ var __event = (e, props, toggle) => {
11
+ if (props.disabled) return;
12
+ if (e.key === " " || e.key === "Enter") {
13
+ e.preventDefault();
14
+ toggle();
15
+ }
16
+ };
17
+ function __then$0(__props, __s, __extra) {
18
+ let _b = __s.slots[0];
19
+ if (_b === void 0) {
20
+ const _root = clone(_t$0);
21
+ _b = bag0(__s, _root);
22
+ }
23
+ }
24
+ function __then$2(__props, __s, __extra) {
25
+ const props = __extra[0];
26
+ let _b = __s.slots[0];
27
+ if (_b === void 0) {
28
+ let _m0;
29
+ const _root = clone(_t$1);
30
+ _m0 = _root;
31
+ _b = bag3(__s, _root, _m0, null, void 0);
32
+ }
33
+ _b.d = bindSignalChild(__s, _b.d, 1, _b.a, props.label, "b:c9ae9d41", null, void 0, void 0, void 0, true);
34
+ }
35
+ var _rm$5 = [
36
+ "r",
37
+ "b",
38
+ "a"
39
+ ];
40
+ var Checkbox = /* @__PURE__ */ __s(function Checkbox(props, __s, __extra) {
41
+ const toggle = () => props.onCheckedChange?.(!(props.checked ?? false));
42
+ let _b = __s.slots[0];
43
+ if (_b === void 0) {
44
+ let _m0, _m1, _m9, _m10, _m11, _m12;
45
+ const _root = clone(_t$2);
46
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
47
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
48
+ setEventHandler(_root, "$$click", props.disabled ? void 0 : toggle);
49
+ _m9 = evt2e(_root, "$$keydown", __event, props, toggle);
50
+ const _el0 = child(_root);
51
+ _m10 = _el0;
52
+ _m11 = child(_el0);
53
+ _m12 = sibling(_el0, 1);
54
+ _b = bag13(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, void 0, void 0, void 0, _m9, _m10, _m11, _m12);
55
+ __s.refFields = _rm$5;
56
+ } else {
57
+ {
58
+ const _r = (e) => applyEscapeProps(e, props);
59
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
60
+ }
61
+ setEventHandler(_b.a, "$$click", props.disabled ? void 0 : toggle);
62
+ evt2u(_b.j, __event, props, toggle);
63
+ }
64
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:e9b2a3c8", setPlainAttribute);
65
+ _b.d = bindSignalAttribute(__s, _b.d, _b.a, "aria-checked", props.checked ?? false, "b:a0baac3c", setAriaAttribute);
66
+ _b.e = bindSignalAttribute(__s, _b.e, _b.a, "aria-disabled", props.disabled ?? void 0, "b:80966cea", setAriaAttribute);
67
+ _b.f = bindSignalAttribute(__s, _b.f, _b.a, "aria-label", props.accessibilityLabel, "b:98f88ce1", setAriaAttribute);
68
+ _b.g = bindSignalAttribute(__s, _b.g, _b.a, "tabindex", props.disabled ? void 0 : 0, "b:7049bb49", setPlainAttribute);
69
+ _b.h = updateFreshClassName([
70
+ "vx-checkbox-row",
71
+ props.checked ? "vx-checkbox--on" : void 0,
72
+ props.disabled ? "vx-checkbox--disabled" : void 0,
73
+ props.className
74
+ ], _b.h, _b.a);
75
+ {
76
+ const _v = props.style;
77
+ if (_b.i !== _v) {
78
+ setStyle(_b.a, _v, _b.i);
79
+ _b.i = _v;
80
+ }
81
+ }
82
+ ifBlock(__s, 1, _b.k, props.checked, __then$0, null, _b.l);
83
+ {
84
+ const __ifCondition = props.label != null;
85
+ ifBlock(__s, 2, _b.a, __ifCondition, __then$2, null, _b.m, __ifCondition ? [props] : void 0);
86
+ }
87
+ });
88
+ //#endregion
89
+ export { Checkbox };
@@ -0,0 +1,79 @@
1
+ import { applyEscapeProps } from "./escape-props.web.js";
2
+ import { Checkbox } from "./Checkbox.web.tsrx.js";
3
+ import { __s, bag7, child, clone, componentSlotVoid, hookSlots, mapSlot, queueRefAttach, queueRefDetach, setAriaAttribute, setStyle, template, useState } from "octane";
4
+ import { bindSignalAttribute, createElementFromConfig, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
5
+ //#region src/CheckboxGroup.web.tsrx
6
+ enableSignalBindings(1, true);
7
+ var _t$0 = /* @__PURE__ */ template("<div role=\"group\"><!></div>");
8
+ var _hs$ = /* @__PURE__ */ hookSlots(2);
9
+ var _key$0 = (opt) => opt.value;
10
+ function __item$1(opt, __s, __extra) {
11
+ const __block = __s.block;
12
+ const selected = __extra[0];
13
+ const props = __extra[1];
14
+ const toggle = __extra[2];
15
+ componentSlotVoid(__s, 0, __block.parentNode, Checkbox, {
16
+ "checked": selected.includes(opt.value),
17
+ "disabled": props.disabled || opt.disabled,
18
+ "label": opt.label,
19
+ "onCheckedChange": (on) => toggle(opt.value, on)
20
+ }, __block.endMarker, void 0, 2, void 0, void 0, "c:30848cec");
21
+ }
22
+ var _rm$4 = [
23
+ "r",
24
+ "b",
25
+ "a"
26
+ ];
27
+ var CheckboxGroup = /* @__PURE__ */ __s(function CheckboxGroup(props, __s, __extra) {
28
+ let __mapItems;
29
+ let __mapMethod;
30
+ const [internal, setInternal] = useState(props.defaultValue ?? [], _hs$ + 0);
31
+ const controlled = props.value !== void 0;
32
+ const selected = controlled ? props.value : internal;
33
+ const setSelected = (next) => {
34
+ if (!controlled) setInternal(next);
35
+ props.onValueChange?.(next);
36
+ };
37
+ const toggle = (v, on) => setSelected(on ? [...selected, v] : selected.filter((x) => x !== v));
38
+ if (__s.block.pending && !__s.block.crossRenderUpdate) return;
39
+ let _b = __s.slots[0];
40
+ if (_b === void 0) {
41
+ let _m0, _m1, _m6;
42
+ const _root = clone(_t$0);
43
+ queueRefAttach(__s, _m1 = (e) => applyEscapeProps(e, props), _m0 = _root);
44
+ (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
45
+ _m6 = child(_root);
46
+ _b = bag7(__s, _root, _m0, _m1, void 0, void 0, void 0, void 0, _m6);
47
+ __s.refFields = _rm$4;
48
+ } else {
49
+ const _r = (e) => applyEscapeProps(e, props);
50
+ if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
51
+ }
52
+ _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:8d588be2", setPlainAttribute);
53
+ _b.d = bindSignalAttribute(__s, _b.d, _b.a, "aria-label", props.accessibilityLabel, "b:4442735b", setAriaAttribute);
54
+ _b.e = updateFreshClassName([
55
+ "vx-checkbox-group",
56
+ props.horizontal ? "vx-checkbox-group--row" : void 0,
57
+ props.className
58
+ ], _b.e, _b.a);
59
+ {
60
+ const _v = props.style;
61
+ if (_b.f !== _v) {
62
+ setStyle(_b.a, _v, _b.f);
63
+ _b.f = _v;
64
+ }
65
+ }
66
+ mapSlot(__s, 1, _b.a, (__mapItems = props.options, __mapMethod = __mapItems.map, __mapItems), __mapMethod, (opt) => createElementFromConfig("c:a63f71ef", Checkbox, {
67
+ key: opt.value,
68
+ checked: selected.includes(opt.value),
69
+ disabled: props.disabled || opt.disabled,
70
+ label: opt.label,
71
+ onCheckedChange: (on) => toggle(opt.value, on)
72
+ }), _key$0, __item$1, 8 | (Checkbox.$$singleRoot === true ? 2 : 0), [
73
+ selected,
74
+ props,
75
+ toggle
76
+ ], _b.g, 1);
77
+ });
78
+ //#endregion
79
+ export { CheckboxGroup };
@@ -0,0 +1,64 @@
1
+ import { Pressable } from "./Pressable.web.tsrx.js";
2
+ import { bag7, child, clone, componentSlotVoid, createElement, drainFrag, markChildrenBlock, sibling, template } from "octane";
3
+ import { textHoleUpdate } from "octane/internal/client";
4
+ //#region src/Chip.web.tsrx
5
+ var _t$0 = /* @__PURE__ */ template("<!><!>", 0, 1);
6
+ var __childrenBody = {};
7
+ var Chip = function Chip(props, __s, __extra) {
8
+ const __block = __s.block;
9
+ function __children$1(__props, __s, __extra) {
10
+ const __block = __s.block;
11
+ let _b = __s.slots[0];
12
+ if (_b === void 0) {
13
+ let _m0, _m1, _m4;
14
+ const _root = clone(_t$0);
15
+ _m0 = __block.parentNode;
16
+ const _el0 = child(_root);
17
+ _m1 = _el0;
18
+ _m4 = sibling(_el0, 1);
19
+ drainFrag(_root, __block.parentNode, __block.endMarker);
20
+ _b = bag7(__s, null, _m0, _m1, null, void 0, _m4, null, void 0);
21
+ }
22
+ {
23
+ const _v = props.children;
24
+ _b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true);
25
+ _b.d = _v;
26
+ }
27
+ {
28
+ const _v = props.onRemove ? createElement("span", {
29
+ className: "vx-chip-remove",
30
+ role: "button",
31
+ "aria-label": "Remove",
32
+ onClick: (e) => {
33
+ e.stopPropagation();
34
+ if (!props.disabled) props.onRemove?.();
35
+ }
36
+ }, "✕") : null;
37
+ _b.f = textHoleUpdate(__s, 2, _b.a, _v, _b.f, _b.g, _b.e, true);
38
+ _b.g = _v;
39
+ }
40
+ }
41
+ componentSlotVoid(__s, 0, __block.parentNode, Pressable, {
42
+ "id": props.id,
43
+ "className": [
44
+ "vx-chip",
45
+ props.selected ? "vx-chip--on" : void 0,
46
+ props.disabled ? "vx-chip--disabled" : void 0,
47
+ props.className
48
+ ],
49
+ "style": props.style,
50
+ "disabled": props.disabled,
51
+ "onPress": props.onSelect,
52
+ "accessibilityLabel": props.accessibilityLabel,
53
+ "accessibilityState": {
54
+ selected: props.selected,
55
+ disabled: props.disabled
56
+ },
57
+ "ios": props.ios,
58
+ "android": props.android,
59
+ "web": props.web,
60
+ "children": markChildrenBlock(__children$1, __childrenBody)
61
+ }, __block.endMarker, void 0, void 0, true, void 0, "c:2d23d603");
62
+ };
63
+ //#endregion
64
+ export { Chip };