tempest-react-sdk 0.53.0 → 0.55.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 +1151 -41
- package/dist/tempest-react-sdk.js +295 -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/mesh-quality.cjs +2 -0
- package/dist/webrtc/mesh-quality.cjs.map +1 -0
- package/dist/webrtc/mesh-quality.js +51 -0
- package/dist/webrtc/mesh-quality.js.map +1 -0
- package/dist/webrtc/peer-link.cjs +2 -0
- package/dist/webrtc/peer-link.cjs.map +1 -0
- package/dist/webrtc/peer-link.js +45 -0
- package/dist/webrtc/peer-link.js.map +1 -0
- package/dist/webrtc/peer-mesh.cjs +2 -0
- package/dist/webrtc/peer-mesh.cjs.map +1 -0
- package/dist/webrtc/peer-mesh.js +155 -0
- package/dist/webrtc/peer-mesh.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"`).
|
|
752
|
+
*
|
|
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`.
|
|
721
761
|
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
* field appears twice, because a field shows one error at a time.
|
|
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.
|
|
@@ -3624,6 +3728,33 @@ export declare interface CreatePasskeyClientOptions {
|
|
|
3624
3728
|
credentials?: CredentialsContainerLike;
|
|
3625
3729
|
}
|
|
3626
3730
|
|
|
3731
|
+
/**
|
|
3732
|
+
* One `RTCPeerConnection` per peer, with the slots negotiated up front.
|
|
3733
|
+
*
|
|
3734
|
+
* The signalling protocol stays yours: this produces and accepts three message
|
|
3735
|
+
* shapes (`offer`, `answer`, `ice`) and leaves delivery, room membership and
|
|
3736
|
+
* identity to your server. What it owns is the part that is the same in every
|
|
3737
|
+
* mesh and wrong in most of them — see {@link PeerMesh} for the traps each
|
|
3738
|
+
* method exists to avoid.
|
|
3739
|
+
*
|
|
3740
|
+
* @param options - See {@link PeerMeshOptions}.
|
|
3741
|
+
* @returns The mesh.
|
|
3742
|
+
*
|
|
3743
|
+
* @example
|
|
3744
|
+
* const mesh = createPeerMesh({
|
|
3745
|
+
* slots: [
|
|
3746
|
+
* { name: "mic", kind: "audio" },
|
|
3747
|
+
* { name: "cam", kind: "video" },
|
|
3748
|
+
* ],
|
|
3749
|
+
* send: (message) => socket.send(message),
|
|
3750
|
+
* onPeers: setPeers,
|
|
3751
|
+
* });
|
|
3752
|
+
* socket.onMessage = (message) => void mesh.accept(message);
|
|
3753
|
+
* await mesh.addPeer("peer-2", { offerer: true });
|
|
3754
|
+
* await mesh.setLocalTrack("mic", micTrack);
|
|
3755
|
+
*/
|
|
3756
|
+
export declare function createPeerMesh(options: PeerMeshOptions): PeerMesh;
|
|
3757
|
+
|
|
3627
3758
|
/**
|
|
3628
3759
|
* Record a live GPS trajectory from `navigator.geolocation.watchPosition`.
|
|
3629
3760
|
* Framework-free — the {@link usePositionTracker} hook wraps this for React.
|
|
@@ -4124,6 +4255,41 @@ export declare interface CreateThemeOptions {
|
|
|
4124
4255
|
*/
|
|
4125
4256
|
export declare function createVideoRecorder(stream: MediaStream, options?: VideoRecorderOptions): VideoRecorderHandle;
|
|
4126
4257
|
|
|
4258
|
+
/**
|
|
4259
|
+
* Build the processing a microphone is published through.
|
|
4260
|
+
*
|
|
4261
|
+
* Ordered the way a console is: cut what is not speech, gate what is left, level
|
|
4262
|
+
* it, shape it, set how loud it goes out, then hold a ceiling. **The order is not
|
|
4263
|
+
* cosmetic.** Gating before the high-pass lets a rumble hold the gate open;
|
|
4264
|
+
* compressing before the gate lifts the noise floor up to meet the threshold; and
|
|
4265
|
+
* a limiter placed before the output gain is a ceiling the gain then walks
|
|
4266
|
+
* straight through.
|
|
4267
|
+
*
|
|
4268
|
+
* This sits *after* the browser's own echo cancellation and noise suppression,
|
|
4269
|
+
* which stay on: the two solve different problems. The browser's is trained on
|
|
4270
|
+
* stationary noise inside the capture pipeline; this cuts what it leaves behind
|
|
4271
|
+
* and decides when the line should be silent at all.
|
|
4272
|
+
*
|
|
4273
|
+
* @param source - The captured microphone track.
|
|
4274
|
+
* @param settings - Which stages to build. Default {@link DEFAULT_VOICE_CHAIN}.
|
|
4275
|
+
* @param options - See {@link VoiceChainOptions}.
|
|
4276
|
+
* @returns The track to publish plus its teardown. On an engine with no Web Audio,
|
|
4277
|
+
* and when every stage is off, the source track is handed back untouched and
|
|
4278
|
+
* `supported` is `false` — a call without processing beats a call that throws.
|
|
4279
|
+
* The idle case is decided **before** a context is opened, because browsers cap
|
|
4280
|
+
* how many can be live and one built for a chain that does nothing still counts.
|
|
4281
|
+
*
|
|
4282
|
+
* @example
|
|
4283
|
+
* const floor = await measureNoiseFloor(stream);
|
|
4284
|
+
* const chain = createVoiceChain(micTrack, {
|
|
4285
|
+
* ...DEFAULT_VOICE_CHAIN,
|
|
4286
|
+
* gate: true,
|
|
4287
|
+
* gateThreshold: suggestGateThreshold(floor),
|
|
4288
|
+
* }, { gain: 1.4 });
|
|
4289
|
+
* await mesh.setLocalTrack("mic", chain.track);
|
|
4290
|
+
*/
|
|
4291
|
+
export declare function createVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, { gain, context: injectedContext, ownsSource }?: VoiceChainOptions): VoiceChain;
|
|
4292
|
+
|
|
4127
4293
|
/**
|
|
4128
4294
|
* Open a WebSocket that survives a bad network: exponential backoff with jitter,
|
|
4129
4295
|
* a handshake timeout, a silence watchdog, optional heartbeat pings and typed
|
|
@@ -4239,6 +4405,16 @@ export declare interface CreateWebSocketOptions<T> {
|
|
|
4239
4405
|
maxQueuedMessages?: number;
|
|
4240
4406
|
/** Parse incoming frames. Default: JSON with raw-string fallback. */
|
|
4241
4407
|
parser?: (raw: string) => T;
|
|
4408
|
+
/**
|
|
4409
|
+
* A frame arrived that is not valid JSON, and no `parser` was supplied.
|
|
4410
|
+
*
|
|
4411
|
+
* Registering this drops the frame instead of delivering it: the previous
|
|
4412
|
+
* behaviour handed `onMessage` the raw `string` announced as your message
|
|
4413
|
+
* type, so the failure surfaced later, at the first property access, with
|
|
4414
|
+
* nothing left pointing at the parse. Leave it out and that behaviour is
|
|
4415
|
+
* kept, with a one-time warning in development builds.
|
|
4416
|
+
*/
|
|
4417
|
+
onParseError?: (error: unknown, raw: string) => void;
|
|
4242
4418
|
onOpen?: (event: Event) => void;
|
|
4243
4419
|
onMessage?: (message: WebSocketMessage<T>) => void;
|
|
4244
4420
|
onClose?: (event: CloseEvent) => void;
|
|
@@ -4924,6 +5100,19 @@ export declare const DEFAULT_PUB_KEY_CRED_PARAMS: {
|
|
|
4924
5100
|
alg: number;
|
|
4925
5101
|
}[];
|
|
4926
5102
|
|
|
5103
|
+
/** The key a caller gets when it does not choose one. */
|
|
5104
|
+
export declare const DEFAULT_PUSH_TO_TALK_KEY = "Space";
|
|
5105
|
+
|
|
5106
|
+
/**
|
|
5107
|
+
* What a call wants before anybody touches a slider.
|
|
5108
|
+
*
|
|
5109
|
+
* High-pass, leveller and limiter only. Gate, presence, hiss cut and de-esser are
|
|
5110
|
+
* off because each has an audible cost when it is not needed — a gate set for the
|
|
5111
|
+
* wrong room clips words, presence on a bright microphone is harsh, and a de-esser
|
|
5112
|
+
* on a voice that does not hiss just dulls it.
|
|
5113
|
+
*/
|
|
5114
|
+
export declare const DEFAULT_VOICE_CHAIN: VoiceChainSettings;
|
|
5115
|
+
|
|
4927
5116
|
/**
|
|
4928
5117
|
* Identity helper that types a declarative route tree. Use it so editors give
|
|
4929
5118
|
* autocomplete and type-checking on every node; the array is returned as-is.
|
|
@@ -4952,12 +5141,20 @@ export declare function defineRoutes(routes: TempestRouteObject[]): TempestRoute
|
|
|
4952
5141
|
* offline sentence. This is the step apps skip, and skipping it renders
|
|
4953
5142
|
* "erro 0" or a raw `TypeError` at the user.
|
|
4954
5143
|
* 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
|
|
5144
|
+
* sentence, **not** `detail`. On a FastAPI `422` the `detail` line is assembled
|
|
5145
|
+
* from the backend's field paths and the validator's own wording
|
|
4957
5146
|
* (`"items.0.price: Input should be greater than 0"`), which is right for a
|
|
4958
5147
|
* log and wrong for a person: it is half English in a pt-BR screen and it
|
|
4959
5148
|
* names internals. The per-field messages stay on `fields`, where a form can
|
|
4960
5149
|
* attach them to the inputs that failed.
|
|
5150
|
+
*
|
|
5151
|
+
* This step also catches a business error that named a single field, whose
|
|
5152
|
+
* `detail` **was** a finished sentence ("Cidade não encontrada para o estado
|
|
5153
|
+
* informado."). The trade is deliberate: that sentence is now on `fields`,
|
|
5154
|
+
* against the input it is about, which is where it does the most good. Three
|
|
5155
|
+
* ways back, in order of preference: `codes: { VALIDATION_ERROR: "…" }` (step 0,
|
|
5156
|
+
* which still wins), `validation: error.detail` at the call site, or reading
|
|
5157
|
+
* `error.detail` yourself — it is untouched.
|
|
4961
5158
|
* 3. The backend's own `detail`, which is the most specific thing available and
|
|
4962
5159
|
* is already written for a person — unless `useDetail: false` says that text
|
|
4963
5160
|
* is for developers.
|
|
@@ -5204,11 +5401,21 @@ export declare interface DrawerProps {
|
|
|
5204
5401
|
}
|
|
5205
5402
|
|
|
5206
5403
|
/**
|
|
5207
|
-
* Dropdown menu — list of
|
|
5404
|
+
* Dropdown menu — a list of actions anchored to a trigger, following the
|
|
5405
|
+
* [APG menu button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).
|
|
5406
|
+
*
|
|
5407
|
+
* `role="menu"` is a promise about the keyboard, and this component keeps it:
|
|
5208
5408
|
*
|
|
5209
|
-
* -
|
|
5210
|
-
*
|
|
5211
|
-
* -
|
|
5409
|
+
* - `Enter`, `Space` or `ArrowDown` on the trigger opens and focuses the first
|
|
5410
|
+
* entry; `ArrowUp` opens and focuses the last.
|
|
5411
|
+
* - `ArrowUp` / `ArrowDown` move with wrap, `Home` / `End` jump to the ends.
|
|
5412
|
+
* - `Escape` closes and returns focus to the trigger, so the next `Tab` continues
|
|
5413
|
+
* from where the user was rather than from the top of the document.
|
|
5414
|
+
* - `Tab` closes the menu and lets the page's own tab order take over.
|
|
5415
|
+
* - Focus is managed: entries carry `tabIndex={-1}` and only the active one is
|
|
5416
|
+
* `0`, which is what stops `Tab` from walking the menu one entry at a time.
|
|
5417
|
+
*
|
|
5418
|
+
* Disabled entries, separators and labels are skipped by every movement.
|
|
5212
5419
|
*/
|
|
5213
5420
|
export declare function DropdownMenu({ trigger, items, placement, className, }: DropdownMenuProps): JSX.Element;
|
|
5214
5421
|
|
|
@@ -5220,6 +5427,23 @@ export declare type DropdownMenuEntry = {
|
|
|
5220
5427
|
danger?: boolean;
|
|
5221
5428
|
disabled?: boolean;
|
|
5222
5429
|
onSelect: () => void;
|
|
5430
|
+
} | {
|
|
5431
|
+
/**
|
|
5432
|
+
* An entry that carries on/off state.
|
|
5433
|
+
*
|
|
5434
|
+
* Rendered as `role="menuitemcheckbox"` with `aria-checked`, which is how
|
|
5435
|
+
* a screen reader announces "checked" instead of leaving the state
|
|
5436
|
+
* invisible. Selecting it does **not** close the menu: toggling two
|
|
5437
|
+
* settings in a row is the ordinary case, and closing after the first
|
|
5438
|
+
* would make the second a second trip.
|
|
5439
|
+
*/
|
|
5440
|
+
type: "checkbox";
|
|
5441
|
+
id: string;
|
|
5442
|
+
label: ReactNode;
|
|
5443
|
+
icon?: ReactNode;
|
|
5444
|
+
checked: boolean;
|
|
5445
|
+
disabled?: boolean;
|
|
5446
|
+
onSelect: () => void;
|
|
5223
5447
|
} | {
|
|
5224
5448
|
type: "separator";
|
|
5225
5449
|
id: string;
|
|
@@ -5234,6 +5458,7 @@ export declare type DropdownMenuPlacement = "bottom-start" | "bottom-end" | "top
|
|
|
5234
5458
|
export declare interface DropdownMenuProps {
|
|
5235
5459
|
trigger: ReactElement<{
|
|
5236
5460
|
onClick?: (e: React.MouseEvent) => void;
|
|
5461
|
+
onKeyDown?: (e: KeyboardEvent_2) => void;
|
|
5237
5462
|
"aria-expanded"?: boolean;
|
|
5238
5463
|
"aria-controls"?: string;
|
|
5239
5464
|
"aria-haspopup"?: boolean | "menu";
|
|
@@ -5483,11 +5708,6 @@ export declare interface EventStreamMessage<T> {
|
|
|
5483
5708
|
raw: MessageEvent;
|
|
5484
5709
|
}
|
|
5485
5710
|
|
|
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
5711
|
export declare type EventStreamStatus = "idle" | "connecting" | "open" | "closed" | "error";
|
|
5492
5712
|
|
|
5493
5713
|
/**
|
|
@@ -5962,6 +6182,38 @@ export declare function formatDateForInput(value: string | Date): string;
|
|
|
5962
6182
|
*/
|
|
5963
6183
|
export declare function formatDateTime(value: string | Date): string;
|
|
5964
6184
|
|
|
6185
|
+
/**
|
|
6186
|
+
* Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an
|
|
6187
|
+
* `<input type="datetime-local">` accepts.
|
|
6188
|
+
*
|
|
6189
|
+
* The sibling of {@link formatDateForInput}, and it exists for the same reason:
|
|
6190
|
+
* `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`
|
|
6191
|
+
* converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the
|
|
6192
|
+
* next day at 01:00 — here the trap costs the hour as well as the date.
|
|
6193
|
+
*
|
|
6194
|
+
* A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying
|
|
6195
|
+
* a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it
|
|
6196
|
+
* is a different instant from the naive string that looks like it, so it is
|
|
6197
|
+
* converted to the local calendar parts the input has to show.
|
|
6198
|
+
*
|
|
6199
|
+
* Seconds are dropped. A `datetime-local` steps by the minute unless the app
|
|
6200
|
+
* sets `step`, so a `:ss` the field cannot represent would be silently discarded
|
|
6201
|
+
* on the first edit anyway — truncating here keeps the rendered value and the
|
|
6202
|
+
* submitted value the same.
|
|
6203
|
+
*
|
|
6204
|
+
* @example
|
|
6205
|
+
* <input
|
|
6206
|
+
* type="datetime-local"
|
|
6207
|
+
* defaultValue={formatDateTimeForInput(appointment.startsAt)}
|
|
6208
|
+
* />
|
|
6209
|
+
*
|
|
6210
|
+
* @param value - ISO string or Date.
|
|
6211
|
+
* @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is
|
|
6212
|
+
* invalid — which is what a datetime input reads as "no value", unlike
|
|
6213
|
+
* `"Invalid Date"`.
|
|
6214
|
+
*/
|
|
6215
|
+
export declare function formatDateTimeForInput(value: string | Date): string;
|
|
6216
|
+
|
|
5965
6217
|
/**
|
|
5966
6218
|
* Rendering helpers for the numbers a profiler produces.
|
|
5967
6219
|
*/
|
|
@@ -7000,6 +7252,23 @@ export declare function isDefined<T>(value: T | null | undefined): value is T;
|
|
|
7000
7252
|
*/
|
|
7001
7253
|
export declare function isEmpty(value: unknown): boolean;
|
|
7002
7254
|
|
|
7255
|
+
/**
|
|
7256
|
+
* Whether this environment can present anything fullscreen at all.
|
|
7257
|
+
*
|
|
7258
|
+
* Two independent reasons for `false`, and skipping either one ships a button
|
|
7259
|
+
* that does nothing when pressed: the API can be missing (older WebKit, and every
|
|
7260
|
+
* browser on iOS for non-`<video>` elements), or present and **disabled** — a
|
|
7261
|
+
* document inside an `<iframe>` without the `allowfullscreen` attribute exposes
|
|
7262
|
+
* `requestFullscreen` and rejects every call to it, which `fullscreenEnabled`
|
|
7263
|
+
* reports up front.
|
|
7264
|
+
*
|
|
7265
|
+
* An engine that exposes the methods and no flag at all is treated as capable:
|
|
7266
|
+
* the flag is the newer half of the API, so its absence says nothing.
|
|
7267
|
+
*
|
|
7268
|
+
* @returns `true` when a fullscreen request stands a chance of being honoured.
|
|
7269
|
+
*/
|
|
7270
|
+
export declare function isFullscreenSupported(): boolean;
|
|
7271
|
+
|
|
7003
7272
|
/** Whether any turn in the thread is still streaming. */
|
|
7004
7273
|
export declare function isGenerating(messages: readonly AIChatMessage[]): boolean;
|
|
7005
7274
|
|
|
@@ -7162,6 +7431,20 @@ export declare function isValidLongitude(value: number): boolean;
|
|
|
7162
7431
|
/** Whether `MediaRecorder` exists and can produce at least one video container. */
|
|
7163
7432
|
export declare function isVideoRecordingSupported(): boolean;
|
|
7164
7433
|
|
|
7434
|
+
/**
|
|
7435
|
+
* Whether any of this would change the signal.
|
|
7436
|
+
*
|
|
7437
|
+
* A chain that only passes audio through still costs a re-encode and a handful of
|
|
7438
|
+
* nodes, so a caller that rebuilds on every settings change should ask first —
|
|
7439
|
+
* and {@link createVoiceChain} asks too, handing back `source` rather than
|
|
7440
|
+
* building a graph that does nothing.
|
|
7441
|
+
*
|
|
7442
|
+
* @param settings - The stages under consideration.
|
|
7443
|
+
* @param gain - The output multiplier that would be applied. Default `1`.
|
|
7444
|
+
* @returns `true` when the chain would be audibly transparent.
|
|
7445
|
+
*/
|
|
7446
|
+
export declare function isVoiceChainIdle(settings: VoiceChainSettings, gain?: number): boolean;
|
|
7447
|
+
|
|
7165
7448
|
/** The surface every store built by {@link createJsonStorage} exposes. */
|
|
7166
7449
|
export declare interface JsonStorage {
|
|
7167
7450
|
/**
|
|
@@ -7395,13 +7678,22 @@ declare interface LayoutProps {
|
|
|
7395
7678
|
* up the new bundle; a final `location.reload()` recovers from stale
|
|
7396
7679
|
* `index.html`.
|
|
7397
7680
|
*
|
|
7681
|
+
* The wrapped component keeps its own props: `T` is inferred from the module
|
|
7682
|
+
* the factory resolves to, so a page declaring required, optional or no props
|
|
7683
|
+
* all pass through and the rendered element is still checked against them. See
|
|
7684
|
+
* {@link AnyComponent} for why the constraint has to be written the way it is.
|
|
7685
|
+
*
|
|
7686
|
+
* @param factory Dynamic import of the module whose `default` is the component.
|
|
7687
|
+
* @param options Retry count, initial backoff and the final-failure reload.
|
|
7688
|
+
* @returns The lazy component, carrying an extra `preload()`.
|
|
7689
|
+
*
|
|
7398
7690
|
* @example
|
|
7399
7691
|
* const Settings = lazyWithRetry(() => import("./Settings"));
|
|
7400
7692
|
*
|
|
7401
7693
|
* // Warm the chunk when the route becomes likely, not when it is needed.
|
|
7402
7694
|
* <a href="/settings" onMouseEnter={() => void Settings.preload()}>Settings</a>
|
|
7403
7695
|
*/
|
|
7404
|
-
export declare function lazyWithRetry<T extends
|
|
7696
|
+
export declare function lazyWithRetry<T extends AnyComponent>(factory: () => Promise<{
|
|
7405
7697
|
default: T;
|
|
7406
7698
|
}>, options?: LazyWithRetryOptions): PreloadableLazy<T>;
|
|
7407
7699
|
|
|
@@ -7449,8 +7741,21 @@ export declare interface LevelMeterOptions {
|
|
|
7449
7741
|
* A raw RMS reading is jittery enough to make a meter look broken. Attack is left
|
|
7450
7742
|
* instant — a meter that lags the voice going *up* reads as "not recording" —
|
|
7451
7743
|
* while the decay is eased, which is how every hardware meter behaves.
|
|
7744
|
+
*
|
|
7745
|
+
* `0` turns the smoothing off and reports the window's RMS as measured, which is
|
|
7746
|
+
* what a detector wants: {@link monitorVoiceActivity} applies its own release,
|
|
7747
|
+
* and two of them stacked would hold the indicator open long past the speech.
|
|
7452
7748
|
*/
|
|
7453
7749
|
decay?: number;
|
|
7750
|
+
/**
|
|
7751
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
7752
|
+
*
|
|
7753
|
+
* Browsers cap live contexts (Chrome allows around six), and a meter per remote
|
|
7754
|
+
* participant reaches that in a five-person call. A caller measuring several
|
|
7755
|
+
* streams should open one context and hand it to every meter. `stop()` closes
|
|
7756
|
+
* only a context this meter created — an injected one belongs to the caller.
|
|
7757
|
+
*/
|
|
7758
|
+
context?: AudioContext;
|
|
7454
7759
|
}
|
|
7455
7760
|
|
|
7456
7761
|
/**
|
|
@@ -7530,6 +7835,78 @@ export declare interface LimiterSettings {
|
|
|
7530
7835
|
|
|
7531
7836
|
export { Link }
|
|
7532
7837
|
|
|
7838
|
+
/**
|
|
7839
|
+
* One link's outbound picture, in the shape a call UI actually renders.
|
|
7840
|
+
*
|
|
7841
|
+
* Everything here is derived, not reported: WebRTC hands out cumulative
|
|
7842
|
+
* counters and a graph of candidate pairs, and turning that into
|
|
7843
|
+
* `"1,2 Mbps · 42 ms · 1080p60"` is the work {@link createLinkStatsSampler}
|
|
7844
|
+
* does.
|
|
7845
|
+
*/
|
|
7846
|
+
export declare interface LinkStats {
|
|
7847
|
+
/** Throughput since the previous sample. `0` on the first one — there is no delta yet. */
|
|
7848
|
+
kbps: number;
|
|
7849
|
+
/** Width of the largest stream being sent, or `0` before one is reported. */
|
|
7850
|
+
width: number;
|
|
7851
|
+
/** Height of the largest stream being sent, or `0` before one is reported. */
|
|
7852
|
+
height: number;
|
|
7853
|
+
/** Frame rate of the largest stream being sent, or `0` when the browser omits it. */
|
|
7854
|
+
fps: number;
|
|
7855
|
+
/** Round trip to the peer in milliseconds, or `null` before the first reading. */
|
|
7856
|
+
rttMs: number | null;
|
|
7857
|
+
}
|
|
7858
|
+
|
|
7859
|
+
/** Which media a sampler counts. */
|
|
7860
|
+
export declare type LinkStatsKind = "video" | "audio" | "all";
|
|
7861
|
+
|
|
7862
|
+
/**
|
|
7863
|
+
* A sampler bound to one connection.
|
|
7864
|
+
*
|
|
7865
|
+
* Holds the previous byte counter and timestamp, which is the whole reason this
|
|
7866
|
+
* is an object rather than a function: the rate is a delta, so somebody has to
|
|
7867
|
+
* remember the last reading. One sampler per link — sharing one across peers
|
|
7868
|
+
* subtracts one connection's counter from another's and reports nonsense.
|
|
7869
|
+
*/
|
|
7870
|
+
export declare interface LinkStatsSampler {
|
|
7871
|
+
/**
|
|
7872
|
+
* Reduce a report you already have.
|
|
7873
|
+
*
|
|
7874
|
+
* @param report - A report from `RTCPeerConnection.getStats()`.
|
|
7875
|
+
* @returns The stats for this sample.
|
|
7876
|
+
*/
|
|
7877
|
+
read: (report: RTCStatsReport) => LinkStats;
|
|
7878
|
+
/**
|
|
7879
|
+
* Fetch a report and reduce it.
|
|
7880
|
+
*
|
|
7881
|
+
* @param connection - The connection to sample.
|
|
7882
|
+
* @returns The stats for this sample.
|
|
7883
|
+
*/
|
|
7884
|
+
sample: (connection: RTCPeerConnection) => Promise<LinkStats>;
|
|
7885
|
+
/**
|
|
7886
|
+
* Drop the baseline the rate is derived from.
|
|
7887
|
+
*
|
|
7888
|
+
* Call it after an ICE restart, a reconnect, or a pause — otherwise the next
|
|
7889
|
+
* sample divides the bytes of the whole gap by the whole gap and reports the
|
|
7890
|
+
* average of a period nobody is asking about. The next reading comes back at
|
|
7891
|
+
* `0` kbps and starts a fresh baseline; the resolution and round trip already
|
|
7892
|
+
* on screen are kept, so the badge does not blank out.
|
|
7893
|
+
*/
|
|
7894
|
+
reset: () => void;
|
|
7895
|
+
}
|
|
7896
|
+
|
|
7897
|
+
/** Options for {@link createLinkStatsSampler}. */
|
|
7898
|
+
export declare interface LinkStatsSamplerOptions {
|
|
7899
|
+
/**
|
|
7900
|
+
* Which media the throughput counts. Default `"video"`.
|
|
7901
|
+
*
|
|
7902
|
+
* Video is the default because it is what saturates an uplink — audio is an
|
|
7903
|
+
* order of magnitude cheaper, and mixing it in moves the number by less than
|
|
7904
|
+
* the noise between two samples. Use `"all"` when the figure is meant to be
|
|
7905
|
+
* the connection's real cost rather than the picture's.
|
|
7906
|
+
*/
|
|
7907
|
+
kind?: LinkStatsKind;
|
|
7908
|
+
}
|
|
7909
|
+
|
|
7533
7910
|
export declare interface ListOptions<TItem> {
|
|
7534
7911
|
/** Property to order by. Default: `keyPath`. */
|
|
7535
7912
|
orderBy?: keyof TItem & string;
|
|
@@ -7800,6 +8177,29 @@ export declare interface MasonryProps<T> extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
7800
8177
|
*/
|
|
7801
8178
|
export declare function matrixToPath(matrix: QRMatrix, margin?: number): string;
|
|
7802
8179
|
|
|
8180
|
+
/**
|
|
8181
|
+
* Listen to a room at rest and report how loud its silence is.
|
|
8182
|
+
*
|
|
8183
|
+
* The number a person cannot guess. Setting a gate by ear means switching it on
|
|
8184
|
+
* and hearing what disappeared, which only works if you already know what should
|
|
8185
|
+
* have disappeared — so the usual outcome is leaving it at a default that is
|
|
8186
|
+
* wrong for that room. Measuring replaces the guess.
|
|
8187
|
+
*
|
|
8188
|
+
* The result is the **peak** RMS window observed, not the average: a threshold
|
|
8189
|
+
* under the loudest thing the quiet room did will be opened by that thing.
|
|
8190
|
+
*
|
|
8191
|
+
* @param stream - A live capture of the room while nobody speaks.
|
|
8192
|
+
* @param options - See {@link NoiseFloorOptions}.
|
|
8193
|
+
* @returns The peak RMS observed, `0..1`. `0` when this engine has no Web Audio
|
|
8194
|
+
* or the stream carries no audio track — which {@link suggestGateThreshold}
|
|
8195
|
+
* turns into its own floor rather than into a gate that never opens.
|
|
8196
|
+
*
|
|
8197
|
+
* @example
|
|
8198
|
+
* const floor = await measureNoiseFloor(stream, { onProgress: setProgress });
|
|
8199
|
+
* setThreshold(suggestGateThreshold(floor));
|
|
8200
|
+
*/
|
|
8201
|
+
export declare function measureNoiseFloor(stream: MediaStream, { onProgress, durationMs, context: injectedContext, }?: NoiseFloorOptions): Promise<number>;
|
|
8202
|
+
|
|
7803
8203
|
/** A classified capture error with a human-readable, English message. */
|
|
7804
8204
|
export declare interface MediaAccessError {
|
|
7805
8205
|
kind: MediaAccessErrorKind;
|
|
@@ -7990,6 +8390,109 @@ export declare interface MercatorPoint {
|
|
|
7990
8390
|
y: number;
|
|
7991
8391
|
}
|
|
7992
8392
|
|
|
8393
|
+
/** A message the mesh produces and accepts. The transport is the caller's. */
|
|
8394
|
+
export declare type MeshMessage = {
|
|
8395
|
+
type: "offer";
|
|
8396
|
+
to: string;
|
|
8397
|
+
from?: string;
|
|
8398
|
+
sdp: string;
|
|
8399
|
+
} | {
|
|
8400
|
+
type: "answer";
|
|
8401
|
+
to: string;
|
|
8402
|
+
from?: string;
|
|
8403
|
+
sdp: string;
|
|
8404
|
+
} | {
|
|
8405
|
+
type: "ice";
|
|
8406
|
+
to: string;
|
|
8407
|
+
from?: string;
|
|
8408
|
+
candidate: string | null;
|
|
8409
|
+
sdpMid: string | null;
|
|
8410
|
+
sdpMLineIndex: number | null;
|
|
8411
|
+
};
|
|
8412
|
+
|
|
8413
|
+
/** One remote participant, as the mesh currently sees it. */
|
|
8414
|
+
export declare interface MeshPeer {
|
|
8415
|
+
/** The id the caller registered this peer under. */
|
|
8416
|
+
peerId: string;
|
|
8417
|
+
/** The connection's own state, straight from `RTCPeerConnection`. */
|
|
8418
|
+
connection: RTCPeerConnectionState;
|
|
8419
|
+
/** Inbound stream per slot name, `null` for a slot the peer is not sending. */
|
|
8420
|
+
streams: Record<string, MediaStream | null>;
|
|
8421
|
+
}
|
|
8422
|
+
|
|
8423
|
+
/** Encoder limits, before the room divides them. */
|
|
8424
|
+
export declare interface MeshQuality {
|
|
8425
|
+
/**
|
|
8426
|
+
* Cap per video slot, in kbps. `null` leaves that slot uncapped.
|
|
8427
|
+
*
|
|
8428
|
+
* Divided by the size of the room — see {@link PeerMesh.applyQuality}.
|
|
8429
|
+
*/
|
|
8430
|
+
video?: Record<string, number | null>;
|
|
8431
|
+
/**
|
|
8432
|
+
* Cap per audio slot, in **bps**, matching `setSenderBitrate`.
|
|
8433
|
+
*
|
|
8434
|
+
* Never divided. Audio is an order of magnitude cheaper than video and is
|
|
8435
|
+
* the part of a call that has to survive: dividing it buys back a few
|
|
8436
|
+
* percent of the uplink in exchange for the only thing everyone needs.
|
|
8437
|
+
*/
|
|
8438
|
+
audio?: Record<string, number>;
|
|
8439
|
+
/** Frame ceiling written onto every video encoding. */
|
|
8440
|
+
maxFramerate?: number;
|
|
8441
|
+
/** What a video encoder gives up first. */
|
|
8442
|
+
degradationPreference?: RTCDegradationPreference;
|
|
8443
|
+
/**
|
|
8444
|
+
* Total uplink to divide among the peers, in kbps.
|
|
8445
|
+
*
|
|
8446
|
+
* A mesh sends one copy of everything **per participant**, so a cap that is
|
|
8447
|
+
* comfortable one-to-one saturates a home connection with four people.
|
|
8448
|
+
*/
|
|
8449
|
+
uplinkBudgetKbps?: number;
|
|
8450
|
+
/**
|
|
8451
|
+
* Floor each video slot keeps after the division, in kbps.
|
|
8452
|
+
*
|
|
8453
|
+
* Dividing without a floor eventually allocates tens of kbps per stream,
|
|
8454
|
+
* which buys a blur that updates once a second: everybody loses the picture
|
|
8455
|
+
* instead of the excess giving way.
|
|
8456
|
+
*/
|
|
8457
|
+
minVideoKbps?: number;
|
|
8458
|
+
/**
|
|
8459
|
+
* Budget below which `maintain-framerate` is overridden.
|
|
8460
|
+
*
|
|
8461
|
+
* Somebody who asked for fluidity wants a good picture in motion, not the
|
|
8462
|
+
* number 60. Once the share of the uplink is this small, holding the frame
|
|
8463
|
+
* rate halves what each frame gets and the result is worse than the lower
|
|
8464
|
+
* rate it replaced.
|
|
8465
|
+
*/
|
|
8466
|
+
fluidFloorKbps?: number;
|
|
8467
|
+
}
|
|
8468
|
+
|
|
8469
|
+
/**
|
|
8470
|
+
* One media lane, negotiated once and reused for the life of the link.
|
|
8471
|
+
*
|
|
8472
|
+
* The order of the slot list is the wire protocol: the offerer allocates one
|
|
8473
|
+
* m-line per slot in this order, so a slot's `mid` is its ordinal and both ends
|
|
8474
|
+
* read the same identity off it. Reorder the list and the two sides disagree
|
|
8475
|
+
* about which lane carries the camera.
|
|
8476
|
+
*/
|
|
8477
|
+
export declare interface MeshSlot {
|
|
8478
|
+
/** Stable name the caller uses in {@link PeerMesh.setLocalTrack}. */
|
|
8479
|
+
name: string;
|
|
8480
|
+
/** Whether the lane carries audio or video. */
|
|
8481
|
+
kind: MeshSlotKind;
|
|
8482
|
+
}
|
|
8483
|
+
|
|
8484
|
+
/** What a slot carries. */
|
|
8485
|
+
export declare type MeshSlotKind = "audio" | "video";
|
|
8486
|
+
|
|
8487
|
+
/**
|
|
8488
|
+
* The single state a call badge shows.
|
|
8489
|
+
*
|
|
8490
|
+
* `connected` covers being alone in the room: a mesh with no peers has nothing
|
|
8491
|
+
* to connect to and is not failing, which is the case a naive "any link
|
|
8492
|
+
* connected?" check reports as broken for as long as nobody else joins.
|
|
8493
|
+
*/
|
|
8494
|
+
export declare type MeshState = "connecting" | "connected" | "reconnecting" | "failed" | "closed";
|
|
8495
|
+
|
|
7993
8496
|
export declare type Messages = Record<string, string>;
|
|
7994
8497
|
|
|
7995
8498
|
/** Lifecycle of a microphone stream. */
|
|
@@ -8096,6 +8599,56 @@ export declare interface MoneyProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
8096
8599
|
locale?: string;
|
|
8097
8600
|
}
|
|
8098
8601
|
|
|
8602
|
+
/**
|
|
8603
|
+
* Report when a track is carrying speech.
|
|
8604
|
+
*
|
|
8605
|
+
* Runs entirely on the **receiving** side, over a track the connection already
|
|
8606
|
+
* delivers, and that is the whole point: a speaking indicator changes several
|
|
8607
|
+
* times per second, so signalling it through a server floods the room with
|
|
8608
|
+
* messages carrying information every client can derive for free.
|
|
8609
|
+
*
|
|
8610
|
+
* Two details separate this from a threshold on a level meter:
|
|
8611
|
+
*
|
|
8612
|
+
* 1. **The release.** RMS drops to nothing in the gaps between words, so a bare
|
|
8613
|
+
* comparison strobes on every syllable. The state only falls after
|
|
8614
|
+
* `releaseMs` of quiet.
|
|
8615
|
+
* 2. **`onChange` fires on the flip, not on the sample.** A callback per poll
|
|
8616
|
+
* would re-render a participant list ten times a second to say the same thing.
|
|
8617
|
+
*
|
|
8618
|
+
* The meter underneath runs with smoothing off: its eased decay plus this release
|
|
8619
|
+
* would hold the indicator open long after the speech stopped.
|
|
8620
|
+
*
|
|
8621
|
+
* @param stream - The stream whose first audio track is measured.
|
|
8622
|
+
* @param onChange - Called only when the speaking state actually flips.
|
|
8623
|
+
* @param options - See {@link VoiceActivityOptions}.
|
|
8624
|
+
* @returns A handle carrying the current state and the teardown.
|
|
8625
|
+
*
|
|
8626
|
+
* @example
|
|
8627
|
+
* const vad = monitorVoiceActivity(remoteStream, (speaking) => setSpeaking(speaking));
|
|
8628
|
+
* // later
|
|
8629
|
+
* vad.stop();
|
|
8630
|
+
*/
|
|
8631
|
+
export declare function monitorVoiceActivity(stream: MediaStream, onChange: (speaking: boolean) => void, { threshold, releaseMs, pollMs, context, }?: VoiceActivityOptions): VoiceActivityMonitor;
|
|
8632
|
+
|
|
8633
|
+
/**
|
|
8634
|
+
* Play your own processed microphone back to you.
|
|
8635
|
+
*
|
|
8636
|
+
* The only way to hear what these filters do without a second person on the call.
|
|
8637
|
+
* Every number the chain is tuned by — how deep the de-esser cuts, where the gate
|
|
8638
|
+
* sits, how much presence is too much — is a judgement made by ear, and without
|
|
8639
|
+
* this the only available ear belongs to somebody else.
|
|
8640
|
+
*
|
|
8641
|
+
* **Feedback is the hazard, and the reason this is a held, explicit action rather
|
|
8642
|
+
* than a setting:** without headphones the speakers feed the microphone that feeds
|
|
8643
|
+
* the speakers. Say so in the UI that offers it.
|
|
8644
|
+
*
|
|
8645
|
+
* @param source - The raw captured track to listen to. It is never stopped here.
|
|
8646
|
+
* @param settings - The stages to hear it through. Default {@link DEFAULT_VOICE_CHAIN}.
|
|
8647
|
+
* @param options - See {@link VoiceChainOptions}; `ownsSource` is forced to `false`.
|
|
8648
|
+
* @returns A handle that stops the monitor.
|
|
8649
|
+
*/
|
|
8650
|
+
export declare function monitorVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, options?: Omit<VoiceChainOptions, "ownsSource">): VoiceMonitor;
|
|
8651
|
+
|
|
8099
8652
|
/** Reorder helper: move `from` to `to`, returning a new array. */
|
|
8100
8653
|
export declare function moveItem<T>(items: T[], from: number, to: number): T[];
|
|
8101
8654
|
|
|
@@ -8264,6 +8817,16 @@ export declare interface NavigationRailProps extends Omit<HTMLAttributes<HTMLEle
|
|
|
8264
8817
|
|
|
8265
8818
|
export { NavLink }
|
|
8266
8819
|
|
|
8820
|
+
/** Options for {@link measureNoiseFloor}. */
|
|
8821
|
+
export declare interface NoiseFloorOptions {
|
|
8822
|
+
/** Called with `0..1` so a dialog can show the wait. */
|
|
8823
|
+
onProgress?: (fraction: number) => void;
|
|
8824
|
+
/** How long to listen. Default `3000`. */
|
|
8825
|
+
durationMs?: number;
|
|
8826
|
+
/** Reuse an existing `AudioContext` rather than opening one. */
|
|
8827
|
+
context?: AudioContext;
|
|
8828
|
+
}
|
|
8829
|
+
|
|
8267
8830
|
/**
|
|
8268
8831
|
* Turn one raw detection into a {@link BarcodeScanResult}.
|
|
8269
8832
|
*
|
|
@@ -9032,8 +9595,19 @@ export declare interface PageProps extends Omit<HTMLAttributes<HTMLElement>, "ti
|
|
|
9032
9595
|
|
|
9033
9596
|
/**
|
|
9034
9597
|
* Numeric pagination controls. Pair with {@link usePagination} for state.
|
|
9598
|
+
*
|
|
9599
|
+
* Narrow screens collapse to `‹` / `›` plus the summary by default, which turns
|
|
9600
|
+
* random access into sequential access — fine for a desktop-first app, wrong for
|
|
9601
|
+
* one whose traffic is phones. `compactOnMobile={false}` keeps the numbers at
|
|
9602
|
+
* every width: the row scrolls on its own instead of widening the page, and the
|
|
9603
|
+
* effect below keeps the current page inside the visible part of that row.
|
|
9604
|
+
*
|
|
9605
|
+
* The scroll is why this is one boolean rather than a `variant`. Simply
|
|
9606
|
+
* un-hiding the buttons would push a nine-button row past a 360px viewport and
|
|
9607
|
+
* give the whole document a horizontal scrollbar — the opt-out has to carry its
|
|
9608
|
+
* own layout, so it does.
|
|
9035
9609
|
*/
|
|
9036
|
-
export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, className, }: PaginationProps): JSX.Element | null;
|
|
9610
|
+
export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, compactOnMobile, className, }: PaginationProps): JSX.Element | null;
|
|
9037
9611
|
|
|
9038
9612
|
export declare interface PaginationProps {
|
|
9039
9613
|
page: number;
|
|
@@ -9044,8 +9618,20 @@ export declare interface PaginationProps {
|
|
|
9044
9618
|
pageSizeOptions?: number[];
|
|
9045
9619
|
/** Total items count; if provided, renders the summary text. */
|
|
9046
9620
|
totalItems?: number;
|
|
9047
|
-
/**
|
|
9621
|
+
/** Pages kept around the current one; ~`siblingCount + 4` buttons render. Default 3. */
|
|
9048
9622
|
siblingCount?: number;
|
|
9623
|
+
/**
|
|
9624
|
+
* Below 640px, drop to `‹` / `›` plus the summary and hide the numbered
|
|
9625
|
+
* buttons and the size select. Default `true`.
|
|
9626
|
+
*
|
|
9627
|
+
* The default suits a desktop-first app, and costs the thing pagination is
|
|
9628
|
+
* for on a phone: reaching page 7 becomes six taps on "next" instead of one
|
|
9629
|
+
* tap on `7`. Pass `false` in a mobile-first app and the numbers stay at
|
|
9630
|
+
* every width — the row scrolls horizontally by itself rather than pushing
|
|
9631
|
+
* the page wider, and the current page is scrolled into view when it
|
|
9632
|
+
* changes.
|
|
9633
|
+
*/
|
|
9634
|
+
compactOnMobile?: boolean;
|
|
9049
9635
|
className?: string;
|
|
9050
9636
|
}
|
|
9051
9637
|
|
|
@@ -9057,13 +9643,28 @@ declare type ParamValue = string | number | boolean | undefined | null;
|
|
|
9057
9643
|
/**
|
|
9058
9644
|
* Validate an unknown response payload against a zod schema.
|
|
9059
9645
|
*
|
|
9060
|
-
*
|
|
9061
|
-
*
|
|
9646
|
+
* A development build throws a detailed error naming every divergent field path
|
|
9647
|
+
* and embedding the raw payload; every other build throws a generic sentence, so
|
|
9648
|
+
* server internals never reach a user's screen or an error tracker.
|
|
9649
|
+
*
|
|
9650
|
+
* Which one you get comes from `isDevBuild()`, the SDK's single answer to that
|
|
9651
|
+
* question, rather than from a check written here. This function used to ask
|
|
9652
|
+
* `typeof process !== "undefined" && process.env?.NODE_ENV === "development"`,
|
|
9653
|
+
* and a browser has no `process` identifier at all — so the guard short-circuited
|
|
9654
|
+
* and the detailed branch was dead in exactly the build it was written for, no
|
|
9655
|
+
* matter what the bundler substituted behind it.
|
|
9656
|
+
*
|
|
9657
|
+
* The rule `isDevBuild()` applies is `NODE_ENV !== "production"`, which is wider
|
|
9658
|
+
* than the old `"development" || "test"`: a staging build that never sets
|
|
9659
|
+
* `NODE_ENV=production` gets the drift report, raw payload included.
|
|
9062
9660
|
*
|
|
9063
9661
|
* @param schema - The zod schema to parse against.
|
|
9064
9662
|
* @param raw - The raw response payload.
|
|
9065
9663
|
* @param context - A label used in error messages, e.g. "POST /auth/login".
|
|
9066
9664
|
* @returns The parsed, typed payload.
|
|
9665
|
+
* @throws Error When the payload does not match the schema: `[parseResponse]
|
|
9666
|
+
* Contract drift on <context>` with the field paths and the raw payload in a
|
|
9667
|
+
* development build, `Resposta inválida do servidor (<context>).` otherwise.
|
|
9067
9668
|
*/
|
|
9068
9669
|
export declare function parseResponse<TSchema extends z.ZodTypeAny>(schema: TSchema, raw: unknown, context: string): z.infer<TSchema>;
|
|
9069
9670
|
|
|
@@ -9340,6 +9941,87 @@ export declare interface PcmAudio {
|
|
|
9340
9941
|
sampleRate: number;
|
|
9341
9942
|
}
|
|
9342
9943
|
|
|
9944
|
+
/** A running mesh. */
|
|
9945
|
+
export declare interface PeerMesh {
|
|
9946
|
+
/**
|
|
9947
|
+
* Open a link to a peer.
|
|
9948
|
+
*
|
|
9949
|
+
* `offerer` decides which side sends the offer, and exactly one side of each
|
|
9950
|
+
* link must say `true`. Drive it from the arrival order your server already
|
|
9951
|
+
* imposes — the peer that joined **later** offers, the one already in the
|
|
9952
|
+
* room answers. That avoids glare by construction, without the rollback
|
|
9953
|
+
* dance of perfect negotiation and without depending on a browser
|
|
9954
|
+
* implementing argument-less `setLocalDescription`.
|
|
9955
|
+
*/
|
|
9956
|
+
addPeer: (peerId: string, options: {
|
|
9957
|
+
offerer: boolean;
|
|
9958
|
+
}) => Promise<void>;
|
|
9959
|
+
/** Close one link and give its share of the uplink back to the others. */
|
|
9960
|
+
removePeer: (peerId: string) => void;
|
|
9961
|
+
/** Feed the mesh an `offer`, `answer` or `ice` message from `from`. */
|
|
9962
|
+
accept: (message: MeshMessage & {
|
|
9963
|
+
from: string;
|
|
9964
|
+
}) => Promise<void>;
|
|
9965
|
+
/**
|
|
9966
|
+
* Publish or retract one slot across every live link.
|
|
9967
|
+
*
|
|
9968
|
+
* `null` retracts: the sender keeps its negotiated transceiver and stops
|
|
9969
|
+
* producing, which is what mutes a microphone without disturbing the other
|
|
9970
|
+
* slots or the connection. Nothing renegotiates — the m-lines were allocated
|
|
9971
|
+
* before any track existed, which is what makes a mesh survive toggling: a
|
|
9972
|
+
* renegotiation per toggle is N-1 simultaneous offer/answer rounds every time
|
|
9973
|
+
* somebody unmutes.
|
|
9974
|
+
*/
|
|
9975
|
+
setLocalTrack: (slot: string, track: MediaStreamTrack | null) => Promise<void>;
|
|
9976
|
+
/** Apply encoder limits, divided by the current size of the room. */
|
|
9977
|
+
applyQuality: (quality: MeshQuality) => Promise<void>;
|
|
9978
|
+
/** Replace the ICE servers used for links opened from now on. */
|
|
9979
|
+
setIceServers: (servers: RTCIceServer[]) => void;
|
|
9980
|
+
/** Close every link and report `closed`. */
|
|
9981
|
+
stop: () => void;
|
|
9982
|
+
/** The peers as the mesh currently sees them. */
|
|
9983
|
+
readonly peers: MeshPeer[];
|
|
9984
|
+
}
|
|
9985
|
+
|
|
9986
|
+
/** Options for `createPeerMesh`. */
|
|
9987
|
+
export declare interface PeerMeshOptions {
|
|
9988
|
+
/** The lanes every link negotiates, in the order they are allocated. */
|
|
9989
|
+
slots: readonly MeshSlot[];
|
|
9990
|
+
/** Send one message to the peer named by `to`. The transport is yours. */
|
|
9991
|
+
send: (message: MeshMessage) => void;
|
|
9992
|
+
/** ICE servers for every connection this mesh opens. */
|
|
9993
|
+
iceServers?: RTCIceServer[];
|
|
9994
|
+
/** Called whenever the peer list or any peer's streams change. */
|
|
9995
|
+
onPeers?: (peers: MeshPeer[]) => void;
|
|
9996
|
+
/** Called when the aggregate state changes, with an optional detail. */
|
|
9997
|
+
onState?: (state: MeshState, detail?: string) => void;
|
|
9998
|
+
/** Called for a failure worth surfacing that is not fatal to the mesh. */
|
|
9999
|
+
onNotice?: (reason: string) => void;
|
|
10000
|
+
/** Initial encoder limits. */
|
|
10001
|
+
quality?: MeshQuality;
|
|
10002
|
+
/**
|
|
10003
|
+
* Applies a local description, so the SDP can be rewritten on the way out.
|
|
10004
|
+
*
|
|
10005
|
+
* Defaults to `connection.setLocalDescription(description)`. The reason it
|
|
10006
|
+
* is a seam is `setTunedLocalDescription`: the mesh is what creates every
|
|
10007
|
+
* offer and answer, so without a hook here there is nowhere left to put the
|
|
10008
|
+
* Opus rewrite, and a call that adopts the mesh silently loses the bitrate
|
|
10009
|
+
* and channel layout it had negotiated before.
|
|
10010
|
+
*
|
|
10011
|
+
* Profiles are keyed by **audio m-line position**, which is legitimate for
|
|
10012
|
+
* exactly the reason slot routing is: the slot list fixes the order, so the
|
|
10013
|
+
* first audio slot is always the first audio m-line.
|
|
10014
|
+
*
|
|
10015
|
+
* @example
|
|
10016
|
+
* setLocalDescription: (connection, description) =>
|
|
10017
|
+
* setTunedLocalDescription(connection, description, {
|
|
10018
|
+
* 0: MIC_PROFILE,
|
|
10019
|
+
* 1: SYSTEM_AUDIO_PROFILE,
|
|
10020
|
+
* }),
|
|
10021
|
+
*/
|
|
10022
|
+
setLocalDescription?: (connection: RTCPeerConnection, description: RTCSessionDescriptionInit) => Promise<unknown>;
|
|
10023
|
+
}
|
|
10024
|
+
|
|
9343
10025
|
/**
|
|
9344
10026
|
* What percentage of `total` is `part`, with an empty base yielding `0`.
|
|
9345
10027
|
*
|
|
@@ -9597,8 +10279,13 @@ export declare interface PopoverProps {
|
|
|
9597
10279
|
* Renders its children into a different part of the DOM tree via a React portal.
|
|
9598
10280
|
*
|
|
9599
10281
|
* Useful for overlays (modals, tooltips, dropdowns) that must escape parent
|
|
9600
|
-
* overflow/stacking contexts.
|
|
9601
|
-
*
|
|
10282
|
+
* overflow/stacking contexts.
|
|
10283
|
+
*
|
|
10284
|
+
* Without `container` the target is the element currently presented fullscreen,
|
|
10285
|
+
* and `document.body` the rest of the time. `body` alone would be wrong during
|
|
10286
|
+
* fullscreen: the browser paints only the fullscreen element's subtree, so an
|
|
10287
|
+
* overlay mounted outside it is invisible and unclickable while looking perfectly
|
|
10288
|
+
* healthy in the DOM. Passing `container` opts out of that and pins the target.
|
|
9602
10289
|
*
|
|
9603
10290
|
* SSR-safe: renders `null` on the server and on the first client render, then
|
|
9604
10291
|
* mounts the portal after hydration (when `document` is available).
|
|
@@ -9611,7 +10298,12 @@ export declare function Portal({ children, container }: PortalProps): ReactNode;
|
|
|
9611
10298
|
export declare interface PortalProps {
|
|
9612
10299
|
/** Content rendered through the portal. */
|
|
9613
10300
|
children: ReactNode;
|
|
9614
|
-
/**
|
|
10301
|
+
/**
|
|
10302
|
+
* Target DOM node to render into.
|
|
10303
|
+
*
|
|
10304
|
+
* Defaults to the fullscreen element while one is presented, and to
|
|
10305
|
+
* `document.body` otherwise.
|
|
10306
|
+
*/
|
|
9615
10307
|
container?: Element | null;
|
|
9616
10308
|
}
|
|
9617
10309
|
|
|
@@ -9645,7 +10337,7 @@ export declare interface PostHogLike {
|
|
|
9645
10337
|
}
|
|
9646
10338
|
|
|
9647
10339
|
/** A lazy component that can also be fetched ahead of being rendered. */
|
|
9648
|
-
export declare type PreloadableLazy<T extends
|
|
10340
|
+
export declare type PreloadableLazy<T extends AnyComponent> = ReturnType<typeof lazy<T>> & {
|
|
9649
10341
|
/**
|
|
9650
10342
|
* Start fetching the chunk now, before anything renders it.
|
|
9651
10343
|
*
|
|
@@ -9743,6 +10435,20 @@ export declare interface PullPage<TRemote> {
|
|
|
9743
10435
|
serverTime: string | null;
|
|
9744
10436
|
}
|
|
9745
10437
|
|
|
10438
|
+
/**
|
|
10439
|
+
* The keys worth offering for push-to-talk.
|
|
10440
|
+
*
|
|
10441
|
+
* Identified by `code` rather than `key` so a binding survives a layout change:
|
|
10442
|
+
* on an ABNT2 keyboard the `key` reported for the backquote position is not what
|
|
10443
|
+
* a US layout reports, while `Backquote` is the same physical key everywhere.
|
|
10444
|
+
*
|
|
10445
|
+
* Left-hand modifiers only. The right-hand ones sit under the hand that is
|
|
10446
|
+
* usually on the mouse, and a modifier that is also a shortcut prefix
|
|
10447
|
+
* (`ControlLeft` with a browser shortcut) is a deliberate trade the caller makes
|
|
10448
|
+
* by choosing it.
|
|
10449
|
+
*/
|
|
10450
|
+
export declare const PUSH_TO_TALK_KEYS: readonly PushToTalkKey[];
|
|
10451
|
+
|
|
9746
10452
|
/**
|
|
9747
10453
|
* Service-worker context helpers for handling `push` and `notificationclick`
|
|
9748
10454
|
* events. Import these inside your own `sw.ts` — they expect to run in the
|
|
@@ -9767,6 +10473,23 @@ export declare interface PushPayload {
|
|
|
9767
10473
|
data?: Record<string, unknown>;
|
|
9768
10474
|
}
|
|
9769
10475
|
|
|
10476
|
+
/** A key offered for push-to-talk, with the label a settings screen shows. */
|
|
10477
|
+
export declare interface PushToTalkKey {
|
|
10478
|
+
/** `KeyboardEvent.code`, which is layout-independent. */
|
|
10479
|
+
code: string;
|
|
10480
|
+
/** What to show a person. `code` itself is not a label. */
|
|
10481
|
+
label: string;
|
|
10482
|
+
}
|
|
10483
|
+
|
|
10484
|
+
/**
|
|
10485
|
+
* The label to show for a `KeyboardEvent.code`.
|
|
10486
|
+
*
|
|
10487
|
+
* @param code - The bound key's code.
|
|
10488
|
+
* @returns Its label, or the code itself for a key this list does not name —
|
|
10489
|
+
* showing `"F13"` beats showing nothing.
|
|
10490
|
+
*/
|
|
10491
|
+
export declare function pushToTalkKeyLabel(code: string): string;
|
|
10492
|
+
|
|
9770
10493
|
/** Raised when a payload cannot be encoded at the requested level. */
|
|
9771
10494
|
export declare class QRCapacityError extends Error {
|
|
9772
10495
|
readonly length: number;
|
|
@@ -10030,6 +10753,29 @@ export declare function readableForeground(background: string, light?: string, d
|
|
|
10030
10753
|
*/
|
|
10031
10754
|
export declare function readDeviceProfile(): DeviceProfile;
|
|
10032
10755
|
|
|
10756
|
+
/**
|
|
10757
|
+
* Read the round trip of the candidate pair actually carrying the link.
|
|
10758
|
+
*
|
|
10759
|
+
* A connection routinely keeps several viable pairs alive at once — host,
|
|
10760
|
+
* server-reflexive, relayed — and only one of them carries traffic. Reading the
|
|
10761
|
+
* first `succeeded` pair makes the number jump between paths that are not being
|
|
10762
|
+
* travelled: 8 ms on an idle host pair alternating with 180 ms on the TURN pair
|
|
10763
|
+
* doing the work. The pair the transport names in `selectedCandidatePairId` is
|
|
10764
|
+
* the one being used.
|
|
10765
|
+
*
|
|
10766
|
+
* A succeeded pair is kept as a fallback because not every browser fills that
|
|
10767
|
+
* field in — losing the reading entirely is worse than an occasionally
|
|
10768
|
+
* optimistic one.
|
|
10769
|
+
*
|
|
10770
|
+
* @param report - A report from `RTCPeerConnection.getStats()`.
|
|
10771
|
+
* @returns Round trip in milliseconds, rounded, or `null` when nothing reported
|
|
10772
|
+
* one — which is the normal state before the connection settles.
|
|
10773
|
+
*
|
|
10774
|
+
* @example
|
|
10775
|
+
* const rttMs = readRoundTripMs(await pc.getStats());
|
|
10776
|
+
*/
|
|
10777
|
+
export declare function readRoundTripMs(report: RTCStatsReport): number | null;
|
|
10778
|
+
|
|
10033
10779
|
/**
|
|
10034
10780
|
* Read a token's computed value from an element (default: `<html>`).
|
|
10035
10781
|
*
|
|
@@ -10116,7 +10862,19 @@ export declare interface RegisterPeriodicSyncOptions {
|
|
|
10116
10862
|
*
|
|
10117
10863
|
* Skips silently when the runtime has no `serviceWorker` support. The host
|
|
10118
10864
|
* app keeps full control over the SW file — this helper only handles the
|
|
10119
|
-
* boilerplate around `register()` and
|
|
10865
|
+
* boilerplate around `register()` and update detection.
|
|
10866
|
+
*
|
|
10867
|
+
* Two things can mean "an update is ready", and only one of them is an event.
|
|
10868
|
+
* `updatefound` covers the worker that installs while this tab is open. The
|
|
10869
|
+
* commoner case has no event at all: the user visited after a deploy, the new
|
|
10870
|
+
* worker installed and went to `waiting`, they closed the tab, and they are back
|
|
10871
|
+
* now. `install` already happened, so nothing fires — which is why `waiting` is
|
|
10872
|
+
* read directly once the registration resolves. Both routes go through the same
|
|
10873
|
+
* dedupe, so a worker is announced once even when both apply.
|
|
10874
|
+
*
|
|
10875
|
+
* Neither route fires without `navigator.serviceWorker.controller`: no
|
|
10876
|
+
* controller means this is the first install, which is `onReady` territory, not
|
|
10877
|
+
* an update the user should be prompted about.
|
|
10120
10878
|
*
|
|
10121
10879
|
* With `autoUpdate` enabled it additionally polls `registration.update()` on
|
|
10122
10880
|
* an interval and (by default) reloads the page when a freshly activated worker
|
|
@@ -10138,6 +10896,10 @@ export declare interface RegisterServiceWorkerOptions {
|
|
|
10138
10896
|
* Called when a new worker has finished installing while another worker
|
|
10139
10897
|
* still controls the page. The host app typically prompts the user to
|
|
10140
10898
|
* reload and then calls {@link skipWaiting} on the returned worker.
|
|
10899
|
+
*
|
|
10900
|
+
* Fires for a worker that was already `waiting` when `register()` resolved
|
|
10901
|
+
* — the state a user returning after a deploy actually finds — as well as
|
|
10902
|
+
* for one that installs during this session, and at most once per worker.
|
|
10141
10903
|
*/
|
|
10142
10904
|
onUpdate?: (waiting: ServiceWorker, registration: ServiceWorkerRegistration) => void;
|
|
10143
10905
|
/** Called on registration failure. */
|
|
@@ -10283,6 +11045,22 @@ export declare interface ResizableProps extends Omit<HTMLAttributes<HTMLDivEleme
|
|
|
10283
11045
|
children: [ReactNode, ReactNode];
|
|
10284
11046
|
}
|
|
10285
11047
|
|
|
11048
|
+
/**
|
|
11049
|
+
* Decide what the encoder gives up, letting physics override the preference.
|
|
11050
|
+
*
|
|
11051
|
+
* `maintain-framerate` is honoured while there are bits enough for the frames to
|
|
11052
|
+
* be worth keeping. Once the room's division has taken the budget below the
|
|
11053
|
+
* fluid floor, holding the rate halves what each frame receives and the picture
|
|
11054
|
+
* is worse than the lower rate it replaced — so below that line the preference
|
|
11055
|
+
* is overridden rather than obeyed.
|
|
11056
|
+
*
|
|
11057
|
+
* @param quality - What was asked for.
|
|
11058
|
+
* @param effective - What the room's share actually allows.
|
|
11059
|
+
* @returns The degradation preference to write onto the senders, or `undefined`
|
|
11060
|
+
* when the caller expressed no preference.
|
|
11061
|
+
*/
|
|
11062
|
+
export declare function resolveDegradation(quality: MeshQuality, effective: MeshQuality): RTCDegradationPreference | undefined;
|
|
11063
|
+
|
|
10286
11064
|
export declare type ResolvedTheme = "light" | "dark";
|
|
10287
11065
|
|
|
10288
11066
|
/**
|
|
@@ -10484,22 +11262,40 @@ export { Route }
|
|
|
10484
11262
|
|
|
10485
11263
|
/**
|
|
10486
11264
|
* Declarative route guard built on React Router's `<Navigate>`. Renders its
|
|
10487
|
-
* children when `when` is
|
|
10488
|
-
* `createAuthStore` for protected areas
|
|
11265
|
+
* children when `when` is `true`, redirects when it is `false`, and holds on
|
|
11266
|
+
* `"pending"`. Pairs naturally with `createAuthStore` for protected areas, and
|
|
11267
|
+
* with `useCan` for permissions that resolve over the network.
|
|
10489
11268
|
*
|
|
10490
11269
|
* @example
|
|
10491
11270
|
* <RouteGuard when={useAuthStore((s) => s.isAuthenticated)} redirectTo="/login">
|
|
10492
11271
|
* <Outlet />
|
|
10493
11272
|
* </RouteGuard>
|
|
11273
|
+
*
|
|
11274
|
+
* @example
|
|
11275
|
+
* const { allowed, isLoading } = useCan({ action: "read", resource: "finance" });
|
|
11276
|
+
*
|
|
11277
|
+
* <RouteGuard when={isLoading ? "pending" : allowed} fallback={<Spinner />}>
|
|
11278
|
+
* <Outlet />
|
|
11279
|
+
* </RouteGuard>
|
|
10494
11280
|
*/
|
|
10495
|
-
export declare function RouteGuard({ when, redirectTo, replace, children }: RouteGuardProps): JSX.Element;
|
|
11281
|
+
export declare function RouteGuard({ when, fallback, redirectTo, replace, children, }: RouteGuardProps): JSX.Element;
|
|
10496
11282
|
|
|
10497
11283
|
export declare interface RouteGuardProps {
|
|
10498
11284
|
/**
|
|
10499
|
-
* Whether access is allowed
|
|
10500
|
-
*
|
|
11285
|
+
* Whether access is allowed — typically
|
|
11286
|
+
* `useAuthStore((s) => s.isAuthenticated)`.
|
|
11287
|
+
*
|
|
11288
|
+
* `"pending"` is the third answer, for a permission that has not resolved
|
|
11289
|
+
* yet: it holds the decision and renders {@link fallback} instead of
|
|
11290
|
+
* choosing between two wrong moves — redirecting someone who does have
|
|
11291
|
+
* access, or showing the screen to someone who does not.
|
|
11292
|
+
*/
|
|
11293
|
+
when: RouteGuardResult;
|
|
11294
|
+
/**
|
|
11295
|
+
* Rendered while `when` is `"pending"`. Defaults to nothing, which is a
|
|
11296
|
+
* blank screen — pass the same spinner the rest of the app uses.
|
|
10501
11297
|
*/
|
|
10502
|
-
|
|
11298
|
+
fallback?: ReactNode;
|
|
10503
11299
|
/** Where to redirect when `when` is falsy (default: `"/"`). */
|
|
10504
11300
|
redirectTo?: string;
|
|
10505
11301
|
/** Replace history entry on redirect instead of pushing (default: true). */
|
|
@@ -10508,6 +11304,19 @@ export declare interface RouteGuardProps {
|
|
|
10508
11304
|
children: ReactNode;
|
|
10509
11305
|
}
|
|
10510
11306
|
|
|
11307
|
+
/**
|
|
11308
|
+
* What a route guard can answer.
|
|
11309
|
+
*
|
|
11310
|
+
* `true` renders the route, `false` redirects — and `"pending"` is the third
|
|
11311
|
+
* answer a two-state guard cannot give. Without it, a permission that resolves
|
|
11312
|
+
* asynchronously has to lie while it is in flight, and both lies are wrong:
|
|
11313
|
+
* answering `false` redirects the person who **does** have the permission,
|
|
11314
|
+
* every time the route is opened cold (F5 on the URL, an external link);
|
|
11315
|
+
* answering `true` renders the screen for someone who does not, until the
|
|
11316
|
+
* answer lands.
|
|
11317
|
+
*/
|
|
11318
|
+
export declare type RouteGuardResult = boolean | "pending";
|
|
11319
|
+
|
|
10511
11320
|
/** Router history strategy used by {@link AppRouter}. */
|
|
10512
11321
|
export declare type RouterKind = "browser" | "hash" | "memory";
|
|
10513
11322
|
|
|
@@ -10601,6 +11410,26 @@ export declare interface SafeAreaProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10601
11410
|
children?: ReactNode;
|
|
10602
11411
|
}
|
|
10603
11412
|
|
|
11413
|
+
/**
|
|
11414
|
+
* Divide the video caps by the size of the room.
|
|
11415
|
+
*
|
|
11416
|
+
* A mesh sends one copy of everything per participant, so the uplink is the
|
|
11417
|
+
* shared resource and the caps are what compete for it. Nothing is divided while
|
|
11418
|
+
* the caller is alone with one peer — that is the case the largest sizes exist
|
|
11419
|
+
* for, and dividing a budget that is not being shared would make them
|
|
11420
|
+
* unreachable in the only call where they fit.
|
|
11421
|
+
*
|
|
11422
|
+
* The floor is what keeps the division honest: without it a busy room allocates
|
|
11423
|
+
* tens of kbps per stream, and everybody loses the picture instead of the excess
|
|
11424
|
+
* giving way.
|
|
11425
|
+
*
|
|
11426
|
+
* @param quality - The caps as asked for.
|
|
11427
|
+
* @param peers - How many links are live.
|
|
11428
|
+
* @returns The caps to actually apply. The input is never mutated, so a room
|
|
11429
|
+
* that empties out climbs back to what was asked for.
|
|
11430
|
+
*/
|
|
11431
|
+
export declare function scaleForRoom(quality: MeshQuality, peers: number): MeshQuality;
|
|
11432
|
+
|
|
10604
11433
|
/** The ten steps of a Tempest tint scale, lightest to darkest. */
|
|
10605
11434
|
export declare type ScaleStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
10606
11435
|
|
|
@@ -11649,6 +12478,19 @@ export { StorageEstimate_2 as StorageEstimate }
|
|
|
11649
12478
|
|
|
11650
12479
|
export { SubmitHandler }
|
|
11651
12480
|
|
|
12481
|
+
/**
|
|
12482
|
+
* Turn a measured noise floor into a threshold worth using.
|
|
12483
|
+
*
|
|
12484
|
+
* Sits above the floor by a margin rather than on it, and is clamped at both
|
|
12485
|
+
* ends: a room measured as perfectly silent (or not measured at all) would
|
|
12486
|
+
* otherwise get a threshold of zero, which is a gate that never closes, and a
|
|
12487
|
+
* room measured while somebody talked would get one nothing opens.
|
|
12488
|
+
*
|
|
12489
|
+
* @param noiseFloor - Peak RMS measured while nobody spoke.
|
|
12490
|
+
* @returns A threshold for {@link VoiceChainSettings.gateThreshold}, `0.004..0.12`.
|
|
12491
|
+
*/
|
|
12492
|
+
export declare function suggestGateThreshold(noiseFloor: number): number;
|
|
12493
|
+
|
|
11652
12494
|
/** Toggle switch backed by a checkbox input. Accessible via keyboard. */
|
|
11653
12495
|
export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLInputElement>>;
|
|
11654
12496
|
|
|
@@ -12010,15 +12852,30 @@ export declare interface TempestRouteObject {
|
|
|
12010
12852
|
* under the {@link AppRouter} `<Suspense>` boundary.
|
|
12011
12853
|
*/
|
|
12012
12854
|
lazy?: () => Promise<{
|
|
12013
|
-
default:
|
|
12855
|
+
default: AnyRouteComponent;
|
|
12014
12856
|
}>;
|
|
12015
12857
|
/** Nested child routes (rendered through this route's `<Outlet />`). */
|
|
12016
12858
|
children?: TempestRouteObject[];
|
|
12017
12859
|
/**
|
|
12018
12860
|
* Access guard. When `false` (or a function returning `false`), the route
|
|
12019
|
-
* renders a redirect to {@link redirectTo} instead of its element.
|
|
12861
|
+
* renders a redirect to {@link redirectTo} instead of its element. When the
|
|
12862
|
+
* function returns `"pending"`, the decision is held and {@link guardFallback}
|
|
12863
|
+
* renders instead — see {@link RouteGuardResult}.
|
|
12864
|
+
*
|
|
12865
|
+
* The function runs inside the guard component's render, so it **may call
|
|
12866
|
+
* hooks** — which is what lets an async permission check like `useCan` plug
|
|
12867
|
+
* straight in. The usual rule applies: call the same hooks on every render
|
|
12868
|
+
* of that route. Guarded routes are keyed per route object, so navigating
|
|
12869
|
+
* between two routes whose guards call different hooks remounts rather than
|
|
12870
|
+
* breaking hook order.
|
|
12871
|
+
*/
|
|
12872
|
+
guard?: boolean | (() => RouteGuardResult);
|
|
12873
|
+
/**
|
|
12874
|
+
* Rendered while {@link guard} answers `"pending"`. Defaults to the
|
|
12875
|
+
* {@link AppRouter} `fallback`, so a route tree that already passes a
|
|
12876
|
+
* spinner for `lazy` chunks reuses it here with no extra wiring.
|
|
12020
12877
|
*/
|
|
12021
|
-
|
|
12878
|
+
guardFallback?: ReactNode;
|
|
12022
12879
|
/** Destination used when `guard` fails (default: `"/"`). */
|
|
12023
12880
|
redirectTo?: string;
|
|
12024
12881
|
/** Match the path case-sensitively. */
|
|
@@ -13599,6 +14456,71 @@ export { UseFormReturn }
|
|
|
13599
14456
|
|
|
13600
14457
|
export { useFormState }
|
|
13601
14458
|
|
|
14459
|
+
/**
|
|
14460
|
+
* Drive an immersive mode whose state stays true to the browser.
|
|
14461
|
+
*
|
|
14462
|
+
* The mistake this exists to remove is storing `isFullscreen` in state and
|
|
14463
|
+
* flipping it inside your own `enter()` / `exit()`. Fullscreen ends in ways your
|
|
14464
|
+
* code never sees — `Esc`, the browser's own exit affordance, F11 pressed while an
|
|
14465
|
+
* API fullscreen is active — and each of those leaves the flag saying "sair" over
|
|
14466
|
+
* a page that is already windowed. The only honest source is the
|
|
14467
|
+
* `fullscreenchange` event, which fires for every one of them, so that is what
|
|
14468
|
+
* this hook reads and what the returned `isFullscreen` reflects. The action
|
|
14469
|
+
* callbacks never touch it.
|
|
14470
|
+
*
|
|
14471
|
+
* The subscription is not this hook's own: it lives in `useFullscreenElement`,
|
|
14472
|
+
* shared with `usePortalHost`, which needs the same fact to decide where an
|
|
14473
|
+
* overlay mounts while fullscreen is on. Two independent listeners for one event
|
|
14474
|
+
* would mean two copies of the WebKit prefix dance and two places to fix the next
|
|
14475
|
+
* quirk, so the primitive answers "which element is presented" once and each
|
|
14476
|
+
* consumer asks its own question of the answer.
|
|
14477
|
+
*
|
|
14478
|
+
* WebKit's prefixed members are handled throughout — `webkitfullscreenchange`,
|
|
14479
|
+
* `webkitFullscreenElement`, `webkitRequestFullscreen`, `webkitExitFullscreen` —
|
|
14480
|
+
* because Safari on iPad still ships them and nothing else.
|
|
14481
|
+
*
|
|
14482
|
+
* `isFullscreen` is identity against the target, not containment: a `<video>`
|
|
14483
|
+
* inside your element going fullscreen on its own is not your element being
|
|
14484
|
+
* presented, and reporting `true` there would put your exit control inside a
|
|
14485
|
+
* subtree the browser is not painting.
|
|
14486
|
+
*
|
|
14487
|
+
* @param ref - The element to present. Omit it to present the whole page
|
|
14488
|
+
* (`document.documentElement`).
|
|
14489
|
+
* @returns `{ isFullscreen, supported, enter, exit, toggle }`.
|
|
14490
|
+
* @throws Nothing during render. `enter()` and `toggle()` reject with the
|
|
14491
|
+
* browser's own error when the request is refused — most often a `TypeError`
|
|
14492
|
+
* because the call did not come from a user gesture — and with an `Error` when
|
|
14493
|
+
* there is no element to present or the environment ships no Fullscreen API.
|
|
14494
|
+
*
|
|
14495
|
+
* @example
|
|
14496
|
+
* const stage = useRef<HTMLDivElement>(null);
|
|
14497
|
+
* const { isFullscreen, supported, toggle } = useFullscreen(stage);
|
|
14498
|
+
*
|
|
14499
|
+
* <div ref={stage}>
|
|
14500
|
+
* <video src="/aula.mp4" controls />
|
|
14501
|
+
* {supported ? (
|
|
14502
|
+
* <button onClick={() => void toggle().catch(() => setRefused(true))}>
|
|
14503
|
+
* {isFullscreen ? "Sair da tela cheia" : "Tela cheia"}
|
|
14504
|
+
* </button>
|
|
14505
|
+
* ) : null}
|
|
14506
|
+
* </div>
|
|
14507
|
+
*/
|
|
14508
|
+
export declare function useFullscreen(ref?: RefObject<HTMLElement | null>): UseFullscreenResult;
|
|
14509
|
+
|
|
14510
|
+
/** Value returned by {@link useFullscreen}. */
|
|
14511
|
+
export declare interface UseFullscreenResult {
|
|
14512
|
+
/** Whether the target element is the one the browser is presenting right now. */
|
|
14513
|
+
isFullscreen: boolean;
|
|
14514
|
+
/** Whether a request stands a chance at all — hide the control when `false`. */
|
|
14515
|
+
supported: boolean;
|
|
14516
|
+
/** Present the target. Must be called from a user gesture. Rejects if refused. */
|
|
14517
|
+
enter: () => Promise<void>;
|
|
14518
|
+
/** Leave fullscreen. Resolves immediately when nothing is presented. */
|
|
14519
|
+
exit: () => Promise<void>;
|
|
14520
|
+
/** Leave if the target is presented, otherwise enter. Same gesture rule as `enter`. */
|
|
14521
|
+
toggle: () => Promise<void>;
|
|
14522
|
+
}
|
|
14523
|
+
|
|
13602
14524
|
/**
|
|
13603
14525
|
* React hook around the Geolocation API.
|
|
13604
14526
|
*
|
|
@@ -13813,6 +14735,51 @@ export declare interface UseKeyboardShortcutOptions {
|
|
|
13813
14735
|
*/
|
|
13814
14736
|
export declare function useLatestRef<T>(value: T): RefObject<T>;
|
|
13815
14737
|
|
|
14738
|
+
/**
|
|
14739
|
+
* Poll one connection's throughput, resolution and round trip.
|
|
14740
|
+
*
|
|
14741
|
+
* Sampling runs only while the connection is `"connected"`, so a link that is
|
|
14742
|
+
* still negotiating or already gone costs nothing. The last reading is kept
|
|
14743
|
+
* across pauses rather than cleared, because a badge that blanks every time the
|
|
14744
|
+
* tab loses focus reads as a broken connection.
|
|
14745
|
+
*
|
|
14746
|
+
* Coming back from a pause resets the baseline first. Without that, the sample
|
|
14747
|
+
* after a five-minute background stretch divides five minutes of bytes by five
|
|
14748
|
+
* minutes and reports the average of a period the person is not asking about.
|
|
14749
|
+
*
|
|
14750
|
+
* @param connection - The connection to watch, or `null` before one exists.
|
|
14751
|
+
* @param options - See {@link UseLinkStatsOptions}.
|
|
14752
|
+
* @returns The latest reading, or `null` before the first sample lands.
|
|
14753
|
+
*
|
|
14754
|
+
* @example
|
|
14755
|
+
* const stats = useLinkStats(pc);
|
|
14756
|
+
*
|
|
14757
|
+
* return <span>{stats ? `${stats.kbps} kbps · ${stats.rttMs ?? "—"} ms` : "medindo…"}</span>;
|
|
14758
|
+
*/
|
|
14759
|
+
export declare function useLinkStats(connection: RTCPeerConnection | null, options?: UseLinkStatsOptions): LinkStats | null;
|
|
14760
|
+
|
|
14761
|
+
/** Options for {@link useLinkStats}. */
|
|
14762
|
+
export declare interface UseLinkStatsOptions {
|
|
14763
|
+
/**
|
|
14764
|
+
* How often to sample, in milliseconds. Default `2000`.
|
|
14765
|
+
*
|
|
14766
|
+
* `getStats()` walks every report a connection holds, and a mesh runs one
|
|
14767
|
+
* per participant — on the device least able to pay for it. The numbers feed
|
|
14768
|
+
* a latency badge and a throughput figure nobody reads at 1 Hz, so the
|
|
14769
|
+
* default is deliberately slower than a frame budget suggests.
|
|
14770
|
+
*/
|
|
14771
|
+
intervalMs?: number;
|
|
14772
|
+
/**
|
|
14773
|
+
* Stop sampling while the tab is in the background. Default `true`.
|
|
14774
|
+
*
|
|
14775
|
+
* The audio path is untouched by this — people in a backgrounded call still
|
|
14776
|
+
* expect to hear it. What stops is the measuring, which nobody can see.
|
|
14777
|
+
*/
|
|
14778
|
+
pauseWhenHidden?: boolean;
|
|
14779
|
+
/** Which media the throughput counts. Default `"video"`. */
|
|
14780
|
+
kind?: LinkStatsKind;
|
|
14781
|
+
}
|
|
14782
|
+
|
|
13816
14783
|
/**
|
|
13817
14784
|
* Query a paginated list of a resource through the active {@link useDataProvider}.
|
|
13818
14785
|
*
|
|
@@ -14758,6 +15725,57 @@ export declare interface UsePushSubscriptionResult {
|
|
|
14758
15725
|
refresh: () => Promise<void>;
|
|
14759
15726
|
}
|
|
14760
15727
|
|
|
15728
|
+
/**
|
|
15729
|
+
* Hold a key to transmit; release it to go silent again.
|
|
15730
|
+
*
|
|
15731
|
+
* Looks like `keydown`/`keyup` and is not, because three things go wrong:
|
|
15732
|
+
*
|
|
15733
|
+
* 1. **`blur` has to release.** Alt-tabbing away while holding the key means the
|
|
15734
|
+
* browser never sees the `keyup`, and the microphone stays open for as long as
|
|
15735
|
+
* the person is looking at another window — exactly what push-to-talk exists
|
|
15736
|
+
* to prevent.
|
|
15737
|
+
* 2. **Auto-repeat has to be ignored.** A held key repeats at the keyboard's rate,
|
|
15738
|
+
* and without the `repeat` check `onDown` fires on every one of them.
|
|
15739
|
+
* 3. **A text field has to win.** Space bound to push-to-talk with the focus in an
|
|
15740
|
+
* `<input>` means the space never reaches the message being written.
|
|
15741
|
+
*
|
|
15742
|
+
* Unmounting releases too, for the same reason `blur` does: the callback that
|
|
15743
|
+
* stops transmitting has to run even when the component holding it goes away
|
|
15744
|
+
* mid-press.
|
|
15745
|
+
*
|
|
15746
|
+
* The callbacks are read through a ref that a commit-time effect refreshes, so
|
|
15747
|
+
* passing inline arrows neither tears the listeners down on every render nor
|
|
15748
|
+
* writes to the ref during one — a render React discards would leave the ref
|
|
15749
|
+
* pointing at callbacks that never became the UI.
|
|
15750
|
+
*
|
|
15751
|
+
* @param options - See {@link UsePushToTalkOptions}.
|
|
15752
|
+
*
|
|
15753
|
+
* @example
|
|
15754
|
+
* usePushToTalk({
|
|
15755
|
+
* code: "Space",
|
|
15756
|
+
* onDown: () => setMicEnabled(true),
|
|
15757
|
+
* onUp: () => setMicEnabled(false),
|
|
15758
|
+
* });
|
|
15759
|
+
*/
|
|
15760
|
+
export declare function usePushToTalk({ code, onDown, onUp, enabled, }: UsePushToTalkOptions): void;
|
|
15761
|
+
|
|
15762
|
+
/** Options for {@link usePushToTalk}. */
|
|
15763
|
+
export declare interface UsePushToTalkOptions {
|
|
15764
|
+
/** `KeyboardEvent.code` to hold. Default {@link DEFAULT_PUSH_TO_TALK_KEY}. */
|
|
15765
|
+
code?: string;
|
|
15766
|
+
/** Called once when the key goes down. */
|
|
15767
|
+
onDown: () => void;
|
|
15768
|
+
/** Called when the key comes up, the window blurs, or the hook unmounts. */
|
|
15769
|
+
onUp: () => void;
|
|
15770
|
+
/**
|
|
15771
|
+
* Whether the binding is live. Default `true`.
|
|
15772
|
+
*
|
|
15773
|
+
* Turning it off releases first, so flipping a call from push-to-talk to an
|
|
15774
|
+
* open microphone while the key is held does not leave `onUp` unfired.
|
|
15775
|
+
*/
|
|
15776
|
+
enabled?: boolean;
|
|
15777
|
+
}
|
|
15778
|
+
|
|
14761
15779
|
/**
|
|
14762
15780
|
* FIFO queue with an optional `limit`. When more items are added than `limit`
|
|
14763
15781
|
* allows, the surplus is kept in an internal overflow buffer and surfaces into
|
|
@@ -16111,6 +17129,98 @@ export declare interface VisuallyHiddenProps extends HTMLAttributes<HTMLElement>
|
|
|
16111
17129
|
as?: keyof JSX.IntrinsicElements;
|
|
16112
17130
|
}
|
|
16113
17131
|
|
|
17132
|
+
/** A running voice-activity monitor. */
|
|
17133
|
+
export declare interface VoiceActivityMonitor {
|
|
17134
|
+
/** Whether the track is currently carrying speech. */
|
|
17135
|
+
readonly speaking: boolean;
|
|
17136
|
+
/** Stop sampling and release the analysis graph. */
|
|
17137
|
+
stop: () => void;
|
|
17138
|
+
}
|
|
17139
|
+
|
|
17140
|
+
/** Options for {@link monitorVoiceActivity}. */
|
|
17141
|
+
export declare interface VoiceActivityOptions {
|
|
17142
|
+
/** RMS at or above which a window counts as speech. Default `0.045`. */
|
|
17143
|
+
threshold?: number;
|
|
17144
|
+
/** How long the state stays `true` after the level drops. Default `350`. */
|
|
17145
|
+
releaseMs?: number;
|
|
17146
|
+
/** How often the level is sampled, in ms. Default `100`. */
|
|
17147
|
+
pollMs?: number;
|
|
17148
|
+
/**
|
|
17149
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
17150
|
+
*
|
|
17151
|
+
* A monitor per remote participant hits the browser's cap on live contexts
|
|
17152
|
+
* (Chrome allows around six) in a five-person call. Open one and share it.
|
|
17153
|
+
*/
|
|
17154
|
+
context?: AudioContext;
|
|
17155
|
+
}
|
|
17156
|
+
|
|
17157
|
+
/** A running voice chain. */
|
|
17158
|
+
export declare interface VoiceChain {
|
|
17159
|
+
/** The processed track to publish. */
|
|
17160
|
+
track: MediaStreamTrack;
|
|
17161
|
+
/** Stop the detectors, disconnect the graph, and release the track. */
|
|
17162
|
+
release: () => void;
|
|
17163
|
+
/**
|
|
17164
|
+
* Whether a graph was actually built.
|
|
17165
|
+
*
|
|
17166
|
+
* `false` when this engine has no Web Audio, and also when the settings asked
|
|
17167
|
+
* for nothing — in both cases `track` is `source`, untouched.
|
|
17168
|
+
*/
|
|
17169
|
+
readonly supported: boolean;
|
|
17170
|
+
}
|
|
17171
|
+
|
|
17172
|
+
/** Options for {@link createVoiceChain}. */
|
|
17173
|
+
export declare interface VoiceChainOptions {
|
|
17174
|
+
/** Output multiplier, applied after every stage and before the limiter. Default `1`. */
|
|
17175
|
+
gain?: number;
|
|
17176
|
+
/**
|
|
17177
|
+
* Reuse an existing `AudioContext` instead of creating one.
|
|
17178
|
+
*
|
|
17179
|
+
* Browsers cap live contexts (Chrome allows around six), so a page that already
|
|
17180
|
+
* has one — a level meter, an audio bus — should hand it over.
|
|
17181
|
+
*/
|
|
17182
|
+
context?: AudioContext;
|
|
17183
|
+
/**
|
|
17184
|
+
* Whether `release()` also stops `source`. Default `true`.
|
|
17185
|
+
*
|
|
17186
|
+
* Pass `false` when the track belongs to somebody else: a settings dialog
|
|
17187
|
+
* building a second chain over its live preview would otherwise kill the meter
|
|
17188
|
+
* the person is watching while they listen.
|
|
17189
|
+
*/
|
|
17190
|
+
ownsSource?: boolean;
|
|
17191
|
+
}
|
|
17192
|
+
|
|
17193
|
+
/** Which stages a voice chain builds. */
|
|
17194
|
+
export declare interface VoiceChainSettings {
|
|
17195
|
+
/** Cut everything below speech: fans, traffic rumble, desk knocks, plosives. */
|
|
17196
|
+
highPass: boolean;
|
|
17197
|
+
/** Silence the line when nobody is talking. */
|
|
17198
|
+
gate: boolean;
|
|
17199
|
+
/** RMS below which the gate closes, 0..1. See {@link suggestGateThreshold}. */
|
|
17200
|
+
gateThreshold: number;
|
|
17201
|
+
/** Even out the distance between a whisper and a shout. */
|
|
17202
|
+
compressor: boolean;
|
|
17203
|
+
/** Lift the consonant band so speech reads without getting louder. */
|
|
17204
|
+
presence: boolean;
|
|
17205
|
+
/** Roll off hiss above what speech uses. */
|
|
17206
|
+
hissCut: boolean;
|
|
17207
|
+
/** Ride down harsh S and CH sounds. */
|
|
17208
|
+
deEsser: boolean;
|
|
17209
|
+
/**
|
|
17210
|
+
* Hard ceiling before the signal leaves.
|
|
17211
|
+
*
|
|
17212
|
+
* On by default and worth leaving on: the leveller is 3:1, which controls the
|
|
17213
|
+
* average and lets a peak through, and `gain` can reach well above 1.
|
|
17214
|
+
*/
|
|
17215
|
+
limiter: boolean;
|
|
17216
|
+
}
|
|
17217
|
+
|
|
17218
|
+
/** A running monitor. */
|
|
17219
|
+
export declare interface VoiceMonitor {
|
|
17220
|
+
/** Stop listening and release the graph. Does **not** stop the source track. */
|
|
17221
|
+
stop: () => void;
|
|
17222
|
+
}
|
|
17223
|
+
|
|
16114
17224
|
/**
|
|
16115
17225
|
* Pluggable persistence for the pull watermark (the "changed since" cursor).
|
|
16116
17226
|
* Pass an object with a `storageKey` to use a `localStorage`-backed default.
|