tera-system-ui 0.1.76 → 0.2.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/dist/components/accordion/Accordion.recipe.d.ts +125 -0
- package/dist/components/accordion/Accordion.recipe.js +28 -0
- package/dist/components/accordion/components/Accordion.svelte +4 -1
- package/dist/components/accordion/components/AccordionContent.svelte +4 -6
- package/dist/components/accordion/components/AccordionItem.svelte +3 -2
- package/dist/components/accordion/components/AccordionTrigger.svelte +11 -9
- package/dist/components/accordion/components/AccordionTrigger.svelte.d.ts +3 -0
- package/dist/components/accordion/index.d.ts +2 -1
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/Alert.recipe.d.ts +113 -0
- package/dist/components/alert/Alert.recipe.js +53 -0
- package/dist/components/alert/Alert.svelte +28 -18
- package/dist/components/alert/Alert.svelte.d.ts +2 -13
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/avatar/Avatar.recipe.d.ts +113 -0
- package/dist/components/avatar/Avatar.recipe.js +37 -0
- package/dist/components/avatar/Avatar.svelte +19 -24
- package/dist/components/avatar/Avatar.svelte.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +2 -1
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/Badge.recipe.d.ts +68 -0
- package/dist/components/badge/Badge.recipe.js +35 -0
- package/dist/components/badge/Badge.svelte +15 -7
- package/dist/components/badge/Badge.svelte.d.ts +1 -1
- package/dist/components/badge/index.d.ts +2 -1
- package/dist/components/badge/index.js +1 -0
- package/dist/components/bottom-sheet/BottomSheet.recipe.d.ts +130 -0
- package/dist/components/bottom-sheet/BottomSheet.recipe.js +47 -0
- package/dist/components/bottom-sheet/BottomSheet.svelte +1123 -0
- package/dist/components/bottom-sheet/BottomSheet.svelte.d.ts +4 -0
- package/dist/components/bottom-sheet/bottomSheetStore.svelte.d.ts +39 -0
- package/dist/components/bottom-sheet/bottomSheetStore.svelte.js +158 -0
- package/dist/components/bottom-sheet/index.d.ts +5 -0
- package/dist/components/bottom-sheet/index.js +3 -0
- package/dist/components/button/Button.recipe.d.ts +131 -0
- package/dist/components/button/Button.recipe.js +120 -0
- package/dist/components/button/Button.svelte +37 -23
- package/dist/components/button/Button.svelte.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -1
- package/dist/components/button/index.js +1 -0
- package/dist/components/card/{Card.d.ts → Card.recipe.d.ts} +18 -6
- package/dist/components/card/Card.recipe.js +41 -0
- package/dist/components/card/Card.svelte +5 -5
- package/dist/components/card/Card.svelte.d.ts +1 -1
- package/dist/components/card/index.d.ts +2 -1
- package/dist/components/card/index.js +1 -0
- package/dist/components/checkbox/Checkbox.recipe.d.ts +80 -0
- package/dist/components/checkbox/Checkbox.recipe.js +39 -0
- package/dist/components/checkbox/Checkbox.svelte +29 -35
- package/dist/components/checkbox/Checkbox.svelte.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -1
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/combobox/Combobox.recipe.d.ts +138 -0
- package/dist/components/combobox/Combobox.recipe.js +50 -0
- package/dist/components/combobox/Combobox.svelte +57 -37
- package/dist/components/combobox/Combobox.svelte.d.ts +1 -1
- package/dist/components/combobox/index.d.ts +2 -1
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/command/Command.recipe.d.ts +92 -0
- package/dist/components/command/Command.recipe.js +31 -0
- package/dist/components/command/components/command-empty.svelte +2 -2
- package/dist/components/command/components/command-group.svelte +4 -3
- package/dist/components/command/components/command-input.svelte +3 -7
- package/dist/components/command/components/command-item.svelte +2 -5
- package/dist/components/command/components/command-link-item.svelte +2 -5
- package/dist/components/command/components/command-list.svelte +2 -2
- package/dist/components/command/components/command-separator.svelte +2 -2
- package/dist/components/command/components/command-shortcut.svelte +2 -2
- package/dist/components/command/components/command-shortcut.svelte.d.ts +1 -1
- package/dist/components/command/components/command.svelte +2 -5
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/date-range-picker/DateRangePicker.recipe.d.ts +220 -0
- package/dist/components/date-range-picker/DateRangePicker.recipe.js +113 -0
- package/dist/components/date-range-picker/DateRangePicker.svelte +53 -72
- package/dist/components/date-range-picker/DateRangePicker.svelte.d.ts +1 -1
- package/dist/components/date-range-picker/index.d.ts +2 -1
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/dialog/Dialog.recipe.d.ts +229 -0
- package/dist/components/dialog/Dialog.recipe.js +68 -0
- package/dist/components/dialog/Dialog.svelte +21 -39
- package/dist/components/dialog/Dialog.svelte.d.ts +1 -1
- package/dist/components/dialog/index.d.ts +2 -1
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/drawer/Drawer.recipe.d.ts +140 -0
- package/dist/components/drawer/Drawer.recipe.js +50 -0
- package/dist/components/drawer/Drawer.svelte +16 -24
- package/dist/components/drawer/Drawer.svelte.d.ts +2 -14
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-menu/{DropdownMenu.d.ts → DropdownMenu.recipe.d.ts} +63 -4
- package/dist/components/dropdown-menu/DropdownMenu.recipe.js +41 -0
- package/dist/components/dropdown-menu/components/DropdownMenu.svelte +3 -8
- package/dist/components/dropdown-menu/components/DropdownMenu.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte +3 -2
- package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte +3 -2
- package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte +3 -9
- package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte +3 -2
- package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/index.d.ts +2 -1
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/fonts/TeraFontMono.svelte +1 -1
- package/dist/components/fonts/TeraFontMono.svelte.d.ts +1 -1
- package/dist/components/input/Input.recipe.d.ts +166 -0
- package/dist/components/input/Input.recipe.js +86 -0
- package/dist/components/input/Input.svelte +43 -38
- package/dist/components/input/Input.svelte.d.ts +1 -1
- package/dist/components/input/index.d.ts +2 -1
- package/dist/components/input/index.js +1 -0
- package/dist/components/label/Label.recipe.d.ts +46 -0
- package/dist/components/label/Label.recipe.js +27 -0
- package/dist/components/label/Label.svelte +2 -2
- package/dist/components/label/Label.svelte.d.ts +1 -1
- package/dist/components/label/index.d.ts +2 -1
- package/dist/components/label/index.js +1 -0
- package/dist/components/popover/Popover.recipe.d.ts +80 -0
- package/dist/components/popover/Popover.recipe.js +23 -0
- package/dist/components/popover/Popover.svelte +4 -8
- package/dist/components/popover/Popover.svelte.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -1
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover-responsive/PopoverResponsive.recipe.d.ts +85 -0
- package/dist/components/popover-responsive/PopoverResponsive.recipe.js +27 -0
- package/dist/components/popover-responsive/PopoverResponsive.svelte +38 -5
- package/dist/components/popover-responsive/PopoverResponsive.svelte.d.ts +1 -1
- package/dist/components/popover-responsive/index.d.ts +2 -1
- package/dist/components/popover-responsive/index.js +1 -0
- package/dist/components/select/Select.recipe.d.ts +190 -0
- package/dist/components/select/Select.recipe.js +51 -0
- package/dist/components/select/Select.svelte +18 -24
- package/dist/components/select/Select.svelte.d.ts +1 -1
- package/dist/components/select/index.d.ts +2 -1
- package/dist/components/select/index.js +1 -0
- package/dist/components/skeleton/Skeleton.recipe.d.ts +89 -0
- package/dist/components/skeleton/Skeleton.recipe.js +41 -0
- package/dist/components/skeleton/Skeleton.svelte +7 -6
- package/dist/components/skeleton/Skeleton.svelte.d.ts +2 -10
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/slider/Slider.recipe.d.ts +115 -0
- package/dist/components/slider/Slider.recipe.js +50 -0
- package/dist/components/slider/Slider.svelte +6 -12
- package/dist/components/slider/Slider.svelte.d.ts +1 -1
- package/dist/components/slider/index.d.ts +3 -1
- package/dist/components/slider/index.js +1 -0
- package/dist/components/spinner/Spinner.recipe.d.ts +60 -0
- package/dist/components/spinner/Spinner.recipe.js +38 -0
- package/dist/components/spinner/Spinner.svelte +2 -2
- package/dist/components/spinner/Spinner.svelte.d.ts +2 -8
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/star-rating/StarRating.recipe.d.ts +49 -0
- package/dist/components/star-rating/StarRating.recipe.js +29 -0
- package/dist/components/star-rating/StarRating.svelte +39 -35
- package/dist/components/star-rating/StarRating.svelte.d.ts +1 -1
- package/dist/components/star-rating/index.d.ts +2 -1
- package/dist/components/star-rating/index.js +1 -0
- package/dist/components/switch/Switch.recipe.d.ts +81 -0
- package/dist/components/switch/Switch.recipe.js +38 -0
- package/dist/components/switch/Switch.svelte +27 -36
- package/dist/components/switch/Switch.svelte.d.ts +1 -1
- package/dist/components/switch/index.d.ts +2 -1
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.recipe.d.ts +134 -0
- package/dist/components/table/Table.recipe.js +44 -0
- package/dist/components/table/Table.svelte +10 -10
- package/dist/components/table/Table.svelte.d.ts +2 -17
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/tabs/Tabs.recipe.d.ts +161 -0
- package/dist/components/tabs/Tabs.recipe.js +76 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +2 -58
- package/dist/components/tabs/Tabs.svelte.js +3 -0
- package/dist/components/tabs/components/Tabs.svelte +8 -8
- package/dist/components/tabs/components/Tabs.svelte.d.ts +1 -1
- package/dist/components/tabs/components/TabsContent.svelte +3 -2
- package/dist/components/tabs/components/TabsContent.svelte.d.ts +1 -1
- package/dist/components/tabs/components/TabsItem.svelte +11 -36
- package/dist/components/tabs/components/TabsItem.svelte.d.ts +1 -1
- package/dist/components/tabs/components/TabsList.svelte +13 -42
- package/dist/components/tabs/components/TabsList.svelte.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +2 -1
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/text-area/TextArea.recipe.d.ts +181 -0
- package/dist/components/text-area/TextArea.recipe.js +81 -0
- package/dist/components/text-area/TextArea.svelte +68 -63
- package/dist/components/text-area/TextArea.svelte.d.ts +1 -1
- package/dist/components/text-area/index.d.ts +2 -1
- package/dist/components/text-area/index.js +1 -0
- package/dist/components/toast/ToastContainer.svelte +15 -16
- package/dist/components/tooltip/Tooltip.recipe.d.ts +79 -0
- package/dist/components/tooltip/Tooltip.recipe.js +26 -0
- package/dist/components/tooltip/Tooltip.svelte +10 -7
- package/dist/components/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/components/tooltip/index.js +1 -0
- package/dist/index.d.ts +55 -65
- package/dist/index.js +28 -37
- package/dist/{components → internal}/icons/IconCheck.svelte +3 -4
- package/dist/{components → internal}/icons/IconChevronDown.svelte +3 -4
- package/dist/{components → internal}/icons/IconSearch.svelte +3 -4
- package/dist/{components → internal}/icons/IconX.svelte +3 -4
- package/dist/internal/icons/index.d.ts +4 -0
- package/dist/internal/icons/index.js +4 -0
- package/dist/llms/accordion.md +2 -1
- package/dist/llms/alert.md +7 -2
- package/dist/llms/avatar.md +2 -2
- package/dist/llms/badge.md +4 -0
- package/dist/llms/bottom-sheet.md +44 -0
- package/dist/llms/button.md +7 -1
- package/dist/llms/card.md +2 -0
- package/dist/llms/checkbox.md +2 -1
- package/dist/llms/colors.md +20 -20
- package/dist/llms/combobox.md +8 -2
- package/dist/llms/command.md +2 -0
- package/dist/llms/date-range-picker.md +12 -2
- package/dist/llms/dialog.md +9 -4
- package/dist/llms/drawer.md +13 -8
- package/dist/llms/dropdown-menu.md +11 -2
- package/dist/llms/index.md +1 -13
- package/dist/llms/input.md +3 -0
- package/dist/llms/label.md +2 -0
- package/dist/llms/popover-responsive.md +10 -2
- package/dist/llms/popover.md +1 -1
- package/dist/llms/select.md +2 -1
- package/dist/llms/skeleton.md +8 -5
- package/dist/llms/slider.md +5 -3
- package/dist/llms/spinner.md +6 -2
- package/dist/llms/star-rating.md +3 -0
- package/dist/llms/switch.md +2 -1
- package/dist/llms/table.md +14 -7
- package/dist/llms/tabs.md +18 -3
- package/dist/llms/text-area.md +3 -0
- package/dist/llms/tooltip.md +2 -1
- package/dist/recipes/index.d.ts +79 -0
- package/dist/recipes/index.js +52 -0
- package/dist/stories/ComponentOverview.stories.svelte +346 -350
- package/dist/themes/tera-ui-base.css +149 -62
- package/dist/themes/theme-cv-builder.css +146 -0
- package/dist/themes/theme-professional.css +8 -33
- package/dist/tokens/index.d.ts +168 -0
- package/dist/tokens/index.js +122 -0
- package/dist/types/index.d.ts +19 -24
- package/package.json +30 -50
- package/registry/accordion.json +65 -0
- package/registry/alert.json +43 -0
- package/registry/avatar.json +43 -0
- package/registry/badge.json +43 -0
- package/registry/bottom-sheet.json +50 -0
- package/registry/button.json +43 -0
- package/registry/card.json +43 -0
- package/registry/checkbox.json +45 -0
- package/registry/combobox.json +45 -0
- package/registry/command.json +109 -0
- package/registry/date-range-picker.json +48 -0
- package/registry/dialog.json +50 -0
- package/registry/drawer.json +45 -0
- package/registry/dropdown-menu.json +72 -0
- package/registry/fonts.json +41 -0
- package/registry/index.json +193 -0
- package/registry/input.json +43 -0
- package/registry/label.json +44 -0
- package/registry/popover-responsive.json +46 -0
- package/registry/popover.json +44 -0
- package/registry/select.json +51 -0
- package/registry/skeleton.json +43 -0
- package/registry/slider.json +44 -0
- package/registry/spinner.json +43 -0
- package/registry/star-rating.json +43 -0
- package/registry/switch.json +44 -0
- package/registry/table.json +45 -0
- package/registry/tabs.json +71 -0
- package/registry/text-area.json +43 -0
- package/registry/toast.json +41 -0
- package/registry/tooltip.json +44 -0
- package/scripts/generate-ts-index.js +1 -18
- package/scripts/tera-ui.mjs +171 -0
- package/dist/components/accordion/Accordion.d.ts +0 -52
- package/dist/components/accordion/Accordion.js +0 -11
- package/dist/components/ai/ChatBubble.svelte +0 -35
- package/dist/components/ai/ChatBubble.svelte.d.ts +0 -12
- package/dist/components/ai/PromptInput.svelte +0 -58
- package/dist/components/ai/PromptInput.svelte.d.ts +0 -13
- package/dist/components/ai/StreamText.svelte +0 -41
- package/dist/components/ai/StreamText.svelte.d.ts +0 -11
- package/dist/components/ai/SuggestionChips.svelte +0 -34
- package/dist/components/ai/SuggestionChips.svelte.d.ts +0 -10
- package/dist/components/ai/ThinkingLoader.svelte +0 -34
- package/dist/components/ai/ThinkingLoader.svelte.d.ts +0 -11
- package/dist/components/ai/index.d.ts +0 -5
- package/dist/components/ai/index.js +0 -5
- package/dist/components/avatar/Avatar.d.ts +0 -45
- package/dist/components/avatar/Avatar.js +0 -35
- package/dist/components/badge/Badge.d.ts +0 -52
- package/dist/components/badge/Badge.js +0 -22
- package/dist/components/brand-logo/BrandLogo.d.ts +0 -38
- package/dist/components/brand-logo/BrandLogo.js +0 -18
- package/dist/components/brand-logo/BrandLogo.svelte +0 -36
- package/dist/components/brand-logo/BrandLogo.svelte.d.ts +0 -4
- package/dist/components/brand-logo/index.d.ts +0 -2
- package/dist/components/brand-logo/index.js +0 -1
- package/dist/components/button/Button.d.ts +0 -113
- package/dist/components/button/Button.js +0 -135
- package/dist/components/card/Card.js +0 -28
- package/dist/components/checkbox/Checkbox.d.ts +0 -32
- package/dist/components/checkbox/Checkbox.js +0 -11
- package/dist/components/combobox/Combobox.d.ts +0 -47
- package/dist/components/combobox/Combobox.js +0 -5
- package/dist/components/date-range-picker/DateRangePicker.types.d.ts +0 -38
- package/dist/components/date-range-picker/DateRangePicker.types.js +0 -1
- package/dist/components/dialog/Dialog.d.ts +0 -55
- package/dist/components/dialog/Dialog.js +0 -1
- package/dist/components/dropdown-menu/DropdownMenu.js +0 -1
- package/dist/components/header/Header.d.ts +0 -11
- package/dist/components/header/Header.js +0 -7
- package/dist/components/header/Header.svelte +0 -33
- package/dist/components/header/Header.svelte.d.ts +0 -5
- package/dist/components/header/header.scss +0 -20
- package/dist/components/header/index.d.ts +0 -2
- package/dist/components/header/index.js +0 -1
- package/dist/components/header/package.json +0 -14
- package/dist/components/icons/IconArrowBigRightFilled.svelte +0 -7
- package/dist/components/icons/IconArrowBigRightFilled.svelte.d.ts +0 -5
- package/dist/components/icons/IconBook.svelte +0 -7
- package/dist/components/icons/IconBook.svelte.d.ts +0 -5
- package/dist/components/icons/IconBookmarkPlus.svelte +0 -7
- package/dist/components/icons/IconBookmarkPlus.svelte.d.ts +0 -5
- package/dist/components/icons/IconCalculator.svelte +0 -7
- package/dist/components/icons/IconCalculator.svelte.d.ts +0 -5
- package/dist/components/icons/IconCoin.svelte +0 -7
- package/dist/components/icons/IconCoin.svelte.d.ts +0 -5
- package/dist/components/icons/IconCoinConvert.svelte +0 -17
- package/dist/components/icons/IconCoinConvert.svelte.d.ts +0 -4
- package/dist/components/icons/IconCopy.svelte +0 -7
- package/dist/components/icons/IconCopy.svelte.d.ts +0 -5
- package/dist/components/icons/IconCopyCheckFilled.svelte +0 -7
- package/dist/components/icons/IconCopyCheckFilled.svelte.d.ts +0 -5
- package/dist/components/icons/IconHamburger.svelte +0 -7
- package/dist/components/icons/IconHamburger.svelte.d.ts +0 -4
- package/dist/components/icons/IconLanguage.svelte +0 -7
- package/dist/components/icons/IconLanguage.svelte.d.ts +0 -5
- package/dist/components/icons/IconLoader2.svelte +0 -7
- package/dist/components/icons/IconLoader2.svelte.d.ts +0 -5
- package/dist/components/icons/IconLogout.svelte +0 -7
- package/dist/components/icons/IconLogout.svelte.d.ts +0 -5
- package/dist/components/icons/IconMoon.svelte +0 -7
- package/dist/components/icons/IconMoon.svelte.d.ts +0 -4
- package/dist/components/icons/IconPointFilled.svelte +0 -7
- package/dist/components/icons/IconPointFilled.svelte.d.ts +0 -5
- package/dist/components/icons/IconSettings.svelte +0 -7
- package/dist/components/icons/IconSettings.svelte.d.ts +0 -5
- package/dist/components/icons/IconSun.svelte +0 -7
- package/dist/components/icons/IconSun.svelte.d.ts +0 -4
- package/dist/components/icons/IconSwitchHorizontal.svelte +0 -7
- package/dist/components/icons/IconSwitchHorizontal.svelte.d.ts +0 -5
- package/dist/components/icons/IconSwitchVertical.svelte +0 -7
- package/dist/components/icons/IconSwitchVertical.svelte.d.ts +0 -5
- package/dist/components/icons/IconTransform.svelte +0 -7
- package/dist/components/icons/IconTransform.svelte.d.ts +0 -5
- package/dist/components/icons/index.d.ts +0 -23
- package/dist/components/icons/index.js +0 -23
- package/dist/components/input/Input.d.ts +0 -72
- package/dist/components/input/Input.js +0 -45
- package/dist/components/label/Label.d.ts +0 -38
- package/dist/components/label/Label.js +0 -18
- package/dist/components/language-picker-button/LanguagePickerButton.d.ts +0 -15
- package/dist/components/language-picker-button/LanguagePickerButton.js +0 -7
- package/dist/components/language-picker-button/LanguagePickerButton.svelte +0 -78
- package/dist/components/language-picker-button/LanguagePickerButton.svelte.d.ts +0 -7
- package/dist/components/language-picker-button/index.d.ts +0 -2
- package/dist/components/language-picker-button/index.js +0 -1
- package/dist/components/light-dark-toggle/LightDarkToggle.d.ts +0 -11
- package/dist/components/light-dark-toggle/LightDarkToggle.js +0 -7
- package/dist/components/light-dark-toggle/LightDarkToggle.svelte +0 -33
- package/dist/components/light-dark-toggle/LightDarkToggle.svelte.d.ts +0 -4
- package/dist/components/light-dark-toggle/index.d.ts +0 -2
- package/dist/components/light-dark-toggle/index.js +0 -1
- package/dist/components/marketing/FeatureCard.svelte +0 -37
- package/dist/components/marketing/FeatureCard.svelte.d.ts +0 -13
- package/dist/components/marketing/PricingCard.svelte +0 -48
- package/dist/components/marketing/PricingCard.svelte.d.ts +0 -15
- package/dist/components/marketing/StatBlock.svelte +0 -14
- package/dist/components/marketing/StatBlock.svelte.d.ts +0 -10
- package/dist/components/marketing/TestimonialCard.svelte +0 -24
- package/dist/components/marketing/TestimonialCard.svelte.d.ts +0 -12
- package/dist/components/marketing/index.d.ts +0 -4
- package/dist/components/marketing/index.js +0 -4
- package/dist/components/popover/Popover.d.ts +0 -37
- package/dist/components/popover/Popover.js +0 -1
- package/dist/components/popover-responsive/PopoverResponsive.d.ts +0 -22
- package/dist/components/popover-responsive/PopoverResponsive.js +0 -1
- package/dist/components/select/Select.d.ts +0 -106
- package/dist/components/select/Select.js +0 -24
- package/dist/components/side-navigation/SideNavigation.d.ts +0 -72
- package/dist/components/side-navigation/SideNavigation.js +0 -91
- package/dist/components/side-navigation/SideNavigation.svelte +0 -143
- package/dist/components/side-navigation/SideNavigation.svelte.d.ts +0 -4
- package/dist/components/side-navigation/SideNavigationGroup.svelte +0 -40
- package/dist/components/side-navigation/SideNavigationGroup.svelte.d.ts +0 -10
- package/dist/components/side-navigation/SideNavigationItem.svelte +0 -18
- package/dist/components/side-navigation/SideNavigationItem.svelte.d.ts +0 -8
- package/dist/components/side-navigation/SideNavigationLayout.svelte +0 -19
- package/dist/components/side-navigation/SideNavigationLayout.svelte.d.ts +0 -9
- package/dist/components/side-navigation/index.d.ts +0 -5
- package/dist/components/side-navigation/index.js +0 -4
- package/dist/components/side-navigation/sidenav.scss +0 -226
- package/dist/components/slider/Slider.d.ts +0 -28
- package/dist/components/slider/Slider.js +0 -1
- package/dist/components/star-rating/StarRating.d.ts +0 -31
- package/dist/components/star-rating/StarRating.js +0 -15
- package/dist/components/switch/Switch.d.ts +0 -27
- package/dist/components/switch/Switch.js +0 -11
- package/dist/components/tera-ui-context/TeraUiContext.d.ts +0 -11
- package/dist/components/tera-ui-context/TeraUiContext.js +0 -1
- package/dist/components/tera-ui-context/TeraUiContext.svelte +0 -13
- package/dist/components/tera-ui-context/TeraUiContext.svelte.d.ts +0 -4
- package/dist/components/tera-ui-context/global-context-store.d.ts +0 -3
- package/dist/components/tera-ui-context/global-context-store.js +0 -2
- package/dist/components/tera-ui-context/global-context.d.ts +0 -3
- package/dist/components/tera-ui-context/global-context.js +0 -24
- package/dist/components/tera-ui-context/index.d.ts +0 -2
- package/dist/components/tera-ui-context/index.js +0 -1
- package/dist/components/text-area/TextArea.d.ts +0 -87
- package/dist/components/text-area/TextArea.js +0 -48
- package/dist/components/tooltip/Tooltip.d.ts +0 -23
- package/dist/components/tooltip/Tooltip.js +0 -1
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.d.ts +0 -14
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.js +0 -7
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte +0 -48
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte.d.ts +0 -4
- package/dist/components/user-avatar-with-menu/index.d.ts +0 -2
- package/dist/components/user-avatar-with-menu/index.js +0 -1
- package/dist/i18n/index.d.ts +0 -1
- package/dist/i18n/index.js +0 -1
- package/dist/i18n/language.d.ts +0 -2
- package/dist/i18n/language.js +0 -45
- package/dist/internal/service/user.service.d.ts +0 -2
- package/dist/internal/service/user.service.js +0 -20
- package/dist/llms/ai.md +0 -110
- package/dist/llms/brand-logo.md +0 -30
- package/dist/llms/header.md +0 -26
- package/dist/llms/icons.md +0 -43
- package/dist/llms/language-picker-button.md +0 -30
- package/dist/llms/light-dark-toggle.md +0 -26
- package/dist/llms/marketing.md +0 -95
- package/dist/llms/side-navigation.md +0 -51
- package/dist/llms/tera-ui-context.md +0 -30
- package/dist/llms/user-avatar-with-menu.md +0 -28
- package/dist/paraglide/.prettierignore +0 -3
- package/dist/paraglide/README.md +0 -162
- package/dist/paraglide/messages/_index.d.ts +0 -106
- package/dist/paraglide/messages/_index.js +0 -439
- package/dist/paraglide/messages/ar.d.ts +0 -23
- package/dist/paraglide/messages/ar.js +0 -38
- package/dist/paraglide/messages/bg.d.ts +0 -23
- package/dist/paraglide/messages/bg.js +0 -38
- package/dist/paraglide/messages/bn.d.ts +0 -23
- package/dist/paraglide/messages/bn.js +0 -38
- package/dist/paraglide/messages/ca.d.ts +0 -23
- package/dist/paraglide/messages/ca.js +0 -38
- package/dist/paraglide/messages/cs.d.ts +0 -23
- package/dist/paraglide/messages/cs.js +0 -38
- package/dist/paraglide/messages/da.d.ts +0 -23
- package/dist/paraglide/messages/da.js +0 -38
- package/dist/paraglide/messages/de.d.ts +0 -23
- package/dist/paraglide/messages/de.js +0 -38
- package/dist/paraglide/messages/el.d.ts +0 -23
- package/dist/paraglide/messages/el.js +0 -38
- package/dist/paraglide/messages/en.d.ts +0 -23
- package/dist/paraglide/messages/en.js +0 -38
- package/dist/paraglide/messages/es.d.ts +0 -23
- package/dist/paraglide/messages/es.js +0 -38
- package/dist/paraglide/messages/fi.d.ts +0 -23
- package/dist/paraglide/messages/fi.js +0 -38
- package/dist/paraglide/messages/fr.d.ts +0 -23
- package/dist/paraglide/messages/fr.js +0 -38
- package/dist/paraglide/messages/he.d.ts +0 -23
- package/dist/paraglide/messages/he.js +0 -38
- package/dist/paraglide/messages/hi.d.ts +0 -23
- package/dist/paraglide/messages/hi.js +0 -38
- package/dist/paraglide/messages/hu.d.ts +0 -23
- package/dist/paraglide/messages/hu.js +0 -38
- package/dist/paraglide/messages/id.d.ts +0 -23
- package/dist/paraglide/messages/id.js +0 -38
- package/dist/paraglide/messages/it.d.ts +0 -23
- package/dist/paraglide/messages/it.js +0 -38
- package/dist/paraglide/messages/ja.d.ts +0 -23
- package/dist/paraglide/messages/ja.js +0 -38
- package/dist/paraglide/messages/ko.d.ts +0 -23
- package/dist/paraglide/messages/ko.js +0 -38
- package/dist/paraglide/messages/lt.d.ts +0 -23
- package/dist/paraglide/messages/lt.js +0 -38
- package/dist/paraglide/messages/lv.d.ts +0 -23
- package/dist/paraglide/messages/lv.js +0 -38
- package/dist/paraglide/messages/ms.d.ts +0 -23
- package/dist/paraglide/messages/ms.js +0 -38
- package/dist/paraglide/messages/nl.d.ts +0 -23
- package/dist/paraglide/messages/nl.js +0 -38
- package/dist/paraglide/messages/no.d.ts +0 -23
- package/dist/paraglide/messages/no.js +0 -38
- package/dist/paraglide/messages/pl.d.ts +0 -23
- package/dist/paraglide/messages/pl.js +0 -38
- package/dist/paraglide/messages/pt.d.ts +0 -23
- package/dist/paraglide/messages/pt.js +0 -38
- package/dist/paraglide/messages/ro.d.ts +0 -23
- package/dist/paraglide/messages/ro.js +0 -38
- package/dist/paraglide/messages/ru.d.ts +0 -23
- package/dist/paraglide/messages/ru.js +0 -38
- package/dist/paraglide/messages/sk.d.ts +0 -23
- package/dist/paraglide/messages/sk.js +0 -38
- package/dist/paraglide/messages/sl.d.ts +0 -23
- package/dist/paraglide/messages/sl.js +0 -38
- package/dist/paraglide/messages/sq.d.ts +0 -23
- package/dist/paraglide/messages/sq.js +0 -38
- package/dist/paraglide/messages/sr.d.ts +0 -23
- package/dist/paraglide/messages/sr.js +0 -38
- package/dist/paraglide/messages/sv.d.ts +0 -23
- package/dist/paraglide/messages/sv.js +0 -38
- package/dist/paraglide/messages/sw.d.ts +0 -23
- package/dist/paraglide/messages/sw.js +0 -38
- package/dist/paraglide/messages/ta.d.ts +0 -23
- package/dist/paraglide/messages/ta.js +0 -38
- package/dist/paraglide/messages/te.d.ts +0 -23
- package/dist/paraglide/messages/te.js +0 -38
- package/dist/paraglide/messages/th.d.ts +0 -23
- package/dist/paraglide/messages/th.js +0 -38
- package/dist/paraglide/messages/tl.d.ts +0 -23
- package/dist/paraglide/messages/tl.js +0 -38
- package/dist/paraglide/messages/tr.d.ts +0 -23
- package/dist/paraglide/messages/tr.js +0 -38
- package/dist/paraglide/messages/uk.d.ts +0 -23
- package/dist/paraglide/messages/uk.js +0 -38
- package/dist/paraglide/messages/vi.d.ts +0 -23
- package/dist/paraglide/messages/vi.js +0 -38
- package/dist/paraglide/messages/zh-CN.d.ts +0 -23
- package/dist/paraglide/messages/zh-CN.js +0 -38
- package/dist/paraglide/messages/zh-TW.d.ts +0 -23
- package/dist/paraglide/messages/zh-TW.js +0 -38
- package/dist/paraglide/messages.d.ts +0 -2
- package/dist/paraglide/messages.js +0 -4
- package/dist/paraglide/registry.d.ts +0 -34
- package/dist/paraglide/registry.js +0 -46
- package/dist/paraglide/runtime.d.ts +0 -758
- package/dist/paraglide/runtime.js +0 -1990
- package/dist/paraglide/server.d.ts +0 -96
- package/dist/paraglide/server.js +0 -277
- package/dist/tera-i18n/README.md +0 -105
- package/dist/tera-i18n/assets/world-flags/Algeria.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/East Timor.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/Rapa Nui.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/abkhazia.svg +0 -23
- package/dist/tera-i18n/assets/world-flags/afghanistan.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/aland islands.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/albania.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/american samoa.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/andorra.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/angola.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/anguilla.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/antigua and barbuda.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/argentina.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/armenia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/aruba.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/australia.svg +0 -21
- package/dist/tera-i18n/assets/world-flags/austria.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/azerbaijan.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/azores islands.svg +0 -21
- package/dist/tera-i18n/assets/world-flags/bahamas.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/bahrain.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/balearic islands.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/bangladesh.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/barbados.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/basque country.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/belarus.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/belgium.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/belize.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/benin.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/bermuda.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/bhutan.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/bolivia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/bonaire.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/bosnia and herzegovina.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/botswana.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/brazil.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/british columbia.svg +0 -31
- package/dist/tera-i18n/assets/world-flags/british indian ocean territory.svg +0 -29
- package/dist/tera-i18n/assets/world-flags/british virgin islands.svg +0 -24
- package/dist/tera-i18n/assets/world-flags/brunei.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/bulgaria.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/burkina faso.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/burundi.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/cambodia.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/cameroon.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/canada.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/canary islands.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/cape verde.svg +0 -23
- package/dist/tera-i18n/assets/world-flags/catalonia.svg +0 -7
- package/dist/tera-i18n/assets/world-flags/cayman islands.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/central african republic.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/ceuta.svg +0 -29
- package/dist/tera-i18n/assets/world-flags/chad.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/chile.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/china.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/cocos island.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/colombia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/comoros.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/cook islands.svg +0 -22
- package/dist/tera-i18n/assets/world-flags/corsica.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/costa rica.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/croatia.svg +0 -31
- package/dist/tera-i18n/assets/world-flags/cuba.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/curacao.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/cyprus.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/czech republic.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/democratic republic of congo.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/denmark.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/djibouti.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/dominica.svg +0 -34
- package/dist/tera-i18n/assets/world-flags/dominican republic.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/ecuador.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/egypt.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/el salvador.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/england.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/equatorial guinea.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/eritrea.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/estonia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/ethiopia.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/european union.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/falkland islands.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/faroe islands.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/fiji.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/finland.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/france.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/french polynesia.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/gabon.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/galapagos islands.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/gambia.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/georgia.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/germany.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/ghana.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/gibraltar.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/greece.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/greenland.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/grenada.svg +0 -27
- package/dist/tera-i18n/assets/world-flags/guam.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/guatemala.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/guernsey.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/guinea bissau.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/guinea.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/guyana.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/haiti.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/hawaii.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/honduras.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/hong kong.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/hungary.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/iceland.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/india.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/indonesia.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/iran.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/iraq.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/ireland.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/isle of man.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/israel.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/italy.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/ivory coast.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/jamaica.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/japan.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/jersey.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/jordan.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/kazakhstan.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/kenya.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/kiribati.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/kosovo.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/kuwait.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/kyrgyzstan.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/laos.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/latvia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/lebanon.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/lesotho.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/liberia.svg +0 -23
- package/dist/tera-i18n/assets/world-flags/libya.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/liechtenstein.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/lithuania.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/luxembourg.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/macao.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/madagascar.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/madeira.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/malawi.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/malaysia.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/maldives.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/mali.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/malta.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/marshall island.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/martinique.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/mauritania.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/mauritius.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/melilla.svg +0 -25
- package/dist/tera-i18n/assets/world-flags/mexico.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/micronesia.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/moldova.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/monaco.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/mongolia.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/montenegro.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/montserrat.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/morocco.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/mozambique.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/myanmar.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/namibia.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/nato.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/nauru.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/nepal.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/netherlands.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/new zealand.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/nicaragua.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/niger.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/nigeria.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/niue.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/norfolk island.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/north korea.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/northern cyprus.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/northern marianas islands.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/norway.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/oman.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/orkney islands.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/ossetia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/pakistan.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/palau.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/palestine.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/panama.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/papua new guinea.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/paraguay.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/peru.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/philippines.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/pitcairn islands.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/poland.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/portugal.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/puerto rico.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/qatar.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/republic of macedonia.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/republic of the congo.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/romania.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/russia.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/rwanda.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/saba island.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/sahrawi arab democratic republic.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/samoa.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/san marino.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/sao tome and prince.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/sardinia.svg +0 -23
- package/dist/tera-i18n/assets/world-flags/saudi arabia.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/scotland.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/senegal.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/serbia.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/seychelles.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/sierra leone.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/singapore.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/sint eustatius.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/sint maarten.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/slovakia.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/slovenia.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/solomon islands.svg +0 -17
- package/dist/tera-i18n/assets/world-flags/somalia.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/somaliland.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/south africa.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/south korea.svg +0 -30
- package/dist/tera-i18n/assets/world-flags/south sudan.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/spain.png +0 -0
- package/dist/tera-i18n/assets/world-flags/spain.svg +0 -676
- package/dist/tera-i18n/assets/world-flags/sri lanka.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/st barts.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/st lucia.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/st vincent and the grenadines.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/sudan.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/suriname.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/swaziland.svg +0 -21
- package/dist/tera-i18n/assets/world-flags/sweden.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/switzerland.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/syria.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/taiwan.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/tajikistan.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/tanzania.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/thailand.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/tibet.svg +0 -22
- package/dist/tera-i18n/assets/world-flags/togo.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/tokelau.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/tonga.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/transnistria.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/trinidad and tobago.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/tunisia.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/turkey.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/turkmenistan.svg +0 -30
- package/dist/tera-i18n/assets/world-flags/turks and caicos.svg +0 -19
- package/dist/tera-i18n/assets/world-flags/tuvalu.svg +0 -25
- package/dist/tera-i18n/assets/world-flags/uganda.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/ukraine.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/united arab emirates.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/united kingdom.svg +0 -23
- package/dist/tera-i18n/assets/world-flags/united nations.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/united states.svg +0 -15
- package/dist/tera-i18n/assets/world-flags/uruguay.svg +0 -16
- package/dist/tera-i18n/assets/world-flags/uzbekista/314/201n.svg +0 -27
- package/dist/tera-i18n/assets/world-flags/uzbekist/303/241n.svg +0 -27
- package/dist/tera-i18n/assets/world-flags/vanuatu.svg +0 -32
- package/dist/tera-i18n/assets/world-flags/vatican city.svg +0 -13
- package/dist/tera-i18n/assets/world-flags/venezuela.svg +0 -20
- package/dist/tera-i18n/assets/world-flags/vietnam.svg +0 -11
- package/dist/tera-i18n/assets/world-flags/virgin islands.svg +0 -18
- package/dist/tera-i18n/assets/world-flags/wales.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/yemen.svg +0 -12
- package/dist/tera-i18n/assets/world-flags/zambia.svg +0 -14
- package/dist/tera-i18n/assets/world-flags/zimbabwe.svg +0 -20
- package/dist/tera-i18n/dev-tools/translator/.env +0 -2
- package/dist/tera-i18n/dev-tools/translator/gpt-translator-calculator-seo.js +0 -79
- package/dist/tera-i18n/dev-tools/translator/gpt-translator-i18n-message.js +0 -274
- package/dist/tera-i18n/dev-tools/translator/gpt-translator.js +0 -128
- package/dist/tera-i18n/dev-tools/translator/index.js +0 -2
- package/dist/tera-i18n/dev-tools/translator/package-lock.json +0 -780
- package/dist/tera-i18n/dev-tools/translator/package.json +0 -20
- package/dist/tera-i18n/dev-tools/translator/prompt/i18n-message-translate-prompt-calculator.md +0 -34
- package/dist/tera-i18n/dev-tools/translator/prompt/i18n-message-translate-prompt-cv-maker.md +0 -149
- package/dist/tera-i18n/dev-tools/translator/prompt/i18n-message-translate-prompt-system.txt +0 -1
- package/dist/tera-i18n/dev-tools/translator/prompt/i18n-message-translate-prompt.txt +0 -14
- package/dist/tera-i18n/dev-tools/translator/tsconfig.json +0 -17
- package/dist/tera-i18n/dev-tools/translator/types/supported-languages.js +0 -90
- package/dist/tera-i18n/projects/common/all-language-data.d.ts +0 -3
- package/dist/tera-i18n/projects/common/all-language-data.js +0 -141
- package/dist/tera-i18n/projects/common/messages/en.json +0 -0
- package/dist/tera-i18n/projects/common/types/language.d.ts +0 -6
- package/dist/tera-i18n/projects/common/types/language.js +0 -1
- package/dist/tera-i18n/projects/cv-maker/messages/ar-AE.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar-EG.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar-IQ.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar-SA.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar-SD.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar-YE.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ar.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/bg.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/bn.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ca.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/cs.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/da.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/de.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/el.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/en-AE.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-AU.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-CA.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-GB.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-ID.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-IN.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-NZ.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-PH.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-PK.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-SA.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-US.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en-ZA.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/en.json +0 -92
- package/dist/tera-i18n/projects/cv-maker/messages/es-419.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/es-AR.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/es-ES.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/es-MX.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/es.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/fi.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/fr-MA.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/fr.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/he.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/hi.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/hr.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/hu.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/id.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/it.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ja.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ko.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/lt.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/lv.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ms-MY.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/ms.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/nl.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/no.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/pl.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/pt-BR.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/pt-PT.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/messages/pt.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ro.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ru.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sk.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sl.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sq.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sr.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sv.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/sw.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/ta.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/te.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/th.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/tl.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/tr.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/uk.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/vi.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/zh-CN.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/zh-TW.json +0 -95
- package/dist/tera-i18n/projects/cv-maker/messages/zh.json +0 -94
- package/dist/tera-i18n/projects/cv-maker/project.inlang/settings.json +0 -84
- package/dist/tera-i18n/projects/cv-maker/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/cv-maker/supported-language.js +0 -81
- package/dist/tera-i18n/projects/mathda/messages/en.json +0 -4
- package/dist/tera-i18n/projects/mathda/messages/vi.json +0 -4
- package/dist/tera-i18n/projects/mathda/project.inlang/settings.json +0 -15
- package/dist/tera-i18n/projects/mathda/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/mathda/supported-language.js +0 -4
- package/dist/tera-i18n/projects/tera-calculator/messages/bg.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/bn.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ca.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/cs.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/da.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/de.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/el.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/en-IN.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/en-PH.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/en-US.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/en.json +0 -189
- package/dist/tera-i18n/projects/tera-calculator/messages/es.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/fi.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/fr.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/hi.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/hu.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/id.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/it.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ja.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ko.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/lt.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/lv.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ms.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/nl.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/no.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/pl.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/pt.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ro.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ru.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sk.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sl.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sq.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sr.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sv.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/sw.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/ta.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/te.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/th.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/tl.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/tr.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/uk.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/vi.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/zh-CN.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/messages/zh-TW.json +0 -183
- package/dist/tera-i18n/projects/tera-calculator/project.inlang/settings.json +0 -57
- package/dist/tera-i18n/projects/tera-calculator/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/tera-calculator/supported-language.js +0 -48
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/de.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/en.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/es.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/fr.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/it.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/ja.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/ko.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/pt.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/ru.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/vi.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/auto-generated/zh-CN.json +0 -1876
- package/dist/tera-i18n/projects/tera-converter/messages/de.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/en.json +0 -42
- package/dist/tera-i18n/projects/tera-converter/messages/es.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/fr.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/it.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/ja.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/ko.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/pt.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/ru.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/vi.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/messages/zh-CN.json +0 -41
- package/dist/tera-i18n/projects/tera-converter/project.inlang/project_id +0 -1
- package/dist/tera-i18n/projects/tera-converter/project.inlang/settings.json +0 -27
- package/dist/tera-i18n/projects/tera-converter/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/tera-converter/supported-language.js +0 -13
- package/dist/tera-i18n/projects/tera-system-ui/messages/ar.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/bg.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/bn.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ca.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/cs.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/da.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/de.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/el.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/en.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/es.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/fi.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/fr.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/he.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/hi.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/hu.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/id.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/it.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ja.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ko.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/lt.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/lv.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ms.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/nl.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/no.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/pl.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/pt.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ro.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ru.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sk.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sl.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sq.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sr.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sv.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/sw.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/ta.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/te.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/th.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/tl.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/tr.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/uk.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/vi.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/zh-CN.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/messages/zh-TW.json +0 -10
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/settings.json +0 -59
- package/dist/tera-i18n/projects/tera-system-ui/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/tera-system-ui/supported-language.js +0 -45
- package/dist/tera-i18n/projects/tera-tools/messages/ar.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/bg.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/bn.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ca.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/cs.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/da.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/de.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/el.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/en.json +0 -96
- package/dist/tera-i18n/projects/tera-tools/messages/es.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/fi.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/fr.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/he.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/hi.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/hu.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/id.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/it.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ja.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ko.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/lt.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/lv.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ms.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/nl.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/no.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/pl.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/pt.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ro.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ru.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sk.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sl.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sq.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sr.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sv.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/sw.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/ta.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/te.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/th.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/tl.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/tr.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/uk.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/vi.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/zh-CN.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/messages/zh-TW.json +0 -70
- package/dist/tera-i18n/projects/tera-tools/project.inlang/project_id +0 -1
- package/dist/tera-i18n/projects/tera-tools/project.inlang/settings.json +0 -61
- package/dist/tera-i18n/projects/tera-tools/supported-language.d.ts +0 -1
- package/dist/tera-i18n/projects/tera-tools/supported-language.js +0 -45
- package/dist/themes/theme-ai.css +0 -100
- package/dist/themes/theme-marketing.css +0 -91
- /package/dist/{components → internal}/icons/IconCheck.svelte.d.ts +0 -0
- /package/dist/{components → internal}/icons/IconChevronDown.svelte.d.ts +0 -0
- /package/dist/{components → internal}/icons/IconSearch.svelte.d.ts +0 -0
- /package/dist/{components → internal}/icons/IconX.svelte.d.ts +0 -0
- /package/dist/{components → internal}/icons/Icons.d.ts +0 -0
- /package/dist/{components → internal}/icons/Icons.js +0 -0
|
@@ -0,0 +1,1123 @@
|
|
|
1
|
+
<script lang="ts">import { onDestroy, onMount } from 'svelte';
|
|
2
|
+
import { bottomSheetStore } from './bottomSheetStore.svelte.js';
|
|
3
|
+
import { bottomSheetRecipe } from './BottomSheet.recipe';
|
|
4
|
+
import { IconX } from "../../internal/icons";
|
|
5
|
+
// ============================================
|
|
6
|
+
// CONFIGURABLE CONSTANTS
|
|
7
|
+
// Adjust these values to customize the bottom sheet behavior
|
|
8
|
+
// ============================================
|
|
9
|
+
const CONFIG = {
|
|
10
|
+
// Scale effect for background container
|
|
11
|
+
scale: {
|
|
12
|
+
factor: 0.06, // How much to scale down (6%)
|
|
13
|
+
borderRadius: 16, // Border radius when scaled (px)
|
|
14
|
+
translateY: 20, // Vertical offset when scaled (px)
|
|
15
|
+
origin: 'top center' // Transform origin
|
|
16
|
+
},
|
|
17
|
+
// Backdrop
|
|
18
|
+
backdrop: {
|
|
19
|
+
maxOpacity: 0.5 // Maximum opacity when fully open
|
|
20
|
+
},
|
|
21
|
+
// Spring physics for open / close / settle, PLAYED ON THE COMPOSITOR via the Web
|
|
22
|
+
// Animations API (see animateTo) so motion holds the display's native refresh rate
|
|
23
|
+
// (e.g. 120Hz) even under main-thread load. `response` is the approximate settle
|
|
24
|
+
// time (s); `damping` is the damping ratio (1 = critical/no bounce, <1 adds a little
|
|
25
|
+
// life). The spring is simulated ONCE per gesture — seeded with the finger's release
|
|
26
|
+
// velocity so motion continues instead of restarting — and emitted as compositor
|
|
27
|
+
// keyframes; there is no per-frame JavaScript. `close` finalizes the instant it
|
|
28
|
+
// reaches offscreen (simulateSpring hideOnArrival) so there is no lingering tail.
|
|
29
|
+
animation: {
|
|
30
|
+
open: { response: 0.4, damping: 0.86 }, // present — quick, no bounce
|
|
31
|
+
close: { response: 0.26, damping: 0.85 }, // dismiss — fast, finalizes on arrival
|
|
32
|
+
snap: { response: 0.32, damping: 0.84 }, // moving between snap points
|
|
33
|
+
restDistance: 0.5, // px from target at which the simulated spring is "settled"
|
|
34
|
+
restVelocity: 40 // px/s below which the simulated spring is "at rest"
|
|
35
|
+
},
|
|
36
|
+
// Gesture handling
|
|
37
|
+
gesture: {
|
|
38
|
+
velocityInfluence: 0.01, // How much velocity affects snap selection
|
|
39
|
+
closeVelocityThreshold: 0.35, // Velocity to trigger close (px/ms)
|
|
40
|
+
closeProgressThreshold: 0.35, // Progress to trigger close (0-1)
|
|
41
|
+
maxLockedDrag: 60, // Max drag when dragToClose disabled (px)
|
|
42
|
+
lockedDragResistance: 0.3, // Resistance when dragToClose disabled
|
|
43
|
+
// Two-phase gesture recognition for interactive elements (iOS-style)
|
|
44
|
+
dragActivationThreshold: 10, // Vertical px to commit to drag from interactive element
|
|
45
|
+
horizontalDeadZone: 1.2, // If abs(dx)/abs(dy) > this, abort drag (let native horizontal win)
|
|
46
|
+
tapDistanceThreshold: 6 // Max total movement (px) to still count as a tap
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
// ============================================
|
|
50
|
+
// COMPONENT PROPS
|
|
51
|
+
// ============================================
|
|
52
|
+
let { id, open = $bindable(false), snapPoints = [0.9], defaultSnapPoint = 0, containerRef = null, scaleTargetRef = null, constrainToContainer = false, scaleBackground = true, dragToClose = true, closeOnBackdrop = true, showCloseButton = false, syncThemeColor = true, onClose, onOpenChange, children, header } = $props();
|
|
53
|
+
// ============================================
|
|
54
|
+
// INTERNAL STATE
|
|
55
|
+
// ============================================
|
|
56
|
+
// DOM references
|
|
57
|
+
let sheetRef = $state(null);
|
|
58
|
+
let contentRef = $state(null);
|
|
59
|
+
let backdropRef = $state(null);
|
|
60
|
+
// Sheet state
|
|
61
|
+
let isVisible = $state(false);
|
|
62
|
+
let isClosing = $state(false);
|
|
63
|
+
let isDragging = $state(false);
|
|
64
|
+
// Plain (NOT $state): written on every drag move (can be ~120/s) but never read
|
|
65
|
+
// reactively (no template / $derived / $effect depends on it). Keeping it out of the
|
|
66
|
+
// reactivity graph avoids a signal write per pointer event on high-refresh displays.
|
|
67
|
+
// During a compositor animation it holds the resting target; the true on-screen value
|
|
68
|
+
// is read from the compositor when a gesture interrupts (readLiveTranslateY).
|
|
69
|
+
let currentTranslateY = 0;
|
|
70
|
+
let sheetHeight = $state(0);
|
|
71
|
+
// Compositor spring engine — programmatic motion (open/close/snap/settle) plays as Web
|
|
72
|
+
// Animations on the compositor thread (see animateTo). currentTranslateY holds the live
|
|
73
|
+
// RESTING position; while an animation runs we read the true on-screen value straight
|
|
74
|
+
// from the compositor (readLiveTranslateY), so grabbing the sheet mid-flight never jumps.
|
|
75
|
+
let sheetAnim = null; // sheet translate
|
|
76
|
+
let backdropAnim = null; // backdrop opacity (kept in sync)
|
|
77
|
+
let scaleAnim = null; // scale-target scale/translate/radius (in sync)
|
|
78
|
+
let scaleTargetPrimed = false; // static scale-target styles set once per open cycle
|
|
79
|
+
// iOS Safari status-bar tint. The full-screen backdrop darkens the area behind the status
|
|
80
|
+
// bar; with no page-level <meta name="theme-color"> Safari re-samples it and flips the bar
|
|
81
|
+
// dark (losing the immersive look). When the page declares none we add one (= page
|
|
82
|
+
// background) for the sheet's open lifetime and remove it on close; a page that sets its own
|
|
83
|
+
// theme-color is left alone — Safari honors it, so the backdrop can't flip it.
|
|
84
|
+
let themeColorMeta = null;
|
|
85
|
+
// Drag tracking
|
|
86
|
+
let dragState = {
|
|
87
|
+
startY: 0,
|
|
88
|
+
startX: 0,
|
|
89
|
+
lastY: 0,
|
|
90
|
+
currentY: 0,
|
|
91
|
+
deltaY: 0,
|
|
92
|
+
startSnapPoint: 0,
|
|
93
|
+
activePointerId: null,
|
|
94
|
+
isTouchActive: false,
|
|
95
|
+
shouldPreventScroll: false,
|
|
96
|
+
history: [],
|
|
97
|
+
// Two-phase gesture recognition for interactive elements
|
|
98
|
+
isPending: false, // Tracking started but not yet committed to drag
|
|
99
|
+
isInteractiveStart: false, // Gesture began on an interactive element
|
|
100
|
+
committed: false, // Gesture has been resolved as a drag
|
|
101
|
+
inScrollable: false // Gesture began inside a [data-bottom-sheet-scroll] area
|
|
102
|
+
};
|
|
103
|
+
// Scroll state
|
|
104
|
+
let scrollableElement = null;
|
|
105
|
+
let isScrolledToTop = true;
|
|
106
|
+
// Backdrop dismiss: the pointerId of a press that STARTED on the backdrop. A genuine
|
|
107
|
+
// dismiss is a full press+release on the backdrop; tracking the origin lets us ignore
|
|
108
|
+
// the stray pointerup that lands on a freshly-mounted backdrop when a press begun
|
|
109
|
+
// elsewhere (e.g. a long-press on a button that opened the sheet) is released over it.
|
|
110
|
+
let backdropPressPointerId = null;
|
|
111
|
+
// Dimensions
|
|
112
|
+
let windowHeight = $state(typeof window !== 'undefined' ? window.innerHeight : 800);
|
|
113
|
+
let containerHeight = $state(0);
|
|
114
|
+
let containerResizeObserver = null;
|
|
115
|
+
let prevOpen = null;
|
|
116
|
+
// ============================================
|
|
117
|
+
// COMPUTED VALUES
|
|
118
|
+
// ============================================
|
|
119
|
+
const r = $derived(bottomSheetRecipe({ constrained: constrainToContainer, dragging: isDragging }));
|
|
120
|
+
const scaleTarget = $derived(scaleTargetRef ?? containerRef);
|
|
121
|
+
const effectiveHeight = $derived(constrainToContainer && containerRef ? containerHeight : windowHeight);
|
|
122
|
+
const maxSnapPoint = $derived(Math.max(...snapPoints));
|
|
123
|
+
const maxSheetHeight = $derived(maxSnapPoint * effectiveHeight);
|
|
124
|
+
const zIndex = $derived(bottomSheetStore.getZIndex(id));
|
|
125
|
+
const currentSnapPoint = $derived(snapPoints[defaultSnapPoint] ?? 0.5);
|
|
126
|
+
const allSnapPoints = $derived([0, ...snapPoints].sort((a, b) => a - b));
|
|
127
|
+
// ============================================
|
|
128
|
+
// LIFECYCLE
|
|
129
|
+
// ============================================
|
|
130
|
+
onMount(() => {
|
|
131
|
+
bottomSheetStore.register(id, { snapPoints, defaultSnapPoint, closeOnBackdrop });
|
|
132
|
+
window.addEventListener('resize', handleWindowResize);
|
|
133
|
+
return () => {
|
|
134
|
+
bottomSheetStore.unregister(id);
|
|
135
|
+
window.removeEventListener('resize', handleWindowResize);
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
onDestroy(() => {
|
|
139
|
+
containerResizeObserver?.disconnect();
|
|
140
|
+
cancelAnimations();
|
|
141
|
+
restoreThemeColor();
|
|
142
|
+
});
|
|
143
|
+
// Motion is driven by direct writes (drag) and Web Animations (open/close/snap), so keep
|
|
144
|
+
// the recipe's CSS `transition` OFF on these elements — otherwise the CSS transition would
|
|
145
|
+
// fight each per-move drag write and smear it. (WAAPI animations are independent of the
|
|
146
|
+
// `transition` property, so turning it off here does not affect them.)
|
|
147
|
+
$effect(() => {
|
|
148
|
+
if (sheetRef)
|
|
149
|
+
sheetRef.style.transition = 'none';
|
|
150
|
+
if (backdropRef)
|
|
151
|
+
backdropRef.style.transition = 'none';
|
|
152
|
+
});
|
|
153
|
+
// Watch containerRef for constrained mode
|
|
154
|
+
$effect(() => {
|
|
155
|
+
if (!containerRef || !constrainToContainer)
|
|
156
|
+
return;
|
|
157
|
+
containerHeight = containerRef.clientHeight;
|
|
158
|
+
containerResizeObserver?.disconnect();
|
|
159
|
+
containerResizeObserver = new ResizeObserver(() => {
|
|
160
|
+
containerHeight = containerRef.clientHeight;
|
|
161
|
+
if (isVisible && !isDragging && sheetRef) {
|
|
162
|
+
sheetHeight = sheetRef.offsetHeight;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
containerResizeObserver.observe(containerRef);
|
|
166
|
+
return () => {
|
|
167
|
+
containerResizeObserver?.disconnect();
|
|
168
|
+
containerResizeObserver = null;
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
// Watch open prop changes
|
|
172
|
+
$effect(() => {
|
|
173
|
+
const shouldOpen = open;
|
|
174
|
+
if (prevOpen === null) {
|
|
175
|
+
prevOpen = shouldOpen;
|
|
176
|
+
if (shouldOpen)
|
|
177
|
+
doOpen();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (shouldOpen && !prevOpen && !isVisible) {
|
|
181
|
+
prevOpen = true;
|
|
182
|
+
doOpen();
|
|
183
|
+
}
|
|
184
|
+
else if (!shouldOpen && prevOpen && isVisible && !isClosing) {
|
|
185
|
+
prevOpen = false;
|
|
186
|
+
doClose();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
// NOTE: The scrollable region ([data-bottom-sheet-scroll]) is resolved lazily
|
|
190
|
+
// at gesture-start from the event target (see getScrollableFromTarget), NOT via
|
|
191
|
+
// a one-shot querySelector here. A single querySelector at open-time cannot see
|
|
192
|
+
// content that is mounted lazily AFTER the sheet opens (e.g. async-loaded lists),
|
|
193
|
+
// which left scrollableElement null and broke drag/scroll arbitration inside it.
|
|
194
|
+
// ============================================
|
|
195
|
+
// CORE FUNCTIONS
|
|
196
|
+
// ============================================
|
|
197
|
+
function handleWindowResize() {
|
|
198
|
+
if (isVisible && !isDragging) {
|
|
199
|
+
windowHeight = window.innerHeight;
|
|
200
|
+
if (sheetRef)
|
|
201
|
+
sheetHeight = sheetRef.offsetHeight;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function recalculateDimensions() {
|
|
205
|
+
if (typeof window !== 'undefined')
|
|
206
|
+
windowHeight = window.innerHeight;
|
|
207
|
+
if (containerRef && constrainToContainer)
|
|
208
|
+
containerHeight = containerRef.clientHeight;
|
|
209
|
+
if (sheetRef)
|
|
210
|
+
sheetHeight = sheetRef.offsetHeight;
|
|
211
|
+
}
|
|
212
|
+
// ============================================
|
|
213
|
+
// COMPOSITOR SPRING ENGINE (Web Animations API)
|
|
214
|
+
// ============================================
|
|
215
|
+
// Open / close / snap / settle play as Web Animations on the COMPOSITOR thread, so they
|
|
216
|
+
// hold the display's native refresh rate (e.g. 120Hz) even when the main thread is busy —
|
|
217
|
+
// the failure mode of a per-frame rAF loop, which must be scheduled on main every frame
|
|
218
|
+
// and drops frames under contention. We simulate the damped spring ONCE per gesture
|
|
219
|
+
// (seeded with the finger's release velocity) to get a position trajectory, then hand it
|
|
220
|
+
// to the compositor as keyframes: NO per-frame JavaScript, store write, or layout during
|
|
221
|
+
// the animation. Drag stays on direct per-input writes (renderPosition) — it must track
|
|
222
|
+
// the finger 1:1, which no pre-baked animation can do.
|
|
223
|
+
const prefersReducedMotion = () => typeof window !== 'undefined' &&
|
|
224
|
+
!!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
225
|
+
/** Convert (response, dampingRatio) to spring stiffness/damping (unit mass). */
|
|
226
|
+
function springConstants(response, damping) {
|
|
227
|
+
const omega = (2 * Math.PI) / response; // natural angular frequency
|
|
228
|
+
return { k: omega * omega, c: 2 * damping * omega };
|
|
229
|
+
}
|
|
230
|
+
// ── Position → visual mappings. Shared by immediate drag writes (renderPosition) and by
|
|
231
|
+
// keyframe generation, so a compositor animation and a live drag paint identically. ──
|
|
232
|
+
function backdropOpacityFor(translateY) {
|
|
233
|
+
const progress = Math.max(0, Math.min(maxSnapPoint, (sheetHeight - translateY) / effectiveHeight));
|
|
234
|
+
return Math.max(0, Math.min(CONFIG.backdrop.maxOpacity, progress * CONFIG.backdrop.maxOpacity));
|
|
235
|
+
}
|
|
236
|
+
function scalePropsFor(translateY) {
|
|
237
|
+
const p = Math.max(0, Math.min(1, (sheetHeight - translateY) / effectiveHeight));
|
|
238
|
+
const { factor, borderRadius, translateY: ty } = CONFIG.scale;
|
|
239
|
+
return {
|
|
240
|
+
scale: String(1 - factor * p),
|
|
241
|
+
translate: `0 ${(ty * p).toFixed(2)}px`,
|
|
242
|
+
borderRadius: `${(borderRadius * p).toFixed(2)}px`
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/** Set the scale target's static (non-animated) styles once per open cycle. */
|
|
246
|
+
function primeScaleTarget() {
|
|
247
|
+
if (scaleTargetPrimed || !scaleTarget || !scaleBackground)
|
|
248
|
+
return;
|
|
249
|
+
scaleTarget.style.transition = 'none';
|
|
250
|
+
scaleTarget.style.transformOrigin = CONFIG.scale.origin;
|
|
251
|
+
scaleTarget.style.overflow = 'hidden';
|
|
252
|
+
scaleTarget.style.willChange = 'scale, translate, border-radius';
|
|
253
|
+
scaleTargetPrimed = true;
|
|
254
|
+
}
|
|
255
|
+
/** Write the whole visual state for a given translateY. Used by DRAG and immediate sets. */
|
|
256
|
+
function renderPosition(translateY) {
|
|
257
|
+
if (sheetRef)
|
|
258
|
+
sheetRef.style.translate = `0 ${translateY}px`;
|
|
259
|
+
const rawProgress = (sheetHeight - translateY) / effectiveHeight;
|
|
260
|
+
const progress = Math.max(0, Math.min(maxSnapPoint, rawProgress));
|
|
261
|
+
updateBackdrop(progress);
|
|
262
|
+
updateScaleTarget(progress);
|
|
263
|
+
bottomSheetStore.updateProgress(id, Math.max(0, Math.min(1, rawProgress)));
|
|
264
|
+
}
|
|
265
|
+
/** Read the sheet's LIVE translateY — reflects a running compositor animation. */
|
|
266
|
+
function readLiveTranslateY() {
|
|
267
|
+
if (!sheetRef)
|
|
268
|
+
return null;
|
|
269
|
+
const t = getComputedStyle(sheetRef).getPropertyValue('translate');
|
|
270
|
+
if (!t || t === 'none')
|
|
271
|
+
return null;
|
|
272
|
+
const parts = t.trim().split(/\s+/);
|
|
273
|
+
const y = parts.length > 1 ? parseFloat(parts[1]) : 0;
|
|
274
|
+
return Number.isFinite(y) ? y : null;
|
|
275
|
+
}
|
|
276
|
+
/** Cancel any in-flight compositor animations (sheet + backdrop + scale). */
|
|
277
|
+
function cancelAnimations() {
|
|
278
|
+
sheetAnim?.cancel();
|
|
279
|
+
backdropAnim?.cancel();
|
|
280
|
+
scaleAnim?.cancel();
|
|
281
|
+
sheetAnim = backdropAnim = scaleAnim = null;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Freeze the sheet at its LIVE on-screen position and stop the animation, so a fresh
|
|
285
|
+
* gesture anchors to exactly what's rendered — no jump. Called when the user grabs the
|
|
286
|
+
* sheet mid-flight. (.cancel() reverts fill:none animations to their base, which is the
|
|
287
|
+
* settled target — so we pin the live value to inline styles FIRST, then cancel.)
|
|
288
|
+
*/
|
|
289
|
+
function interruptAnimation() {
|
|
290
|
+
if (sheetAnim || backdropAnim || scaleAnim) {
|
|
291
|
+
const liveY = readLiveTranslateY();
|
|
292
|
+
if (liveY !== null) {
|
|
293
|
+
currentTranslateY = liveY;
|
|
294
|
+
renderPosition(liveY); // pin translate + backdrop + scale to the live value
|
|
295
|
+
}
|
|
296
|
+
cancelAnimations();
|
|
297
|
+
}
|
|
298
|
+
isClosing = false;
|
|
299
|
+
}
|
|
300
|
+
/** Snap all visuals to a resting target — the base the fill:none animations settle onto. */
|
|
301
|
+
function applyFinal(target) {
|
|
302
|
+
currentTranslateY = target;
|
|
303
|
+
renderPosition(target);
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Simulate a damped spring from startY → targetY seeded with v0 (px/s), returning the
|
|
307
|
+
* position trajectory (evenly spaced in time) and its duration (ms). For close/hide we
|
|
308
|
+
* stop at the FIRST arrival at the target (on the way offscreen) so there is no tail.
|
|
309
|
+
*/
|
|
310
|
+
function simulateSpring(startY, targetY, v0, spring, hideOnArrival) {
|
|
311
|
+
const { restDistance, restVelocity } = CONFIG.animation;
|
|
312
|
+
const { k, c } = springConstants(spring.response, spring.damping);
|
|
313
|
+
const dt = 1 / 90; // keyframe sampling step; compositor interpolates between
|
|
314
|
+
const subSteps = 2; // physics sub-steps per sample (stability at high stiffness)
|
|
315
|
+
const h = dt / subSteps;
|
|
316
|
+
const maxSteps = Math.ceil(1.5 / dt); // safety cap (~1.5s)
|
|
317
|
+
let x = startY;
|
|
318
|
+
let v = v0;
|
|
319
|
+
const ys = [x];
|
|
320
|
+
for (let i = 0; i < maxSteps; i++) {
|
|
321
|
+
for (let s = 0; s < subSteps; s++) {
|
|
322
|
+
const a = -k * (x - targetY) - c * v;
|
|
323
|
+
v += a * h;
|
|
324
|
+
x += v * h;
|
|
325
|
+
}
|
|
326
|
+
if (hideOnArrival && x >= targetY) {
|
|
327
|
+
ys.push(targetY); // reached offscreen — stop before any rebound
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
ys.push(x);
|
|
331
|
+
if (!hideOnArrival && Math.abs(x - targetY) < restDistance && Math.abs(v) < restVelocity) {
|
|
332
|
+
ys[ys.length - 1] = targetY;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return { ys, duration: (ys.length - 1) * dt * 1000 };
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Spring the sheet toward `target`, seeded with `initialVelocity` (px/s) so a flick
|
|
340
|
+
* continues seamlessly. Plays on the COMPOSITOR via the Web Animations API. If a spring
|
|
341
|
+
* is already in flight we read its LIVE position and re-simulate from there, so retargets
|
|
342
|
+
* (and mid-flight direction changes) never jump. The sheet's translate, the backdrop's
|
|
343
|
+
* opacity, and the scale target all animate from ONE simulation with identical timing, so
|
|
344
|
+
* they stay locked together on the compositor with zero per-frame JS.
|
|
345
|
+
*/
|
|
346
|
+
function animateTo(target, spring, initialVelocity = 0, onComplete, hideOnArrival = false) {
|
|
347
|
+
const running = !!(sheetAnim || backdropAnim || scaleAnim);
|
|
348
|
+
const start = running ? (readLiveTranslateY() ?? currentTranslateY) : currentTranslateY;
|
|
349
|
+
cancelAnimations();
|
|
350
|
+
// Reduced motion, or a move too small to be worth animating → jump straight there.
|
|
351
|
+
if (prefersReducedMotion()) {
|
|
352
|
+
applyFinal(target);
|
|
353
|
+
onComplete?.();
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
const { ys, duration } = simulateSpring(start, target, initialVelocity, spring, hideOnArrival);
|
|
357
|
+
if (duration < 8 || ys.length < 2) {
|
|
358
|
+
applyFinal(target);
|
|
359
|
+
onComplete?.();
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if (scaleTarget && scaleBackground)
|
|
363
|
+
primeScaleTarget();
|
|
364
|
+
// Bases = final values, so when the fill:none animations end the elements hold `target`
|
|
365
|
+
// (no revert-to-start flash). The animations override this from t=0 with keyframe[0]=start.
|
|
366
|
+
applyFinal(target);
|
|
367
|
+
const N = ys.length;
|
|
368
|
+
const opts = { duration, easing: 'linear', fill: 'none' };
|
|
369
|
+
const sheetKf = ys.map((y, i) => ({ translate: `0 ${y.toFixed(2)}px`, offset: i / (N - 1) }));
|
|
370
|
+
sheetAnim = sheetRef ? sheetRef.animate(sheetKf, opts) : null;
|
|
371
|
+
if (backdropRef) {
|
|
372
|
+
const kf = ys.map((y, i) => ({ opacity: String(backdropOpacityFor(y)), offset: i / (N - 1) }));
|
|
373
|
+
backdropAnim = backdropRef.animate(kf, opts);
|
|
374
|
+
}
|
|
375
|
+
if (scaleTarget && scaleBackground) {
|
|
376
|
+
const kf = ys.map((y, i) => ({ ...scalePropsFor(y), offset: i / (N - 1) }));
|
|
377
|
+
scaleAnim = scaleTarget.animate(kf, opts);
|
|
378
|
+
}
|
|
379
|
+
// Finalize on natural completion only. .cancel() (retarget / grab) fires oncancel, not
|
|
380
|
+
// onfinish, so a superseded animation never runs the callback.
|
|
381
|
+
if (sheetAnim) {
|
|
382
|
+
sheetAnim.onfinish = () => {
|
|
383
|
+
sheetAnim = backdropAnim = scaleAnim = null;
|
|
384
|
+
onComplete?.();
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
applyFinal(target);
|
|
389
|
+
onComplete?.();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
function doOpen() {
|
|
393
|
+
// Refresh viewport/container dimensions BEFORE the sheet renders, so its
|
|
394
|
+
// height (maxSheetHeight) is derived from current values. While the sheet is
|
|
395
|
+
// closed, windowHeight is not tracked (handleWindowResize is gated on
|
|
396
|
+
// isVisible), so a resize between opens would otherwise leave the first
|
|
397
|
+
// render using a stale height — measured sheetHeight then mismatches the
|
|
398
|
+
// fresh effectiveHeight, shifting the sheet off the bottom edge until the
|
|
399
|
+
// next open. Doing this before isVisible keeps them in sync.
|
|
400
|
+
if (typeof window !== 'undefined')
|
|
401
|
+
windowHeight = window.innerHeight;
|
|
402
|
+
if (containerRef && constrainToContainer)
|
|
403
|
+
containerHeight = containerRef.clientHeight;
|
|
404
|
+
isVisible = true;
|
|
405
|
+
isClosing = false;
|
|
406
|
+
backdropPressPointerId = null; // fresh open — ignore any stale backdrop press id
|
|
407
|
+
applyThemeColor(); // hold the iOS status bar at the page color before the backdrop darkens it
|
|
408
|
+
bottomSheetStore.open(id);
|
|
409
|
+
requestAnimationFrame(() => {
|
|
410
|
+
// sheetRef is bound by this rAF tick.
|
|
411
|
+
recalculateDimensions();
|
|
412
|
+
// Start fully hidden (matches the sheet's initial CSS translate of 100%),
|
|
413
|
+
// then spring up to the target snap point.
|
|
414
|
+
currentTranslateY = sheetHeight;
|
|
415
|
+
renderPosition(sheetHeight);
|
|
416
|
+
const target = sheetHeight - currentSnapPoint * effectiveHeight;
|
|
417
|
+
animateTo(target, CONFIG.animation.open, 0);
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function doClose() {
|
|
421
|
+
if (isClosing)
|
|
422
|
+
return;
|
|
423
|
+
animateSheetClose(0);
|
|
424
|
+
}
|
|
425
|
+
/** Spring the sheet fully down and finalize. `initialVelocity` (px/s) carries a flick-to-dismiss. */
|
|
426
|
+
function animateSheetClose(initialVelocity) {
|
|
427
|
+
isClosing = true;
|
|
428
|
+
animateTo(sheetHeight, CONFIG.animation.close, initialVelocity, () => {
|
|
429
|
+
isVisible = false;
|
|
430
|
+
isClosing = false;
|
|
431
|
+
bottomSheetStore.close(id);
|
|
432
|
+
prevOpen = false;
|
|
433
|
+
open = false;
|
|
434
|
+
resetScaleTarget();
|
|
435
|
+
restoreThemeColor();
|
|
436
|
+
onClose?.();
|
|
437
|
+
onOpenChange?.(false);
|
|
438
|
+
}, true); // hideOnArrival — finalize as soon as it's offscreen, no spring tail
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Settle after a drag release: resolve the target snap point, then spring to it
|
|
442
|
+
* carrying the finger's release velocity so the hand-off is seamless.
|
|
443
|
+
*/
|
|
444
|
+
function settleFromRelease() {
|
|
445
|
+
const nearestSnap = determineSnapPoint();
|
|
446
|
+
const releaseVelocity = calculateVelocity() * 1000; // px/ms → px/s (down = positive)
|
|
447
|
+
if (nearestSnap === 0 && dragToClose) {
|
|
448
|
+
animateSheetClose(releaseVelocity);
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
const snap = nearestSnap > 0 ? nearestSnap : dragState.startSnapPoint;
|
|
452
|
+
const target = sheetHeight - snap * effectiveHeight;
|
|
453
|
+
animateTo(target, CONFIG.animation.snap, releaseVelocity, () => {
|
|
454
|
+
if (!open) {
|
|
455
|
+
prevOpen = true;
|
|
456
|
+
open = true;
|
|
457
|
+
onOpenChange?.(true);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
// ============================================
|
|
462
|
+
// VISUAL UPDATES
|
|
463
|
+
// ============================================
|
|
464
|
+
function updateBackdrop(progress) {
|
|
465
|
+
if (!backdropRef)
|
|
466
|
+
return;
|
|
467
|
+
const opacity = Math.max(0, Math.min(CONFIG.backdrop.maxOpacity, progress * CONFIG.backdrop.maxOpacity));
|
|
468
|
+
backdropRef.style.opacity = String(opacity);
|
|
469
|
+
}
|
|
470
|
+
function updateScaleTarget(progress) {
|
|
471
|
+
if (!scaleTarget || !scaleBackground)
|
|
472
|
+
return;
|
|
473
|
+
// Static props are set ONCE per open cycle (see primeScaleTarget) — re-writing
|
|
474
|
+
// transition / transform-origin / overflow / will-change every frame churns the
|
|
475
|
+
// compositor layer and blows the frame budget on 120Hz displays.
|
|
476
|
+
primeScaleTarget();
|
|
477
|
+
const p = Math.max(0, Math.min(1, progress));
|
|
478
|
+
const { factor, borderRadius, translateY } = CONFIG.scale;
|
|
479
|
+
// Per-frame: scale + translate are GPU-composited (cheap). Quantize border-radius to
|
|
480
|
+
// whole px so it only actually repaints ~a dozen times across the gesture, not 120×/s.
|
|
481
|
+
scaleTarget.style.scale = String(1 - factor * p);
|
|
482
|
+
scaleTarget.style.translate = `0 ${(translateY * p).toFixed(2)}px`;
|
|
483
|
+
scaleTarget.style.borderRadius = `${Math.round(borderRadius * p)}px`;
|
|
484
|
+
}
|
|
485
|
+
function resetScaleTarget() {
|
|
486
|
+
scaleTargetPrimed = false;
|
|
487
|
+
if (!scaleTarget || !scaleBackground)
|
|
488
|
+
return;
|
|
489
|
+
scaleTarget.style.scale = '';
|
|
490
|
+
scaleTarget.style.translate = '';
|
|
491
|
+
scaleTarget.style.borderRadius = '';
|
|
492
|
+
scaleTarget.style.transformOrigin = '';
|
|
493
|
+
scaleTarget.style.overflow = '';
|
|
494
|
+
scaleTarget.style.transition = '';
|
|
495
|
+
scaleTarget.style.willChange = '';
|
|
496
|
+
}
|
|
497
|
+
// ============================================
|
|
498
|
+
// BROWSER CHROME (iOS status-bar tint)
|
|
499
|
+
// ============================================
|
|
500
|
+
function isTransparentColor(color) {
|
|
501
|
+
return !color || color === 'transparent' || color === 'rgba(0, 0, 0, 0)';
|
|
502
|
+
}
|
|
503
|
+
/** First opaque background up the page root — what iOS Safari samples for the status bar. */
|
|
504
|
+
function resolvePageBackgroundColor() {
|
|
505
|
+
if (typeof document === 'undefined')
|
|
506
|
+
return '#ffffff';
|
|
507
|
+
for (const el of [document.body, document.documentElement]) {
|
|
508
|
+
if (!el)
|
|
509
|
+
continue;
|
|
510
|
+
const bg = getComputedStyle(el).backgroundColor;
|
|
511
|
+
if (!isTransparentColor(bg))
|
|
512
|
+
return bg;
|
|
513
|
+
}
|
|
514
|
+
return '#ffffff';
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Keep the iOS Safari status bar immersive while the sheet is open. Acts ONLY when the page
|
|
518
|
+
* declares no <meta name="theme-color"> — the case Safari resolves by sampling the now-darkened
|
|
519
|
+
* backdrop and flipping the bar dark: we add one pinned to the page background (theme-aware,
|
|
520
|
+
* so it also tracks dark mode). A page that sets its own theme-color owns its status bar and
|
|
521
|
+
* is left untouched. restoreThemeColor removes ours on close.
|
|
522
|
+
*/
|
|
523
|
+
function applyThemeColor() {
|
|
524
|
+
if (!syncThemeColor || typeof document === 'undefined' || themeColorMeta)
|
|
525
|
+
return;
|
|
526
|
+
if (document.querySelector('meta[name="theme-color"]'))
|
|
527
|
+
return;
|
|
528
|
+
const meta = document.createElement('meta');
|
|
529
|
+
meta.name = 'theme-color';
|
|
530
|
+
meta.setAttribute('content', resolvePageBackgroundColor());
|
|
531
|
+
document.head.appendChild(meta);
|
|
532
|
+
themeColorMeta = meta;
|
|
533
|
+
}
|
|
534
|
+
/** Remove the theme-color tag we added on open (no-op if we never added one). */
|
|
535
|
+
function restoreThemeColor() {
|
|
536
|
+
themeColorMeta?.remove();
|
|
537
|
+
themeColorMeta = null;
|
|
538
|
+
}
|
|
539
|
+
// ============================================
|
|
540
|
+
// GESTURE UTILITIES
|
|
541
|
+
// ============================================
|
|
542
|
+
function pushHistory(y) {
|
|
543
|
+
const now = performance.now();
|
|
544
|
+
dragState.history = dragState.history.filter(p => now - p.time <= 100);
|
|
545
|
+
dragState.history.push({ y, time: now });
|
|
546
|
+
}
|
|
547
|
+
function clearHistory() {
|
|
548
|
+
dragState.history = [];
|
|
549
|
+
}
|
|
550
|
+
function calculateVelocity() {
|
|
551
|
+
const now = performance.now();
|
|
552
|
+
const recent = dragState.history.filter(p => now - p.time <= 100);
|
|
553
|
+
if (recent.length < 2)
|
|
554
|
+
return 0;
|
|
555
|
+
const first = recent[0];
|
|
556
|
+
const last = recent[recent.length - 1];
|
|
557
|
+
if (!first || !last)
|
|
558
|
+
return 0;
|
|
559
|
+
const dt = last.time - first.time;
|
|
560
|
+
return dt > 0 ? (last.y - first.y) / dt : 0;
|
|
561
|
+
}
|
|
562
|
+
function clampAboveMaxSnap(translateY) {
|
|
563
|
+
// The sheet is only as tall as its MAX snap point, with its bottom pinned to the
|
|
564
|
+
// screen bottom (translateY 0 == fully open to max). Letting translateY go below
|
|
565
|
+
// that (negative) would lift the sheet's bottom edge off the screen and reveal the
|
|
566
|
+
// background in the gap beneath it — which looks broken. So pin it: you cannot drag
|
|
567
|
+
// the sheet frame above its largest detent. This is also what native iOS does — the
|
|
568
|
+
// frame is firm at the top detent; only inner scroll content overscrolls.
|
|
569
|
+
const topLimit = sheetHeight - maxSnapPoint * effectiveHeight;
|
|
570
|
+
return translateY < topLimit ? topLimit : translateY;
|
|
571
|
+
}
|
|
572
|
+
function applyLockedDragResistance(rawTranslateY) {
|
|
573
|
+
// Base translateY when at start snap point: sheetHeight - (startSnapPoint * effectiveHeight)
|
|
574
|
+
const baseTranslateY = sheetHeight - (dragState.startSnapPoint * effectiveHeight);
|
|
575
|
+
const dragDistance = rawTranslateY - baseTranslateY;
|
|
576
|
+
if (dragDistance > 0) {
|
|
577
|
+
const { lockedDragResistance, maxLockedDrag } = CONFIG.gesture;
|
|
578
|
+
const resistedDrag = Math.min(dragDistance * lockedDragResistance, maxLockedDrag);
|
|
579
|
+
return baseTranslateY + resistedDrag;
|
|
580
|
+
}
|
|
581
|
+
return rawTranslateY;
|
|
582
|
+
}
|
|
583
|
+
function findNearestSnapPoint(translateY, velocityInfluence = 0) {
|
|
584
|
+
// Calculate progress: translateY = sheetHeight - (progress * effectiveHeight)
|
|
585
|
+
// So: progress = (sheetHeight - translateY) / effectiveHeight
|
|
586
|
+
const currentProgress = (sheetHeight - translateY) / effectiveHeight;
|
|
587
|
+
const targetProgress = currentProgress + velocityInfluence;
|
|
588
|
+
return allSnapPoints.reduce((nearest, sp) => Math.abs(targetProgress - sp) < Math.abs(targetProgress - nearest) ? sp : nearest, allSnapPoints[0] ?? 0);
|
|
589
|
+
}
|
|
590
|
+
function determineSnapPoint() {
|
|
591
|
+
// Calculate progress: translateY = sheetHeight - (progress * effectiveHeight)
|
|
592
|
+
// So: progress = (sheetHeight - translateY) / effectiveHeight
|
|
593
|
+
const currentProgress = (sheetHeight - currentTranslateY) / effectiveHeight;
|
|
594
|
+
const velocity = calculateVelocity();
|
|
595
|
+
if (!dragToClose) {
|
|
596
|
+
return dragState.startSnapPoint;
|
|
597
|
+
}
|
|
598
|
+
const { closeVelocityThreshold, closeProgressThreshold, velocityInfluence } = CONFIG.gesture;
|
|
599
|
+
// Fast swipe handling
|
|
600
|
+
if (Math.abs(velocity) > closeVelocityThreshold) {
|
|
601
|
+
if (velocity > 0) {
|
|
602
|
+
// Swipe down - close or go to lower snap
|
|
603
|
+
const lowerSnaps = allSnapPoints.filter(sp => sp < dragState.startSnapPoint);
|
|
604
|
+
const lowest = lowerSnaps[lowerSnaps.length - 1];
|
|
605
|
+
if (lowest !== undefined && currentProgress >= lowest * 0.5) {
|
|
606
|
+
return lowest;
|
|
607
|
+
}
|
|
608
|
+
return 0;
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
// Swipe up - go to higher snap
|
|
612
|
+
const higherSnaps = allSnapPoints.filter(sp => sp > currentProgress);
|
|
613
|
+
return higherSnaps[0] ?? Math.max(...snapPoints);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
// Check close threshold
|
|
617
|
+
const progressDrop = dragState.startSnapPoint - currentProgress;
|
|
618
|
+
if (progressDrop > closeProgressThreshold) {
|
|
619
|
+
return 0;
|
|
620
|
+
}
|
|
621
|
+
// Velocity is in px/ms, convert to progress units (divide by effectiveHeight, multiply by 1000 for scale)
|
|
622
|
+
const velocityInProgressUnits = -velocity / effectiveHeight * 1000;
|
|
623
|
+
return findNearestSnapPoint(currentTranslateY, velocityInProgressUnits * velocityInfluence);
|
|
624
|
+
}
|
|
625
|
+
// ============================================
|
|
626
|
+
// TOUCH EVENT HANDLERS
|
|
627
|
+
// ============================================
|
|
628
|
+
function isInDraggableArea(target) {
|
|
629
|
+
return !!(target.closest('[data-bottom-sheet-handle]'));
|
|
630
|
+
}
|
|
631
|
+
function isInteractive(target) {
|
|
632
|
+
return !!target.closest('button, a, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
633
|
+
}
|
|
634
|
+
function shouldIgnoreDrag(target) {
|
|
635
|
+
return !!target.closest('[data-bottom-sheet-no-drag]');
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Resolve the scrollable region ([data-bottom-sheet-scroll]) that contains the
|
|
639
|
+
* gesture target. Resolved per-gesture (not once at open-time) so that content
|
|
640
|
+
* mounted lazily after the sheet opened — and nested/multiple scroll regions —
|
|
641
|
+
* are detected correctly. Returns the nearest scrollable ancestor, or null.
|
|
642
|
+
*/
|
|
643
|
+
function getScrollableFromTarget(target) {
|
|
644
|
+
return target.closest('[data-bottom-sheet-scroll]');
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Install a one-shot capture-phase click listener to suppress the ghost click
|
|
648
|
+
* that fires after a committed drag from an interactive element.
|
|
649
|
+
*/
|
|
650
|
+
function suppressNextClick() {
|
|
651
|
+
if (!sheetRef)
|
|
652
|
+
return;
|
|
653
|
+
const handler = (e) => {
|
|
654
|
+
e.preventDefault();
|
|
655
|
+
e.stopPropagation();
|
|
656
|
+
sheetRef?.removeEventListener('click', handler, true);
|
|
657
|
+
};
|
|
658
|
+
sheetRef.addEventListener('click', handler, true);
|
|
659
|
+
// Safety: auto-remove after a short delay if click never fires
|
|
660
|
+
setTimeout(() => sheetRef?.removeEventListener('click', handler, true), 300);
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Reset all pending/two-phase gesture state fields.
|
|
664
|
+
*/
|
|
665
|
+
function resetPendingState() {
|
|
666
|
+
dragState.isPending = false;
|
|
667
|
+
dragState.isInteractiveStart = false;
|
|
668
|
+
dragState.committed = false;
|
|
669
|
+
dragState.inScrollable = false;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Initialize common drag tracking fields shared by both touch and pointer paths.
|
|
673
|
+
*/
|
|
674
|
+
function initDragTracking(clientX, clientY) {
|
|
675
|
+
dragState.startX = clientX;
|
|
676
|
+
dragState.startY = clientY;
|
|
677
|
+
dragState.lastY = clientY;
|
|
678
|
+
dragState.currentY = currentTranslateY;
|
|
679
|
+
dragState.deltaY = 0;
|
|
680
|
+
dragState.startSnapPoint = Math.round((sheetHeight - currentTranslateY) / effectiveHeight * 100) / 100;
|
|
681
|
+
clearHistory();
|
|
682
|
+
pushHistory(clientY);
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Commit to dragging: transition from pending state to active drag.
|
|
686
|
+
* Re-anchors startY/currentY to the current position to prevent visual jump.
|
|
687
|
+
*/
|
|
688
|
+
function commitToDrag(clientY) {
|
|
689
|
+
dragState.isPending = false;
|
|
690
|
+
dragState.committed = true;
|
|
691
|
+
// Re-anchor to current position so sheet doesn't jump
|
|
692
|
+
dragState.startY = clientY;
|
|
693
|
+
dragState.currentY = currentTranslateY;
|
|
694
|
+
clearHistory();
|
|
695
|
+
pushHistory(clientY);
|
|
696
|
+
interruptAnimation();
|
|
697
|
+
if (scaleTarget)
|
|
698
|
+
scaleTarget.style.transition = 'none';
|
|
699
|
+
isDragging = true;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Check if the pending gesture should be resolved.
|
|
703
|
+
* Returns: 'drag' if vertical threshold exceeded and should drag sheet,
|
|
704
|
+
* 'abort' if horizontal wins or user wants to scroll content,
|
|
705
|
+
* 'pending' if undecided.
|
|
706
|
+
*/
|
|
707
|
+
function resolvePendingGesture(clientX, clientY) {
|
|
708
|
+
const { dragActivationThreshold, horizontalDeadZone } = CONFIG.gesture;
|
|
709
|
+
const absX = Math.abs(clientX - dragState.startX);
|
|
710
|
+
const absY = Math.abs(clientY - dragState.startY);
|
|
711
|
+
const deltaY = clientY - dragState.startY; // positive = finger moving down
|
|
712
|
+
// Horizontal threshold exceeded — let native behavior handle it (slider, scroll, etc.)
|
|
713
|
+
if (absX >= dragActivationThreshold) {
|
|
714
|
+
return 'abort';
|
|
715
|
+
}
|
|
716
|
+
// Vertical threshold exceeded and angle is more vertical than horizontal
|
|
717
|
+
if (absY >= dragActivationThreshold && absY > absX * horizontalDeadZone) {
|
|
718
|
+
// Inside a scrollable area: only commit to drag if pulling DOWN from top (dismiss gesture).
|
|
719
|
+
// If swiping UP (to scroll content down), abort and let native scroll work.
|
|
720
|
+
if (dragState.inScrollable) {
|
|
721
|
+
if (scrollableElement)
|
|
722
|
+
isScrolledToTop = scrollableElement.scrollTop <= 1;
|
|
723
|
+
if (deltaY > 0 && isScrolledToTop) {
|
|
724
|
+
// Pulling down from top → drag sheet (dismiss)
|
|
725
|
+
return 'drag';
|
|
726
|
+
}
|
|
727
|
+
// Swiping up, or not at top → let native scroll handle it
|
|
728
|
+
return 'abort';
|
|
729
|
+
}
|
|
730
|
+
return 'drag';
|
|
731
|
+
}
|
|
732
|
+
return 'pending';
|
|
733
|
+
}
|
|
734
|
+
function handleTouchStart(e) {
|
|
735
|
+
if (dragState.isTouchActive)
|
|
736
|
+
return;
|
|
737
|
+
const target = e.target;
|
|
738
|
+
const inDraggableArea = isInDraggableArea(target);
|
|
739
|
+
// Resolve scrollable region from the actual target so lazily-mounted content is detected.
|
|
740
|
+
scrollableElement = getScrollableFromTarget(target);
|
|
741
|
+
const inScrollable = !!scrollableElement;
|
|
742
|
+
const isInteractiveTarget = isInteractive(target);
|
|
743
|
+
// data-bottom-sheet-no-drag: treat as fully default element — no tracking at all
|
|
744
|
+
if (shouldIgnoreDrag(target) && !inDraggableArea) {
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
if (scrollableElement)
|
|
748
|
+
isScrolledToTop = scrollableElement.scrollTop <= 1;
|
|
749
|
+
if (inScrollable && !isScrolledToTop && !inDraggableArea) {
|
|
750
|
+
dragState.shouldPreventScroll = false;
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
// Initialize tracking for all cases
|
|
754
|
+
const touch = e.touches[0];
|
|
755
|
+
if (!touch)
|
|
756
|
+
return;
|
|
757
|
+
dragState.isTouchActive = true;
|
|
758
|
+
initDragTracking(touch.clientX, touch.clientY);
|
|
759
|
+
// Interactive element (button, input, slider, etc.) NOT in draggable area:
|
|
760
|
+
// Enter pending state — don't commit to drag yet, let threshold decide
|
|
761
|
+
if (isInteractiveTarget && !inDraggableArea) {
|
|
762
|
+
dragState.isPending = true;
|
|
763
|
+
dragState.isInteractiveStart = true;
|
|
764
|
+
dragState.committed = false;
|
|
765
|
+
dragState.inScrollable = inScrollable;
|
|
766
|
+
dragState.shouldPreventScroll = true; // Will be used if we commit
|
|
767
|
+
// Do NOT set isDragging or interrupt the animation yet — allow native
|
|
768
|
+
// touch behavior until the gesture commits, and don't call e.preventDefault().
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
// Non-interactive element: immediately commit to dragging (existing behavior)
|
|
772
|
+
dragState.isPending = false;
|
|
773
|
+
dragState.isInteractiveStart = false;
|
|
774
|
+
dragState.committed = true;
|
|
775
|
+
dragState.shouldPreventScroll = !(inScrollable && isScrolledToTop && !inDraggableArea);
|
|
776
|
+
interruptAnimation();
|
|
777
|
+
if (scaleTarget)
|
|
778
|
+
scaleTarget.style.transition = 'none';
|
|
779
|
+
isDragging = true;
|
|
780
|
+
}
|
|
781
|
+
function handleTouchMove(e) {
|
|
782
|
+
if (!dragState.isTouchActive)
|
|
783
|
+
return;
|
|
784
|
+
const touch = e.touches[0];
|
|
785
|
+
if (!touch)
|
|
786
|
+
return;
|
|
787
|
+
const clientY = touch.clientY;
|
|
788
|
+
const clientX = touch.clientX;
|
|
789
|
+
// ── Two-phase: resolve pending gesture from interactive element ──
|
|
790
|
+
if (dragState.isPending) {
|
|
791
|
+
pushHistory(clientY);
|
|
792
|
+
const result = resolvePendingGesture(clientX, clientY);
|
|
793
|
+
if (result === 'drag') {
|
|
794
|
+
// Vertical intent wins → commit to drag
|
|
795
|
+
commitToDrag(clientY);
|
|
796
|
+
dragState.shouldPreventScroll = true;
|
|
797
|
+
e.preventDefault();
|
|
798
|
+
return; // First real drag frame happens on next move
|
|
799
|
+
}
|
|
800
|
+
if (result === 'abort') {
|
|
801
|
+
// Horizontal intent wins → abort, let native behavior (slider, etc.)
|
|
802
|
+
dragState.isPending = false;
|
|
803
|
+
dragState.committed = false;
|
|
804
|
+
dragState.isTouchActive = false;
|
|
805
|
+
dragState.isInteractiveStart = false;
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
// Still pending — do nothing, let native behavior continue
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
// ── Normal drag logic (committed) ──
|
|
812
|
+
const moveDelta = clientY - dragState.startY;
|
|
813
|
+
dragState.deltaY = clientY - dragState.lastY;
|
|
814
|
+
dragState.lastY = clientY;
|
|
815
|
+
pushHistory(clientY);
|
|
816
|
+
if (scrollableElement)
|
|
817
|
+
isScrolledToTop = scrollableElement.scrollTop <= 1;
|
|
818
|
+
if (isScrolledToTop && moveDelta > 0)
|
|
819
|
+
dragState.shouldPreventScroll = true;
|
|
820
|
+
if (!dragState.shouldPreventScroll)
|
|
821
|
+
return;
|
|
822
|
+
e.preventDefault();
|
|
823
|
+
let translateY = dragState.currentY + moveDelta;
|
|
824
|
+
translateY = clampAboveMaxSnap(translateY);
|
|
825
|
+
if (!dragToClose)
|
|
826
|
+
translateY = applyLockedDragResistance(translateY);
|
|
827
|
+
translateY = Math.min(translateY, sheetHeight);
|
|
828
|
+
currentTranslateY = translateY;
|
|
829
|
+
renderPosition(translateY);
|
|
830
|
+
}
|
|
831
|
+
function handleTouchEnd(e) {
|
|
832
|
+
if (e.touches.length > 0 || !dragState.isTouchActive)
|
|
833
|
+
return;
|
|
834
|
+
dragState.isTouchActive = false;
|
|
835
|
+
// ── Two-phase: pending never resolved (tap) → let native click fire ──
|
|
836
|
+
if (dragState.isPending) {
|
|
837
|
+
resetPendingState();
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
// ── Committed drag from interactive element → suppress ghost click ──
|
|
841
|
+
if (dragState.committed && dragState.isInteractiveStart) {
|
|
842
|
+
suppressNextClick();
|
|
843
|
+
}
|
|
844
|
+
resetPendingState();
|
|
845
|
+
if (!dragState.shouldPreventScroll) {
|
|
846
|
+
isDragging = false;
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
isDragging = false;
|
|
850
|
+
dragState.shouldPreventScroll = false;
|
|
851
|
+
settleFromRelease();
|
|
852
|
+
}
|
|
853
|
+
// ============================================
|
|
854
|
+
// POINTER EVENT HANDLERS (Desktop)
|
|
855
|
+
// ============================================
|
|
856
|
+
function handlePointerDown(e) {
|
|
857
|
+
if (e.pointerType === 'touch' || e.button !== 0 || dragState.activePointerId !== null)
|
|
858
|
+
return;
|
|
859
|
+
const target = e.target;
|
|
860
|
+
const inDraggableArea = isInDraggableArea(target);
|
|
861
|
+
// Resolve scrollable region from the actual target so lazily-mounted content is detected.
|
|
862
|
+
scrollableElement = getScrollableFromTarget(target);
|
|
863
|
+
const inScrollable = !!scrollableElement;
|
|
864
|
+
const isInteractiveTarget = isInteractive(target);
|
|
865
|
+
const shouldIgnoreDragTarget = shouldIgnoreDrag(target);
|
|
866
|
+
// data-bottom-sheet-no-drag: treat as fully default element — no tracking at all
|
|
867
|
+
if (shouldIgnoreDragTarget && !inDraggableArea)
|
|
868
|
+
return;
|
|
869
|
+
if (scrollableElement)
|
|
870
|
+
isScrolledToTop = scrollableElement.scrollTop <= 1;
|
|
871
|
+
if (inScrollable && !isScrolledToTop && !inDraggableArea)
|
|
872
|
+
return;
|
|
873
|
+
dragState.activePointerId = e.pointerId;
|
|
874
|
+
initDragTracking(e.clientX, e.clientY);
|
|
875
|
+
// Interactive element NOT in draggable area:
|
|
876
|
+
// Enter pending state — don't commit yet, preserve native focus/click
|
|
877
|
+
if (isInteractiveTarget && !inDraggableArea) {
|
|
878
|
+
dragState.isPending = true;
|
|
879
|
+
dragState.isInteractiveStart = true;
|
|
880
|
+
dragState.committed = false;
|
|
881
|
+
dragState.inScrollable = inScrollable;
|
|
882
|
+
// Do NOT call e.preventDefault() — preserve focus for inputs
|
|
883
|
+
// Do NOT call setPointerCapture — allow native hover/click behavior
|
|
884
|
+
// Do NOT set isDragging or disable transitions
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
// Non-interactive element: immediately commit to dragging
|
|
888
|
+
dragState.isPending = false;
|
|
889
|
+
dragState.isInteractiveStart = false;
|
|
890
|
+
dragState.committed = true;
|
|
891
|
+
interruptAnimation();
|
|
892
|
+
if (scaleTarget)
|
|
893
|
+
scaleTarget.style.transition = 'none';
|
|
894
|
+
sheetRef?.setPointerCapture(e.pointerId);
|
|
895
|
+
isDragging = true;
|
|
896
|
+
e.preventDefault();
|
|
897
|
+
}
|
|
898
|
+
function handlePointerMove(e) {
|
|
899
|
+
if (e.pointerType === 'touch' || dragState.activePointerId !== e.pointerId)
|
|
900
|
+
return;
|
|
901
|
+
if (!isDragging && !dragState.isPending)
|
|
902
|
+
return;
|
|
903
|
+
const clientY = e.clientY;
|
|
904
|
+
const clientX = e.clientX;
|
|
905
|
+
// ── Two-phase: resolve pending gesture from interactive element ──
|
|
906
|
+
if (dragState.isPending) {
|
|
907
|
+
pushHistory(clientY);
|
|
908
|
+
const result = resolvePendingGesture(clientX, clientY);
|
|
909
|
+
if (result === 'drag') {
|
|
910
|
+
// Vertical intent wins → commit to drag
|
|
911
|
+
commitToDrag(clientY);
|
|
912
|
+
sheetRef?.setPointerCapture(e.pointerId);
|
|
913
|
+
e.preventDefault();
|
|
914
|
+
return; // First real drag frame happens on next move
|
|
915
|
+
}
|
|
916
|
+
if (result === 'abort') {
|
|
917
|
+
// Horizontal intent wins → abort, let native behavior
|
|
918
|
+
dragState.isPending = false;
|
|
919
|
+
dragState.committed = false;
|
|
920
|
+
dragState.activePointerId = null;
|
|
921
|
+
dragState.isInteractiveStart = false;
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
// Still pending — do nothing
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
927
|
+
// ── Normal drag logic (committed) ──
|
|
928
|
+
dragState.deltaY = clientY - dragState.lastY;
|
|
929
|
+
dragState.lastY = clientY;
|
|
930
|
+
pushHistory(clientY);
|
|
931
|
+
let translateY = dragState.currentY + clientY - dragState.startY;
|
|
932
|
+
translateY = clampAboveMaxSnap(translateY);
|
|
933
|
+
if (!dragToClose)
|
|
934
|
+
translateY = applyLockedDragResistance(translateY);
|
|
935
|
+
translateY = Math.min(translateY, sheetHeight);
|
|
936
|
+
currentTranslateY = translateY;
|
|
937
|
+
renderPosition(translateY);
|
|
938
|
+
e.preventDefault();
|
|
939
|
+
}
|
|
940
|
+
function handlePointerUp(e) {
|
|
941
|
+
if (e.pointerType === 'touch' || dragState.activePointerId !== e.pointerId)
|
|
942
|
+
return;
|
|
943
|
+
try {
|
|
944
|
+
sheetRef?.releasePointerCapture(e.pointerId);
|
|
945
|
+
}
|
|
946
|
+
catch {
|
|
947
|
+
}
|
|
948
|
+
dragState.activePointerId = null;
|
|
949
|
+
// ── Two-phase: pending never resolved (tap) → let native click fire ──
|
|
950
|
+
if (dragState.isPending) {
|
|
951
|
+
resetPendingState();
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
// ── Committed drag from interactive element → suppress ghost click ──
|
|
955
|
+
if (dragState.committed && dragState.isInteractiveStart) {
|
|
956
|
+
suppressNextClick();
|
|
957
|
+
}
|
|
958
|
+
resetPendingState();
|
|
959
|
+
if (!isDragging)
|
|
960
|
+
return;
|
|
961
|
+
isDragging = false;
|
|
962
|
+
settleFromRelease();
|
|
963
|
+
}
|
|
964
|
+
function handlePointerCancel(e) {
|
|
965
|
+
if (e.pointerType === 'touch' || dragState.activePointerId !== e.pointerId)
|
|
966
|
+
return;
|
|
967
|
+
try {
|
|
968
|
+
sheetRef?.releasePointerCapture(e.pointerId);
|
|
969
|
+
}
|
|
970
|
+
catch {
|
|
971
|
+
}
|
|
972
|
+
dragState.activePointerId = null;
|
|
973
|
+
// If pending, just reset — nothing visual happened
|
|
974
|
+
if (dragState.isPending) {
|
|
975
|
+
resetPendingState();
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
resetPendingState();
|
|
979
|
+
if (!isDragging)
|
|
980
|
+
return;
|
|
981
|
+
isDragging = false;
|
|
982
|
+
// No velocity on cancel — settle to the nearest snap point at rest.
|
|
983
|
+
const target = sheetHeight - findNearestSnapPoint(currentTranslateY, 0) * effectiveHeight;
|
|
984
|
+
animateTo(target, CONFIG.animation.snap, 0);
|
|
985
|
+
}
|
|
986
|
+
function handleCloseButtonClick(e) {
|
|
987
|
+
e.stopPropagation();
|
|
988
|
+
doClose();
|
|
989
|
+
}
|
|
990
|
+
function handleBackdropPointerDown(e) {
|
|
991
|
+
// Record a press that begins ON the backdrop (and only the backdrop). Used to tell
|
|
992
|
+
// a deliberate backdrop tap apart from the ghost pointerup described below.
|
|
993
|
+
backdropPressPointerId = e.target === backdropRef ? e.pointerId : null;
|
|
994
|
+
}
|
|
995
|
+
function handleBackdropClick(e) {
|
|
996
|
+
// Dismiss only when THIS press both started and ended on the backdrop. Gating on the
|
|
997
|
+
// press origin (not an isAnimating timer) keeps a deliberate tap instant — even mid
|
|
998
|
+
// open-animation — while ignoring the stray release that fires when a press begun
|
|
999
|
+
// elsewhere lifts over a just-mounted backdrop (e.g. long-press a button to open the
|
|
1000
|
+
// sheet, then release: that pointerup lands on the backdrop but never pressed it).
|
|
1001
|
+
const startedOnBackdrop = backdropPressPointerId === e.pointerId;
|
|
1002
|
+
backdropPressPointerId = null;
|
|
1003
|
+
if (!closeOnBackdrop || e.target !== backdropRef || isDragging || !startedOnBackdrop)
|
|
1004
|
+
return;
|
|
1005
|
+
doClose();
|
|
1006
|
+
}
|
|
1007
|
+
function handleKeydown(e) {
|
|
1008
|
+
if (e.key === 'Escape' && isVisible && bottomSheetStore.isTopmost(id)) {
|
|
1009
|
+
e.preventDefault();
|
|
1010
|
+
doClose();
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
// Svelte action for touch events
|
|
1014
|
+
function touchEvents(node) {
|
|
1015
|
+
node.addEventListener('touchstart', handleTouchStart, { passive: false });
|
|
1016
|
+
node.addEventListener('touchmove', handleTouchMove, { passive: false });
|
|
1017
|
+
node.addEventListener('touchend', handleTouchEnd, { passive: true });
|
|
1018
|
+
return {
|
|
1019
|
+
destroy() {
|
|
1020
|
+
node.removeEventListener('touchstart', handleTouchStart);
|
|
1021
|
+
node.removeEventListener('touchmove', handleTouchMove);
|
|
1022
|
+
node.removeEventListener('touchend', handleTouchEnd);
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
</script>
|
|
1027
|
+
|
|
1028
|
+
<svelte:window onkeydown={handleKeydown}/>
|
|
1029
|
+
|
|
1030
|
+
{#if isVisible}
|
|
1031
|
+
<!-- Backdrop -->
|
|
1032
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
1033
|
+
<div
|
|
1034
|
+
bind:this={backdropRef}
|
|
1035
|
+
class={r.backdrop()}
|
|
1036
|
+
style:z-index={zIndex}
|
|
1037
|
+
onpointerdown={handleBackdropPointerDown}
|
|
1038
|
+
onpointerup={handleBackdropClick}
|
|
1039
|
+
></div>
|
|
1040
|
+
|
|
1041
|
+
<!-- Sheet -->
|
|
1042
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
1043
|
+
<div
|
|
1044
|
+
bind:this={sheetRef}
|
|
1045
|
+
class={r.sheet()}
|
|
1046
|
+
style:z-index={zIndex + 1}
|
|
1047
|
+
style:height="{maxSheetHeight}px"
|
|
1048
|
+
data-bottom-sheet-surface
|
|
1049
|
+
role="dialog"
|
|
1050
|
+
aria-modal="true"
|
|
1051
|
+
tabindex={-1}
|
|
1052
|
+
use:touchEvents
|
|
1053
|
+
onpointerdown={handlePointerDown}
|
|
1054
|
+
onpointermove={handlePointerMove}
|
|
1055
|
+
onpointerup={handlePointerUp}
|
|
1056
|
+
onpointercancel={handlePointerCancel}
|
|
1057
|
+
>
|
|
1058
|
+
<!-- Drag Handle -->
|
|
1059
|
+
<div class={r.handle()} data-bottom-sheet-handle>
|
|
1060
|
+
<div class={r.handleBar()}></div>
|
|
1061
|
+
</div>
|
|
1062
|
+
|
|
1063
|
+
<!-- Header -->
|
|
1064
|
+
{#if header}
|
|
1065
|
+
<div class={r.header()} data-bottom-sheet-header>
|
|
1066
|
+
{@render header()}
|
|
1067
|
+
{#if showCloseButton}
|
|
1068
|
+
<button
|
|
1069
|
+
class={r.closeButton()}
|
|
1070
|
+
data-bottom-sheet-close
|
|
1071
|
+
onclick={handleCloseButtonClick}
|
|
1072
|
+
aria-label="Close"
|
|
1073
|
+
type="button"
|
|
1074
|
+
>
|
|
1075
|
+
<IconX class="size-4"/>
|
|
1076
|
+
</button>
|
|
1077
|
+
{/if}
|
|
1078
|
+
</div>
|
|
1079
|
+
{/if}
|
|
1080
|
+
|
|
1081
|
+
<!-- Content -->
|
|
1082
|
+
<div bind:this={contentRef} class={r.content()} data-bottom-sheet-content>
|
|
1083
|
+
{#if children}
|
|
1084
|
+
{@render children()}
|
|
1085
|
+
{/if}
|
|
1086
|
+
</div>
|
|
1087
|
+
</div>
|
|
1088
|
+
{/if}
|
|
1089
|
+
|
|
1090
|
+
<style>
|
|
1091
|
+
/* Consumer-marked scroll region inside the sheet body. */
|
|
1092
|
+
[data-bottom-sheet-content] :global([data-bottom-sheet-scroll]) {
|
|
1093
|
+
flex: 1;
|
|
1094
|
+
overflow-y: auto;
|
|
1095
|
+
overflow-x: hidden;
|
|
1096
|
+
overscroll-behavior: contain;
|
|
1097
|
+
-webkit-overflow-scrolling: touch;
|
|
1098
|
+
min-height: 0;
|
|
1099
|
+
touch-action: pan-y;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/* Suppress native gestures on header children so the drag is captured. */
|
|
1103
|
+
[data-bottom-sheet-header] :global(*) {
|
|
1104
|
+
touch-action: none;
|
|
1105
|
+
user-select: none;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/* Extend the sheet's own surface below its bottom edge. The sheet is only as tall as
|
|
1109
|
+
its max snap point; if it ever sits a hair above the screen bottom — the open spring's
|
|
1110
|
+
slight overshoot, or sub-pixel rounding — this keeps the sliver beneath it sheet-colored
|
|
1111
|
+
instead of letting the background show through. The sheet is overflow-visible so this is
|
|
1112
|
+
not clipped, and it rides along with the sheet's transform. */
|
|
1113
|
+
:global([data-bottom-sheet-surface]::after) {
|
|
1114
|
+
content: '';
|
|
1115
|
+
position: absolute;
|
|
1116
|
+
top: 100%;
|
|
1117
|
+
left: 0;
|
|
1118
|
+
right: 0;
|
|
1119
|
+
height: 100%;
|
|
1120
|
+
background-color: inherit;
|
|
1121
|
+
pointer-events: none;
|
|
1122
|
+
}
|
|
1123
|
+
</style>
|