tempest-react-sdk 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -6
- package/dist/access/Can.cjs +1 -1
- package/dist/access/Can.cjs.map +1 -1
- package/dist/access/Can.js +3 -3
- package/dist/access/Can.js.map +1 -1
- package/dist/audio/level-meter.cjs +1 -1
- package/dist/audio/level-meter.cjs.map +1 -1
- package/dist/audio/level-meter.js +15 -15
- package/dist/audio/level-meter.js.map +1 -1
- package/dist/audio/noise-floor.cjs +2 -0
- package/dist/audio/noise-floor.cjs.map +1 -0
- package/dist/audio/noise-floor.js +27 -0
- package/dist/audio/noise-floor.js.map +1 -0
- package/dist/audio/voice-activity.cjs +2 -0
- package/dist/audio/voice-activity.cjs.map +1 -0
- package/dist/audio/voice-activity.js +26 -0
- package/dist/audio/voice-activity.js.map +1 -0
- package/dist/audio/voice-chain-stages.cjs +2 -0
- package/dist/audio/voice-chain-stages.cjs.map +1 -0
- package/dist/audio/voice-chain-stages.js +82 -0
- package/dist/audio/voice-chain-stages.js.map +1 -0
- package/dist/audio/voice-chain.cjs +2 -0
- package/dist/audio/voice-chain.cjs.map +1 -0
- package/dist/audio/voice-chain.js +74 -0
- package/dist/audio/voice-chain.js.map +1 -0
- package/dist/auth/lazy-with-retry.cjs.map +1 -1
- package/dist/auth/lazy-with-retry.js.map +1 -1
- package/dist/auth/passkey.cjs.map +1 -1
- package/dist/auth/passkey.js.map +1 -1
- package/dist/br/BrazilStateCitySelect.cjs +1 -1
- package/dist/br/BrazilStateCitySelect.cjs.map +1 -1
- package/dist/br/BrazilStateCitySelect.js +36 -28
- package/dist/br/BrazilStateCitySelect.js.map +1 -1
- package/dist/br/data/br-centroids.cjs +1 -1
- package/dist/br/data/br-centroids.cjs.map +1 -1
- package/dist/br/data/br-centroids.js +11105 -11045
- package/dist/br/data/br-centroids.js.map +1 -1
- package/dist/br/data/br-locations.cjs +1 -1
- package/dist/br/data/br-locations.cjs.map +1 -1
- package/dist/br/data/br-locations.js +5803 -137
- package/dist/br/data/br-locations.js.map +1 -1
- package/dist/br/data/br-uf-geo.cjs +1 -1
- package/dist/br/data/br-uf-geo.cjs.map +1 -1
- package/dist/br/data/br-uf-geo.js +5721 -6777
- package/dist/br/data/br-uf-geo.js.map +1 -1
- package/dist/br/data/mun/AC.cjs +1 -1
- package/dist/br/data/mun/AC.cjs.map +1 -1
- package/dist/br/data/mun/AC.js +681 -689
- package/dist/br/data/mun/AC.js.map +1 -1
- package/dist/br/data/mun/AL.cjs +1 -1
- package/dist/br/data/mun/AL.cjs.map +1 -1
- package/dist/br/data/mun/AL.js +949 -844
- package/dist/br/data/mun/AL.js.map +1 -1
- package/dist/br/data/mun/AM.cjs +1 -1
- package/dist/br/data/mun/AM.cjs.map +1 -1
- package/dist/br/data/mun/AM.js +4337 -4218
- package/dist/br/data/mun/AM.js.map +1 -1
- package/dist/br/data/mun/AP.cjs +1 -1
- package/dist/br/data/mun/AP.cjs.map +1 -1
- package/dist/br/data/mun/AP.js +786 -780
- package/dist/br/data/mun/AP.js.map +1 -1
- package/dist/br/data/mun/BA.cjs +1 -1
- package/dist/br/data/mun/BA.cjs.map +1 -1
- package/dist/br/data/mun/BA.js +6329 -5633
- package/dist/br/data/mun/BA.js.map +1 -1
- package/dist/br/data/mun/CE.cjs +1 -1
- package/dist/br/data/mun/CE.cjs.map +1 -1
- package/dist/br/data/mun/CE.js +2544 -2487
- package/dist/br/data/mun/CE.js.map +1 -1
- package/dist/br/data/mun/DF.cjs +1 -1
- package/dist/br/data/mun/DF.cjs.map +1 -1
- package/dist/br/data/mun/DF.js +17 -16
- package/dist/br/data/mun/DF.js.map +1 -1
- package/dist/br/data/mun/ES.cjs +1 -1
- package/dist/br/data/mun/ES.cjs.map +1 -1
- package/dist/br/data/mun/ES.js +1101 -1070
- package/dist/br/data/mun/ES.js.map +1 -1
- package/dist/br/data/mun/GO.cjs +1 -1
- package/dist/br/data/mun/GO.cjs.map +1 -1
- package/dist/br/data/mun/GO.js +4632 -4636
- package/dist/br/data/mun/GO.js.map +1 -1
- package/dist/br/data/mun/MA.cjs +1 -1
- package/dist/br/data/mun/MA.cjs.map +1 -1
- package/dist/br/data/mun/MA.js +3603 -3457
- package/dist/br/data/mun/MA.js.map +1 -1
- package/dist/br/data/mun/MG.cjs +1 -1
- package/dist/br/data/mun/MG.cjs.map +1 -1
- package/dist/br/data/mun/MG.js +12716 -11739
- package/dist/br/data/mun/MG.js.map +1 -1
- package/dist/br/data/mun/MS.cjs +1 -1
- package/dist/br/data/mun/MS.cjs.map +1 -1
- package/dist/br/data/mun/MS.js +2182 -2335
- package/dist/br/data/mun/MS.js.map +1 -1
- package/dist/br/data/mun/MT.cjs +1 -1
- package/dist/br/data/mun/MT.cjs.map +1 -1
- package/dist/br/data/mun/MT.js +4808 -4896
- package/dist/br/data/mun/MT.js.map +1 -1
- package/dist/br/data/mun/PA.cjs +1 -1
- package/dist/br/data/mun/PA.cjs.map +1 -1
- package/dist/br/data/mun/PA.js +4981 -4901
- package/dist/br/data/mun/PA.js.map +1 -1
- package/dist/br/data/mun/PB.cjs +1 -1
- package/dist/br/data/mun/PB.cjs.map +1 -1
- package/dist/br/data/mun/PB.js +2418 -1956
- package/dist/br/data/mun/PB.js.map +1 -1
- package/dist/br/data/mun/PE.cjs +1 -1
- package/dist/br/data/mun/PE.cjs.map +1 -1
- package/dist/br/data/mun/PE.js +2164 -1987
- package/dist/br/data/mun/PE.js.map +1 -1
- package/dist/br/data/mun/PI.cjs +1 -1
- package/dist/br/data/mun/PI.cjs.map +1 -1
- package/dist/br/data/mun/PI.js +2982 -2844
- package/dist/br/data/mun/PI.js.map +1 -1
- package/dist/br/data/mun/PR.cjs +1 -1
- package/dist/br/data/mun/PR.cjs.map +1 -1
- package/dist/br/data/mun/PR.js +5425 -5240
- package/dist/br/data/mun/PR.js.map +1 -1
- package/dist/br/data/mun/RJ.cjs +1 -1
- package/dist/br/data/mun/RJ.cjs.map +1 -1
- package/dist/br/data/mun/RJ.js +1395 -1178
- package/dist/br/data/mun/RJ.js.map +1 -1
- package/dist/br/data/mun/RN.cjs +1 -1
- package/dist/br/data/mun/RN.cjs.map +1 -1
- package/dist/br/data/mun/RN.js +1608 -1382
- package/dist/br/data/mun/RN.js.map +1 -1
- package/dist/br/data/mun/RO.cjs +1 -1
- package/dist/br/data/mun/RO.cjs.map +1 -1
- package/dist/br/data/mun/RO.js +1392 -1470
- package/dist/br/data/mun/RO.js.map +1 -1
- package/dist/br/data/mun/RR.cjs +1 -1
- package/dist/br/data/mun/RR.cjs.map +1 -1
- package/dist/br/data/mun/RR.js +795 -778
- package/dist/br/data/mun/RR.js.map +1 -1
- package/dist/br/data/mun/RS.cjs +1 -1
- package/dist/br/data/mun/RS.cjs.map +1 -1
- package/dist/br/data/mun/RS.js +7579 -6424
- package/dist/br/data/mun/RS.js.map +1 -1
- package/dist/br/data/mun/SC.cjs +1 -1
- package/dist/br/data/mun/SC.cjs.map +1 -1
- package/dist/br/data/mun/SC.js +3979 -3357
- package/dist/br/data/mun/SC.js.map +1 -1
- package/dist/br/data/mun/SE.cjs +1 -1
- package/dist/br/data/mun/SE.cjs.map +1 -1
- package/dist/br/data/mun/SE.js +812 -625
- package/dist/br/data/mun/SE.js.map +1 -1
- package/dist/br/data/mun/SP.cjs +1 -1
- package/dist/br/data/mun/SP.cjs.map +1 -1
- package/dist/br/data/mun/SP.js +7866 -6803
- package/dist/br/data/mun/SP.js.map +1 -1
- package/dist/br/data/mun/TO.cjs +1 -1
- package/dist/br/data/mun/TO.cjs.map +1 -1
- package/dist/br/data/mun/TO.js +2763 -2817
- package/dist/br/data/mun/TO.js.map +1 -1
- package/dist/br/locations.cjs +1 -1
- package/dist/br/locations.cjs.map +1 -1
- package/dist/br/locations.js +97 -24
- package/dist/br/locations.js.map +1 -1
- package/dist/br/scales.cjs +1 -1
- package/dist/br/scales.cjs.map +1 -1
- package/dist/br/scales.js +8 -4
- package/dist/br/scales.js.map +1 -1
- package/dist/br/whatsapp.cjs +2 -0
- package/dist/br/whatsapp.cjs.map +1 -0
- package/dist/br/whatsapp.js +21 -0
- package/dist/br/whatsapp.js.map +1 -0
- package/dist/br.cjs +1 -1
- package/dist/br.cjs.map +1 -1
- package/dist/br.d.ts +188 -10
- package/dist/br.js +18 -17
- package/dist/br.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +30 -27
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/Command/Command.cjs +1 -1
- package/dist/components/Command/Command.cjs.map +1 -1
- package/dist/components/Command/Command.js +78 -75
- package/dist/components/Command/Command.js.map +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.js +42 -39
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.cjs +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +111 -67
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.js +45 -42
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Money/Money.cjs +1 -1
- package/dist/components/Money/Money.cjs.map +1 -1
- package/dist/components/Money/Money.js +10 -9
- package/dist/components/Money/Money.js.map +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.js +38 -31
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.cjs +1 -1
- package/dist/components/Pagination/Pagination.module.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.module.js +4 -4
- package/dist/components/Pagination/Pagination.module.js.map +1 -1
- package/dist/components/Portal/Portal.cjs +1 -1
- package/dist/components/Portal/Portal.cjs.map +1 -1
- package/dist/components/Portal/Portal.js +9 -6
- package/dist/components/Portal/Portal.js.map +1 -1
- package/dist/components/Portal/portal-host.cjs +2 -0
- package/dist/components/Portal/portal-host.cjs.map +1 -0
- package/dist/components/Portal/portal-host.js +11 -0
- package/dist/components/Portal/portal-host.js.map +1 -0
- package/dist/components/Scheduler/Scheduler.cjs +1 -1
- package/dist/components/Scheduler/Scheduler.cjs.map +1 -1
- package/dist/components/Scheduler/Scheduler.js +83 -82
- package/dist/components/Scheduler/Scheduler.js.map +1 -1
- package/dist/components/Toast/ToastProvider.cjs +1 -1
- package/dist/components/Toast/ToastProvider.cjs.map +1 -1
- package/dist/components/Toast/ToastProvider.js +55 -53
- package/dist/components/Toast/ToastProvider.js.map +1 -1
- package/dist/components/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.cjs.map +1 -1
- package/dist/components/VirtualList/VirtualList.js +41 -31
- package/dist/components/VirtualList/VirtualList.js.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.cjs +1 -1
- package/dist/components/VirtualTable/VirtualTable.cjs.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.js +78 -68
- package/dist/components/VirtualTable/VirtualTable.js.map +1 -1
- package/dist/forms/masked-inputs.cjs +1 -1
- package/dist/forms/masked-inputs.cjs.map +1 -1
- package/dist/forms/masked-inputs.js +20 -19
- package/dist/forms/masked-inputs.js.map +1 -1
- package/dist/hooks/use-fullscreen-element.cjs +2 -0
- package/dist/hooks/use-fullscreen-element.cjs.map +1 -0
- package/dist/hooks/use-fullscreen-element.js +20 -0
- package/dist/hooks/use-fullscreen-element.js.map +1 -0
- package/dist/hooks/use-fullscreen.cjs +2 -0
- package/dist/hooks/use-fullscreen.cjs.map +1 -0
- package/dist/hooks/use-fullscreen.js +66 -0
- package/dist/hooks/use-fullscreen.js.map +1 -0
- package/dist/hooks/use-push-to-talk.cjs +2 -0
- package/dist/hooks/use-push-to-talk.cjs.map +1 -0
- package/dist/hooks/use-push-to-talk.js +61 -0
- package/dist/hooks/use-push-to-talk.js.map +1 -0
- package/dist/http/describe-api-error.cjs.map +1 -1
- package/dist/http/describe-api-error.js.map +1 -1
- package/dist/http/errors.cjs +1 -1
- package/dist/http/errors.cjs.map +1 -1
- package/dist/http/errors.js +34 -16
- package/dist/http/errors.js.map +1 -1
- package/dist/http/parse-response.cjs +2 -2
- package/dist/http/parse-response.cjs.map +1 -1
- package/dist/http/parse-response.js +9 -8
- package/dist/http/parse-response.js.map +1 -1
- package/dist/i18n/create-i18n.cjs +1 -1
- package/dist/i18n/create-i18n.cjs.map +1 -1
- package/dist/i18n/create-i18n.js +28 -27
- package/dist/i18n/create-i18n.js.map +1 -1
- package/dist/router/AppRouter.cjs +1 -1
- package/dist/router/AppRouter.cjs.map +1 -1
- package/dist/router/AppRouter.js +28 -21
- package/dist/router/AppRouter.js.map +1 -1
- package/dist/router/RouteGuard.cjs +1 -1
- package/dist/router/RouteGuard.cjs.map +1 -1
- package/dist/router/RouteGuard.js +4 -4
- package/dist/router/RouteGuard.js.map +1 -1
- package/dist/sse/create-event-stream.cjs +1 -1
- package/dist/sse/create-event-stream.cjs.map +1 -1
- package/dist/sse/create-event-stream.js +34 -38
- package/dist/sse/create-event-stream.js.map +1 -1
- package/dist/styles/AIChat.css +79 -0
- package/dist/styles/Accordion.css +12 -0
- package/dist/styles/Alert.css +32 -0
- package/dist/styles/AppBar.css +17 -0
- package/dist/styles/AppShell.css +8 -0
- package/dist/styles/AspectRatio.css +3 -0
- package/dist/styles/AudioPlayer.css +13 -0
- package/dist/styles/AudioRecorder.css +20 -0
- package/dist/styles/Avatar.css +13 -0
- package/dist/styles/AvatarGroup.css +18 -0
- package/dist/styles/Badge.css +25 -0
- package/dist/styles/Banner.css +13 -0
- package/dist/styles/BarList.css +10 -0
- package/dist/styles/BarcodeScanner.css +21 -0
- package/dist/styles/BottomNavigation.css +10 -0
- package/dist/styles/BottomSheet.css +11 -0
- package/dist/styles/BrazilMap.css +20 -0
- package/dist/styles/Breadcrumbs.css +8 -0
- package/dist/styles/Button.css +42 -0
- package/dist/styles/Calendar.css +16 -0
- package/dist/styles/Card.css +15 -0
- package/dist/styles/Carousel.css +17 -0
- package/dist/styles/Center.css +5 -0
- package/dist/styles/Chat.css +35 -0
- package/dist/styles/Checkbox.css +11 -0
- package/dist/styles/ChipInput.css +13 -0
- package/dist/styles/CodeBlock.css +25 -0
- package/dist/styles/Collapsible.css +6 -0
- package/dist/styles/Combobox.css +18 -0
- package/dist/styles/Command.css +20 -0
- package/dist/styles/ContextMenu.css +11 -0
- package/dist/styles/CopyButton.css +4 -0
- package/dist/styles/DataList.css +3 -0
- package/dist/styles/DataTable.css +19 -0
- package/dist/styles/DateRangePicker.css +22 -0
- package/dist/styles/DescriptionList.css +4 -0
- package/dist/styles/Divider.css +11 -0
- package/dist/styles/Drawer.css +22 -0
- package/dist/styles/DropdownMenu.css +16 -0
- package/dist/styles/Dropzone.css +7 -0
- package/dist/styles/EmptyState.css +6 -0
- package/dist/styles/ErrorState.css +6 -0
- package/dist/styles/ErrorText.css +2 -0
- package/dist/styles/FileUpload.css +17 -0
- package/dist/styles/FilterBar.css +19 -0
- package/dist/styles/FloatingActionButton.css +23 -0
- package/dist/styles/Form.css +21 -0
- package/dist/styles/HoverCard.css +11 -0
- package/dist/styles/IconPicker.css +6 -0
- package/dist/styles/Image.css +2 -0
- package/dist/styles/ImageCropper.css +16 -0
- package/dist/styles/Input.css +24 -0
- package/dist/styles/InstallBanner.css +8 -0
- package/dist/styles/Kanban.css +15 -0
- package/dist/styles/Kbd.css +5 -0
- package/dist/styles/Label.css +3 -0
- package/dist/styles/Layout.css +22 -0
- package/dist/styles/Lightbox.css +21 -0
- package/dist/styles/ListTile.css +14 -0
- package/dist/styles/MapLegend.css +9 -0
- package/dist/styles/Markdown.css +24 -0
- package/dist/styles/Masonry.css +4 -0
- package/dist/styles/Menubar.css +17 -0
- package/dist/styles/Modal.css +21 -0
- package/dist/styles/ModalsManager.css +2 -0
- package/dist/styles/MultiSelect.css +21 -0
- package/dist/styles/MunicipalitySearch.css +6 -0
- package/dist/styles/NProgress.css +2 -0
- package/dist/styles/Navbar.css +10 -0
- package/dist/styles/NavigationMenu.css +12 -0
- package/dist/styles/NavigationRail.css +14 -0
- package/dist/styles/NotificationCenter.css +21 -0
- package/dist/styles/OfflineIndicator.css +7 -0
- package/dist/styles/Page.css +13 -0
- package/dist/styles/Pagination.css +12 -0
- package/dist/styles/PasswordInput.css +21 -0
- package/dist/styles/PinInput.css +13 -0
- package/dist/styles/PixQRCode.css +9 -0
- package/dist/styles/Popover.css +10 -0
- package/dist/styles/Progress.css +11 -0
- package/dist/styles/QRCode.css +3 -0
- package/dist/styles/Radio.css +14 -0
- package/dist/styles/RangeSlider.css +15 -0
- package/dist/styles/RatingStars.css +11 -0
- package/dist/styles/RefreshIndicator.css +5 -0
- package/dist/styles/Resizable.css +13 -0
- package/dist/styles/RichTextEditor.css +19 -0
- package/dist/styles/SafeArea.css +7 -0
- package/dist/styles/Scheduler.css +24 -0
- package/dist/styles/ScrollArea.css +7 -0
- package/dist/styles/SearchBar.css +11 -0
- package/dist/styles/SegmentedControl.css +12 -0
- package/dist/styles/Select.css +14 -0
- package/dist/styles/Sidebar.css +19 -0
- package/dist/styles/SignaturePad.css +6 -0
- package/dist/styles/Skeleton.css +7 -0
- package/dist/styles/Slider.css +15 -0
- package/dist/styles/Spacer.css +4 -0
- package/dist/styles/Sparkline.css +4 -0
- package/dist/styles/Spinner.css +12 -0
- package/dist/styles/Stat.css +12 -0
- package/dist/styles/Stepper.css +17 -0
- package/dist/styles/StepperInput.css +15 -0
- package/dist/styles/Switch.css +11 -0
- package/dist/styles/SyncStatusBadge.css +13 -0
- package/dist/styles/Table.css +16 -0
- package/dist/styles/Tabs.css +14 -0
- package/dist/styles/Tag.css +14 -0
- package/dist/styles/Textarea.css +13 -0
- package/dist/styles/TimePicker.css +14 -0
- package/dist/styles/Timeline.css +17 -0
- package/dist/styles/Toast.css +21 -0
- package/dist/styles/Toggle.css +12 -0
- package/dist/styles/ToggleGroup.css +9 -0
- package/dist/styles/Tooltip.css +10 -0
- package/dist/styles/Tour.css +20 -0
- package/dist/styles/TrajectoryMap.css +16 -0
- package/dist/styles/Transfer.css +21 -0
- package/dist/styles/TreeView.css +17 -0
- package/dist/styles/TruncateText.css +2 -0
- package/dist/styles/UpdatePrompt.css +10 -0
- package/dist/styles/VirtualList.css +5 -0
- package/dist/styles/VirtualTable.css +17 -0
- package/dist/styles/VisuallyHidden.css +2 -0
- package/dist/styles/Wizard.css +4 -0
- package/dist/styles/actions.css +104 -0
- package/dist/styles/advanced.css +66 -0
- package/dist/styles/br.css +41 -0
- package/dist/styles/chat.css +113 -0
- package/dist/styles/core.css +40 -0
- package/dist/styles/data.css +222 -0
- package/dist/styles/editor.css +19 -0
- package/dist/styles/feedback.css +201 -0
- package/dist/styles/forms.css +321 -0
- package/dist/styles/geo.css +16 -0
- package/dist/styles/icons.css +6 -0
- package/dist/styles/identity.css +48 -0
- package/dist/styles/layout.css +122 -0
- package/dist/styles/media.css +52 -0
- package/dist/styles/navigation.css +167 -0
- package/dist/styles/overlay.css +73 -0
- package/dist/styles/utility.css +39 -0
- package/dist/styles.css +1 -1
- package/dist/sw/register-service-worker.cjs +1 -1
- package/dist/sw/register-service-worker.cjs.map +1 -1
- package/dist/sw/register-service-worker.js +21 -17
- package/dist/sw/register-service-worker.js.map +1 -1
- package/dist/sw.d.ts +17 -1
- package/dist/tempest-react-sdk.cjs +1 -1
- package/dist/tempest-react-sdk.d.ts +904 -41
- package/dist/tempest-react-sdk.js +293 -286
- package/dist/utils/dev-mode.cjs.map +1 -1
- package/dist/utils/dev-mode.js.map +1 -1
- package/dist/utils/format.cjs +1 -1
- package/dist/utils/format.cjs.map +1 -1
- package/dist/utils/format.js +22 -14
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/intl-cache.cjs +2 -0
- package/dist/utils/intl-cache.cjs.map +1 -0
- package/dist/utils/intl-cache.js +23 -0
- package/dist/utils/intl-cache.js.map +1 -0
- package/dist/utils/json-frame.cjs +2 -0
- package/dist/utils/json-frame.cjs.map +1 -0
- package/dist/utils/json-frame.js +30 -0
- package/dist/utils/json-frame.js.map +1 -0
- package/dist/utils/numbers.cjs +1 -1
- package/dist/utils/numbers.cjs.map +1 -1
- package/dist/utils/numbers.js +8 -7
- package/dist/utils/numbers.js.map +1 -1
- package/dist/vision/results.cjs +1 -1
- package/dist/vision/results.cjs.map +1 -1
- package/dist/vision/results.js +26 -17
- package/dist/vision/results.js.map +1 -1
- package/dist/vision.d.ts +29 -0
- package/dist/vite/tempest-icons.cjs +1 -1
- package/dist/vite/tempest-icons.cjs.map +1 -1
- package/dist/vite/tempest-icons.js +1 -1
- package/dist/vite/tempest-icons.js.map +1 -1
- package/dist/webrtc/link-stats.cjs +2 -0
- package/dist/webrtc/link-stats.cjs.map +1 -0
- package/dist/webrtc/link-stats.js +74 -0
- package/dist/webrtc/link-stats.js.map +1 -0
- package/dist/webrtc/use-link-stats.cjs +2 -0
- package/dist/webrtc/use-link-stats.cjs.map +1 -0
- package/dist/webrtc/use-link-stats.js +22 -0
- package/dist/webrtc/use-link-stats.js.map +1 -0
- package/dist/ws/create-web-socket.cjs +1 -1
- package/dist/ws/create-web-socket.cjs.map +1 -1
- package/dist/ws/create-web-socket.js +81 -85
- package/dist/ws/create-web-socket.js.map +1 -1
- package/dist/ws/use-web-socket.cjs +1 -1
- package/dist/ws/use-web-socket.cjs.map +1 -1
- package/dist/ws/use-web-socket.js +42 -48
- package/dist/ws/use-web-socket.js.map +1 -1
- package/package.json +5 -2
|
@@ -539,10 +539,41 @@ export declare function announce(message: string, politeness?: AnnouncePolitenes
|
|
|
539
539
|
*/
|
|
540
540
|
export declare type AnnouncePoliteness = "polite" | "assertive";
|
|
541
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Any React component, whatever props it declares.
|
|
544
|
+
*
|
|
545
|
+
* Props sit in a *parameter* position, so a bound over them is contravariant:
|
|
546
|
+
* `ComponentType<unknown>` reads as "a component that accepts every possible
|
|
547
|
+
* props object", and only a component that declares no props at all satisfies
|
|
548
|
+
* it. A page typed `({ mode }: Props) => …` is rejected, and so is one whose
|
|
549
|
+
* props are entirely optional. `any` is the only bound that admits every
|
|
550
|
+
* component — which is why React itself declares `lazy` and
|
|
551
|
+
* `LazyExoticComponent` as `ComponentType<any>`. `ComponentType<never>` is not
|
|
552
|
+
* an escape: it fails React's own bound through
|
|
553
|
+
* `ComponentClass.getDerivedStateFromProps`, where the props land back in a
|
|
554
|
+
* covariant position.
|
|
555
|
+
*
|
|
556
|
+
* This relaxes the *bound* only. `T` is still inferred as the concrete
|
|
557
|
+
* component, so the rendered element keeps checking its props and `preload()`
|
|
558
|
+
* still resolves to the concrete module.
|
|
559
|
+
*/
|
|
560
|
+
declare type AnyComponent = ComponentType<any>;
|
|
561
|
+
|
|
542
562
|
declare type AnyEventTarget = EventTarget | {
|
|
543
563
|
current: EventTarget | null;
|
|
544
564
|
} | null | undefined;
|
|
545
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Any page component a route can point at, whatever props it declares.
|
|
568
|
+
*
|
|
569
|
+
* Same contravariance as `lazyWithRetry`, which this field is handed to:
|
|
570
|
+
* `ComponentType<unknown>` means "accepts every possible props object", so a
|
|
571
|
+
* route module default-exporting `({ id }: Props) => …` would not assign here —
|
|
572
|
+
* and neither would one whose props are all optional. React declares its own
|
|
573
|
+
* `lazy` as `ComponentType<any>` for the same reason.
|
|
574
|
+
*/
|
|
575
|
+
declare type AnyRouteComponent = ComponentType<any>;
|
|
576
|
+
|
|
546
577
|
/**
|
|
547
578
|
* Translation key the {@link useDescribeApiError} hook looks up.
|
|
548
579
|
*
|
|
@@ -717,13 +748,21 @@ export declare interface ApiError {
|
|
|
717
748
|
retryAfter?: number;
|
|
718
749
|
/**
|
|
719
750
|
* Field-level messages from a validation response, keyed by the field path
|
|
720
|
-
* the backend named (`"email"`, `"items.0.price"`).
|
|
751
|
+
* the backend named (`"email"`, `"items.0.price"`, `"phone"`).
|
|
721
752
|
*
|
|
722
|
-
* Present
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
753
|
+
* Present whenever the body named a field, through either shape a Tempest
|
|
754
|
+
* stack sends:
|
|
755
|
+
*
|
|
756
|
+
* - FastAPI's validation list — `detail: [{ loc, msg, type }]`, one entry per
|
|
757
|
+
* field, each keyed by its `loc` path.
|
|
758
|
+
* - The singular keys a `tempest-fastapi-sdk` backend uses once it owns the
|
|
759
|
+
* handler — `detail.field`, then top-level `field`, then `details.field`, in
|
|
760
|
+
* that order. There the single value is the same sentence as `detail`.
|
|
761
|
+
*
|
|
762
|
+
* This is the shape a form needs: `detail` is one line for a log or a
|
|
763
|
+
* developer, and pulling the fields back out of it means parsing prose. The
|
|
764
|
+
* first message wins when a field appears twice, because a field shows one
|
|
765
|
+
* error at a time.
|
|
727
766
|
*/
|
|
728
767
|
fields?: Record<string, string>;
|
|
729
768
|
/** The raw parsed error body, when available. */
|
|
@@ -959,7 +998,12 @@ export declare interface AppRouterProps {
|
|
|
959
998
|
basename?: string;
|
|
960
999
|
/** Initial URLs for the `"memory"` router (tests / non-DOM hosts). */
|
|
961
1000
|
initialEntries?: string[];
|
|
962
|
-
/**
|
|
1001
|
+
/**
|
|
1002
|
+
* Suspense fallback shown while a `lazy` route chunk loads, and the default
|
|
1003
|
+
* for a route whose `guard` answers `"pending"` — one spinner covers both
|
|
1004
|
+
* kinds of "not ready yet". A route overrides it with its own
|
|
1005
|
+
* `guardFallback`.
|
|
1006
|
+
*/
|
|
963
1007
|
fallback?: ReactNode;
|
|
964
1008
|
}
|
|
965
1009
|
|
|
@@ -2130,8 +2174,8 @@ declare type CameraStreamStatus = "idle" | "loading" | "ready" | "error";
|
|
|
2130
2174
|
|
|
2131
2175
|
/**
|
|
2132
2176
|
* Conditionally render based on an access check. Renders `children` when the
|
|
2133
|
-
* action is allowed
|
|
2134
|
-
* pending
|
|
2177
|
+
* action is allowed and `fallback` when it is denied. While an async check is
|
|
2178
|
+
* pending it renders `pending`, which defaults to `fallback`.
|
|
2135
2179
|
*
|
|
2136
2180
|
* @example
|
|
2137
2181
|
* ```tsx
|
|
@@ -2139,8 +2183,20 @@ declare type CameraStreamStatus = "idle" | "loading" | "ready" | "error";
|
|
|
2139
2183
|
* <NewPostButton />
|
|
2140
2184
|
* </Can>
|
|
2141
2185
|
* ```
|
|
2186
|
+
*
|
|
2187
|
+
* @example
|
|
2188
|
+
* ```tsx
|
|
2189
|
+
* <Can
|
|
2190
|
+
* action="read"
|
|
2191
|
+
* resource="finance"
|
|
2192
|
+
* fallback={<p>No access</p>}
|
|
2193
|
+
* pending={<Spinner />}
|
|
2194
|
+
* >
|
|
2195
|
+
* <FinancePanel />
|
|
2196
|
+
* </Can>
|
|
2197
|
+
* ```
|
|
2142
2198
|
*/
|
|
2143
|
-
export declare function Can({ action, resource, params, children, fallback }: CanProps): JSX.Element;
|
|
2199
|
+
export declare function Can({ action, resource, params, children, fallback, pending }: CanProps): JSX.Element;
|
|
2144
2200
|
|
|
2145
2201
|
/**
|
|
2146
2202
|
* Arguments describing the access check to perform.
|
|
@@ -2159,6 +2215,16 @@ export declare interface CanProps extends CanParams {
|
|
|
2159
2215
|
children: ReactNode;
|
|
2160
2216
|
/** Rendered when the action is denied. Defaults to nothing. */
|
|
2161
2217
|
fallback?: ReactNode;
|
|
2218
|
+
/**
|
|
2219
|
+
* Rendered while an async check is still in flight. Defaults to
|
|
2220
|
+
* {@link fallback}, which keeps the pre-existing behaviour.
|
|
2221
|
+
*
|
|
2222
|
+
* Worth setting whenever `fallback` says something denial-shaped: without
|
|
2223
|
+
* it, a permission that resolves over the network flashes "no access" to
|
|
2224
|
+
* someone who has it. `pending={null}` renders nothing until the answer
|
|
2225
|
+
* lands; `pending={<Spinner />}` says why the screen is waiting.
|
|
2226
|
+
*/
|
|
2227
|
+
pending?: ReactNode;
|
|
2162
2228
|
}
|
|
2163
2229
|
|
|
2164
2230
|
/**
|
|
@@ -3155,6 +3221,16 @@ export declare interface CreateEventStreamOptions<T> {
|
|
|
3155
3221
|
maxBackoff?: number;
|
|
3156
3222
|
/** Parse `event.data`. Defaults to JSON with raw-string fallback. */
|
|
3157
3223
|
parser?: (raw: string) => T;
|
|
3224
|
+
/**
|
|
3225
|
+
* A frame arrived that is not valid JSON, and no `parser` was supplied.
|
|
3226
|
+
*
|
|
3227
|
+
* Registering this drops the frame instead of delivering it: the previous
|
|
3228
|
+
* behaviour handed `onMessage` the raw `string` announced as your message
|
|
3229
|
+
* type, so the failure surfaced later, at the first property access, with
|
|
3230
|
+
* nothing left pointing at the parse. Leave it out and that behaviour is
|
|
3231
|
+
* kept, with a one-time warning in development builds.
|
|
3232
|
+
*/
|
|
3233
|
+
onParseError?: (error: unknown, raw: string) => void;
|
|
3158
3234
|
onOpen?: () => void;
|
|
3159
3235
|
onMessage?: (message: EventStreamMessage<T>) => void;
|
|
3160
3236
|
onError?: (error: Event) => void;
|
|
@@ -3365,7 +3441,35 @@ export declare interface CreateLaunchDarklyFeatureFlagsAdapterOptions {
|
|
|
3365
3441
|
* const meter = createLevelMeter(stream);
|
|
3366
3442
|
* const tick = () => { bar.style.transform = `scaleX(${meter.level()})`; raf = requestAnimationFrame(tick); };
|
|
3367
3443
|
*/
|
|
3368
|
-
export declare function createLevelMeter(stream: MediaStream, { fftSize, decay }?: LevelMeterOptions): LevelMeter;
|
|
3444
|
+
export declare function createLevelMeter(stream: MediaStream, { fftSize, decay, context: injectedContext }?: LevelMeterOptions): LevelMeter;
|
|
3445
|
+
|
|
3446
|
+
/**
|
|
3447
|
+
* Track one link's throughput, resolution and round trip across samples.
|
|
3448
|
+
*
|
|
3449
|
+
* Every rate here is a **delta**. `bytesSent` is cumulative since the connection
|
|
3450
|
+
* opened, so dividing it by the session length gives the historical average —
|
|
3451
|
+
* a number that only ever falls and never shows what is happening now. The
|
|
3452
|
+
* previous reading is kept on the sampler and subtracted, which is the part
|
|
3453
|
+
* every hand-rolled copy of this ends up rewriting.
|
|
3454
|
+
*
|
|
3455
|
+
* Bytes are summed across every matching sender, because a peer publishing a
|
|
3456
|
+
* camera and a screen at once occupies one uplink with both — and the uplink is
|
|
3457
|
+
* what runs out. Resolution and frame rate come from the **largest** stream by
|
|
3458
|
+
* area, which is the one that dominates that bandwidth and the one somebody
|
|
3459
|
+
* watching the call is looking at.
|
|
3460
|
+
*
|
|
3461
|
+
* @param options - See {@link LinkStatsSamplerOptions}.
|
|
3462
|
+
* @returns A sampler. Use one per `RTCPeerConnection`.
|
|
3463
|
+
*
|
|
3464
|
+
* @example
|
|
3465
|
+
* const sampler = createLinkStatsSampler();
|
|
3466
|
+
*
|
|
3467
|
+
* setInterval(async () => {
|
|
3468
|
+
* const stats = await sampler.sample(pc);
|
|
3469
|
+
* badge.textContent = `${stats.kbps} kbps · ${stats.rttMs ?? "—"} ms`;
|
|
3470
|
+
* }, 2000);
|
|
3471
|
+
*/
|
|
3472
|
+
export declare function createLinkStatsSampler(options?: LinkStatsSamplerOptions): LinkStatsSampler;
|
|
3369
3473
|
|
|
3370
3474
|
/**
|
|
3371
3475
|
* `localStorage`-backed resume storage — the default.
|
|
@@ -4124,6 +4228,41 @@ export declare interface CreateThemeOptions {
|
|
|
4124
4228
|
*/
|
|
4125
4229
|
export declare function createVideoRecorder(stream: MediaStream, options?: VideoRecorderOptions): VideoRecorderHandle;
|
|
4126
4230
|
|
|
4231
|
+
/**
|
|
4232
|
+
* Build the processing a microphone is published through.
|
|
4233
|
+
*
|
|
4234
|
+
* Ordered the way a console is: cut what is not speech, gate what is left, level
|
|
4235
|
+
* it, shape it, set how loud it goes out, then hold a ceiling. **The order is not
|
|
4236
|
+
* cosmetic.** Gating before the high-pass lets a rumble hold the gate open;
|
|
4237
|
+
* compressing before the gate lifts the noise floor up to meet the threshold; and
|
|
4238
|
+
* a limiter placed before the output gain is a ceiling the gain then walks
|
|
4239
|
+
* straight through.
|
|
4240
|
+
*
|
|
4241
|
+
* This sits *after* the browser's own echo cancellation and noise suppression,
|
|
4242
|
+
* which stay on: the two solve different problems. The browser's is trained on
|
|
4243
|
+
* stationary noise inside the capture pipeline; this cuts what it leaves behind
|
|
4244
|
+
* and decides when the line should be silent at all.
|
|
4245
|
+
*
|
|
4246
|
+
* @param source - The captured microphone track.
|
|
4247
|
+
* @param settings - Which stages to build. Default {@link DEFAULT_VOICE_CHAIN}.
|
|
4248
|
+
* @param options - See {@link VoiceChainOptions}.
|
|
4249
|
+
* @returns The track to publish plus its teardown. On an engine with no Web Audio,
|
|
4250
|
+
* and when every stage is off, the source track is handed back untouched and
|
|
4251
|
+
* `supported` is `false` — a call without processing beats a call that throws.
|
|
4252
|
+
* The idle case is decided **before** a context is opened, because browsers cap
|
|
4253
|
+
* how many can be live and one built for a chain that does nothing still counts.
|
|
4254
|
+
*
|
|
4255
|
+
* @example
|
|
4256
|
+
* const floor = await measureNoiseFloor(stream);
|
|
4257
|
+
* const chain = createVoiceChain(micTrack, {
|
|
4258
|
+
* ...DEFAULT_VOICE_CHAIN,
|
|
4259
|
+
* gate: true,
|
|
4260
|
+
* gateThreshold: suggestGateThreshold(floor),
|
|
4261
|
+
* }, { gain: 1.4 });
|
|
4262
|
+
* await mesh.setLocalTrack("mic", chain.track);
|
|
4263
|
+
*/
|
|
4264
|
+
export declare function createVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, { gain, context: injectedContext, ownsSource }?: VoiceChainOptions): VoiceChain;
|
|
4265
|
+
|
|
4127
4266
|
/**
|
|
4128
4267
|
* Open a WebSocket that survives a bad network: exponential backoff with jitter,
|
|
4129
4268
|
* a handshake timeout, a silence watchdog, optional heartbeat pings and typed
|
|
@@ -4239,6 +4378,16 @@ export declare interface CreateWebSocketOptions<T> {
|
|
|
4239
4378
|
maxQueuedMessages?: number;
|
|
4240
4379
|
/** Parse incoming frames. Default: JSON with raw-string fallback. */
|
|
4241
4380
|
parser?: (raw: string) => T;
|
|
4381
|
+
/**
|
|
4382
|
+
* A frame arrived that is not valid JSON, and no `parser` was supplied.
|
|
4383
|
+
*
|
|
4384
|
+
* Registering this drops the frame instead of delivering it: the previous
|
|
4385
|
+
* behaviour handed `onMessage` the raw `string` announced as your message
|
|
4386
|
+
* type, so the failure surfaced later, at the first property access, with
|
|
4387
|
+
* nothing left pointing at the parse. Leave it out and that behaviour is
|
|
4388
|
+
* kept, with a one-time warning in development builds.
|
|
4389
|
+
*/
|
|
4390
|
+
onParseError?: (error: unknown, raw: string) => void;
|
|
4242
4391
|
onOpen?: (event: Event) => void;
|
|
4243
4392
|
onMessage?: (message: WebSocketMessage<T>) => void;
|
|
4244
4393
|
onClose?: (event: CloseEvent) => void;
|
|
@@ -4924,6 +5073,19 @@ export declare const DEFAULT_PUB_KEY_CRED_PARAMS: {
|
|
|
4924
5073
|
alg: number;
|
|
4925
5074
|
}[];
|
|
4926
5075
|
|
|
5076
|
+
/** The key a caller gets when it does not choose one. */
|
|
5077
|
+
export declare const DEFAULT_PUSH_TO_TALK_KEY = "Space";
|
|
5078
|
+
|
|
5079
|
+
/**
|
|
5080
|
+
* What a call wants before anybody touches a slider.
|
|
5081
|
+
*
|
|
5082
|
+
* High-pass, leveller and limiter only. Gate, presence, hiss cut and de-esser are
|
|
5083
|
+
* off because each has an audible cost when it is not needed — a gate set for the
|
|
5084
|
+
* wrong room clips words, presence on a bright microphone is harsh, and a de-esser
|
|
5085
|
+
* on a voice that does not hiss just dulls it.
|
|
5086
|
+
*/
|
|
5087
|
+
export declare const DEFAULT_VOICE_CHAIN: VoiceChainSettings;
|
|
5088
|
+
|
|
4927
5089
|
/**
|
|
4928
5090
|
* Identity helper that types a declarative route tree. Use it so editors give
|
|
4929
5091
|
* autocomplete and type-checking on every node; the array is returned as-is.
|
|
@@ -4952,12 +5114,20 @@ export declare function defineRoutes(routes: TempestRouteObject[]): TempestRoute
|
|
|
4952
5114
|
* offline sentence. This is the step apps skip, and skipping it renders
|
|
4953
5115
|
* "erro 0" or a raw `TypeError` at the user.
|
|
4954
5116
|
* 2. A validation rejection — `error.fields` is set — produces the validation
|
|
4955
|
-
* sentence, **not** `detail`. On a `422` the `detail` line is assembled
|
|
4956
|
-
* the backend's field paths and the validator's own wording
|
|
5117
|
+
* sentence, **not** `detail`. On a FastAPI `422` the `detail` line is assembled
|
|
5118
|
+
* from the backend's field paths and the validator's own wording
|
|
4957
5119
|
* (`"items.0.price: Input should be greater than 0"`), which is right for a
|
|
4958
5120
|
* log and wrong for a person: it is half English in a pt-BR screen and it
|
|
4959
5121
|
* names internals. The per-field messages stay on `fields`, where a form can
|
|
4960
5122
|
* attach them to the inputs that failed.
|
|
5123
|
+
*
|
|
5124
|
+
* This step also catches a business error that named a single field, whose
|
|
5125
|
+
* `detail` **was** a finished sentence ("Cidade não encontrada para o estado
|
|
5126
|
+
* informado."). The trade is deliberate: that sentence is now on `fields`,
|
|
5127
|
+
* against the input it is about, which is where it does the most good. Three
|
|
5128
|
+
* ways back, in order of preference: `codes: { VALIDATION_ERROR: "…" }` (step 0,
|
|
5129
|
+
* which still wins), `validation: error.detail` at the call site, or reading
|
|
5130
|
+
* `error.detail` yourself — it is untouched.
|
|
4961
5131
|
* 3. The backend's own `detail`, which is the most specific thing available and
|
|
4962
5132
|
* is already written for a person — unless `useDetail: false` says that text
|
|
4963
5133
|
* is for developers.
|
|
@@ -5204,11 +5374,21 @@ export declare interface DrawerProps {
|
|
|
5204
5374
|
}
|
|
5205
5375
|
|
|
5206
5376
|
/**
|
|
5207
|
-
* Dropdown menu — list of
|
|
5377
|
+
* Dropdown menu — a list of actions anchored to a trigger, following the
|
|
5378
|
+
* [APG menu button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).
|
|
5379
|
+
*
|
|
5380
|
+
* `role="menu"` is a promise about the keyboard, and this component keeps it:
|
|
5208
5381
|
*
|
|
5209
|
-
* -
|
|
5210
|
-
*
|
|
5211
|
-
* -
|
|
5382
|
+
* - `Enter`, `Space` or `ArrowDown` on the trigger opens and focuses the first
|
|
5383
|
+
* entry; `ArrowUp` opens and focuses the last.
|
|
5384
|
+
* - `ArrowUp` / `ArrowDown` move with wrap, `Home` / `End` jump to the ends.
|
|
5385
|
+
* - `Escape` closes and returns focus to the trigger, so the next `Tab` continues
|
|
5386
|
+
* from where the user was rather than from the top of the document.
|
|
5387
|
+
* - `Tab` closes the menu and lets the page's own tab order take over.
|
|
5388
|
+
* - Focus is managed: entries carry `tabIndex={-1}` and only the active one is
|
|
5389
|
+
* `0`, which is what stops `Tab` from walking the menu one entry at a time.
|
|
5390
|
+
*
|
|
5391
|
+
* Disabled entries, separators and labels are skipped by every movement.
|
|
5212
5392
|
*/
|
|
5213
5393
|
export declare function DropdownMenu({ trigger, items, placement, className, }: DropdownMenuProps): JSX.Element;
|
|
5214
5394
|
|
|
@@ -5220,6 +5400,23 @@ export declare type DropdownMenuEntry = {
|
|
|
5220
5400
|
danger?: boolean;
|
|
5221
5401
|
disabled?: boolean;
|
|
5222
5402
|
onSelect: () => void;
|
|
5403
|
+
} | {
|
|
5404
|
+
/**
|
|
5405
|
+
* An entry that carries on/off state.
|
|
5406
|
+
*
|
|
5407
|
+
* Rendered as `role="menuitemcheckbox"` with `aria-checked`, which is how
|
|
5408
|
+
* a screen reader announces "checked" instead of leaving the state
|
|
5409
|
+
* invisible. Selecting it does **not** close the menu: toggling two
|
|
5410
|
+
* settings in a row is the ordinary case, and closing after the first
|
|
5411
|
+
* would make the second a second trip.
|
|
5412
|
+
*/
|
|
5413
|
+
type: "checkbox";
|
|
5414
|
+
id: string;
|
|
5415
|
+
label: ReactNode;
|
|
5416
|
+
icon?: ReactNode;
|
|
5417
|
+
checked: boolean;
|
|
5418
|
+
disabled?: boolean;
|
|
5419
|
+
onSelect: () => void;
|
|
5223
5420
|
} | {
|
|
5224
5421
|
type: "separator";
|
|
5225
5422
|
id: string;
|
|
@@ -5234,6 +5431,7 @@ export declare type DropdownMenuPlacement = "bottom-start" | "bottom-end" | "top
|
|
|
5234
5431
|
export declare interface DropdownMenuProps {
|
|
5235
5432
|
trigger: ReactElement<{
|
|
5236
5433
|
onClick?: (e: React.MouseEvent) => void;
|
|
5434
|
+
onKeyDown?: (e: KeyboardEvent_2) => void;
|
|
5237
5435
|
"aria-expanded"?: boolean;
|
|
5238
5436
|
"aria-controls"?: string;
|
|
5239
5437
|
"aria-haspopup"?: boolean | "menu";
|
|
@@ -5483,11 +5681,6 @@ export declare interface EventStreamMessage<T> {
|
|
|
5483
5681
|
raw: MessageEvent;
|
|
5484
5682
|
}
|
|
5485
5683
|
|
|
5486
|
-
/**
|
|
5487
|
-
* @tempest-limits function-lines — the body is the SSE line protocol — accumulate
|
|
5488
|
-
* `data:` lines until a blank line, track `id:` for Last-Event-ID, honour `retry:` —
|
|
5489
|
-
* plus the reconnect that uses the id it just tracked.
|
|
5490
|
-
*/
|
|
5491
5684
|
export declare type EventStreamStatus = "idle" | "connecting" | "open" | "closed" | "error";
|
|
5492
5685
|
|
|
5493
5686
|
/**
|
|
@@ -5962,6 +6155,38 @@ export declare function formatDateForInput(value: string | Date): string;
|
|
|
5962
6155
|
*/
|
|
5963
6156
|
export declare function formatDateTime(value: string | Date): string;
|
|
5964
6157
|
|
|
6158
|
+
/**
|
|
6159
|
+
* Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an
|
|
6160
|
+
* `<input type="datetime-local">` accepts.
|
|
6161
|
+
*
|
|
6162
|
+
* The sibling of {@link formatDateForInput}, and it exists for the same reason:
|
|
6163
|
+
* `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`
|
|
6164
|
+
* converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the
|
|
6165
|
+
* next day at 01:00 — here the trap costs the hour as well as the date.
|
|
6166
|
+
*
|
|
6167
|
+
* A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying
|
|
6168
|
+
* a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it
|
|
6169
|
+
* is a different instant from the naive string that looks like it, so it is
|
|
6170
|
+
* converted to the local calendar parts the input has to show.
|
|
6171
|
+
*
|
|
6172
|
+
* Seconds are dropped. A `datetime-local` steps by the minute unless the app
|
|
6173
|
+
* sets `step`, so a `:ss` the field cannot represent would be silently discarded
|
|
6174
|
+
* on the first edit anyway — truncating here keeps the rendered value and the
|
|
6175
|
+
* submitted value the same.
|
|
6176
|
+
*
|
|
6177
|
+
* @example
|
|
6178
|
+
* <input
|
|
6179
|
+
* type="datetime-local"
|
|
6180
|
+
* defaultValue={formatDateTimeForInput(appointment.startsAt)}
|
|
6181
|
+
* />
|
|
6182
|
+
*
|
|
6183
|
+
* @param value - ISO string or Date.
|
|
6184
|
+
* @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is
|
|
6185
|
+
* invalid — which is what a datetime input reads as "no value", unlike
|
|
6186
|
+
* `"Invalid Date"`.
|
|
6187
|
+
*/
|
|
6188
|
+
export declare function formatDateTimeForInput(value: string | Date): string;
|
|
6189
|
+
|
|
5965
6190
|
/**
|
|
5966
6191
|
* Rendering helpers for the numbers a profiler produces.
|
|
5967
6192
|
*/
|
|
@@ -7000,6 +7225,23 @@ export declare function isDefined<T>(value: T | null | undefined): value is T;
|
|
|
7000
7225
|
*/
|
|
7001
7226
|
export declare function isEmpty(value: unknown): boolean;
|
|
7002
7227
|
|
|
7228
|
+
/**
|
|
7229
|
+
* Whether this environment can present anything fullscreen at all.
|
|
7230
|
+
*
|
|
7231
|
+
* Two independent reasons for `false`, and skipping either one ships a button
|
|
7232
|
+
* that does nothing when pressed: the API can be missing (older WebKit, and every
|
|
7233
|
+
* browser on iOS for non-`<video>` elements), or present and **disabled** — a
|
|
7234
|
+
* document inside an `<iframe>` without the `allowfullscreen` attribute exposes
|
|
7235
|
+
* `requestFullscreen` and rejects every call to it, which `fullscreenEnabled`
|
|
7236
|
+
* reports up front.
|
|
7237
|
+
*
|
|
7238
|
+
* An engine that exposes the methods and no flag at all is treated as capable:
|
|
7239
|
+
* the flag is the newer half of the API, so its absence says nothing.
|
|
7240
|
+
*
|
|
7241
|
+
* @returns `true` when a fullscreen request stands a chance of being honoured.
|
|
7242
|
+
*/
|
|
7243
|
+
export declare function isFullscreenSupported(): boolean;
|
|
7244
|
+
|
|
7003
7245
|
/** Whether any turn in the thread is still streaming. */
|
|
7004
7246
|
export declare function isGenerating(messages: readonly AIChatMessage[]): boolean;
|
|
7005
7247
|
|
|
@@ -7162,6 +7404,20 @@ export declare function isValidLongitude(value: number): boolean;
|
|
|
7162
7404
|
/** Whether `MediaRecorder` exists and can produce at least one video container. */
|
|
7163
7405
|
export declare function isVideoRecordingSupported(): boolean;
|
|
7164
7406
|
|
|
7407
|
+
/**
|
|
7408
|
+
* Whether any of this would change the signal.
|
|
7409
|
+
*
|
|
7410
|
+
* A chain that only passes audio through still costs a re-encode and a handful of
|
|
7411
|
+
* nodes, so a caller that rebuilds on every settings change should ask first —
|
|
7412
|
+
* and {@link createVoiceChain} asks too, handing back `source` rather than
|
|
7413
|
+
* building a graph that does nothing.
|
|
7414
|
+
*
|
|
7415
|
+
* @param settings - The stages under consideration.
|
|
7416
|
+
* @param gain - The output multiplier that would be applied. Default `1`.
|
|
7417
|
+
* @returns `true` when the chain would be audibly transparent.
|
|
7418
|
+
*/
|
|
7419
|
+
export declare function isVoiceChainIdle(settings: VoiceChainSettings, gain?: number): boolean;
|
|
7420
|
+
|
|
7165
7421
|
/** The surface every store built by {@link createJsonStorage} exposes. */
|
|
7166
7422
|
export declare interface JsonStorage {
|
|
7167
7423
|
/**
|
|
@@ -7395,13 +7651,22 @@ declare interface LayoutProps {
|
|
|
7395
7651
|
* up the new bundle; a final `location.reload()` recovers from stale
|
|
7396
7652
|
* `index.html`.
|
|
7397
7653
|
*
|
|
7654
|
+
* The wrapped component keeps its own props: `T` is inferred from the module
|
|
7655
|
+
* the factory resolves to, so a page declaring required, optional or no props
|
|
7656
|
+
* all pass through and the rendered element is still checked against them. See
|
|
7657
|
+
* {@link AnyComponent} for why the constraint has to be written the way it is.
|
|
7658
|
+
*
|
|
7659
|
+
* @param factory Dynamic import of the module whose `default` is the component.
|
|
7660
|
+
* @param options Retry count, initial backoff and the final-failure reload.
|
|
7661
|
+
* @returns The lazy component, carrying an extra `preload()`.
|
|
7662
|
+
*
|
|
7398
7663
|
* @example
|
|
7399
7664
|
* const Settings = lazyWithRetry(() => import("./Settings"));
|
|
7400
7665
|
*
|
|
7401
7666
|
* // Warm the chunk when the route becomes likely, not when it is needed.
|
|
7402
7667
|
* <a href="/settings" onMouseEnter={() => void Settings.preload()}>Settings</a>
|
|
7403
7668
|
*/
|
|
7404
|
-
export declare function lazyWithRetry<T extends
|
|
7669
|
+
export declare function lazyWithRetry<T extends AnyComponent>(factory: () => Promise<{
|
|
7405
7670
|
default: T;
|
|
7406
7671
|
}>, options?: LazyWithRetryOptions): PreloadableLazy<T>;
|
|
7407
7672
|
|
|
@@ -7449,8 +7714,21 @@ export declare interface LevelMeterOptions {
|
|
|
7449
7714
|
* A raw RMS reading is jittery enough to make a meter look broken. Attack is left
|
|
7450
7715
|
* instant — a meter that lags the voice going *up* reads as "not recording" —
|
|
7451
7716
|
* while the decay is eased, which is how every hardware meter behaves.
|
|
7717
|
+
*
|
|
7718
|
+
* `0` turns the smoothing off and reports the window's RMS as measured, which is
|
|
7719
|
+
* what a detector wants: {@link monitorVoiceActivity} applies its own release,
|
|
7720
|
+
* and two of them stacked would hold the indicator open long past the speech.
|
|
7452
7721
|
*/
|
|
7453
7722
|
decay?: number;
|
|
7723
|
+
/**
|
|
7724
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
7725
|
+
*
|
|
7726
|
+
* Browsers cap live contexts (Chrome allows around six), and a meter per remote
|
|
7727
|
+
* participant reaches that in a five-person call. A caller measuring several
|
|
7728
|
+
* streams should open one context and hand it to every meter. `stop()` closes
|
|
7729
|
+
* only a context this meter created — an injected one belongs to the caller.
|
|
7730
|
+
*/
|
|
7731
|
+
context?: AudioContext;
|
|
7454
7732
|
}
|
|
7455
7733
|
|
|
7456
7734
|
/**
|
|
@@ -7530,6 +7808,78 @@ export declare interface LimiterSettings {
|
|
|
7530
7808
|
|
|
7531
7809
|
export { Link }
|
|
7532
7810
|
|
|
7811
|
+
/**
|
|
7812
|
+
* One link's outbound picture, in the shape a call UI actually renders.
|
|
7813
|
+
*
|
|
7814
|
+
* Everything here is derived, not reported: WebRTC hands out cumulative
|
|
7815
|
+
* counters and a graph of candidate pairs, and turning that into
|
|
7816
|
+
* `"1,2 Mbps · 42 ms · 1080p60"` is the work {@link createLinkStatsSampler}
|
|
7817
|
+
* does.
|
|
7818
|
+
*/
|
|
7819
|
+
export declare interface LinkStats {
|
|
7820
|
+
/** Throughput since the previous sample. `0` on the first one — there is no delta yet. */
|
|
7821
|
+
kbps: number;
|
|
7822
|
+
/** Width of the largest stream being sent, or `0` before one is reported. */
|
|
7823
|
+
width: number;
|
|
7824
|
+
/** Height of the largest stream being sent, or `0` before one is reported. */
|
|
7825
|
+
height: number;
|
|
7826
|
+
/** Frame rate of the largest stream being sent, or `0` when the browser omits it. */
|
|
7827
|
+
fps: number;
|
|
7828
|
+
/** Round trip to the peer in milliseconds, or `null` before the first reading. */
|
|
7829
|
+
rttMs: number | null;
|
|
7830
|
+
}
|
|
7831
|
+
|
|
7832
|
+
/** Which media a sampler counts. */
|
|
7833
|
+
export declare type LinkStatsKind = "video" | "audio" | "all";
|
|
7834
|
+
|
|
7835
|
+
/**
|
|
7836
|
+
* A sampler bound to one connection.
|
|
7837
|
+
*
|
|
7838
|
+
* Holds the previous byte counter and timestamp, which is the whole reason this
|
|
7839
|
+
* is an object rather than a function: the rate is a delta, so somebody has to
|
|
7840
|
+
* remember the last reading. One sampler per link — sharing one across peers
|
|
7841
|
+
* subtracts one connection's counter from another's and reports nonsense.
|
|
7842
|
+
*/
|
|
7843
|
+
export declare interface LinkStatsSampler {
|
|
7844
|
+
/**
|
|
7845
|
+
* Reduce a report you already have.
|
|
7846
|
+
*
|
|
7847
|
+
* @param report - A report from `RTCPeerConnection.getStats()`.
|
|
7848
|
+
* @returns The stats for this sample.
|
|
7849
|
+
*/
|
|
7850
|
+
read: (report: RTCStatsReport) => LinkStats;
|
|
7851
|
+
/**
|
|
7852
|
+
* Fetch a report and reduce it.
|
|
7853
|
+
*
|
|
7854
|
+
* @param connection - The connection to sample.
|
|
7855
|
+
* @returns The stats for this sample.
|
|
7856
|
+
*/
|
|
7857
|
+
sample: (connection: RTCPeerConnection) => Promise<LinkStats>;
|
|
7858
|
+
/**
|
|
7859
|
+
* Drop the baseline the rate is derived from.
|
|
7860
|
+
*
|
|
7861
|
+
* Call it after an ICE restart, a reconnect, or a pause — otherwise the next
|
|
7862
|
+
* sample divides the bytes of the whole gap by the whole gap and reports the
|
|
7863
|
+
* average of a period nobody is asking about. The next reading comes back at
|
|
7864
|
+
* `0` kbps and starts a fresh baseline; the resolution and round trip already
|
|
7865
|
+
* on screen are kept, so the badge does not blank out.
|
|
7866
|
+
*/
|
|
7867
|
+
reset: () => void;
|
|
7868
|
+
}
|
|
7869
|
+
|
|
7870
|
+
/** Options for {@link createLinkStatsSampler}. */
|
|
7871
|
+
export declare interface LinkStatsSamplerOptions {
|
|
7872
|
+
/**
|
|
7873
|
+
* Which media the throughput counts. Default `"video"`.
|
|
7874
|
+
*
|
|
7875
|
+
* Video is the default because it is what saturates an uplink — audio is an
|
|
7876
|
+
* order of magnitude cheaper, and mixing it in moves the number by less than
|
|
7877
|
+
* the noise between two samples. Use `"all"` when the figure is meant to be
|
|
7878
|
+
* the connection's real cost rather than the picture's.
|
|
7879
|
+
*/
|
|
7880
|
+
kind?: LinkStatsKind;
|
|
7881
|
+
}
|
|
7882
|
+
|
|
7533
7883
|
export declare interface ListOptions<TItem> {
|
|
7534
7884
|
/** Property to order by. Default: `keyPath`. */
|
|
7535
7885
|
orderBy?: keyof TItem & string;
|
|
@@ -7800,6 +8150,29 @@ export declare interface MasonryProps<T> extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
7800
8150
|
*/
|
|
7801
8151
|
export declare function matrixToPath(matrix: QRMatrix, margin?: number): string;
|
|
7802
8152
|
|
|
8153
|
+
/**
|
|
8154
|
+
* Listen to a room at rest and report how loud its silence is.
|
|
8155
|
+
*
|
|
8156
|
+
* The number a person cannot guess. Setting a gate by ear means switching it on
|
|
8157
|
+
* and hearing what disappeared, which only works if you already know what should
|
|
8158
|
+
* have disappeared — so the usual outcome is leaving it at a default that is
|
|
8159
|
+
* wrong for that room. Measuring replaces the guess.
|
|
8160
|
+
*
|
|
8161
|
+
* The result is the **peak** RMS window observed, not the average: a threshold
|
|
8162
|
+
* under the loudest thing the quiet room did will be opened by that thing.
|
|
8163
|
+
*
|
|
8164
|
+
* @param stream - A live capture of the room while nobody speaks.
|
|
8165
|
+
* @param options - See {@link NoiseFloorOptions}.
|
|
8166
|
+
* @returns The peak RMS observed, `0..1`. `0` when this engine has no Web Audio
|
|
8167
|
+
* or the stream carries no audio track — which {@link suggestGateThreshold}
|
|
8168
|
+
* turns into its own floor rather than into a gate that never opens.
|
|
8169
|
+
*
|
|
8170
|
+
* @example
|
|
8171
|
+
* const floor = await measureNoiseFloor(stream, { onProgress: setProgress });
|
|
8172
|
+
* setThreshold(suggestGateThreshold(floor));
|
|
8173
|
+
*/
|
|
8174
|
+
export declare function measureNoiseFloor(stream: MediaStream, { onProgress, durationMs, context: injectedContext, }?: NoiseFloorOptions): Promise<number>;
|
|
8175
|
+
|
|
7803
8176
|
/** A classified capture error with a human-readable, English message. */
|
|
7804
8177
|
export declare interface MediaAccessError {
|
|
7805
8178
|
kind: MediaAccessErrorKind;
|
|
@@ -8096,6 +8469,56 @@ export declare interface MoneyProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
8096
8469
|
locale?: string;
|
|
8097
8470
|
}
|
|
8098
8471
|
|
|
8472
|
+
/**
|
|
8473
|
+
* Report when a track is carrying speech.
|
|
8474
|
+
*
|
|
8475
|
+
* Runs entirely on the **receiving** side, over a track the connection already
|
|
8476
|
+
* delivers, and that is the whole point: a speaking indicator changes several
|
|
8477
|
+
* times per second, so signalling it through a server floods the room with
|
|
8478
|
+
* messages carrying information every client can derive for free.
|
|
8479
|
+
*
|
|
8480
|
+
* Two details separate this from a threshold on a level meter:
|
|
8481
|
+
*
|
|
8482
|
+
* 1. **The release.** RMS drops to nothing in the gaps between words, so a bare
|
|
8483
|
+
* comparison strobes on every syllable. The state only falls after
|
|
8484
|
+
* `releaseMs` of quiet.
|
|
8485
|
+
* 2. **`onChange` fires on the flip, not on the sample.** A callback per poll
|
|
8486
|
+
* would re-render a participant list ten times a second to say the same thing.
|
|
8487
|
+
*
|
|
8488
|
+
* The meter underneath runs with smoothing off: its eased decay plus this release
|
|
8489
|
+
* would hold the indicator open long after the speech stopped.
|
|
8490
|
+
*
|
|
8491
|
+
* @param stream - The stream whose first audio track is measured.
|
|
8492
|
+
* @param onChange - Called only when the speaking state actually flips.
|
|
8493
|
+
* @param options - See {@link VoiceActivityOptions}.
|
|
8494
|
+
* @returns A handle carrying the current state and the teardown.
|
|
8495
|
+
*
|
|
8496
|
+
* @example
|
|
8497
|
+
* const vad = monitorVoiceActivity(remoteStream, (speaking) => setSpeaking(speaking));
|
|
8498
|
+
* // later
|
|
8499
|
+
* vad.stop();
|
|
8500
|
+
*/
|
|
8501
|
+
export declare function monitorVoiceActivity(stream: MediaStream, onChange: (speaking: boolean) => void, { threshold, releaseMs, pollMs, context, }?: VoiceActivityOptions): VoiceActivityMonitor;
|
|
8502
|
+
|
|
8503
|
+
/**
|
|
8504
|
+
* Play your own processed microphone back to you.
|
|
8505
|
+
*
|
|
8506
|
+
* The only way to hear what these filters do without a second person on the call.
|
|
8507
|
+
* Every number the chain is tuned by — how deep the de-esser cuts, where the gate
|
|
8508
|
+
* sits, how much presence is too much — is a judgement made by ear, and without
|
|
8509
|
+
* this the only available ear belongs to somebody else.
|
|
8510
|
+
*
|
|
8511
|
+
* **Feedback is the hazard, and the reason this is a held, explicit action rather
|
|
8512
|
+
* than a setting:** without headphones the speakers feed the microphone that feeds
|
|
8513
|
+
* the speakers. Say so in the UI that offers it.
|
|
8514
|
+
*
|
|
8515
|
+
* @param source - The raw captured track to listen to. It is never stopped here.
|
|
8516
|
+
* @param settings - The stages to hear it through. Default {@link DEFAULT_VOICE_CHAIN}.
|
|
8517
|
+
* @param options - See {@link VoiceChainOptions}; `ownsSource` is forced to `false`.
|
|
8518
|
+
* @returns A handle that stops the monitor.
|
|
8519
|
+
*/
|
|
8520
|
+
export declare function monitorVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, options?: Omit<VoiceChainOptions, "ownsSource">): VoiceMonitor;
|
|
8521
|
+
|
|
8099
8522
|
/** Reorder helper: move `from` to `to`, returning a new array. */
|
|
8100
8523
|
export declare function moveItem<T>(items: T[], from: number, to: number): T[];
|
|
8101
8524
|
|
|
@@ -8264,6 +8687,16 @@ export declare interface NavigationRailProps extends Omit<HTMLAttributes<HTMLEle
|
|
|
8264
8687
|
|
|
8265
8688
|
export { NavLink }
|
|
8266
8689
|
|
|
8690
|
+
/** Options for {@link measureNoiseFloor}. */
|
|
8691
|
+
export declare interface NoiseFloorOptions {
|
|
8692
|
+
/** Called with `0..1` so a dialog can show the wait. */
|
|
8693
|
+
onProgress?: (fraction: number) => void;
|
|
8694
|
+
/** How long to listen. Default `3000`. */
|
|
8695
|
+
durationMs?: number;
|
|
8696
|
+
/** Reuse an existing `AudioContext` rather than opening one. */
|
|
8697
|
+
context?: AudioContext;
|
|
8698
|
+
}
|
|
8699
|
+
|
|
8267
8700
|
/**
|
|
8268
8701
|
* Turn one raw detection into a {@link BarcodeScanResult}.
|
|
8269
8702
|
*
|
|
@@ -9032,8 +9465,19 @@ export declare interface PageProps extends Omit<HTMLAttributes<HTMLElement>, "ti
|
|
|
9032
9465
|
|
|
9033
9466
|
/**
|
|
9034
9467
|
* Numeric pagination controls. Pair with {@link usePagination} for state.
|
|
9468
|
+
*
|
|
9469
|
+
* Narrow screens collapse to `‹` / `›` plus the summary by default, which turns
|
|
9470
|
+
* random access into sequential access — fine for a desktop-first app, wrong for
|
|
9471
|
+
* one whose traffic is phones. `compactOnMobile={false}` keeps the numbers at
|
|
9472
|
+
* every width: the row scrolls on its own instead of widening the page, and the
|
|
9473
|
+
* effect below keeps the current page inside the visible part of that row.
|
|
9474
|
+
*
|
|
9475
|
+
* The scroll is why this is one boolean rather than a `variant`. Simply
|
|
9476
|
+
* un-hiding the buttons would push a nine-button row past a 360px viewport and
|
|
9477
|
+
* give the whole document a horizontal scrollbar — the opt-out has to carry its
|
|
9478
|
+
* own layout, so it does.
|
|
9035
9479
|
*/
|
|
9036
|
-
export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, className, }: PaginationProps): JSX.Element | null;
|
|
9480
|
+
export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, compactOnMobile, className, }: PaginationProps): JSX.Element | null;
|
|
9037
9481
|
|
|
9038
9482
|
export declare interface PaginationProps {
|
|
9039
9483
|
page: number;
|
|
@@ -9044,8 +9488,20 @@ export declare interface PaginationProps {
|
|
|
9044
9488
|
pageSizeOptions?: number[];
|
|
9045
9489
|
/** Total items count; if provided, renders the summary text. */
|
|
9046
9490
|
totalItems?: number;
|
|
9047
|
-
/**
|
|
9491
|
+
/** Pages kept around the current one; ~`siblingCount + 4` buttons render. Default 3. */
|
|
9048
9492
|
siblingCount?: number;
|
|
9493
|
+
/**
|
|
9494
|
+
* Below 640px, drop to `‹` / `›` plus the summary and hide the numbered
|
|
9495
|
+
* buttons and the size select. Default `true`.
|
|
9496
|
+
*
|
|
9497
|
+
* The default suits a desktop-first app, and costs the thing pagination is
|
|
9498
|
+
* for on a phone: reaching page 7 becomes six taps on "next" instead of one
|
|
9499
|
+
* tap on `7`. Pass `false` in a mobile-first app and the numbers stay at
|
|
9500
|
+
* every width — the row scrolls horizontally by itself rather than pushing
|
|
9501
|
+
* the page wider, and the current page is scrolled into view when it
|
|
9502
|
+
* changes.
|
|
9503
|
+
*/
|
|
9504
|
+
compactOnMobile?: boolean;
|
|
9049
9505
|
className?: string;
|
|
9050
9506
|
}
|
|
9051
9507
|
|
|
@@ -9057,13 +9513,28 @@ declare type ParamValue = string | number | boolean | undefined | null;
|
|
|
9057
9513
|
/**
|
|
9058
9514
|
* Validate an unknown response payload against a zod schema.
|
|
9059
9515
|
*
|
|
9060
|
-
*
|
|
9061
|
-
*
|
|
9516
|
+
* A development build throws a detailed error naming every divergent field path
|
|
9517
|
+
* and embedding the raw payload; every other build throws a generic sentence, so
|
|
9518
|
+
* server internals never reach a user's screen or an error tracker.
|
|
9519
|
+
*
|
|
9520
|
+
* Which one you get comes from `isDevBuild()`, the SDK's single answer to that
|
|
9521
|
+
* question, rather than from a check written here. This function used to ask
|
|
9522
|
+
* `typeof process !== "undefined" && process.env?.NODE_ENV === "development"`,
|
|
9523
|
+
* and a browser has no `process` identifier at all — so the guard short-circuited
|
|
9524
|
+
* and the detailed branch was dead in exactly the build it was written for, no
|
|
9525
|
+
* matter what the bundler substituted behind it.
|
|
9526
|
+
*
|
|
9527
|
+
* The rule `isDevBuild()` applies is `NODE_ENV !== "production"`, which is wider
|
|
9528
|
+
* than the old `"development" || "test"`: a staging build that never sets
|
|
9529
|
+
* `NODE_ENV=production` gets the drift report, raw payload included.
|
|
9062
9530
|
*
|
|
9063
9531
|
* @param schema - The zod schema to parse against.
|
|
9064
9532
|
* @param raw - The raw response payload.
|
|
9065
9533
|
* @param context - A label used in error messages, e.g. "POST /auth/login".
|
|
9066
9534
|
* @returns The parsed, typed payload.
|
|
9535
|
+
* @throws Error When the payload does not match the schema: `[parseResponse]
|
|
9536
|
+
* Contract drift on <context>` with the field paths and the raw payload in a
|
|
9537
|
+
* development build, `Resposta inválida do servidor (<context>).` otherwise.
|
|
9067
9538
|
*/
|
|
9068
9539
|
export declare function parseResponse<TSchema extends z.ZodTypeAny>(schema: TSchema, raw: unknown, context: string): z.infer<TSchema>;
|
|
9069
9540
|
|
|
@@ -9597,8 +10068,13 @@ export declare interface PopoverProps {
|
|
|
9597
10068
|
* Renders its children into a different part of the DOM tree via a React portal.
|
|
9598
10069
|
*
|
|
9599
10070
|
* Useful for overlays (modals, tooltips, dropdowns) that must escape parent
|
|
9600
|
-
* overflow/stacking contexts.
|
|
9601
|
-
*
|
|
10071
|
+
* overflow/stacking contexts.
|
|
10072
|
+
*
|
|
10073
|
+
* Without `container` the target is the element currently presented fullscreen,
|
|
10074
|
+
* and `document.body` the rest of the time. `body` alone would be wrong during
|
|
10075
|
+
* fullscreen: the browser paints only the fullscreen element's subtree, so an
|
|
10076
|
+
* overlay mounted outside it is invisible and unclickable while looking perfectly
|
|
10077
|
+
* healthy in the DOM. Passing `container` opts out of that and pins the target.
|
|
9602
10078
|
*
|
|
9603
10079
|
* SSR-safe: renders `null` on the server and on the first client render, then
|
|
9604
10080
|
* mounts the portal after hydration (when `document` is available).
|
|
@@ -9611,7 +10087,12 @@ export declare function Portal({ children, container }: PortalProps): ReactNode;
|
|
|
9611
10087
|
export declare interface PortalProps {
|
|
9612
10088
|
/** Content rendered through the portal. */
|
|
9613
10089
|
children: ReactNode;
|
|
9614
|
-
/**
|
|
10090
|
+
/**
|
|
10091
|
+
* Target DOM node to render into.
|
|
10092
|
+
*
|
|
10093
|
+
* Defaults to the fullscreen element while one is presented, and to
|
|
10094
|
+
* `document.body` otherwise.
|
|
10095
|
+
*/
|
|
9615
10096
|
container?: Element | null;
|
|
9616
10097
|
}
|
|
9617
10098
|
|
|
@@ -9645,7 +10126,7 @@ export declare interface PostHogLike {
|
|
|
9645
10126
|
}
|
|
9646
10127
|
|
|
9647
10128
|
/** A lazy component that can also be fetched ahead of being rendered. */
|
|
9648
|
-
export declare type PreloadableLazy<T extends
|
|
10129
|
+
export declare type PreloadableLazy<T extends AnyComponent> = ReturnType<typeof lazy<T>> & {
|
|
9649
10130
|
/**
|
|
9650
10131
|
* Start fetching the chunk now, before anything renders it.
|
|
9651
10132
|
*
|
|
@@ -9743,6 +10224,20 @@ export declare interface PullPage<TRemote> {
|
|
|
9743
10224
|
serverTime: string | null;
|
|
9744
10225
|
}
|
|
9745
10226
|
|
|
10227
|
+
/**
|
|
10228
|
+
* The keys worth offering for push-to-talk.
|
|
10229
|
+
*
|
|
10230
|
+
* Identified by `code` rather than `key` so a binding survives a layout change:
|
|
10231
|
+
* on an ABNT2 keyboard the `key` reported for the backquote position is not what
|
|
10232
|
+
* a US layout reports, while `Backquote` is the same physical key everywhere.
|
|
10233
|
+
*
|
|
10234
|
+
* Left-hand modifiers only. The right-hand ones sit under the hand that is
|
|
10235
|
+
* usually on the mouse, and a modifier that is also a shortcut prefix
|
|
10236
|
+
* (`ControlLeft` with a browser shortcut) is a deliberate trade the caller makes
|
|
10237
|
+
* by choosing it.
|
|
10238
|
+
*/
|
|
10239
|
+
export declare const PUSH_TO_TALK_KEYS: readonly PushToTalkKey[];
|
|
10240
|
+
|
|
9746
10241
|
/**
|
|
9747
10242
|
* Service-worker context helpers for handling `push` and `notificationclick`
|
|
9748
10243
|
* events. Import these inside your own `sw.ts` — they expect to run in the
|
|
@@ -9767,6 +10262,23 @@ export declare interface PushPayload {
|
|
|
9767
10262
|
data?: Record<string, unknown>;
|
|
9768
10263
|
}
|
|
9769
10264
|
|
|
10265
|
+
/** A key offered for push-to-talk, with the label a settings screen shows. */
|
|
10266
|
+
export declare interface PushToTalkKey {
|
|
10267
|
+
/** `KeyboardEvent.code`, which is layout-independent. */
|
|
10268
|
+
code: string;
|
|
10269
|
+
/** What to show a person. `code` itself is not a label. */
|
|
10270
|
+
label: string;
|
|
10271
|
+
}
|
|
10272
|
+
|
|
10273
|
+
/**
|
|
10274
|
+
* The label to show for a `KeyboardEvent.code`.
|
|
10275
|
+
*
|
|
10276
|
+
* @param code - The bound key's code.
|
|
10277
|
+
* @returns Its label, or the code itself for a key this list does not name —
|
|
10278
|
+
* showing `"F13"` beats showing nothing.
|
|
10279
|
+
*/
|
|
10280
|
+
export declare function pushToTalkKeyLabel(code: string): string;
|
|
10281
|
+
|
|
9770
10282
|
/** Raised when a payload cannot be encoded at the requested level. */
|
|
9771
10283
|
export declare class QRCapacityError extends Error {
|
|
9772
10284
|
readonly length: number;
|
|
@@ -10030,6 +10542,29 @@ export declare function readableForeground(background: string, light?: string, d
|
|
|
10030
10542
|
*/
|
|
10031
10543
|
export declare function readDeviceProfile(): DeviceProfile;
|
|
10032
10544
|
|
|
10545
|
+
/**
|
|
10546
|
+
* Read the round trip of the candidate pair actually carrying the link.
|
|
10547
|
+
*
|
|
10548
|
+
* A connection routinely keeps several viable pairs alive at once — host,
|
|
10549
|
+
* server-reflexive, relayed — and only one of them carries traffic. Reading the
|
|
10550
|
+
* first `succeeded` pair makes the number jump between paths that are not being
|
|
10551
|
+
* travelled: 8 ms on an idle host pair alternating with 180 ms on the TURN pair
|
|
10552
|
+
* doing the work. The pair the transport names in `selectedCandidatePairId` is
|
|
10553
|
+
* the one being used.
|
|
10554
|
+
*
|
|
10555
|
+
* A succeeded pair is kept as a fallback because not every browser fills that
|
|
10556
|
+
* field in — losing the reading entirely is worse than an occasionally
|
|
10557
|
+
* optimistic one.
|
|
10558
|
+
*
|
|
10559
|
+
* @param report - A report from `RTCPeerConnection.getStats()`.
|
|
10560
|
+
* @returns Round trip in milliseconds, rounded, or `null` when nothing reported
|
|
10561
|
+
* one — which is the normal state before the connection settles.
|
|
10562
|
+
*
|
|
10563
|
+
* @example
|
|
10564
|
+
* const rttMs = readRoundTripMs(await pc.getStats());
|
|
10565
|
+
*/
|
|
10566
|
+
export declare function readRoundTripMs(report: RTCStatsReport): number | null;
|
|
10567
|
+
|
|
10033
10568
|
/**
|
|
10034
10569
|
* Read a token's computed value from an element (default: `<html>`).
|
|
10035
10570
|
*
|
|
@@ -10116,7 +10651,19 @@ export declare interface RegisterPeriodicSyncOptions {
|
|
|
10116
10651
|
*
|
|
10117
10652
|
* Skips silently when the runtime has no `serviceWorker` support. The host
|
|
10118
10653
|
* app keeps full control over the SW file — this helper only handles the
|
|
10119
|
-
* boilerplate around `register()` and
|
|
10654
|
+
* boilerplate around `register()` and update detection.
|
|
10655
|
+
*
|
|
10656
|
+
* Two things can mean "an update is ready", and only one of them is an event.
|
|
10657
|
+
* `updatefound` covers the worker that installs while this tab is open. The
|
|
10658
|
+
* commoner case has no event at all: the user visited after a deploy, the new
|
|
10659
|
+
* worker installed and went to `waiting`, they closed the tab, and they are back
|
|
10660
|
+
* now. `install` already happened, so nothing fires — which is why `waiting` is
|
|
10661
|
+
* read directly once the registration resolves. Both routes go through the same
|
|
10662
|
+
* dedupe, so a worker is announced once even when both apply.
|
|
10663
|
+
*
|
|
10664
|
+
* Neither route fires without `navigator.serviceWorker.controller`: no
|
|
10665
|
+
* controller means this is the first install, which is `onReady` territory, not
|
|
10666
|
+
* an update the user should be prompted about.
|
|
10120
10667
|
*
|
|
10121
10668
|
* With `autoUpdate` enabled it additionally polls `registration.update()` on
|
|
10122
10669
|
* an interval and (by default) reloads the page when a freshly activated worker
|
|
@@ -10138,6 +10685,10 @@ export declare interface RegisterServiceWorkerOptions {
|
|
|
10138
10685
|
* Called when a new worker has finished installing while another worker
|
|
10139
10686
|
* still controls the page. The host app typically prompts the user to
|
|
10140
10687
|
* reload and then calls {@link skipWaiting} on the returned worker.
|
|
10688
|
+
*
|
|
10689
|
+
* Fires for a worker that was already `waiting` when `register()` resolved
|
|
10690
|
+
* — the state a user returning after a deploy actually finds — as well as
|
|
10691
|
+
* for one that installs during this session, and at most once per worker.
|
|
10141
10692
|
*/
|
|
10142
10693
|
onUpdate?: (waiting: ServiceWorker, registration: ServiceWorkerRegistration) => void;
|
|
10143
10694
|
/** Called on registration failure. */
|
|
@@ -10484,22 +11035,40 @@ export { Route }
|
|
|
10484
11035
|
|
|
10485
11036
|
/**
|
|
10486
11037
|
* Declarative route guard built on React Router's `<Navigate>`. Renders its
|
|
10487
|
-
* children when `when` is
|
|
10488
|
-
* `createAuthStore` for protected areas
|
|
11038
|
+
* children when `when` is `true`, redirects when it is `false`, and holds on
|
|
11039
|
+
* `"pending"`. Pairs naturally with `createAuthStore` for protected areas, and
|
|
11040
|
+
* with `useCan` for permissions that resolve over the network.
|
|
10489
11041
|
*
|
|
10490
11042
|
* @example
|
|
10491
11043
|
* <RouteGuard when={useAuthStore((s) => s.isAuthenticated)} redirectTo="/login">
|
|
10492
11044
|
* <Outlet />
|
|
10493
11045
|
* </RouteGuard>
|
|
11046
|
+
*
|
|
11047
|
+
* @example
|
|
11048
|
+
* const { allowed, isLoading } = useCan({ action: "read", resource: "finance" });
|
|
11049
|
+
*
|
|
11050
|
+
* <RouteGuard when={isLoading ? "pending" : allowed} fallback={<Spinner />}>
|
|
11051
|
+
* <Outlet />
|
|
11052
|
+
* </RouteGuard>
|
|
10494
11053
|
*/
|
|
10495
|
-
export declare function RouteGuard({ when, redirectTo, replace, children }: RouteGuardProps): JSX.Element;
|
|
11054
|
+
export declare function RouteGuard({ when, fallback, redirectTo, replace, children, }: RouteGuardProps): JSX.Element;
|
|
10496
11055
|
|
|
10497
11056
|
export declare interface RouteGuardProps {
|
|
10498
11057
|
/**
|
|
10499
|
-
* Whether access is allowed
|
|
10500
|
-
*
|
|
11058
|
+
* Whether access is allowed — typically
|
|
11059
|
+
* `useAuthStore((s) => s.isAuthenticated)`.
|
|
11060
|
+
*
|
|
11061
|
+
* `"pending"` is the third answer, for a permission that has not resolved
|
|
11062
|
+
* yet: it holds the decision and renders {@link fallback} instead of
|
|
11063
|
+
* choosing between two wrong moves — redirecting someone who does have
|
|
11064
|
+
* access, or showing the screen to someone who does not.
|
|
10501
11065
|
*/
|
|
10502
|
-
when:
|
|
11066
|
+
when: RouteGuardResult;
|
|
11067
|
+
/**
|
|
11068
|
+
* Rendered while `when` is `"pending"`. Defaults to nothing, which is a
|
|
11069
|
+
* blank screen — pass the same spinner the rest of the app uses.
|
|
11070
|
+
*/
|
|
11071
|
+
fallback?: ReactNode;
|
|
10503
11072
|
/** Where to redirect when `when` is falsy (default: `"/"`). */
|
|
10504
11073
|
redirectTo?: string;
|
|
10505
11074
|
/** Replace history entry on redirect instead of pushing (default: true). */
|
|
@@ -10508,6 +11077,19 @@ export declare interface RouteGuardProps {
|
|
|
10508
11077
|
children: ReactNode;
|
|
10509
11078
|
}
|
|
10510
11079
|
|
|
11080
|
+
/**
|
|
11081
|
+
* What a route guard can answer.
|
|
11082
|
+
*
|
|
11083
|
+
* `true` renders the route, `false` redirects — and `"pending"` is the third
|
|
11084
|
+
* answer a two-state guard cannot give. Without it, a permission that resolves
|
|
11085
|
+
* asynchronously has to lie while it is in flight, and both lies are wrong:
|
|
11086
|
+
* answering `false` redirects the person who **does** have the permission,
|
|
11087
|
+
* every time the route is opened cold (F5 on the URL, an external link);
|
|
11088
|
+
* answering `true` renders the screen for someone who does not, until the
|
|
11089
|
+
* answer lands.
|
|
11090
|
+
*/
|
|
11091
|
+
export declare type RouteGuardResult = boolean | "pending";
|
|
11092
|
+
|
|
10511
11093
|
/** Router history strategy used by {@link AppRouter}. */
|
|
10512
11094
|
export declare type RouterKind = "browser" | "hash" | "memory";
|
|
10513
11095
|
|
|
@@ -11649,6 +12231,19 @@ export { StorageEstimate_2 as StorageEstimate }
|
|
|
11649
12231
|
|
|
11650
12232
|
export { SubmitHandler }
|
|
11651
12233
|
|
|
12234
|
+
/**
|
|
12235
|
+
* Turn a measured noise floor into a threshold worth using.
|
|
12236
|
+
*
|
|
12237
|
+
* Sits above the floor by a margin rather than on it, and is clamped at both
|
|
12238
|
+
* ends: a room measured as perfectly silent (or not measured at all) would
|
|
12239
|
+
* otherwise get a threshold of zero, which is a gate that never closes, and a
|
|
12240
|
+
* room measured while somebody talked would get one nothing opens.
|
|
12241
|
+
*
|
|
12242
|
+
* @param noiseFloor - Peak RMS measured while nobody spoke.
|
|
12243
|
+
* @returns A threshold for {@link VoiceChainSettings.gateThreshold}, `0.004..0.12`.
|
|
12244
|
+
*/
|
|
12245
|
+
export declare function suggestGateThreshold(noiseFloor: number): number;
|
|
12246
|
+
|
|
11652
12247
|
/** Toggle switch backed by a checkbox input. Accessible via keyboard. */
|
|
11653
12248
|
export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLInputElement>>;
|
|
11654
12249
|
|
|
@@ -12010,15 +12605,30 @@ export declare interface TempestRouteObject {
|
|
|
12010
12605
|
* under the {@link AppRouter} `<Suspense>` boundary.
|
|
12011
12606
|
*/
|
|
12012
12607
|
lazy?: () => Promise<{
|
|
12013
|
-
default:
|
|
12608
|
+
default: AnyRouteComponent;
|
|
12014
12609
|
}>;
|
|
12015
12610
|
/** Nested child routes (rendered through this route's `<Outlet />`). */
|
|
12016
12611
|
children?: TempestRouteObject[];
|
|
12017
12612
|
/**
|
|
12018
12613
|
* Access guard. When `false` (or a function returning `false`), the route
|
|
12019
|
-
* renders a redirect to {@link redirectTo} instead of its element.
|
|
12614
|
+
* renders a redirect to {@link redirectTo} instead of its element. When the
|
|
12615
|
+
* function returns `"pending"`, the decision is held and {@link guardFallback}
|
|
12616
|
+
* renders instead — see {@link RouteGuardResult}.
|
|
12617
|
+
*
|
|
12618
|
+
* The function runs inside the guard component's render, so it **may call
|
|
12619
|
+
* hooks** — which is what lets an async permission check like `useCan` plug
|
|
12620
|
+
* straight in. The usual rule applies: call the same hooks on every render
|
|
12621
|
+
* of that route. Guarded routes are keyed per route object, so navigating
|
|
12622
|
+
* between two routes whose guards call different hooks remounts rather than
|
|
12623
|
+
* breaking hook order.
|
|
12020
12624
|
*/
|
|
12021
|
-
guard?: boolean | (() =>
|
|
12625
|
+
guard?: boolean | (() => RouteGuardResult);
|
|
12626
|
+
/**
|
|
12627
|
+
* Rendered while {@link guard} answers `"pending"`. Defaults to the
|
|
12628
|
+
* {@link AppRouter} `fallback`, so a route tree that already passes a
|
|
12629
|
+
* spinner for `lazy` chunks reuses it here with no extra wiring.
|
|
12630
|
+
*/
|
|
12631
|
+
guardFallback?: ReactNode;
|
|
12022
12632
|
/** Destination used when `guard` fails (default: `"/"`). */
|
|
12023
12633
|
redirectTo?: string;
|
|
12024
12634
|
/** Match the path case-sensitively. */
|
|
@@ -13599,6 +14209,71 @@ export { UseFormReturn }
|
|
|
13599
14209
|
|
|
13600
14210
|
export { useFormState }
|
|
13601
14211
|
|
|
14212
|
+
/**
|
|
14213
|
+
* Drive an immersive mode whose state stays true to the browser.
|
|
14214
|
+
*
|
|
14215
|
+
* The mistake this exists to remove is storing `isFullscreen` in state and
|
|
14216
|
+
* flipping it inside your own `enter()` / `exit()`. Fullscreen ends in ways your
|
|
14217
|
+
* code never sees — `Esc`, the browser's own exit affordance, F11 pressed while an
|
|
14218
|
+
* API fullscreen is active — and each of those leaves the flag saying "sair" over
|
|
14219
|
+
* a page that is already windowed. The only honest source is the
|
|
14220
|
+
* `fullscreenchange` event, which fires for every one of them, so that is what
|
|
14221
|
+
* this hook reads and what the returned `isFullscreen` reflects. The action
|
|
14222
|
+
* callbacks never touch it.
|
|
14223
|
+
*
|
|
14224
|
+
* The subscription is not this hook's own: it lives in `useFullscreenElement`,
|
|
14225
|
+
* shared with `usePortalHost`, which needs the same fact to decide where an
|
|
14226
|
+
* overlay mounts while fullscreen is on. Two independent listeners for one event
|
|
14227
|
+
* would mean two copies of the WebKit prefix dance and two places to fix the next
|
|
14228
|
+
* quirk, so the primitive answers "which element is presented" once and each
|
|
14229
|
+
* consumer asks its own question of the answer.
|
|
14230
|
+
*
|
|
14231
|
+
* WebKit's prefixed members are handled throughout — `webkitfullscreenchange`,
|
|
14232
|
+
* `webkitFullscreenElement`, `webkitRequestFullscreen`, `webkitExitFullscreen` —
|
|
14233
|
+
* because Safari on iPad still ships them and nothing else.
|
|
14234
|
+
*
|
|
14235
|
+
* `isFullscreen` is identity against the target, not containment: a `<video>`
|
|
14236
|
+
* inside your element going fullscreen on its own is not your element being
|
|
14237
|
+
* presented, and reporting `true` there would put your exit control inside a
|
|
14238
|
+
* subtree the browser is not painting.
|
|
14239
|
+
*
|
|
14240
|
+
* @param ref - The element to present. Omit it to present the whole page
|
|
14241
|
+
* (`document.documentElement`).
|
|
14242
|
+
* @returns `{ isFullscreen, supported, enter, exit, toggle }`.
|
|
14243
|
+
* @throws Nothing during render. `enter()` and `toggle()` reject with the
|
|
14244
|
+
* browser's own error when the request is refused — most often a `TypeError`
|
|
14245
|
+
* because the call did not come from a user gesture — and with an `Error` when
|
|
14246
|
+
* there is no element to present or the environment ships no Fullscreen API.
|
|
14247
|
+
*
|
|
14248
|
+
* @example
|
|
14249
|
+
* const stage = useRef<HTMLDivElement>(null);
|
|
14250
|
+
* const { isFullscreen, supported, toggle } = useFullscreen(stage);
|
|
14251
|
+
*
|
|
14252
|
+
* <div ref={stage}>
|
|
14253
|
+
* <video src="/aula.mp4" controls />
|
|
14254
|
+
* {supported ? (
|
|
14255
|
+
* <button onClick={() => void toggle().catch(() => setRefused(true))}>
|
|
14256
|
+
* {isFullscreen ? "Sair da tela cheia" : "Tela cheia"}
|
|
14257
|
+
* </button>
|
|
14258
|
+
* ) : null}
|
|
14259
|
+
* </div>
|
|
14260
|
+
*/
|
|
14261
|
+
export declare function useFullscreen(ref?: RefObject<HTMLElement | null>): UseFullscreenResult;
|
|
14262
|
+
|
|
14263
|
+
/** Value returned by {@link useFullscreen}. */
|
|
14264
|
+
export declare interface UseFullscreenResult {
|
|
14265
|
+
/** Whether the target element is the one the browser is presenting right now. */
|
|
14266
|
+
isFullscreen: boolean;
|
|
14267
|
+
/** Whether a request stands a chance at all — hide the control when `false`. */
|
|
14268
|
+
supported: boolean;
|
|
14269
|
+
/** Present the target. Must be called from a user gesture. Rejects if refused. */
|
|
14270
|
+
enter: () => Promise<void>;
|
|
14271
|
+
/** Leave fullscreen. Resolves immediately when nothing is presented. */
|
|
14272
|
+
exit: () => Promise<void>;
|
|
14273
|
+
/** Leave if the target is presented, otherwise enter. Same gesture rule as `enter`. */
|
|
14274
|
+
toggle: () => Promise<void>;
|
|
14275
|
+
}
|
|
14276
|
+
|
|
13602
14277
|
/**
|
|
13603
14278
|
* React hook around the Geolocation API.
|
|
13604
14279
|
*
|
|
@@ -13813,6 +14488,51 @@ export declare interface UseKeyboardShortcutOptions {
|
|
|
13813
14488
|
*/
|
|
13814
14489
|
export declare function useLatestRef<T>(value: T): RefObject<T>;
|
|
13815
14490
|
|
|
14491
|
+
/**
|
|
14492
|
+
* Poll one connection's throughput, resolution and round trip.
|
|
14493
|
+
*
|
|
14494
|
+
* Sampling runs only while the connection is `"connected"`, so a link that is
|
|
14495
|
+
* still negotiating or already gone costs nothing. The last reading is kept
|
|
14496
|
+
* across pauses rather than cleared, because a badge that blanks every time the
|
|
14497
|
+
* tab loses focus reads as a broken connection.
|
|
14498
|
+
*
|
|
14499
|
+
* Coming back from a pause resets the baseline first. Without that, the sample
|
|
14500
|
+
* after a five-minute background stretch divides five minutes of bytes by five
|
|
14501
|
+
* minutes and reports the average of a period the person is not asking about.
|
|
14502
|
+
*
|
|
14503
|
+
* @param connection - The connection to watch, or `null` before one exists.
|
|
14504
|
+
* @param options - See {@link UseLinkStatsOptions}.
|
|
14505
|
+
* @returns The latest reading, or `null` before the first sample lands.
|
|
14506
|
+
*
|
|
14507
|
+
* @example
|
|
14508
|
+
* const stats = useLinkStats(pc);
|
|
14509
|
+
*
|
|
14510
|
+
* return <span>{stats ? `${stats.kbps} kbps · ${stats.rttMs ?? "—"} ms` : "medindo…"}</span>;
|
|
14511
|
+
*/
|
|
14512
|
+
export declare function useLinkStats(connection: RTCPeerConnection | null, options?: UseLinkStatsOptions): LinkStats | null;
|
|
14513
|
+
|
|
14514
|
+
/** Options for {@link useLinkStats}. */
|
|
14515
|
+
export declare interface UseLinkStatsOptions {
|
|
14516
|
+
/**
|
|
14517
|
+
* How often to sample, in milliseconds. Default `2000`.
|
|
14518
|
+
*
|
|
14519
|
+
* `getStats()` walks every report a connection holds, and a mesh runs one
|
|
14520
|
+
* per participant — on the device least able to pay for it. The numbers feed
|
|
14521
|
+
* a latency badge and a throughput figure nobody reads at 1 Hz, so the
|
|
14522
|
+
* default is deliberately slower than a frame budget suggests.
|
|
14523
|
+
*/
|
|
14524
|
+
intervalMs?: number;
|
|
14525
|
+
/**
|
|
14526
|
+
* Stop sampling while the tab is in the background. Default `true`.
|
|
14527
|
+
*
|
|
14528
|
+
* The audio path is untouched by this — people in a backgrounded call still
|
|
14529
|
+
* expect to hear it. What stops is the measuring, which nobody can see.
|
|
14530
|
+
*/
|
|
14531
|
+
pauseWhenHidden?: boolean;
|
|
14532
|
+
/** Which media the throughput counts. Default `"video"`. */
|
|
14533
|
+
kind?: LinkStatsKind;
|
|
14534
|
+
}
|
|
14535
|
+
|
|
13816
14536
|
/**
|
|
13817
14537
|
* Query a paginated list of a resource through the active {@link useDataProvider}.
|
|
13818
14538
|
*
|
|
@@ -14758,6 +15478,57 @@ export declare interface UsePushSubscriptionResult {
|
|
|
14758
15478
|
refresh: () => Promise<void>;
|
|
14759
15479
|
}
|
|
14760
15480
|
|
|
15481
|
+
/**
|
|
15482
|
+
* Hold a key to transmit; release it to go silent again.
|
|
15483
|
+
*
|
|
15484
|
+
* Looks like `keydown`/`keyup` and is not, because three things go wrong:
|
|
15485
|
+
*
|
|
15486
|
+
* 1. **`blur` has to release.** Alt-tabbing away while holding the key means the
|
|
15487
|
+
* browser never sees the `keyup`, and the microphone stays open for as long as
|
|
15488
|
+
* the person is looking at another window — exactly what push-to-talk exists
|
|
15489
|
+
* to prevent.
|
|
15490
|
+
* 2. **Auto-repeat has to be ignored.** A held key repeats at the keyboard's rate,
|
|
15491
|
+
* and without the `repeat` check `onDown` fires on every one of them.
|
|
15492
|
+
* 3. **A text field has to win.** Space bound to push-to-talk with the focus in an
|
|
15493
|
+
* `<input>` means the space never reaches the message being written.
|
|
15494
|
+
*
|
|
15495
|
+
* Unmounting releases too, for the same reason `blur` does: the callback that
|
|
15496
|
+
* stops transmitting has to run even when the component holding it goes away
|
|
15497
|
+
* mid-press.
|
|
15498
|
+
*
|
|
15499
|
+
* The callbacks are read through a ref that a commit-time effect refreshes, so
|
|
15500
|
+
* passing inline arrows neither tears the listeners down on every render nor
|
|
15501
|
+
* writes to the ref during one — a render React discards would leave the ref
|
|
15502
|
+
* pointing at callbacks that never became the UI.
|
|
15503
|
+
*
|
|
15504
|
+
* @param options - See {@link UsePushToTalkOptions}.
|
|
15505
|
+
*
|
|
15506
|
+
* @example
|
|
15507
|
+
* usePushToTalk({
|
|
15508
|
+
* code: "Space",
|
|
15509
|
+
* onDown: () => setMicEnabled(true),
|
|
15510
|
+
* onUp: () => setMicEnabled(false),
|
|
15511
|
+
* });
|
|
15512
|
+
*/
|
|
15513
|
+
export declare function usePushToTalk({ code, onDown, onUp, enabled, }: UsePushToTalkOptions): void;
|
|
15514
|
+
|
|
15515
|
+
/** Options for {@link usePushToTalk}. */
|
|
15516
|
+
export declare interface UsePushToTalkOptions {
|
|
15517
|
+
/** `KeyboardEvent.code` to hold. Default {@link DEFAULT_PUSH_TO_TALK_KEY}. */
|
|
15518
|
+
code?: string;
|
|
15519
|
+
/** Called once when the key goes down. */
|
|
15520
|
+
onDown: () => void;
|
|
15521
|
+
/** Called when the key comes up, the window blurs, or the hook unmounts. */
|
|
15522
|
+
onUp: () => void;
|
|
15523
|
+
/**
|
|
15524
|
+
* Whether the binding is live. Default `true`.
|
|
15525
|
+
*
|
|
15526
|
+
* Turning it off releases first, so flipping a call from push-to-talk to an
|
|
15527
|
+
* open microphone while the key is held does not leave `onUp` unfired.
|
|
15528
|
+
*/
|
|
15529
|
+
enabled?: boolean;
|
|
15530
|
+
}
|
|
15531
|
+
|
|
14761
15532
|
/**
|
|
14762
15533
|
* FIFO queue with an optional `limit`. When more items are added than `limit`
|
|
14763
15534
|
* allows, the surplus is kept in an internal overflow buffer and surfaces into
|
|
@@ -16111,6 +16882,98 @@ export declare interface VisuallyHiddenProps extends HTMLAttributes<HTMLElement>
|
|
|
16111
16882
|
as?: keyof JSX.IntrinsicElements;
|
|
16112
16883
|
}
|
|
16113
16884
|
|
|
16885
|
+
/** A running voice-activity monitor. */
|
|
16886
|
+
export declare interface VoiceActivityMonitor {
|
|
16887
|
+
/** Whether the track is currently carrying speech. */
|
|
16888
|
+
readonly speaking: boolean;
|
|
16889
|
+
/** Stop sampling and release the analysis graph. */
|
|
16890
|
+
stop: () => void;
|
|
16891
|
+
}
|
|
16892
|
+
|
|
16893
|
+
/** Options for {@link monitorVoiceActivity}. */
|
|
16894
|
+
export declare interface VoiceActivityOptions {
|
|
16895
|
+
/** RMS at or above which a window counts as speech. Default `0.045`. */
|
|
16896
|
+
threshold?: number;
|
|
16897
|
+
/** How long the state stays `true` after the level drops. Default `350`. */
|
|
16898
|
+
releaseMs?: number;
|
|
16899
|
+
/** How often the level is sampled, in ms. Default `100`. */
|
|
16900
|
+
pollMs?: number;
|
|
16901
|
+
/**
|
|
16902
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
16903
|
+
*
|
|
16904
|
+
* A monitor per remote participant hits the browser's cap on live contexts
|
|
16905
|
+
* (Chrome allows around six) in a five-person call. Open one and share it.
|
|
16906
|
+
*/
|
|
16907
|
+
context?: AudioContext;
|
|
16908
|
+
}
|
|
16909
|
+
|
|
16910
|
+
/** A running voice chain. */
|
|
16911
|
+
export declare interface VoiceChain {
|
|
16912
|
+
/** The processed track to publish. */
|
|
16913
|
+
track: MediaStreamTrack;
|
|
16914
|
+
/** Stop the detectors, disconnect the graph, and release the track. */
|
|
16915
|
+
release: () => void;
|
|
16916
|
+
/**
|
|
16917
|
+
* Whether a graph was actually built.
|
|
16918
|
+
*
|
|
16919
|
+
* `false` when this engine has no Web Audio, and also when the settings asked
|
|
16920
|
+
* for nothing — in both cases `track` is `source`, untouched.
|
|
16921
|
+
*/
|
|
16922
|
+
readonly supported: boolean;
|
|
16923
|
+
}
|
|
16924
|
+
|
|
16925
|
+
/** Options for {@link createVoiceChain}. */
|
|
16926
|
+
export declare interface VoiceChainOptions {
|
|
16927
|
+
/** Output multiplier, applied after every stage and before the limiter. Default `1`. */
|
|
16928
|
+
gain?: number;
|
|
16929
|
+
/**
|
|
16930
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
16931
|
+
*
|
|
16932
|
+
* Browsers cap live contexts (Chrome allows around six), so a page that already
|
|
16933
|
+
* has one — a level meter, an audio bus — should hand it over.
|
|
16934
|
+
*/
|
|
16935
|
+
context?: AudioContext;
|
|
16936
|
+
/**
|
|
16937
|
+
* Whether `release()` also stops `source`. Default `true`.
|
|
16938
|
+
*
|
|
16939
|
+
* Pass `false` when the track belongs to somebody else: a settings dialog
|
|
16940
|
+
* building a second chain over its live preview would otherwise kill the meter
|
|
16941
|
+
* the person is watching while they listen.
|
|
16942
|
+
*/
|
|
16943
|
+
ownsSource?: boolean;
|
|
16944
|
+
}
|
|
16945
|
+
|
|
16946
|
+
/** Which stages a voice chain builds. */
|
|
16947
|
+
export declare interface VoiceChainSettings {
|
|
16948
|
+
/** Cut everything below speech: fans, traffic rumble, desk knocks, plosives. */
|
|
16949
|
+
highPass: boolean;
|
|
16950
|
+
/** Silence the line when nobody is talking. */
|
|
16951
|
+
gate: boolean;
|
|
16952
|
+
/** RMS below which the gate closes, 0..1. See {@link suggestGateThreshold}. */
|
|
16953
|
+
gateThreshold: number;
|
|
16954
|
+
/** Even out the distance between a whisper and a shout. */
|
|
16955
|
+
compressor: boolean;
|
|
16956
|
+
/** Lift the consonant band so speech reads without getting louder. */
|
|
16957
|
+
presence: boolean;
|
|
16958
|
+
/** Roll off hiss above what speech uses. */
|
|
16959
|
+
hissCut: boolean;
|
|
16960
|
+
/** Ride down harsh S and CH sounds. */
|
|
16961
|
+
deEsser: boolean;
|
|
16962
|
+
/**
|
|
16963
|
+
* Hard ceiling before the signal leaves.
|
|
16964
|
+
*
|
|
16965
|
+
* On by default and worth leaving on: the leveller is 3:1, which controls the
|
|
16966
|
+
* average and lets a peak through, and `gain` can reach well above 1.
|
|
16967
|
+
*/
|
|
16968
|
+
limiter: boolean;
|
|
16969
|
+
}
|
|
16970
|
+
|
|
16971
|
+
/** A running monitor. */
|
|
16972
|
+
export declare interface VoiceMonitor {
|
|
16973
|
+
/** Stop listening and release the graph. Does **not** stop the source track. */
|
|
16974
|
+
stop: () => void;
|
|
16975
|
+
}
|
|
16976
|
+
|
|
16114
16977
|
/**
|
|
16115
16978
|
* Pluggable persistence for the pull watermark (the "changed since" cursor).
|
|
16116
16979
|
* Pass an object with a `storageKey` to use a `localStorage`-backed default.
|