@octane-xplat/ui 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/native/Absolute.native.tsrx.js +43 -0
- package/dist/native/Accordion.native.tsrx.js +75 -0
- package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
- package/dist/native/Alert.native.tsrx.js +74 -0
- package/dist/native/Avatar.native.tsrx.js +76 -0
- package/dist/native/AvatarGroup.native.tsrx.js +84 -0
- package/dist/native/Badge.native.tsrx.js +29 -0
- package/dist/native/Banner.native.tsrx.js +80 -0
- package/dist/native/Breadcrumb.native.tsrx.js +66 -0
- package/dist/native/Button.native.tsrx.js +62 -0
- package/dist/native/CameraView.native.tsrx.js +165 -0
- package/dist/native/Card.native.tsrx.js +64 -0
- package/dist/native/Checkbox.native.tsrx.js +58 -0
- package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
- package/dist/native/Chip.native.tsrx.js +83 -0
- package/dist/native/Collapsible.native.tsrx.js +74 -0
- package/dist/native/CommandPalette.native.tsrx.js +143 -0
- package/dist/native/ContextMenu.native.tsrx.js +140 -0
- package/dist/native/Drawer.native.tsrx.js +60 -0
- package/dist/native/DropdownMenu.native.tsrx.js +155 -0
- package/dist/native/Empty.native.tsrx.js +82 -0
- package/dist/native/FieldGroup.native.tsrx.js +39 -0
- package/dist/native/FormField.native.tsrx.js +53 -0
- package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
- package/dist/native/{ui56.js → Heading.native.tsrx.js} +2 -2
- package/dist/native/{ui55.js → Icon.native.tsrx.js} +4 -4
- package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
- package/dist/native/InputNumber.native.tsrx.js +146 -0
- package/dist/native/InputRating.native.tsrx.js +74 -0
- package/dist/native/InputTags.native.tsrx.js +131 -0
- package/dist/native/Kbd.native.tsrx.js +29 -0
- package/dist/native/{ui48.js → KeyboardAvoiding.native.tsrx.js} +1 -1
- package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
- package/dist/native/{ui52.js → Meter.native.tsrx.js} +2 -2
- package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
- package/dist/native/NavigationMenu.native.tsrx.js +67 -0
- package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
- package/dist/native/Pager.native.tsrx.js +282 -0
- package/dist/native/Pagination.native.tsrx.js +107 -0
- package/dist/native/PinInput.native.tsrx.js +94 -0
- package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
- package/dist/native/{ui16.js → Pressable.native.tsrx.js} +21 -15
- package/dist/native/ProgressGroup.native.tsrx.js +66 -0
- package/dist/native/RadioGroup.native.tsrx.js +85 -0
- package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
- package/dist/native/Row.native.tsrx.js +98 -0
- package/dist/native/{ui47.js → SafeArea.native.tsrx.js} +2 -2
- package/dist/native/{ui43.js → Screen.native.tsrx.js} +3 -3
- package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
- package/dist/native/ScrollView.native.tsrx.js +233 -0
- package/dist/native/SearchInput.native.tsrx.js +151 -0
- package/dist/native/SegmentedControl.native.tsrx.js +75 -0
- package/dist/native/Select.native.tsrx.js +202 -0
- package/dist/native/Separator.native.tsrx.js +25 -0
- package/dist/native/{ui60.js → Sheet.native.tsrx.js} +15 -7
- package/dist/native/Skeleton.native.tsrx.js +28 -0
- package/dist/native/Slider.native.tsrx.js +98 -0
- package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
- package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
- package/dist/native/Stepper.native.tsrx.js +75 -0
- package/dist/native/Switch.native.tsrx.js +33 -0
- package/dist/native/Table.native.tsrx.js +103 -0
- package/dist/native/Tabs.native.tsrx.js +163 -0
- package/dist/native/{ui14.js → Text.native.tsrx.js} +19 -3
- package/dist/native/{ui24.js → TextArea.native.tsrx.js} +19 -17
- package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
- package/dist/native/Timeline.native.tsrx.js +112 -0
- package/dist/native/Tree.native.tsrx.js +140 -0
- package/dist/native/User.native.tsrx.js +95 -0
- package/dist/native/Video.native.tsrx.js +248 -0
- package/dist/native/{ui6.js → View.native.tsrx.js} +39 -25
- package/dist/native/WebView.native.tsrx.js +110 -0
- package/dist/native/aliases.native.tsrx.js +38 -0
- package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
- package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
- package/dist/native/{ui49.js → android/DrawerLayout.android.tsrx.js} +5 -7
- package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
- package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
- package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
- package/dist/native/android/SeekBar.android.tsrx.js +34 -0
- package/dist/native/android/index.js +9 -0
- package/dist/native/android/openModal.android.js +39 -0
- package/dist/native/camera-permission.native.js +47 -0
- package/dist/native/child-array.js +15 -0
- package/dist/native/{ui3.js → escape-props.native.js} +22 -1
- package/dist/native/icons.js +25 -0
- package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
- package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
- package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
- package/dist/native/{ui50.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
- package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
- package/dist/native/{ui53.js → ios/UISlider.ios.tsrx.js} +5 -5
- package/dist/native/{ui45.js → ios/UISwitch.ios.tsrx.js} +5 -5
- package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
- package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
- package/dist/native/ios/index.js +11 -0
- package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
- package/dist/native/modal-presenter.native.js +19 -0
- package/dist/native/native/index.js +4 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/pan.native.tsrx.js +66 -0
- package/dist/native/platform.native.js +10 -0
- package/dist/native/refresh-metrics.js +9 -0
- package/dist/native/refresh.native.js +177 -0
- package/dist/native/{ui34.js → root-layout.native.js} +6 -1
- package/dist/native/{ui21.js → route.native.js} +96 -12
- package/dist/native/sheet-detents.native.js +102 -0
- package/dist/native/{ui61.js → sheet-service.native.js} +19 -9
- package/dist/native/sheet-snap.js +35 -0
- package/dist/native/text-write.native.js +27 -0
- package/dist/native/theme/status-bar-scheme.native.js +17 -0
- package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
- package/dist/native/toast-anchor.native.tsrx.js +185 -0
- package/dist/native/translate.native.js +11 -0
- package/dist/native/ui.js +93 -52
- package/dist/native/use-back.native.tsrx.js +9 -0
- package/dist/native/useMeasure.native.tsrx.js +64 -0
- package/dist/native/video-chrome.native.tsrx.js +365 -0
- package/dist/web/Absolute.web.tsrx.js +47 -0
- package/dist/web/Accordion.web.tsrx.js +85 -0
- package/dist/web/{ui46.js → ActivityIndicator.web.tsrx.js} +1 -1
- package/dist/web/Alert.web.tsrx.js +79 -0
- package/dist/web/Avatar.web.tsrx.js +106 -0
- package/dist/web/AvatarGroup.web.tsrx.js +108 -0
- package/dist/web/Badge.web.tsrx.js +37 -0
- package/dist/web/Banner.web.tsrx.js +79 -0
- package/dist/web/Breadcrumb.web.tsrx.js +135 -0
- package/dist/web/Button.web.tsrx.js +45 -0
- package/dist/web/CameraView.web.tsrx.js +310 -0
- package/dist/web/Card.web.tsrx.js +73 -0
- package/dist/web/Checkbox.web.tsrx.js +89 -0
- package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
- package/dist/web/Chip.web.tsrx.js +64 -0
- package/dist/web/Collapsible.web.tsrx.js +94 -0
- package/dist/web/CommandPalette.web.tsrx.js +125 -0
- package/dist/web/ContextMenu.web.tsrx.js +154 -0
- package/dist/web/{ui44.js → Drawer.web.tsrx.js} +13 -9
- package/dist/web/DropdownMenu.web.tsrx.js +162 -0
- package/dist/web/Empty.web.tsrx.js +89 -0
- package/dist/web/FieldGroup.web.tsrx.js +57 -0
- package/dist/web/FormField.web.tsrx.js +92 -0
- package/dist/web/Grid.web.tsrx.js +65 -0
- package/dist/web/{ui52.js → Heading.web.tsrx.js} +2 -2
- package/dist/web/Icon.web.tsrx.js +273 -0
- package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
- package/dist/web/InputNumber.web.tsrx.js +99 -0
- package/dist/web/InputRating.web.tsrx.js +72 -0
- package/dist/web/InputTags.web.tsrx.js +122 -0
- package/dist/web/Kbd.web.tsrx.js +37 -0
- package/dist/web/{ui48.js → Meter.web.tsrx.js} +1 -1
- package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
- package/dist/web/NavigationMenu.web.tsrx.js +118 -0
- package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
- package/dist/web/Pager.web.tsrx.js +337 -0
- package/dist/web/Pagination.web.tsrx.js +80 -0
- package/dist/web/PinInput.web.tsrx.js +72 -0
- package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
- package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
- package/dist/web/ProgressGroup.web.tsrx.js +109 -0
- package/dist/web/RadioGroup.web.tsrx.js +69 -0
- package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
- package/dist/web/Row.web.tsrx.js +250 -0
- package/dist/web/{ui42.js → SafeArea.web.tsrx.js} +1 -1
- package/dist/web/{ui38.js → Screen.web.tsrx.js} +1 -1
- package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
- package/dist/web/ScrollView.web.tsrx.js +388 -0
- package/dist/web/SearchInput.web.tsrx.js +137 -0
- package/dist/web/SegmentedControl.web.tsrx.js +75 -0
- package/dist/web/Select.web.tsrx.js +149 -0
- package/dist/web/Separator.web.tsrx.js +42 -0
- package/dist/web/Sheet.web.tsrx.js +81 -0
- package/dist/web/Skeleton.web.tsrx.js +56 -0
- package/dist/web/Slider.web.tsrx.js +97 -0
- package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
- package/dist/web/Stack.web.tsrx.js +47 -0
- package/dist/web/Stepper.web.tsrx.js +65 -0
- package/dist/web/Switch.web.tsrx.js +59 -0
- package/dist/web/Table.web.tsrx.js +161 -0
- package/dist/web/{ui39.js → Tabs.web.tsrx.js} +33 -16
- package/dist/web/{ui13.js → Text.web.tsrx.js} +79 -46
- package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
- package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
- package/dist/web/Timeline.web.tsrx.js +172 -0
- package/dist/web/Tree.web.tsrx.js +146 -0
- package/dist/web/User.web.tsrx.js +116 -0
- package/dist/web/Video.web.tsrx.js +400 -0
- package/dist/web/View.web.tsrx.js +250 -0
- package/dist/web/WebView.web.tsrx.js +235 -0
- package/dist/web/aliases.web.tsrx.js +24 -0
- package/dist/web/{ui35.js → anim.web.tsrx.js} +3 -2
- package/dist/web/child-array.js +15 -0
- package/dist/web/icons.js +25 -0
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/pan.web.tsrx.js +66 -0
- package/dist/web/platform.web.js +9 -0
- package/dist/web/refresh-metrics.js +9 -0
- package/dist/web/refresh.web.js +133 -0
- package/dist/web/{ui18.js → route.web.js} +14 -2
- package/dist/web/sheet-detents.web.js +103 -0
- package/dist/web/{ui58.js → sheet-service.web.js} +5 -1
- package/dist/web/sheet-snap.js +35 -0
- package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
- package/dist/web/toast-anchor.web.tsrx.js +142 -0
- package/dist/web/transform.web.js +43 -0
- package/dist/web/translate.web.js +13 -0
- package/dist/web/ui.js +91 -51
- package/dist/web/use-back.web.tsrx.js +9 -0
- package/dist/web/useMeasure.web.tsrx.js +50 -0
- package/dist/web/video-chrome.web.tsrx.js +207 -0
- package/dist/web/web/Hoverable.web.tsrx.js +150 -0
- package/dist/web/web/Tooltip.web.tsrx.js +183 -0
- package/dist/web/web/index.js +3 -0
- package/package.json +34 -3
- package/src/theme/tokens.css +1599 -194
- package/types/android.d.ts +53 -0
- package/types/index.d.ts +39 -14
- package/types/index.native.d.ts +273 -0
- package/types/index.web.d.ts +272 -0
- package/types/ios.d.ts +59 -0
- package/types/native.d.ts +5 -0
- package/types/props.d.ts +989 -44
- package/types/web.d.ts +17 -0
- package/dist/native/ui10.js +0 -32
- package/dist/native/ui25.js +0 -141
- package/dist/native/ui27.js +0 -61
- package/dist/native/ui39.js +0 -105
- package/dist/native/ui4.js +0 -24
- package/dist/native/ui44.js +0 -267
- package/dist/native/ui54.js +0 -17
- package/dist/native/ui57.js +0 -14
- package/dist/native/ui7.js +0 -52
- package/dist/web/ui10.js +0 -46
- package/dist/web/ui11.js +0 -42
- package/dist/web/ui22.js +0 -108
- package/dist/web/ui23.js +0 -96
- package/dist/web/ui26.js +0 -45
- package/dist/web/ui3.js +0 -31
- package/dist/web/ui30.js +0 -34
- package/dist/web/ui34.js +0 -70
- package/dist/web/ui40.js +0 -43
- package/dist/web/ui43.js +0 -42
- package/dist/web/ui49.js +0 -47
- package/dist/web/ui5.js +0 -168
- package/dist/web/ui50.js +0 -17
- package/dist/web/ui51.js +0 -149
- package/dist/web/ui53.js +0 -17
- package/dist/web/ui57.js +0 -44
- package/dist/web/ui6.js +0 -94
- package/dist/web/ui7.js +0 -62
- package/dist/web/ui8.js +0 -46
- package/dist/web/ui9.js +0 -46
- /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
- /package/dist/native/{ui40.js → anim.native.tsrx.js} +0 -0
- /package/dist/native/{ui2.js → cx.js} +0 -0
- /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
- /package/dist/native/{ui51.js → meter-math.js} +0 -0
- /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
- /package/dist/native/{ui37.js → popover-position.js} +0 -0
- /package/dist/native/{ui19.js → route-table.js} +0 -0
- /package/dist/native/{ui46.js → safeAreaInsets.native.tsrx.js} +0 -0
- /package/dist/native/{ui18.js → stacks.native.js} +0 -0
- /package/dist/native/{ui58.js → store.js} +0 -0
- /package/dist/native/{ui41.js → styled.native.tsrx.js} +0 -0
- /package/dist/native/{ui28.js → svg.native.js} +0 -0
- /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
- /package/dist/native/{ui59.js → use-store.native.tsrx.js} +0 -0
- /package/dist/native/{ui42.js → windows.native.js} +0 -0
- /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
- /package/dist/web/{ui28.js → cx.js} +0 -0
- /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
- /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
- /package/dist/web/{ui47.js → meter-math.js} +0 -0
- /package/dist/web/{ui45.js → platformProps.web.js} +0 -0
- /package/dist/web/{ui32.js → popover-position.js} +0 -0
- /package/dist/web/{ui17.js → route-table.js} +0 -0
- /package/dist/web/{ui41.js → safeAreaInsets.web.tsrx.js} +0 -0
- /package/dist/web/{ui54.js → stacks.web.js} +0 -0
- /package/dist/web/{ui55.js → store.js} +0 -0
- /package/dist/web/{ui36.js → styled.web.tsrx.js} +0 -0
- /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
- /package/dist/web/{ui56.js → use-store.web.tsrx.js} +0 -0
- /package/dist/web/{ui37.js → windows.web.js} +0 -0
package/dist/web/ui.js
CHANGED
|
@@ -1,51 +1,91 @@
|
|
|
1
|
-
import { View } from "./
|
|
2
|
-
import { Row } from "./
|
|
3
|
-
import { Grid } from "./
|
|
4
|
-
import { Stack } from "./
|
|
5
|
-
import { Absolute } from "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
|
|
1
|
+
import { View } from "./View.web.tsrx.js";
|
|
2
|
+
import { Row } from "./Row.web.tsrx.js";
|
|
3
|
+
import { Grid } from "./Grid.web.tsrx.js";
|
|
4
|
+
import { Stack } from "./Stack.web.tsrx.js";
|
|
5
|
+
import { Absolute } from "./Absolute.web.tsrx.js";
|
|
6
|
+
import { setTranslate } from "./translate.web.js";
|
|
7
|
+
import { Spacer } from "./Spacer.web.tsrx.js";
|
|
8
|
+
import { Text } from "./Text.web.tsrx.js";
|
|
9
|
+
import { RichText, RichTextSpan } from "./RichText.web.tsrx.js";
|
|
10
|
+
import { Pressable } from "./Pressable.web.tsrx.js";
|
|
11
|
+
import { ActivityIndicator } from "./ActivityIndicator.web.tsrx.js";
|
|
12
|
+
import { Button } from "./Button.web.tsrx.js";
|
|
13
|
+
import { Collapsible } from "./Collapsible.web.tsrx.js";
|
|
14
|
+
import { Accordion } from "./Accordion.web.tsrx.js";
|
|
15
|
+
import { Checkbox } from "./Checkbox.web.tsrx.js";
|
|
16
|
+
import { RadioGroup } from "./RadioGroup.web.tsrx.js";
|
|
17
|
+
import { getColorScheme, useColorScheme } from "./theme/colorScheme.web.js";
|
|
18
|
+
import { applyThemeClasses, getThemePreference, getThemeScheme, onThemeSchemeChange, setThemePreference, themeSchemeClasses, useThemeScheme } from "./theme/theme-scheme.js";
|
|
19
|
+
import { Popover } from "./Popover.web.tsrx.js";
|
|
20
|
+
import { registerIcon, registerIcons } from "./icons.js";
|
|
21
|
+
import { Icon } from "./Icon.web.tsrx.js";
|
|
22
|
+
import { DropdownMenu } from "./DropdownMenu.web.tsrx.js";
|
|
23
|
+
import { ContextMenu } from "./ContextMenu.web.tsrx.js";
|
|
24
|
+
import { Badge } from "./Badge.web.tsrx.js";
|
|
25
|
+
import { Separator } from "./Separator.web.tsrx.js";
|
|
26
|
+
import { Skeleton } from "./Skeleton.web.tsrx.js";
|
|
27
|
+
import { Avatar } from "./Avatar.web.tsrx.js";
|
|
28
|
+
import { AvatarGroup } from "./AvatarGroup.web.tsrx.js";
|
|
29
|
+
import { FormField } from "./FormField.web.tsrx.js";
|
|
30
|
+
import { FieldGroup } from "./FieldGroup.web.tsrx.js";
|
|
31
|
+
import { TextInput } from "./TextInput.web.tsrx.js";
|
|
32
|
+
import { InputNumber } from "./InputNumber.web.tsrx.js";
|
|
33
|
+
import { PinInput } from "./PinInput.web.tsrx.js";
|
|
34
|
+
import { Select } from "./Select.web.tsrx.js";
|
|
35
|
+
import { Combobox, InputMenu, SelectMenu } from "./aliases.web.tsrx.js";
|
|
36
|
+
import { InputTags } from "./InputTags.web.tsrx.js";
|
|
37
|
+
import { InputRating } from "./InputRating.web.tsrx.js";
|
|
38
|
+
import { CheckboxGroup } from "./CheckboxGroup.web.tsrx.js";
|
|
39
|
+
import { Breadcrumb } from "./Breadcrumb.web.tsrx.js";
|
|
40
|
+
import { Pagination } from "./Pagination.web.tsrx.js";
|
|
41
|
+
import { Stepper } from "./Stepper.web.tsrx.js";
|
|
42
|
+
import { NavigationMenu } from "./NavigationMenu.web.tsrx.js";
|
|
43
|
+
import { Overlay } from "./Overlay.web.tsrx.js";
|
|
44
|
+
import { CommandPalette } from "./CommandPalette.web.tsrx.js";
|
|
45
|
+
import { Table } from "./Table.web.tsrx.js";
|
|
46
|
+
import { Timeline } from "./Timeline.web.tsrx.js";
|
|
47
|
+
import { Tree } from "./Tree.web.tsrx.js";
|
|
48
|
+
import { Alert } from "./Alert.web.tsrx.js";
|
|
49
|
+
import { Card } from "./Card.web.tsrx.js";
|
|
50
|
+
import { Chip } from "./Chip.web.tsrx.js";
|
|
51
|
+
import { Kbd } from "./Kbd.web.tsrx.js";
|
|
52
|
+
import { Empty } from "./Empty.web.tsrx.js";
|
|
53
|
+
import { Banner } from "./Banner.web.tsrx.js";
|
|
54
|
+
import { User } from "./User.web.tsrx.js";
|
|
55
|
+
import { Meter } from "./Meter.web.tsrx.js";
|
|
56
|
+
import { ProgressGroup } from "./ProgressGroup.web.tsrx.js";
|
|
57
|
+
import { Link } from "./Link.web.tsrx.js";
|
|
58
|
+
import { deriveRouteManifest } from "./route-table.js";
|
|
59
|
+
import { addBackInterceptor, canGoBack, currentModalRoute, currentRoute, hrefFor, popRoute, pushDeepLink, pushRoute, redirect, registerRoutes, registerScreens, routeFor, routeStacks, screenFor, useCanGoBack, useModalRoute, useRoute } from "./route.web.js";
|
|
60
|
+
import { NavLink } from "./NavLink.web.tsrx.js";
|
|
61
|
+
import { TextArea } from "./TextArea.web.tsrx.js";
|
|
62
|
+
import { SearchInput } from "./SearchInput.web.tsrx.js";
|
|
63
|
+
import { SegmentedControl } from "./SegmentedControl.web.tsrx.js";
|
|
64
|
+
import { ScrollView } from "./ScrollView.web.tsrx.js";
|
|
65
|
+
import { ScrollBox } from "./ScrollBox.web.tsrx.js";
|
|
66
|
+
import { Pager } from "./Pager.web.tsrx.js";
|
|
67
|
+
import { Image } from "./Image.web.tsrx.js";
|
|
68
|
+
import { WebView } from "./WebView.web.tsrx.js";
|
|
69
|
+
import { useMeasure } from "./useMeasure.web.tsrx.js";
|
|
70
|
+
import { Slider } from "./Slider.web.tsrx.js";
|
|
71
|
+
import { Video } from "./Video.web.tsrx.js";
|
|
72
|
+
import { CameraView } from "./CameraView.web.tsrx.js";
|
|
73
|
+
import { showToast } from "./toast-anchor.web.tsrx.js";
|
|
74
|
+
import { useAnimation } from "./anim.web.tsrx.js";
|
|
75
|
+
import { styled } from "./styled.web.tsrx.js";
|
|
76
|
+
import { openWindow } from "./windows.web.js";
|
|
77
|
+
import { Screen } from "./Screen.web.tsrx.js";
|
|
78
|
+
import { Tabs } from "./Tabs.web.tsrx.js";
|
|
79
|
+
import { Switch } from "./Switch.web.tsrx.js";
|
|
80
|
+
import { useSafeAreaInsets } from "./safeAreaInsets.web.tsrx.js";
|
|
81
|
+
import { SafeArea } from "./SafeArea.web.tsrx.js";
|
|
82
|
+
import { Drawer } from "./Drawer.web.tsrx.js";
|
|
83
|
+
import { Heading } from "./Heading.web.tsrx.js";
|
|
84
|
+
import { isNative } from "./platform.web.js";
|
|
85
|
+
import { getStack, registerStack, stackEntries } from "./stacks.web.js";
|
|
86
|
+
import { useBackInterceptor } from "./use-back.web.tsrx.js";
|
|
87
|
+
import { createStore } from "./store.js";
|
|
88
|
+
import { useStore } from "./use-store.web.tsrx.js";
|
|
89
|
+
import { Sheet } from "./Sheet.web.tsrx.js";
|
|
90
|
+
import { closeSheet, openSheet } from "./sheet-service.web.js";
|
|
91
|
+
export { Absolute, Accordion, ActivityIndicator, Alert, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, Button, CameraView, Card, Checkbox, CheckboxGroup, Chip, Collapsible, View as Column, Combobox, CommandPalette, ContextMenu, Drawer, DropdownMenu, Empty, FieldGroup, FormField, Grid, Heading, Icon, Image, InputMenu, InputNumber, InputRating, InputTags, Kbd, Link, Meter, NavLink, NavigationMenu, Overlay, Pager, Pagination, PinInput, Popover, Pressable, ProgressGroup, RadioGroup, RichText, RichTextSpan, Row, SafeArea, Screen, ScrollBox, ScrollView, SearchInput, SegmentedControl, Select, SelectMenu, Separator, Sheet, Skeleton, Slider, Spacer, Stack, Stepper, Switch, Table, Tabs, Text, TextArea, TextInput, Timeline, Tree, User, Video, View, WebView, addBackInterceptor, applyThemeClasses, canGoBack, closeSheet, createStore, currentModalRoute, currentRoute, deriveRouteManifest, getColorScheme, getStack, getThemePreference, getThemeScheme, hrefFor, isNative, onThemeSchemeChange, openSheet, openWindow, popRoute, pushDeepLink, pushRoute, redirect, registerIcon, registerIcons, registerRoutes, registerScreens, registerStack, routeFor, routeStacks, screenFor, setThemePreference, setTranslate, showToast, stackEntries, styled, themeSchemeClasses, useAnimation, useBackInterceptor, useCanGoBack, useColorScheme, useMeasure, useModalRoute, useRoute, useSafeAreaInsets, useStore, useThemeScheme };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { addBackInterceptor } from "./route.web.js";
|
|
2
|
+
import { hookSlots, useEffect } from "octane";
|
|
3
|
+
//#region src/use-back.web.tsrx
|
|
4
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
5
|
+
function useBackInterceptor(fn) {
|
|
6
|
+
useEffect(() => addBackInterceptor(fn), [fn], _h$0);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useBackInterceptor };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { hookSlots, useEffect, useState } from "octane";
|
|
2
|
+
import { memoPublish, memoSlot, memoTake0 } from "octane/internal/client";
|
|
3
|
+
//#region src/useMeasure.web.tsrx
|
|
4
|
+
var _hs$ = /* @__PURE__ */ hookSlots(4);
|
|
5
|
+
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
6
|
+
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
7
|
+
var _h$2 = /* @__PURE__ */ Symbol(_hs$ + 2);
|
|
8
|
+
var _h$3 = /* @__PURE__ */ Symbol(_hs$ + 3);
|
|
9
|
+
function readBounds(element) {
|
|
10
|
+
const rect = element.getBoundingClientRect();
|
|
11
|
+
return {
|
|
12
|
+
x: rect.left,
|
|
13
|
+
y: rect.top,
|
|
14
|
+
width: rect.width,
|
|
15
|
+
height: rect.height
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function useMeasure(options = {}) {
|
|
19
|
+
let __hks, __hke;
|
|
20
|
+
const [element, setElement] = useState(null, _h$0);
|
|
21
|
+
const [bounds, setBounds] = useState(null, _h$1);
|
|
22
|
+
const observe = options.observe ?? true;
|
|
23
|
+
const bind = (__hks = memoSlot(_h$2, "useCallback"), __hke = memoTake0(__hks), __hke === null ? memoPublish(__hks, (next) => {
|
|
24
|
+
setElement((current) => current === next ? current : next);
|
|
25
|
+
}) : __hke.value);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!element) {
|
|
28
|
+
setBounds(null);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const update = () => setBounds(readBounds(element));
|
|
32
|
+
update();
|
|
33
|
+
if (!observe) return;
|
|
34
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(update);
|
|
35
|
+
resizeObserver?.observe(element);
|
|
36
|
+
window.addEventListener("resize", update);
|
|
37
|
+
window.addEventListener("scroll", update, true);
|
|
38
|
+
return () => {
|
|
39
|
+
resizeObserver?.disconnect();
|
|
40
|
+
window.removeEventListener("resize", update);
|
|
41
|
+
window.removeEventListener("scroll", update, true);
|
|
42
|
+
};
|
|
43
|
+
}, [element, observe], _h$3);
|
|
44
|
+
return {
|
|
45
|
+
bind,
|
|
46
|
+
bounds
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { useMeasure };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { View } from "./View.web.tsrx.js";
|
|
2
|
+
import { Row } from "./Row.web.tsrx.js";
|
|
3
|
+
import { Text } from "./Text.web.tsrx.js";
|
|
4
|
+
import { Pressable } from "./Pressable.web.tsrx.js";
|
|
5
|
+
import { Icon } from "./Icon.web.tsrx.js";
|
|
6
|
+
import { Image } from "./Image.web.tsrx.js";
|
|
7
|
+
import { Slider } from "./Slider.web.tsrx.js";
|
|
8
|
+
import { bag4, child, clone, componentSlot, componentSlotVoid, drainFrag, hookSlots, ifBlock, markChildrenBlock, markWarm, registerWarmPlan, template, useEffect, useState, warmChild } from "octane";
|
|
9
|
+
import { textHoleUpdate } from "octane/internal/client";
|
|
10
|
+
//#region src/video-chrome.web.tsrx
|
|
11
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
12
|
+
var _hs$ = /* @__PURE__ */ hookSlots(12);
|
|
13
|
+
function __then$0(__props, __s, __extra) {
|
|
14
|
+
const __block = __s.block;
|
|
15
|
+
const props = __extra[0];
|
|
16
|
+
componentSlotVoid(__s, 0, __block.parentNode, Image, {
|
|
17
|
+
"className": "vx-video-poster",
|
|
18
|
+
"src": props.poster,
|
|
19
|
+
"ios": { stretch: "aspectFill" },
|
|
20
|
+
"android": { stretch: "aspectFill" }
|
|
21
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:1f04b0e4");
|
|
22
|
+
}
|
|
23
|
+
var __childrenBody = {};
|
|
24
|
+
var __childrenBody$ = {};
|
|
25
|
+
function __then$5(__props, __s, __extra) {
|
|
26
|
+
const __block = __s.block;
|
|
27
|
+
const props = __extra[0];
|
|
28
|
+
function __children$7(__props, __s, __extra) {
|
|
29
|
+
const __block = __s.block;
|
|
30
|
+
function __children$9(__props, __s, __extra) {
|
|
31
|
+
const __block = __s.block;
|
|
32
|
+
componentSlot(__s, 0, __block.parentNode, Icon, {
|
|
33
|
+
"name": "xplat-play",
|
|
34
|
+
"size": 28,
|
|
35
|
+
"color": "#fff"
|
|
36
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:1921eb83");
|
|
37
|
+
}
|
|
38
|
+
componentSlotVoid(__s, 0, __block.parentNode, View, {
|
|
39
|
+
"className": "vx-video-centerbtn",
|
|
40
|
+
"children": markChildrenBlock(__children$9, __childrenBody)
|
|
41
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:6b9e94c8");
|
|
42
|
+
}
|
|
43
|
+
componentSlotVoid(__s, 0, __block.parentNode, Pressable, {
|
|
44
|
+
"className": "vx-video-center",
|
|
45
|
+
"justifyContent": "center",
|
|
46
|
+
"alignItems": "center",
|
|
47
|
+
"accessibilityRole": "button",
|
|
48
|
+
"accessibilityLabel": "Play",
|
|
49
|
+
"onPress": props.onTogglePlay,
|
|
50
|
+
"children": markChildrenBlock(__children$7, __childrenBody$)
|
|
51
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:422fa4c4");
|
|
52
|
+
}
|
|
53
|
+
var __childrenBody$2 = {};
|
|
54
|
+
var __childrenBody$3 = {};
|
|
55
|
+
var __childrenBody$4 = {};
|
|
56
|
+
var __childrenBody$5 = {};
|
|
57
|
+
var __childrenBody$6 = {};
|
|
58
|
+
var __childrenBody$7 = {};
|
|
59
|
+
function __then$4(__props, __s, __extra) {
|
|
60
|
+
const __block = __s.block;
|
|
61
|
+
const props = __extra[0];
|
|
62
|
+
function __children$13(__props, __s, __extra) {
|
|
63
|
+
const __block = __s.block;
|
|
64
|
+
function __children$15(__props, __s, __extra) {
|
|
65
|
+
const __block = __s.block;
|
|
66
|
+
function __children$17(__props, __s, __extra) {
|
|
67
|
+
const __block = __s.block;
|
|
68
|
+
componentSlot(__s, 0, __block.parentNode, Icon, {
|
|
69
|
+
"name": props.playing ? "xplat-pause" : "xplat-play",
|
|
70
|
+
"size": 20,
|
|
71
|
+
"color": "#fff"
|
|
72
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:52dcc579");
|
|
73
|
+
}
|
|
74
|
+
function __children$20(__props, __s, __extra) {
|
|
75
|
+
const __block = __s.block;
|
|
76
|
+
let _b = __s.slots[0];
|
|
77
|
+
if (_b === void 0) {
|
|
78
|
+
let _m0, _m1;
|
|
79
|
+
const _root = clone(_t$0);
|
|
80
|
+
_m0 = __block.parentNode;
|
|
81
|
+
_m1 = child(_root);
|
|
82
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
83
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
84
|
+
}
|
|
85
|
+
{
|
|
86
|
+
const _v = stamp(props.position);
|
|
87
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
88
|
+
_b.d = _v;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function __children$24(__props, __s, __extra) {
|
|
92
|
+
const __block = __s.block;
|
|
93
|
+
let _b = __s.slots[0];
|
|
94
|
+
if (_b === void 0) {
|
|
95
|
+
let _m0, _m1;
|
|
96
|
+
const _root = clone(_t$0);
|
|
97
|
+
_m0 = __block.parentNode;
|
|
98
|
+
_m1 = child(_root);
|
|
99
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
100
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
101
|
+
}
|
|
102
|
+
{
|
|
103
|
+
const _v = stamp(props.duration);
|
|
104
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
105
|
+
_b.d = _v;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function __children$27(__props, __s, __extra) {
|
|
109
|
+
const __block = __s.block;
|
|
110
|
+
componentSlot(__s, 0, __block.parentNode, Icon, {
|
|
111
|
+
"name": props.muted ? "xplat-volume-off" : "xplat-volume",
|
|
112
|
+
"size": 20,
|
|
113
|
+
"color": "#fff"
|
|
114
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:3158cbfc");
|
|
115
|
+
}
|
|
116
|
+
componentSlotVoid(__s, 0, __block.parentNode, Pressable, {
|
|
117
|
+
"className": "vx-video-btn",
|
|
118
|
+
"accessibilityRole": "button",
|
|
119
|
+
"accessibilityLabel": props.playing ? "Pause" : "Play",
|
|
120
|
+
"onPress": props.onTogglePlay,
|
|
121
|
+
"children": markChildrenBlock(__children$17, __childrenBody$2)
|
|
122
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:b0e57e42");
|
|
123
|
+
componentSlotVoid(__s, 1, __block.parentNode, Text, {
|
|
124
|
+
"className": "vx-video-time",
|
|
125
|
+
"children": markChildrenBlock(__children$20, __childrenBody$3)
|
|
126
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:c5cb75e7");
|
|
127
|
+
componentSlotVoid(__s, 2, __block.parentNode, Slider, {
|
|
128
|
+
"className": "vx-video-slider",
|
|
129
|
+
"style": { flexGrow: 1 },
|
|
130
|
+
"value": props.position,
|
|
131
|
+
"minValue": 0,
|
|
132
|
+
"maxValue": props.duration > 0 ? props.duration : 1,
|
|
133
|
+
"onValueChange": props.onSeek
|
|
134
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:983b3c9e");
|
|
135
|
+
componentSlotVoid(__s, 3, __block.parentNode, Text, {
|
|
136
|
+
"className": "vx-video-time",
|
|
137
|
+
"children": markChildrenBlock(__children$24, __childrenBody$4)
|
|
138
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:fb6ef5fe");
|
|
139
|
+
componentSlotVoid(__s, 4, __block.parentNode, Pressable, {
|
|
140
|
+
"className": "vx-video-btn",
|
|
141
|
+
"accessibilityRole": "button",
|
|
142
|
+
"accessibilityLabel": props.muted ? "Unmute" : "Mute",
|
|
143
|
+
"onPress": props.onToggleMute,
|
|
144
|
+
"children": markChildrenBlock(__children$27, __childrenBody$5)
|
|
145
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:4aa80908");
|
|
146
|
+
}
|
|
147
|
+
componentSlotVoid(__s, 0, __block.parentNode, Row, {
|
|
148
|
+
"className": "vx-video-bar",
|
|
149
|
+
"alignItems": "center",
|
|
150
|
+
"gap": 8,
|
|
151
|
+
"children": markChildrenBlock(__children$15, __childrenBody$6)
|
|
152
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:199677e9");
|
|
153
|
+
}
|
|
154
|
+
ifBlock(__s, 0, __block.parentNode, !props.playing, __then$5, null, __block.endMarker, __extra);
|
|
155
|
+
componentSlotVoid(__s, 1, __block.parentNode, View, {
|
|
156
|
+
"className": "vx-video-barwrap",
|
|
157
|
+
"justifyContent": "end",
|
|
158
|
+
"children": markChildrenBlock(__children$13, __childrenBody$7)
|
|
159
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:b4f78ef1");
|
|
160
|
+
}
|
|
161
|
+
function stamp(ms) {
|
|
162
|
+
const total = Math.max(0, Math.floor(ms / 1e3));
|
|
163
|
+
return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, "0")}`;
|
|
164
|
+
}
|
|
165
|
+
var VideoChrome = /* @__PURE__ */ markWarm(function VideoChrome(props, __s, __extra) {
|
|
166
|
+
const __block = __s.block;
|
|
167
|
+
const [visible, setVisible] = useState(true, _hs$ + 0);
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (!props.playing || !visible) return;
|
|
170
|
+
const t = setTimeout(() => setVisible(false), 2500);
|
|
171
|
+
return () => clearTimeout(t);
|
|
172
|
+
}, [props.playing, visible], _hs$ + 1);
|
|
173
|
+
const __warmPlan = VideoChrome.__warm;
|
|
174
|
+
if (typeof __warmPlan === "function") registerWarmPlan(__warmPlan, props);
|
|
175
|
+
else registerWarmPlan(() => {
|
|
176
|
+
if (props.poster && !props.started) warmChild(Image, {
|
|
177
|
+
className: "vx-video-poster",
|
|
178
|
+
src: props.poster,
|
|
179
|
+
ios: { stretch: "aspectFill" },
|
|
180
|
+
android: { stretch: "aspectFill" }
|
|
181
|
+
});
|
|
182
|
+
}, void 0);
|
|
183
|
+
{
|
|
184
|
+
const __ifCondition = props.poster && !props.started;
|
|
185
|
+
ifBlock(__s, 0, __block.parentNode, __ifCondition, __then$0, null, __block.endMarker, __ifCondition ? [props] : void 0);
|
|
186
|
+
}
|
|
187
|
+
componentSlotVoid(__s, 1, __block.parentNode, Pressable, {
|
|
188
|
+
"className": "vx-video-tap",
|
|
189
|
+
"accessibilityRole": "button",
|
|
190
|
+
"accessibilityLabel": visible ? "Hide video controls" : "Show video controls",
|
|
191
|
+
"onPress": () => setVisible(props.playing ? !visible : true)
|
|
192
|
+
}, __block.endMarker, void 0, 2, void 0, void 0, "c:9cac9799");
|
|
193
|
+
{
|
|
194
|
+
const __ifCondition$ = visible;
|
|
195
|
+
ifBlock(__s, 2, __block.parentNode, __ifCondition$, __then$4, null, __block.endMarker, __ifCondition$ ? [props] : void 0);
|
|
196
|
+
}
|
|
197
|
+
}, (__wp) => {
|
|
198
|
+
const props = __wp;
|
|
199
|
+
if (props.poster && !props.started) warmChild(Image, {
|
|
200
|
+
className: "vx-video-poster",
|
|
201
|
+
src: props.poster,
|
|
202
|
+
ios: { stretch: "aspectFill" },
|
|
203
|
+
android: { stretch: "aspectFill" }
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
//#endregion
|
|
207
|
+
export { VideoChrome };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { View } from "../View.web.tsrx.js";
|
|
2
|
+
import { Popover } from "../Popover.web.tsrx.js";
|
|
3
|
+
import { bag4, bag5, child, clone, componentSlotVoid, drainFrag, hookSlots, markChildrenBlock, sibling, template, useEffect, useRef, useState } from "octane";
|
|
4
|
+
import { compilerMemoRegion, hookMemoCreate, hookMemoPublishInvariant, textHoleUpdate } from "octane/internal/client";
|
|
5
|
+
//#region src/web/Hoverable.web.tsrx
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
7
|
+
var _t$1 = /* @__PURE__ */ template("<!><!>", 3, 1);
|
|
8
|
+
var _hs$ = /* @__PURE__ */ hookSlots(7);
|
|
9
|
+
var __childrenBody = {};
|
|
10
|
+
var __childrenBody$ = {};
|
|
11
|
+
var __childrenBody$2 = {};
|
|
12
|
+
var Hoverable = function Hoverable(props, __s, __extra) {
|
|
13
|
+
const __block = __s.block;
|
|
14
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
15
|
+
let __hk = __memoRegion.hooks;
|
|
16
|
+
if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(3);
|
|
17
|
+
const [open, setOpen] = useState(false, _hs$ + 0);
|
|
18
|
+
const anchor = useRef(null, _hs$ + 1);
|
|
19
|
+
const anchorBinding = useRef(null, _hs$ + 2);
|
|
20
|
+
const cardBinding = useRef(null, _hs$ + 3);
|
|
21
|
+
const openTimer = useRef(null, _hs$ + 4);
|
|
22
|
+
const closeTimer = useRef(null, _hs$ + 5);
|
|
23
|
+
const clearOpen = __hk[0] ?? hookMemoPublishInvariant(__hk, 0, () => {
|
|
24
|
+
if (openTimer.current !== null) clearTimeout(openTimer.current);
|
|
25
|
+
openTimer.current = null;
|
|
26
|
+
});
|
|
27
|
+
const clearClose = __hk[1] ?? hookMemoPublishInvariant(__hk, 1, () => {
|
|
28
|
+
if (closeTimer.current !== null) clearTimeout(closeTimer.current);
|
|
29
|
+
closeTimer.current = null;
|
|
30
|
+
});
|
|
31
|
+
const scheduleClose = () => {
|
|
32
|
+
clearClose();
|
|
33
|
+
closeTimer.current = setTimeout(() => {
|
|
34
|
+
closeTimer.current = null;
|
|
35
|
+
setOpen(false);
|
|
36
|
+
}, Math.max(0, props.closeDelay ?? 120));
|
|
37
|
+
};
|
|
38
|
+
const startOpen = () => {
|
|
39
|
+
clearClose();
|
|
40
|
+
clearOpen();
|
|
41
|
+
openTimer.current = setTimeout(() => {
|
|
42
|
+
openTimer.current = null;
|
|
43
|
+
setOpen(true);
|
|
44
|
+
}, Math.max(0, props.openDelay ?? 500));
|
|
45
|
+
};
|
|
46
|
+
const unbind = __hk[2] ?? hookMemoPublishInvariant(__hk, 2, (binding) => {
|
|
47
|
+
if (!binding) return;
|
|
48
|
+
binding.node.removeEventListener("mouseenter", binding.enter);
|
|
49
|
+
binding.node.removeEventListener("mouseleave", binding.leave);
|
|
50
|
+
});
|
|
51
|
+
const bindAnchor = (node) => {
|
|
52
|
+
anchor.current = node;
|
|
53
|
+
if (anchorBinding.current?.node === node) return;
|
|
54
|
+
unbind(anchorBinding.current);
|
|
55
|
+
anchorBinding.current = null;
|
|
56
|
+
if (!node) return;
|
|
57
|
+
const binding = {
|
|
58
|
+
node,
|
|
59
|
+
enter: startOpen,
|
|
60
|
+
leave: () => {
|
|
61
|
+
clearOpen();
|
|
62
|
+
scheduleClose();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
node.addEventListener("mouseenter", binding.enter);
|
|
66
|
+
node.addEventListener("mouseleave", binding.leave);
|
|
67
|
+
anchorBinding.current = binding;
|
|
68
|
+
};
|
|
69
|
+
const bindCard = (node) => {
|
|
70
|
+
if (cardBinding.current?.node === node) return;
|
|
71
|
+
unbind(cardBinding.current);
|
|
72
|
+
cardBinding.current = null;
|
|
73
|
+
if (!node) return;
|
|
74
|
+
const binding = {
|
|
75
|
+
node,
|
|
76
|
+
enter: clearClose,
|
|
77
|
+
leave: scheduleClose
|
|
78
|
+
};
|
|
79
|
+
node.addEventListener("mouseenter", binding.enter);
|
|
80
|
+
node.addEventListener("mouseleave", binding.leave);
|
|
81
|
+
cardBinding.current = binding;
|
|
82
|
+
};
|
|
83
|
+
useEffect(() => () => {
|
|
84
|
+
clearOpen();
|
|
85
|
+
clearClose();
|
|
86
|
+
unbind(anchorBinding.current);
|
|
87
|
+
unbind(cardBinding.current);
|
|
88
|
+
}, [], _hs$ + 6);
|
|
89
|
+
function __children$1(__props, __s, __extra) {
|
|
90
|
+
const __block = __s.block;
|
|
91
|
+
function __children$4(__props, __s, __extra) {
|
|
92
|
+
const __block = __s.block;
|
|
93
|
+
function __children$6(__props, __s, __extra) {
|
|
94
|
+
const __block = __s.block;
|
|
95
|
+
let _b = __s.slots[0];
|
|
96
|
+
if (_b === void 0) {
|
|
97
|
+
let _m0, _m1;
|
|
98
|
+
const _root = clone(_t$0);
|
|
99
|
+
_m0 = __block.parentNode;
|
|
100
|
+
_m1 = child(_root);
|
|
101
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
102
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
103
|
+
}
|
|
104
|
+
{
|
|
105
|
+
const _v = props.card;
|
|
106
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
107
|
+
_b.d = _v;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
componentSlotVoid(__s, 0, __block.parentNode, View, {
|
|
111
|
+
"bind": bindCard,
|
|
112
|
+
"className": props.cardClassName,
|
|
113
|
+
"style": props.cardStyle,
|
|
114
|
+
"children": markChildrenBlock(__children$6, __childrenBody)
|
|
115
|
+
}, __block.endMarker, void 0, void 0, void 0, void 0, "c:c1227cf9");
|
|
116
|
+
}
|
|
117
|
+
let _b = __s.slots[0];
|
|
118
|
+
if (_b === void 0) {
|
|
119
|
+
let _m0, _m1, _m4;
|
|
120
|
+
const _root = clone(_t$1);
|
|
121
|
+
_m0 = __block.parentNode;
|
|
122
|
+
const _el0 = child(_root);
|
|
123
|
+
_m1 = _el0;
|
|
124
|
+
_m4 = sibling(_el0, 1);
|
|
125
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
126
|
+
_b = bag5(__s, null, _m0, _m1, null, void 0, _m4);
|
|
127
|
+
}
|
|
128
|
+
{
|
|
129
|
+
const _v = props.children;
|
|
130
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true);
|
|
131
|
+
_b.d = _v;
|
|
132
|
+
}
|
|
133
|
+
componentSlotVoid(__s, 2, _b.a, Popover, {
|
|
134
|
+
"open": open,
|
|
135
|
+
"anchor": anchor,
|
|
136
|
+
"placement": props.placement ?? "bottom",
|
|
137
|
+
"dismissOnOutsideTap": false,
|
|
138
|
+
"children": markChildrenBlock(__children$4, __childrenBody$)
|
|
139
|
+
}, _b.e, void 0, void 0, void 0, void 0, "c:b985f665");
|
|
140
|
+
}
|
|
141
|
+
componentSlotVoid(__s, 0, __block.parentNode, View, {
|
|
142
|
+
"className": props.className,
|
|
143
|
+
"style": props.style,
|
|
144
|
+
"bind": bindAnchor,
|
|
145
|
+
"web": props.web,
|
|
146
|
+
"children": markChildrenBlock(__children$1, __childrenBody$2)
|
|
147
|
+
}, __block.endMarker, void 0, void 0, true, void 0, "c:3f5159c9");
|
|
148
|
+
};
|
|
149
|
+
//#endregion
|
|
150
|
+
export { Hoverable };
|