@helpwave/hightide 0.0.13 → 0.0.16
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/dist/coloring/shading.d.mts +5 -0
- package/dist/coloring/shading.d.ts +5 -2
- package/dist/coloring/shading.js +80 -38
- package/dist/coloring/shading.js.map +1 -0
- package/dist/coloring/shading.mjs +47 -0
- package/dist/coloring/shading.mjs.map +1 -0
- package/dist/coloring/types.d.mts +13 -0
- package/dist/coloring/types.d.ts +8 -6
- package/dist/coloring/types.js +31 -1
- package/dist/coloring/types.js.map +1 -0
- package/dist/coloring/types.mjs +6 -0
- package/dist/coloring/types.mjs.map +1 -0
- package/dist/components/Avatar.d.mts +17 -0
- package/dist/components/Avatar.d.ts +9 -6
- package/dist/components/Avatar.js +79 -29
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Avatar.mjs +48 -0
- package/dist/components/Avatar.mjs.map +1 -0
- package/dist/components/AvatarGroup.d.mts +14 -0
- package/dist/components/AvatarGroup.d.ts +7 -3
- package/dist/components/AvatarGroup.js +117 -12
- package/dist/components/AvatarGroup.js.map +1 -0
- package/dist/components/AvatarGroup.mjs +81 -0
- package/dist/components/AvatarGroup.mjs.map +1 -0
- package/dist/components/BreadCrumb.d.mts +19 -0
- package/dist/components/BreadCrumb.d.ts +6 -3
- package/dist/components/BreadCrumb.js +49 -11
- package/dist/components/BreadCrumb.js.map +1 -0
- package/dist/components/BreadCrumb.mjs +15 -0
- package/dist/components/BreadCrumb.mjs.map +1 -0
- package/dist/components/Button.d.mts +44 -0
- package/dist/components/Button.d.ts +16 -13
- package/dist/components/Button.js +232 -80
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Button.mjs +198 -0
- package/dist/components/Button.mjs.map +1 -0
- package/dist/components/ChipList.d.mts +24 -0
- package/dist/components/ChipList.d.ts +10 -7
- package/dist/components/ChipList.js +103 -36
- package/dist/components/ChipList.js.map +1 -0
- package/dist/components/ChipList.mjs +69 -0
- package/dist/components/ChipList.mjs.map +1 -0
- package/dist/components/Circle.d.mts +10 -0
- package/dist/components/Circle.d.ts +7 -3
- package/dist/components/Circle.js +61 -9
- package/dist/components/Circle.js.map +1 -0
- package/dist/components/Circle.mjs +27 -0
- package/dist/components/Circle.mjs.map +1 -0
- package/dist/components/ErrorComponent.d.mts +18 -0
- package/dist/components/ErrorComponent.d.ts +9 -4
- package/dist/components/ErrorComponent.js +86 -17
- package/dist/components/ErrorComponent.js.map +1 -0
- package/dist/components/ErrorComponent.mjs +53 -0
- package/dist/components/ErrorComponent.mjs.map +1 -0
- package/dist/components/Expandable.d.mts +33 -0
- package/dist/components/Expandable.d.ts +8 -5
- package/dist/components/Expandable.js +79 -15
- package/dist/components/Expandable.js.map +1 -0
- package/dist/components/Expandable.mjs +45 -0
- package/dist/components/Expandable.mjs.map +1 -0
- package/dist/components/HelpwaveBadge.d.mts +14 -0
- package/dist/components/HelpwaveBadge.d.ts +6 -3
- package/dist/components/HelpwaveBadge.js +125 -13
- package/dist/components/HelpwaveBadge.js.map +1 -0
- package/dist/components/HelpwaveBadge.mjs +91 -0
- package/dist/components/HelpwaveBadge.mjs.map +1 -0
- package/dist/components/HideableContentSection.d.mts +14 -0
- package/dist/components/HideableContentSection.d.ts +7 -3
- package/dist/components/HideableContentSection.js +69 -14
- package/dist/components/HideableContentSection.js.map +1 -0
- package/dist/components/HideableContentSection.mjs +35 -0
- package/dist/components/HideableContentSection.mjs.map +1 -0
- package/dist/components/InputGroup.d.mts +17 -0
- package/dist/components/InputGroup.d.ts +7 -3
- package/dist/components/InputGroup.js +96 -32
- package/dist/components/InputGroup.js.map +1 -0
- package/dist/components/InputGroup.mjs +62 -0
- package/dist/components/InputGroup.mjs.map +1 -0
- package/dist/components/LoadingAndErrorComponent.d.mts +24 -0
- package/dist/components/LoadingAndErrorComponent.d.ts +12 -5
- package/dist/components/LoadingAndErrorComponent.js +178 -23
- package/dist/components/LoadingAndErrorComponent.js.map +1 -0
- package/dist/components/LoadingAndErrorComponent.mjs +145 -0
- package/dist/components/LoadingAndErrorComponent.mjs.map +1 -0
- package/dist/components/LoadingAnimation.d.mts +18 -0
- package/dist/components/LoadingAnimation.d.ts +9 -4
- package/dist/components/LoadingAnimation.js +124 -16
- package/dist/components/LoadingAnimation.js.map +1 -0
- package/dist/components/LoadingAnimation.mjs +90 -0
- package/dist/components/LoadingAnimation.mjs.map +1 -0
- package/dist/components/LoadingButton.d.mts +10 -0
- package/dist/components/LoadingButton.d.ts +7 -3
- package/dist/components/LoadingButton.js +169 -9
- package/dist/components/LoadingButton.js.map +1 -0
- package/dist/components/LoadingButton.mjs +135 -0
- package/dist/components/LoadingButton.mjs.map +1 -0
- package/dist/components/MarkdownInterpreter.d.mts +28 -0
- package/dist/components/MarkdownInterpreter.d.ts +8 -5
- package/dist/components/MarkdownInterpreter.js +246 -175
- package/dist/components/MarkdownInterpreter.js.map +1 -0
- package/dist/components/MarkdownInterpreter.mjs +235 -0
- package/dist/components/MarkdownInterpreter.mjs.map +1 -0
- package/dist/components/Pagination.d.mts +19 -0
- package/dist/components/Pagination.d.ts +9 -4
- package/dist/components/Pagination.js +100 -23
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Pagination.mjs +67 -0
- package/dist/components/Pagination.mjs.map +1 -0
- package/dist/components/Profile.d.mts +31 -0
- package/dist/components/Profile.d.ts +8 -5
- package/dist/components/Profile.js +194 -42
- package/dist/components/Profile.js.map +1 -0
- package/dist/components/Profile.mjs +162 -0
- package/dist/components/Profile.mjs.map +1 -0
- package/dist/components/ProgressIndicator.d.mts +24 -0
- package/dist/components/ProgressIndicator.d.ts +6 -3
- package/dist/components/ProgressIndicator.js +82 -22
- package/dist/components/ProgressIndicator.js.map +1 -0
- package/dist/components/ProgressIndicator.mjs +59 -0
- package/dist/components/ProgressIndicator.mjs.map +1 -0
- package/dist/components/Ring.d.mts +35 -0
- package/dist/components/Ring.d.ts +13 -9
- package/dist/components/Ring.js +331 -107
- package/dist/components/Ring.js.map +1 -0
- package/dist/components/Ring.mjs +299 -0
- package/dist/components/Ring.mjs.map +1 -0
- package/dist/components/SearchableList.d.mts +22 -0
- package/dist/components/SearchableList.d.ts +9 -5
- package/dist/components/SearchableList.js +268 -24
- package/dist/components/SearchableList.js.map +1 -0
- package/dist/components/SearchableList.mjs +241 -0
- package/dist/components/SearchableList.mjs.map +1 -0
- package/dist/components/SortButton.d.mts +15 -0
- package/dist/components/SortButton.d.ts +9 -4
- package/dist/components/SortButton.js +131 -8
- package/dist/components/SortButton.js.map +1 -0
- package/dist/components/SortButton.mjs +97 -0
- package/dist/components/SortButton.mjs.map +1 -0
- package/dist/components/StepperBar.d.mts +28 -0
- package/dist/components/StepperBar.d.ts +10 -5
- package/dist/components/StepperBar.js +248 -44
- package/dist/components/StepperBar.js.map +1 -0
- package/dist/components/StepperBar.mjs +216 -0
- package/dist/components/StepperBar.mjs.map +1 -0
- package/dist/components/Table.d.mts +90 -0
- package/dist/components/Table.d.ts +20 -17
- package/dist/components/Table.js +396 -170
- package/dist/components/Table.js.map +1 -0
- package/dist/components/Table.mjs +370 -0
- package/dist/components/Table.mjs.map +1 -0
- package/dist/components/TechRadar.d.mts +39 -0
- package/dist/components/TechRadar.d.ts +5 -2
- package/dist/components/TechRadar.js +241 -189
- package/dist/components/TechRadar.js.map +1 -0
- package/dist/components/TechRadar.mjs +208 -0
- package/dist/components/TechRadar.mjs.map +1 -0
- package/dist/components/TextImage.d.mts +25 -0
- package/dist/components/TextImage.d.ts +9 -4
- package/dist/components/TextImage.js +121 -29
- package/dist/components/TextImage.js.map +1 -0
- package/dist/components/TextImage.mjs +86 -0
- package/dist/components/TextImage.mjs.map +1 -0
- package/dist/components/TimeDisplay.d.mts +35 -0
- package/dist/components/TimeDisplay.d.ts +8 -3
- package/dist/components/TimeDisplay.js +134 -81
- package/dist/components/TimeDisplay.js.map +1 -0
- package/dist/components/TimeDisplay.mjs +109 -0
- package/dist/components/TimeDisplay.mjs.map +1 -0
- package/dist/components/Tooltip.d.mts +37 -0
- package/dist/components/Tooltip.d.ts +7 -4
- package/dist/components/Tooltip.js +135 -37
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/Tooltip.mjs +109 -0
- package/dist/components/Tooltip.mjs.map +1 -0
- package/dist/components/VerticalDivider.d.mts +15 -0
- package/dist/components/VerticalDivider.d.ts +6 -2
- package/dist/components/VerticalDivider.js +80 -6
- package/dist/components/VerticalDivider.js.map +1 -0
- package/dist/components/VerticalDivider.mjs +56 -0
- package/dist/components/VerticalDivider.mjs.map +1 -0
- package/dist/components/date/DatePicker.d.mts +32 -0
- package/dist/components/date/DatePicker.d.ts +13 -7
- package/dist/components/date/DatePicker.js +624 -55
- package/dist/components/date/DatePicker.js.map +1 -0
- package/dist/components/date/DatePicker.mjs +591 -0
- package/dist/components/date/DatePicker.mjs.map +1 -0
- package/dist/components/date/DayPicker.d.mts +20 -0
- package/dist/components/date/DayPicker.d.ts +8 -4
- package/dist/components/date/DayPicker.js +232 -36
- package/dist/components/date/DayPicker.js.map +1 -0
- package/dist/components/date/DayPicker.mjs +195 -0
- package/dist/components/date/DayPicker.mjs.map +1 -0
- package/dist/components/date/TimePicker.d.mts +15 -0
- package/dist/components/date/TimePicker.d.ts +7 -4
- package/dist/components/date/TimePicker.js +196 -75
- package/dist/components/date/TimePicker.js.map +1 -0
- package/dist/components/date/TimePicker.mjs +164 -0
- package/dist/components/date/TimePicker.mjs.map +1 -0
- package/dist/components/date/YearMonthPicker.d.mts +15 -0
- package/dist/components/date/YearMonthPicker.d.ts +7 -3
- package/dist/components/date/YearMonthPicker.js +281 -57
- package/dist/components/date/YearMonthPicker.js.map +1 -0
- package/dist/components/date/YearMonthPicker.mjs +247 -0
- package/dist/components/date/YearMonthPicker.mjs.map +1 -0
- package/dist/components/icons/Helpwave.d.mts +14 -0
- package/dist/components/icons/Helpwave.d.ts +7 -3
- package/dist/components/icons/Helpwave.js +66 -18
- package/dist/components/icons/Helpwave.js.map +1 -0
- package/dist/components/icons/Helpwave.mjs +43 -0
- package/dist/components/icons/Helpwave.mjs.map +1 -0
- package/dist/components/icons/Tag.d.mts +14 -0
- package/dist/components/icons/Tag.d.ts +7 -3
- package/dist/components/icons/Tag.js +59 -11
- package/dist/components/icons/Tag.js.map +1 -0
- package/dist/components/icons/Tag.mjs +25 -0
- package/dist/components/icons/Tag.mjs.map +1 -0
- package/dist/components/layout/Carousel.d.mts +25 -0
- package/dist/components/layout/Carousel.d.ts +6 -3
- package/dist/components/layout/Carousel.js +477 -226
- package/dist/components/layout/Carousel.js.map +1 -0
- package/dist/components/layout/Carousel.mjs +449 -0
- package/dist/components/layout/Carousel.mjs.map +1 -0
- package/dist/components/layout/DividerInserter.d.mts +15 -0
- package/dist/components/layout/DividerInserter.d.ts +7 -3
- package/dist/components/layout/DividerInserter.js +58 -18
- package/dist/components/layout/DividerInserter.js.map +1 -0
- package/dist/components/layout/DividerInserter.mjs +25 -0
- package/dist/components/layout/DividerInserter.mjs.map +1 -0
- package/dist/components/layout/FAQSection.d.mts +26 -0
- package/dist/components/layout/FAQSection.d.ts +9 -6
- package/dist/components/layout/FAQSection.js +336 -13
- package/dist/components/layout/FAQSection.js.map +1 -0
- package/dist/components/layout/FAQSection.mjs +302 -0
- package/dist/components/layout/FAQSection.mjs.map +1 -0
- package/dist/components/layout/Tile.d.mts +37 -0
- package/dist/components/layout/Tile.d.ts +9 -6
- package/dist/components/layout/Tile.js +76 -16
- package/dist/components/layout/Tile.js.map +1 -0
- package/dist/components/layout/Tile.mjs +42 -0
- package/dist/components/layout/Tile.mjs.map +1 -0
- package/dist/components/modals/ConfirmDialog.d.mts +38 -0
- package/dist/components/modals/ConfirmDialog.d.ts +13 -9
- package/dist/components/modals/ConfirmDialog.js +422 -28
- package/dist/components/modals/ConfirmDialog.js.map +1 -0
- package/dist/components/modals/ConfirmDialog.mjs +388 -0
- package/dist/components/modals/ConfirmDialog.mjs.map +1 -0
- package/dist/components/modals/DiscardChangesDialog.d.mts +23 -0
- package/dist/components/modals/DiscardChangesDialog.d.ts +9 -5
- package/dist/components/modals/DiscardChangesDialog.js +406 -23
- package/dist/components/modals/DiscardChangesDialog.js.map +1 -0
- package/dist/components/modals/DiscardChangesDialog.mjs +370 -0
- package/dist/components/modals/DiscardChangesDialog.mjs.map +1 -0
- package/dist/components/modals/InputModal.d.mts +19 -0
- package/dist/components/modals/InputModal.d.ts +14 -4
- package/dist/components/modals/InputModal.js +598 -8
- package/dist/components/modals/InputModal.js.map +1 -0
- package/dist/components/modals/InputModal.mjs +567 -0
- package/dist/components/modals/InputModal.mjs.map +1 -0
- package/dist/components/modals/LanguageModal.d.mts +21 -0
- package/dist/components/modals/LanguageModal.d.ts +9 -5
- package/dist/components/modals/LanguageModal.js +524 -33
- package/dist/components/modals/LanguageModal.js.map +1 -0
- package/dist/components/modals/LanguageModal.mjs +489 -0
- package/dist/components/modals/LanguageModal.mjs.map +1 -0
- package/dist/components/modals/Modal.d.mts +43 -0
- package/dist/components/modals/Modal.d.ts +13 -8
- package/dist/components/modals/Modal.js +280 -51
- package/dist/components/modals/Modal.js.map +1 -0
- package/dist/components/modals/Modal.mjs +249 -0
- package/dist/components/modals/Modal.mjs.map +1 -0
- package/dist/components/modals/ModalRegister.d.mts +16 -0
- package/dist/components/modals/ModalRegister.d.ts +9 -4
- package/dist/components/modals/ModalRegister.js +61 -26
- package/dist/components/modals/ModalRegister.js.map +1 -0
- package/dist/components/modals/ModalRegister.mjs +37 -0
- package/dist/components/modals/ModalRegister.mjs.map +1 -0
- package/dist/components/properties/CheckboxProperty.d.mts +20 -0
- package/dist/components/properties/CheckboxProperty.d.ts +10 -5
- package/dist/components/properties/CheckboxProperty.js +323 -24
- package/dist/components/properties/CheckboxProperty.js.map +1 -0
- package/dist/components/properties/CheckboxProperty.mjs +291 -0
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -0
- package/dist/components/properties/DateProperty.d.mts +18 -0
- package/dist/components/properties/DateProperty.d.ts +10 -3
- package/dist/components/properties/DateProperty.js +422 -21
- package/dist/components/properties/DateProperty.js.map +1 -0
- package/dist/components/properties/DateProperty.mjs +393 -0
- package/dist/components/properties/DateProperty.mjs.map +1 -0
- package/dist/components/properties/MultiSelectProperty.d.mts +18 -0
- package/dist/components/properties/MultiSelectProperty.d.ts +12 -6
- package/dist/components/properties/MultiSelectProperty.js +815 -31
- package/dist/components/properties/MultiSelectProperty.js.map +1 -0
- package/dist/components/properties/MultiSelectProperty.mjs +787 -0
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -0
- package/dist/components/properties/NumberProperty.d.mts +21 -0
- package/dist/components/properties/NumberProperty.d.ts +10 -5
- package/dist/components/properties/NumberProperty.js +429 -39
- package/dist/components/properties/NumberProperty.js.map +1 -0
- package/dist/components/properties/NumberProperty.mjs +402 -0
- package/dist/components/properties/NumberProperty.mjs.map +1 -0
- package/dist/components/properties/PropertyBase.d.mts +27 -0
- package/dist/components/properties/PropertyBase.d.ts +9 -5
- package/dist/components/properties/PropertyBase.js +194 -24
- package/dist/components/properties/PropertyBase.js.map +1 -0
- package/dist/components/properties/PropertyBase.mjs +162 -0
- package/dist/components/properties/PropertyBase.mjs.map +1 -0
- package/dist/components/properties/SelectProperty.d.mts +19 -0
- package/dist/components/properties/SelectProperty.d.ts +13 -6
- package/dist/components/properties/SelectProperty.js +547 -19
- package/dist/components/properties/SelectProperty.js.map +1 -0
- package/dist/components/properties/SelectProperty.mjs +520 -0
- package/dist/components/properties/SelectProperty.mjs.map +1 -0
- package/dist/components/properties/TextProperty.d.mts +20 -0
- package/dist/components/properties/TextProperty.d.ts +10 -5
- package/dist/components/properties/TextProperty.js +378 -34
- package/dist/components/properties/TextProperty.js.map +1 -0
- package/dist/components/properties/TextProperty.mjs +346 -0
- package/dist/components/properties/TextProperty.mjs.map +1 -0
- package/dist/components/user-input/Checkbox.d.mts +41 -0
- package/dist/components/user-input/Checkbox.d.ts +9 -5
- package/dist/components/user-input/Checkbox.js +148 -63
- package/dist/components/user-input/Checkbox.js.map +1 -0
- package/dist/components/user-input/Checkbox.mjs +112 -0
- package/dist/components/user-input/Checkbox.mjs.map +1 -0
- package/dist/components/user-input/DateAndTimePicker.d.mts +47 -0
- package/dist/components/user-input/DateAndTimePicker.d.ts +15 -7
- package/dist/components/user-input/DateAndTimePicker.js +831 -60
- package/dist/components/user-input/DateAndTimePicker.js.map +1 -0
- package/dist/components/user-input/DateAndTimePicker.mjs +801 -0
- package/dist/components/user-input/DateAndTimePicker.mjs.map +1 -0
- package/dist/components/user-input/Input.d.mts +64 -0
- package/dist/components/user-input/Input.d.ts +12 -9
- package/dist/components/user-input/Input.js +219 -57
- package/dist/components/user-input/Input.js.map +1 -0
- package/dist/components/user-input/Input.mjs +191 -0
- package/dist/components/user-input/Input.mjs.map +1 -0
- package/dist/components/user-input/Label.d.mts +16 -0
- package/dist/components/user-input/Label.d.ts +8 -4
- package/dist/components/user-input/Label.js +43 -11
- package/dist/components/user-input/Label.js.map +1 -0
- package/dist/components/user-input/Label.mjs +19 -0
- package/dist/components/user-input/Label.mjs.map +1 -0
- package/dist/components/user-input/Menu.d.mts +24 -0
- package/dist/components/user-input/Menu.d.ts +8 -5
- package/dist/components/user-input/Menu.js +162 -25
- package/dist/components/user-input/Menu.js.map +1 -0
- package/dist/components/user-input/Menu.mjs +127 -0
- package/dist/components/user-input/Menu.mjs.map +1 -0
- package/dist/components/user-input/MultiSelect.d.mts +43 -0
- package/dist/components/user-input/MultiSelect.d.ts +12 -8
- package/dist/components/user-input/MultiSelect.js +545 -56
- package/dist/components/user-input/MultiSelect.js.map +1 -0
- package/dist/components/user-input/MultiSelect.mjs +516 -0
- package/dist/components/user-input/MultiSelect.mjs.map +1 -0
- package/dist/components/user-input/ScrollPicker.d.mts +15 -0
- package/dist/components/user-input/ScrollPicker.d.ts +6 -2
- package/dist/components/user-input/ScrollPicker.js +276 -145
- package/dist/components/user-input/ScrollPicker.js.map +1 -0
- package/dist/components/user-input/ScrollPicker.mjs +247 -0
- package/dist/components/user-input/ScrollPicker.mjs.map +1 -0
- package/dist/components/user-input/SearchableSelect.d.mts +14 -0
- package/dist/components/user-input/SearchableSelect.d.ts +9 -3
- package/dist/components/user-input/SearchableSelect.js +334 -13
- package/dist/components/user-input/SearchableSelect.js.map +1 -0
- package/dist/components/user-input/SearchableSelect.mjs +305 -0
- package/dist/components/user-input/SearchableSelect.mjs.map +1 -0
- package/dist/components/user-input/Select.d.mts +36 -0
- package/dist/components/user-input/Select.d.ts +9 -5
- package/dist/components/user-input/Select.js +152 -47
- package/dist/components/user-input/Select.js.map +1 -0
- package/dist/components/user-input/Select.mjs +118 -0
- package/dist/components/user-input/Select.mjs.map +1 -0
- package/dist/components/user-input/Textarea.d.mts +24 -0
- package/dist/components/user-input/Textarea.d.ts +8 -4
- package/dist/components/user-input/Textarea.js +153 -31
- package/dist/components/user-input/Textarea.js.map +1 -0
- package/dist/components/user-input/Textarea.mjs +120 -0
- package/dist/components/user-input/Textarea.mjs.map +1 -0
- package/dist/components/user-input/ToggleableInput.d.mts +35 -0
- package/dist/components/user-input/ToggleableInput.d.ts +6 -3
- package/dist/components/user-input/ToggleableInput.js +161 -38
- package/dist/components/user-input/ToggleableInput.js.map +1 -0
- package/dist/components/user-input/ToggleableInput.mjs +128 -0
- package/dist/components/user-input/ToggleableInput.mjs.map +1 -0
- package/dist/hooks/useHoverState.d.mts +42 -0
- package/dist/hooks/useHoverState.d.ts +5 -3
- package/dist/hooks/useHoverState.js +69 -43
- package/dist/hooks/useHoverState.js.map +1 -0
- package/dist/hooks/useHoverState.mjs +47 -0
- package/dist/hooks/useHoverState.mjs.map +1 -0
- package/dist/hooks/useLanguage.d.mts +21 -0
- package/dist/hooks/useLanguage.d.ts +15 -11
- package/dist/hooks/useLanguage.js +145 -50
- package/dist/hooks/useLanguage.js.map +1 -0
- package/dist/hooks/useLanguage.mjs +115 -0
- package/dist/hooks/useLanguage.mjs.map +1 -0
- package/dist/hooks/useLocalStorage.d.mts +6 -0
- package/dist/hooks/useLocalStorage.d.ts +4 -2
- package/dist/hooks/useLocalStorage.js +79 -23
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useLocalStorage.mjs +59 -0
- package/dist/hooks/useLocalStorage.mjs.map +1 -0
- package/dist/hooks/useOutsideClick.d.mts +5 -0
- package/dist/hooks/useOutsideClick.d.ts +5 -2
- package/dist/hooks/useOutsideClick.js +47 -21
- package/dist/hooks/useOutsideClick.js.map +1 -0
- package/dist/hooks/useOutsideClick.mjs +23 -0
- package/dist/hooks/useOutsideClick.mjs.map +1 -0
- package/dist/hooks/useSaveDelay.d.mts +6 -0
- package/dist/hooks/useSaveDelay.d.ts +2 -1
- package/dist/hooks/useSaveDelay.js +62 -38
- package/dist/hooks/useSaveDelay.js.map +1 -0
- package/dist/hooks/useSaveDelay.mjs +44 -0
- package/dist/hooks/useSaveDelay.mjs.map +1 -0
- package/dist/hooks/useTheme.d.mts +21 -0
- package/dist/hooks/useTheme.d.ts +14 -9
- package/dist/hooks/useTheme.js +65 -29
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/hooks/useTheme.mjs +40 -0
- package/dist/hooks/useTheme.mjs.map +1 -0
- package/dist/hooks/useTranslation.d.mts +28 -0
- package/dist/hooks/useTranslation.d.ts +9 -5
- package/dist/hooks/useTranslation.js +53 -10
- package/dist/hooks/useTranslation.js.map +1 -0
- package/dist/hooks/useTranslation.mjs +27 -0
- package/dist/hooks/useTranslation.mjs.map +1 -0
- package/dist/index.d.mts +86 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +5716 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5542 -0
- package/dist/index.mjs.map +1 -0
- package/dist/util/array.d.mts +25 -0
- package/dist/util/array.d.ts +9 -7
- package/dist/util/array.js +119 -92
- package/dist/util/array.js.map +1 -0
- package/dist/util/array.mjs +99 -0
- package/dist/util/array.mjs.map +1 -0
- package/dist/util/builder.d.mts +8 -0
- package/dist/util/builder.d.ts +3 -1
- package/dist/util/builder.js +33 -8
- package/dist/util/builder.js.map +1 -0
- package/dist/util/builder.mjs +9 -0
- package/dist/util/builder.mjs.map +1 -0
- package/dist/util/date.d.mts +30 -0
- package/dist/util/date.d.ts +17 -15
- package/dist/util/date.js +184 -123
- package/dist/util/date.js.map +1 -0
- package/dist/util/date.mjs +156 -0
- package/dist/util/date.mjs.map +1 -0
- package/dist/util/easeFunctions.d.mts +11 -0
- package/dist/util/easeFunctions.d.ts +4 -2
- package/dist/util/easeFunctions.js +63 -30
- package/dist/util/easeFunctions.js.map +1 -0
- package/dist/util/easeFunctions.mjs +36 -0
- package/dist/util/easeFunctions.mjs.map +1 -0
- package/dist/util/emailValidation.d.mts +3 -0
- package/dist/util/emailValidation.d.ts +3 -1
- package/dist/util/emailValidation.js +32 -2
- package/dist/util/emailValidation.js.map +1 -0
- package/dist/util/emailValidation.mjs +8 -0
- package/dist/util/emailValidation.mjs.map +1 -0
- package/dist/util/loopingArray.d.mts +25 -0
- package/dist/util/loopingArray.d.ts +4 -2
- package/dist/util/loopingArray.js +89 -59
- package/dist/util/loopingArray.js.map +1 -0
- package/dist/util/loopingArray.mjs +72 -0
- package/dist/util/loopingArray.mjs.map +1 -0
- package/dist/util/math.d.mts +3 -0
- package/dist/util/math.d.ts +3 -1
- package/dist/util/math.js +32 -2
- package/dist/util/math.js.map +1 -0
- package/dist/util/math.mjs +8 -0
- package/dist/util/math.mjs.map +1 -0
- package/dist/util/news.d.mts +103 -0
- package/dist/util/news.d.ts +12 -7
- package/dist/util/news.js +73 -24
- package/dist/util/news.js.map +1 -0
- package/dist/util/news.mjs +48 -0
- package/dist/util/news.mjs.map +1 -0
- package/dist/util/noop.d.mts +3 -0
- package/dist/util/noop.d.ts +3 -1
- package/dist/util/noop.js +31 -1
- package/dist/util/noop.js.map +1 -0
- package/dist/util/noop.mjs +6 -0
- package/dist/util/noop.mjs.map +1 -0
- package/dist/util/simpleSearch.d.mts +50 -0
- package/dist/util/simpleSearch.d.ts +6 -4
- package/dist/util/simpleSearch.js +50 -58
- package/dist/util/simpleSearch.js.map +1 -0
- package/dist/util/simpleSearch.mjs +26 -0
- package/dist/util/simpleSearch.mjs.map +1 -0
- package/dist/util/storage.d.mts +16 -0
- package/dist/util/storage.d.ts +4 -3
- package/dist/util/storage.js +63 -31
- package/dist/util/storage.js.map +1 -0
- package/dist/util/storage.mjs +38 -0
- package/dist/util/storage.mjs.map +1 -0
- package/dist/util/types.d.mts +3 -0
- package/dist/util/types.d.ts +3 -1
- package/dist/util/types.js +19 -1
- package/dist/util/types.js.map +1 -0
- package/dist/util/types.mjs +1 -0
- package/dist/util/types.mjs.map +1 -0
- package/package.json +20 -9
- package/dist/components/Span.d.ts +0 -0
- package/dist/components/Span.js +0 -1
- package/dist/components/examples/InputGroupExample.d.ts +0 -6
- package/dist/components/examples/InputGroupExample.js +0 -21
- package/dist/components/examples/MultiSelectExample.d.ts +0 -7
- package/dist/components/examples/MultiSelectExample.js +0 -27
- package/dist/components/examples/SearchableSelectExample.d.ts +0 -6
- package/dist/components/examples/SearchableSelectExample.js +0 -17
- package/dist/components/examples/SelectExample.d.ts +0 -4
- package/dist/components/examples/SelectExample.js +0 -15
- package/dist/components/examples/StackingModals.d.ts +0 -4
- package/dist/components/examples/StackingModals.js +0 -15
- package/dist/components/examples/TableExample.d.ts +0 -9
- package/dist/components/examples/TableExample.js +0 -92
- package/dist/components/examples/TextareaExample.d.ts +0 -6
- package/dist/components/examples/TextareaExample.js +0 -10
- package/dist/components/examples/TileExample.d.ts +0 -9
- package/dist/components/examples/TileExample.js +0 -9
- package/dist/components/examples/Title.d.ts +0 -0
- package/dist/components/examples/Title.js +0 -1
- package/dist/components/examples/date/DateTimePickerExample.d.ts +0 -10
- package/dist/components/examples/date/DateTimePickerExample.js +0 -21
- package/dist/components/examples/properties/CheckboxPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/CheckboxPropertyExample.js +0 -13
- package/dist/components/examples/properties/DatePropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/DatePropertyExample.js +0 -23
- package/dist/components/examples/properties/MultiSelectPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/MultiSelectPropertyExample.js +0 -16
- package/dist/components/examples/properties/NumberPropertyExample.d.ts +0 -6
- package/dist/components/examples/properties/NumberPropertyExample.js +0 -13
- package/dist/components/examples/properties/SelectPropertyExample.d.ts +0 -6
- package/dist/components/examples/properties/SelectPropertyExample.js +0 -18
- package/dist/components/examples/properties/TextPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/TextPropertyExample.js +0 -13
|
@@ -1,30 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/util/easeFunctions.ts
|
|
21
|
+
var easeFunctions_exports = {};
|
|
22
|
+
__export(easeFunctions_exports, {
|
|
23
|
+
EaseFunctions: () => EaseFunctions
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(easeFunctions_exports);
|
|
26
|
+
|
|
27
|
+
// src/util/math.ts
|
|
28
|
+
var clamp = (value, min = 0, max = 1) => {
|
|
29
|
+
return Math.min(Math.max(value, min), max);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// src/util/easeFunctions.ts
|
|
33
|
+
var EaseFunctions = class _EaseFunctions {
|
|
34
|
+
static cubicBezierGeneric(x1, y1, x2, y2) {
|
|
35
|
+
const cx = 3 * x1;
|
|
36
|
+
const bx = 3 * (x2 - x1) - cx;
|
|
37
|
+
const ax = 1 - cx - bx;
|
|
38
|
+
const cy = 3 * y1;
|
|
39
|
+
const by = 3 * (y2 - y1) - cy;
|
|
40
|
+
const ay = 1 - cy - by;
|
|
41
|
+
const x = (t) => ((ax * t + bx) * t + cx) * t;
|
|
42
|
+
const y = (t) => ((ay * t + by) * t + cy) * t;
|
|
43
|
+
return {
|
|
44
|
+
x,
|
|
45
|
+
y
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static cubicBezier(x1, y1, x2, y2) {
|
|
49
|
+
const { y } = _EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2);
|
|
50
|
+
return (t) => {
|
|
51
|
+
t = clamp(t);
|
|
52
|
+
return y(t);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static easeInEaseOut(t) {
|
|
56
|
+
return _EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
EaseFunctions
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=easeFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/easeFunctions.ts","../../src/util/math.ts"],"sourcesContent":["import { clamp } from './math'\n\nexport type EaseFunction = (t: number) => number\n\nexport class EaseFunctions {\n static cubicBezierGeneric(x1: number, y1: number, x2: number, y2: number): { x: EaseFunction, y: EaseFunction } {\n // Calculate the x and y coordinates using the cubic Bézier formula\n const cx = 3 * x1\n const bx = 3 * (x2 - x1) - cx\n const ax = 1 - cx - bx\n\n const cy = 3 * y1\n const by = 3 * (y2 - y1) - cy\n const ay = 1 - cy - by\n\n // Compute x and y values at parameter t\n const x = (t: number) => ((ax * t + bx) * t + cx) * t\n const y = (t: number) => ((ay * t + by) * t + cy) * t\n\n return {\n x,\n y\n }\n }\n\n static cubicBezier(x1: number, y1: number, x2: number, y2: number): EaseFunction {\n const { y } = EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2)\n return (t: number) => {\n t = clamp(t)\n return y(t) // <= equal to x(t) * 0 + y(t) * 1\n }\n }\n\n static easeInEaseOut(t: number): number {\n return EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t)\n };\n}\n","export const clamp = (value: number, min: number = 0, max: number = 1): number => {\n return Math.min(Math.max(value, min), max)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,QAAQ,CAAC,OAAe,MAAc,GAAG,MAAc,MAAc;AAChF,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;;;ADEO,IAAM,gBAAN,MAAM,eAAc;AAAA,EACzB,OAAO,mBAAmB,IAAY,IAAY,IAAY,IAAkD;AAE9G,UAAM,KAAK,IAAI;AACf,UAAM,KAAK,KAAK,KAAK,MAAM;AAC3B,UAAM,KAAK,IAAI,KAAK;AAEpB,UAAM,KAAK,IAAI;AACf,UAAM,KAAK,KAAK,KAAK,MAAM;AAC3B,UAAM,KAAK,IAAI,KAAK;AAGpB,UAAM,IAAI,CAAC,QAAgB,KAAK,IAAI,MAAM,IAAI,MAAM;AACpD,UAAM,IAAI,CAAC,QAAgB,KAAK,IAAI,MAAM,IAAI,MAAM;AAEpD,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAO,YAAY,IAAY,IAAY,IAAY,IAA0B;AAC/E,UAAM,EAAE,EAAE,IAAI,eAAc,mBAAmB,IAAI,IAAI,IAAI,EAAE;AAC7D,WAAO,CAAC,MAAc;AACpB,UAAI,MAAM,CAAC;AACX,aAAO,EAAE,CAAC;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,OAAO,cAAc,GAAmB;AACtC,WAAO,eAAc,YAAY,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAAA,EACtD;AACF;","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/util/math.ts
|
|
2
|
+
var clamp = (value, min = 0, max = 1) => {
|
|
3
|
+
return Math.min(Math.max(value, min), max);
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/util/easeFunctions.ts
|
|
7
|
+
var EaseFunctions = class _EaseFunctions {
|
|
8
|
+
static cubicBezierGeneric(x1, y1, x2, y2) {
|
|
9
|
+
const cx = 3 * x1;
|
|
10
|
+
const bx = 3 * (x2 - x1) - cx;
|
|
11
|
+
const ax = 1 - cx - bx;
|
|
12
|
+
const cy = 3 * y1;
|
|
13
|
+
const by = 3 * (y2 - y1) - cy;
|
|
14
|
+
const ay = 1 - cy - by;
|
|
15
|
+
const x = (t) => ((ax * t + bx) * t + cx) * t;
|
|
16
|
+
const y = (t) => ((ay * t + by) * t + cy) * t;
|
|
17
|
+
return {
|
|
18
|
+
x,
|
|
19
|
+
y
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static cubicBezier(x1, y1, x2, y2) {
|
|
23
|
+
const { y } = _EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2);
|
|
24
|
+
return (t) => {
|
|
25
|
+
t = clamp(t);
|
|
26
|
+
return y(t);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static easeInEaseOut(t) {
|
|
30
|
+
return _EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
EaseFunctions
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=easeFunctions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/math.ts","../../src/util/easeFunctions.ts"],"sourcesContent":["export const clamp = (value: number, min: number = 0, max: number = 1): number => {\n return Math.min(Math.max(value, min), max)\n}\n","import { clamp } from './math'\n\nexport type EaseFunction = (t: number) => number\n\nexport class EaseFunctions {\n static cubicBezierGeneric(x1: number, y1: number, x2: number, y2: number): { x: EaseFunction, y: EaseFunction } {\n // Calculate the x and y coordinates using the cubic Bézier formula\n const cx = 3 * x1\n const bx = 3 * (x2 - x1) - cx\n const ax = 1 - cx - bx\n\n const cy = 3 * y1\n const by = 3 * (y2 - y1) - cy\n const ay = 1 - cy - by\n\n // Compute x and y values at parameter t\n const x = (t: number) => ((ax * t + bx) * t + cx) * t\n const y = (t: number) => ((ay * t + by) * t + cy) * t\n\n return {\n x,\n y\n }\n }\n\n static cubicBezier(x1: number, y1: number, x2: number, y2: number): EaseFunction {\n const { y } = EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2)\n return (t: number) => {\n t = clamp(t)\n return y(t) // <= equal to x(t) * 0 + y(t) * 1\n }\n }\n\n static easeInEaseOut(t: number): number {\n return EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t)\n };\n}\n"],"mappings":";AAAO,IAAM,QAAQ,CAAC,OAAe,MAAc,GAAG,MAAc,MAAc;AAChF,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;;;ACEO,IAAM,gBAAN,MAAM,eAAc;AAAA,EACzB,OAAO,mBAAmB,IAAY,IAAY,IAAY,IAAkD;AAE9G,UAAM,KAAK,IAAI;AACf,UAAM,KAAK,KAAK,KAAK,MAAM;AAC3B,UAAM,KAAK,IAAI,KAAK;AAEpB,UAAM,KAAK,IAAI;AACf,UAAM,KAAK,KAAK,KAAK,MAAM;AAC3B,UAAM,KAAK,IAAI,KAAK;AAGpB,UAAM,IAAI,CAAC,QAAgB,KAAK,IAAI,MAAM,IAAI,MAAM;AACpD,UAAM,IAAI,CAAC,QAAgB,KAAK,IAAI,MAAM,IAAI,MAAM;AAEpD,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAO,YAAY,IAAY,IAAY,IAAY,IAA0B;AAC/E,UAAM,EAAE,EAAE,IAAI,eAAc,mBAAmB,IAAI,IAAI,IAAI,EAAE;AAC7D,WAAO,CAAC,MAAc;AACpB,UAAI,MAAM,CAAC;AACX,aAAO,EAAE,CAAC;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,OAAO,cAAc,GAAmB;AACtC,WAAO,eAAc,YAAY,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAAA,EACtD;AACF;","names":[]}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
3
9
|
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/util/emailValidation.ts
|
|
21
|
+
var emailValidation_exports = {};
|
|
22
|
+
__export(emailValidation_exports, {
|
|
23
|
+
validateEmail: () => validateEmail
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(emailValidation_exports);
|
|
26
|
+
var validateEmail = (email) => {
|
|
27
|
+
return /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(email);
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
validateEmail
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=emailValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/emailValidation.ts"],"sourcesContent":["export const validateEmail = (email: string): boolean => {\n return /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i.test(email)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,gBAAgB,CAAC,UAA2B;AACvD,SAAO,2CAA2C,KAAK,KAAK;AAC9D;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/emailValidation.ts"],"sourcesContent":["export const validateEmail = (email: string): boolean => {\n return /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i.test(email)\n}\n"],"mappings":";AAAO,IAAM,gBAAgB,CAAC,UAA2B;AACvD,SAAO,2CAA2C,KAAK,KAAK;AAC9D;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 1 is forwards
|
|
3
|
+
*
|
|
4
|
+
* -1 is backwards
|
|
5
|
+
*/
|
|
6
|
+
type Direction = 1 | -1;
|
|
7
|
+
declare class LoopingArrayCalculator {
|
|
8
|
+
length: number;
|
|
9
|
+
isLooping: boolean;
|
|
10
|
+
allowedOverScroll: number;
|
|
11
|
+
constructor(length: number, isLooping?: boolean, allowedOverScroll?: number);
|
|
12
|
+
getCorrectedPosition(position: number): number;
|
|
13
|
+
static withoutOffset(position: number): number;
|
|
14
|
+
static getOffset(position: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)
|
|
17
|
+
*/
|
|
18
|
+
getDistanceDirectional(position: number, target: number, direction: Direction): number;
|
|
19
|
+
getDistanceForward(position: number, target: number): number;
|
|
20
|
+
getDistanceBackward(position: number, target: number): number;
|
|
21
|
+
getDistance(position: number, target: number): number;
|
|
22
|
+
getBestDirection(position: number, target: number): Direction;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { type Direction, LoopingArrayCalculator };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* -1 is backwards
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type Direction = 1 | -1;
|
|
7
|
+
declare class LoopingArrayCalculator {
|
|
8
8
|
length: number;
|
|
9
9
|
isLooping: boolean;
|
|
10
10
|
allowedOverScroll: number;
|
|
@@ -21,3 +21,5 @@ export declare class LoopingArrayCalculator {
|
|
|
21
21
|
getDistance(position: number, target: number): number;
|
|
22
22
|
getBestDirection(position: number, target: number): Direction;
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
export { type Direction, LoopingArrayCalculator };
|
|
@@ -1,67 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/util/loopingArray.ts
|
|
21
|
+
var loopingArray_exports = {};
|
|
22
|
+
__export(loopingArray_exports, {
|
|
23
|
+
LoopingArrayCalculator: () => LoopingArrayCalculator
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(loopingArray_exports);
|
|
26
|
+
var LoopingArrayCalculator = class _LoopingArrayCalculator {
|
|
27
|
+
constructor(length, isLooping = true, allowedOverScroll = 0.1) {
|
|
28
|
+
if (allowedOverScroll < 0 || length < 1) {
|
|
29
|
+
throw new Error("Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true");
|
|
9
30
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (position < 0) {
|
|
18
|
-
return this.length - (Math.abs(position) % this.length);
|
|
19
|
-
}
|
|
20
|
-
return position;
|
|
31
|
+
this.length = length;
|
|
32
|
+
this.isLooping = isLooping;
|
|
33
|
+
this.allowedOverScroll = allowedOverScroll;
|
|
34
|
+
}
|
|
35
|
+
getCorrectedPosition(position) {
|
|
36
|
+
if (!this.isLooping) {
|
|
37
|
+
return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position));
|
|
21
38
|
}
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
if (position >= this.length) {
|
|
40
|
+
return position % this.length;
|
|
24
41
|
}
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
if (position < 0) {
|
|
43
|
+
return this.length - Math.abs(position) % this.length;
|
|
27
44
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
position = this.getCorrectedPosition(position);
|
|
44
|
-
target = this.getCorrectedPosition(target);
|
|
45
|
-
let distance = (target - position) * direction;
|
|
46
|
-
if (distance < 0) {
|
|
47
|
-
distance = this.length - (Math.abs(position) % this.length) + target;
|
|
48
|
-
}
|
|
49
|
-
return distance;
|
|
45
|
+
return position;
|
|
46
|
+
}
|
|
47
|
+
static withoutOffset(position) {
|
|
48
|
+
return position + _LoopingArrayCalculator.getOffset(position);
|
|
49
|
+
}
|
|
50
|
+
static getOffset(position) {
|
|
51
|
+
return Math.round(position) - position;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)
|
|
55
|
+
*/
|
|
56
|
+
getDistanceDirectional(position, target, direction) {
|
|
57
|
+
if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {
|
|
58
|
+
throw new Error("Invalid parameters: position is out of bounds.");
|
|
50
59
|
}
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
const isForwardInvalid = direction === 1 && position > target;
|
|
61
|
+
const isBackwardInvalid = direction === -1 && target < position;
|
|
62
|
+
if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {
|
|
63
|
+
return Infinity;
|
|
53
64
|
}
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
if (direction === -1) {
|
|
66
|
+
return this.getDistanceDirectional(target, position, 1);
|
|
56
67
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
position = this.getCorrectedPosition(position);
|
|
69
|
+
target = this.getCorrectedPosition(target);
|
|
70
|
+
let distance = (target - position) * direction;
|
|
71
|
+
if (distance < 0) {
|
|
72
|
+
distance = this.length - Math.abs(position) % this.length + target;
|
|
61
73
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
return distance;
|
|
75
|
+
}
|
|
76
|
+
getDistanceForward(position, target) {
|
|
77
|
+
return this.getDistanceDirectional(position, target, 1);
|
|
78
|
+
}
|
|
79
|
+
getDistanceBackward(position, target) {
|
|
80
|
+
return this.getDistanceDirectional(position, target, -1);
|
|
81
|
+
}
|
|
82
|
+
getDistance(position, target) {
|
|
83
|
+
const forwardDistance = this.getDistanceForward(position, target);
|
|
84
|
+
const backwardDistance = this.getDistanceBackward(position, target);
|
|
85
|
+
return Math.min(forwardDistance, backwardDistance);
|
|
86
|
+
}
|
|
87
|
+
getBestDirection(position, target) {
|
|
88
|
+
const forwardDistance = this.getDistanceForward(position, target);
|
|
89
|
+
const backwardDistance = this.getDistanceBackward(position, target);
|
|
90
|
+
return forwardDistance < backwardDistance ? 1 : -1;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
LoopingArrayCalculator
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=loopingArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/loopingArray.ts"],"sourcesContent":["/**\n * 1 is forwards\n *\n * -1 is backwards\n */\nexport type Direction = 1 | -1\n\nexport class LoopingArrayCalculator {\n length: number\n isLooping: boolean\n allowedOverScroll: number\n\n constructor(length: number, isLooping: boolean = true, allowedOverScroll: number = 0.1) {\n if (allowedOverScroll < 0 || length < 1) {\n throw new Error('Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true')\n }\n\n this.length = length\n this.isLooping = isLooping\n this.allowedOverScroll = allowedOverScroll\n }\n\n getCorrectedPosition(position: number): number {\n if (!this.isLooping) {\n return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position))\n }\n if (position >= this.length) {\n return position % this.length\n }\n if (position < 0) {\n return this.length - (Math.abs(position) % this.length)\n }\n return position\n }\n\n static withoutOffset(position: number): number {\n return position + LoopingArrayCalculator.getOffset(position)\n }\n\n static getOffset(position: number): number {\n return Math.round(position) - position // For example: 45.5 => 46 - 45.5 = 0.5\n }\n\n /**\n * @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)\n */\n getDistanceDirectional(position: number, target: number, direction: Direction): number {\n if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {\n throw new Error('Invalid parameters: position is out of bounds.')\n }\n\n const isForwardInvalid = (direction === 1 && position > target)\n const isBackwardInvalid = (direction === -1 && target < position)\n\n if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {\n return Infinity\n }\n\n if (direction === -1) {\n return this.getDistanceDirectional(target, position, 1)\n }\n\n position = this.getCorrectedPosition(position)\n target = this.getCorrectedPosition(target)\n\n let distance = (target - position) * direction\n if (distance < 0) {\n distance = this.length - (Math.abs(position) % this.length) + target\n }\n\n return distance\n }\n\n getDistanceForward(position: number, target: number): number {\n return this.getDistanceDirectional(position, target, 1)\n }\n\n getDistanceBackward(position: number, target: number): number {\n return this.getDistanceDirectional(position, target, -1)\n }\n\n getDistance(position: number, target: number): number {\n const forwardDistance = this.getDistanceForward(position, target)\n const backwardDistance = this.getDistanceBackward(position, target)\n\n return Math.min(forwardDistance, backwardDistance)\n }\n\n getBestDirection(position: number, target: number): Direction {\n const forwardDistance = this.getDistanceForward(position, target)\n const backwardDistance = this.getDistanceBackward(position, target)\n return forwardDistance < backwardDistance ? 1 : -1\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAM,yBAAN,MAAM,wBAAuB;AAAA,EAKlC,YAAY,QAAgB,YAAqB,MAAM,oBAA4B,KAAK;AACtF,QAAI,oBAAoB,KAAK,SAAS,GAAG;AACvC,YAAM,IAAI,MAAM,yEAAyE;AAAA,IAC3F;AAEA,SAAK,SAAS;AACd,SAAK,YAAY;AACjB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEA,qBAAqB,UAA0B;AAC7C,QAAI,CAAC,KAAK,WAAW;AACnB,aAAO,KAAK,IAAI,CAAC,KAAK,mBAAmB,KAAK,IAAI,KAAK,oBAAoB,KAAK,SAAS,GAAG,QAAQ,CAAC;AAAA,IACvG;AACA,QAAI,YAAY,KAAK,QAAQ;AAC3B,aAAO,WAAW,KAAK;AAAA,IACzB;AACA,QAAI,WAAW,GAAG;AAChB,aAAO,KAAK,SAAU,KAAK,IAAI,QAAQ,IAAI,KAAK;AAAA,IAClD;AACA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,cAAc,UAA0B;AAC7C,WAAO,WAAW,wBAAuB,UAAU,QAAQ;AAAA,EAC7D;AAAA,EAEA,OAAO,UAAU,UAA0B;AACzC,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAChC;AAAA;AAAA;AAAA;AAAA,EAKA,uBAAuB,UAAkB,QAAgB,WAA8B;AACrF,QAAI,CAAC,KAAK,cAAc,WAAW,CAAC,KAAK,qBAAqB,WAAW,KAAK,oBAAoB,KAAK,SAAS,IAAI;AAClH,YAAM,IAAI,MAAM,gDAAgD;AAAA,IAClE;AAEA,UAAM,mBAAoB,cAAc,KAAK,WAAW;AACxD,UAAM,oBAAqB,cAAc,MAAM,SAAS;AAExD,QAAI,CAAC,KAAK,cAAc,oBAAoB,oBAAoB;AAC9D,aAAO;AAAA,IACT;AAEA,QAAI,cAAc,IAAI;AACpB,aAAO,KAAK,uBAAuB,QAAQ,UAAU,CAAC;AAAA,IACxD;AAEA,eAAW,KAAK,qBAAqB,QAAQ;AAC7C,aAAS,KAAK,qBAAqB,MAAM;AAEzC,QAAI,YAAY,SAAS,YAAY;AACrC,QAAI,WAAW,GAAG;AAChB,iBAAW,KAAK,SAAU,KAAK,IAAI,QAAQ,IAAI,KAAK,SAAU;AAAA,IAChE;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,mBAAmB,UAAkB,QAAwB;AAC3D,WAAO,KAAK,uBAAuB,UAAU,QAAQ,CAAC;AAAA,EACxD;AAAA,EAEA,oBAAoB,UAAkB,QAAwB;AAC5D,WAAO,KAAK,uBAAuB,UAAU,QAAQ,EAAE;AAAA,EACzD;AAAA,EAEA,YAAY,UAAkB,QAAwB;AACpD,UAAM,kBAAkB,KAAK,mBAAmB,UAAU,MAAM;AAChE,UAAM,mBAAmB,KAAK,oBAAoB,UAAU,MAAM;AAElE,WAAO,KAAK,IAAI,iBAAiB,gBAAgB;AAAA,EACnD;AAAA,EAEA,iBAAiB,UAAkB,QAA2B;AAC5D,UAAM,kBAAkB,KAAK,mBAAmB,UAAU,MAAM;AAChE,UAAM,mBAAmB,KAAK,oBAAoB,UAAU,MAAM;AAClE,WAAO,kBAAkB,mBAAmB,IAAI;AAAA,EAClD;AACF;","names":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// src/util/loopingArray.ts
|
|
2
|
+
var LoopingArrayCalculator = class _LoopingArrayCalculator {
|
|
3
|
+
constructor(length, isLooping = true, allowedOverScroll = 0.1) {
|
|
4
|
+
if (allowedOverScroll < 0 || length < 1) {
|
|
5
|
+
throw new Error("Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true");
|
|
6
|
+
}
|
|
7
|
+
this.length = length;
|
|
8
|
+
this.isLooping = isLooping;
|
|
9
|
+
this.allowedOverScroll = allowedOverScroll;
|
|
10
|
+
}
|
|
11
|
+
getCorrectedPosition(position) {
|
|
12
|
+
if (!this.isLooping) {
|
|
13
|
+
return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position));
|
|
14
|
+
}
|
|
15
|
+
if (position >= this.length) {
|
|
16
|
+
return position % this.length;
|
|
17
|
+
}
|
|
18
|
+
if (position < 0) {
|
|
19
|
+
return this.length - Math.abs(position) % this.length;
|
|
20
|
+
}
|
|
21
|
+
return position;
|
|
22
|
+
}
|
|
23
|
+
static withoutOffset(position) {
|
|
24
|
+
return position + _LoopingArrayCalculator.getOffset(position);
|
|
25
|
+
}
|
|
26
|
+
static getOffset(position) {
|
|
27
|
+
return Math.round(position) - position;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)
|
|
31
|
+
*/
|
|
32
|
+
getDistanceDirectional(position, target, direction) {
|
|
33
|
+
if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {
|
|
34
|
+
throw new Error("Invalid parameters: position is out of bounds.");
|
|
35
|
+
}
|
|
36
|
+
const isForwardInvalid = direction === 1 && position > target;
|
|
37
|
+
const isBackwardInvalid = direction === -1 && target < position;
|
|
38
|
+
if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {
|
|
39
|
+
return Infinity;
|
|
40
|
+
}
|
|
41
|
+
if (direction === -1) {
|
|
42
|
+
return this.getDistanceDirectional(target, position, 1);
|
|
43
|
+
}
|
|
44
|
+
position = this.getCorrectedPosition(position);
|
|
45
|
+
target = this.getCorrectedPosition(target);
|
|
46
|
+
let distance = (target - position) * direction;
|
|
47
|
+
if (distance < 0) {
|
|
48
|
+
distance = this.length - Math.abs(position) % this.length + target;
|
|
49
|
+
}
|
|
50
|
+
return distance;
|
|
51
|
+
}
|
|
52
|
+
getDistanceForward(position, target) {
|
|
53
|
+
return this.getDistanceDirectional(position, target, 1);
|
|
54
|
+
}
|
|
55
|
+
getDistanceBackward(position, target) {
|
|
56
|
+
return this.getDistanceDirectional(position, target, -1);
|
|
57
|
+
}
|
|
58
|
+
getDistance(position, target) {
|
|
59
|
+
const forwardDistance = this.getDistanceForward(position, target);
|
|
60
|
+
const backwardDistance = this.getDistanceBackward(position, target);
|
|
61
|
+
return Math.min(forwardDistance, backwardDistance);
|
|
62
|
+
}
|
|
63
|
+
getBestDirection(position, target) {
|
|
64
|
+
const forwardDistance = this.getDistanceForward(position, target);
|
|
65
|
+
const backwardDistance = this.getDistanceBackward(position, target);
|
|
66
|
+
return forwardDistance < backwardDistance ? 1 : -1;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
LoopingArrayCalculator
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=loopingArray.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/loopingArray.ts"],"sourcesContent":["/**\n * 1 is forwards\n *\n * -1 is backwards\n */\nexport type Direction = 1 | -1\n\nexport class LoopingArrayCalculator {\n length: number\n isLooping: boolean\n allowedOverScroll: number\n\n constructor(length: number, isLooping: boolean = true, allowedOverScroll: number = 0.1) {\n if (allowedOverScroll < 0 || length < 1) {\n throw new Error('Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true')\n }\n\n this.length = length\n this.isLooping = isLooping\n this.allowedOverScroll = allowedOverScroll\n }\n\n getCorrectedPosition(position: number): number {\n if (!this.isLooping) {\n return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position))\n }\n if (position >= this.length) {\n return position % this.length\n }\n if (position < 0) {\n return this.length - (Math.abs(position) % this.length)\n }\n return position\n }\n\n static withoutOffset(position: number): number {\n return position + LoopingArrayCalculator.getOffset(position)\n }\n\n static getOffset(position: number): number {\n return Math.round(position) - position // For example: 45.5 => 46 - 45.5 = 0.5\n }\n\n /**\n * @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)\n */\n getDistanceDirectional(position: number, target: number, direction: Direction): number {\n if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {\n throw new Error('Invalid parameters: position is out of bounds.')\n }\n\n const isForwardInvalid = (direction === 1 && position > target)\n const isBackwardInvalid = (direction === -1 && target < position)\n\n if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {\n return Infinity\n }\n\n if (direction === -1) {\n return this.getDistanceDirectional(target, position, 1)\n }\n\n position = this.getCorrectedPosition(position)\n target = this.getCorrectedPosition(target)\n\n let distance = (target - position) * direction\n if (distance < 0) {\n distance = this.length - (Math.abs(position) % this.length) + target\n }\n\n return distance\n }\n\n getDistanceForward(position: number, target: number): number {\n return this.getDistanceDirectional(position, target, 1)\n }\n\n getDistanceBackward(position: number, target: number): number {\n return this.getDistanceDirectional(position, target, -1)\n }\n\n getDistance(position: number, target: number): number {\n const forwardDistance = this.getDistanceForward(position, target)\n const backwardDistance = this.getDistanceBackward(position, target)\n\n return Math.min(forwardDistance, backwardDistance)\n }\n\n getBestDirection(position: number, target: number): Direction {\n const forwardDistance = this.getDistanceForward(position, target)\n const backwardDistance = this.getDistanceBackward(position, target)\n return forwardDistance < backwardDistance ? 1 : -1\n }\n}\n"],"mappings":";AAOO,IAAM,yBAAN,MAAM,wBAAuB;AAAA,EAKlC,YAAY,QAAgB,YAAqB,MAAM,oBAA4B,KAAK;AACtF,QAAI,oBAAoB,KAAK,SAAS,GAAG;AACvC,YAAM,IAAI,MAAM,yEAAyE;AAAA,IAC3F;AAEA,SAAK,SAAS;AACd,SAAK,YAAY;AACjB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEA,qBAAqB,UAA0B;AAC7C,QAAI,CAAC,KAAK,WAAW;AACnB,aAAO,KAAK,IAAI,CAAC,KAAK,mBAAmB,KAAK,IAAI,KAAK,oBAAoB,KAAK,SAAS,GAAG,QAAQ,CAAC;AAAA,IACvG;AACA,QAAI,YAAY,KAAK,QAAQ;AAC3B,aAAO,WAAW,KAAK;AAAA,IACzB;AACA,QAAI,WAAW,GAAG;AAChB,aAAO,KAAK,SAAU,KAAK,IAAI,QAAQ,IAAI,KAAK;AAAA,IAClD;AACA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,cAAc,UAA0B;AAC7C,WAAO,WAAW,wBAAuB,UAAU,QAAQ;AAAA,EAC7D;AAAA,EAEA,OAAO,UAAU,UAA0B;AACzC,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAChC;AAAA;AAAA;AAAA;AAAA,EAKA,uBAAuB,UAAkB,QAAgB,WAA8B;AACrF,QAAI,CAAC,KAAK,cAAc,WAAW,CAAC,KAAK,qBAAqB,WAAW,KAAK,oBAAoB,KAAK,SAAS,IAAI;AAClH,YAAM,IAAI,MAAM,gDAAgD;AAAA,IAClE;AAEA,UAAM,mBAAoB,cAAc,KAAK,WAAW;AACxD,UAAM,oBAAqB,cAAc,MAAM,SAAS;AAExD,QAAI,CAAC,KAAK,cAAc,oBAAoB,oBAAoB;AAC9D,aAAO;AAAA,IACT;AAEA,QAAI,cAAc,IAAI;AACpB,aAAO,KAAK,uBAAuB,QAAQ,UAAU,CAAC;AAAA,IACxD;AAEA,eAAW,KAAK,qBAAqB,QAAQ;AAC7C,aAAS,KAAK,qBAAqB,MAAM;AAEzC,QAAI,YAAY,SAAS,YAAY;AACrC,QAAI,WAAW,GAAG;AAChB,iBAAW,KAAK,SAAU,KAAK,IAAI,QAAQ,IAAI,KAAK,SAAU;AAAA,IAChE;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,mBAAmB,UAAkB,QAAwB;AAC3D,WAAO,KAAK,uBAAuB,UAAU,QAAQ,CAAC;AAAA,EACxD;AAAA,EAEA,oBAAoB,UAAkB,QAAwB;AAC5D,WAAO,KAAK,uBAAuB,UAAU,QAAQ,EAAE;AAAA,EACzD;AAAA,EAEA,YAAY,UAAkB,QAAwB;AACpD,UAAM,kBAAkB,KAAK,mBAAmB,UAAU,MAAM;AAChE,UAAM,mBAAmB,KAAK,oBAAoB,UAAU,MAAM;AAElE,WAAO,KAAK,IAAI,iBAAiB,gBAAgB;AAAA,EACnD;AAAA,EAEA,iBAAiB,UAAkB,QAA2B;AAC5D,UAAM,kBAAkB,KAAK,mBAAmB,UAAU,MAAM;AAChE,UAAM,mBAAmB,KAAK,oBAAoB,UAAU,MAAM;AAClE,WAAO,kBAAkB,mBAAmB,IAAI;AAAA,EAClD;AACF;","names":[]}
|
package/dist/util/math.d.ts
CHANGED
package/dist/util/math.js
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
3
9
|
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/util/math.ts
|
|
21
|
+
var math_exports = {};
|
|
22
|
+
__export(math_exports, {
|
|
23
|
+
clamp: () => clamp
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(math_exports);
|
|
26
|
+
var clamp = (value, min = 0, max = 1) => {
|
|
27
|
+
return Math.min(Math.max(value, min), max);
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
clamp
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/math.ts"],"sourcesContent":["export const clamp = (value: number, min: number = 0, max: number = 1): number => {\n return Math.min(Math.max(value, min), max)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,QAAQ,CAAC,OAAe,MAAc,GAAG,MAAc,MAAc;AAChF,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/math.ts"],"sourcesContent":["export const clamp = (value: number, min: number = 0, max: number = 1): number => {\n return Math.min(Math.max(value, min), max)\n}\n"],"mappings":";AAAO,IAAM,QAAQ,CAAC,OAAe,MAAc,GAAG,MAAc,MAAc;AAChF,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;","names":[]}
|