@clubmed/trident-ui 1.6.0 → 1.6.1-beta.2
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 -2
- package/assets/icons/Utilities/LightBulb.svg +3 -0
- package/assets/trident-ui.css +1 -1
- package/atoms/Heading/Heading.d.ts +1 -6
- package/atoms/Heading/Heading.js +2 -11
- package/atoms/Heading/Heading.js.map +1 -1
- package/atoms/Heading/HeadingGroup.d.ts +1 -7
- package/atoms/Heading/HeadingGroup.js +2 -12
- package/atoms/Heading/HeadingGroup.js.map +1 -1
- package/atoms/Icons/IconsResolver.js +2 -2
- package/atoms/Icons/contexts/IconsContext.js +2 -2
- package/atoms/Icons/index.d.ts +0 -1
- package/atoms/Icons/index.js +8 -9
- package/atoms/Icons/index.js.map +1 -1
- package/atoms/Image/Image.d.ts +1 -7
- package/atoms/Image/Image.js +2 -15
- package/atoms/Image/Image.js.map +1 -1
- package/atoms/Prose/Prose.d.ts +1 -5
- package/atoms/Prose/Prose.js +2 -15
- package/atoms/Prose/Prose.js.map +1 -1
- package/chunks/ResizeObserver.js +13 -13
- package/chunks/ResizeObserver.js.map +1 -1
- package/chunks/_commonjsHelpers.js +4 -29
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/clsx.js.map +1 -1
- package/chunks/plugin.js +4 -4
- package/chunks/plugin.js.map +1 -1
- package/molecules/Arrows/Arrows.d.ts +1 -16
- package/molecules/Arrows/Arrows.js +2 -63
- package/molecules/Arrows/Arrows.js.map +1 -1
- package/molecules/Arrows.d.ts +1 -1
- package/molecules/Arrows.js +1 -1
- package/molecules/Avatar.d.ts +1 -8
- package/molecules/Avatar.js +2 -47
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.d.ts +1 -23
- package/molecules/Backdrop.js +2 -115
- package/molecules/Backdrop.js.map +1 -1
- package/molecules/Breadcrumb.d.ts +1 -10
- package/molecules/Breadcrumb.js +2 -47
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Breadcrumb.themes.d.ts +1 -8
- package/molecules/Breadcrumb.themes.js +2 -12
- package/molecules/Breadcrumb.themes.js.map +1 -1
- package/molecules/Buttons/ArrowButton.js.map +1 -1
- package/molecules/Buttons/Button.d.ts +1 -1
- package/molecules/Buttons/Button.js +1 -1
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.js +1 -1
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/ButtonContent.d.ts +1 -17
- package/molecules/Buttons/ButtonContent.js +2 -15
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Buttons/FakeButton.d.ts +1 -1
- package/molecules/Buttons/FakeButton.js +1 -1
- package/molecules/Buttons/FakeButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.d.ts +1 -2288
- package/molecules/Buttons/v2/Button.js +3 -47
- package/molecules/Buttons/v2/Button.js.map +1 -1
- package/molecules/Buttons/v2/Button.type.d.ts +1 -57
- package/molecules/Buttons/v2/Button.type.js +6 -42
- package/molecules/Buttons/v2/Button.type.js.map +1 -1
- package/molecules/Card.d.ts +1 -1
- package/molecules/Card.js +1 -1
- package/molecules/Cards/Card.js +2 -2
- package/molecules/Cards/CardAspectRatios.d.ts +1 -6
- package/molecules/Cards/CardAspectRatios.js +2 -7
- package/molecules/Cards/CardAspectRatios.js.map +1 -1
- package/molecules/Cards/CardBackground.d.ts +1 -4
- package/molecules/Cards/CardBackground.js +2 -27
- package/molecules/Cards/CardBackground.js.map +1 -1
- package/molecules/Cards/CardBackgroundContext.d.ts +1 -6
- package/molecules/Cards/CardBackgroundContext.js +3 -7
- package/molecules/Cards/CardBackgroundContext.js.map +1 -1
- package/molecules/Cards/CardClickable.d.ts +1 -6
- package/molecules/Cards/CardClickable.js +2 -34
- package/molecules/Cards/CardClickable.js.map +1 -1
- package/molecules/Cards/ExpandableCard.d.ts +1 -14
- package/molecules/Cards/ExpandableCard.js +2 -77
- package/molecules/Cards/ExpandableCard.js.map +1 -1
- package/molecules/Cards/v2/Card.d.ts +1 -15
- package/molecules/Cards/v2/Card.js +2 -31
- package/molecules/Cards/v2/Card.js.map +1 -1
- package/molecules/Chip.d.ts +1 -9
- package/molecules/Chip.js +2 -28
- package/molecules/Chip.js.map +1 -1
- package/molecules/Chip.themes.d.ts +1 -12
- package/molecules/Chip.themes.js +3 -21
- package/molecules/Chip.themes.js.map +1 -1
- package/molecules/Clickable/Clickable.d.ts +1 -0
- package/molecules/Clickable/Clickable.js +5 -0
- package/molecules/Clickable/Clickable.js.map +1 -0
- package/molecules/ElasticHeight.d.ts +1 -8
- package/molecules/ElasticHeight.js +2 -33
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -6
- package/molecules/Forms/Checkboxes/Checkbox.js +2 -97
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -5
- package/molecules/Forms/Checkboxes/Checkboxes.js +2 -46
- package/molecules/Forms/Checkboxes/Checkboxes.js.map +1 -1
- package/molecules/Forms/Checkboxes/index.d.ts +2 -2
- package/molecules/Forms/Checkboxes/index.js +2 -2
- package/molecules/Forms/DateField.d.ts +1 -24
- package/molecules/Forms/DateField.js +2 -185
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.d.ts +1 -9
- package/molecules/Forms/Filter.js +2 -65
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.d.ts +1 -14
- package/molecules/Forms/FormControl.js +2 -51
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/FormControlError.d.ts +1 -2
- package/molecules/Forms/FormControlError.js +2 -23
- package/molecules/Forms/FormControlError.js.map +1 -1
- package/molecules/Forms/FormLabel.d.ts +1 -8
- package/molecules/Forms/FormLabel.js +2 -34
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +1 -320
- package/molecules/Forms/NumberField.js +3 -126
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Forms/Password/Password.d.ts +1 -7
- package/molecules/Forms/Password/Password.js +2 -112
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Password/ValidationMessage.d.ts +1 -6
- package/molecules/Forms/Password/ValidationMessage.js +2 -25
- package/molecules/Forms/Password/ValidationMessage.js.map +1 -1
- package/molecules/Forms/Password/index.d.ts +2 -2
- package/molecules/Forms/Password/index.js +2 -2
- package/molecules/Forms/Radios/Radio.d.ts +1 -17
- package/molecules/Forms/Radios/Radio.js +2 -60
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.d.ts +1 -5
- package/molecules/Forms/Radios/RadioGroup.js +2 -73
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Radios/index.d.ts +2 -2
- package/molecules/Forms/Radios/index.js +4 -4
- package/molecules/Forms/Range.d.ts +1 -40
- package/molecules/Forms/Range.js +2 -230
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +1 -10
- package/molecules/Forms/Select.js +2 -101
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/Switch.d.ts +1 -5
- package/molecules/Forms/Switch.js +2 -60
- package/molecules/Forms/Switch.js.map +1 -1
- package/molecules/Forms/TextField.d.ts +1 -12
- package/molecules/Forms/TextField.js +2 -95
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/HamburgerIcon.d.ts +1 -6
- package/molecules/HamburgerIcon.js +2 -40
- package/molecules/HamburgerIcon.js.map +1 -1
- package/molecules/Link.d.ts +1 -35
- package/molecules/Link.js +2 -53
- package/molecules/Link.js.map +1 -1
- package/molecules/Loader.d.ts +1 -7
- package/molecules/Loader.js +2 -63
- package/molecules/Loader.js.map +1 -1
- package/molecules/Pagination.d.ts +1 -38
- package/molecules/Pagination.helper.d.ts +1 -48
- package/molecules/Pagination.helper.js +5 -27
- package/molecules/Pagination.helper.js.map +1 -1
- package/molecules/Pagination.js +2 -151
- package/molecules/Pagination.js.map +1 -1
- package/molecules/Popin.d.ts +1 -22
- package/molecules/Popin.js +2 -58
- package/molecules/Popin.js.map +1 -1
- package/molecules/Portal/Portal.d.ts +1 -11
- package/molecules/Portal/Portal.js +2 -28
- package/molecules/Portal/Portal.js.map +1 -1
- package/molecules/Spinner.d.ts +1 -9
- package/molecules/Spinner.js +2 -19
- package/molecules/Spinner.js.map +1 -1
- package/molecules/Tabs/Tab.d.ts +1 -31
- package/molecules/Tabs/Tab.js +2 -107
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.d.ts +1 -10
- package/molecules/Tabs/TabList.js +2 -51
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.d.ts +1 -17
- package/molecules/Tabs/TabPanel.js +2 -40
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.d.ts +1 -12
- package/molecules/Tabs/Tabs.js +2 -17
- package/molecules/Tabs/Tabs.js.map +1 -1
- package/molecules/Tabs/TabsBody.d.ts +0 -6
- package/molecules/Tabs/TabsBody.js +1 -6
- package/molecules/Tabs/TabsBody.js.map +1 -1
- package/molecules/Tabs/TabsHeader.js +1 -1
- package/molecules/Tabs/TabsHeading.js +1 -1
- package/molecules/Tabs/TabsPanel.js +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +1 -52
- package/molecules/Tabs/context/TabControl.js +3 -87
- package/molecules/Tabs/context/TabControl.js.map +1 -1
- package/molecules/Tabs/hooks/tabControl.d.ts +1 -44
- package/molecules/Tabs/hooks/tabControl.js +7 -31
- package/molecules/Tabs/hooks/tabControl.js.map +1 -1
- package/molecules/Tabs/index.d.ts +7 -7
- package/molecules/Tabs/index.js +13 -14
- package/molecules/Tabs/theme.d.ts +1 -10
- package/molecules/Tabs/theme.js +1 -20
- package/molecules/Tabs/theme.js.map +1 -1
- package/molecules/Tag.d.ts +1 -45
- package/molecules/Tag.js +2 -76
- package/molecules/Tag.js.map +1 -1
- package/package.json +30 -93
- package/tailwind/tailwind.preset.js +232 -232
- package/tailwind/tailwind.preset.js.map +1 -1
- package/ui/Avatar.d.ts +8 -0
- package/ui/Avatar.js +50 -0
- package/ui/Avatar.js.map +1 -0
- package/ui/Backdrop.d.ts +23 -0
- package/ui/Backdrop.js +118 -0
- package/ui/Backdrop.js.map +1 -0
- package/ui/Breadcrumb.d.ts +10 -0
- package/ui/Breadcrumb.js +50 -0
- package/ui/Breadcrumb.js.map +1 -0
- package/ui/Breadcrumb.themes.d.ts +8 -0
- package/ui/Breadcrumb.themes.js +15 -0
- package/ui/Breadcrumb.themes.js.map +1 -0
- package/ui/Chip.d.ts +9 -0
- package/ui/Chip.js +31 -0
- package/ui/Chip.js.map +1 -0
- package/ui/Chip.themes.d.ts +12 -0
- package/ui/Chip.themes.js +24 -0
- package/ui/Chip.themes.js.map +1 -0
- package/{atoms/Clickable → ui}/Clickable.js +1 -1
- package/ui/Clickable.js.map +1 -0
- package/ui/ElasticHeight.d.ts +8 -0
- package/ui/ElasticHeight.js +36 -0
- package/ui/ElasticHeight.js.map +1 -0
- package/ui/HamburgerIcon.d.ts +6 -0
- package/ui/HamburgerIcon.js +43 -0
- package/ui/HamburgerIcon.js.map +1 -0
- package/ui/Image.d.ts +7 -0
- package/ui/Image.js +18 -0
- package/ui/Image.js.map +1 -0
- package/ui/Link.d.ts +35 -0
- package/ui/Link.js +56 -0
- package/ui/Link.js.map +1 -0
- package/ui/Loader.d.ts +7 -0
- package/ui/Loader.js +66 -0
- package/ui/Loader.js.map +1 -0
- package/ui/Pagination.d.ts +38 -0
- package/ui/Pagination.helper.d.ts +48 -0
- package/ui/Pagination.helper.js +30 -0
- package/ui/Pagination.helper.js.map +1 -0
- package/ui/Pagination.js +154 -0
- package/ui/Pagination.js.map +1 -0
- package/ui/Popin.d.ts +22 -0
- package/ui/Popin.js +61 -0
- package/ui/Popin.js.map +1 -0
- package/ui/Portal.d.ts +11 -0
- package/ui/Portal.js +31 -0
- package/ui/Portal.js.map +1 -0
- package/ui/Prose.d.ts +5 -0
- package/ui/Prose.js +18 -0
- package/ui/Prose.js.map +1 -0
- package/ui/Spinner.d.ts +9 -0
- package/ui/Spinner.js +22 -0
- package/ui/Spinner.js.map +1 -0
- package/ui/Tag.d.ts +45 -0
- package/ui/Tag.js +79 -0
- package/ui/Tag.js.map +1 -0
- package/ui/arrows/Arrows.d.ts +16 -0
- package/ui/arrows/Arrows.js +66 -0
- package/ui/arrows/Arrows.js.map +1 -0
- package/ui/buttons/ArrowButton.d.ts +6 -0
- package/ui/buttons/ArrowButton.js +7 -0
- package/ui/buttons/ArrowButton.js.map +1 -0
- package/ui/buttons/Button.d.ts +2392 -0
- package/ui/buttons/Button.js +50 -0
- package/ui/buttons/Button.js.map +1 -0
- package/ui/buttons/Button.type.d.ts +57 -0
- package/ui/buttons/Button.type.js +45 -0
- package/ui/buttons/Button.type.js.map +1 -0
- package/ui/buttons/ButtonContent.d.ts +17 -0
- package/ui/buttons/ButtonContent.js +18 -0
- package/ui/buttons/ButtonContent.js.map +1 -0
- package/ui/cards/Card.d.ts +15 -0
- package/ui/cards/Card.js +34 -0
- package/ui/cards/Card.js.map +1 -0
- package/ui/cards/CardAspectRatios.d.ts +6 -0
- package/ui/cards/CardAspectRatios.js +10 -0
- package/ui/cards/CardAspectRatios.js.map +1 -0
- package/ui/cards/CardBackground.d.ts +4 -0
- package/ui/cards/CardBackground.js +30 -0
- package/ui/cards/CardBackground.js.map +1 -0
- package/ui/cards/CardBackgroundContext.d.ts +6 -0
- package/ui/cards/CardBackgroundContext.js +10 -0
- package/ui/cards/CardBackgroundContext.js.map +1 -0
- package/ui/cards/CardClickable.d.ts +6 -0
- package/ui/cards/CardClickable.js +37 -0
- package/ui/cards/CardClickable.js.map +1 -0
- package/ui/cards/ExpandableCard.d.ts +14 -0
- package/ui/cards/ExpandableCard.js +80 -0
- package/ui/cards/ExpandableCard.js.map +1 -0
- package/{contexts → ui/contexts}/Device.d.ts +1 -1
- package/{contexts → ui/contexts}/Device.js +1 -1
- package/{contexts → ui/contexts}/TridentUIConfig.js +68 -68
- package/ui/contexts/TridentUIConfig.js.map +1 -0
- package/ui/contexts/devices/Device.js.map +1 -0
- package/{contexts/Devices → ui/contexts/devices}/hooks/useQueries.d.ts +8 -1
- package/ui/contexts/devices/hooks/useQueries.js.map +1 -0
- package/ui/contexts/devices/reducers/reducer.js.map +1 -0
- package/ui/forms/DateField.d.ts +24 -0
- package/ui/forms/DateField.js +162 -0
- package/ui/forms/DateField.js.map +1 -0
- package/ui/forms/Filter.d.ts +9 -0
- package/ui/forms/Filter.js +68 -0
- package/ui/forms/Filter.js.map +1 -0
- package/ui/forms/FormControl.d.ts +14 -0
- package/ui/forms/FormControl.js +54 -0
- package/ui/forms/FormControl.js.map +1 -0
- package/ui/forms/FormControlError.d.ts +2 -0
- package/ui/forms/FormControlError.js +26 -0
- package/ui/forms/FormControlError.js.map +1 -0
- package/ui/forms/FormLabel.d.ts +8 -0
- package/ui/forms/FormLabel.js +37 -0
- package/ui/forms/FormLabel.js.map +1 -0
- package/ui/forms/NumberField.d.ts +332 -0
- package/ui/forms/NumberField.js +129 -0
- package/ui/forms/NumberField.js.map +1 -0
- package/ui/forms/Range.d.ts +40 -0
- package/ui/forms/Range.js +161 -0
- package/ui/forms/Range.js.map +1 -0
- package/ui/forms/Select.d.ts +10 -0
- package/ui/forms/Select.js +104 -0
- package/ui/forms/Select.js.map +1 -0
- package/ui/forms/Switch.d.ts +5 -0
- package/ui/forms/Switch.js +63 -0
- package/ui/forms/Switch.js.map +1 -0
- package/ui/forms/TextField.d.ts +12 -0
- package/ui/forms/TextField.js +98 -0
- package/ui/forms/TextField.js.map +1 -0
- package/ui/forms/checkboxes/Checkbox.d.ts +6 -0
- package/ui/forms/checkboxes/Checkbox.js +100 -0
- package/ui/forms/checkboxes/Checkbox.js.map +1 -0
- package/ui/forms/checkboxes/Checkboxes.d.ts +5 -0
- package/ui/forms/checkboxes/Checkboxes.js +49 -0
- package/ui/forms/checkboxes/Checkboxes.js.map +1 -0
- package/ui/forms/checkboxes/index.d.ts +2 -0
- package/ui/forms/checkboxes/index.js +7 -0
- package/ui/forms/checkboxes/index.js.map +1 -0
- package/ui/forms/password/Password.d.ts +7 -0
- package/ui/forms/password/Password.js +115 -0
- package/ui/forms/password/Password.js.map +1 -0
- package/ui/forms/password/ValidationMessage.d.ts +6 -0
- package/ui/forms/password/ValidationMessage.js +28 -0
- package/ui/forms/password/ValidationMessage.js.map +1 -0
- package/ui/forms/password/index.d.ts +2 -0
- package/ui/forms/password/index.js +7 -0
- package/ui/forms/password/index.js.map +1 -0
- package/ui/forms/radios/Radio.d.ts +17 -0
- package/ui/forms/radios/Radio.js +63 -0
- package/ui/forms/radios/Radio.js.map +1 -0
- package/ui/forms/radios/RadioGroup.d.ts +5 -0
- package/ui/forms/radios/RadioGroup.js +76 -0
- package/ui/forms/radios/RadioGroup.js.map +1 -0
- package/ui/forms/radios/index.d.ts +2 -0
- package/ui/forms/radios/index.js +7 -0
- package/ui/forms/radios/index.js.map +1 -0
- package/ui/heading/Heading.d.ts +6 -0
- package/ui/heading/Heading.js +14 -0
- package/ui/heading/Heading.js.map +1 -0
- package/ui/heading/HeadingGroup.d.ts +7 -0
- package/ui/heading/HeadingGroup.js +15 -0
- package/ui/heading/HeadingGroup.js.map +1 -0
- package/ui/helpers/colors/colors.js.map +1 -0
- package/ui/helpers/twMerge.js.map +1 -0
- package/ui/hooks/keyboard.constants.js.map +1 -0
- package/{hooks → ui/hooks}/useInternalStatus.d.ts +1 -1
- package/ui/hooks/useInternalStatus.js.map +1 -0
- package/ui/hooks/useKeyboardControls.js.map +1 -0
- package/{hooks → ui/hooks}/useResizeObserver.js +1 -1
- package/ui/hooks/useResizeObserver.js.map +1 -0
- package/{hooks → ui/hooks}/useSafeBoop.js +674 -708
- package/ui/hooks/useSafeBoop.js.map +1 -0
- package/ui/hooks/useSlots.js.map +1 -0
- package/ui/hooks/useValue.js.map +1 -0
- package/ui/tabs/Tab.d.ts +31 -0
- package/ui/tabs/Tab.js +110 -0
- package/ui/tabs/Tab.js.map +1 -0
- package/ui/tabs/TabList.d.ts +10 -0
- package/ui/tabs/TabList.js +54 -0
- package/ui/tabs/TabList.js.map +1 -0
- package/ui/tabs/TabPanel.d.ts +17 -0
- package/ui/tabs/TabPanel.js +43 -0
- package/ui/tabs/TabPanel.js.map +1 -0
- package/ui/tabs/Tabs.d.ts +12 -0
- package/ui/tabs/Tabs.js +20 -0
- package/ui/tabs/Tabs.js.map +1 -0
- package/ui/tabs/TabsBody.d.ts +6 -0
- package/ui/tabs/TabsBody.js +7 -0
- package/ui/tabs/TabsBody.js.map +1 -0
- package/ui/tabs/context/TabControl.d.ts +52 -0
- package/ui/tabs/context/TabControl.js +90 -0
- package/ui/tabs/context/TabControl.js.map +1 -0
- package/ui/tabs/hooks/tabControl.d.ts +44 -0
- package/ui/tabs/hooks/tabControl.js +34 -0
- package/ui/tabs/hooks/tabControl.js.map +1 -0
- package/ui/tabs/index.d.ts +5 -0
- package/ui/tabs/index.js +13 -0
- package/ui/tabs/index.js.map +1 -0
- package/ui/tabs/theme.d.ts +10 -0
- package/ui/tabs/theme.js +24 -0
- package/ui/tabs/theme.js.map +1 -0
- package/ui/types/Devices.js.map +1 -0
- package/CHANGELOG.md +0 -1949
- package/atoms/Clickable/Clickable.js.map +0 -1
- package/atoms/Icons/Iconics.d.ts +0 -9
- package/atoms/Icons/Iconics.js +0 -2
- package/atoms/Icons/Iconics.js.map +0 -1
- package/contexts/Devices/Device.js.map +0 -1
- package/contexts/Devices/hooks/useQueries.js.map +0 -1
- package/contexts/Devices/reducers/reducer.js.map +0 -1
- package/contexts/TridentUIConfig.js.map +0 -1
- package/helpers/colors/colors.js.map +0 -1
- package/helpers/twMerge.js.map +0 -1
- package/hooks/keyboard.constants.js.map +0 -1
- package/hooks/useInternalStatus.js.map +0 -1
- package/hooks/useKeyboardControls.js.map +0 -1
- package/hooks/useResizeObserver.js.map +0 -1
- package/hooks/useSafeBoop.js.map +0 -1
- package/hooks/useSlots.js.map +0 -1
- package/hooks/useValue.js.map +0 -1
- package/types/Devices.js.map +0 -1
- /package/{atoms/Clickable → ui}/Clickable.d.ts +0 -0
- /package/{molecules/Arrows → ui/arrows}/ArrowsLabels.d.js +0 -0
- /package/{molecules/Arrows → ui/arrows}/ArrowsLabels.d.js.map +0 -0
- /package/{contexts → ui/contexts}/Device.js.map +0 -0
- /package/{contexts → ui/contexts}/TridentUIConfig.d.ts +0 -0
- /package/{contexts/Devices → ui/contexts/devices}/Device.d.ts +0 -0
- /package/{contexts/Devices → ui/contexts/devices}/Device.js +0 -0
- /package/{contexts/Devices → ui/contexts/devices}/hooks/useQueries.js +0 -0
- /package/{contexts/Devices → ui/contexts/devices}/reducers/reducer.d.ts +0 -0
- /package/{contexts/Devices → ui/contexts/devices}/reducers/reducer.js +0 -0
- /package/{helpers → ui/helpers}/colors/colors.d.ts +0 -0
- /package/{helpers → ui/helpers}/colors/colors.js +0 -0
- /package/{helpers → ui/helpers}/twMerge.d.ts +0 -0
- /package/{helpers → ui/helpers}/twMerge.js +0 -0
- /package/{hooks → ui/hooks}/keyboard.constants.d.ts +0 -0
- /package/{hooks → ui/hooks}/keyboard.constants.js +0 -0
- /package/{hooks → ui/hooks}/useInternalStatus.js +0 -0
- /package/{hooks → ui/hooks}/useKeyboardControls.d.ts +0 -0
- /package/{hooks → ui/hooks}/useKeyboardControls.js +0 -0
- /package/{hooks → ui/hooks}/useResizeObserver.d.ts +0 -0
- /package/{hooks → ui/hooks}/useSafeBoop.d.ts +0 -0
- /package/{hooks → ui/hooks}/useSlots.d.ts +0 -0
- /package/{hooks → ui/hooks}/useSlots.js +0 -0
- /package/{hooks → ui/hooks}/useValue.d.ts +0 -0
- /package/{hooks → ui/hooks}/useValue.js +0 -0
- /package/{types → ui/types}/Colors.d.ts +0 -0
- /package/{types → ui/types}/Colors.js +0 -0
- /package/{types → ui/types}/Colors.js.map +0 -0
- /package/{types → ui/types}/Devices.d.ts +0 -0
- /package/{types → ui/types}/Devices.js +0 -0
- /package/{types → ui/types}/Direction.d.ts +0 -0
- /package/{types → ui/types}/Direction.js +0 -0
- /package/{types → ui/types}/Direction.js.map +0 -0
- /package/{types → ui/types}/LiteralUnion.d.ts +0 -0
- /package/{types → ui/types}/LiteralUnion.js +0 -0
- /package/{types → ui/types}/LiteralUnion.js.map +0 -0
- /package/{types → ui/types}/ScrollerLabels.d.ts +0 -0
- /package/{types → ui/types}/ScrollerLabels.js +0 -0
- /package/{types → ui/types}/ScrollerLabels.js.map +0 -0
- /package/{types → ui/types}/Theme.d.ts +0 -0
- /package/{types → ui/types}/Theme.js +0 -0
- /package/{types → ui/types}/Theme.js.map +0 -0
- /package/{types → ui/types}/index.d.ts +0 -0
- /package/{types → ui/types}/index.js +0 -0
- /package/{types → ui/types}/index.js.map +0 -0
|
@@ -1,42 +1,30 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useState as
|
|
1
|
+
import * as Bt from "react";
|
|
2
|
+
import { useState as Re, useEffect as H, useLayoutEffect as Vi, useRef as Y, forwardRef as Fi, useCallback as Gt, useMemo as Se, useContext as Ci } from "react";
|
|
3
3
|
import { unstable_batchedUpdates as Ei } from "react-dom";
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
skipAnimation: () => ii,
|
|
13
|
-
to: () => ti,
|
|
14
|
-
willAdvance: () => ht
|
|
15
|
-
});
|
|
16
|
-
var at = we(), g = (e) => be(e, at), ot = we();
|
|
17
|
-
g.write = (e) => be(e, ot);
|
|
18
|
-
var Ee = we();
|
|
19
|
-
g.onStart = (e) => be(e, Ee);
|
|
20
|
-
var ut = we();
|
|
21
|
-
g.onFrame = (e) => be(e, ut);
|
|
22
|
-
var ct = we();
|
|
23
|
-
g.onFinish = (e) => be(e, ct);
|
|
4
|
+
var nt = _e(), y = (e) => ye(e, nt), rt = _e();
|
|
5
|
+
y.write = (e) => ye(e, rt);
|
|
6
|
+
var Fe = _e();
|
|
7
|
+
y.onStart = (e) => ye(e, Fe);
|
|
8
|
+
var st = _e();
|
|
9
|
+
y.onFrame = (e) => ye(e, st);
|
|
10
|
+
var at = _e();
|
|
11
|
+
y.onFinish = (e) => ye(e, at);
|
|
24
12
|
var K = [];
|
|
25
|
-
|
|
26
|
-
const i =
|
|
13
|
+
y.setTimeout = (e, t) => {
|
|
14
|
+
const i = y.now() + t, n = () => {
|
|
27
15
|
const s = K.findIndex((a) => a.cancel == n);
|
|
28
16
|
~s && K.splice(s, 1), M -= ~s ? 1 : 0;
|
|
29
17
|
}, r = { time: i, handler: e, cancel: n };
|
|
30
|
-
return K.splice(
|
|
18
|
+
return K.splice(Yt(i), 0, r), M += 1, Ht(), r;
|
|
31
19
|
};
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
var Yt = (e) => ~(~K.findIndex((t) => t.time > e) || ~K.length);
|
|
21
|
+
y.cancel = (e) => {
|
|
22
|
+
Fe.delete(e), st.delete(e), at.delete(e), nt.delete(e), rt.delete(e);
|
|
35
23
|
};
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
y.sync = (e) => {
|
|
25
|
+
Ye = !0, y.batchedUpdates(e), Ye = !1;
|
|
38
26
|
};
|
|
39
|
-
|
|
27
|
+
y.throttle = (e) => {
|
|
40
28
|
let t;
|
|
41
29
|
function i() {
|
|
42
30
|
try {
|
|
@@ -46,51 +34,51 @@ g.throttle = (e) => {
|
|
|
46
34
|
}
|
|
47
35
|
}
|
|
48
36
|
function n(...r) {
|
|
49
|
-
t = r,
|
|
37
|
+
t = r, y.onStart(i);
|
|
50
38
|
}
|
|
51
39
|
return n.handler = e, n.cancel = () => {
|
|
52
|
-
|
|
40
|
+
Fe.delete(i), t = null;
|
|
53
41
|
}, n;
|
|
54
42
|
};
|
|
55
|
-
var
|
|
43
|
+
var ot = typeof window < "u" ? window.requestAnimationFrame : (
|
|
56
44
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
57
|
-
() => {
|
|
58
|
-
}
|
|
45
|
+
(() => {
|
|
46
|
+
})
|
|
59
47
|
);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
y.use = (e) => ot = e;
|
|
49
|
+
y.now = typeof performance < "u" ? () => performance.now() : Date.now;
|
|
50
|
+
y.batchedUpdates = (e) => e();
|
|
51
|
+
y.catch = console.error;
|
|
52
|
+
y.frameLoop = "always";
|
|
53
|
+
y.advance = () => {
|
|
54
|
+
y.frameLoop !== "demand" ? console.warn(
|
|
67
55
|
"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
|
|
68
|
-
) :
|
|
56
|
+
) : Xt();
|
|
69
57
|
};
|
|
70
|
-
var Q = -1, M = 0,
|
|
71
|
-
function
|
|
72
|
-
|
|
58
|
+
var Q = -1, M = 0, Ye = !1;
|
|
59
|
+
function ye(e, t) {
|
|
60
|
+
Ye ? (t.delete(e), e(0)) : (t.add(e), Ht());
|
|
73
61
|
}
|
|
74
|
-
function
|
|
75
|
-
Q < 0 && (Q = 0,
|
|
62
|
+
function Ht() {
|
|
63
|
+
Q < 0 && (Q = 0, y.frameLoop !== "demand" && ot(Wt));
|
|
76
64
|
}
|
|
77
|
-
function
|
|
65
|
+
function Oi() {
|
|
78
66
|
Q = -1;
|
|
79
67
|
}
|
|
80
|
-
function
|
|
81
|
-
~Q && (
|
|
68
|
+
function Wt() {
|
|
69
|
+
~Q && (ot(Wt), y.batchedUpdates(Xt));
|
|
82
70
|
}
|
|
83
|
-
function
|
|
71
|
+
function Xt() {
|
|
84
72
|
const e = Q;
|
|
85
|
-
Q =
|
|
86
|
-
const t =
|
|
87
|
-
if (t && (
|
|
88
|
-
|
|
73
|
+
Q = y.now();
|
|
74
|
+
const t = Yt(Q);
|
|
75
|
+
if (t && (Zt(K.splice(0, t), (i) => i.handler()), M -= t), !M) {
|
|
76
|
+
Oi();
|
|
89
77
|
return;
|
|
90
78
|
}
|
|
91
|
-
|
|
79
|
+
Fe.flush(), nt.flush(e ? Math.min(64, Q - e) : 16.667), st.flush(), rt.flush(), at.flush();
|
|
92
80
|
}
|
|
93
|
-
function
|
|
81
|
+
function _e() {
|
|
94
82
|
let e = /* @__PURE__ */ new Set(), t = e;
|
|
95
83
|
return {
|
|
96
84
|
add(i) {
|
|
@@ -100,22 +88,34 @@ function we() {
|
|
|
100
88
|
return M -= t == e && e.has(i) ? 1 : 0, e.delete(i);
|
|
101
89
|
},
|
|
102
90
|
flush(i) {
|
|
103
|
-
t.size && (e = /* @__PURE__ */ new Set(), M -= t.size,
|
|
91
|
+
t.size && (e = /* @__PURE__ */ new Set(), M -= t.size, Zt(t, (n) => n(i) && e.add(n)), M += e.size, t = e);
|
|
104
92
|
}
|
|
105
93
|
};
|
|
106
94
|
}
|
|
107
|
-
function
|
|
95
|
+
function Zt(e, t) {
|
|
108
96
|
e.forEach((i) => {
|
|
109
97
|
try {
|
|
110
98
|
t(i);
|
|
111
99
|
} catch (n) {
|
|
112
|
-
|
|
100
|
+
y.catch(n);
|
|
113
101
|
}
|
|
114
102
|
});
|
|
115
103
|
}
|
|
116
|
-
|
|
104
|
+
var Ui = Object.defineProperty, qi = (e, t) => {
|
|
105
|
+
for (var i in t)
|
|
106
|
+
Ui(e, i, { get: t[i], enumerable: !0 });
|
|
107
|
+
}, O = {};
|
|
108
|
+
qi(O, {
|
|
109
|
+
assign: () => ji,
|
|
110
|
+
colors: () => L,
|
|
111
|
+
createStringInterpolator: () => lt,
|
|
112
|
+
skipAnimation: () => Jt,
|
|
113
|
+
to: () => Kt,
|
|
114
|
+
willAdvance: () => ct
|
|
115
|
+
});
|
|
116
|
+
function He() {
|
|
117
117
|
}
|
|
118
|
-
var
|
|
118
|
+
var $i = (e, t, i) => Object.defineProperty(e, t, { value: i, writable: !0, configurable: !0 }), o = {
|
|
119
119
|
arr: Array.isArray,
|
|
120
120
|
obj: (e) => !!e && e.constructor.name === "Object",
|
|
121
121
|
fun: (e) => typeof e == "function",
|
|
@@ -125,17 +125,15 @@ var ji = (e, t, i) => Object.defineProperty(e, t, { value: i, writable: !0, conf
|
|
|
125
125
|
};
|
|
126
126
|
function z(e, t) {
|
|
127
127
|
if (o.arr(e)) {
|
|
128
|
-
if (!o.arr(t) || e.length !== t.length)
|
|
129
|
-
return !1;
|
|
128
|
+
if (!o.arr(t) || e.length !== t.length) return !1;
|
|
130
129
|
for (let i = 0; i < e.length; i++)
|
|
131
|
-
if (e[i] !== t[i])
|
|
132
|
-
return !1;
|
|
130
|
+
if (e[i] !== t[i]) return !1;
|
|
133
131
|
return !0;
|
|
134
132
|
}
|
|
135
133
|
return e === t;
|
|
136
134
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
135
|
+
var S = (e, t) => e.forEach(t);
|
|
136
|
+
function $(e, t, i) {
|
|
139
137
|
if (o.arr(e)) {
|
|
140
138
|
for (let n = 0; n < e.length; n++)
|
|
141
139
|
t.call(i, e[n], `${n}`);
|
|
@@ -148,28 +146,28 @@ var I = (e) => o.und(e) ? [] : o.arr(e) ? e : [e];
|
|
|
148
146
|
function ae(e, t) {
|
|
149
147
|
if (e.size) {
|
|
150
148
|
const i = Array.from(e);
|
|
151
|
-
e.clear(),
|
|
149
|
+
e.clear(), S(i, t);
|
|
152
150
|
}
|
|
153
151
|
}
|
|
154
|
-
var se = (e, ...t) => ae(e, (i) => i(...t)),
|
|
155
|
-
e.to && (
|
|
156
|
-
}, oe = /* @__PURE__ */ new Set(), V = [],
|
|
152
|
+
var se = (e, ...t) => ae(e, (i) => i(...t)), ut = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), lt, Kt, L = null, Jt = !1, ct = He, ji = (e) => {
|
|
153
|
+
e.to && (Kt = e.to), e.now && (y.now = e.now), e.colors !== void 0 && (L = e.colors), e.skipAnimation != null && (Jt = e.skipAnimation), e.createStringInterpolator && (lt = e.createStringInterpolator), e.requestAnimationFrame && y.use(e.requestAnimationFrame), e.batchedUpdates && (y.batchedUpdates = e.batchedUpdates), e.willAdvance && (ct = e.willAdvance), e.frameLoop && (y.frameLoop = e.frameLoop);
|
|
154
|
+
}, oe = /* @__PURE__ */ new Set(), V = [], De = [], ke = 0, Ce = {
|
|
157
155
|
get idle() {
|
|
158
156
|
return !oe.size && !V.length;
|
|
159
157
|
},
|
|
160
158
|
/** Advance the given animation on every frame until idle. */
|
|
161
159
|
start(e) {
|
|
162
|
-
|
|
160
|
+
ke > e.priority ? (oe.add(e), y.onStart(zi)) : (ei(e), y(We));
|
|
163
161
|
},
|
|
164
162
|
/** Advance all animations by the given time. */
|
|
165
|
-
advance:
|
|
163
|
+
advance: We,
|
|
166
164
|
/** Call this when an animation's priority changes. */
|
|
167
165
|
sort(e) {
|
|
168
|
-
if (
|
|
169
|
-
|
|
166
|
+
if (ke)
|
|
167
|
+
y.onFrame(() => Ce.sort(e));
|
|
170
168
|
else {
|
|
171
169
|
const t = V.indexOf(e);
|
|
172
|
-
~t && (V.splice(t, 1),
|
|
170
|
+
~t && (V.splice(t, 1), ti(e));
|
|
173
171
|
}
|
|
174
172
|
},
|
|
175
173
|
/**
|
|
@@ -182,31 +180,31 @@ var se = (e, ...t) => ae(e, (i) => i(...t)), dt = () => typeof window > "u" || !
|
|
|
182
180
|
}
|
|
183
181
|
};
|
|
184
182
|
function zi() {
|
|
185
|
-
oe.forEach(
|
|
183
|
+
oe.forEach(ei), oe.clear(), y(We);
|
|
186
184
|
}
|
|
187
|
-
function
|
|
188
|
-
V.includes(e) ||
|
|
185
|
+
function ei(e) {
|
|
186
|
+
V.includes(e) || ti(e);
|
|
189
187
|
}
|
|
190
|
-
function
|
|
188
|
+
function ti(e) {
|
|
191
189
|
V.splice(
|
|
192
|
-
|
|
190
|
+
Ni(V, (t) => t.priority > e.priority),
|
|
193
191
|
0,
|
|
194
192
|
e
|
|
195
193
|
);
|
|
196
194
|
}
|
|
197
|
-
function
|
|
198
|
-
const t =
|
|
195
|
+
function We(e) {
|
|
196
|
+
const t = De;
|
|
199
197
|
for (let i = 0; i < V.length; i++) {
|
|
200
198
|
const n = V[i];
|
|
201
|
-
|
|
199
|
+
ke = n.priority, n.idle || (ct(n), n.advance(e), n.idle || t.push(n));
|
|
202
200
|
}
|
|
203
|
-
return
|
|
201
|
+
return ke = 0, De = V, De.length = 0, V = t, V.length > 0;
|
|
204
202
|
}
|
|
205
|
-
function
|
|
203
|
+
function Ni(e, t) {
|
|
206
204
|
const i = e.findIndex(t);
|
|
207
205
|
return i < 0 ? e.length : i;
|
|
208
206
|
}
|
|
209
|
-
var
|
|
207
|
+
var Di = {
|
|
210
208
|
transparent: 0,
|
|
211
209
|
aliceblue: 4042850303,
|
|
212
210
|
antiquewhite: 4209760255,
|
|
@@ -357,12 +355,12 @@ var Ni = {
|
|
|
357
355
|
whitesmoke: 4126537215,
|
|
358
356
|
yellow: 4294902015,
|
|
359
357
|
yellowgreen: 2597139199
|
|
360
|
-
}, E = "[-+]?\\d*\\.?\\d+",
|
|
361
|
-
function
|
|
358
|
+
}, E = "[-+]?\\d*\\.?\\d+", Ie = E + "%";
|
|
359
|
+
function Ee(...e) {
|
|
362
360
|
return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
363
361
|
}
|
|
364
|
-
var Qi = new RegExp("rgb" +
|
|
365
|
-
"hsla" +
|
|
362
|
+
var Qi = new RegExp("rgb" + Ee(E, E, E)), Mi = new RegExp("rgba" + Ee(E, E, E, E)), Li = new RegExp("hsl" + Ee(E, Ie, Ie)), Bi = new RegExp(
|
|
363
|
+
"hsla" + Ee(E, Ie, Ie, E)
|
|
366
364
|
), Gi = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Yi = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Hi = /^#([0-9a-fA-F]{6})$/, Wi = /^#([0-9a-fA-F]{8})$/;
|
|
367
365
|
function Xi(e) {
|
|
368
366
|
let t;
|
|
@@ -373,7 +371,7 @@ function Xi(e) {
|
|
|
373
371
|
0 : (t = Mi.exec(e)) ? (Z(t[1]) << 24 | // r
|
|
374
372
|
Z(t[2]) << 16 | // g
|
|
375
373
|
Z(t[3]) << 8 | // b
|
|
376
|
-
|
|
374
|
+
Rt(t[4])) >>> // a
|
|
377
375
|
0 : (t = Gi.exec(e)) ? parseInt(
|
|
378
376
|
t[1] + t[1] + // r
|
|
379
377
|
t[2] + t[2] + // g
|
|
@@ -388,94 +386,91 @@ function Xi(e) {
|
|
|
388
386
|
t[4] + t[4],
|
|
389
387
|
// a
|
|
390
388
|
16
|
|
391
|
-
) >>> 0 : (t = Li.exec(e)) ? (
|
|
392
|
-
|
|
389
|
+
) >>> 0 : (t = Li.exec(e)) ? (Pt(
|
|
390
|
+
xt(t[1]),
|
|
393
391
|
// h
|
|
394
|
-
|
|
392
|
+
Ae(t[2]),
|
|
395
393
|
// s
|
|
396
|
-
|
|
394
|
+
Ae(t[3])
|
|
397
395
|
// l
|
|
398
396
|
) | 255) >>> // a
|
|
399
|
-
0 : (t = Bi.exec(e)) ? (
|
|
400
|
-
|
|
397
|
+
0 : (t = Bi.exec(e)) ? (Pt(
|
|
398
|
+
xt(t[1]),
|
|
401
399
|
// h
|
|
402
|
-
|
|
400
|
+
Ae(t[2]),
|
|
403
401
|
// s
|
|
404
|
-
|
|
402
|
+
Ae(t[3])
|
|
405
403
|
// l
|
|
406
|
-
) |
|
|
404
|
+
) | Rt(t[4])) >>> // a
|
|
407
405
|
0 : null;
|
|
408
406
|
}
|
|
409
|
-
function
|
|
407
|
+
function Qe(e, t, i) {
|
|
410
408
|
return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? e + (t - e) * 6 * i : i < 1 / 2 ? t : i < 2 / 3 ? e + (t - e) * (2 / 3 - i) * 6 : e;
|
|
411
409
|
}
|
|
412
|
-
function
|
|
413
|
-
const n = i < 0.5 ? i * (1 + t) : i + t - i * t, r = 2 * i - n, s =
|
|
410
|
+
function Pt(e, t, i) {
|
|
411
|
+
const n = i < 0.5 ? i * (1 + t) : i + t - i * t, r = 2 * i - n, s = Qe(r, n, e + 1 / 3), a = Qe(r, n, e), u = Qe(r, n, e - 1 / 3);
|
|
414
412
|
return Math.round(s * 255) << 24 | Math.round(a * 255) << 16 | Math.round(u * 255) << 8;
|
|
415
413
|
}
|
|
416
414
|
function Z(e) {
|
|
417
415
|
const t = parseInt(e, 10);
|
|
418
416
|
return t < 0 ? 0 : t > 255 ? 255 : t;
|
|
419
417
|
}
|
|
420
|
-
function
|
|
418
|
+
function xt(e) {
|
|
421
419
|
return (parseFloat(e) % 360 + 360) % 360 / 360;
|
|
422
420
|
}
|
|
423
|
-
function
|
|
421
|
+
function Rt(e) {
|
|
424
422
|
const t = parseFloat(e);
|
|
425
423
|
return t < 0 ? 0 : t > 1 ? 255 : Math.round(t * 255);
|
|
426
424
|
}
|
|
427
|
-
function
|
|
425
|
+
function Ae(e) {
|
|
428
426
|
const t = parseFloat(e);
|
|
429
427
|
return t < 0 ? 0 : t > 100 ? 1 : t / 100;
|
|
430
428
|
}
|
|
431
|
-
function
|
|
429
|
+
function kt(e) {
|
|
432
430
|
let t = Xi(e);
|
|
433
|
-
if (t === null)
|
|
434
|
-
return e;
|
|
431
|
+
if (t === null) return e;
|
|
435
432
|
t = t || 0;
|
|
436
433
|
const i = (t & 4278190080) >>> 24, n = (t & 16711680) >>> 16, r = (t & 65280) >>> 8, s = (t & 255) / 255;
|
|
437
434
|
return `rgba(${i}, ${n}, ${r}, ${s})`;
|
|
438
435
|
}
|
|
439
|
-
var
|
|
436
|
+
var ce = (e, t, i) => {
|
|
440
437
|
if (o.fun(e))
|
|
441
438
|
return e;
|
|
442
439
|
if (o.arr(e))
|
|
443
|
-
return
|
|
440
|
+
return ce({
|
|
444
441
|
range: e,
|
|
445
442
|
output: t,
|
|
446
443
|
extrapolate: i
|
|
447
444
|
});
|
|
448
445
|
if (o.str(e.output[0]))
|
|
449
|
-
return
|
|
450
|
-
const n = e, r = n.output, s = n.range || [0, 1], a = n.extrapolateLeft || n.extrapolate || "extend", u = n.extrapolateRight || n.extrapolate || "extend",
|
|
451
|
-
return (
|
|
452
|
-
const
|
|
446
|
+
return lt(e);
|
|
447
|
+
const n = e, r = n.output, s = n.range || [0, 1], a = n.extrapolateLeft || n.extrapolate || "extend", u = n.extrapolateRight || n.extrapolate || "extend", c = n.easing || ((l) => l);
|
|
448
|
+
return (l) => {
|
|
449
|
+
const m = Ki(l, s);
|
|
453
450
|
return Zi(
|
|
451
|
+
l,
|
|
452
|
+
s[m],
|
|
453
|
+
s[m + 1],
|
|
454
|
+
r[m],
|
|
455
|
+
r[m + 1],
|
|
454
456
|
c,
|
|
455
|
-
s[h],
|
|
456
|
-
s[h + 1],
|
|
457
|
-
r[h],
|
|
458
|
-
r[h + 1],
|
|
459
|
-
d,
|
|
460
457
|
a,
|
|
461
458
|
u,
|
|
462
459
|
n.map
|
|
463
460
|
);
|
|
464
461
|
};
|
|
465
462
|
};
|
|
466
|
-
function Zi(e, t, i, n, r, s, a, u,
|
|
467
|
-
let
|
|
468
|
-
if (
|
|
469
|
-
if (a === "identity")
|
|
470
|
-
|
|
471
|
-
a === "clamp" && (c = t);
|
|
463
|
+
function Zi(e, t, i, n, r, s, a, u, c) {
|
|
464
|
+
let l = c ? c(e) : e;
|
|
465
|
+
if (l < t) {
|
|
466
|
+
if (a === "identity") return l;
|
|
467
|
+
a === "clamp" && (l = t);
|
|
472
468
|
}
|
|
473
|
-
if (
|
|
474
|
-
if (u === "identity")
|
|
475
|
-
|
|
476
|
-
u === "clamp" && (c = i);
|
|
469
|
+
if (l > i) {
|
|
470
|
+
if (u === "identity") return l;
|
|
471
|
+
u === "clamp" && (l = i);
|
|
477
472
|
}
|
|
478
|
-
return n === r ? n : t === i ? e <= t ? n : r : (t === -1 / 0 ?
|
|
473
|
+
return n === r ? n : t === i ? e <= t ? n : r : (t === -1 / 0 ? l = -l : i === 1 / 0 ? l = l - t : l = (l - t) / (i - t), l = s(l), n === -1 / 0 ? l = -l : r === 1 / 0 ? l = l + n : l = l * (r - n) + n, l);
|
|
479
474
|
}
|
|
480
475
|
function Ki(e, t) {
|
|
481
476
|
for (var i = 1; i < t.length - 1 && !(t[i] >= e); ++i)
|
|
@@ -484,44 +479,44 @@ function Ki(e, t) {
|
|
|
484
479
|
}
|
|
485
480
|
var Ji = {
|
|
486
481
|
linear: (e) => e
|
|
487
|
-
},
|
|
482
|
+
}, de = Symbol.for("FluidValue.get"), ee = Symbol.for("FluidValue.observers"), T = (e) => !!(e && e[de]), k = (e) => e && e[de] ? e[de]() : e, It = (e) => e[ee] || null;
|
|
488
483
|
function en(e, t) {
|
|
489
484
|
e.eventObserved ? e.eventObserved(t) : e(t);
|
|
490
485
|
}
|
|
491
|
-
function
|
|
486
|
+
function fe(e, t) {
|
|
492
487
|
const i = e[ee];
|
|
493
488
|
i && i.forEach((n) => {
|
|
494
489
|
en(n, t);
|
|
495
490
|
});
|
|
496
491
|
}
|
|
497
|
-
var
|
|
492
|
+
var ii = class {
|
|
498
493
|
constructor(e) {
|
|
499
494
|
if (!e && !(e = this.get))
|
|
500
495
|
throw Error("Unknown getter");
|
|
501
496
|
tn(this, e);
|
|
502
497
|
}
|
|
503
|
-
}, tn = (e, t) =>
|
|
498
|
+
}, tn = (e, t) => ni(e, de, t);
|
|
504
499
|
function te(e, t) {
|
|
505
|
-
if (e[
|
|
500
|
+
if (e[de]) {
|
|
506
501
|
let i = e[ee];
|
|
507
|
-
i ||
|
|
502
|
+
i || ni(e, ee, i = /* @__PURE__ */ new Set()), i.has(t) || (i.add(t), e.observerAdded && e.observerAdded(i.size, t));
|
|
508
503
|
}
|
|
509
504
|
return t;
|
|
510
505
|
}
|
|
511
|
-
function
|
|
506
|
+
function he(e, t) {
|
|
512
507
|
const i = e[ee];
|
|
513
508
|
if (i && i.has(t)) {
|
|
514
509
|
const n = i.size - 1;
|
|
515
510
|
n ? i.delete(t) : e[ee] = null, e.observerRemoved && e.observerRemoved(n, t);
|
|
516
511
|
}
|
|
517
512
|
}
|
|
518
|
-
var
|
|
513
|
+
var ni = (e, t, i) => Object.defineProperty(e, t, {
|
|
519
514
|
value: i,
|
|
520
515
|
writable: !0,
|
|
521
516
|
configurable: !0
|
|
522
|
-
}),
|
|
517
|
+
}), Pe = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, nn = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, Tt = new RegExp(`(${Pe.source})(%|[a-z]+)`, "i"), rn = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, Oe = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, ri = (e) => {
|
|
523
518
|
const [t, i] = sn(e);
|
|
524
|
-
if (!t ||
|
|
519
|
+
if (!t || ut())
|
|
525
520
|
return e;
|
|
526
521
|
const n = window.getComputedStyle(document.documentElement).getPropertyValue(t);
|
|
527
522
|
if (n)
|
|
@@ -530,124 +525,100 @@ var ai = (e, t, i) => Object.defineProperty(e, t, {
|
|
|
530
525
|
const r = window.getComputedStyle(document.documentElement).getPropertyValue(i);
|
|
531
526
|
return r || e;
|
|
532
527
|
} else {
|
|
533
|
-
if (i &&
|
|
534
|
-
return
|
|
528
|
+
if (i && Oe.test(i))
|
|
529
|
+
return ri(i);
|
|
535
530
|
if (i)
|
|
536
531
|
return i;
|
|
537
532
|
}
|
|
538
533
|
return e;
|
|
539
534
|
}, sn = (e) => {
|
|
540
|
-
const t =
|
|
541
|
-
if (!t)
|
|
542
|
-
return [,];
|
|
535
|
+
const t = Oe.exec(e);
|
|
536
|
+
if (!t) return [,];
|
|
543
537
|
const [, i, n] = t;
|
|
544
538
|
return [i, n];
|
|
545
|
-
},
|
|
546
|
-
|
|
539
|
+
}, Me, an = (e, t, i, n, r) => `rgba(${Math.round(t)}, ${Math.round(i)}, ${Math.round(n)}, ${r})`, si = (e) => {
|
|
540
|
+
Me || (Me = L ? (
|
|
547
541
|
// match color names, ignore partial matches
|
|
548
542
|
new RegExp(`(${Object.keys(L).join("|")})(?!\\w)`, "g")
|
|
549
543
|
) : (
|
|
550
544
|
// never match
|
|
551
545
|
/^\b$/
|
|
552
546
|
));
|
|
553
|
-
const t = e.output.map((s) => k(s).replace(
|
|
547
|
+
const t = e.output.map((s) => k(s).replace(Oe, ri).replace(nn, kt).replace(Me, kt)), i = t.map((s) => s.match(Pe).map(Number)), r = i[0].map(
|
|
554
548
|
(s, a) => i.map((u) => {
|
|
555
549
|
if (!(a in u))
|
|
556
550
|
throw Error('The arity of each "output" value must be equal');
|
|
557
551
|
return u[a];
|
|
558
552
|
})
|
|
559
553
|
).map(
|
|
560
|
-
(s) =>
|
|
554
|
+
(s) => ce({ ...e, output: s })
|
|
561
555
|
);
|
|
562
556
|
return (s) => {
|
|
563
|
-
const a = !
|
|
557
|
+
const a = !Tt.test(t[0]) && t.find((c) => Tt.test(c))?.replace(Pe, "");
|
|
564
558
|
let u = 0;
|
|
565
559
|
return t[0].replace(
|
|
566
|
-
|
|
560
|
+
Pe,
|
|
567
561
|
() => `${r[u++](s)}${a || ""}`
|
|
568
562
|
).replace(rn, an);
|
|
569
563
|
};
|
|
570
|
-
},
|
|
564
|
+
}, dt = "react-spring: ", ai = (e) => {
|
|
571
565
|
const t = e;
|
|
572
566
|
let i = !1;
|
|
573
567
|
if (typeof t != "function")
|
|
574
|
-
throw new TypeError(`${
|
|
568
|
+
throw new TypeError(`${dt}once requires a function parameter`);
|
|
575
569
|
return (...n) => {
|
|
576
570
|
i || (t(...n), i = !0);
|
|
577
571
|
};
|
|
578
|
-
}, on =
|
|
572
|
+
}, on = ai(console.warn);
|
|
579
573
|
function un() {
|
|
580
574
|
on(
|
|
581
|
-
`${
|
|
575
|
+
`${dt}The "interpolate" function is deprecated in v9 (use "to" instead)`
|
|
582
576
|
);
|
|
583
577
|
}
|
|
584
|
-
var
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
`${
|
|
578
|
+
var ln = ai(console.warn);
|
|
579
|
+
function cn() {
|
|
580
|
+
ln(
|
|
581
|
+
`${dt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`
|
|
588
582
|
);
|
|
589
583
|
}
|
|
590
|
-
function
|
|
584
|
+
function Ue(e) {
|
|
591
585
|
return o.str(e) && (e[0] == "#" || /\d/.test(e) || // Do not identify a CSS variable as an AnimatedString if its SSR
|
|
592
|
-
!
|
|
586
|
+
!ut() && Oe.test(e) || e in (L || {}));
|
|
593
587
|
}
|
|
594
|
-
var
|
|
595
|
-
const e =
|
|
596
|
-
return
|
|
588
|
+
var ft = ut() ? H : Vi, dn = () => {
|
|
589
|
+
const e = Y(!1);
|
|
590
|
+
return ft(() => (e.current = !0, () => {
|
|
597
591
|
e.current = !1;
|
|
598
592
|
}), []), e;
|
|
599
593
|
};
|
|
600
|
-
function
|
|
601
|
-
const e =
|
|
594
|
+
function oi() {
|
|
595
|
+
const e = Re()[1], t = dn();
|
|
602
596
|
return () => {
|
|
603
597
|
t.current && e(Math.random());
|
|
604
598
|
};
|
|
605
599
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
result: e()
|
|
611
|
-
})
|
|
612
|
-
), n = H(), r = n.current;
|
|
613
|
-
let s = r;
|
|
614
|
-
return s ? t && s.inputs && hn(t, s.inputs) || (s = {
|
|
615
|
-
inputs: t,
|
|
616
|
-
result: e()
|
|
617
|
-
}) : s = i, B(() => {
|
|
618
|
-
n.current = s, r == i && (i.inputs = i.result = void 0);
|
|
619
|
-
}, [s]), s.result;
|
|
620
|
-
}
|
|
621
|
-
function hn(e, t) {
|
|
622
|
-
if (e.length !== t.length)
|
|
623
|
-
return !1;
|
|
624
|
-
for (let i = 0; i < e.length; i++)
|
|
625
|
-
if (e[i] !== t[i])
|
|
626
|
-
return !1;
|
|
627
|
-
return !0;
|
|
628
|
-
}
|
|
629
|
-
var di = (e) => B(e, mn), mn = [];
|
|
630
|
-
function Et(e) {
|
|
631
|
-
const t = H();
|
|
632
|
-
return B(() => {
|
|
600
|
+
var ui = (e) => H(e, fn), fn = [];
|
|
601
|
+
function Vt(e) {
|
|
602
|
+
const t = Y(void 0);
|
|
603
|
+
return H(() => {
|
|
633
604
|
t.current = e;
|
|
634
605
|
}), t.current;
|
|
635
606
|
}
|
|
636
|
-
var
|
|
607
|
+
var me = Symbol.for("Animated:node"), hn = (e) => !!e && e[me] === e, q = (e) => e && e[me], ht = (e, t) => $i(e, me, t), qe = (e) => e && e[me] && e[me].getPayload(), li = class {
|
|
637
608
|
constructor() {
|
|
638
|
-
|
|
609
|
+
ht(this, this);
|
|
639
610
|
}
|
|
640
611
|
/** Get every `AnimatedValue` used by this node. */
|
|
641
612
|
getPayload() {
|
|
642
613
|
return this.payload || [];
|
|
643
614
|
}
|
|
644
|
-
},
|
|
645
|
-
constructor(
|
|
646
|
-
super(), this._value =
|
|
615
|
+
}, $e = class ci extends li {
|
|
616
|
+
constructor(t) {
|
|
617
|
+
super(), this._value = t, this.done = !0, this.durationProgress = 0, o.num(this._value) && (this.lastPosition = this._value);
|
|
647
618
|
}
|
|
648
619
|
/** @internal */
|
|
649
|
-
static create(
|
|
650
|
-
return new
|
|
620
|
+
static create(t) {
|
|
621
|
+
return new ci(t);
|
|
651
622
|
}
|
|
652
623
|
getPayload() {
|
|
653
624
|
return [this];
|
|
@@ -655,51 +626,51 @@ var pe = Symbol.for("Animated:node"), pn = (e) => !!e && e[pe] === e, U = (e) =>
|
|
|
655
626
|
getValue() {
|
|
656
627
|
return this._value;
|
|
657
628
|
}
|
|
658
|
-
setValue(
|
|
659
|
-
return o.num(
|
|
629
|
+
setValue(t, i) {
|
|
630
|
+
return o.num(t) && (this.lastPosition = t, i && (t = Math.round(t / i) * i, this.done && (this.lastPosition = t))), this._value === t ? !1 : (this._value = t, !0);
|
|
660
631
|
}
|
|
661
632
|
reset() {
|
|
662
|
-
const { done:
|
|
663
|
-
this.done = !1, o.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value,
|
|
633
|
+
const { done: t } = this;
|
|
634
|
+
this.done = !1, o.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, t && (this.lastVelocity = null), this.v0 = null);
|
|
664
635
|
}
|
|
665
|
-
},
|
|
666
|
-
constructor(
|
|
667
|
-
super(0), this._string = null, this._toString =
|
|
668
|
-
output: [
|
|
636
|
+
}, Te = class di extends $e {
|
|
637
|
+
constructor(t) {
|
|
638
|
+
super(0), this._string = null, this._toString = ce({
|
|
639
|
+
output: [t, t]
|
|
669
640
|
});
|
|
670
641
|
}
|
|
671
642
|
/** @internal */
|
|
672
|
-
static create(
|
|
673
|
-
return new
|
|
643
|
+
static create(t) {
|
|
644
|
+
return new di(t);
|
|
674
645
|
}
|
|
675
646
|
getValue() {
|
|
676
|
-
const
|
|
677
|
-
return
|
|
647
|
+
const t = this._string;
|
|
648
|
+
return t ?? (this._string = this._toString(this._value));
|
|
678
649
|
}
|
|
679
|
-
setValue(
|
|
680
|
-
if (o.str(
|
|
681
|
-
if (
|
|
650
|
+
setValue(t) {
|
|
651
|
+
if (o.str(t)) {
|
|
652
|
+
if (t == this._string)
|
|
682
653
|
return !1;
|
|
683
|
-
this._string =
|
|
684
|
-
} else if (super.setValue(
|
|
654
|
+
this._string = t, this._value = 1;
|
|
655
|
+
} else if (super.setValue(t))
|
|
685
656
|
this._string = null;
|
|
686
657
|
else
|
|
687
658
|
return !1;
|
|
688
659
|
return !0;
|
|
689
660
|
}
|
|
690
|
-
reset(
|
|
691
|
-
|
|
692
|
-
output: [this.getValue(),
|
|
661
|
+
reset(t) {
|
|
662
|
+
t && (this._toString = ce({
|
|
663
|
+
output: [this.getValue(), t]
|
|
693
664
|
})), this._value = 0, super.reset();
|
|
694
665
|
}
|
|
695
|
-
},
|
|
666
|
+
}, Ve = { dependencies: null }, je = class extends li {
|
|
696
667
|
constructor(e) {
|
|
697
668
|
super(), this.source = e, this.setValue(e);
|
|
698
669
|
}
|
|
699
670
|
getValue(e) {
|
|
700
671
|
const t = {};
|
|
701
|
-
return
|
|
702
|
-
|
|
672
|
+
return $(this.source, (i, n) => {
|
|
673
|
+
hn(i) ? t[n] = i.getValue(e) : T(i) ? t[n] = k(i) : e || (t[n] = i);
|
|
703
674
|
}), t;
|
|
704
675
|
}
|
|
705
676
|
/** Replace the raw object data */
|
|
@@ -707,96 +678,96 @@ var pe = Symbol.for("Animated:node"), pn = (e) => !!e && e[pe] === e, U = (e) =>
|
|
|
707
678
|
this.source = e, this.payload = this._makePayload(e);
|
|
708
679
|
}
|
|
709
680
|
reset() {
|
|
710
|
-
this.payload &&
|
|
681
|
+
this.payload && S(this.payload, (e) => e.reset());
|
|
711
682
|
}
|
|
712
683
|
/** Create a payload set. */
|
|
713
684
|
_makePayload(e) {
|
|
714
685
|
if (e) {
|
|
715
686
|
const t = /* @__PURE__ */ new Set();
|
|
716
|
-
return
|
|
687
|
+
return $(e, this._addToPayload, t), Array.from(t);
|
|
717
688
|
}
|
|
718
689
|
}
|
|
719
690
|
/** Add to a payload set. */
|
|
720
691
|
_addToPayload(e) {
|
|
721
|
-
|
|
722
|
-
const t =
|
|
723
|
-
t &&
|
|
692
|
+
Ve.dependencies && T(e) && Ve.dependencies.add(e);
|
|
693
|
+
const t = qe(e);
|
|
694
|
+
t && S(t, (i) => this.add(i));
|
|
724
695
|
}
|
|
725
|
-
},
|
|
726
|
-
constructor(
|
|
727
|
-
super(
|
|
696
|
+
}, mn = class fi extends je {
|
|
697
|
+
constructor(t) {
|
|
698
|
+
super(t);
|
|
728
699
|
}
|
|
729
700
|
/** @internal */
|
|
730
|
-
static create(
|
|
731
|
-
return new
|
|
701
|
+
static create(t) {
|
|
702
|
+
return new fi(t);
|
|
732
703
|
}
|
|
733
704
|
getValue() {
|
|
734
|
-
return this.source.map((
|
|
705
|
+
return this.source.map((t) => t.getValue());
|
|
735
706
|
}
|
|
736
|
-
setValue(
|
|
737
|
-
const
|
|
738
|
-
return
|
|
707
|
+
setValue(t) {
|
|
708
|
+
const i = this.getPayload();
|
|
709
|
+
return t.length == i.length ? i.map((n, r) => n.setValue(t[r])).some(Boolean) : (super.setValue(t.map(pn)), !0);
|
|
739
710
|
}
|
|
740
711
|
};
|
|
741
|
-
function
|
|
742
|
-
return (
|
|
712
|
+
function pn(e) {
|
|
713
|
+
return (Ue(e) ? Te : $e).create(e);
|
|
743
714
|
}
|
|
744
|
-
function
|
|
745
|
-
const t =
|
|
746
|
-
return t ? t.constructor : o.arr(e) ?
|
|
715
|
+
function Xe(e) {
|
|
716
|
+
const t = q(e);
|
|
717
|
+
return t ? t.constructor : o.arr(e) ? mn : Ue(e) ? Te : $e;
|
|
747
718
|
}
|
|
748
|
-
var
|
|
719
|
+
var Ft = (e, t) => {
|
|
749
720
|
const i = (
|
|
750
721
|
// Function components must use "forwardRef" to avoid being
|
|
751
722
|
// re-rendered on every animation frame.
|
|
752
723
|
!o.fun(e) || e.prototype && e.prototype.isReactComponent
|
|
753
724
|
);
|
|
754
|
-
return
|
|
755
|
-
const s =
|
|
756
|
-
|
|
757
|
-
(
|
|
758
|
-
s.current =
|
|
725
|
+
return Fi((n, r) => {
|
|
726
|
+
const s = Y(null), a = i && // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
727
|
+
Gt(
|
|
728
|
+
(_) => {
|
|
729
|
+
s.current = yn(r, _);
|
|
759
730
|
},
|
|
760
731
|
[r]
|
|
761
|
-
), [u,
|
|
762
|
-
const
|
|
763
|
-
if (i && !
|
|
732
|
+
), [u, c] = vn(n, t), l = oi(), m = () => {
|
|
733
|
+
const _ = s.current;
|
|
734
|
+
if (i && !_)
|
|
764
735
|
return;
|
|
765
|
-
(
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
(
|
|
771
|
-
),
|
|
772
|
-
})),
|
|
773
|
-
const
|
|
774
|
-
|
|
736
|
+
(_ ? t.applyAnimatedValues(_, u.getValue(!0)) : !1) === !1 && l();
|
|
737
|
+
}, d = new gn(m, c), h = Y(void 0);
|
|
738
|
+
ft(() => (h.current = d, S(c, (_) => te(_, d)), () => {
|
|
739
|
+
h.current && (S(
|
|
740
|
+
h.current.deps,
|
|
741
|
+
(_) => he(_, h.current)
|
|
742
|
+
), y.cancel(h.current.update));
|
|
743
|
+
})), H(m, []), ui(() => () => {
|
|
744
|
+
const _ = h.current;
|
|
745
|
+
S(_.deps, (g) => he(g, _));
|
|
775
746
|
});
|
|
776
|
-
const
|
|
777
|
-
return /* @__PURE__ */
|
|
747
|
+
const p = t.getComponentProps(u.getValue());
|
|
748
|
+
return /* @__PURE__ */ Bt.createElement(e, { ...p, ref: a });
|
|
778
749
|
});
|
|
779
|
-
},
|
|
750
|
+
}, gn = class {
|
|
780
751
|
constructor(e, t) {
|
|
781
752
|
this.update = e, this.deps = t;
|
|
782
753
|
}
|
|
783
754
|
eventObserved(e) {
|
|
784
|
-
e.type == "change" &&
|
|
755
|
+
e.type == "change" && y.write(this.update);
|
|
785
756
|
}
|
|
786
757
|
};
|
|
787
|
-
function
|
|
758
|
+
function vn(e, t) {
|
|
788
759
|
const i = /* @__PURE__ */ new Set();
|
|
789
|
-
return
|
|
760
|
+
return Ve.dependencies = i, e.style && (e = {
|
|
790
761
|
...e,
|
|
791
762
|
style: t.createAnimatedStyle(e.style)
|
|
792
|
-
}), e = new
|
|
763
|
+
}), e = new je(e), Ve.dependencies = null, [e, i];
|
|
793
764
|
}
|
|
794
|
-
function
|
|
765
|
+
function yn(e, t) {
|
|
795
766
|
return e && (o.fun(e) ? e(t) : e.current = t), t;
|
|
796
767
|
}
|
|
797
|
-
var
|
|
768
|
+
var Ct = Symbol.for("AnimatedComponent"), _n = (e, {
|
|
798
769
|
applyAnimatedValues: t = () => !1,
|
|
799
|
-
createAnimatedStyle: i = (r) => new
|
|
770
|
+
createAnimatedStyle: i = (r) => new je(r),
|
|
800
771
|
getComponentProps: n = (r) => r
|
|
801
772
|
} = {}) => {
|
|
802
773
|
const r = {
|
|
@@ -804,20 +775,20 @@ var qt = Symbol.for("AnimatedComponent"), bn = (e, {
|
|
|
804
775
|
createAnimatedStyle: i,
|
|
805
776
|
getComponentProps: n
|
|
806
777
|
}, s = (a) => {
|
|
807
|
-
const u =
|
|
808
|
-
return o.str(a) ? a = s[a] || (s[a] =
|
|
778
|
+
const u = Et(a) || "Anonymous";
|
|
779
|
+
return o.str(a) ? a = s[a] || (s[a] = Ft(a, r)) : a = a[Ct] || (a[Ct] = Ft(a, r)), a.displayName = `Animated(${u})`, a;
|
|
809
780
|
};
|
|
810
|
-
return
|
|
811
|
-
o.arr(e) && (u =
|
|
781
|
+
return $(e, (a, u) => {
|
|
782
|
+
o.arr(e) && (u = Et(a)), s[u] = s(a);
|
|
812
783
|
}), {
|
|
813
784
|
animated: s
|
|
814
785
|
};
|
|
815
|
-
},
|
|
816
|
-
function
|
|
786
|
+
}, Et = (e) => o.str(e) ? e : e && o.str(e.displayName) ? e.displayName : o.fun(e) && e.name || null;
|
|
787
|
+
function G(e, ...t) {
|
|
817
788
|
return o.fun(e) ? e(...t) : e;
|
|
818
789
|
}
|
|
819
|
-
var ue = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : I(e).includes(t))),
|
|
820
|
-
let i =
|
|
790
|
+
var ue = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : I(e).includes(t))), hi = (e, t) => o.obj(e) ? t && e[t] : e, mi = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, bn = (e) => e, mt = (e, t = bn) => {
|
|
791
|
+
let i = wn;
|
|
821
792
|
e.default && e.default !== !0 && (e = e.default, i = Object.keys(e));
|
|
822
793
|
const n = {};
|
|
823
794
|
for (const r of i) {
|
|
@@ -825,7 +796,7 @@ var ue = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : I(e).includes(t))
|
|
|
825
796
|
o.und(s) || (n[r] = s);
|
|
826
797
|
}
|
|
827
798
|
return n;
|
|
828
|
-
},
|
|
799
|
+
}, wn = [
|
|
829
800
|
"config",
|
|
830
801
|
"onProps",
|
|
831
802
|
"onStart",
|
|
@@ -869,64 +840,63 @@ var ue = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : I(e).includes(t))
|
|
|
869
840
|
callId: 1,
|
|
870
841
|
parentId: 1
|
|
871
842
|
};
|
|
872
|
-
function
|
|
843
|
+
function An(e) {
|
|
873
844
|
const t = {};
|
|
874
845
|
let i = 0;
|
|
875
|
-
if (
|
|
846
|
+
if ($(e, (n, r) => {
|
|
876
847
|
Sn[r] || (t[r] = n, i++);
|
|
877
848
|
}), i)
|
|
878
849
|
return t;
|
|
879
850
|
}
|
|
880
|
-
function
|
|
881
|
-
const t =
|
|
851
|
+
function pi(e) {
|
|
852
|
+
const t = An(e);
|
|
882
853
|
if (t) {
|
|
883
854
|
const i = { to: t };
|
|
884
|
-
return
|
|
855
|
+
return $(e, (n, r) => r in t || (i[r] = n)), i;
|
|
885
856
|
}
|
|
886
857
|
return { ...e };
|
|
887
858
|
}
|
|
888
|
-
function
|
|
889
|
-
return e = k(e), o.arr(e) ? e.map(
|
|
859
|
+
function pe(e) {
|
|
860
|
+
return e = k(e), o.arr(e) ? e.map(pe) : Ue(e) ? O.createStringInterpolator({
|
|
890
861
|
range: [0, 1],
|
|
891
862
|
output: [e, e]
|
|
892
863
|
})(1) : e;
|
|
893
864
|
}
|
|
894
|
-
function
|
|
895
|
-
for (const t in e)
|
|
896
|
-
return !0;
|
|
865
|
+
function Pn(e) {
|
|
866
|
+
for (const t in e) return !0;
|
|
897
867
|
return !1;
|
|
898
868
|
}
|
|
899
|
-
function
|
|
869
|
+
function Ze(e) {
|
|
900
870
|
return o.fun(e) || o.arr(e) && o.obj(e[0]);
|
|
901
871
|
}
|
|
902
|
-
function
|
|
872
|
+
function xn(e, t) {
|
|
903
873
|
e.ref?.delete(e), t?.delete(e);
|
|
904
874
|
}
|
|
905
|
-
function
|
|
875
|
+
function Rn(e, t) {
|
|
906
876
|
t && e.ref !== t && (e.ref?.delete(e), t.add(e), e.ref = t);
|
|
907
877
|
}
|
|
908
|
-
var
|
|
878
|
+
var kn = {
|
|
909
879
|
default: { tension: 170, friction: 26 }
|
|
910
|
-
},
|
|
911
|
-
...
|
|
880
|
+
}, Ke = {
|
|
881
|
+
...kn.default,
|
|
912
882
|
mass: 1,
|
|
913
883
|
damping: 1,
|
|
914
884
|
easing: Ji.linear,
|
|
915
885
|
clamp: !1
|
|
916
|
-
},
|
|
886
|
+
}, In = class {
|
|
917
887
|
constructor() {
|
|
918
|
-
this.velocity = 0, Object.assign(this,
|
|
888
|
+
this.velocity = 0, Object.assign(this, Ke);
|
|
919
889
|
}
|
|
920
890
|
};
|
|
921
|
-
function
|
|
922
|
-
i && (i = { ...i },
|
|
923
|
-
for (const a in
|
|
924
|
-
e[a] == null && (e[a] =
|
|
891
|
+
function Tn(e, t, i) {
|
|
892
|
+
i && (i = { ...i }, Ot(i, t), t = { ...i, ...t }), Ot(e, t), Object.assign(e, t);
|
|
893
|
+
for (const a in Ke)
|
|
894
|
+
e[a] == null && (e[a] = Ke[a]);
|
|
925
895
|
let { frequency: n, damping: r } = e;
|
|
926
896
|
const { mass: s } = e;
|
|
927
897
|
return o.und(n) || (n < 0.01 && (n = 0.01), r < 0 && (r = 0), e.tension = Math.pow(2 * Math.PI / n, 2) * s, e.friction = 4 * Math.PI * r * s / n), e;
|
|
928
898
|
}
|
|
929
|
-
function
|
|
899
|
+
function Ot(e, t) {
|
|
930
900
|
if (!o.und(t.decay))
|
|
931
901
|
e.duration = void 0;
|
|
932
902
|
else {
|
|
@@ -934,41 +904,41 @@ function jt(e, t) {
|
|
|
934
904
|
(i || !o.und(t.frequency) || !o.und(t.damping) || !o.und(t.mass)) && (e.duration = void 0, e.decay = void 0), i && (e.frequency = void 0);
|
|
935
905
|
}
|
|
936
906
|
}
|
|
937
|
-
var
|
|
907
|
+
var Ut = [], Vn = class {
|
|
938
908
|
constructor() {
|
|
939
|
-
this.changed = !1, this.values =
|
|
909
|
+
this.changed = !1, this.values = Ut, this.toValues = null, this.fromValues = Ut, this.config = new In(), this.immediate = !1;
|
|
940
910
|
}
|
|
941
911
|
};
|
|
942
|
-
function
|
|
912
|
+
function gi(e, { key: t, props: i, defaultProps: n, state: r, actions: s }) {
|
|
943
913
|
return new Promise((a, u) => {
|
|
944
|
-
let
|
|
945
|
-
if (
|
|
946
|
-
|
|
914
|
+
let c, l, m = ue(i.cancel ?? n?.cancel, t);
|
|
915
|
+
if (m)
|
|
916
|
+
p();
|
|
947
917
|
else {
|
|
948
918
|
o.und(i.pause) || (r.paused = ue(i.pause, t));
|
|
949
|
-
let
|
|
950
|
-
|
|
919
|
+
let _ = n?.pause;
|
|
920
|
+
_ !== !0 && (_ = r.paused || ue(_, t)), c = G(i.delay || 0, t), _ ? (r.resumeQueue.add(h), s.pause()) : (s.resume(), h());
|
|
951
921
|
}
|
|
952
|
-
function
|
|
953
|
-
r.resumeQueue.add(
|
|
922
|
+
function d() {
|
|
923
|
+
r.resumeQueue.add(h), r.timeouts.delete(l), l.cancel(), c = l.time - y.now();
|
|
954
924
|
}
|
|
955
|
-
function
|
|
956
|
-
|
|
925
|
+
function h() {
|
|
926
|
+
c > 0 && !O.skipAnimation ? (r.delayed = !0, l = y.setTimeout(p, c), r.pauseQueue.add(d), r.timeouts.add(l)) : p();
|
|
957
927
|
}
|
|
958
|
-
function
|
|
959
|
-
r.delayed && (r.delayed = !1), r.pauseQueue.delete(
|
|
928
|
+
function p() {
|
|
929
|
+
r.delayed && (r.delayed = !1), r.pauseQueue.delete(d), r.timeouts.delete(l), e <= (r.cancelId || 0) && (m = !0);
|
|
960
930
|
try {
|
|
961
|
-
s.start({ ...i, callId: e, cancel:
|
|
962
|
-
} catch (
|
|
963
|
-
u(
|
|
931
|
+
s.start({ ...i, callId: e, cancel: m }, a);
|
|
932
|
+
} catch (_) {
|
|
933
|
+
u(_);
|
|
964
934
|
}
|
|
965
935
|
}
|
|
966
936
|
});
|
|
967
937
|
}
|
|
968
|
-
var
|
|
938
|
+
var pt = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? J(e.get()) : t.every((i) => i.noop) ? vi(e.get()) : C(
|
|
969
939
|
e.get(),
|
|
970
940
|
t.every((i) => i.finished)
|
|
971
|
-
),
|
|
941
|
+
), vi = (e) => ({
|
|
972
942
|
value: e,
|
|
973
943
|
noop: !0,
|
|
974
944
|
finished: !0,
|
|
@@ -982,84 +952,84 @@ var yt = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? J(e.get()
|
|
|
982
952
|
cancelled: !0,
|
|
983
953
|
finished: !1
|
|
984
954
|
});
|
|
985
|
-
function
|
|
986
|
-
const { callId: r, parentId: s, onRest: a } = t, { asyncTo: u, promise:
|
|
987
|
-
return !s && e === u && !t.reset ?
|
|
955
|
+
function yi(e, t, i, n) {
|
|
956
|
+
const { callId: r, parentId: s, onRest: a } = t, { asyncTo: u, promise: c } = i;
|
|
957
|
+
return !s && e === u && !t.reset ? c : i.promise = (async () => {
|
|
988
958
|
i.asyncId = r, i.asyncTo = e;
|
|
989
|
-
const
|
|
959
|
+
const l = mt(
|
|
990
960
|
t,
|
|
991
|
-
(
|
|
961
|
+
(b, f) => (
|
|
992
962
|
// The `onRest` prop is only called when the `runAsync` promise is resolved.
|
|
993
|
-
f === "onRest" ? void 0 :
|
|
963
|
+
f === "onRest" ? void 0 : b
|
|
994
964
|
)
|
|
995
965
|
);
|
|
996
|
-
let
|
|
997
|
-
const
|
|
998
|
-
(
|
|
999
|
-
),
|
|
966
|
+
let m, d;
|
|
967
|
+
const h = new Promise(
|
|
968
|
+
(b, f) => (m = b, d = f)
|
|
969
|
+
), p = (b) => {
|
|
1000
970
|
const f = (
|
|
1001
971
|
// The `cancel` prop or `stop` method was used.
|
|
1002
972
|
r <= (i.cancelId || 0) && J(n) || // The async `to` prop was replaced.
|
|
1003
973
|
r !== i.asyncId && C(n, !1)
|
|
1004
974
|
);
|
|
1005
975
|
if (f)
|
|
1006
|
-
throw
|
|
1007
|
-
},
|
|
1008
|
-
const w = new
|
|
976
|
+
throw b.result = f, d(b), b;
|
|
977
|
+
}, _ = (b, f) => {
|
|
978
|
+
const w = new qt(), v = new $t();
|
|
1009
979
|
return (async () => {
|
|
1010
980
|
if (O.skipAnimation)
|
|
1011
|
-
throw
|
|
1012
|
-
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
o.und(
|
|
981
|
+
throw ge(i), v.result = C(n, !1), d(v), v;
|
|
982
|
+
p(w);
|
|
983
|
+
const A = o.obj(b) ? { ...b } : { ...f, to: b };
|
|
984
|
+
A.parentId = r, $(l, (U, x) => {
|
|
985
|
+
o.und(A[x]) && (A[x] = U);
|
|
1016
986
|
});
|
|
1017
|
-
const
|
|
1018
|
-
return
|
|
1019
|
-
i.resumeQueue.add(
|
|
1020
|
-
}),
|
|
987
|
+
const P = await n.start(A);
|
|
988
|
+
return p(w), i.paused && await new Promise((U) => {
|
|
989
|
+
i.resumeQueue.add(U);
|
|
990
|
+
}), P;
|
|
1021
991
|
})();
|
|
1022
992
|
};
|
|
1023
|
-
let
|
|
993
|
+
let g;
|
|
1024
994
|
if (O.skipAnimation)
|
|
1025
|
-
return
|
|
995
|
+
return ge(i), C(n, !1);
|
|
1026
996
|
try {
|
|
1027
|
-
let
|
|
1028
|
-
o.arr(e) ?
|
|
997
|
+
let b;
|
|
998
|
+
o.arr(e) ? b = (async (f) => {
|
|
1029
999
|
for (const w of f)
|
|
1030
|
-
await
|
|
1031
|
-
})(e) :
|
|
1032
|
-
} catch (
|
|
1033
|
-
if (
|
|
1034
|
-
|
|
1035
|
-
else if (
|
|
1036
|
-
|
|
1000
|
+
await _(w);
|
|
1001
|
+
})(e) : b = Promise.resolve(e(_, n.stop.bind(n))), await Promise.all([b.then(m), h]), g = C(n.get(), !0, !1);
|
|
1002
|
+
} catch (b) {
|
|
1003
|
+
if (b instanceof qt)
|
|
1004
|
+
g = b.result;
|
|
1005
|
+
else if (b instanceof $t)
|
|
1006
|
+
g = b.result;
|
|
1037
1007
|
else
|
|
1038
|
-
throw
|
|
1008
|
+
throw b;
|
|
1039
1009
|
} finally {
|
|
1040
|
-
r == i.asyncId && (i.asyncId = s, i.asyncTo = s ? u : void 0, i.promise = s ?
|
|
1010
|
+
r == i.asyncId && (i.asyncId = s, i.asyncTo = s ? u : void 0, i.promise = s ? c : void 0);
|
|
1041
1011
|
}
|
|
1042
|
-
return o.fun(a) &&
|
|
1043
|
-
a(
|
|
1044
|
-
}),
|
|
1012
|
+
return o.fun(a) && y.batchedUpdates(() => {
|
|
1013
|
+
a(g, n, n.item);
|
|
1014
|
+
}), g;
|
|
1045
1015
|
})();
|
|
1046
1016
|
}
|
|
1047
|
-
function
|
|
1017
|
+
function ge(e, t) {
|
|
1048
1018
|
ae(e.timeouts, (i) => i.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
|
|
1049
1019
|
}
|
|
1050
|
-
var
|
|
1020
|
+
var qt = class extends Error {
|
|
1051
1021
|
constructor() {
|
|
1052
1022
|
super(
|
|
1053
1023
|
"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."
|
|
1054
1024
|
);
|
|
1055
1025
|
}
|
|
1056
|
-
},
|
|
1026
|
+
}, $t = class extends Error {
|
|
1057
1027
|
constructor() {
|
|
1058
1028
|
super("SkipAnimationSignal");
|
|
1059
1029
|
}
|
|
1060
|
-
},
|
|
1030
|
+
}, Je = (e) => e instanceof gt, Fn = 1, gt = class extends ii {
|
|
1061
1031
|
constructor() {
|
|
1062
|
-
super(...arguments), this.id =
|
|
1032
|
+
super(...arguments), this.id = Fn++, this._priority = 0;
|
|
1063
1033
|
}
|
|
1064
1034
|
get priority() {
|
|
1065
1035
|
return this._priority;
|
|
@@ -1069,7 +1039,7 @@ var zt = class extends Error {
|
|
|
1069
1039
|
}
|
|
1070
1040
|
/** Get the current value */
|
|
1071
1041
|
get() {
|
|
1072
|
-
const e =
|
|
1042
|
+
const e = q(this);
|
|
1073
1043
|
return e && e.getValue();
|
|
1074
1044
|
}
|
|
1075
1045
|
/** Create a spring that maps our value to another value */
|
|
@@ -1097,7 +1067,7 @@ var zt = class extends Error {
|
|
|
1097
1067
|
}
|
|
1098
1068
|
/** Tell our children about our new value */
|
|
1099
1069
|
_onChange(e, t = !1) {
|
|
1100
|
-
|
|
1070
|
+
fe(this, {
|
|
1101
1071
|
type: "change",
|
|
1102
1072
|
parent: this,
|
|
1103
1073
|
value: e,
|
|
@@ -1106,15 +1076,15 @@ var zt = class extends Error {
|
|
|
1106
1076
|
}
|
|
1107
1077
|
/** Tell our children about our new priority */
|
|
1108
1078
|
_onPriorityChange(e) {
|
|
1109
|
-
this.idle ||
|
|
1079
|
+
this.idle || Ce.sort(this), fe(this, {
|
|
1110
1080
|
type: "priority",
|
|
1111
1081
|
parent: this,
|
|
1112
1082
|
priority: e
|
|
1113
1083
|
});
|
|
1114
1084
|
}
|
|
1115
|
-
}, W = Symbol.for("SpringPhase"),
|
|
1085
|
+
}, W = Symbol.for("SpringPhase"), _i = 1, et = 2, tt = 4, Le = (e) => (e[W] & _i) > 0, D = (e) => (e[W] & et) > 0, ie = (e) => (e[W] & tt) > 0, jt = (e, t) => t ? e[W] |= et | _i : e[W] &= ~et, zt = (e, t) => t ? e[W] |= tt : e[W] &= ~tt, Cn = class extends gt {
|
|
1116
1086
|
constructor(e, t) {
|
|
1117
|
-
if (super(), this.animation = new
|
|
1087
|
+
if (super(), this.animation = new Vn(), this.defaultProps = {}, this._state = {
|
|
1118
1088
|
paused: !1,
|
|
1119
1089
|
delayed: !1,
|
|
1120
1090
|
pauseQueue: /* @__PURE__ */ new Set(),
|
|
@@ -1127,27 +1097,27 @@ var zt = class extends Error {
|
|
|
1127
1097
|
}
|
|
1128
1098
|
/** Equals true when not advancing on each frame. */
|
|
1129
1099
|
get idle() {
|
|
1130
|
-
return !(
|
|
1100
|
+
return !(D(this) || this._state.asyncTo) || ie(this);
|
|
1131
1101
|
}
|
|
1132
1102
|
get goal() {
|
|
1133
1103
|
return k(this.animation.to);
|
|
1134
1104
|
}
|
|
1135
1105
|
get velocity() {
|
|
1136
|
-
const e =
|
|
1137
|
-
return e instanceof
|
|
1106
|
+
const e = q(this);
|
|
1107
|
+
return e instanceof $e ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
|
|
1138
1108
|
}
|
|
1139
1109
|
/**
|
|
1140
1110
|
* When true, this value has been animated at least once.
|
|
1141
1111
|
*/
|
|
1142
1112
|
get hasAnimated() {
|
|
1143
|
-
return
|
|
1113
|
+
return Le(this);
|
|
1144
1114
|
}
|
|
1145
1115
|
/**
|
|
1146
1116
|
* When true, this value has an unfinished animation,
|
|
1147
1117
|
* which is either active or paused.
|
|
1148
1118
|
*/
|
|
1149
1119
|
get isAnimating() {
|
|
1150
|
-
return
|
|
1120
|
+
return D(this);
|
|
1151
1121
|
}
|
|
1152
1122
|
/**
|
|
1153
1123
|
* When true, all current and future animations are paused.
|
|
@@ -1167,56 +1137,55 @@ var zt = class extends Error {
|
|
|
1167
1137
|
let t = !0, i = !1;
|
|
1168
1138
|
const n = this.animation;
|
|
1169
1139
|
let { toValues: r } = n;
|
|
1170
|
-
const { config: s } = n, a =
|
|
1171
|
-
!a && T(n.to) && (r = I(k(n.to))), n.values.forEach((
|
|
1172
|
-
if (
|
|
1173
|
-
|
|
1174
|
-
const l = (
|
|
1140
|
+
const { config: s } = n, a = qe(n.to);
|
|
1141
|
+
!a && T(n.to) && (r = I(k(n.to))), n.values.forEach((l, m) => {
|
|
1142
|
+
if (l.done) return;
|
|
1143
|
+
const d = (
|
|
1175
1144
|
// Animated strings always go from 0 to 1.
|
|
1176
|
-
|
|
1145
|
+
l.constructor == Te ? 1 : a ? a[m].lastPosition : r[m]
|
|
1177
1146
|
);
|
|
1178
|
-
let
|
|
1179
|
-
if (!
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1147
|
+
let h = n.immediate, p = d;
|
|
1148
|
+
if (!h) {
|
|
1149
|
+
if (p = l.lastPosition, s.tension <= 0) {
|
|
1150
|
+
l.done = !0;
|
|
1182
1151
|
return;
|
|
1183
1152
|
}
|
|
1184
|
-
let
|
|
1185
|
-
const
|
|
1153
|
+
let _ = l.elapsedTime += e;
|
|
1154
|
+
const g = n.fromValues[m], b = l.v0 != null ? l.v0 : l.v0 = o.arr(s.velocity) ? s.velocity[m] : s.velocity;
|
|
1186
1155
|
let f;
|
|
1187
|
-
const w = s.precision || (
|
|
1156
|
+
const w = s.precision || (g == d ? 5e-3 : Math.min(1, Math.abs(d - g) * 1e-3));
|
|
1188
1157
|
if (o.und(s.duration))
|
|
1189
1158
|
if (s.decay) {
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1159
|
+
const v = s.decay === !0 ? 0.998 : s.decay, A = Math.exp(-(1 - v) * _);
|
|
1160
|
+
p = g + b / (1 - v) * (1 - A), h = Math.abs(l.lastPosition - p) <= w, f = b * A;
|
|
1192
1161
|
} else {
|
|
1193
|
-
f =
|
|
1194
|
-
const
|
|
1195
|
-
let
|
|
1196
|
-
const R = 1,
|
|
1197
|
-
for (let F = 0; F <
|
|
1198
|
-
|
|
1199
|
-
const
|
|
1200
|
-
f = f +
|
|
1162
|
+
f = l.lastVelocity == null ? b : l.lastVelocity;
|
|
1163
|
+
const v = s.restVelocity || w / 10, A = s.clamp ? 0 : s.bounce, P = !o.und(A), U = g == d ? l.v0 > 0 : g < d;
|
|
1164
|
+
let x, B = !1;
|
|
1165
|
+
const R = 1, N = Math.ceil(e / R);
|
|
1166
|
+
for (let F = 0; F < N && (x = Math.abs(f) > v, !(!x && (h = Math.abs(d - p) <= w, h))); ++F) {
|
|
1167
|
+
P && (B = p == d || p > d == U, B && (f = -f * A, p = d));
|
|
1168
|
+
const j = -s.tension * 1e-6 * (p - d), X = -s.friction * 1e-3 * f, be = (j + X) / s.mass;
|
|
1169
|
+
f = f + be * R, p = p + f * R;
|
|
1201
1170
|
}
|
|
1202
1171
|
}
|
|
1203
1172
|
else {
|
|
1204
|
-
let
|
|
1205
|
-
s.duration > 0 && (this._memoizedDuration !== s.duration && (this._memoizedDuration = s.duration,
|
|
1173
|
+
let v = 1;
|
|
1174
|
+
s.duration > 0 && (this._memoizedDuration !== s.duration && (this._memoizedDuration = s.duration, l.durationProgress > 0 && (l.elapsedTime = s.duration * l.durationProgress, _ = l.elapsedTime += e)), v = (s.progress || 0) + _ / this._memoizedDuration, v = v > 1 ? 1 : v < 0 ? 0 : v, l.durationProgress = v), p = g + s.easing(v) * (d - g), f = (p - l.lastPosition) / e, h = v == 1;
|
|
1206
1175
|
}
|
|
1207
|
-
|
|
1176
|
+
l.lastVelocity = f, Number.isNaN(p) && (console.warn("Got NaN while animating:", this), h = !0);
|
|
1208
1177
|
}
|
|
1209
|
-
a && !a[
|
|
1178
|
+
a && !a[m].done && (h = !1), h ? l.done = !0 : t = !1, l.setValue(p, s.round) && (i = !0);
|
|
1210
1179
|
});
|
|
1211
|
-
const u =
|
|
1180
|
+
const u = q(this), c = u.getValue();
|
|
1212
1181
|
if (t) {
|
|
1213
|
-
const
|
|
1214
|
-
(
|
|
1215
|
-
} else i && this._onChange(
|
|
1182
|
+
const l = k(n.to);
|
|
1183
|
+
(c !== l || i) && !s.decay ? (u.setValue(l), this._onChange(l)) : i && s.decay && this._onChange(c), this._stop();
|
|
1184
|
+
} else i && this._onChange(c);
|
|
1216
1185
|
}
|
|
1217
1186
|
/** Set the current value, while stopping the current animation */
|
|
1218
1187
|
set(e) {
|
|
1219
|
-
return
|
|
1188
|
+
return y.batchedUpdates(() => {
|
|
1220
1189
|
this._stop(), this._focus(e), this._set(e);
|
|
1221
1190
|
}), this;
|
|
1222
1191
|
}
|
|
@@ -1233,9 +1202,9 @@ var zt = class extends Error {
|
|
|
1233
1202
|
}
|
|
1234
1203
|
/** Skip to the end of the current animation. */
|
|
1235
1204
|
finish() {
|
|
1236
|
-
if (
|
|
1205
|
+
if (D(this)) {
|
|
1237
1206
|
const { to: e, config: t } = this.animation;
|
|
1238
|
-
|
|
1207
|
+
y.batchedUpdates(() => {
|
|
1239
1208
|
this._onStart(), t.decay || this._set(e, !1), this._stop();
|
|
1240
1209
|
});
|
|
1241
1210
|
}
|
|
@@ -1249,7 +1218,7 @@ var zt = class extends Error {
|
|
|
1249
1218
|
let i;
|
|
1250
1219
|
return o.und(e) ? (i = this.queue || [], this.queue = []) : i = [o.obj(e) ? e : { ...t, to: e }], Promise.all(
|
|
1251
1220
|
i.map((n) => this._update(n))
|
|
1252
|
-
).then((n) =>
|
|
1221
|
+
).then((n) => pt(this, n));
|
|
1253
1222
|
}
|
|
1254
1223
|
/**
|
|
1255
1224
|
* Stop the current animation, and cancel any delayed updates.
|
|
@@ -1258,7 +1227,7 @@ var zt = class extends Error {
|
|
|
1258
1227
|
*/
|
|
1259
1228
|
stop(e) {
|
|
1260
1229
|
const { to: t } = this.animation;
|
|
1261
|
-
return this._focus(this.get()),
|
|
1230
|
+
return this._focus(this.get()), ge(this._state, e && this._lastCallId), y.batchedUpdates(() => this._stop(t, e)), this;
|
|
1262
1231
|
}
|
|
1263
1232
|
/** Restart the animation. */
|
|
1264
1233
|
reset() {
|
|
@@ -1277,34 +1246,34 @@ var zt = class extends Error {
|
|
|
1277
1246
|
_prepareNode(e) {
|
|
1278
1247
|
const t = this.key || "";
|
|
1279
1248
|
let { to: i, from: n } = e;
|
|
1280
|
-
i = o.obj(i) ? i[t] : i, (i == null ||
|
|
1249
|
+
i = o.obj(i) ? i[t] : i, (i == null || Ze(i)) && (i = void 0), n = o.obj(n) ? n[t] : n, n == null && (n = void 0);
|
|
1281
1250
|
const r = { to: i, from: n };
|
|
1282
|
-
return
|
|
1251
|
+
return Le(this) || (e.reverse && ([i, n] = [n, i]), n = k(n), o.und(n) ? q(this) || this._set(i) : this._set(n)), r;
|
|
1283
1252
|
}
|
|
1284
1253
|
/** Every update is processed by this method before merging. */
|
|
1285
1254
|
_update({ ...e }, t) {
|
|
1286
1255
|
const { key: i, defaultProps: n } = this;
|
|
1287
1256
|
e.default && Object.assign(
|
|
1288
1257
|
n,
|
|
1289
|
-
|
|
1258
|
+
mt(
|
|
1290
1259
|
e,
|
|
1291
|
-
(a, u) => /^on/.test(u) ?
|
|
1260
|
+
(a, u) => /^on/.test(u) ? hi(a, i) : a
|
|
1292
1261
|
)
|
|
1293
|
-
),
|
|
1262
|
+
), Dt(this, e, "onProps"), re(this, "onProps", e, this);
|
|
1294
1263
|
const r = this._prepareNode(e);
|
|
1295
1264
|
if (Object.isFrozen(this))
|
|
1296
1265
|
throw Error(
|
|
1297
1266
|
"Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?"
|
|
1298
1267
|
);
|
|
1299
1268
|
const s = this._state;
|
|
1300
|
-
return
|
|
1269
|
+
return gi(++this._lastCallId, {
|
|
1301
1270
|
key: i,
|
|
1302
1271
|
props: e,
|
|
1303
1272
|
defaultProps: n,
|
|
1304
1273
|
state: s,
|
|
1305
1274
|
actions: {
|
|
1306
1275
|
pause: () => {
|
|
1307
|
-
ie(this) || (
|
|
1276
|
+
ie(this) || (zt(this, !0), se(s.pauseQueue), re(
|
|
1308
1277
|
this,
|
|
1309
1278
|
"onPause",
|
|
1310
1279
|
C(this, ne(this, this.animation.to)),
|
|
@@ -1312,7 +1281,7 @@ var zt = class extends Error {
|
|
|
1312
1281
|
));
|
|
1313
1282
|
},
|
|
1314
1283
|
resume: () => {
|
|
1315
|
-
ie(this) && (
|
|
1284
|
+
ie(this) && (zt(this, !1), D(this) && this._resume(), se(s.resumeQueue), re(
|
|
1316
1285
|
this,
|
|
1317
1286
|
"onResume",
|
|
1318
1287
|
C(this, ne(this, this.animation.to)),
|
|
@@ -1323,7 +1292,7 @@ var zt = class extends Error {
|
|
|
1323
1292
|
}
|
|
1324
1293
|
}).then((a) => {
|
|
1325
1294
|
if (e.loop && a.finished && !(t && a.noop)) {
|
|
1326
|
-
const u =
|
|
1295
|
+
const u = bi(e);
|
|
1327
1296
|
if (u)
|
|
1328
1297
|
return this._update(u, !0);
|
|
1329
1298
|
}
|
|
@@ -1340,68 +1309,68 @@ var zt = class extends Error {
|
|
|
1340
1309
|
this._lastToId = t.callId;
|
|
1341
1310
|
else
|
|
1342
1311
|
return i(J(this));
|
|
1343
|
-
const { key: s, defaultProps: a, animation: u } = this, { to:
|
|
1344
|
-
let { to:
|
|
1345
|
-
r && !n && (!t.default || o.und(
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
(n || r) && (
|
|
1352
|
-
|
|
1353
|
-
|
|
1312
|
+
const { key: s, defaultProps: a, animation: u } = this, { to: c, from: l } = u;
|
|
1313
|
+
let { to: m = c, from: d = l } = e;
|
|
1314
|
+
r && !n && (!t.default || o.und(m)) && (m = d), t.reverse && ([m, d] = [d, m]);
|
|
1315
|
+
const h = !z(d, l);
|
|
1316
|
+
h && (u.from = d), d = k(d);
|
|
1317
|
+
const p = !z(m, c);
|
|
1318
|
+
p && this._focus(m);
|
|
1319
|
+
const _ = Ze(t.to), { config: g } = u, { decay: b, velocity: f } = g;
|
|
1320
|
+
(n || r) && (g.velocity = 0), t.config && !_ && Tn(
|
|
1321
|
+
g,
|
|
1322
|
+
G(t.config, s),
|
|
1354
1323
|
// Avoid calling the same "config" prop twice.
|
|
1355
|
-
t.config !== a.config ?
|
|
1324
|
+
t.config !== a.config ? G(a.config, s) : void 0
|
|
1356
1325
|
);
|
|
1357
|
-
let w =
|
|
1358
|
-
if (!w || o.und(
|
|
1326
|
+
let w = q(this);
|
|
1327
|
+
if (!w || o.und(m))
|
|
1359
1328
|
return i(C(this, !0));
|
|
1360
|
-
const
|
|
1329
|
+
const v = (
|
|
1361
1330
|
// When `reset` is undefined, the `from` prop implies `reset: true`,
|
|
1362
1331
|
// except for declarative updates. When `reset` is defined, there
|
|
1363
1332
|
// must exist a value to animate from.
|
|
1364
|
-
o.und(t.reset) ? r && !t.default : !o.und(
|
|
1365
|
-
),
|
|
1366
|
-
if (
|
|
1367
|
-
const F =
|
|
1333
|
+
o.und(t.reset) ? r && !t.default : !o.und(d) && ue(t.reset, s)
|
|
1334
|
+
), A = v ? d : this.get(), P = pe(m), U = o.num(P) || o.arr(P) || Ue(P), x = !_ && (!U || ue(a.immediate || t.immediate, s));
|
|
1335
|
+
if (p) {
|
|
1336
|
+
const F = Xe(m);
|
|
1368
1337
|
if (F !== w.constructor)
|
|
1369
|
-
if (
|
|
1370
|
-
w = this._set(
|
|
1338
|
+
if (x)
|
|
1339
|
+
w = this._set(P);
|
|
1371
1340
|
else
|
|
1372
1341
|
throw Error(
|
|
1373
1342
|
`Cannot animate between ${w.constructor.name} and ${F.name}, as the "to" prop suggests`
|
|
1374
1343
|
);
|
|
1375
1344
|
}
|
|
1376
|
-
const
|
|
1377
|
-
let R = T(
|
|
1345
|
+
const B = w.constructor;
|
|
1346
|
+
let R = T(m), N = !1;
|
|
1378
1347
|
if (!R) {
|
|
1379
|
-
const F =
|
|
1380
|
-
(
|
|
1348
|
+
const F = v || !Le(this) && h;
|
|
1349
|
+
(p || F) && (N = z(pe(A), P), R = !N), (!z(u.immediate, x) && !x || !z(g.decay, b) || !z(g.velocity, f)) && (R = !0);
|
|
1381
1350
|
}
|
|
1382
|
-
if (
|
|
1351
|
+
if (N && D(this) && (u.changed && !v ? R = !0 : R || this._stop(c)), !_ && ((R || T(c)) && (u.values = w.getPayload(), u.toValues = T(m) ? null : B == Te ? [1] : I(P)), u.immediate != x && (u.immediate = x, !x && !v && this._set(c)), R)) {
|
|
1383
1352
|
const { onRest: F } = u;
|
|
1384
|
-
|
|
1385
|
-
const
|
|
1386
|
-
se(this._pendingCalls,
|
|
1387
|
-
u.changed = !
|
|
1353
|
+
S(On, (X) => Dt(this, t, X));
|
|
1354
|
+
const j = C(this, ne(this, c));
|
|
1355
|
+
se(this._pendingCalls, j), this._pendingCalls.add(i), u.changed && y.batchedUpdates(() => {
|
|
1356
|
+
u.changed = !v, F?.(j, this), v ? G(a.onRest, j) : u.onStart?.(j, this);
|
|
1388
1357
|
});
|
|
1389
1358
|
}
|
|
1390
|
-
|
|
1359
|
+
v && this._set(A), _ ? i(yi(t.to, t, this._state, this)) : R ? this._start() : D(this) && !p ? this._pendingCalls.add(i) : i(vi(A));
|
|
1391
1360
|
}
|
|
1392
1361
|
/** Update the `animation.to` value, which might be a `FluidValue` */
|
|
1393
1362
|
_focus(e) {
|
|
1394
1363
|
const t = this.animation;
|
|
1395
|
-
e !== t.to && (
|
|
1364
|
+
e !== t.to && (It(this) && this._detach(), t.to = e, It(this) && this._attach());
|
|
1396
1365
|
}
|
|
1397
1366
|
_attach() {
|
|
1398
1367
|
let e = 0;
|
|
1399
1368
|
const { to: t } = this.animation;
|
|
1400
|
-
T(t) && (te(t, this),
|
|
1369
|
+
T(t) && (te(t, this), Je(t) && (e = t.priority + 1)), this.priority = e;
|
|
1401
1370
|
}
|
|
1402
1371
|
_detach() {
|
|
1403
1372
|
const { to: e } = this.animation;
|
|
1404
|
-
T(e) &&
|
|
1373
|
+
T(e) && he(e, this);
|
|
1405
1374
|
}
|
|
1406
1375
|
/**
|
|
1407
1376
|
* Update the current value from outside the frameloop,
|
|
@@ -1410,15 +1379,15 @@ var zt = class extends Error {
|
|
|
1410
1379
|
_set(e, t = !0) {
|
|
1411
1380
|
const i = k(e);
|
|
1412
1381
|
if (!o.und(i)) {
|
|
1413
|
-
const n =
|
|
1382
|
+
const n = q(this);
|
|
1414
1383
|
if (!n || !z(i, n.getValue())) {
|
|
1415
|
-
const r =
|
|
1416
|
-
!n || n.constructor != r ?
|
|
1384
|
+
const r = Xe(i);
|
|
1385
|
+
!n || n.constructor != r ? ht(this, r.create(i)) : n.setValue(i), n && y.batchedUpdates(() => {
|
|
1417
1386
|
this._onChange(i, t);
|
|
1418
1387
|
});
|
|
1419
1388
|
}
|
|
1420
1389
|
}
|
|
1421
|
-
return
|
|
1390
|
+
return q(this);
|
|
1422
1391
|
}
|
|
1423
1392
|
_onStart() {
|
|
1424
1393
|
const e = this.animation;
|
|
@@ -1430,17 +1399,17 @@ var zt = class extends Error {
|
|
|
1430
1399
|
));
|
|
1431
1400
|
}
|
|
1432
1401
|
_onChange(e, t) {
|
|
1433
|
-
t || (this._onStart(),
|
|
1402
|
+
t || (this._onStart(), G(this.animation.onChange, e, this)), G(this.defaultProps.onChange, e, this), super._onChange(e, t);
|
|
1434
1403
|
}
|
|
1435
1404
|
// This method resets the animation state (even if already animating) to
|
|
1436
1405
|
// ensure the latest from/to range is used, and it also ensures this spring
|
|
1437
1406
|
// is added to the frameloop.
|
|
1438
1407
|
_start() {
|
|
1439
1408
|
const e = this.animation;
|
|
1440
|
-
|
|
1409
|
+
q(this).reset(k(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), D(this) || (jt(this, !0), ie(this) || this._resume());
|
|
1441
1410
|
}
|
|
1442
1411
|
_resume() {
|
|
1443
|
-
O.skipAnimation ? this.finish() :
|
|
1412
|
+
O.skipAnimation ? this.finish() : Ce.start(this);
|
|
1444
1413
|
}
|
|
1445
1414
|
/**
|
|
1446
1415
|
* Exit the frameloop and notify `onRest` listeners.
|
|
@@ -1448,12 +1417,12 @@ var zt = class extends Error {
|
|
|
1448
1417
|
* Always wrap `_stop` calls with `batchedUpdates`.
|
|
1449
1418
|
*/
|
|
1450
1419
|
_stop(e, t) {
|
|
1451
|
-
if (
|
|
1452
|
-
|
|
1420
|
+
if (D(this)) {
|
|
1421
|
+
jt(this, !1);
|
|
1453
1422
|
const i = this.animation;
|
|
1454
|
-
|
|
1423
|
+
S(i.values, (r) => {
|
|
1455
1424
|
r.done = !0;
|
|
1456
|
-
}), i.toValues && (i.onChange = i.onPause = i.onResume = void 0),
|
|
1425
|
+
}), i.toValues && (i.onChange = i.onPause = i.onResume = void 0), fe(this, {
|
|
1457
1426
|
type: "idle",
|
|
1458
1427
|
parent: this
|
|
1459
1428
|
});
|
|
@@ -1463,14 +1432,14 @@ var zt = class extends Error {
|
|
|
1463
1432
|
}
|
|
1464
1433
|
};
|
|
1465
1434
|
function ne(e, t) {
|
|
1466
|
-
const i =
|
|
1435
|
+
const i = pe(t), n = pe(e.get());
|
|
1467
1436
|
return z(n, i);
|
|
1468
1437
|
}
|
|
1469
|
-
function
|
|
1470
|
-
const n =
|
|
1438
|
+
function bi(e, t = e.loop, i = e.to) {
|
|
1439
|
+
const n = G(t);
|
|
1471
1440
|
if (n) {
|
|
1472
|
-
const r = n !== !0 &&
|
|
1473
|
-
return
|
|
1441
|
+
const r = n !== !0 && pi(n), s = (r || e).reverse, a = !r || r.reset;
|
|
1442
|
+
return ve({
|
|
1474
1443
|
...e,
|
|
1475
1444
|
loop: t,
|
|
1476
1445
|
// Avoid updating default props when looping.
|
|
@@ -1480,7 +1449,7 @@ function wi(e, t = e.loop, i = e.to) {
|
|
|
1480
1449
|
// For the "reverse" prop to loop as expected, the "to" prop
|
|
1481
1450
|
// must be undefined. The "reverse" prop is ignored when the
|
|
1482
1451
|
// "to" prop is an array or function.
|
|
1483
|
-
to: !s ||
|
|
1452
|
+
to: !s || Ze(i) ? i : void 0,
|
|
1484
1453
|
// Ignore the "from" prop except on reset.
|
|
1485
1454
|
from: a ? e.from : void 0,
|
|
1486
1455
|
reset: a,
|
|
@@ -1490,33 +1459,33 @@ function wi(e, t = e.loop, i = e.to) {
|
|
|
1490
1459
|
});
|
|
1491
1460
|
}
|
|
1492
1461
|
}
|
|
1493
|
-
function
|
|
1494
|
-
const { to: t, from: i } = e =
|
|
1495
|
-
return o.obj(t) &&
|
|
1462
|
+
function ve(e) {
|
|
1463
|
+
const { to: t, from: i } = e = pi(e), n = /* @__PURE__ */ new Set();
|
|
1464
|
+
return o.obj(t) && Nt(t, n), o.obj(i) && Nt(i, n), e.keys = n.size ? Array.from(n) : null, e;
|
|
1496
1465
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const t =
|
|
1499
|
-
return o.und(t.default) && (t.default =
|
|
1466
|
+
function En(e) {
|
|
1467
|
+
const t = ve(e);
|
|
1468
|
+
return o.und(t.default) && (t.default = mt(t)), t;
|
|
1500
1469
|
}
|
|
1501
|
-
function
|
|
1502
|
-
|
|
1470
|
+
function Nt(e, t) {
|
|
1471
|
+
$(e, (i, n) => i != null && t.add(n));
|
|
1503
1472
|
}
|
|
1504
|
-
var
|
|
1473
|
+
var On = [
|
|
1505
1474
|
"onStart",
|
|
1506
1475
|
"onRest",
|
|
1507
1476
|
"onChange",
|
|
1508
1477
|
"onPause",
|
|
1509
1478
|
"onResume"
|
|
1510
1479
|
];
|
|
1511
|
-
function
|
|
1512
|
-
e.animation[i] = t[i] !==
|
|
1480
|
+
function Dt(e, t, i) {
|
|
1481
|
+
e.animation[i] = t[i] !== mi(t, i) ? hi(t[i], e.key) : void 0;
|
|
1513
1482
|
}
|
|
1514
1483
|
function re(e, t, ...i) {
|
|
1515
1484
|
e.animation[t]?.(...i), e.defaultProps[t]?.(...i);
|
|
1516
1485
|
}
|
|
1517
|
-
var Un = ["onStart", "onChange", "onRest"],
|
|
1486
|
+
var Un = ["onStart", "onChange", "onRest"], qn = 1, $n = class {
|
|
1518
1487
|
constructor(e, t) {
|
|
1519
|
-
this.id =
|
|
1488
|
+
this.id = qn++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = /* @__PURE__ */ new Set(), this._changed = /* @__PURE__ */ new Set(), this._started = !1, this._state = {
|
|
1520
1489
|
paused: !1,
|
|
1521
1490
|
pauseQueue: /* @__PURE__ */ new Set(),
|
|
1522
1491
|
resumeQueue: /* @__PURE__ */ new Set(),
|
|
@@ -1554,7 +1523,7 @@ var Un = ["onStart", "onChange", "onRest"], jn = 1, $n = class {
|
|
|
1554
1523
|
}
|
|
1555
1524
|
/** Push an update onto the queue of each value. */
|
|
1556
1525
|
update(e) {
|
|
1557
|
-
return e && this.queue.push(
|
|
1526
|
+
return e && this.queue.push(ve(e)), this;
|
|
1558
1527
|
}
|
|
1559
1528
|
/**
|
|
1560
1529
|
* Start the queued animations for every spring, and resolve the returned
|
|
@@ -1565,15 +1534,15 @@ var Un = ["onStart", "onChange", "onRest"], jn = 1, $n = class {
|
|
|
1565
1534
|
*/
|
|
1566
1535
|
start(e) {
|
|
1567
1536
|
let { queue: t } = this;
|
|
1568
|
-
return e ? t = I(e).map(
|
|
1537
|
+
return e ? t = I(e).map(ve) : this.queue = [], this._flush ? this._flush(this, t) : (xi(this, t), it(this, t));
|
|
1569
1538
|
}
|
|
1570
1539
|
/** @internal */
|
|
1571
1540
|
stop(e, t) {
|
|
1572
1541
|
if (e !== !!e && (t = e), t) {
|
|
1573
1542
|
const i = this.springs;
|
|
1574
|
-
|
|
1543
|
+
S(I(t), (n) => i[n].stop(!!e));
|
|
1575
1544
|
} else
|
|
1576
|
-
|
|
1545
|
+
ge(this._state, this._lastAsyncId), this.each((i) => i.stop(!!e));
|
|
1577
1546
|
return this;
|
|
1578
1547
|
}
|
|
1579
1548
|
/** Freeze the active animation in time */
|
|
@@ -1582,7 +1551,7 @@ var Un = ["onStart", "onChange", "onRest"], jn = 1, $n = class {
|
|
|
1582
1551
|
this.start({ pause: !0 });
|
|
1583
1552
|
else {
|
|
1584
1553
|
const t = this.springs;
|
|
1585
|
-
|
|
1554
|
+
S(I(e), (i) => t[i].pause());
|
|
1586
1555
|
}
|
|
1587
1556
|
return this;
|
|
1588
1557
|
}
|
|
@@ -1592,25 +1561,25 @@ var Un = ["onStart", "onChange", "onRest"], jn = 1, $n = class {
|
|
|
1592
1561
|
this.start({ pause: !1 });
|
|
1593
1562
|
else {
|
|
1594
1563
|
const t = this.springs;
|
|
1595
|
-
|
|
1564
|
+
S(I(e), (i) => t[i].resume());
|
|
1596
1565
|
}
|
|
1597
1566
|
return this;
|
|
1598
1567
|
}
|
|
1599
1568
|
/** Call a function once per spring value */
|
|
1600
1569
|
each(e) {
|
|
1601
|
-
|
|
1570
|
+
$(this.springs, e);
|
|
1602
1571
|
}
|
|
1603
1572
|
/** @internal Called at the end of every animation frame */
|
|
1604
1573
|
_onFrame() {
|
|
1605
1574
|
const { onStart: e, onChange: t, onRest: i } = this._events, n = this._active.size > 0, r = this._changed.size > 0;
|
|
1606
|
-
(n && !this._started || r && !this._started) && (this._started = !0, ae(e, ([u,
|
|
1607
|
-
|
|
1575
|
+
(n && !this._started || r && !this._started) && (this._started = !0, ae(e, ([u, c]) => {
|
|
1576
|
+
c.value = this.get(), u(c, this, this._item);
|
|
1608
1577
|
}));
|
|
1609
1578
|
const s = !n && this._started, a = r || s && i.size ? this.get() : null;
|
|
1610
|
-
r && t.size && ae(t, ([u,
|
|
1611
|
-
|
|
1612
|
-
}), s && (this._started = !1, ae(i, ([u,
|
|
1613
|
-
|
|
1579
|
+
r && t.size && ae(t, ([u, c]) => {
|
|
1580
|
+
c.value = a, u(c, this, this._item);
|
|
1581
|
+
}), s && (this._started = !1, ae(i, ([u, c]) => {
|
|
1582
|
+
c.value = a, u(c, this, this._item);
|
|
1614
1583
|
}));
|
|
1615
1584
|
}
|
|
1616
1585
|
/** @internal */
|
|
@@ -1619,113 +1588,101 @@ var Un = ["onStart", "onChange", "onRest"], jn = 1, $n = class {
|
|
|
1619
1588
|
this._changed.add(e.parent), e.idle || this._active.add(e.parent);
|
|
1620
1589
|
else if (e.type == "idle")
|
|
1621
1590
|
this._active.delete(e.parent);
|
|
1622
|
-
else
|
|
1623
|
-
|
|
1624
|
-
g.onFrame(this._onFrame);
|
|
1591
|
+
else return;
|
|
1592
|
+
y.onFrame(this._onFrame);
|
|
1625
1593
|
}
|
|
1626
1594
|
};
|
|
1627
|
-
function
|
|
1628
|
-
return Promise.all(t.map((i) =>
|
|
1629
|
-
(i) =>
|
|
1595
|
+
function it(e, t) {
|
|
1596
|
+
return Promise.all(t.map((i) => wi(e, i))).then(
|
|
1597
|
+
(i) => pt(e, i)
|
|
1630
1598
|
);
|
|
1631
1599
|
}
|
|
1632
|
-
async function
|
|
1633
|
-
const { keys: n, to: r, from: s, loop: a, onRest: u, onResolve:
|
|
1600
|
+
async function wi(e, t, i) {
|
|
1601
|
+
const { keys: n, to: r, from: s, loop: a, onRest: u, onResolve: c } = t, l = o.obj(t.default) && t.default;
|
|
1634
1602
|
a && (t.loop = !1), r === !1 && (t.to = null), s === !1 && (t.from = null);
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
const
|
|
1638
|
-
if (o.fun(
|
|
1639
|
-
const f = e._events[
|
|
1640
|
-
t[
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1603
|
+
const m = o.arr(r) || o.fun(r) ? r : void 0;
|
|
1604
|
+
m ? (t.to = void 0, t.onRest = void 0, l && (l.onRest = void 0)) : S(Un, (g) => {
|
|
1605
|
+
const b = t[g];
|
|
1606
|
+
if (o.fun(b)) {
|
|
1607
|
+
const f = e._events[g];
|
|
1608
|
+
t[g] = ({ finished: w, cancelled: v }) => {
|
|
1609
|
+
const A = f.get(b);
|
|
1610
|
+
A ? (w || (A.finished = !1), v && (A.cancelled = !0)) : f.set(b, {
|
|
1643
1611
|
value: null,
|
|
1644
1612
|
finished: w || !1,
|
|
1645
|
-
cancelled:
|
|
1613
|
+
cancelled: v || !1
|
|
1646
1614
|
});
|
|
1647
|
-
},
|
|
1615
|
+
}, l && (l[g] = t[g]);
|
|
1648
1616
|
}
|
|
1649
1617
|
});
|
|
1650
|
-
const
|
|
1651
|
-
t.pause === !
|
|
1652
|
-
const
|
|
1653
|
-
(
|
|
1654
|
-
),
|
|
1655
|
-
(
|
|
1656
|
-
|
|
1618
|
+
const d = e._state;
|
|
1619
|
+
t.pause === !d.paused ? (d.paused = t.pause, se(t.pause ? d.pauseQueue : d.resumeQueue)) : d.paused && (t.pause = !0);
|
|
1620
|
+
const h = (n || Object.keys(e.springs)).map(
|
|
1621
|
+
(g) => e.springs[g].start(t)
|
|
1622
|
+
), p = t.cancel === !0 || mi(t, "cancel") === !0;
|
|
1623
|
+
(m || p && d.asyncId) && h.push(
|
|
1624
|
+
gi(++e._lastAsyncId, {
|
|
1657
1625
|
props: t,
|
|
1658
|
-
state:
|
|
1626
|
+
state: d,
|
|
1659
1627
|
actions: {
|
|
1660
|
-
pause:
|
|
1661
|
-
resume:
|
|
1662
|
-
start(
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
h,
|
|
1628
|
+
pause: He,
|
|
1629
|
+
resume: He,
|
|
1630
|
+
start(g, b) {
|
|
1631
|
+
p ? (ge(d, e._lastAsyncId), b(J(e))) : (g.onRest = u, b(
|
|
1632
|
+
yi(
|
|
1666
1633
|
m,
|
|
1667
|
-
|
|
1634
|
+
g,
|
|
1635
|
+
d,
|
|
1668
1636
|
e
|
|
1669
1637
|
)
|
|
1670
1638
|
));
|
|
1671
1639
|
}
|
|
1672
1640
|
}
|
|
1673
1641
|
})
|
|
1674
|
-
),
|
|
1675
|
-
|
|
1642
|
+
), d.paused && await new Promise((g) => {
|
|
1643
|
+
d.resumeQueue.add(g);
|
|
1676
1644
|
});
|
|
1677
|
-
const
|
|
1678
|
-
if (a &&
|
|
1679
|
-
const
|
|
1680
|
-
if (
|
|
1681
|
-
return
|
|
1645
|
+
const _ = pt(e, await Promise.all(h));
|
|
1646
|
+
if (a && _.finished && !(i && _.noop)) {
|
|
1647
|
+
const g = bi(t, a, r);
|
|
1648
|
+
if (g)
|
|
1649
|
+
return xi(e, [g]), wi(e, g, !0);
|
|
1682
1650
|
}
|
|
1683
|
-
return
|
|
1651
|
+
return c && y.batchedUpdates(() => c(_, e, e.item)), _;
|
|
1684
1652
|
}
|
|
1685
|
-
function
|
|
1653
|
+
function Qt(e, t) {
|
|
1686
1654
|
const i = { ...e.springs };
|
|
1687
|
-
return t &&
|
|
1688
|
-
o.und(n.keys) && (n =
|
|
1655
|
+
return t && S(I(t), (n) => {
|
|
1656
|
+
o.und(n.keys) && (n = ve(n)), o.obj(n.to) || (n = { ...n, to: void 0 }), Pi(i, n, (r) => Ai(r));
|
|
1689
1657
|
}), Si(e, i), i;
|
|
1690
1658
|
}
|
|
1691
1659
|
function Si(e, t) {
|
|
1692
|
-
|
|
1660
|
+
$(t, (i, n) => {
|
|
1693
1661
|
e.springs[n] || (e.springs[n] = i, te(i, e));
|
|
1694
1662
|
});
|
|
1695
1663
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const i = new
|
|
1664
|
+
function Ai(e, t) {
|
|
1665
|
+
const i = new Cn();
|
|
1698
1666
|
return i.key = e, t && te(i, t), i;
|
|
1699
1667
|
}
|
|
1700
|
-
function
|
|
1701
|
-
t.keys &&
|
|
1668
|
+
function Pi(e, t, i) {
|
|
1669
|
+
t.keys && S(t.keys, (n) => {
|
|
1702
1670
|
(e[n] || (e[n] = i(n)))._prepareNode(t);
|
|
1703
1671
|
});
|
|
1704
1672
|
}
|
|
1705
|
-
function
|
|
1706
|
-
|
|
1707
|
-
|
|
1673
|
+
function xi(e, t) {
|
|
1674
|
+
S(t, (i) => {
|
|
1675
|
+
Pi(e.springs, i, (n) => Ai(n, e));
|
|
1708
1676
|
});
|
|
1709
1677
|
}
|
|
1710
|
-
var
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
}) => {
|
|
1714
|
-
const i = Wt(Ce), n = t.pause || !!i.pause, r = t.immediate || !!i.immediate;
|
|
1715
|
-
t = fn(() => ({ pause: n, immediate: r }), [n, r]);
|
|
1716
|
-
const { Provider: s } = Ce;
|
|
1717
|
-
return /* @__PURE__ */ st.createElement(s, { value: t }, e);
|
|
1718
|
-
}, Ce = zn(De, {});
|
|
1719
|
-
De.Provider = Ce.Provider;
|
|
1720
|
-
De.Consumer = Ce.Consumer;
|
|
1721
|
-
function zn(e, t) {
|
|
1722
|
-
return Object.assign(e, st.createContext(t)), e.Provider._context = e, e.Consumer._context = e, e;
|
|
1723
|
-
}
|
|
1724
|
-
var Dn = () => {
|
|
1678
|
+
var jn = Bt.createContext({
|
|
1679
|
+
pause: !1,
|
|
1680
|
+
immediate: !1
|
|
1681
|
+
}), zn = () => {
|
|
1725
1682
|
const e = [], t = function(n) {
|
|
1726
|
-
|
|
1683
|
+
cn();
|
|
1727
1684
|
const r = [];
|
|
1728
|
-
return
|
|
1685
|
+
return S(e, (s, a) => {
|
|
1729
1686
|
if (o.und(n))
|
|
1730
1687
|
r.push(s.start());
|
|
1731
1688
|
else {
|
|
@@ -1740,17 +1697,17 @@ var Dn = () => {
|
|
|
1740
1697
|
const r = e.indexOf(n);
|
|
1741
1698
|
~r && e.splice(r, 1);
|
|
1742
1699
|
}, t.pause = function() {
|
|
1743
|
-
return
|
|
1700
|
+
return S(e, (n) => n.pause(...arguments)), this;
|
|
1744
1701
|
}, t.resume = function() {
|
|
1745
|
-
return
|
|
1702
|
+
return S(e, (n) => n.resume(...arguments)), this;
|
|
1746
1703
|
}, t.set = function(n) {
|
|
1747
|
-
|
|
1704
|
+
S(e, (r, s) => {
|
|
1748
1705
|
const a = o.fun(n) ? n(s, r) : n;
|
|
1749
1706
|
a && r.set(a);
|
|
1750
1707
|
});
|
|
1751
1708
|
}, t.start = function(n) {
|
|
1752
1709
|
const r = [];
|
|
1753
|
-
return
|
|
1710
|
+
return S(e, (s, a) => {
|
|
1754
1711
|
if (o.und(n))
|
|
1755
1712
|
r.push(s.start());
|
|
1756
1713
|
else {
|
|
@@ -1759,9 +1716,9 @@ var Dn = () => {
|
|
|
1759
1716
|
}
|
|
1760
1717
|
}), r;
|
|
1761
1718
|
}, t.stop = function() {
|
|
1762
|
-
return
|
|
1719
|
+
return S(e, (n) => n.stop(...arguments)), this;
|
|
1763
1720
|
}, t.update = function(n) {
|
|
1764
|
-
return
|
|
1721
|
+
return S(e, (r, s) => r.update(this._getProps(n, r, s))), this;
|
|
1765
1722
|
};
|
|
1766
1723
|
const i = function(n, r, s) {
|
|
1767
1724
|
return o.fun(n) ? n(s, r) : n;
|
|
@@ -1771,53 +1728,55 @@ var Dn = () => {
|
|
|
1771
1728
|
function Nn(e, t, i) {
|
|
1772
1729
|
const n = o.fun(t) && t;
|
|
1773
1730
|
n && !i && (i = []);
|
|
1774
|
-
const r =
|
|
1775
|
-
() => n || arguments.length == 3 ?
|
|
1731
|
+
const r = Se(
|
|
1732
|
+
() => n || arguments.length == 3 ? zn() : void 0,
|
|
1776
1733
|
[]
|
|
1777
|
-
), s =
|
|
1734
|
+
), s = Y(0), a = oi(), u = Se(
|
|
1778
1735
|
() => ({
|
|
1779
1736
|
ctrls: [],
|
|
1780
1737
|
queue: [],
|
|
1781
1738
|
flush(f, w) {
|
|
1782
|
-
const
|
|
1783
|
-
return s.current > 0 && !u.queue.length && !Object.keys(
|
|
1784
|
-
Si(f,
|
|
1785
|
-
|
|
1739
|
+
const v = Qt(f, w);
|
|
1740
|
+
return s.current > 0 && !u.queue.length && !Object.keys(v).some((P) => !f.springs[P]) ? it(f, w) : new Promise((P) => {
|
|
1741
|
+
Si(f, v), u.queue.push(() => {
|
|
1742
|
+
P(it(f, w));
|
|
1786
1743
|
}), a();
|
|
1787
1744
|
});
|
|
1788
1745
|
}
|
|
1789
1746
|
}),
|
|
1790
1747
|
[]
|
|
1791
|
-
),
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
}),
|
|
1796
|
-
}, [e]),
|
|
1797
|
-
|
|
1748
|
+
), c = Y([...u.ctrls]), l = Y([]), m = Vt(e) || 0;
|
|
1749
|
+
Se(() => {
|
|
1750
|
+
S(c.current.slice(e, m), (f) => {
|
|
1751
|
+
xn(f, r), f.stop(!0);
|
|
1752
|
+
}), c.current.length = e, d(m, e);
|
|
1753
|
+
}, [e]), Se(() => {
|
|
1754
|
+
d(0, Math.min(m, e));
|
|
1798
1755
|
}, i);
|
|
1799
|
-
function
|
|
1800
|
-
for (let
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1756
|
+
function d(f, w) {
|
|
1757
|
+
for (let v = f; v < w; v++) {
|
|
1758
|
+
const A = c.current[v] || (c.current[v] = new $n(null, u.flush)), P = n ? n(v, A) : t[v];
|
|
1759
|
+
P && (l.current[v] = En(P));
|
|
1803
1760
|
}
|
|
1804
1761
|
}
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1807
|
-
|
|
1762
|
+
const h = c.current.map(
|
|
1763
|
+
(f, w) => Qt(f, l.current[w])
|
|
1764
|
+
), p = Ci(jn), _ = Vt(p), g = p !== _ && Pn(p);
|
|
1765
|
+
ft(() => {
|
|
1766
|
+
s.current++, u.ctrls = c.current;
|
|
1808
1767
|
const { queue: f } = u;
|
|
1809
|
-
f.length && (u.queue = [],
|
|
1810
|
-
r?.add(w),
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1768
|
+
f.length && (u.queue = [], S(f, (w) => w())), S(c.current, (w, v) => {
|
|
1769
|
+
r?.add(w), g && w.start({ default: p });
|
|
1770
|
+
const A = l.current[v];
|
|
1771
|
+
A && (Rn(w, A.ref), w.ref ? w.queue.push(A) : w.start(A));
|
|
1813
1772
|
});
|
|
1814
|
-
}),
|
|
1815
|
-
|
|
1773
|
+
}), ui(() => () => {
|
|
1774
|
+
S(u.ctrls, (f) => f.stop(!0));
|
|
1816
1775
|
});
|
|
1817
|
-
const
|
|
1818
|
-
return r ? [
|
|
1776
|
+
const b = h.map((f) => ({ ...f }));
|
|
1777
|
+
return r ? [b, r] : b;
|
|
1819
1778
|
}
|
|
1820
|
-
function
|
|
1779
|
+
function Dn(e, t) {
|
|
1821
1780
|
const i = o.fun(e), [[n], r] = Nn(
|
|
1822
1781
|
1,
|
|
1823
1782
|
i ? e : [e],
|
|
@@ -1825,90 +1784,98 @@ function Qn(e, t) {
|
|
|
1825
1784
|
);
|
|
1826
1785
|
return i || arguments.length == 2 ? [n, r] : n;
|
|
1827
1786
|
}
|
|
1828
|
-
var
|
|
1787
|
+
var Qn = class extends gt {
|
|
1829
1788
|
constructor(e, t) {
|
|
1830
|
-
super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc =
|
|
1831
|
-
const i = this._get(), n =
|
|
1832
|
-
|
|
1789
|
+
super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = ce(...t);
|
|
1790
|
+
const i = this._get(), n = Xe(i);
|
|
1791
|
+
ht(this, n.create(i));
|
|
1833
1792
|
}
|
|
1834
1793
|
advance(e) {
|
|
1835
1794
|
const t = this._get(), i = this.get();
|
|
1836
|
-
z(t, i) || (
|
|
1795
|
+
z(t, i) || (q(this).setValue(t), this._onChange(t, this.idle)), !this.idle && Mt(this._active) && Be(this);
|
|
1837
1796
|
}
|
|
1838
1797
|
_get() {
|
|
1839
1798
|
const e = o.arr(this.source) ? this.source.map(k) : I(k(this.source));
|
|
1840
1799
|
return this.calc(...e);
|
|
1841
1800
|
}
|
|
1842
1801
|
_start() {
|
|
1843
|
-
this.idle && !
|
|
1802
|
+
this.idle && !Mt(this._active) && (this.idle = !1, S(qe(this), (e) => {
|
|
1844
1803
|
e.done = !1;
|
|
1845
|
-
}), O.skipAnimation ? (
|
|
1804
|
+
}), O.skipAnimation ? (y.batchedUpdates(() => this.advance()), Be(this)) : Ce.start(this));
|
|
1846
1805
|
}
|
|
1847
1806
|
// Observe our sources only when we're observed.
|
|
1848
1807
|
_attach() {
|
|
1849
1808
|
let e = 1;
|
|
1850
|
-
|
|
1851
|
-
T(t) && te(t, this),
|
|
1809
|
+
S(I(this.source), (t) => {
|
|
1810
|
+
T(t) && te(t, this), Je(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
|
|
1852
1811
|
}), this.priority = e, this._start();
|
|
1853
1812
|
}
|
|
1854
1813
|
// Stop observing our sources once we have no observers.
|
|
1855
1814
|
_detach() {
|
|
1856
|
-
|
|
1857
|
-
T(e) &&
|
|
1858
|
-
}), this._active.clear(),
|
|
1815
|
+
S(I(this.source), (e) => {
|
|
1816
|
+
T(e) && he(e, this);
|
|
1817
|
+
}), this._active.clear(), Be(this);
|
|
1859
1818
|
}
|
|
1860
1819
|
/** @internal */
|
|
1861
1820
|
eventObserved(e) {
|
|
1862
1821
|
e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = I(this.source).reduce(
|
|
1863
|
-
(t, i) => Math.max(t, (
|
|
1822
|
+
(t, i) => Math.max(t, (Je(i) ? i.priority : 0) + 1),
|
|
1864
1823
|
0
|
|
1865
1824
|
));
|
|
1866
1825
|
}
|
|
1867
1826
|
};
|
|
1868
|
-
function
|
|
1827
|
+
function Mn(e) {
|
|
1869
1828
|
return e.idle !== !1;
|
|
1870
1829
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return !e.size || Array.from(e).every(
|
|
1830
|
+
function Mt(e) {
|
|
1831
|
+
return !e.size || Array.from(e).every(Mn);
|
|
1873
1832
|
}
|
|
1874
|
-
function
|
|
1875
|
-
e.idle || (e.idle = !0,
|
|
1833
|
+
function Be(e) {
|
|
1834
|
+
e.idle || (e.idle = !0, S(qe(e), (t) => {
|
|
1876
1835
|
t.done = !0;
|
|
1877
|
-
}),
|
|
1836
|
+
}), fe(e, {
|
|
1878
1837
|
type: "idle",
|
|
1879
1838
|
parent: e
|
|
1880
1839
|
}));
|
|
1881
1840
|
}
|
|
1882
1841
|
O.assign({
|
|
1883
|
-
createStringInterpolator:
|
|
1884
|
-
to: (e, t) => new
|
|
1842
|
+
createStringInterpolator: si,
|
|
1843
|
+
to: (e, t) => new Qn(e, t)
|
|
1885
1844
|
});
|
|
1886
|
-
var
|
|
1887
|
-
function
|
|
1888
|
-
return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !
|
|
1845
|
+
var Ri = /^--/;
|
|
1846
|
+
function Ln(e, t) {
|
|
1847
|
+
return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !Ri.test(e) && !(le.hasOwnProperty(e) && le[e]) ? t + "px" : ("" + t).trim();
|
|
1889
1848
|
}
|
|
1890
|
-
var
|
|
1891
|
-
function
|
|
1849
|
+
var Lt = {};
|
|
1850
|
+
function Bn(e, t) {
|
|
1892
1851
|
if (!e.nodeType || !e.setAttribute)
|
|
1893
1852
|
return !1;
|
|
1894
|
-
const i = e.nodeName === "filter" || e.parentNode && e.parentNode.nodeName === "filter", {
|
|
1895
|
-
|
|
1853
|
+
const i = e.nodeName === "filter" || e.parentNode && e.parentNode.nodeName === "filter", {
|
|
1854
|
+
className: n,
|
|
1855
|
+
style: r,
|
|
1856
|
+
children: s,
|
|
1857
|
+
scrollTop: a,
|
|
1858
|
+
scrollLeft: u,
|
|
1859
|
+
viewBox: c,
|
|
1860
|
+
...l
|
|
1861
|
+
} = t, m = Object.values(l), d = Object.keys(l).map(
|
|
1862
|
+
(h) => i || e.hasAttribute(h) ? h : Lt[h] || (Lt[h] = h.replace(
|
|
1896
1863
|
/([A-Z])/g,
|
|
1897
1864
|
// Attributes are written in dash case
|
|
1898
|
-
(
|
|
1865
|
+
(p) => "-" + p.toLowerCase()
|
|
1899
1866
|
))
|
|
1900
1867
|
);
|
|
1901
|
-
|
|
1902
|
-
for (const
|
|
1903
|
-
if (
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1868
|
+
s !== void 0 && (e.textContent = s);
|
|
1869
|
+
for (const h in r)
|
|
1870
|
+
if (r.hasOwnProperty(h)) {
|
|
1871
|
+
const p = Ln(h, r[h]);
|
|
1872
|
+
Ri.test(h) ? e.style.setProperty(h, p) : e.style[h] = p;
|
|
1906
1873
|
}
|
|
1907
|
-
|
|
1908
|
-
e.setAttribute(
|
|
1909
|
-
}),
|
|
1874
|
+
d.forEach((h, p) => {
|
|
1875
|
+
e.setAttribute(h, m[p]);
|
|
1876
|
+
}), n !== void 0 && (e.className = n), a !== void 0 && (e.scrollTop = a), u !== void 0 && (e.scrollLeft = u), c !== void 0 && e.setAttribute("viewBox", c);
|
|
1910
1877
|
}
|
|
1911
|
-
var
|
|
1878
|
+
var le = {
|
|
1912
1879
|
animationIterationCount: !0,
|
|
1913
1880
|
borderImageOutset: !0,
|
|
1914
1881
|
borderImageSlice: !0,
|
|
@@ -1951,35 +1918,34 @@ var ce = {
|
|
|
1951
1918
|
strokeMiterlimit: !0,
|
|
1952
1919
|
strokeOpacity: !0,
|
|
1953
1920
|
strokeWidth: !0
|
|
1954
|
-
},
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1921
|
+
}, Gn = (e, t) => e + t.charAt(0).toUpperCase() + t.substring(1), Yn = ["Webkit", "Ms", "Moz", "O"];
|
|
1922
|
+
le = Object.keys(le).reduce((e, t) => (Yn.forEach((i) => e[Gn(i, t)] = e[t]), e), le);
|
|
1923
|
+
var Hn = /^(matrix|translate|scale|rotate|skew)/, Wn = /^(translate)/, Xn = /^(rotate|skew)/, Ge = (e, t) => o.num(e) && e !== 0 ? e + t : e, xe = (e, t) => o.arr(e) ? e.every((i) => xe(i, t)) : o.num(e) ? e === t : parseFloat(e) === t, Zn = class extends je {
|
|
1957
1924
|
constructor({ x: e, y: t, z: i, ...n }) {
|
|
1958
1925
|
const r = [], s = [];
|
|
1959
1926
|
(e || t || i) && (r.push([e || 0, t || 0, i || 0]), s.push((a) => [
|
|
1960
|
-
`translate3d(${a.map((u) =>
|
|
1927
|
+
`translate3d(${a.map((u) => Ge(u, "px")).join(",")})`,
|
|
1961
1928
|
// prettier-ignore
|
|
1962
|
-
|
|
1963
|
-
])),
|
|
1929
|
+
xe(a, 0)
|
|
1930
|
+
])), $(n, (a, u) => {
|
|
1964
1931
|
if (u === "transform")
|
|
1965
|
-
r.push([a || ""]), s.push((
|
|
1966
|
-
else if (
|
|
1967
|
-
if (delete n[u], o.und(a))
|
|
1968
|
-
|
|
1969
|
-
const d = Xn.test(u) ? "px" : Zn.test(u) ? "deg" : "";
|
|
1932
|
+
r.push([a || ""]), s.push((c) => [c, c === ""]);
|
|
1933
|
+
else if (Hn.test(u)) {
|
|
1934
|
+
if (delete n[u], o.und(a)) return;
|
|
1935
|
+
const c = Wn.test(u) ? "px" : Xn.test(u) ? "deg" : "";
|
|
1970
1936
|
r.push(I(a)), s.push(
|
|
1971
|
-
u === "rotate3d" ? ([
|
|
1972
|
-
`rotate3d(${
|
|
1973
|
-
|
|
1974
|
-
] : (
|
|
1975
|
-
`${u}(${
|
|
1976
|
-
|
|
1937
|
+
u === "rotate3d" ? ([l, m, d, h]) => [
|
|
1938
|
+
`rotate3d(${l},${m},${d},${Ge(h, c)})`,
|
|
1939
|
+
xe(h, 0)
|
|
1940
|
+
] : (l) => [
|
|
1941
|
+
`${u}(${l.map((m) => Ge(m, c)).join(",")})`,
|
|
1942
|
+
xe(l, u.startsWith("scale") ? 1 : 0)
|
|
1977
1943
|
]
|
|
1978
1944
|
);
|
|
1979
1945
|
}
|
|
1980
|
-
}), r.length && (n.transform = new
|
|
1946
|
+
}), r.length && (n.transform = new Kn(r, s)), super(n);
|
|
1981
1947
|
}
|
|
1982
|
-
},
|
|
1948
|
+
}, Kn = class extends ii {
|
|
1983
1949
|
constructor(e, t) {
|
|
1984
1950
|
super(), this.inputs = e, this.transforms = t, this._value = null;
|
|
1985
1951
|
}
|
|
@@ -1988,7 +1954,7 @@ var Wn = /^(matrix|translate|scale|rotate|skew)/, Xn = /^(translate)/, Zn = /^(r
|
|
|
1988
1954
|
}
|
|
1989
1955
|
_get() {
|
|
1990
1956
|
let e = "", t = !0;
|
|
1991
|
-
return
|
|
1957
|
+
return S(this.inputs, (i, n) => {
|
|
1992
1958
|
const r = k(i[0]), [s, a] = this.transforms[n](
|
|
1993
1959
|
o.arr(r) ? r : i.map(k)
|
|
1994
1960
|
);
|
|
@@ -1997,9 +1963,9 @@ var Wn = /^(matrix|translate|scale|rotate|skew)/, Xn = /^(translate)/, Zn = /^(r
|
|
|
1997
1963
|
}
|
|
1998
1964
|
// Start observing our inputs once we have an observer.
|
|
1999
1965
|
observerAdded(e) {
|
|
2000
|
-
e == 1 &&
|
|
1966
|
+
e == 1 && S(
|
|
2001
1967
|
this.inputs,
|
|
2002
|
-
(t) =>
|
|
1968
|
+
(t) => S(
|
|
2003
1969
|
t,
|
|
2004
1970
|
(i) => T(i) && te(i, this)
|
|
2005
1971
|
)
|
|
@@ -2007,18 +1973,18 @@ var Wn = /^(matrix|translate|scale|rotate|skew)/, Xn = /^(translate)/, Zn = /^(r
|
|
|
2007
1973
|
}
|
|
2008
1974
|
// Stop observing our inputs once we have no observers.
|
|
2009
1975
|
observerRemoved(e) {
|
|
2010
|
-
e == 0 &&
|
|
1976
|
+
e == 0 && S(
|
|
2011
1977
|
this.inputs,
|
|
2012
|
-
(t) =>
|
|
1978
|
+
(t) => S(
|
|
2013
1979
|
t,
|
|
2014
|
-
(i) => T(i) &&
|
|
1980
|
+
(i) => T(i) && he(i, this)
|
|
2015
1981
|
)
|
|
2016
1982
|
);
|
|
2017
1983
|
}
|
|
2018
1984
|
eventObserved(e) {
|
|
2019
|
-
e.type == "change" && (this._value = null),
|
|
1985
|
+
e.type == "change" && (this._value = null), fe(this, e);
|
|
2020
1986
|
}
|
|
2021
|
-
},
|
|
1987
|
+
}, Jn = [
|
|
2022
1988
|
"a",
|
|
2023
1989
|
"abbr",
|
|
2024
1990
|
"address",
|
|
@@ -2156,20 +2122,20 @@ var Wn = /^(matrix|translate|scale|rotate|skew)/, Xn = /^(translate)/, Zn = /^(r
|
|
|
2156
2122
|
];
|
|
2157
2123
|
O.assign({
|
|
2158
2124
|
batchedUpdates: Ei,
|
|
2159
|
-
createStringInterpolator:
|
|
2160
|
-
colors:
|
|
2125
|
+
createStringInterpolator: si,
|
|
2126
|
+
colors: Di
|
|
2161
2127
|
});
|
|
2162
|
-
|
|
2163
|
-
applyAnimatedValues:
|
|
2164
|
-
createAnimatedStyle: (e) => new
|
|
2128
|
+
_n(Jn, {
|
|
2129
|
+
applyAnimatedValues: Bn,
|
|
2130
|
+
createAnimatedStyle: (e) => new Zn(e),
|
|
2165
2131
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2166
2132
|
getComponentProps: ({ scrollTop: e, scrollLeft: t, ...i }) => i
|
|
2167
2133
|
});
|
|
2168
|
-
var
|
|
2169
|
-
return typeof window > "u" ? !0 : !window.matchMedia(
|
|
2170
|
-
},
|
|
2171
|
-
var e =
|
|
2172
|
-
return
|
|
2134
|
+
var er = "(prefers-reduced-motion: no-preference)", tr = function() {
|
|
2135
|
+
return typeof window > "u" ? !0 : !window.matchMedia(er).matches;
|
|
2136
|
+
}, ir = function() {
|
|
2137
|
+
var e = Re(tr), t = e[0], i = e[1];
|
|
2138
|
+
return H(function() {
|
|
2173
2139
|
var n = window.matchMedia("(prefers-reduced-motion: no-preference)"), r = function(s) {
|
|
2174
2140
|
i(!s.matches);
|
|
2175
2141
|
};
|
|
@@ -2177,45 +2143,45 @@ var tr = "(prefers-reduced-motion: no-preference)", ir = function() {
|
|
|
2177
2143
|
return n.removeEventListener("change", r);
|
|
2178
2144
|
};
|
|
2179
2145
|
}, []), t;
|
|
2180
|
-
},
|
|
2181
|
-
var t = e === void 0 ? {} : e, i = t.x, n = i === void 0 ? 0 : i, r = t.y, s = r === void 0 ? 0 : r, a = t.z, u = a === void 0 ? 0 : a,
|
|
2146
|
+
}, nr = function(e) {
|
|
2147
|
+
var t = e === void 0 ? {} : e, i = t.x, n = i === void 0 ? 0 : i, r = t.y, s = r === void 0 ? 0 : r, a = t.z, u = a === void 0 ? 0 : a, c = t.rotation, l = c === void 0 ? 0 : c, m = t.rx, d = m === void 0 ? 0 : m, h = t.ry, p = h === void 0 ? 0 : h, _ = t.rz, g = _ === void 0 ? l : _, b = t.scale, f = b === void 0 ? 1 : b, w = t.sx, v = w === void 0 ? f || 1 : w, A = t.sy, P = A === void 0 ? f || 1 : A, U = t.sz, x = U === void 0 ? f || 1 : U, B = t.skewX, R = B === void 0 ? 0 : B, N = t.skewY, F = N === void 0 ? 0 : N, j = t.timing, X = j === void 0 ? 150 : j, be = t.springConfig, ki = be === void 0 ? {
|
|
2182
2148
|
tension: 300,
|
|
2183
2149
|
friction: 10
|
|
2184
|
-
} :
|
|
2185
|
-
transform:
|
|
2186
|
-
rotateX(` +
|
|
2187
|
-
scale3D(` +
|
|
2150
|
+
} : be, vt = t.delay, yt = vt === void 0 ? 0 : vt, we = ir(), _t = Re(!1), ze = _t[0], bt = _t[1], wt = Re(!1), St = wt[0], At = wt[1], Ii = Dn(we ? {} : {
|
|
2151
|
+
transform: ze ? "translate3D(" + n + "px, " + s + "px, " + u + `px)
|
|
2152
|
+
rotateX(` + d + "deg) rotateY(" + p + "deg) rotateZ(" + g + `deg)
|
|
2153
|
+
scale3D(` + v + "," + P + "," + x + `)
|
|
2188
2154
|
skew(` + R + "deg, " + F + "deg)" : `translate3D(0px, 0px, 0px)
|
|
2189
2155
|
rotateX(0deg) rotateY(0deg) rotateZ(0deg)
|
|
2190
2156
|
scale3D(1, 1, 1)
|
|
2191
2157
|
skew(0deg, 0deg)`,
|
|
2192
|
-
config:
|
|
2193
|
-
immediate:
|
|
2194
|
-
}),
|
|
2195
|
-
|
|
2196
|
-
}, [
|
|
2197
|
-
return
|
|
2198
|
-
if (
|
|
2199
|
-
var
|
|
2200
|
-
|
|
2201
|
-
},
|
|
2158
|
+
config: ki,
|
|
2159
|
+
immediate: we
|
|
2160
|
+
}), Ti = Gt(function() {
|
|
2161
|
+
we || At(!0);
|
|
2162
|
+
}, [we]);
|
|
2163
|
+
return H(function() {
|
|
2164
|
+
if (St) {
|
|
2165
|
+
var Ne = window.setTimeout(function() {
|
|
2166
|
+
bt(!0), At(!1);
|
|
2167
|
+
}, yt);
|
|
2202
2168
|
return function() {
|
|
2203
|
-
return window.clearTimeout(
|
|
2169
|
+
return window.clearTimeout(Ne);
|
|
2204
2170
|
};
|
|
2205
2171
|
}
|
|
2206
|
-
}, [
|
|
2207
|
-
if (
|
|
2208
|
-
var
|
|
2209
|
-
return
|
|
2172
|
+
}, [St, yt]), H(function() {
|
|
2173
|
+
if (ze) {
|
|
2174
|
+
var Ne = window.setTimeout(function() {
|
|
2175
|
+
return bt(!1);
|
|
2210
2176
|
}, X);
|
|
2211
2177
|
return function() {
|
|
2212
|
-
return window.clearTimeout(
|
|
2178
|
+
return window.clearTimeout(Ne);
|
|
2213
2179
|
};
|
|
2214
2180
|
}
|
|
2215
|
-
}, [
|
|
2181
|
+
}, [ze, X]), [Ii, Ti];
|
|
2216
2182
|
};
|
|
2217
|
-
const
|
|
2218
|
-
const [{ transform: t }, i] =
|
|
2183
|
+
const ar = (e) => {
|
|
2184
|
+
const [{ transform: t }, i] = nr(e);
|
|
2219
2185
|
return [
|
|
2220
2186
|
{
|
|
2221
2187
|
"--transform": t || `translate3D(0px, 0px, 0px)
|
|
@@ -2228,6 +2194,6 @@ const or = (e) => {
|
|
|
2228
2194
|
];
|
|
2229
2195
|
};
|
|
2230
2196
|
export {
|
|
2231
|
-
|
|
2197
|
+
ar as useSafeBoop
|
|
2232
2198
|
};
|
|
2233
2199
|
//# sourceMappingURL=useSafeBoop.js.map
|