tempest-react-sdk 0.78.0 → 0.79.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 +6 -6
- package/bin/lib/openapi/generate.mjs +168 -64
- package/bin/lib/openapi/generate.pagination.test.mjs +3 -2
- package/bin/lib/openapi/generate.test.mjs +263 -1
- package/dist/access/Can.cjs.map +1 -1
- package/dist/access/Can.js.map +1 -1
- package/dist/access/access-control-context.cjs.map +1 -1
- package/dist/access/access-control-context.js.map +1 -1
- package/dist/access/create-role-access-control.cjs.map +1 -1
- package/dist/access/create-role-access-control.js.map +1 -1
- package/dist/access/permissions-from-token.cjs.map +1 -1
- package/dist/access/permissions-from-token.js.map +1 -1
- package/dist/access/use-can.cjs.map +1 -1
- package/dist/access/use-can.js.map +1 -1
- package/dist/app/AppProviders.cjs.map +1 -1
- package/dist/app/AppProviders.js.map +1 -1
- package/dist/audio/audio-bus.cjs.map +1 -1
- package/dist/audio/audio-bus.js.map +1 -1
- package/dist/audio/audio-output.cjs.map +1 -1
- package/dist/audio/audio-output.js.map +1 -1
- package/dist/audio/audio-player.cjs.map +1 -1
- package/dist/audio/audio-player.js.map +1 -1
- package/dist/audio/audio-recorder.cjs.map +1 -1
- package/dist/audio/audio-recorder.js.map +1 -1
- package/dist/audio/duration.cjs.map +1 -1
- package/dist/audio/duration.js.map +1 -1
- package/dist/audio/level-meter.cjs.map +1 -1
- package/dist/audio/level-meter.js.map +1 -1
- package/dist/audio/media-access.cjs.map +1 -1
- package/dist/audio/media-access.js.map +1 -1
- package/dist/audio/noise-floor.cjs.map +1 -1
- package/dist/audio/noise-floor.js.map +1 -1
- package/dist/audio/sfx-pool.cjs.map +1 -1
- package/dist/audio/sfx-pool.js.map +1 -1
- package/dist/audio/use-audio-bus.cjs.map +1 -1
- package/dist/audio/use-audio-bus.js.map +1 -1
- package/dist/audio/use-audio-recorder.cjs.map +1 -1
- package/dist/audio/use-audio-recorder.js.map +1 -1
- package/dist/audio/use-audio.cjs.map +1 -1
- package/dist/audio/use-audio.js.map +1 -1
- package/dist/audio/use-microphone.cjs +1 -1
- package/dist/audio/use-microphone.cjs.map +1 -1
- package/dist/audio/use-microphone.js +1 -5
- package/dist/audio/use-microphone.js.map +1 -1
- package/dist/audio/use-sfx-pool.cjs.map +1 -1
- package/dist/audio/use-sfx-pool.js.map +1 -1
- package/dist/audio/voice-activity.cjs.map +1 -1
- package/dist/audio/voice-activity.js.map +1 -1
- package/dist/audio/voice-chain-stages.cjs.map +1 -1
- package/dist/audio/voice-chain-stages.js.map +1 -1
- package/dist/audio/voice-chain.cjs.map +1 -1
- package/dist/audio/voice-chain.js.map +1 -1
- package/dist/audio/wav.cjs.map +1 -1
- package/dist/audio/wav.js.map +1 -1
- package/dist/auth/AuthGuard.cjs.map +1 -1
- package/dist/auth/AuthGuard.js.map +1 -1
- package/dist/auth/create-auth-store.cjs.map +1 -1
- package/dist/auth/create-auth-store.js.map +1 -1
- package/dist/auth/create-tempest-auth.cjs +1 -1
- package/dist/auth/create-tempest-auth.cjs.map +1 -1
- package/dist/auth/create-tempest-auth.js +1 -3
- package/dist/auth/create-tempest-auth.js.map +1 -1
- package/dist/auth/jwt.cjs.map +1 -1
- package/dist/auth/jwt.js.map +1 -1
- 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/auth/refresh-queue.cjs.map +1 -1
- package/dist/auth/refresh-queue.js.map +1 -1
- package/dist/auth/use-passkey.cjs +1 -1
- package/dist/auth/use-passkey.cjs.map +1 -1
- package/dist/auth/use-passkey.js +1 -1
- package/dist/auth/use-passkey.js.map +1 -1
- package/dist/br/BrazilMap.cjs.map +1 -1
- package/dist/br/BrazilMap.js.map +1 -1
- package/dist/br/BrazilMap.module.cjs.map +1 -1
- package/dist/br/BrazilMap.module.js.map +1 -1
- package/dist/br/BrazilStateCitySelect.cjs.map +1 -1
- package/dist/br/BrazilStateCitySelect.js.map +1 -1
- package/dist/br/BrazilStateMap.cjs.map +1 -1
- package/dist/br/BrazilStateMap.js.map +1 -1
- package/dist/br/MapLegend.cjs.map +1 -1
- package/dist/br/MapLegend.js.map +1 -1
- package/dist/br/MapLegend.module.cjs.map +1 -1
- package/dist/br/MapLegend.module.js.map +1 -1
- package/dist/br/MapMarkers.cjs.map +1 -1
- package/dist/br/MapMarkers.js.map +1 -1
- package/dist/br/MapTooltip.cjs.map +1 -1
- package/dist/br/MapTooltip.js.map +1 -1
- package/dist/br/MunicipalitySearch.cjs +1 -1
- package/dist/br/MunicipalitySearch.cjs.map +1 -1
- package/dist/br/MunicipalitySearch.js +2 -5
- package/dist/br/MunicipalitySearch.js.map +1 -1
- package/dist/br/MunicipalitySearch.module.cjs.map +1 -1
- package/dist/br/MunicipalitySearch.module.js.map +1 -1
- package/dist/br/PixQRCode.cjs.map +1 -1
- package/dist/br/PixQRCode.js.map +1 -1
- package/dist/br/PixQRCode.module.cjs.map +1 -1
- package/dist/br/PixQRCode.module.js.map +1 -1
- package/dist/br/boleto.cjs.map +1 -1
- package/dist/br/boleto.js.map +1 -1
- package/dist/br/br-geo.cjs.map +1 -1
- package/dist/br/br-geo.js.map +1 -1
- package/dist/br/data/br-centroids.cjs.map +1 -1
- package/dist/br/data/br-centroids.js.map +1 -1
- package/dist/br/data/br-locations.cjs.map +1 -1
- package/dist/br/data/br-locations.js.map +1 -1
- package/dist/br/data/br-uf-geo.cjs.map +1 -1
- package/dist/br/data/br-uf-geo.js.map +1 -1
- package/dist/br/data/mun/AC.cjs.map +1 -1
- package/dist/br/data/mun/AC.js.map +1 -1
- package/dist/br/data/mun/AL.cjs.map +1 -1
- package/dist/br/data/mun/AL.js.map +1 -1
- package/dist/br/data/mun/AM.cjs.map +1 -1
- package/dist/br/data/mun/AM.js.map +1 -1
- package/dist/br/data/mun/AP.cjs.map +1 -1
- package/dist/br/data/mun/AP.js.map +1 -1
- package/dist/br/data/mun/BA.cjs.map +1 -1
- package/dist/br/data/mun/BA.js.map +1 -1
- package/dist/br/data/mun/CE.cjs.map +1 -1
- package/dist/br/data/mun/CE.js.map +1 -1
- package/dist/br/data/mun/DF.cjs.map +1 -1
- package/dist/br/data/mun/DF.js.map +1 -1
- package/dist/br/data/mun/ES.cjs.map +1 -1
- package/dist/br/data/mun/ES.js.map +1 -1
- package/dist/br/data/mun/GO.cjs.map +1 -1
- package/dist/br/data/mun/GO.js.map +1 -1
- package/dist/br/data/mun/MA.cjs.map +1 -1
- package/dist/br/data/mun/MA.js.map +1 -1
- package/dist/br/data/mun/MG.cjs.map +1 -1
- package/dist/br/data/mun/MG.js.map +1 -1
- package/dist/br/data/mun/MS.cjs.map +1 -1
- package/dist/br/data/mun/MS.js.map +1 -1
- package/dist/br/data/mun/MT.cjs.map +1 -1
- package/dist/br/data/mun/MT.js.map +1 -1
- package/dist/br/data/mun/PA.cjs.map +1 -1
- package/dist/br/data/mun/PA.js.map +1 -1
- package/dist/br/data/mun/PB.cjs.map +1 -1
- package/dist/br/data/mun/PB.js.map +1 -1
- package/dist/br/data/mun/PE.cjs.map +1 -1
- package/dist/br/data/mun/PE.js.map +1 -1
- package/dist/br/data/mun/PI.cjs.map +1 -1
- package/dist/br/data/mun/PI.js.map +1 -1
- package/dist/br/data/mun/PR.cjs.map +1 -1
- package/dist/br/data/mun/PR.js.map +1 -1
- package/dist/br/data/mun/RJ.cjs.map +1 -1
- package/dist/br/data/mun/RJ.js.map +1 -1
- package/dist/br/data/mun/RN.cjs.map +1 -1
- package/dist/br/data/mun/RN.js.map +1 -1
- package/dist/br/data/mun/RO.cjs.map +1 -1
- package/dist/br/data/mun/RO.js.map +1 -1
- package/dist/br/data/mun/RR.cjs.map +1 -1
- package/dist/br/data/mun/RR.js.map +1 -1
- package/dist/br/data/mun/RS.cjs.map +1 -1
- package/dist/br/data/mun/RS.js.map +1 -1
- package/dist/br/data/mun/SC.cjs.map +1 -1
- package/dist/br/data/mun/SC.js.map +1 -1
- package/dist/br/data/mun/SE.cjs.map +1 -1
- package/dist/br/data/mun/SE.js.map +1 -1
- package/dist/br/data/mun/SP.cjs.map +1 -1
- package/dist/br/data/mun/SP.js.map +1 -1
- package/dist/br/data/mun/TO.cjs.map +1 -1
- package/dist/br/data/mun/TO.js.map +1 -1
- package/dist/br/geocode.cjs.map +1 -1
- package/dist/br/geocode.js.map +1 -1
- package/dist/br/holidays.cjs.map +1 -1
- package/dist/br/holidays.js.map +1 -1
- package/dist/br/locations.cjs.map +1 -1
- package/dist/br/locations.js.map +1 -1
- package/dist/br/nfe.cjs.map +1 -1
- package/dist/br/nfe.js.map +1 -1
- package/dist/br/pix.cjs +1 -1
- package/dist/br/pix.cjs.map +1 -1
- package/dist/br/pix.js +108 -74
- package/dist/br/pix.js.map +1 -1
- package/dist/br/regions.cjs.map +1 -1
- package/dist/br/regions.js.map +1 -1
- package/dist/br/scales.cjs.map +1 -1
- package/dist/br/scales.js.map +1 -1
- package/dist/br/state-geo.cjs.map +1 -1
- package/dist/br/state-geo.js.map +1 -1
- package/dist/br/svg-utils.cjs.map +1 -1
- package/dist/br/svg-utils.js.map +1 -1
- package/dist/br/use-map-hover.cjs.map +1 -1
- package/dist/br/use-map-hover.js.map +1 -1
- package/dist/br/use-map-zoom.cjs.map +1 -1
- package/dist/br/use-map-zoom.js.map +1 -1
- package/dist/br/whatsapp.cjs.map +1 -1
- package/dist/br/whatsapp.js.map +1 -1
- package/dist/br.cjs.map +1 -1
- package/dist/br.d.ts +6 -2
- package/dist/br.js.map +1 -1
- package/dist/capture/barcode.cjs.map +1 -1
- package/dist/capture/barcode.js.map +1 -1
- package/dist/capture/media-recorder.cjs.map +1 -1
- package/dist/capture/media-recorder.js.map +1 -1
- package/dist/capture/use-barcode-scanner.cjs.map +1 -1
- package/dist/capture/use-barcode-scanner.js.map +1 -1
- package/dist/capture/use-screen-capture.cjs +1 -1
- package/dist/capture/use-screen-capture.cjs.map +1 -1
- package/dist/capture/use-screen-capture.js +1 -7
- package/dist/capture/use-screen-capture.js.map +1 -1
- package/dist/capture/use-speech-recognition.cjs +1 -1
- package/dist/capture/use-speech-recognition.cjs.map +1 -1
- package/dist/capture/use-speech-recognition.js +35 -36
- package/dist/capture/use-speech-recognition.js.map +1 -1
- package/dist/capture/use-torch.cjs.map +1 -1
- package/dist/capture/use-torch.js.map +1 -1
- package/dist/capture/use-video-recorder.cjs.map +1 -1
- package/dist/capture/use-video-recorder.js.map +1 -1
- package/dist/capture/video-recorder.cjs.map +1 -1
- package/dist/capture/video-recorder.js.map +1 -1
- package/dist/charts/AreaChart.cjs.map +1 -1
- package/dist/charts/AreaChart.js.map +1 -1
- package/dist/charts/BarChart.cjs.map +1 -1
- package/dist/charts/BarChart.js.map +1 -1
- package/dist/charts/LineChart.cjs.map +1 -1
- package/dist/charts/LineChart.js.map +1 -1
- package/dist/charts/PieChart.cjs.map +1 -1
- package/dist/charts/PieChart.js.map +1 -1
- package/dist/charts/RadarChart.cjs.map +1 -1
- package/dist/charts/RadarChart.js.map +1 -1
- package/dist/charts/palette.cjs.map +1 -1
- package/dist/charts/palette.js.map +1 -1
- package/dist/charts/scales.cjs.map +1 -1
- package/dist/charts/scales.js.map +1 -1
- package/dist/charts/types.cjs.map +1 -1
- package/dist/charts/types.js.map +1 -1
- package/dist/charts/use-chart-colors.cjs.map +1 -1
- package/dist/charts/use-chart-colors.js.map +1 -1
- package/dist/components/AIChat/AIChat.cjs +1 -1
- package/dist/components/AIChat/AIChat.cjs.map +1 -1
- package/dist/components/AIChat/AIChat.js +1 -5
- package/dist/components/AIChat/AIChat.js.map +1 -1
- package/dist/components/AIChat/AIChat.module.cjs.map +1 -1
- package/dist/components/AIChat/AIChat.module.js.map +1 -1
- package/dist/components/AIChat/AIChatComposer.cjs +1 -1
- package/dist/components/AIChat/AIChatComposer.cjs.map +1 -1
- package/dist/components/AIChat/AIChatComposer.js +1 -7
- package/dist/components/AIChat/AIChatComposer.js.map +1 -1
- package/dist/components/AIChat/AIChatTurn.cjs.map +1 -1
- package/dist/components/AIChat/AIChatTurn.js.map +1 -1
- package/dist/components/AIChat/ai-chat-turns.cjs.map +1 -1
- package/dist/components/AIChat/ai-chat-turns.js.map +1 -1
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.module.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.module.js.map +1 -1
- package/dist/components/Alert/Alert.cjs.map +1 -1
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Alert/Alert.module.cjs.map +1 -1
- package/dist/components/Alert/Alert.module.js.map +1 -1
- package/dist/components/AppBar/AppBar.cjs.map +1 -1
- package/dist/components/AppBar/AppBar.js.map +1 -1
- package/dist/components/AppBar/AppBar.module.cjs.map +1 -1
- package/dist/components/AppBar/AppBar.module.js.map +1 -1
- package/dist/components/AppBar/use-sticky-body-warning.cjs +1 -1
- package/dist/components/AppBar/use-sticky-body-warning.cjs.map +1 -1
- package/dist/components/AppBar/use-sticky-body-warning.js +1 -1
- package/dist/components/AppBar/use-sticky-body-warning.js.map +1 -1
- package/dist/components/AppShell/AppShell.cjs.map +1 -1
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/AppShell/AppShell.module.cjs.map +1 -1
- package/dist/components/AppShell/AppShell.module.js.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.cjs.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.module.cjs.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.module.js.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.cjs +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.cjs.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.js +1 -7
- package/dist/components/AudioPlayer/AudioPlayer.js.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.module.cjs.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.module.js.map +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.cjs +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.cjs.map +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.js +16 -21
- package/dist/components/AudioRecorder/AudioRecorder.js.map +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.module.cjs.map +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.module.js.map +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.module.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.module.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.module.js.map +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.module.cjs.map +1 -1
- package/dist/components/Badge/Badge.module.js.map +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.cjs.map +1 -1
- package/dist/components/Banner/Banner.module.js.map +1 -1
- package/dist/components/BarList/BarList.cjs.map +1 -1
- package/dist/components/BarList/BarList.js.map +1 -1
- package/dist/components/BarList/BarList.module.cjs.map +1 -1
- package/dist/components/BarList/BarList.module.js.map +1 -1
- package/dist/components/BarList/bar-list-model.cjs.map +1 -1
- package/dist/components/BarList/bar-list-model.js.map +1 -1
- package/dist/components/BarcodeScanner/BarcodeScanner.cjs.map +1 -1
- package/dist/components/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/dist/components/BarcodeScanner/BarcodeScanner.module.cjs.map +1 -1
- package/dist/components/BarcodeScanner/BarcodeScanner.module.js.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.cjs.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.module.cjs.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.module.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.module.cjs.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.module.js.map +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.module.cjs.map +1 -1
- package/dist/components/Button/Button.module.js.map +1 -1
- package/dist/components/Button/ButtonContent.cjs.map +1 -1
- package/dist/components/Button/ButtonContent.js.map +1 -1
- package/dist/components/Button/ButtonSlot.cjs.map +1 -1
- package/dist/components/Button/ButtonSlot.js.map +1 -1
- package/dist/components/Button/button-class.cjs.map +1 -1
- package/dist/components/Button/button-class.js.map +1 -1
- package/dist/components/Button/link-rel.cjs.map +1 -1
- package/dist/components/Button/link-rel.js.map +1 -1
- package/dist/components/Button/slot.cjs.map +1 -1
- package/dist/components/Button/slot.js.map +1 -1
- package/dist/components/Calendar/Calendar.cjs.map +1 -1
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/Calendar.module.cjs.map +1 -1
- package/dist/components/Calendar/Calendar.module.js.map +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.cjs.map +1 -1
- package/dist/components/Card/Card.module.js.map +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/Carousel.module.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.module.js.map +1 -1
- package/dist/components/Center/Center.cjs.map +1 -1
- package/dist/components/Center/Center.js.map +1 -1
- package/dist/components/Center/Center.module.cjs.map +1 -1
- package/dist/components/Center/Center.module.js.map +1 -1
- package/dist/components/Chat/Chat.cjs.map +1 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/Chat/Chat.module.cjs.map +1 -1
- package/dist/components/Chat/Chat.module.js.map +1 -1
- package/dist/components/Chat/ChatActionsMenu.cjs.map +1 -1
- package/dist/components/Chat/ChatActionsMenu.js.map +1 -1
- package/dist/components/Chat/ChatAttachments.cjs.map +1 -1
- package/dist/components/Chat/ChatAttachments.js.map +1 -1
- package/dist/components/Chat/ChatBubble.cjs.map +1 -1
- package/dist/components/Chat/ChatBubble.js.map +1 -1
- package/dist/components/Chat/ChatComposer.cjs.map +1 -1
- package/dist/components/Chat/ChatComposer.js.map +1 -1
- package/dist/components/Chat/chat-groups.cjs +1 -1
- package/dist/components/Chat/chat-groups.cjs.map +1 -1
- package/dist/components/Chat/chat-groups.js +2 -6
- package/dist/components/Chat/chat-groups.js.map +1 -1
- package/dist/components/Chat/chat-receipt.cjs.map +1 -1
- package/dist/components/Chat/chat-receipt.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.js.map +1 -1
- package/dist/components/ChipInput/ChipInput.cjs +1 -1
- package/dist/components/ChipInput/ChipInput.cjs.map +1 -1
- package/dist/components/ChipInput/ChipInput.js +2 -12
- package/dist/components/ChipInput/ChipInput.js.map +1 -1
- package/dist/components/ChipInput/ChipInput.module.cjs.map +1 -1
- package/dist/components/ChipInput/ChipInput.module.js.map +1 -1
- package/dist/components/ClickOutside/ClickOutside.cjs.map +1 -1
- package/dist/components/ClickOutside/ClickOutside.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.module.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.module.js.map +1 -1
- package/dist/components/CodeBlock/tokenize.cjs.map +1 -1
- package/dist/components/CodeBlock/tokenize.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.cjs.map +1 -1
- package/dist/components/Collapsible/Collapsible.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.cjs.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.js.map +1 -1
- package/dist/components/Combobox/Combobox.cjs.map +1 -1
- package/dist/components/Combobox/Combobox.js.map +1 -1
- package/dist/components/Combobox/Combobox.module.cjs.map +1 -1
- package/dist/components/Combobox/Combobox.module.js.map +1 -1
- package/dist/components/Combobox/use-listbox-dismiss.cjs.map +1 -1
- package/dist/components/Combobox/use-listbox-dismiss.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 +4 -11
- package/dist/components/Command/Command.js.map +1 -1
- package/dist/components/Command/Command.module.cjs.map +1 -1
- package/dist/components/Command/Command.module.js.map +1 -1
- package/dist/components/ConditionalWrapper/ConditionalWrapper.cjs.map +1 -1
- package/dist/components/ConditionalWrapper/ConditionalWrapper.js.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.cjs.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.cjs.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.js.map +1 -1
- package/dist/components/CopyButton/CopyButton.cjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.js.map +1 -1
- package/dist/components/CopyButton/CopyButton.module.cjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.module.js.map +1 -1
- package/dist/components/DataList/DataList.cjs.map +1 -1
- package/dist/components/DataList/DataList.js.map +1 -1
- package/dist/components/DataList/DataList.module.cjs.map +1 -1
- package/dist/components/DataList/DataList.module.js.map +1 -1
- package/dist/components/DataTable/DataTable.cjs +1 -1
- package/dist/components/DataTable/DataTable.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.js +6 -14
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/DataTable.module.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.module.js.map +1 -1
- package/dist/components/DataTable/EditableCell.cjs +1 -1
- package/dist/components/DataTable/EditableCell.cjs.map +1 -1
- package/dist/components/DataTable/EditableCell.js +1 -9
- package/dist/components/DataTable/EditableCell.js.map +1 -1
- package/dist/components/DataTable/LoadingRows.cjs.map +1 -1
- package/dist/components/DataTable/LoadingRows.js.map +1 -1
- package/dist/components/DataTable/edit-labels.cjs.map +1 -1
- package/dist/components/DataTable/edit-labels.js.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.cjs.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.module.cjs.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.module.js.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.cjs.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.module.cjs.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.module.js.map +1 -1
- package/dist/components/Divider/Divider.cjs.map +1 -1
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Divider/Divider.module.cjs.map +1 -1
- package/dist/components/Divider/Divider.module.js.map +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.module.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 +2 -14
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.module.cjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.module.js.map +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.map +1 -1
- package/dist/components/Dropzone/Dropzone.js.map +1 -1
- package/dist/components/Dropzone/Dropzone.module.cjs.map +1 -1
- package/dist/components/Dropzone/Dropzone.module.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.cjs.map +1 -1
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.module.cjs.map +1 -1
- package/dist/components/EmptyState/EmptyState.module.js.map +1 -1
- package/dist/components/ErrorState/ErrorState.cjs.map +1 -1
- package/dist/components/ErrorState/ErrorState.js.map +1 -1
- package/dist/components/ErrorState/ErrorState.module.cjs.map +1 -1
- package/dist/components/ErrorState/ErrorState.module.js.map +1 -1
- package/dist/components/ErrorText/ErrorText.cjs.map +1 -1
- package/dist/components/ErrorText/ErrorText.js.map +1 -1
- package/dist/components/ErrorText/ErrorText.module.cjs.map +1 -1
- package/dist/components/ErrorText/ErrorText.module.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/FileUpload/FileUpload.cjs.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +7 -17
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.module.cjs.map +1 -1
- package/dist/components/FileUpload/FileUpload.module.js.map +1 -1
- package/dist/components/FilterBar/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar/FilterBar.js.map +1 -1
- package/dist/components/FilterBar/FilterBar.module.cjs.map +1 -1
- package/dist/components/FilterBar/FilterBar.module.js.map +1 -1
- package/dist/components/FilterBar/filter-apply.cjs.map +1 -1
- package/dist/components/FilterBar/filter-apply.js.map +1 -1
- package/dist/components/FilterBar/filter-model.cjs.map +1 -1
- package/dist/components/FilterBar/filter-model.js.map +1 -1
- package/dist/components/FilterBar/filter-query.cjs +1 -1
- package/dist/components/FilterBar/filter-query.cjs.map +1 -1
- package/dist/components/FilterBar/filter-query.js +2 -5
- package/dist/components/FilterBar/filter-query.js.map +1 -1
- package/dist/components/FilterPanel/FilterPanel.cjs.map +1 -1
- package/dist/components/FilterPanel/FilterPanel.js.map +1 -1
- package/dist/components/FilterPanel/FilterPanel.module.cjs.map +1 -1
- package/dist/components/FilterPanel/FilterPanel.module.js.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.cjs.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.js.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.module.cjs.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.module.js.map +1 -1
- package/dist/components/For/For.cjs.map +1 -1
- package/dist/components/For/For.js.map +1 -1
- package/dist/components/Form/Form.cjs.map +1 -1
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/Form.module.cjs.map +1 -1
- package/dist/components/Form/Form.module.js.map +1 -1
- package/dist/components/HoverCard/HoverCard.cjs.map +1 -1
- package/dist/components/HoverCard/HoverCard.js.map +1 -1
- package/dist/components/HoverCard/HoverCard.module.cjs.map +1 -1
- package/dist/components/HoverCard/HoverCard.module.js.map +1 -1
- package/dist/components/Image/Image.cjs.map +1 -1
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Image/Image.module.cjs.map +1 -1
- package/dist/components/Image/Image.module.js.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper/ImageCropper.cjs.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.js +4 -8
- package/dist/components/ImageCropper/ImageCropper.js.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.cjs.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.js.map +1 -1
- package/dist/components/ImageCropper/crop-geometry.cjs.map +1 -1
- package/dist/components/ImageCropper/crop-geometry.js.map +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.module.cjs.map +1 -1
- package/dist/components/Input/Input.module.js.map +1 -1
- package/dist/components/InstallBanner/InstallBanner.cjs.map +1 -1
- package/dist/components/InstallBanner/InstallBanner.js.map +1 -1
- package/dist/components/InstallBanner/InstallBanner.module.cjs.map +1 -1
- package/dist/components/InstallBanner/InstallBanner.module.js.map +1 -1
- package/dist/components/InstallButton/InstallButton.cjs.map +1 -1
- package/dist/components/InstallButton/InstallButton.js.map +1 -1
- package/dist/components/InstallButton/InstallButton.module.cjs.map +1 -1
- package/dist/components/InstallButton/InstallButton.module.js.map +1 -1
- package/dist/components/InstallButton/install-hints.cjs.map +1 -1
- package/dist/components/InstallButton/install-hints.js.map +1 -1
- package/dist/components/Kanban/Kanban.cjs.map +1 -1
- package/dist/components/Kanban/Kanban.js.map +1 -1
- package/dist/components/Kanban/Kanban.module.cjs.map +1 -1
- package/dist/components/Kanban/Kanban.module.js.map +1 -1
- package/dist/components/Kbd/Kbd.cjs.map +1 -1
- package/dist/components/Kbd/Kbd.js.map +1 -1
- package/dist/components/Kbd/Kbd.module.cjs.map +1 -1
- package/dist/components/Kbd/Kbd.module.js.map +1 -1
- package/dist/components/Label/Label.cjs.map +1 -1
- package/dist/components/Label/Label.js.map +1 -1
- package/dist/components/Label/Label.module.cjs.map +1 -1
- package/dist/components/Label/Label.module.js.map +1 -1
- package/dist/components/Layout/Layout.cjs.map +1 -1
- package/dist/components/Layout/Layout.js.map +1 -1
- package/dist/components/Layout/Layout.module.cjs.map +1 -1
- package/dist/components/Layout/Layout.module.js.map +1 -1
- package/dist/components/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/Lightbox/Lightbox.cjs.map +1 -1
- package/dist/components/Lightbox/Lightbox.js +1 -1
- package/dist/components/Lightbox/Lightbox.js.map +1 -1
- package/dist/components/Lightbox/Lightbox.module.cjs.map +1 -1
- package/dist/components/Lightbox/Lightbox.module.js.map +1 -1
- package/dist/components/ListTile/ListTile.cjs.map +1 -1
- package/dist/components/ListTile/ListTile.js.map +1 -1
- package/dist/components/ListTile/ListTile.module.cjs.map +1 -1
- package/dist/components/ListTile/ListTile.module.js.map +1 -1
- package/dist/components/Markdown/Markdown.cjs.map +1 -1
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Markdown/Markdown.module.cjs.map +1 -1
- package/dist/components/Markdown/Markdown.module.js.map +1 -1
- package/dist/components/Markdown/markdown-parse.cjs +2 -2
- package/dist/components/Markdown/markdown-parse.cjs.map +1 -1
- package/dist/components/Markdown/markdown-parse.js +8 -27
- package/dist/components/Markdown/markdown-parse.js.map +1 -1
- package/dist/components/Masonry/Masonry.cjs.map +1 -1
- package/dist/components/Masonry/Masonry.js.map +1 -1
- package/dist/components/Masonry/Masonry.module.cjs.map +1 -1
- package/dist/components/Masonry/Masonry.module.js.map +1 -1
- package/dist/components/Masonry/masonry-layout.cjs.map +1 -1
- package/dist/components/Masonry/masonry-layout.js.map +1 -1
- package/dist/components/Menubar/Menubar.cjs.map +1 -1
- package/dist/components/Menubar/Menubar.js.map +1 -1
- package/dist/components/Menubar/Menubar.module.cjs.map +1 -1
- package/dist/components/Menubar/Menubar.module.js.map +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/Modal.module.cjs.map +1 -1
- package/dist/components/Modal/Modal.module.js.map +1 -1
- package/dist/components/ModalsManager/ModalsManager.cjs.map +1 -1
- package/dist/components/ModalsManager/ModalsManager.js.map +1 -1
- package/dist/components/ModalsManager/ModalsManager.module.cjs.map +1 -1
- package/dist/components/ModalsManager/ModalsManager.module.js.map +1 -1
- package/dist/components/Money/Money.cjs.map +1 -1
- package/dist/components/Money/Money.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.cjs.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.module.cjs.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.module.js.map +1 -1
- package/dist/components/NProgress/NProgress.cjs.map +1 -1
- package/dist/components/NProgress/NProgress.js.map +1 -1
- package/dist/components/NProgress/NProgress.module.cjs.map +1 -1
- package/dist/components/NProgress/NProgress.module.js.map +1 -1
- package/dist/components/Navbar/Navbar.cjs.map +1 -1
- package/dist/components/Navbar/Navbar.js.map +1 -1
- package/dist/components/Navbar/Navbar.module.cjs.map +1 -1
- package/dist/components/Navbar/Navbar.module.js.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.cjs.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.js.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.cjs.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.js.map +1 -1
- package/dist/components/NavigationRail/NavigationRail.cjs.map +1 -1
- package/dist/components/NavigationRail/NavigationRail.js.map +1 -1
- package/dist/components/NavigationRail/NavigationRail.module.cjs.map +1 -1
- package/dist/components/NavigationRail/NavigationRail.module.js.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.cjs.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.js.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.module.cjs.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.module.js.map +1 -1
- package/dist/components/NotificationCenter/use-notification-inbox.cjs.map +1 -1
- package/dist/components/NotificationCenter/use-notification-inbox.js.map +1 -1
- package/dist/components/OfflineIndicator/OfflineIndicator.cjs.map +1 -1
- package/dist/components/OfflineIndicator/OfflineIndicator.js.map +1 -1
- package/dist/components/OfflineIndicator/OfflineIndicator.module.cjs.map +1 -1
- package/dist/components/OfflineIndicator/OfflineIndicator.module.js.map +1 -1
- package/dist/components/Page/Page.cjs.map +1 -1
- package/dist/components/Page/Page.js.map +1 -1
- package/dist/components/Page/Page.module.cjs.map +1 -1
- package/dist/components/Page/Page.module.js.map +1 -1
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.module.js.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.module.cjs.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.module.js.map +1 -1
- package/dist/components/PinInput/PinInput.cjs.map +1 -1
- package/dist/components/PinInput/PinInput.js.map +1 -1
- package/dist/components/PinInput/PinInput.module.cjs.map +1 -1
- package/dist/components/PinInput/PinInput.module.js.map +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/Popover.module.cjs.map +1 -1
- package/dist/components/Popover/Popover.module.js.map +1 -1
- package/dist/components/Portal/Portal.cjs.map +1 -1
- package/dist/components/Portal/Portal.js.map +1 -1
- package/dist/components/Portal/anchor-position.cjs.map +1 -1
- package/dist/components/Portal/anchor-position.js.map +1 -1
- package/dist/components/Portal/escape-layer.cjs.map +1 -1
- package/dist/components/Portal/escape-layer.js.map +1 -1
- package/dist/components/Portal/portal-host.cjs.map +1 -1
- package/dist/components/Portal/portal-host.js.map +1 -1
- package/dist/components/Portal/tab-bridge.cjs +1 -1
- package/dist/components/Portal/tab-bridge.cjs.map +1 -1
- package/dist/components/Portal/tab-bridge.js +1 -5
- package/dist/components/Portal/tab-bridge.js.map +1 -1
- package/dist/components/Progress/Progress.cjs.map +1 -1
- package/dist/components/Progress/Progress.js.map +1 -1
- package/dist/components/Progress/Progress.module.cjs.map +1 -1
- package/dist/components/Progress/Progress.module.js.map +1 -1
- package/dist/components/QRCode/QRCode.cjs.map +1 -1
- package/dist/components/QRCode/QRCode.js.map +1 -1
- package/dist/components/QRCode/QRCode.module.cjs.map +1 -1
- package/dist/components/QRCode/QRCode.module.js.map +1 -1
- package/dist/components/QRCode/qr-encode.cjs +1 -1
- package/dist/components/QRCode/qr-encode.cjs.map +1 -1
- package/dist/components/QRCode/qr-encode.js +7 -13
- package/dist/components/QRCode/qr-encode.js.map +1 -1
- package/dist/components/QRCode/qr-tables.cjs.map +1 -1
- package/dist/components/QRCode/qr-tables.js.map +1 -1
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/Radio.module.cjs.map +1 -1
- package/dist/components/Radio/Radio.module.js.map +1 -1
- package/dist/components/RangeSlider/RangeSlider.cjs.map +1 -1
- package/dist/components/RangeSlider/RangeSlider.js.map +1 -1
- package/dist/components/RangeSlider/RangeSlider.module.cjs.map +1 -1
- package/dist/components/RangeSlider/RangeSlider.module.js.map +1 -1
- package/dist/components/RatingStars/RatingStars.cjs.map +1 -1
- package/dist/components/RatingStars/RatingStars.js.map +1 -1
- package/dist/components/RatingStars/RatingStars.module.cjs.map +1 -1
- package/dist/components/RatingStars/RatingStars.module.js.map +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.cjs +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.cjs.map +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.js +10 -18
- package/dist/components/RefreshIndicator/RefreshIndicator.js.map +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.module.cjs.map +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.module.js.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.cjs.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.js.map +1 -1
- package/dist/components/Resizable/Resizable.cjs +1 -1
- package/dist/components/Resizable/Resizable.cjs.map +1 -1
- package/dist/components/Resizable/Resizable.js +1 -9
- package/dist/components/Resizable/Resizable.js.map +1 -1
- package/dist/components/Resizable/Resizable.module.cjs.map +1 -1
- package/dist/components/Resizable/Resizable.module.js.map +1 -1
- package/dist/components/Responsive/Responsive.cjs.map +1 -1
- package/dist/components/Responsive/Responsive.js.map +1 -1
- package/dist/components/Reveal/Reveal.cjs.map +1 -1
- package/dist/components/Reveal/Reveal.js.map +1 -1
- package/dist/components/Reveal/Reveal.module.cjs.map +1 -1
- package/dist/components/Reveal/Reveal.module.js.map +1 -1
- package/dist/components/Reveal/reveal-threshold.cjs.map +1 -1
- package/dist/components/Reveal/reveal-threshold.js.map +1 -1
- package/dist/components/SafeArea/SafeArea.cjs.map +1 -1
- package/dist/components/SafeArea/SafeArea.js.map +1 -1
- package/dist/components/SafeArea/SafeArea.module.cjs.map +1 -1
- package/dist/components/SafeArea/SafeArea.module.js.map +1 -1
- package/dist/components/Scheduler/Scheduler.cjs.map +1 -1
- package/dist/components/Scheduler/Scheduler.js.map +1 -1
- package/dist/components/Scheduler/Scheduler.module.cjs.map +1 -1
- package/dist/components/Scheduler/Scheduler.module.js.map +1 -1
- package/dist/components/Scheduler/scheduler-layout.cjs.map +1 -1
- package/dist/components/Scheduler/scheduler-layout.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.module.cjs.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.module.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.module.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.module.js.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.js.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.module.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.module.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.module.cjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.module.js.map +1 -1
- package/dist/components/Select/CaretIcon.cjs.map +1 -1
- package/dist/components/Select/CaretIcon.js.map +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.module.cjs.map +1 -1
- package/dist/components/Select/Select.module.js.map +1 -1
- package/dist/components/Select/options.cjs.map +1 -1
- package/dist/components/Select/options.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.js +13 -23
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.js.map +1 -1
- package/dist/components/Sidebar/SidebarEntry.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarEntry.js.map +1 -1
- package/dist/components/Sidebar/active-nav-key.cjs.map +1 -1
- package/dist/components/Sidebar/active-nav-key.js.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.cjs +1 -1
- package/dist/components/SignaturePad/SignaturePad.cjs.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.js +1 -5
- package/dist/components/SignaturePad/SignaturePad.js.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.module.cjs.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.module.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.js.map +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider/Slider.module.cjs.map +1 -1
- package/dist/components/Slider/Slider.module.js.map +1 -1
- package/dist/components/Spacer/Spacer.cjs.map +1 -1
- package/dist/components/Spacer/Spacer.js.map +1 -1
- package/dist/components/Spacer/Spacer.module.cjs.map +1 -1
- package/dist/components/Spacer/Spacer.module.js.map +1 -1
- package/dist/components/Sparkline/Sparkline.cjs.map +1 -1
- package/dist/components/Sparkline/Sparkline.js.map +1 -1
- package/dist/components/Sparkline/Sparkline.module.cjs.map +1 -1
- package/dist/components/Sparkline/Sparkline.module.js.map +1 -1
- package/dist/components/Sparkline/sparkline-geometry.cjs.map +1 -1
- package/dist/components/Sparkline/sparkline-geometry.js.map +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner/Spinner.module.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.module.js.map +1 -1
- package/dist/components/Stat/Stat.cjs.map +1 -1
- package/dist/components/Stat/Stat.js.map +1 -1
- package/dist/components/Stat/Stat.module.cjs.map +1 -1
- package/dist/components/Stat/Stat.module.js.map +1 -1
- package/dist/components/Stepper/Stepper.cjs.map +1 -1
- package/dist/components/Stepper/Stepper.js.map +1 -1
- package/dist/components/Stepper/Stepper.module.cjs.map +1 -1
- package/dist/components/Stepper/Stepper.module.js.map +1 -1
- package/dist/components/StepperInput/StepperInput.cjs.map +1 -1
- package/dist/components/StepperInput/StepperInput.js.map +1 -1
- package/dist/components/StepperInput/StepperInput.module.cjs.map +1 -1
- package/dist/components/StepperInput/StepperInput.module.js.map +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch/Switch.module.cjs.map +1 -1
- package/dist/components/Switch/Switch.module.js.map +1 -1
- package/dist/components/SyncStatusBadge/SyncStatusBadge.cjs.map +1 -1
- package/dist/components/SyncStatusBadge/SyncStatusBadge.js.map +1 -1
- package/dist/components/SyncStatusBadge/SyncStatusBadge.module.cjs.map +1 -1
- package/dist/components/SyncStatusBadge/SyncStatusBadge.module.js.map +1 -1
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.module.cjs.map +1 -1
- package/dist/components/Table/Table.module.js.map +1 -1
- package/dist/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.module.js.map +1 -1
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/Tag.module.cjs.map +1 -1
- package/dist/components/Tag/Tag.module.js.map +1 -1
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.module.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.module.js.map +1 -1
- package/dist/components/TimePicker/TimePicker.cjs.map +1 -1
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePicker/TimePicker.module.cjs.map +1 -1
- package/dist/components/TimePicker/TimePicker.module.js.map +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline/Timeline.module.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.module.js.map +1 -1
- package/dist/components/Toast/Toast.module.cjs.map +1 -1
- package/dist/components/Toast/Toast.module.js.map +1 -1
- package/dist/components/Toast/ToastProvider.cjs.map +1 -1
- package/dist/components/Toast/ToastProvider.js.map +1 -1
- package/dist/components/Toggle/Toggle.cjs.map +1 -1
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/Toggle.module.cjs.map +1 -1
- package/dist/components/Toggle/Toggle.module.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.js.map +1 -1
- package/dist/components/Tour/Tour.cjs +1 -1
- package/dist/components/Tour/Tour.cjs.map +1 -1
- package/dist/components/Tour/Tour.js +1 -5
- package/dist/components/Tour/Tour.js.map +1 -1
- package/dist/components/Tour/Tour.module.cjs.map +1 -1
- package/dist/components/Tour/Tour.module.js.map +1 -1
- package/dist/components/Tour/tour-position.cjs.map +1 -1
- package/dist/components/Tour/tour-position.js.map +1 -1
- package/dist/components/Transfer/Transfer.cjs.map +1 -1
- package/dist/components/Transfer/Transfer.js.map +1 -1
- package/dist/components/Transfer/Transfer.module.cjs.map +1 -1
- package/dist/components/Transfer/Transfer.module.js.map +1 -1
- package/dist/components/Transfer/transfer-state.cjs.map +1 -1
- package/dist/components/Transfer/transfer-state.js.map +1 -1
- package/dist/components/TreeView/TreeView.cjs.map +1 -1
- package/dist/components/TreeView/TreeView.js.map +1 -1
- package/dist/components/TreeView/TreeView.module.cjs.map +1 -1
- package/dist/components/TreeView/TreeView.module.js.map +1 -1
- package/dist/components/TruncateText/TruncateText.cjs.map +1 -1
- package/dist/components/TruncateText/TruncateText.js.map +1 -1
- package/dist/components/TruncateText/TruncateText.module.cjs.map +1 -1
- package/dist/components/TruncateText/TruncateText.module.js.map +1 -1
- package/dist/components/UpdatePrompt/UpdatePrompt.cjs.map +1 -1
- package/dist/components/UpdatePrompt/UpdatePrompt.js.map +1 -1
- package/dist/components/UpdatePrompt/UpdatePrompt.module.cjs.map +1 -1
- package/dist/components/UpdatePrompt/UpdatePrompt.module.js.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.cjs +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.cjs.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.js +1 -7
- package/dist/components/VideoPlayer/VideoPlayer.js.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.module.cjs.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.module.js.map +1 -1
- package/dist/components/VideoPlayer/playback-rates.cjs.map +1 -1
- package/dist/components/VideoPlayer/playback-rates.js.map +1 -1
- package/dist/components/VirtualList/VirtualList.cjs.map +1 -1
- package/dist/components/VirtualList/VirtualList.js.map +1 -1
- package/dist/components/VirtualList/VirtualList.module.cjs.map +1 -1
- package/dist/components/VirtualList/VirtualList.module.js.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.cjs.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.js.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.module.cjs.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.module.js.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.cjs.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.js.map +1 -1
- package/dist/components/Wizard/Wizard.cjs +1 -1
- package/dist/components/Wizard/Wizard.cjs.map +1 -1
- package/dist/components/Wizard/Wizard.js +4 -11
- package/dist/components/Wizard/Wizard.js.map +1 -1
- package/dist/components/Wizard/Wizard.module.cjs.map +1 -1
- package/dist/components/Wizard/Wizard.module.js.map +1 -1
- package/dist/data/create-data-provider.cjs.map +1 -1
- package/dist/data/create-data-provider.js.map +1 -1
- package/dist/data/data-provider-context.cjs.map +1 -1
- package/dist/data/data-provider-context.js.map +1 -1
- package/dist/data/use-resource.cjs.map +1 -1
- package/dist/data/use-resource.js.map +1 -1
- package/dist/editor/RichTextEditor.cjs.map +1 -1
- package/dist/editor/RichTextEditor.js.map +1 -1
- package/dist/editor/RichTextEditor.module.cjs.map +1 -1
- package/dist/editor/RichTextEditor.module.js.map +1 -1
- package/dist/editor.js +1 -2
- package/dist/error-boundary/ErrorBoundary.cjs.map +1 -1
- package/dist/error-boundary/ErrorBoundary.js.map +1 -1
- package/dist/error-boundary/use-error-handler.cjs.map +1 -1
- package/dist/error-boundary/use-error-handler.js.map +1 -1
- package/dist/feature-flags/FeatureFlagsProvider.cjs.map +1 -1
- package/dist/feature-flags/FeatureFlagsProvider.js.map +1 -1
- package/dist/feature-flags/growthbook-adapter.cjs.map +1 -1
- package/dist/feature-flags/growthbook-adapter.js.map +1 -1
- package/dist/feature-flags/in-memory-adapter.cjs.map +1 -1
- package/dist/feature-flags/in-memory-adapter.js.map +1 -1
- package/dist/feature-flags/launchdarkly-adapter.cjs.map +1 -1
- package/dist/feature-flags/launchdarkly-adapter.js.map +1 -1
- package/dist/forms/FormField.cjs.map +1 -1
- package/dist/forms/FormField.js.map +1 -1
- package/dist/forms/br-validators.cjs.map +1 -1
- package/dist/forms/br-validators.js.map +1 -1
- package/dist/forms/masked-inputs.cjs.map +1 -1
- package/dist/forms/masked-inputs.js.map +1 -1
- package/dist/forms/use-viacep.cjs.map +1 -1
- package/dist/forms/use-viacep.js.map +1 -1
- package/dist/forms/use-zod-form.cjs.map +1 -1
- package/dist/forms/use-zod-form.js.map +1 -1
- package/dist/forms/validate-form.cjs.map +1 -1
- package/dist/forms/validate-form.js.map +1 -1
- package/dist/forms/zod-resolver.cjs.map +1 -1
- package/dist/forms/zod-resolver.js.map +1 -1
- package/dist/geo/TrajectoryMap.cjs.map +1 -1
- package/dist/geo/TrajectoryMap.js.map +1 -1
- package/dist/geo/TrajectoryMap.module.cjs.map +1 -1
- package/dist/geo/TrajectoryMap.module.js.map +1 -1
- package/dist/geo/bounds.cjs.map +1 -1
- package/dist/geo/bounds.js.map +1 -1
- package/dist/geo/create-position-tracker.cjs +1 -1
- package/dist/geo/create-position-tracker.cjs.map +1 -1
- package/dist/geo/create-position-tracker.js +1 -7
- package/dist/geo/create-position-tracker.js.map +1 -1
- package/dist/geo/distance.cjs.map +1 -1
- package/dist/geo/distance.js.map +1 -1
- package/dist/geo/estimate.cjs.map +1 -1
- package/dist/geo/estimate.js.map +1 -1
- package/dist/geo/leaflet-map.cjs.map +1 -1
- package/dist/geo/leaflet-map.js.map +1 -1
- package/dist/geo/projection.cjs.map +1 -1
- package/dist/geo/projection.js.map +1 -1
- package/dist/geo/routing.cjs.map +1 -1
- package/dist/geo/routing.js.map +1 -1
- package/dist/geo/types.cjs.map +1 -1
- package/dist/geo/types.js.map +1 -1
- package/dist/geo/use-position-tracker.cjs.map +1 -1
- package/dist/geo/use-position-tracker.js.map +1 -1
- package/dist/hooks/pwa-env.cjs.map +1 -1
- package/dist/hooks/pwa-env.js.map +1 -1
- package/dist/hooks/tab-sequence.cjs.map +1 -1
- package/dist/hooks/tab-sequence.js.map +1 -1
- package/dist/hooks/use-announce.cjs +1 -1
- package/dist/hooks/use-announce.cjs.map +1 -1
- package/dist/hooks/use-announce.js +2 -2
- package/dist/hooks/use-announce.js.map +1 -1
- package/dist/hooks/use-async.cjs.map +1 -1
- package/dist/hooks/use-async.js.map +1 -1
- package/dist/hooks/use-before-install-prompt.cjs.map +1 -1
- package/dist/hooks/use-before-install-prompt.js.map +1 -1
- package/dist/hooks/use-breakpoint.cjs.map +1 -1
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-click-outside.cjs.map +1 -1
- package/dist/hooks/use-click-outside.js.map +1 -1
- package/dist/hooks/use-client-filter.cjs.map +1 -1
- package/dist/hooks/use-client-filter.js.map +1 -1
- package/dist/hooks/use-clipboard.cjs.map +1 -1
- package/dist/hooks/use-clipboard.js.map +1 -1
- package/dist/hooks/use-countdown.cjs.map +1 -1
- package/dist/hooks/use-countdown.js.map +1 -1
- package/dist/hooks/use-counter.cjs.map +1 -1
- package/dist/hooks/use-counter.js.map +1 -1
- package/dist/hooks/use-debounce.cjs.map +1 -1
- package/dist/hooks/use-debounce.js.map +1 -1
- package/dist/hooks/use-deep-memo.cjs.map +1 -1
- package/dist/hooks/use-deep-memo.js.map +1 -1
- package/dist/hooks/use-disclosure.cjs.map +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-document-title.cjs.map +1 -1
- package/dist/hooks/use-document-title.js.map +1 -1
- package/dist/hooks/use-document-visibility.cjs.map +1 -1
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-draft-filters.cjs.map +1 -1
- package/dist/hooks/use-draft-filters.js.map +1 -1
- package/dist/hooks/use-event-listener.cjs.map +1 -1
- package/dist/hooks/use-event-listener.js.map +1 -1
- package/dist/hooks/use-favicon.cjs.map +1 -1
- package/dist/hooks/use-favicon.js.map +1 -1
- package/dist/hooks/use-focus-trap.cjs.map +1 -1
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-fullscreen-element.cjs.map +1 -1
- package/dist/hooks/use-fullscreen-element.js.map +1 -1
- package/dist/hooks/use-fullscreen.cjs +1 -1
- package/dist/hooks/use-fullscreen.cjs.map +1 -1
- package/dist/hooks/use-fullscreen.js +7 -23
- package/dist/hooks/use-fullscreen.js.map +1 -1
- package/dist/hooks/use-geolocation.cjs.map +1 -1
- package/dist/hooks/use-geolocation.js.map +1 -1
- package/dist/hooks/use-hover.cjs.map +1 -1
- package/dist/hooks/use-hover.js.map +1 -1
- package/dist/hooks/use-idle.cjs.map +1 -1
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-install-prompt.cjs +1 -1
- package/dist/hooks/use-install-prompt.cjs.map +1 -1
- package/dist/hooks/use-install-prompt.js +1 -1
- package/dist/hooks/use-install-prompt.js.map +1 -1
- package/dist/hooks/use-intersection-observer.cjs.map +1 -1
- package/dist/hooks/use-intersection-observer.js.map +1 -1
- package/dist/hooks/use-interval.cjs.map +1 -1
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-is-first-render.cjs.map +1 -1
- package/dist/hooks/use-is-first-render.js.map +1 -1
- package/dist/hooks/use-keyboard-shortcut.cjs.map +1 -1
- package/dist/hooks/use-keyboard-shortcut.js.map +1 -1
- package/dist/hooks/use-latest-ref.cjs.map +1 -1
- package/dist/hooks/use-latest-ref.js.map +1 -1
- package/dist/hooks/use-list-state.cjs.map +1 -1
- package/dist/hooks/use-list-state.js.map +1 -1
- package/dist/hooks/use-local-storage.cjs +1 -1
- package/dist/hooks/use-local-storage.cjs.map +1 -1
- package/dist/hooks/use-local-storage.js +2 -5
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-long-press-handlers.cjs.map +1 -1
- package/dist/hooks/use-long-press-handlers.js.map +1 -1
- package/dist/hooks/use-long-press.cjs.map +1 -1
- package/dist/hooks/use-long-press.js.map +1 -1
- package/dist/hooks/use-map.cjs.map +1 -1
- package/dist/hooks/use-map.js.map +1 -1
- package/dist/hooks/use-media-devices.cjs.map +1 -1
- package/dist/hooks/use-media-devices.js.map +1 -1
- package/dist/hooks/use-media-permission.cjs +1 -1
- package/dist/hooks/use-media-permission.cjs.map +1 -1
- package/dist/hooks/use-media-permission.js +2 -5
- package/dist/hooks/use-media-permission.js.map +1 -1
- package/dist/hooks/use-media-query.cjs.map +1 -1
- package/dist/hooks/use-media-query.js.map +1 -1
- package/dist/hooks/use-object-url.cjs.map +1 -1
- package/dist/hooks/use-object-url.js.map +1 -1
- package/dist/hooks/use-online.cjs.map +1 -1
- package/dist/hooks/use-online.js.map +1 -1
- package/dist/hooks/use-pagination.cjs.map +1 -1
- package/dist/hooks/use-pagination.js.map +1 -1
- package/dist/hooks/use-previous.cjs.map +1 -1
- package/dist/hooks/use-previous.js.map +1 -1
- package/dist/hooks/use-push-to-talk.cjs.map +1 -1
- package/dist/hooks/use-push-to-talk.js.map +1 -1
- package/dist/hooks/use-queue.cjs.map +1 -1
- package/dist/hooks/use-queue.js.map +1 -1
- package/dist/hooks/use-resize-observer.cjs.map +1 -1
- package/dist/hooks/use-resize-observer.js.map +1 -1
- package/dist/hooks/use-scroll-lock.cjs.map +1 -1
- package/dist/hooks/use-scroll-lock.js.map +1 -1
- package/dist/hooks/use-scroll-overflow.cjs.map +1 -1
- package/dist/hooks/use-scroll-overflow.js.map +1 -1
- package/dist/hooks/use-service-worker-update.cjs.map +1 -1
- package/dist/hooks/use-service-worker-update.js.map +1 -1
- package/dist/hooks/use-set.cjs.map +1 -1
- package/dist/hooks/use-set.js.map +1 -1
- package/dist/hooks/use-sortable.cjs.map +1 -1
- package/dist/hooks/use-sortable.js.map +1 -1
- package/dist/hooks/use-stable-callback.cjs.map +1 -1
- package/dist/hooks/use-stable-callback.js.map +1 -1
- package/dist/hooks/use-storage-estimate.cjs.map +1 -1
- package/dist/hooks/use-storage-estimate.js.map +1 -1
- package/dist/hooks/use-throttle.cjs.map +1 -1
- package/dist/hooks/use-throttle.js.map +1 -1
- package/dist/hooks/use-timeout.cjs.map +1 -1
- package/dist/hooks/use-timeout.js.map +1 -1
- package/dist/hooks/use-toggle.cjs.map +1 -1
- package/dist/hooks/use-toggle.js.map +1 -1
- package/dist/hooks/use-typewriter.cjs.map +1 -1
- package/dist/hooks/use-typewriter.js.map +1 -1
- package/dist/hooks/use-window-size.cjs.map +1 -1
- package/dist/hooks/use-window-size.js.map +1 -1
- package/dist/http/api-client.cjs.map +1 -1
- package/dist/http/api-client.js.map +1 -1
- package/dist/http/build-url.cjs.map +1 -1
- package/dist/http/build-url.js.map +1 -1
- package/dist/http/credential-scope.cjs.map +1 -1
- package/dist/http/credential-scope.js.map +1 -1
- package/dist/http/csrf.cjs.map +1 -1
- package/dist/http/csrf.js.map +1 -1
- package/dist/http/decode-response.cjs.map +1 -1
- package/dist/http/decode-response.js.map +1 -1
- 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.map +1 -1
- package/dist/http/errors.js.map +1 -1
- package/dist/http/idempotency.cjs.map +1 -1
- package/dist/http/idempotency.js.map +1 -1
- package/dist/http/parse-response.cjs.map +1 -1
- package/dist/http/parse-response.js.map +1 -1
- package/dist/http/resumable-upload.cjs.map +1 -1
- package/dist/http/resumable-upload.js.map +1 -1
- package/dist/http/retry.cjs.map +1 -1
- package/dist/http/retry.js.map +1 -1
- package/dist/http/timeout.cjs.map +1 -1
- package/dist/http/timeout.js.map +1 -1
- package/dist/http/upload-with-progress.cjs +1 -1
- package/dist/http/upload-with-progress.cjs.map +1 -1
- package/dist/http/upload-with-progress.js +2 -7
- package/dist/http/upload-with-progress.js.map +1 -1
- package/dist/http/use-describe-api-error.cjs.map +1 -1
- package/dist/http/use-describe-api-error.js.map +1 -1
- package/dist/http/use-poll.cjs +1 -1
- package/dist/http/use-poll.cjs.map +1 -1
- package/dist/http/use-poll.js +2 -5
- package/dist/http/use-poll.js.map +1 -1
- package/dist/i18n/I18nProvider.cjs.map +1 -1
- package/dist/i18n/I18nProvider.js.map +1 -1
- package/dist/i18n/create-i18n.cjs.map +1 -1
- package/dist/i18n/create-i18n.js.map +1 -1
- package/dist/icons/Icon.cjs.map +1 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/icons/IconPicker.cjs.map +1 -1
- package/dist/icons/IconPicker.js.map +1 -1
- package/dist/icons/IconPicker.module.cjs.map +1 -1
- package/dist/icons/IconPicker.module.js.map +1 -1
- package/dist/icons/IconProvider.cjs.map +1 -1
- package/dist/icons/IconProvider.js.map +1 -1
- package/dist/icons/alias.cjs.map +1 -1
- package/dist/icons/alias.js.map +1 -1
- package/dist/icons/generated/aliases.cjs.map +1 -1
- package/dist/icons/generated/aliases.js.map +1 -1
- package/dist/icons/generated/icon-names.cjs.map +1 -1
- package/dist/icons/generated/icon-names.js.map +1 -1
- package/dist/icons/generated/loaders.cjs.map +1 -1
- package/dist/icons/generated/loaders.js.map +1 -1
- package/dist/icons/generated/shard-00.cjs.map +1 -1
- package/dist/icons/generated/shard-00.js.map +1 -1
- package/dist/icons/generated/shard-01.cjs.map +1 -1
- package/dist/icons/generated/shard-01.js.map +1 -1
- package/dist/icons/generated/shard-02.cjs.map +1 -1
- package/dist/icons/generated/shard-02.js.map +1 -1
- package/dist/icons/generated/shard-03.cjs.map +1 -1
- package/dist/icons/generated/shard-03.js.map +1 -1
- package/dist/icons/generated/shard-04.cjs.map +1 -1
- package/dist/icons/generated/shard-04.js.map +1 -1
- package/dist/icons/generated/shard-05.cjs.map +1 -1
- package/dist/icons/generated/shard-05.js.map +1 -1
- package/dist/icons/generated/shard-06.cjs.map +1 -1
- package/dist/icons/generated/shard-06.js.map +1 -1
- package/dist/icons/generated/shard-07.cjs.map +1 -1
- package/dist/icons/generated/shard-07.js.map +1 -1
- package/dist/icons/generated/shard-08.cjs.map +1 -1
- package/dist/icons/generated/shard-08.js.map +1 -1
- package/dist/icons/generated/shard-09.cjs.map +1 -1
- package/dist/icons/generated/shard-09.js.map +1 -1
- package/dist/icons/generated/shard-10.cjs.map +1 -1
- package/dist/icons/generated/shard-10.js.map +1 -1
- package/dist/icons/generated/shard-11.cjs.map +1 -1
- package/dist/icons/generated/shard-11.js.map +1 -1
- package/dist/icons/generated/shard-12.cjs.map +1 -1
- package/dist/icons/generated/shard-12.js.map +1 -1
- package/dist/icons/generated/shard-13.cjs.map +1 -1
- package/dist/icons/generated/shard-13.js.map +1 -1
- package/dist/icons/generated/shard-14.cjs.map +1 -1
- package/dist/icons/generated/shard-14.js.map +1 -1
- package/dist/icons/generated/shard-15.cjs.map +1 -1
- package/dist/icons/generated/shard-15.js.map +1 -1
- package/dist/icons/generated/shard-16.cjs.map +1 -1
- package/dist/icons/generated/shard-16.js.map +1 -1
- package/dist/icons/generated/shard-17.cjs.map +1 -1
- package/dist/icons/generated/shard-17.js.map +1 -1
- package/dist/icons/generated/shard-18.cjs.map +1 -1
- package/dist/icons/generated/shard-18.js.map +1 -1
- package/dist/icons/generated/shard-19.cjs.map +1 -1
- package/dist/icons/generated/shard-19.js.map +1 -1
- package/dist/icons/generated/shard-20.cjs.map +1 -1
- package/dist/icons/generated/shard-20.js.map +1 -1
- package/dist/icons/generated/shard-21.cjs.map +1 -1
- package/dist/icons/generated/shard-21.js.map +1 -1
- package/dist/icons/generated/shard-22.cjs.map +1 -1
- package/dist/icons/generated/shard-22.js.map +1 -1
- package/dist/icons/generated/shard-23.cjs.map +1 -1
- package/dist/icons/generated/shard-23.js.map +1 -1
- package/dist/icons/generated/shard-24.cjs.map +1 -1
- package/dist/icons/generated/shard-24.js.map +1 -1
- package/dist/icons/generated/shard-25.cjs.map +1 -1
- package/dist/icons/generated/shard-25.js.map +1 -1
- package/dist/icons/generated/shard-26.cjs.map +1 -1
- package/dist/icons/generated/shard-26.js.map +1 -1
- package/dist/icons/generated/shard-27.cjs.map +1 -1
- package/dist/icons/generated/shard-27.js.map +1 -1
- package/dist/icons/generated/shard-28.cjs.map +1 -1
- package/dist/icons/generated/shard-28.js.map +1 -1
- package/dist/icons/generated/shard-29.cjs.map +1 -1
- package/dist/icons/generated/shard-29.js.map +1 -1
- package/dist/icons/generated/shard-30.cjs.map +1 -1
- package/dist/icons/generated/shard-30.js.map +1 -1
- package/dist/icons/generated/shard-31.cjs.map +1 -1
- package/dist/icons/generated/shard-31.js.map +1 -1
- package/dist/icons/generated/shard-32.cjs.map +1 -1
- package/dist/icons/generated/shard-32.js.map +1 -1
- package/dist/icons/generated/shard-33.cjs.map +1 -1
- package/dist/icons/generated/shard-33.js.map +1 -1
- package/dist/icons/generated/shard-34.cjs.map +1 -1
- package/dist/icons/generated/shard-34.js.map +1 -1
- package/dist/icons/generated/shard-35.cjs.map +1 -1
- package/dist/icons/generated/shard-35.js.map +1 -1
- package/dist/icons/generated/shard-36.cjs.map +1 -1
- package/dist/icons/generated/shard-36.js.map +1 -1
- package/dist/icons/generated/shard-37.cjs.map +1 -1
- package/dist/icons/generated/shard-37.js.map +1 -1
- package/dist/icons/generated/shard-38.cjs.map +1 -1
- package/dist/icons/generated/shard-38.js.map +1 -1
- package/dist/icons/generated/shard-39.cjs.map +1 -1
- package/dist/icons/generated/shard-39.js.map +1 -1
- package/dist/icons/generated/shard-40.cjs.map +1 -1
- package/dist/icons/generated/shard-40.js.map +1 -1
- package/dist/icons/generated/shard-41.cjs.map +1 -1
- package/dist/icons/generated/shard-41.js.map +1 -1
- package/dist/icons/generated/shard-42.cjs.map +1 -1
- package/dist/icons/generated/shard-42.js.map +1 -1
- package/dist/icons/generated/shard-43.cjs.map +1 -1
- package/dist/icons/generated/shard-43.js.map +1 -1
- package/dist/icons/generated/shard-44.cjs.map +1 -1
- package/dist/icons/generated/shard-44.js.map +1 -1
- package/dist/icons/generated/shard-45.cjs.map +1 -1
- package/dist/icons/generated/shard-45.js.map +1 -1
- package/dist/icons/icon-context.cjs.map +1 -1
- package/dist/icons/icon-context.js.map +1 -1
- package/dist/icons/is-icon-name.cjs.map +1 -1
- package/dist/icons/is-icon-name.js.map +1 -1
- package/dist/icons/material-symbols.cjs.map +1 -1
- package/dist/icons/material-symbols.js.map +1 -1
- package/dist/icons/normalize-icon-name.cjs.map +1 -1
- package/dist/icons/normalize-icon-name.js.map +1 -1
- package/dist/icons/shard-cache.cjs +1 -1
- package/dist/icons/shard-cache.cjs.map +1 -1
- package/dist/icons/shard-cache.js +2 -5
- package/dist/icons/shard-cache.js.map +1 -1
- package/dist/icons/use-icon.cjs.map +1 -1
- package/dist/icons/use-icon.js.map +1 -1
- package/dist/icons/validate-icon-name.cjs.map +1 -1
- package/dist/icons/validate-icon-name.js.map +1 -1
- package/dist/icons-virtual.cjs.map +1 -1
- package/dist/icons-virtual.js.map +1 -1
- package/dist/imaging/canvas.cjs.map +1 -1
- package/dist/imaging/canvas.js.map +1 -1
- package/dist/imaging/compress.cjs.map +1 -1
- package/dist/imaging/compress.js.map +1 -1
- package/dist/imaging/decode.cjs.map +1 -1
- package/dist/imaging/decode.js.map +1 -1
- package/dist/imaging/encode.cjs.map +1 -1
- package/dist/imaging/encode.js.map +1 -1
- package/dist/imaging/exceptions.cjs.map +1 -1
- package/dist/imaging/exceptions.js.map +1 -1
- package/dist/imaging/frame.cjs.map +1 -1
- package/dist/imaging/frame.js.map +1 -1
- package/dist/imaging/thumbnails.cjs.map +1 -1
- package/dist/imaging/thumbnails.js.map +1 -1
- package/dist/imaging/transform.cjs.map +1 -1
- package/dist/imaging/transform.js.map +1 -1
- package/dist/imaging/use-image-processing.cjs.map +1 -1
- package/dist/imaging/use-image-processing.js.map +1 -1
- package/dist/logger/logger.cjs.map +1 -1
- package/dist/logger/logger.js.map +1 -1
- package/dist/neural.cjs.map +1 -1
- package/dist/neural.js.map +1 -1
- package/dist/oauth/GoogleSignIn.cjs +1 -1
- package/dist/oauth/GoogleSignIn.cjs.map +1 -1
- package/dist/oauth/GoogleSignIn.js +6 -9
- package/dist/oauth/GoogleSignIn.js.map +1 -1
- package/dist/oauth/callback.cjs.map +1 -1
- package/dist/oauth/callback.js.map +1 -1
- package/dist/oauth/use-oauth-callback.cjs.map +1 -1
- package/dist/oauth/use-oauth-callback.js.map +1 -1
- package/dist/offline/conflict.cjs.map +1 -1
- package/dist/offline/conflict.js.map +1 -1
- package/dist/offline/create-offline-database.cjs.map +1 -1
- package/dist/offline/create-offline-database.js.map +1 -1
- package/dist/offline/create-offline-store.cjs +1 -1
- package/dist/offline/create-offline-store.cjs.map +1 -1
- package/dist/offline/create-offline-store.js +1 -5
- package/dist/offline/create-offline-store.js.map +1 -1
- package/dist/offline/create-offline-sync.cjs +1 -1
- package/dist/offline/create-offline-sync.cjs.map +1 -1
- package/dist/offline/create-offline-sync.js +9 -14
- package/dist/offline/create-offline-sync.js.map +1 -1
- package/dist/offline/use-offline-sync.cjs.map +1 -1
- package/dist/offline/use-offline-sync.js.map +1 -1
- package/dist/perf/cache-size.cjs.map +1 -1
- package/dist/perf/cache-size.js.map +1 -1
- package/dist/perf/device.cjs.map +1 -1
- package/dist/perf/device.js.map +1 -1
- package/dist/perf/format.cjs.map +1 -1
- package/dist/perf/format.js.map +1 -1
- package/dist/perf/profiler.cjs.map +1 -1
- package/dist/perf/profiler.js.map +1 -1
- package/dist/push/use-push-subscription.cjs.map +1 -1
- package/dist/push/use-push-subscription.js.map +1 -1
- package/dist/push/utils.cjs.map +1 -1
- package/dist/push/utils.js.map +1 -1
- package/dist/push/web-push-client.cjs.map +1 -1
- package/dist/push/web-push-client.js.map +1 -1
- package/dist/query/QueryProvider.cjs.map +1 -1
- package/dist/query/QueryProvider.js.map +1 -1
- package/dist/query/constants.cjs.map +1 -1
- package/dist/query/constants.js.map +1 -1
- package/dist/query/create-query-keys.cjs.map +1 -1
- package/dist/query/create-query-keys.js.map +1 -1
- package/dist/query/foreign-client-warning.cjs.map +1 -1
- package/dist/query/foreign-client-warning.js.map +1 -1
- package/dist/query/offline-persistence.cjs +1 -1
- package/dist/query/offline-persistence.cjs.map +1 -1
- package/dist/query/offline-persistence.js +2 -10
- package/dist/query/offline-persistence.js.map +1 -1
- package/dist/query/optimistic.cjs.map +1 -1
- package/dist/query/optimistic.js.map +1 -1
- package/dist/query/pagination.cjs.map +1 -1
- package/dist/query/pagination.js.map +1 -1
- package/dist/query/retry-policy.cjs.map +1 -1
- package/dist/query/retry-policy.js.map +1 -1
- package/dist/query/use-cursor-query.cjs.map +1 -1
- package/dist/query/use-cursor-query.js.map +1 -1
- package/dist/query/use-offline-mutation.cjs.map +1 -1
- package/dist/query/use-offline-mutation.js.map +1 -1
- package/dist/query/use-paginated-query.cjs.map +1 -1
- package/dist/query/use-paginated-query.js.map +1 -1
- package/dist/router/AppRouter.cjs.map +1 -1
- package/dist/router/AppRouter.js.map +1 -1
- package/dist/router/RouteGuard.cjs.map +1 -1
- package/dist/router/RouteGuard.js.map +1 -1
- package/dist/router/index.js +2 -2
- package/dist/share/share-or-download.cjs.map +1 -1
- package/dist/share/share-or-download.js.map +1 -1
- package/dist/share/share.cjs.map +1 -1
- package/dist/share/share.js.map +1 -1
- package/dist/sse/create-event-stream.cjs.map +1 -1
- package/dist/sse/create-event-stream.js.map +1 -1
- package/dist/sse/use-event-stream.cjs.map +1 -1
- package/dist/sse/use-event-stream.js.map +1 -1
- package/dist/store/create-selectors.cjs.map +1 -1
- package/dist/store/create-selectors.js.map +1 -1
- package/dist/store/create-store.cjs.map +1 -1
- package/dist/store/create-store.js.map +1 -1
- package/dist/sw/background-sync.cjs.map +1 -1
- package/dist/sw/background-sync.js.map +1 -1
- package/dist/sw/cache-inspect.cjs.map +1 -1
- package/dist/sw/cache-inspect.js.map +1 -1
- package/dist/sw/cache.cjs +1 -1
- package/dist/sw/cache.cjs.map +1 -1
- package/dist/sw/cache.js +2 -6
- package/dist/sw/cache.js.map +1 -1
- package/dist/sw/create-push-handler.cjs.map +1 -1
- package/dist/sw/create-push-handler.js.map +1 -1
- package/dist/sw/credential-headers.cjs.map +1 -1
- package/dist/sw/credential-headers.js.map +1 -1
- package/dist/sw/periodic-sync.cjs.map +1 -1
- package/dist/sw/periodic-sync.js.map +1 -1
- package/dist/sw/register-service-worker.cjs.map +1 -1
- package/dist/sw/register-service-worker.js.map +1 -1
- package/dist/sw/session-data.cjs.map +1 -1
- package/dist/sw/session-data.js.map +1 -1
- package/dist/tabular/assets.cjs.map +1 -1
- package/dist/tabular/assets.js.map +1 -1
- package/dist/tabular/cache.cjs.map +1 -1
- package/dist/tabular/cache.js.map +1 -1
- package/dist/tabular/compact.cjs.map +1 -1
- package/dist/tabular/compact.js.map +1 -1
- package/dist/tabular/exceptions.cjs.map +1 -1
- package/dist/tabular/exceptions.js.map +1 -1
- package/dist/tabular/manifest.cjs.map +1 -1
- package/dist/tabular/manifest.js.map +1 -1
- package/dist/tabular/predictor.cjs.map +1 -1
- package/dist/tabular/predictor.js.map +1 -1
- package/dist/tabular/use-tabular-predictor.cjs.map +1 -1
- package/dist/tabular/use-tabular-predictor.js.map +1 -1
- package/dist/telemetry/TelemetryProvider.cjs.map +1 -1
- package/dist/telemetry/TelemetryProvider.js.map +1 -1
- package/dist/telemetry/app-error-adapter.cjs.map +1 -1
- package/dist/telemetry/app-error-adapter.js.map +1 -1
- package/dist/telemetry/app-error-queue.cjs.map +1 -1
- package/dist/telemetry/app-error-queue.js.map +1 -1
- package/dist/telemetry/app-error-reporter.cjs.map +1 -1
- package/dist/telemetry/app-error-reporter.js.map +1 -1
- package/dist/telemetry/app-error-schema.cjs.map +1 -1
- package/dist/telemetry/app-error-schema.js.map +1 -1
- package/dist/telemetry/app-error-transport.cjs.map +1 -1
- package/dist/telemetry/app-error-transport.js.map +1 -1
- package/dist/telemetry/console-adapter.cjs.map +1 -1
- package/dist/telemetry/console-adapter.js.map +1 -1
- package/dist/telemetry/describe-app-error.cjs.map +1 -1
- package/dist/telemetry/describe-app-error.js.map +1 -1
- package/dist/telemetry/posthog-adapter.cjs +1 -1
- package/dist/telemetry/posthog-adapter.cjs.map +1 -1
- package/dist/telemetry/posthog-adapter.js +1 -5
- package/dist/telemetry/posthog-adapter.js.map +1 -1
- package/dist/telemetry/sentry-adapter.cjs.map +1 -1
- package/dist/telemetry/sentry-adapter.js.map +1 -1
- package/dist/tempest-react-sdk.cjs +1 -1
- package/dist/tempest-react-sdk.d.ts +234 -3
- package/dist/tempest-react-sdk.js +85 -85
- package/dist/testing/create-mock-handlers.cjs.map +1 -1
- package/dist/testing/create-mock-handlers.js.map +1 -1
- package/dist/testing.js +1 -2
- package/dist/theme/ThemeProvider.cjs.map +1 -1
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/apply-theme.cjs.map +1 -1
- package/dist/theme/apply-theme.js.map +1 -1
- package/dist/theme/color.cjs.map +1 -1
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/create-theme.cjs.map +1 -1
- package/dist/theme/create-theme.js.map +1 -1
- package/dist/theme/data-viz-ramps.cjs.map +1 -1
- package/dist/theme/data-viz-ramps.js.map +1 -1
- package/dist/theme/initial-theme.cjs.map +1 -1
- package/dist/theme/initial-theme.js.map +1 -1
- package/dist/theme/inverse-render.cjs.map +1 -1
- package/dist/theme/inverse-render.js.map +1 -1
- package/dist/theme/inverse-restore.cjs.map +1 -1
- package/dist/theme/inverse-restore.js.map +1 -1
- package/dist/theme/inverse-surface.cjs.map +1 -1
- package/dist/theme/inverse-surface.js.map +1 -1
- package/dist/theme/status-tokens.cjs.map +1 -1
- package/dist/theme/status-tokens.js.map +1 -1
- package/dist/theme/theme-presets.cjs.map +1 -1
- package/dist/theme/theme-presets.js.map +1 -1
- package/dist/utils/absent.cjs.map +1 -1
- package/dist/utils/absent.js.map +1 -1
- package/dist/utils/arrays.cjs.map +1 -1
- package/dist/utils/arrays.js.map +1 -1
- package/dist/utils/base64.cjs.map +1 -1
- package/dist/utils/base64.js.map +1 -1
- package/dist/utils/cn.cjs.map +1 -1
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/compare-values.cjs.map +1 -1
- package/dist/utils/compare-values.js.map +1 -1
- package/dist/utils/compressed-storage.cjs.map +1 -1
- package/dist/utils/compressed-storage.js.map +1 -1
- package/dist/utils/csv.cjs.map +1 -1
- package/dist/utils/csv.js.map +1 -1
- package/dist/utils/dev-mode.cjs.map +1 -1
- package/dist/utils/dev-mode.js.map +1 -1
- package/dist/utils/duplicate-instance.cjs.map +1 -1
- package/dist/utils/duplicate-instance.js.map +1 -1
- package/dist/utils/format.cjs.map +1 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/functions.cjs +1 -1
- package/dist/utils/functions.cjs.map +1 -1
- package/dist/utils/functions.js +1 -1
- package/dist/utils/functions.js.map +1 -1
- package/dist/utils/guards.cjs.map +1 -1
- package/dist/utils/guards.js.map +1 -1
- package/dist/utils/ids.cjs.map +1 -1
- package/dist/utils/ids.js.map +1 -1
- package/dist/utils/intl-cache.cjs.map +1 -1
- package/dist/utils/intl-cache.js.map +1 -1
- package/dist/utils/json-frame.cjs.map +1 -1
- package/dist/utils/json-frame.js.map +1 -1
- package/dist/utils/numbers.cjs.map +1 -1
- package/dist/utils/numbers.js.map +1 -1
- package/dist/utils/objects.cjs.map +1 -1
- package/dist/utils/objects.js.map +1 -1
- package/dist/utils/owner-fingerprint.cjs.map +1 -1
- package/dist/utils/owner-fingerprint.js.map +1 -1
- package/dist/utils/promises.cjs.map +1 -1
- package/dist/utils/promises.js.map +1 -1
- package/dist/utils/relative-time.cjs.map +1 -1
- package/dist/utils/relative-time.js.map +1 -1
- package/dist/utils/safe-url.cjs.map +1 -1
- package/dist/utils/safe-url.js.map +1 -1
- package/dist/utils/schema-like.cjs.map +1 -1
- package/dist/utils/schema-like.js.map +1 -1
- package/dist/utils/storage.cjs +1 -1
- package/dist/utils/storage.cjs.map +1 -1
- package/dist/utils/storage.js +2 -2
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/strings.cjs.map +1 -1
- package/dist/utils/strings.js.map +1 -1
- package/dist/utils/xlsx.cjs.map +1 -1
- package/dist/utils/xlsx.js.map +1 -1
- package/dist/vision/core/canvas.cjs.map +1 -1
- package/dist/vision/core/canvas.js.map +1 -1
- package/dist/vision/core/dtypes.cjs.map +1 -1
- package/dist/vision/core/dtypes.js.map +1 -1
- package/dist/vision/core/exceptions.cjs.map +1 -1
- package/dist/vision/core/exceptions.js.map +1 -1
- package/dist/vision/core/graph.cjs.map +1 -1
- package/dist/vision/core/graph.js.map +1 -1
- package/dist/vision/core/metadata.cjs +1 -1
- package/dist/vision/core/metadata.cjs.map +1 -1
- package/dist/vision/core/metadata.js +9 -26
- package/dist/vision/core/metadata.js.map +1 -1
- package/dist/vision/core/providers.cjs.map +1 -1
- package/dist/vision/core/providers.js.map +1 -1
- package/dist/vision/core/session.cjs.map +1 -1
- package/dist/vision/core/session.js.map +1 -1
- package/dist/vision/core/timing.cjs.map +1 -1
- package/dist/vision/core/timing.js.map +1 -1
- package/dist/vision/fusion.cjs.map +1 -1
- package/dist/vision/fusion.js.map +1 -1
- package/dist/vision/index.cjs.map +1 -1
- package/dist/vision/index.js.map +1 -1
- package/dist/vision/io/image.cjs.map +1 -1
- package/dist/vision/io/image.js.map +1 -1
- package/dist/vision/labels.cjs.map +1 -1
- package/dist/vision/labels.js.map +1 -1
- package/dist/vision/luminance.cjs.map +1 -1
- package/dist/vision/luminance.js.map +1 -1
- package/dist/vision/normalization.cjs.map +1 -1
- package/dist/vision/normalization.js.map +1 -1
- package/dist/vision/postprocess/classification.cjs.map +1 -1
- package/dist/vision/postprocess/classification.js.map +1 -1
- package/dist/vision/postprocess/detection.cjs.map +1 -1
- package/dist/vision/postprocess/detection.js.map +1 -1
- package/dist/vision/postprocess/segmentation.cjs.map +1 -1
- package/dist/vision/postprocess/segmentation.js.map +1 -1
- package/dist/vision/preprocess/image.cjs.map +1 -1
- package/dist/vision/preprocess/image.js.map +1 -1
- package/dist/vision/preprocess/pipeline.cjs.map +1 -1
- package/dist/vision/preprocess/pipeline.js.map +1 -1
- package/dist/vision/results.cjs.map +1 -1
- package/dist/vision/results.js.map +1 -1
- package/dist/vision/tasks/base.cjs.map +1 -1
- package/dist/vision/tasks/base.js.map +1 -1
- package/dist/vision/tasks/classifier.cjs.map +1 -1
- package/dist/vision/tasks/classifier.js.map +1 -1
- package/dist/vision/tasks/detectClassify.cjs.map +1 -1
- package/dist/vision/tasks/detectClassify.js.map +1 -1
- package/dist/vision/tasks/detector.cjs.map +1 -1
- package/dist/vision/tasks/detector.js.map +1 -1
- package/dist/vision/tasks/segmenter.cjs.map +1 -1
- package/dist/vision/tasks/segmenter.js.map +1 -1
- package/dist/vision/types.cjs.map +1 -1
- package/dist/vision/types.js.map +1 -1
- package/dist/vision/use-camera-stream.cjs +1 -1
- package/dist/vision/use-camera-stream.cjs.map +1 -1
- package/dist/vision/use-camera-stream.js +3 -9
- package/dist/vision/use-camera-stream.js.map +1 -1
- package/dist/vision/use-live-luminance.cjs +1 -1
- package/dist/vision/use-live-luminance.cjs.map +1 -1
- package/dist/vision/use-live-luminance.js +1 -5
- package/dist/vision/use-live-luminance.js.map +1 -1
- package/dist/vite/base-url.cjs.map +1 -1
- package/dist/vite/base-url.js.map +1 -1
- package/dist/vite/create-vite-config.cjs.map +1 -1
- package/dist/vite/create-vite-config.js.map +1 -1
- package/dist/vite/narrow-tokens.cjs.map +1 -1
- package/dist/vite/narrow-tokens.js.map +1 -1
- package/dist/vite/tempest-csp.cjs +1 -1
- package/dist/vite/tempest-csp.cjs.map +1 -1
- package/dist/vite/tempest-csp.js +2 -10
- package/dist/vite/tempest-csp.js.map +1 -1
- package/dist/vite/tempest-icons.cjs.map +1 -1
- package/dist/vite/tempest-icons.js.map +1 -1
- package/dist/vite/tempest-pwa-dev-sw.cjs +1 -1
- package/dist/vite/tempest-pwa-dev-sw.cjs.map +1 -1
- package/dist/vite/tempest-pwa-dev-sw.js +9 -16
- package/dist/vite/tempest-pwa-dev-sw.js.map +1 -1
- package/dist/vite/tempest-pwa-icons.cjs.map +1 -1
- package/dist/vite/tempest-pwa-icons.js.map +1 -1
- package/dist/vite/tempest-pwa-manifest.cjs.map +1 -1
- package/dist/vite/tempest-pwa-manifest.js.map +1 -1
- package/dist/vite/tempest-styles.cjs.map +1 -1
- package/dist/vite/tempest-styles.js.map +1 -1
- package/dist/vite/tempest-vitest.cjs.map +1 -1
- package/dist/vite/tempest-vitest.js.map +1 -1
- package/dist/webrtc/link-stats.cjs.map +1 -1
- package/dist/webrtc/link-stats.js.map +1 -1
- package/dist/webrtc/mesh-quality.cjs.map +1 -1
- package/dist/webrtc/mesh-quality.js.map +1 -1
- package/dist/webrtc/opus-sdp.cjs.map +1 -1
- package/dist/webrtc/opus-sdp.js.map +1 -1
- package/dist/webrtc/peer-link.cjs +1 -1
- package/dist/webrtc/peer-link.cjs.map +1 -1
- package/dist/webrtc/peer-link.js +2 -5
- package/dist/webrtc/peer-link.js.map +1 -1
- package/dist/webrtc/peer-mesh.cjs +1 -1
- package/dist/webrtc/peer-mesh.cjs.map +1 -1
- package/dist/webrtc/peer-mesh.js +8 -24
- package/dist/webrtc/peer-mesh.js.map +1 -1
- package/dist/webrtc/sender-bitrate.cjs.map +1 -1
- package/dist/webrtc/sender-bitrate.js.map +1 -1
- package/dist/webrtc/use-link-stats.cjs.map +1 -1
- package/dist/webrtc/use-link-stats.js.map +1 -1
- 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 +4 -22
- package/dist/ws/create-web-socket.js.map +1 -1
- package/dist/ws/resilience.cjs.map +1 -1
- package/dist/ws/resilience.js.map +1 -1
- package/dist/ws/use-web-socket.cjs.map +1 -1
- package/dist/ws/use-web-socket.js.map +1 -1
- package/package.json +9 -6
- package/template/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.cjs","names":[],"sources":["../../src/utils/functions.ts"],"sourcesContent":["/**\n * Create a trailing-edge debounced version of `fn`.\n *\n * The wrapped function delays invoking `fn` until `wait` milliseconds have\n * elapsed since the last time it was called. Only the latest arguments are\n * used. Call `.cancel()` to clear any pending invocation.\n *\n * @example\n * const save = debounce((q: string) => search(q), 300);\n * save(\"a\"); save(\"ab\"); save(\"abc\"); // only \"abc\" runs after 300ms\n * save.cancel(); // nothing runs\n */\nexport function debounce<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = (...args: A): void => {\n if (timer !== undefined) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n fn(...args);\n }, wait);\n };\n\n debounced.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return debounced;\n}\n\n/**\n * Create a throttled version of `fn` with leading and trailing edges.\n *\n * `fn` runs immediately on the first call (leading edge), then at most once\n * per `wait` milliseconds. If calls happen during the wait window, the last\n * one fires on the trailing edge. Call `.cancel()` to drop any pending\n * trailing call and reset the window.\n *\n * @example\n * const onScroll = throttle(() => render(), 200);\n * window.addEventListener(\"scroll\", onScroll);\n * onScroll.cancel();\n */\nexport function throttle<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastArgs: A | undefined;\n let lastInvoke = 0;\n\n const invoke = (args: A): void => {\n lastInvoke = Date.now();\n fn(...args);\n };\n\n const throttled = (...args: A): void => {\n const now = Date.now();\n const remaining = wait - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n invoke(args);\n } else {\n lastArgs = args;\n if (timer === undefined) {\n timer = setTimeout(() => {\n timer = undefined;\n if (lastArgs !== undefined) {\n const pending = lastArgs;\n lastArgs = undefined;\n invoke(pending);\n }\n }, remaining);\n }\n }\n };\n\n throttled.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n lastArgs = undefined;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n\n/**\n * Wrap `fn` so it runs at most once; subsequent calls return the cached result.\n *\n * @example\n * const init = once(() => expensiveSetup());\n * init(); // runs expensiveSetup()\n * init(); // returns the same cached result, no re-run\n */\nexport function once<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let called = false;\n let result: R;\n\n return (...args: A): R => {\n if (!called) {\n called = true;\n result = fn(...args);\n }\n return result;\n };\n}\n\n/**\n * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.\n *\n * If the next call has the same arguments (compared with `Object.is` per\n * position and equal length), the cached result is returned without re-running\n * `fn`. Any different argument list recomputes and replaces the cache.\n *\n * @example\n * const select = memoizeOne((a: number, b: number) => a + b);\n * select(1, 2); // computes 3\n * select(1, 2); // cached 3\n * select(2, 2); // recomputes 4\n */\nexport function memoizeOne<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let hasCache = false;\n let lastArgs: A;\n let lastResult: R;\n\n const sameArgs = (next: A): boolean => {\n if (!hasCache || next.length !== lastArgs.length) return false;\n for (let i = 0; i < next.length; i++) {\n if (!Object.is(next[i], lastArgs[i])) return false;\n }\n return true;\n };\n\n return (...args: A): R => {\n if (sameArgs(args)) return lastResult;\n lastArgs = args;\n lastResult = fn(...args);\n hasCache = true;\n return lastResult;\n };\n}\n"],"mappings":"AAYA,
|
|
1
|
+
{"version":3,"file":"functions.cjs","names":["debounce","timer","debounced","args","fn","wait","throttle","lastArgs","lastInvoke","invoke","throttled","remaining","pending","once","called","result","memoizeOne","hasCache","lastResult","sameArgs","next","i"],"sources":["../../src/utils/functions.ts"],"sourcesContent":["/**\n * Create a trailing-edge debounced version of `fn`.\n *\n * The wrapped function delays invoking `fn` until `wait` milliseconds have\n * elapsed since the last time it was called. Only the latest arguments are\n * used. Call `.cancel()` to clear any pending invocation.\n *\n * @example\n * const save = debounce((q: string) => search(q), 300);\n * save(\"a\"); save(\"ab\"); save(\"abc\"); // only \"abc\" runs after 300ms\n * save.cancel(); // nothing runs\n */\nexport function debounce<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = (...args: A): void => {\n if (timer !== undefined) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n fn(...args);\n }, wait);\n };\n\n debounced.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return debounced;\n}\n\n/**\n * Create a throttled version of `fn` with leading and trailing edges.\n *\n * `fn` runs immediately on the first call (leading edge), then at most once\n * per `wait` milliseconds. If calls happen during the wait window, the last\n * one fires on the trailing edge. Call `.cancel()` to drop any pending\n * trailing call and reset the window.\n *\n * @example\n * const onScroll = throttle(() => render(), 200);\n * window.addEventListener(\"scroll\", onScroll);\n * onScroll.cancel();\n */\nexport function throttle<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastArgs: A | undefined;\n let lastInvoke = 0;\n\n const invoke = (args: A): void => {\n lastInvoke = Date.now();\n fn(...args);\n };\n\n const throttled = (...args: A): void => {\n const now = Date.now();\n const remaining = wait - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n invoke(args);\n } else {\n lastArgs = args;\n if (timer === undefined) {\n timer = setTimeout(() => {\n timer = undefined;\n if (lastArgs !== undefined) {\n const pending = lastArgs;\n lastArgs = undefined;\n invoke(pending);\n }\n }, remaining);\n }\n }\n };\n\n throttled.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n lastArgs = undefined;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n\n/**\n * Wrap `fn` so it runs at most once; subsequent calls return the cached result.\n *\n * @example\n * const init = once(() => expensiveSetup());\n * init(); // runs expensiveSetup()\n * init(); // returns the same cached result, no re-run\n */\nexport function once<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let called = false;\n let result: R;\n\n return (...args: A): R => {\n if (!called) {\n called = true;\n result = fn(...args);\n }\n return result;\n };\n}\n\n/**\n * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.\n *\n * If the next call has the same arguments (compared with `Object.is` per\n * position and equal length), the cached result is returned without re-running\n * `fn`. Any different argument list recomputes and replaces the cache.\n *\n * @example\n * const select = memoizeOne((a: number, b: number) => a + b);\n * select(1, 2); // computes 3\n * select(1, 2); // cached 3\n * select(2, 2); // recomputes 4\n */\nexport function memoizeOne<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let hasCache = false;\n let lastArgs: A;\n let lastResult: R;\n\n const sameArgs = (next: A): boolean => {\n if (!hasCache || next.length !== lastArgs.length) return false;\n for (let i = 0; i < next.length; i++) {\n if (!Object.is(next[i], lastArgs[i])) return false;\n }\n return true;\n };\n\n return (...args: A): R => {\n if (sameArgs(args)) return lastResult;\n lastArgs = args;\n lastResult = fn(...args);\n hasCache = true;\n return lastResult;\n };\n}\n"],"mappings":"AAYA,SAAgBA,EACZ,EACA,EAC+C,CAC/C,IAAIC,EAEEC,GAAa,GAAGC,IAAkB,CAChCF,IAAU,IAAA,IAAW,aAAaA,CAAK,EAC3C,EAAQ,eAAiB,CACrB,EAAQ,IAAA,GACRG,EAAG,GAAGD,CAAI,CACd,EAAGE,CAAI,CACX,EASA,MAPA,GAAU,WAAqB,CACvBJ,IAAU,IAAA,KACV,aAAaA,CAAK,EAClB,EAAQ,IAAA,GAEhB,EAEOC,CACX,CAeA,SAAgBI,EACZ,EACA,EAC+C,CAC/C,IAAIL,EACAM,EACAC,EAAa,EAEXC,EAAU,GAAkB,CAC9B,EAAa,KAAK,IAAI,EACtBL,EAAG,GAAGD,CAAI,CACd,EAEMO,GAAa,GAAGP,IAAkB,CAEpC,IAAMQ,EAAYN,GADN,KAAK,IACS,EAAMG,GAE5BG,GAAa,GACTV,IAAU,IAAA,KACV,aAAaA,CAAK,EAClB,EAAQ,IAAA,IAEZQ,EAAON,CAAI,IAEX,EAAWA,EACPF,IAAU,IAAA,KACV,EAAQ,eAAiB,CAErB,GADA,EAAQ,IAAA,GACJM,IAAa,IAAA,GAAW,CACxB,IAAMK,EAAUL,EAChB,EAAW,IAAA,GACXE,EAAOG,CAAO,CAClB,CACJ,EAAGD,CAAS,GAGxB,EAWA,MATA,GAAU,WAAqB,CACvBV,IAAU,IAAA,KACV,aAAaA,CAAK,EAClB,EAAQ,IAAA,IAEZ,EAAW,IAAA,GACX,EAAa,CACjB,EAEOS,CACX,CAUA,SAAgBG,EAA6B,EAA0C,CACnF,IAAIC,EAAS,GACTC,EAEJ,OAAQ,GAAGZ,KACFW,IACD,EAAS,GACT,EAASV,EAAG,GAAGD,CAAI,GAEhBY,EAEf,CAeA,SAAgBC,EAAmC,EAA0C,CACzF,IAAIC,EAAW,GACXV,EACAW,EAEEC,EAAY,GAAqB,CACnC,GAAI,CAACF,GAAYG,EAAK,SAAWb,EAAS,OAAQ,MAAO,GACzD,IAAK,IAAIc,EAAI,EAAGA,EAAID,EAAK,OAAQ,IAC7B,GAAI,CAAC,OAAO,GAAGA,EAAKC,GAAId,EAASc,EAAE,EAAG,MAAO,GAEjD,MAAO,EACX,EAEA,OAAQ,GAAGlB,KACHgB,EAAShB,CAAI,IACjB,EAAWA,EACX,EAAaC,EAAG,GAAGD,CAAI,EACvB,EAAW,IACJe,EAEf,C"}
|
package/dist/utils/functions.js
CHANGED
|
@@ -35,7 +35,7 @@ function r(e) {
|
|
|
35
35
|
for (let t = 0; t < e.length; t++) if (!Object.is(e[t], n[t])) return !1;
|
|
36
36
|
return !0;
|
|
37
37
|
};
|
|
38
|
-
return (...a) => i(a)
|
|
38
|
+
return (...a) => (i(a) || (n = a, r = e(...a), t = !0), r);
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
41
|
export { e as debounce, r as memoizeOne, n as once, t as throttle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","names":[],"sources":["../../src/utils/functions.ts"],"sourcesContent":["/**\n * Create a trailing-edge debounced version of `fn`.\n *\n * The wrapped function delays invoking `fn` until `wait` milliseconds have\n * elapsed since the last time it was called. Only the latest arguments are\n * used. Call `.cancel()` to clear any pending invocation.\n *\n * @example\n * const save = debounce((q: string) => search(q), 300);\n * save(\"a\"); save(\"ab\"); save(\"abc\"); // only \"abc\" runs after 300ms\n * save.cancel(); // nothing runs\n */\nexport function debounce<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = (...args: A): void => {\n if (timer !== undefined) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n fn(...args);\n }, wait);\n };\n\n debounced.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return debounced;\n}\n\n/**\n * Create a throttled version of `fn` with leading and trailing edges.\n *\n * `fn` runs immediately on the first call (leading edge), then at most once\n * per `wait` milliseconds. If calls happen during the wait window, the last\n * one fires on the trailing edge. Call `.cancel()` to drop any pending\n * trailing call and reset the window.\n *\n * @example\n * const onScroll = throttle(() => render(), 200);\n * window.addEventListener(\"scroll\", onScroll);\n * onScroll.cancel();\n */\nexport function throttle<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastArgs: A | undefined;\n let lastInvoke = 0;\n\n const invoke = (args: A): void => {\n lastInvoke = Date.now();\n fn(...args);\n };\n\n const throttled = (...args: A): void => {\n const now = Date.now();\n const remaining = wait - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n invoke(args);\n } else {\n lastArgs = args;\n if (timer === undefined) {\n timer = setTimeout(() => {\n timer = undefined;\n if (lastArgs !== undefined) {\n const pending = lastArgs;\n lastArgs = undefined;\n invoke(pending);\n }\n }, remaining);\n }\n }\n };\n\n throttled.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n lastArgs = undefined;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n\n/**\n * Wrap `fn` so it runs at most once; subsequent calls return the cached result.\n *\n * @example\n * const init = once(() => expensiveSetup());\n * init(); // runs expensiveSetup()\n * init(); // returns the same cached result, no re-run\n */\nexport function once<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let called = false;\n let result: R;\n\n return (...args: A): R => {\n if (!called) {\n called = true;\n result = fn(...args);\n }\n return result;\n };\n}\n\n/**\n * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.\n *\n * If the next call has the same arguments (compared with `Object.is` per\n * position and equal length), the cached result is returned without re-running\n * `fn`. Any different argument list recomputes and replaces the cache.\n *\n * @example\n * const select = memoizeOne((a: number, b: number) => a + b);\n * select(1, 2); // computes 3\n * select(1, 2); // cached 3\n * select(2, 2); // recomputes 4\n */\nexport function memoizeOne<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let hasCache = false;\n let lastArgs: A;\n let lastResult: R;\n\n const sameArgs = (next: A): boolean => {\n if (!hasCache || next.length !== lastArgs.length) return false;\n for (let i = 0; i < next.length; i++) {\n if (!Object.is(next[i], lastArgs[i])) return false;\n }\n return true;\n };\n\n return (...args: A): R => {\n if (sameArgs(args)) return lastResult;\n lastArgs = args;\n lastResult = fn(...args);\n hasCache = true;\n return lastResult;\n };\n}\n"],"mappings":";AAYA,
|
|
1
|
+
{"version":3,"file":"functions.js","names":["debounce","timer","debounced","args","fn","wait","throttle","lastArgs","lastInvoke","invoke","throttled","remaining","pending","once","called","result","memoizeOne","hasCache","lastResult","sameArgs","next","i"],"sources":["../../src/utils/functions.ts"],"sourcesContent":["/**\n * Create a trailing-edge debounced version of `fn`.\n *\n * The wrapped function delays invoking `fn` until `wait` milliseconds have\n * elapsed since the last time it was called. Only the latest arguments are\n * used. Call `.cancel()` to clear any pending invocation.\n *\n * @example\n * const save = debounce((q: string) => search(q), 300);\n * save(\"a\"); save(\"ab\"); save(\"abc\"); // only \"abc\" runs after 300ms\n * save.cancel(); // nothing runs\n */\nexport function debounce<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = (...args: A): void => {\n if (timer !== undefined) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n fn(...args);\n }, wait);\n };\n\n debounced.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return debounced;\n}\n\n/**\n * Create a throttled version of `fn` with leading and trailing edges.\n *\n * `fn` runs immediately on the first call (leading edge), then at most once\n * per `wait` milliseconds. If calls happen during the wait window, the last\n * one fires on the trailing edge. Call `.cancel()` to drop any pending\n * trailing call and reset the window.\n *\n * @example\n * const onScroll = throttle(() => render(), 200);\n * window.addEventListener(\"scroll\", onScroll);\n * onScroll.cancel();\n */\nexport function throttle<A extends unknown[]>(\n fn: (...args: A) => void,\n wait: number,\n): ((...args: A) => void) & { cancel: () => void } {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastArgs: A | undefined;\n let lastInvoke = 0;\n\n const invoke = (args: A): void => {\n lastInvoke = Date.now();\n fn(...args);\n };\n\n const throttled = (...args: A): void => {\n const now = Date.now();\n const remaining = wait - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n invoke(args);\n } else {\n lastArgs = args;\n if (timer === undefined) {\n timer = setTimeout(() => {\n timer = undefined;\n if (lastArgs !== undefined) {\n const pending = lastArgs;\n lastArgs = undefined;\n invoke(pending);\n }\n }, remaining);\n }\n }\n };\n\n throttled.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n lastArgs = undefined;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n\n/**\n * Wrap `fn` so it runs at most once; subsequent calls return the cached result.\n *\n * @example\n * const init = once(() => expensiveSetup());\n * init(); // runs expensiveSetup()\n * init(); // returns the same cached result, no re-run\n */\nexport function once<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let called = false;\n let result: R;\n\n return (...args: A): R => {\n if (!called) {\n called = true;\n result = fn(...args);\n }\n return result;\n };\n}\n\n/**\n * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.\n *\n * If the next call has the same arguments (compared with `Object.is` per\n * position and equal length), the cached result is returned without re-running\n * `fn`. Any different argument list recomputes and replaces the cache.\n *\n * @example\n * const select = memoizeOne((a: number, b: number) => a + b);\n * select(1, 2); // computes 3\n * select(1, 2); // cached 3\n * select(2, 2); // recomputes 4\n */\nexport function memoizeOne<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R {\n let hasCache = false;\n let lastArgs: A;\n let lastResult: R;\n\n const sameArgs = (next: A): boolean => {\n if (!hasCache || next.length !== lastArgs.length) return false;\n for (let i = 0; i < next.length; i++) {\n if (!Object.is(next[i], lastArgs[i])) return false;\n }\n return true;\n };\n\n return (...args: A): R => {\n if (sameArgs(args)) return lastResult;\n lastArgs = args;\n lastResult = fn(...args);\n hasCache = true;\n return lastResult;\n };\n}\n"],"mappings":";AAYA,SAAgBA,EACZ,GACA,GAC+C;CAC/C,IAAIC,GAEEC,KAAa,GAAGC,MAAkB;EAEpC,AADIF,MAAU,KAAA,KAAW,aAAaA,CAAK,GAC3C,IAAQ,iBAAiB;GAErB,AADA,IAAQ,KAAA,GACRG,EAAG,GAAGD,CAAI;EACd,GAAGE,CAAI;CACX;CASA,OAPA,EAAU,eAAqB;EAC3B,AAAIJ,MAAU,KAAA,MACV,aAAaA,CAAK,GAClB,IAAQ,KAAA;CAEhB,GAEOC;AACX;AAeA,SAAgBI,EACZ,GACA,GAC+C;CAC/C,IAAIL,GACAM,GACAC,IAAa,GAEXC,KAAU,MAAkB;EAE9B,AADA,IAAa,KAAK,IAAI,GACtBL,EAAG,GAAGD,CAAI;CACd,GAEMO,KAAa,GAAGP,MAAkB;EAEpC,IAAMQ,IAAYN,KADN,KAAK,IACS,IAAMG;EAEhC,AAAIG,KAAa,KACTV,MAAU,KAAA,MACV,aAAaA,CAAK,GAClB,IAAQ,KAAA,IAEZQ,EAAON,CAAI,MAEX,IAAWA,GACPF,MAAU,KAAA,MACV,IAAQ,iBAAiB;GAErB,IADA,IAAQ,KAAA,GACJM,MAAa,KAAA,GAAW;IACxB,IAAMK,IAAUL;IAEhB,AADA,IAAW,KAAA,GACXE,EAAOG,CAAO;GAClB;EACJ,GAAGD,CAAS;CAGxB;CAWA,OATA,EAAU,eAAqB;EAM3B,AALIV,MAAU,KAAA,MACV,aAAaA,CAAK,GAClB,IAAQ,KAAA,IAEZ,IAAW,KAAA,GACX,IAAa;CACjB,GAEOS;AACX;AAUA,SAAgBG,EAA6B,GAA0C;CACnF,IAAIC,IAAS,IACTC;CAEJ,QAAQ,GAAGZ,OACFW,MACD,IAAS,IACT,IAASV,EAAG,GAAGD,CAAI,IAEhBY;AAEf;AAeA,SAAgBC,EAAmC,GAA0C;CACzF,IAAIC,IAAW,IACXV,GACAW,GAEEC,KAAY,MAAqB;EACnC,IAAI,CAACF,KAAYG,EAAK,WAAWb,EAAS,QAAQ,OAAO;EACzD,KAAK,IAAIc,IAAI,GAAGA,IAAID,EAAK,QAAQ,KAC7B,IAAI,CAAC,OAAO,GAAGA,EAAKC,IAAId,EAASc,EAAE,GAAG,OAAO;EAEjD,OAAO;CACX;CAEA,QAAQ,GAAGlB,OACHgB,EAAShB,CAAI,MACjB,IAAWA,GACX,IAAaC,EAAG,GAAGD,CAAI,GACvB,IAAW,KACJe;AAEf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.cjs","names":[],"sources":["../../src/utils/guards.ts"],"sourcesContent":["/**\n * Type guard asserting a value is neither `null` nor `undefined`.\n *\n * Useful for narrowing in `Array.prototype.filter` to drop nullish entries\n * while preserving the element type.\n *\n * @example\n * const xs: (number | null)[] = [1, null, 2];\n * const clean: number[] = xs.filter(isDefined); // [1, 2]\n */\nexport function isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Type guard asserting a value is a string primitive.\n *\n * @example\n * isString(\"hi\"); // true\n * isString(42); // false\n */\nexport function isString(value: unknown): value is string {\n return typeof value === \"string\";\n}\n\n/**\n * Type guard asserting a value is a number, excluding `NaN`.\n *\n * @example\n * isNumber(42); // true\n * isNumber(NaN); // false\n * isNumber(\"42\"); // false\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\n/**\n * Type guard asserting a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances —\n * only objects created from `{}` / `Object.create(null)` / object literals pass.\n *\n * @example\n * isPlainObject({ a: 1 }); // true\n * isPlainObject([]); // false\n * isPlainObject(null); // false\n * isPlainObject(new Date()); // false\n */\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Assert that a code path is unreachable, throwing at runtime if reached.\n *\n * Use in the `default` branch of an exhaustive `switch` so TypeScript flags any\n * unhandled union member at compile time and the runtime fails loudly if an\n * unexpected value slips through.\n *\n * @param value - The value that should be of type `never`.\n * @param message - Optional custom error message.\n * @throws {Error} Always.\n *\n * @example\n * type Shape = \"circle\" | \"square\";\n * function area(shape: Shape): number {\n * switch (shape) {\n * case \"circle\": return 1;\n * case \"square\": return 2;\n * default: return assertNever(shape);\n * }\n * }\n */\nexport function assertNever(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${String(value)}`);\n}\n"],"mappings":"AAUA,
|
|
1
|
+
{"version":3,"file":"guards.cjs","names":["isDefined","value","isString","isNumber","isPlainObject","proto","assertNever","message"],"sources":["../../src/utils/guards.ts"],"sourcesContent":["/**\n * Type guard asserting a value is neither `null` nor `undefined`.\n *\n * Useful for narrowing in `Array.prototype.filter` to drop nullish entries\n * while preserving the element type.\n *\n * @example\n * const xs: (number | null)[] = [1, null, 2];\n * const clean: number[] = xs.filter(isDefined); // [1, 2]\n */\nexport function isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Type guard asserting a value is a string primitive.\n *\n * @example\n * isString(\"hi\"); // true\n * isString(42); // false\n */\nexport function isString(value: unknown): value is string {\n return typeof value === \"string\";\n}\n\n/**\n * Type guard asserting a value is a number, excluding `NaN`.\n *\n * @example\n * isNumber(42); // true\n * isNumber(NaN); // false\n * isNumber(\"42\"); // false\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\n/**\n * Type guard asserting a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances —\n * only objects created from `{}` / `Object.create(null)` / object literals pass.\n *\n * @example\n * isPlainObject({ a: 1 }); // true\n * isPlainObject([]); // false\n * isPlainObject(null); // false\n * isPlainObject(new Date()); // false\n */\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Assert that a code path is unreachable, throwing at runtime if reached.\n *\n * Use in the `default` branch of an exhaustive `switch` so TypeScript flags any\n * unhandled union member at compile time and the runtime fails loudly if an\n * unexpected value slips through.\n *\n * @param value - The value that should be of type `never`.\n * @param message - Optional custom error message.\n * @throws {Error} Always.\n *\n * @example\n * type Shape = \"circle\" | \"square\";\n * function area(shape: Shape): number {\n * switch (shape) {\n * case \"circle\": return 1;\n * case \"square\": return 2;\n * default: return assertNever(shape);\n * }\n * }\n */\nexport function assertNever(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${String(value)}`);\n}\n"],"mappings":"AAUA,SAAgBA,EAAa,EAAyC,CAClE,OAAOC,GAAU,IACrB,CASA,SAAgBC,EAAS,EAAiC,CACtD,OAAO,OAAOD,GAAU,QAC5B,CAUA,SAAgBE,EAAS,EAAiC,CACtD,OAAO,OAAOF,GAAU,UAAY,CAAC,OAAO,MAAMA,CAAK,CAC3D,CAcA,SAAgBG,EAAc,EAAkD,CAC5E,GAAI,OAAOH,GAAU,WAAYA,EAAgB,MAAO,GACxD,IAAMI,EAAQ,OAAO,eAAeJ,CAAK,EACzC,OAAOI,IAAU,OAAO,WAAaA,IAAU,IACnD,CAuBA,SAAgBC,EAAY,EAAc,EAAyB,CAC/D,MAAU,MAAMC,GAAW,qBAAqB,OAAON,CAAK,GAAG,CACnE,C"}
|
package/dist/utils/guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","names":[],"sources":["../../src/utils/guards.ts"],"sourcesContent":["/**\n * Type guard asserting a value is neither `null` nor `undefined`.\n *\n * Useful for narrowing in `Array.prototype.filter` to drop nullish entries\n * while preserving the element type.\n *\n * @example\n * const xs: (number | null)[] = [1, null, 2];\n * const clean: number[] = xs.filter(isDefined); // [1, 2]\n */\nexport function isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Type guard asserting a value is a string primitive.\n *\n * @example\n * isString(\"hi\"); // true\n * isString(42); // false\n */\nexport function isString(value: unknown): value is string {\n return typeof value === \"string\";\n}\n\n/**\n * Type guard asserting a value is a number, excluding `NaN`.\n *\n * @example\n * isNumber(42); // true\n * isNumber(NaN); // false\n * isNumber(\"42\"); // false\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\n/**\n * Type guard asserting a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances —\n * only objects created from `{}` / `Object.create(null)` / object literals pass.\n *\n * @example\n * isPlainObject({ a: 1 }); // true\n * isPlainObject([]); // false\n * isPlainObject(null); // false\n * isPlainObject(new Date()); // false\n */\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Assert that a code path is unreachable, throwing at runtime if reached.\n *\n * Use in the `default` branch of an exhaustive `switch` so TypeScript flags any\n * unhandled union member at compile time and the runtime fails loudly if an\n * unexpected value slips through.\n *\n * @param value - The value that should be of type `never`.\n * @param message - Optional custom error message.\n * @throws {Error} Always.\n *\n * @example\n * type Shape = \"circle\" | \"square\";\n * function area(shape: Shape): number {\n * switch (shape) {\n * case \"circle\": return 1;\n * case \"square\": return 2;\n * default: return assertNever(shape);\n * }\n * }\n */\nexport function assertNever(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${String(value)}`);\n}\n"],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"guards.js","names":["isDefined","value","isString","isNumber","isPlainObject","proto","assertNever","message"],"sources":["../../src/utils/guards.ts"],"sourcesContent":["/**\n * Type guard asserting a value is neither `null` nor `undefined`.\n *\n * Useful for narrowing in `Array.prototype.filter` to drop nullish entries\n * while preserving the element type.\n *\n * @example\n * const xs: (number | null)[] = [1, null, 2];\n * const clean: number[] = xs.filter(isDefined); // [1, 2]\n */\nexport function isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Type guard asserting a value is a string primitive.\n *\n * @example\n * isString(\"hi\"); // true\n * isString(42); // false\n */\nexport function isString(value: unknown): value is string {\n return typeof value === \"string\";\n}\n\n/**\n * Type guard asserting a value is a number, excluding `NaN`.\n *\n * @example\n * isNumber(42); // true\n * isNumber(NaN); // false\n * isNumber(\"42\"); // false\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\n/**\n * Type guard asserting a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances —\n * only objects created from `{}` / `Object.create(null)` / object literals pass.\n *\n * @example\n * isPlainObject({ a: 1 }); // true\n * isPlainObject([]); // false\n * isPlainObject(null); // false\n * isPlainObject(new Date()); // false\n */\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Assert that a code path is unreachable, throwing at runtime if reached.\n *\n * Use in the `default` branch of an exhaustive `switch` so TypeScript flags any\n * unhandled union member at compile time and the runtime fails loudly if an\n * unexpected value slips through.\n *\n * @param value - The value that should be of type `never`.\n * @param message - Optional custom error message.\n * @throws {Error} Always.\n *\n * @example\n * type Shape = \"circle\" | \"square\";\n * function area(shape: Shape): number {\n * switch (shape) {\n * case \"circle\": return 1;\n * case \"square\": return 2;\n * default: return assertNever(shape);\n * }\n * }\n */\nexport function assertNever(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${String(value)}`);\n}\n"],"mappings":";AAUA,SAAgBA,EAAa,GAAyC;CAClE,OAAOC,KAAU;AACrB;AASA,SAAgBC,EAAS,GAAiC;CACtD,OAAO,OAAOD,KAAU;AAC5B;AAUA,SAAgBE,EAAS,GAAiC;CACtD,OAAO,OAAOF,KAAU,YAAY,CAAC,OAAO,MAAMA,CAAK;AAC3D;AAcA,SAAgBG,EAAc,GAAkD;CAC5E,IAAI,OAAOH,KAAU,aAAYA,GAAgB,OAAO;CACxD,IAAMI,IAAQ,OAAO,eAAeJ,CAAK;CACzC,OAAOI,MAAU,OAAO,aAAaA,MAAU;AACnD;AAuBA,SAAgBC,EAAY,GAAc,GAAyB;CAC/D,MAAU,MAAMC,KAAW,qBAAqB,OAAON,CAAK,GAAG;AACnE"}
|
package/dist/utils/ids.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.cjs","names":[],"sources":["../../src/utils/ids.ts"],"sourcesContent":["/**\n * Generate a collision-resistant id suitable for client-side UI keys.\n *\n * Uses `crypto.randomUUID()` when available, falling back to a\n * timestamp + `Math.random()` combination otherwise. When `prefix` is given,\n * the result is formatted as `${prefix}-${id}`.\n *\n * @example\n * randomId(); // \"9f1c2b3a-...\" (uuid) or \"lq3f8k-4a9z1\" (fallback)\n * randomId(\"user\"); // \"user-9f1c2b3a-...\"\n */\nexport function randomId(prefix?: string): string {\n let id: string;\n\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n id = crypto.randomUUID();\n } else {\n const time = Date.now().toString(36);\n const rand = Math.random().toString(36).slice(2, 10);\n id = `${time}-${rand}`;\n }\n\n return prefix ? `${prefix}-${id}` : id;\n}\n"],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"ids.cjs","names":["randomId","id","prefix"],"sources":["../../src/utils/ids.ts"],"sourcesContent":["/**\n * Generate a collision-resistant id suitable for client-side UI keys.\n *\n * Uses `crypto.randomUUID()` when available, falling back to a\n * timestamp + `Math.random()` combination otherwise. When `prefix` is given,\n * the result is formatted as `${prefix}-${id}`.\n *\n * @example\n * randomId(); // \"9f1c2b3a-...\" (uuid) or \"lq3f8k-4a9z1\" (fallback)\n * randomId(\"user\"); // \"user-9f1c2b3a-...\"\n */\nexport function randomId(prefix?: string): string {\n let id: string;\n\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n id = crypto.randomUUID();\n } else {\n const time = Date.now().toString(36);\n const rand = Math.random().toString(36).slice(2, 10);\n id = `${time}-${rand}`;\n }\n\n return prefix ? `${prefix}-${id}` : id;\n}\n"],"mappings":"AAWA,SAAgBA,EAAS,EAAyB,CAC9C,IAAIC,EAUJ,MARA,CAKIA,EALA,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WACzD,OAAO,WAAW,EAIlB,GAFQ,KAAK,IAAI,CAAC,CAAC,SAAS,EAEzB,EAAK,GADA,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAG,EACjC,IAGbC,EAAS,GAAGA,EAAO,GAAGD,IAAOA,CACxC,C"}
|
package/dist/utils/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","names":[],"sources":["../../src/utils/ids.ts"],"sourcesContent":["/**\n * Generate a collision-resistant id suitable for client-side UI keys.\n *\n * Uses `crypto.randomUUID()` when available, falling back to a\n * timestamp + `Math.random()` combination otherwise. When `prefix` is given,\n * the result is formatted as `${prefix}-${id}`.\n *\n * @example\n * randomId(); // \"9f1c2b3a-...\" (uuid) or \"lq3f8k-4a9z1\" (fallback)\n * randomId(\"user\"); // \"user-9f1c2b3a-...\"\n */\nexport function randomId(prefix?: string): string {\n let id: string;\n\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n id = crypto.randomUUID();\n } else {\n const time = Date.now().toString(36);\n const rand = Math.random().toString(36).slice(2, 10);\n id = `${time}-${rand}`;\n }\n\n return prefix ? `${prefix}-${id}` : id;\n}\n"],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"ids.js","names":["randomId","id","prefix"],"sources":["../../src/utils/ids.ts"],"sourcesContent":["/**\n * Generate a collision-resistant id suitable for client-side UI keys.\n *\n * Uses `crypto.randomUUID()` when available, falling back to a\n * timestamp + `Math.random()` combination otherwise. When `prefix` is given,\n * the result is formatted as `${prefix}-${id}`.\n *\n * @example\n * randomId(); // \"9f1c2b3a-...\" (uuid) or \"lq3f8k-4a9z1\" (fallback)\n * randomId(\"user\"); // \"user-9f1c2b3a-...\"\n */\nexport function randomId(prefix?: string): string {\n let id: string;\n\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n id = crypto.randomUUID();\n } else {\n const time = Date.now().toString(36);\n const rand = Math.random().toString(36).slice(2, 10);\n id = `${time}-${rand}`;\n }\n\n return prefix ? `${prefix}-${id}` : id;\n}\n"],"mappings":";AAWA,SAAgBA,EAAS,GAAyB;CAC9C,IAAIC;CAUJ,OARA,AAKIA,IALA,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,aACzD,OAAO,WAAW,IAIlB,GAFQ,KAAK,IAAI,CAAC,CAAC,SAAS,EAEzB,EAAK,GADA,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,GAAG,EACjC,KAGbC,IAAS,GAAGA,EAAO,GAAGD,MAAOA;AACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl-cache.cjs","names":[],"sources":["../../src/utils/intl-cache.ts"],"sourcesContent":["/**\n * Cached `Intl` formatter factories.\n *\n * Constructing an `Intl.NumberFormat` or `Intl.DateTimeFormat` resolves locale\n * data, which is the expensive half; formatting with one afterwards is cheap.\n * Building a fresh formatter per call is therefore the difference between a\n * table of money cells costing microseconds and costing a frame: measured at\n * 15.56 µs per construct-and-format against 0.29 µs when the formatter is\n * reused, so a 500 × 3 grid goes from 23.1 ms to 0.4 ms.\n *\n * The cache is keyed by locale plus the serialised options, so two call sites\n * asking for the same shape share one formatter. It is capped and cleared\n * wholesale when it overflows: a caller that varies its options per call (a\n * fraction-digit count driven by data, say) would otherwise grow the map without\n * bound, and dropping everything is both correct and cheaper than tracking\n * recency for a map this small.\n */\n\n/** Largest number of distinct formatter shapes kept before the cache resets. */\nconst MAX_ENTRIES = 64;\n\nconst numberFormats = new Map<string, Intl.NumberFormat>();\nconst dateTimeFormats = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * Build the cache key for a locale and options pair.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - The formatter options, or `undefined`.\n * @returns A string that is equal exactly when both inputs are equivalent.\n */\nfunction keyFor(locale: string | undefined, options: object | undefined): string {\n return `${locale ?? \"\"}|${options === undefined ? \"\" : JSON.stringify(options)}`;\n}\n\n/**\n * Get an `Intl.NumberFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.NumberFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function numberFormat(\n locale?: string,\n options?: Intl.NumberFormatOptions,\n): Intl.NumberFormat {\n const key = keyFor(locale, options);\n const hit = numberFormats.get(key);\n if (hit) return hit;\n if (numberFormats.size >= MAX_ENTRIES) numberFormats.clear();\n const formatter = new Intl.NumberFormat(locale, options);\n numberFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Get an `Intl.DateTimeFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.DateTimeFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function dateTimeFormat(\n locale?: string,\n options?: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n const key = keyFor(locale, options);\n const hit = dateTimeFormats.get(key);\n if (hit) return hit;\n if (dateTimeFormats.size >= MAX_ENTRIES) dateTimeFormats.clear();\n const formatter = new Intl.DateTimeFormat(locale, options);\n dateTimeFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Drop every cached formatter.\n *\n * Exists for tests that assert on cache behaviour; production code has no\n * reason to call it, because a formatter never goes stale.\n *\n * @returns Nothing.\n */\nexport function clearIntlCache(): void {\n numberFormats.clear();\n dateTimeFormats.clear();\n}\n"],"mappings":"AAmBA,
|
|
1
|
+
{"version":3,"file":"intl-cache.cjs","names":["numberFormats","dateTimeFormats","keyFor","locale","options","numberFormat","key","hit","formatter","dateTimeFormat"],"sources":["../../src/utils/intl-cache.ts"],"sourcesContent":["/**\n * Cached `Intl` formatter factories.\n *\n * Constructing an `Intl.NumberFormat` or `Intl.DateTimeFormat` resolves locale\n * data, which is the expensive half; formatting with one afterwards is cheap.\n * Building a fresh formatter per call is therefore the difference between a\n * table of money cells costing microseconds and costing a frame: measured at\n * 15.56 µs per construct-and-format against 0.29 µs when the formatter is\n * reused, so a 500 × 3 grid goes from 23.1 ms to 0.4 ms.\n *\n * The cache is keyed by locale plus the serialised options, so two call sites\n * asking for the same shape share one formatter. It is capped and cleared\n * wholesale when it overflows: a caller that varies its options per call (a\n * fraction-digit count driven by data, say) would otherwise grow the map without\n * bound, and dropping everything is both correct and cheaper than tracking\n * recency for a map this small.\n */\n\n/** Largest number of distinct formatter shapes kept before the cache resets. */\nconst MAX_ENTRIES = 64;\n\nconst numberFormats = new Map<string, Intl.NumberFormat>();\nconst dateTimeFormats = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * Build the cache key for a locale and options pair.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - The formatter options, or `undefined`.\n * @returns A string that is equal exactly when both inputs are equivalent.\n */\nfunction keyFor(locale: string | undefined, options: object | undefined): string {\n return `${locale ?? \"\"}|${options === undefined ? \"\" : JSON.stringify(options)}`;\n}\n\n/**\n * Get an `Intl.NumberFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.NumberFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function numberFormat(\n locale?: string,\n options?: Intl.NumberFormatOptions,\n): Intl.NumberFormat {\n const key = keyFor(locale, options);\n const hit = numberFormats.get(key);\n if (hit) return hit;\n if (numberFormats.size >= MAX_ENTRIES) numberFormats.clear();\n const formatter = new Intl.NumberFormat(locale, options);\n numberFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Get an `Intl.DateTimeFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.DateTimeFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function dateTimeFormat(\n locale?: string,\n options?: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n const key = keyFor(locale, options);\n const hit = dateTimeFormats.get(key);\n if (hit) return hit;\n if (dateTimeFormats.size >= MAX_ENTRIES) dateTimeFormats.clear();\n const formatter = new Intl.DateTimeFormat(locale, options);\n dateTimeFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Drop every cached formatter.\n *\n * Exists for tests that assert on cache behaviour; production code has no\n * reason to call it, because a formatter never goes stale.\n *\n * @returns Nothing.\n */\nexport function clearIntlCache(): void {\n numberFormats.clear();\n dateTimeFormats.clear();\n}\n"],"mappings":"AAmBA,IAEMA,EAAgB,IAAI,IACpBC,EAAkB,IAAI,IAS5B,SAASC,EAAO,EAA4B,EAAqC,CAC7E,MAAO,GAAGC,GAAU,GAAG,GAAGC,IAAY,IAAA,GAAY,GAAK,KAAK,UAAUA,CAAO,GACjF,CASA,SAAgBC,EACZ,EACA,EACiB,CACjB,IAAMC,EAAMJ,EAAOC,EAAQC,CAAO,EAC5BG,EAAMP,EAAc,IAAIM,CAAG,EACjC,GAAIC,EAAK,OAAOA,EACZP,EAAc,MAAQ,IAAaA,EAAc,MAAM,EAC3D,IAAMQ,EAAY,IAAI,KAAK,aAAaL,EAAQC,CAAO,EAEvD,OADAJ,EAAc,IAAIM,EAAKE,CAAS,EACzBA,CACX,CASA,SAAgBC,EACZ,EACA,EACmB,CACnB,IAAMH,EAAMJ,EAAOC,EAAQC,CAAO,EAC5BG,EAAMN,EAAgB,IAAIK,CAAG,EACnC,GAAIC,EAAK,OAAOA,EACZN,EAAgB,MAAQ,IAAaA,EAAgB,MAAM,EAC/D,IAAMO,EAAY,IAAI,KAAK,eAAeL,EAAQC,CAAO,EAEzD,OADAH,EAAgB,IAAIK,EAAKE,CAAS,EAC3BA,CACX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl-cache.js","names":[],"sources":["../../src/utils/intl-cache.ts"],"sourcesContent":["/**\n * Cached `Intl` formatter factories.\n *\n * Constructing an `Intl.NumberFormat` or `Intl.DateTimeFormat` resolves locale\n * data, which is the expensive half; formatting with one afterwards is cheap.\n * Building a fresh formatter per call is therefore the difference between a\n * table of money cells costing microseconds and costing a frame: measured at\n * 15.56 µs per construct-and-format against 0.29 µs when the formatter is\n * reused, so a 500 × 3 grid goes from 23.1 ms to 0.4 ms.\n *\n * The cache is keyed by locale plus the serialised options, so two call sites\n * asking for the same shape share one formatter. It is capped and cleared\n * wholesale when it overflows: a caller that varies its options per call (a\n * fraction-digit count driven by data, say) would otherwise grow the map without\n * bound, and dropping everything is both correct and cheaper than tracking\n * recency for a map this small.\n */\n\n/** Largest number of distinct formatter shapes kept before the cache resets. */\nconst MAX_ENTRIES = 64;\n\nconst numberFormats = new Map<string, Intl.NumberFormat>();\nconst dateTimeFormats = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * Build the cache key for a locale and options pair.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - The formatter options, or `undefined`.\n * @returns A string that is equal exactly when both inputs are equivalent.\n */\nfunction keyFor(locale: string | undefined, options: object | undefined): string {\n return `${locale ?? \"\"}|${options === undefined ? \"\" : JSON.stringify(options)}`;\n}\n\n/**\n * Get an `Intl.NumberFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.NumberFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function numberFormat(\n locale?: string,\n options?: Intl.NumberFormatOptions,\n): Intl.NumberFormat {\n const key = keyFor(locale, options);\n const hit = numberFormats.get(key);\n if (hit) return hit;\n if (numberFormats.size >= MAX_ENTRIES) numberFormats.clear();\n const formatter = new Intl.NumberFormat(locale, options);\n numberFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Get an `Intl.DateTimeFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.DateTimeFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function dateTimeFormat(\n locale?: string,\n options?: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n const key = keyFor(locale, options);\n const hit = dateTimeFormats.get(key);\n if (hit) return hit;\n if (dateTimeFormats.size >= MAX_ENTRIES) dateTimeFormats.clear();\n const formatter = new Intl.DateTimeFormat(locale, options);\n dateTimeFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Drop every cached formatter.\n *\n * Exists for tests that assert on cache behaviour; production code has no\n * reason to call it, because a formatter never goes stale.\n *\n * @returns Nothing.\n */\nexport function clearIntlCache(): void {\n numberFormats.clear();\n dateTimeFormats.clear();\n}\n"],"mappings":";AAmBA,
|
|
1
|
+
{"version":3,"file":"intl-cache.js","names":["numberFormats","dateTimeFormats","keyFor","locale","options","numberFormat","key","hit","formatter","dateTimeFormat"],"sources":["../../src/utils/intl-cache.ts"],"sourcesContent":["/**\n * Cached `Intl` formatter factories.\n *\n * Constructing an `Intl.NumberFormat` or `Intl.DateTimeFormat` resolves locale\n * data, which is the expensive half; formatting with one afterwards is cheap.\n * Building a fresh formatter per call is therefore the difference between a\n * table of money cells costing microseconds and costing a frame: measured at\n * 15.56 µs per construct-and-format against 0.29 µs when the formatter is\n * reused, so a 500 × 3 grid goes from 23.1 ms to 0.4 ms.\n *\n * The cache is keyed by locale plus the serialised options, so two call sites\n * asking for the same shape share one formatter. It is capped and cleared\n * wholesale when it overflows: a caller that varies its options per call (a\n * fraction-digit count driven by data, say) would otherwise grow the map without\n * bound, and dropping everything is both correct and cheaper than tracking\n * recency for a map this small.\n */\n\n/** Largest number of distinct formatter shapes kept before the cache resets. */\nconst MAX_ENTRIES = 64;\n\nconst numberFormats = new Map<string, Intl.NumberFormat>();\nconst dateTimeFormats = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * Build the cache key for a locale and options pair.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - The formatter options, or `undefined`.\n * @returns A string that is equal exactly when both inputs are equivalent.\n */\nfunction keyFor(locale: string | undefined, options: object | undefined): string {\n return `${locale ?? \"\"}|${options === undefined ? \"\" : JSON.stringify(options)}`;\n}\n\n/**\n * Get an `Intl.NumberFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.NumberFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function numberFormat(\n locale?: string,\n options?: Intl.NumberFormatOptions,\n): Intl.NumberFormat {\n const key = keyFor(locale, options);\n const hit = numberFormats.get(key);\n if (hit) return hit;\n if (numberFormats.size >= MAX_ENTRIES) numberFormats.clear();\n const formatter = new Intl.NumberFormat(locale, options);\n numberFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Get an `Intl.DateTimeFormat`, reusing one already built for the same shape.\n *\n * @param locale - The BCP 47 locale, or `undefined` for the runtime default.\n * @param options - Standard `Intl.DateTimeFormat` options.\n * @returns A formatter that must not be mutated by the caller.\n */\nexport function dateTimeFormat(\n locale?: string,\n options?: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n const key = keyFor(locale, options);\n const hit = dateTimeFormats.get(key);\n if (hit) return hit;\n if (dateTimeFormats.size >= MAX_ENTRIES) dateTimeFormats.clear();\n const formatter = new Intl.DateTimeFormat(locale, options);\n dateTimeFormats.set(key, formatter);\n return formatter;\n}\n\n/**\n * Drop every cached formatter.\n *\n * Exists for tests that assert on cache behaviour; production code has no\n * reason to call it, because a formatter never goes stale.\n *\n * @returns Nothing.\n */\nexport function clearIntlCache(): void {\n numberFormats.clear();\n dateTimeFormats.clear();\n}\n"],"mappings":";AAmBA,IAEMA,oBAAgB,IAAI,IAA+B,GACnDC,oBAAkB,IAAI,IAAiC;AAS7D,SAASC,EAAO,GAA4B,GAAqC;CAC7E,OAAO,GAAGC,KAAU,GAAG,GAAGC,MAAY,KAAA,IAAY,KAAK,KAAK,UAAUA,CAAO;AACjF;AASA,SAAgBC,EACZ,GACA,GACiB;CACjB,IAAMC,IAAMJ,EAAOC,GAAQC,CAAO,GAC5BG,IAAMP,EAAc,IAAIM,CAAG;CACjC,IAAIC,GAAK,OAAOA;CAChB,AAAIP,EAAc,QAAQ,MAAaA,EAAc,MAAM;CAC3D,IAAMQ,IAAY,IAAI,KAAK,aAAaL,GAAQC,CAAO;CAEvD,OADAJ,EAAc,IAAIM,GAAKE,CAAS,GACzBA;AACX;AASA,SAAgBC,EACZ,GACA,GACmB;CACnB,IAAMH,IAAMJ,EAAOC,GAAQC,CAAO,GAC5BG,IAAMN,EAAgB,IAAIK,CAAG;CACnC,IAAIC,GAAK,OAAOA;CAChB,AAAIN,EAAgB,QAAQ,MAAaA,EAAgB,MAAM;CAC/D,IAAMO,IAAY,IAAI,KAAK,eAAeL,GAAQC,CAAO;CAEzD,OADAH,EAAgB,IAAIK,GAAKE,CAAS,GAC3BA;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-frame.cjs","names":[],"sources":["../../src/utils/json-frame.ts"],"sourcesContent":["import { isDevBuild } from \"./dev-mode\";\nimport { validateWithSchema, type SchemaIssue, type SchemaLike } from \"./schema-like\";\n\n/**\n * The one decoder behind `createWebSocket`, `useWebSocket` and\n * `createEventStream`.\n *\n * Internal, and imported by path rather than through the `utils` barrel: it\n * exists so the three transports share one answer to \"the frame is not JSON\",\n * not so consumers can call it.\n *\n * That question used to have three identical copies of the same wrong answer —\n * `return raw as unknown as T`, which hands the consumer a `string` announced as\n * `T`. The failure never surfaced at the parse; it surfaced later, on the first\n * `message.id`, with nothing left to say the frame had not been JSON.\n */\n\n/** Outcome of decoding one frame. */\nexport interface DecodedFrame<T> {\n /** Whether the message should reach `onMessage`. */\n delivered: boolean;\n /** The decoded payload. Only meaningful when `delivered` is `true`. */\n data: T;\n}\n\n/** How one frame should be turned into `T`, and who hears about failures. */\nexport interface DecodeFrameOptions<T> {\n /** Caller-supplied decoder, which owns the frame completely. */\n parser?: (raw: string) => T;\n /** Caller-supplied handler for a frame that is not valid JSON. */\n onParseError?: (error: unknown, raw: string) => void;\n /** Caller-supplied schema the decoded payload must satisfy. */\n schema?: SchemaLike<T>;\n /** Caller-supplied handler for a payload the schema refused. */\n onValidationError?: (issues: SchemaIssue[], raw: string) => void;\n}\n\nconst warned = new Set<string>();\n\n/**\n * Warn once per transport that a frame arrived which was not JSON.\n *\n * Once, because a stream sending text frames sends many, and a console line per\n * frame buries the one that mattered. Development builds only.\n *\n * @param transport - Label used in the message, e.g. `\"createWebSocket\"`.\n * @returns Nothing.\n */\nfunction warnOnce(transport: string): void {\n if (!isDevBuild() || warned.has(transport)) return;\n warned.add(transport);\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame was not valid JSON, so the raw string is ` +\n `being delivered as if it were your message type. Pass \\`parser\\` to decode it, or ` +\n `\\`onParseError\\` to drop it and handle the failure. This warning appears once.`,\n );\n}\n\n/**\n * Warn once per transport that a frame was dropped by the schema.\n *\n * A dropped frame with no `onValidationError` is otherwise completely silent —\n * the stream looks healthy and the payload simply never arrives, which is the\n * hardest shape of failure to notice. Development builds only, once, for the\n * same reason as {@link warnOnce}.\n *\n * @param transport - Label used in the message, e.g. `\"createEventStream\"`.\n * @param issues - The issues the schema reported, summarized into the message.\n * @returns Nothing.\n */\nfunction warnValidationOnce(transport: string, issues: SchemaIssue[]): void {\n const key = `${transport}:schema`;\n if (!isDevBuild() || warned.has(key)) return;\n warned.add(key);\n const summary = issues.map((issue) => `${issue.path}: ${issue.message}`).join(\"; \");\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame did not match \\`schema\\` and was dropped ` +\n `(${summary}). Pass \\`onValidationError\\` to handle it yourself. This warning ` +\n `appears once.`,\n );\n}\n\n/**\n * Decode one frame, reporting whether it should be delivered.\n *\n * A caller-supplied `parser` owns the frame completely: its result is delivered\n * as it is, or validated when a `schema` was also supplied — decoding text,\n * binary-as-base64 or a protocol of its own is the point of that option.\n *\n * Without one, the frame is parsed as JSON. When that throws:\n *\n * - with `onParseError`, the callback fires and the frame is **not** delivered,\n * because a consumer that asked to hear about failures did not ask to also\n * receive the broken frame;\n * - with `schema` and no `onParseError`, the raw string goes to the schema,\n * which refuses it — a caller who asked for validation never receives an\n * unvalidated payload, and a frame the server sent empty is exactly this case;\n * - with neither, the raw string is delivered as `T` — the behaviour every\n * version before this one had, kept so nothing breaks — and development builds\n * warn once that it happened.\n *\n * With a `schema`, a payload the schema refuses is not delivered, and\n * `onValidationError` hears the issues. The value delivered is the schema's\n * **output**, so a schema that coerces or defaults is honoured.\n *\n * @param raw - The frame body as text.\n * @param transport - Label used in the development warnings.\n * @param options - Caller-supplied decoder, schema and failure handlers.\n * @returns Whether to deliver, and the payload.\n */\nexport function decodeFrame<T>(\n raw: string,\n transport: string,\n options: DecodeFrameOptions<T>,\n): DecodedFrame<T> {\n const { parser, onParseError, schema, onValidationError } = options;\n\n /**\n * Put one decoded payload through the schema, when there is one.\n *\n * @param value - The payload as parsing produced it.\n * @returns Whether to deliver, and the payload the consumer should see.\n */\n function gate(value: unknown): DecodedFrame<T> {\n if (!schema) return { delivered: true, data: value as T };\n const result = validateWithSchema(schema, value);\n if (result.ok) return { delivered: true, data: result.data };\n if (onValidationError) onValidationError(result.issues, raw);\n else warnValidationOnce(transport, result.issues);\n return { delivered: false, data: undefined as T };\n }\n\n if (parser) return gate(parser(raw));\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error) {\n if (onParseError) {\n onParseError(error, raw);\n return { delivered: false, data: undefined as T };\n }\n if (schema) return gate(raw);\n warnOnce(transport);\n return { delivered: true, data: raw as unknown as T };\n }\n return gate(parsed);\n}\n\n/**\n * Forget which transports have already warned.\n *\n * Exists for tests, which would otherwise see the first case swallow the\n * warning for every case after it.\n *\n * @returns Nothing.\n */\nexport function resetFrameWarnings(): void {\n warned.clear();\n}\n"],"mappings":"iEAqCA,
|
|
1
|
+
{"version":3,"file":"json-frame.cjs","names":["isDevBuild","validateWithSchema","require_dev_mode","require_schema_like","warned","warnOnce","transport","warnValidationOnce","key","summary","issues","issue","decodeFrame","options","gate","schema","value","result","onValidationError","raw","parser","parsed","error","onParseError"],"sources":["../../src/utils/json-frame.ts"],"sourcesContent":["import { isDevBuild } from \"./dev-mode\";\nimport { validateWithSchema, type SchemaIssue, type SchemaLike } from \"./schema-like\";\n\n/**\n * The one decoder behind `createWebSocket`, `useWebSocket` and\n * `createEventStream`.\n *\n * Internal, and imported by path rather than through the `utils` barrel: it\n * exists so the three transports share one answer to \"the frame is not JSON\",\n * not so consumers can call it.\n *\n * That question used to have three identical copies of the same wrong answer —\n * `return raw as unknown as T`, which hands the consumer a `string` announced as\n * `T`. The failure never surfaced at the parse; it surfaced later, on the first\n * `message.id`, with nothing left to say the frame had not been JSON.\n */\n\n/** Outcome of decoding one frame. */\nexport interface DecodedFrame<T> {\n /** Whether the message should reach `onMessage`. */\n delivered: boolean;\n /** The decoded payload. Only meaningful when `delivered` is `true`. */\n data: T;\n}\n\n/** How one frame should be turned into `T`, and who hears about failures. */\nexport interface DecodeFrameOptions<T> {\n /** Caller-supplied decoder, which owns the frame completely. */\n parser?: (raw: string) => T;\n /** Caller-supplied handler for a frame that is not valid JSON. */\n onParseError?: (error: unknown, raw: string) => void;\n /** Caller-supplied schema the decoded payload must satisfy. */\n schema?: SchemaLike<T>;\n /** Caller-supplied handler for a payload the schema refused. */\n onValidationError?: (issues: SchemaIssue[], raw: string) => void;\n}\n\nconst warned = new Set<string>();\n\n/**\n * Warn once per transport that a frame arrived which was not JSON.\n *\n * Once, because a stream sending text frames sends many, and a console line per\n * frame buries the one that mattered. Development builds only.\n *\n * @param transport - Label used in the message, e.g. `\"createWebSocket\"`.\n * @returns Nothing.\n */\nfunction warnOnce(transport: string): void {\n if (!isDevBuild() || warned.has(transport)) return;\n warned.add(transport);\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame was not valid JSON, so the raw string is ` +\n `being delivered as if it were your message type. Pass \\`parser\\` to decode it, or ` +\n `\\`onParseError\\` to drop it and handle the failure. This warning appears once.`,\n );\n}\n\n/**\n * Warn once per transport that a frame was dropped by the schema.\n *\n * A dropped frame with no `onValidationError` is otherwise completely silent —\n * the stream looks healthy and the payload simply never arrives, which is the\n * hardest shape of failure to notice. Development builds only, once, for the\n * same reason as {@link warnOnce}.\n *\n * @param transport - Label used in the message, e.g. `\"createEventStream\"`.\n * @param issues - The issues the schema reported, summarized into the message.\n * @returns Nothing.\n */\nfunction warnValidationOnce(transport: string, issues: SchemaIssue[]): void {\n const key = `${transport}:schema`;\n if (!isDevBuild() || warned.has(key)) return;\n warned.add(key);\n const summary = issues.map((issue) => `${issue.path}: ${issue.message}`).join(\"; \");\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame did not match \\`schema\\` and was dropped ` +\n `(${summary}). Pass \\`onValidationError\\` to handle it yourself. This warning ` +\n `appears once.`,\n );\n}\n\n/**\n * Decode one frame, reporting whether it should be delivered.\n *\n * A caller-supplied `parser` owns the frame completely: its result is delivered\n * as it is, or validated when a `schema` was also supplied — decoding text,\n * binary-as-base64 or a protocol of its own is the point of that option.\n *\n * Without one, the frame is parsed as JSON. When that throws:\n *\n * - with `onParseError`, the callback fires and the frame is **not** delivered,\n * because a consumer that asked to hear about failures did not ask to also\n * receive the broken frame;\n * - with `schema` and no `onParseError`, the raw string goes to the schema,\n * which refuses it — a caller who asked for validation never receives an\n * unvalidated payload, and a frame the server sent empty is exactly this case;\n * - with neither, the raw string is delivered as `T` — the behaviour every\n * version before this one had, kept so nothing breaks — and development builds\n * warn once that it happened.\n *\n * With a `schema`, a payload the schema refuses is not delivered, and\n * `onValidationError` hears the issues. The value delivered is the schema's\n * **output**, so a schema that coerces or defaults is honoured.\n *\n * @param raw - The frame body as text.\n * @param transport - Label used in the development warnings.\n * @param options - Caller-supplied decoder, schema and failure handlers.\n * @returns Whether to deliver, and the payload.\n */\nexport function decodeFrame<T>(\n raw: string,\n transport: string,\n options: DecodeFrameOptions<T>,\n): DecodedFrame<T> {\n const { parser, onParseError, schema, onValidationError } = options;\n\n /**\n * Put one decoded payload through the schema, when there is one.\n *\n * @param value - The payload as parsing produced it.\n * @returns Whether to deliver, and the payload the consumer should see.\n */\n function gate(value: unknown): DecodedFrame<T> {\n if (!schema) return { delivered: true, data: value as T };\n const result = validateWithSchema(schema, value);\n if (result.ok) return { delivered: true, data: result.data };\n if (onValidationError) onValidationError(result.issues, raw);\n else warnValidationOnce(transport, result.issues);\n return { delivered: false, data: undefined as T };\n }\n\n if (parser) return gate(parser(raw));\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error) {\n if (onParseError) {\n onParseError(error, raw);\n return { delivered: false, data: undefined as T };\n }\n if (schema) return gate(raw);\n warnOnce(transport);\n return { delivered: true, data: raw as unknown as T };\n }\n return gate(parsed);\n}\n\n/**\n * Forget which transports have already warned.\n *\n * Exists for tests, which would otherwise see the first case swallow the\n * warning for every case after it.\n *\n * @returns Nothing.\n */\nexport function resetFrameWarnings(): void {\n warned.clear();\n}\n"],"mappings":"A,iEAqCA,IAAMI,EAAS,IAAI,IAWnB,SAASC,EAAS,EAAyB,CAClCL,EAAAA,WAAW,GAAK,GAAO,IAAIM,CAAS,IACzCF,EAAO,IAAIE,CAAS,EACpB,QAAQ,KACJ,uBAAuBA,EAAU,oNAGrC,EACJ,CAcA,SAASC,EAAmB,EAAmB,EAA6B,CACxE,IAAMC,EAAM,GAAGF,EAAU,SACzB,GAAI,CAACN,EAAAA,WAAW,GAAKI,EAAO,IAAII,CAAG,EAAG,OACtCJ,EAAO,IAAII,CAAG,EACd,IAAMC,EAAUC,EAAO,IAAK,GAAU,GAAGC,EAAM,KAAK,IAAIA,EAAM,SAAS,CAAC,CAAC,KAAK,IAAI,EAClF,QAAQ,KACJ,uBAAuBL,EAAU,sDACzBG,EAAQ,gFAEpB,CACJ,CA8BA,SAAgBG,EACZ,EACA,EACA,EACe,CACf,GAAM,CAAE,SAAQ,eAAc,SAAQ,qBAAsBC,EAQ5D,SAASC,EAAK,EAAiC,CAC3C,GAAI,CAACC,EAAQ,MAAO,CAAE,UAAW,GAAM,KAAMC,CAAW,EACxD,IAAMC,EAAShB,EAAAA,mBAAmBc,EAAQC,CAAK,EAI/C,OAHIC,EAAO,GAAW,CAAE,UAAW,GAAM,KAAMA,EAAO,IAAK,GACvDC,EAAmBA,EAAkBD,EAAO,OAAQE,CAAG,EACtDZ,EAAmBD,EAAWW,EAAO,MAAM,EACzC,CAAE,UAAW,GAAO,KAAM,IAAA,EAAe,EACpD,CAEA,GAAIG,EAAQ,OAAON,EAAKM,EAAOD,CAAG,CAAC,EACnC,IAAIE,EACJ,GAAI,CACA,EAAS,KAAK,MAAMF,CAAG,CAC3B,OAASG,EAAO,CAOZ,OANIC,GACAA,EAAaD,EAAOH,CAAG,EAChB,CAAE,UAAW,GAAO,KAAM,IAAA,EAAe,GAEhDJ,EAAeD,EAAKK,CAAG,GAC3Bd,EAASC,CAAS,EACX,CAAE,UAAW,GAAM,KAAMa,CAAoB,EACxD,CACA,OAAOL,EAAKO,CAAM,CACtB,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-frame.js","names":[],"sources":["../../src/utils/json-frame.ts"],"sourcesContent":["import { isDevBuild } from \"./dev-mode\";\nimport { validateWithSchema, type SchemaIssue, type SchemaLike } from \"./schema-like\";\n\n/**\n * The one decoder behind `createWebSocket`, `useWebSocket` and\n * `createEventStream`.\n *\n * Internal, and imported by path rather than through the `utils` barrel: it\n * exists so the three transports share one answer to \"the frame is not JSON\",\n * not so consumers can call it.\n *\n * That question used to have three identical copies of the same wrong answer —\n * `return raw as unknown as T`, which hands the consumer a `string` announced as\n * `T`. The failure never surfaced at the parse; it surfaced later, on the first\n * `message.id`, with nothing left to say the frame had not been JSON.\n */\n\n/** Outcome of decoding one frame. */\nexport interface DecodedFrame<T> {\n /** Whether the message should reach `onMessage`. */\n delivered: boolean;\n /** The decoded payload. Only meaningful when `delivered` is `true`. */\n data: T;\n}\n\n/** How one frame should be turned into `T`, and who hears about failures. */\nexport interface DecodeFrameOptions<T> {\n /** Caller-supplied decoder, which owns the frame completely. */\n parser?: (raw: string) => T;\n /** Caller-supplied handler for a frame that is not valid JSON. */\n onParseError?: (error: unknown, raw: string) => void;\n /** Caller-supplied schema the decoded payload must satisfy. */\n schema?: SchemaLike<T>;\n /** Caller-supplied handler for a payload the schema refused. */\n onValidationError?: (issues: SchemaIssue[], raw: string) => void;\n}\n\nconst warned = new Set<string>();\n\n/**\n * Warn once per transport that a frame arrived which was not JSON.\n *\n * Once, because a stream sending text frames sends many, and a console line per\n * frame buries the one that mattered. Development builds only.\n *\n * @param transport - Label used in the message, e.g. `\"createWebSocket\"`.\n * @returns Nothing.\n */\nfunction warnOnce(transport: string): void {\n if (!isDevBuild() || warned.has(transport)) return;\n warned.add(transport);\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame was not valid JSON, so the raw string is ` +\n `being delivered as if it were your message type. Pass \\`parser\\` to decode it, or ` +\n `\\`onParseError\\` to drop it and handle the failure. This warning appears once.`,\n );\n}\n\n/**\n * Warn once per transport that a frame was dropped by the schema.\n *\n * A dropped frame with no `onValidationError` is otherwise completely silent —\n * the stream looks healthy and the payload simply never arrives, which is the\n * hardest shape of failure to notice. Development builds only, once, for the\n * same reason as {@link warnOnce}.\n *\n * @param transport - Label used in the message, e.g. `\"createEventStream\"`.\n * @param issues - The issues the schema reported, summarized into the message.\n * @returns Nothing.\n */\nfunction warnValidationOnce(transport: string, issues: SchemaIssue[]): void {\n const key = `${transport}:schema`;\n if (!isDevBuild() || warned.has(key)) return;\n warned.add(key);\n const summary = issues.map((issue) => `${issue.path}: ${issue.message}`).join(\"; \");\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame did not match \\`schema\\` and was dropped ` +\n `(${summary}). Pass \\`onValidationError\\` to handle it yourself. This warning ` +\n `appears once.`,\n );\n}\n\n/**\n * Decode one frame, reporting whether it should be delivered.\n *\n * A caller-supplied `parser` owns the frame completely: its result is delivered\n * as it is, or validated when a `schema` was also supplied — decoding text,\n * binary-as-base64 or a protocol of its own is the point of that option.\n *\n * Without one, the frame is parsed as JSON. When that throws:\n *\n * - with `onParseError`, the callback fires and the frame is **not** delivered,\n * because a consumer that asked to hear about failures did not ask to also\n * receive the broken frame;\n * - with `schema` and no `onParseError`, the raw string goes to the schema,\n * which refuses it — a caller who asked for validation never receives an\n * unvalidated payload, and a frame the server sent empty is exactly this case;\n * - with neither, the raw string is delivered as `T` — the behaviour every\n * version before this one had, kept so nothing breaks — and development builds\n * warn once that it happened.\n *\n * With a `schema`, a payload the schema refuses is not delivered, and\n * `onValidationError` hears the issues. The value delivered is the schema's\n * **output**, so a schema that coerces or defaults is honoured.\n *\n * @param raw - The frame body as text.\n * @param transport - Label used in the development warnings.\n * @param options - Caller-supplied decoder, schema and failure handlers.\n * @returns Whether to deliver, and the payload.\n */\nexport function decodeFrame<T>(\n raw: string,\n transport: string,\n options: DecodeFrameOptions<T>,\n): DecodedFrame<T> {\n const { parser, onParseError, schema, onValidationError } = options;\n\n /**\n * Put one decoded payload through the schema, when there is one.\n *\n * @param value - The payload as parsing produced it.\n * @returns Whether to deliver, and the payload the consumer should see.\n */\n function gate(value: unknown): DecodedFrame<T> {\n if (!schema) return { delivered: true, data: value as T };\n const result = validateWithSchema(schema, value);\n if (result.ok) return { delivered: true, data: result.data };\n if (onValidationError) onValidationError(result.issues, raw);\n else warnValidationOnce(transport, result.issues);\n return { delivered: false, data: undefined as T };\n }\n\n if (parser) return gate(parser(raw));\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error) {\n if (onParseError) {\n onParseError(error, raw);\n return { delivered: false, data: undefined as T };\n }\n if (schema) return gate(raw);\n warnOnce(transport);\n return { delivered: true, data: raw as unknown as T };\n }\n return gate(parsed);\n}\n\n/**\n * Forget which transports have already warned.\n *\n * Exists for tests, which would otherwise see the first case swallow the\n * warning for every case after it.\n *\n * @returns Nothing.\n */\nexport function resetFrameWarnings(): void {\n warned.clear();\n}\n"],"mappings":";;;AAqCA,
|
|
1
|
+
{"version":3,"file":"json-frame.js","names":["warned","warnOnce","isDevBuild","transport","warnValidationOnce","key","summary","issues","issue","decodeFrame","options","gate","schema","value","result","validateWithSchema","onValidationError","raw","parser","parsed","error","onParseError"],"sources":["../../src/utils/json-frame.ts"],"sourcesContent":["import { isDevBuild } from \"./dev-mode\";\nimport { validateWithSchema, type SchemaIssue, type SchemaLike } from \"./schema-like\";\n\n/**\n * The one decoder behind `createWebSocket`, `useWebSocket` and\n * `createEventStream`.\n *\n * Internal, and imported by path rather than through the `utils` barrel: it\n * exists so the three transports share one answer to \"the frame is not JSON\",\n * not so consumers can call it.\n *\n * That question used to have three identical copies of the same wrong answer —\n * `return raw as unknown as T`, which hands the consumer a `string` announced as\n * `T`. The failure never surfaced at the parse; it surfaced later, on the first\n * `message.id`, with nothing left to say the frame had not been JSON.\n */\n\n/** Outcome of decoding one frame. */\nexport interface DecodedFrame<T> {\n /** Whether the message should reach `onMessage`. */\n delivered: boolean;\n /** The decoded payload. Only meaningful when `delivered` is `true`. */\n data: T;\n}\n\n/** How one frame should be turned into `T`, and who hears about failures. */\nexport interface DecodeFrameOptions<T> {\n /** Caller-supplied decoder, which owns the frame completely. */\n parser?: (raw: string) => T;\n /** Caller-supplied handler for a frame that is not valid JSON. */\n onParseError?: (error: unknown, raw: string) => void;\n /** Caller-supplied schema the decoded payload must satisfy. */\n schema?: SchemaLike<T>;\n /** Caller-supplied handler for a payload the schema refused. */\n onValidationError?: (issues: SchemaIssue[], raw: string) => void;\n}\n\nconst warned = new Set<string>();\n\n/**\n * Warn once per transport that a frame arrived which was not JSON.\n *\n * Once, because a stream sending text frames sends many, and a console line per\n * frame buries the one that mattered. Development builds only.\n *\n * @param transport - Label used in the message, e.g. `\"createWebSocket\"`.\n * @returns Nothing.\n */\nfunction warnOnce(transport: string): void {\n if (!isDevBuild() || warned.has(transport)) return;\n warned.add(transport);\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame was not valid JSON, so the raw string is ` +\n `being delivered as if it were your message type. Pass \\`parser\\` to decode it, or ` +\n `\\`onParseError\\` to drop it and handle the failure. This warning appears once.`,\n );\n}\n\n/**\n * Warn once per transport that a frame was dropped by the schema.\n *\n * A dropped frame with no `onValidationError` is otherwise completely silent —\n * the stream looks healthy and the payload simply never arrives, which is the\n * hardest shape of failure to notice. Development builds only, once, for the\n * same reason as {@link warnOnce}.\n *\n * @param transport - Label used in the message, e.g. `\"createEventStream\"`.\n * @param issues - The issues the schema reported, summarized into the message.\n * @returns Nothing.\n */\nfunction warnValidationOnce(transport: string, issues: SchemaIssue[]): void {\n const key = `${transport}:schema`;\n if (!isDevBuild() || warned.has(key)) return;\n warned.add(key);\n const summary = issues.map((issue) => `${issue.path}: ${issue.message}`).join(\"; \");\n console.warn(\n `[tempest-react-sdk] ${transport}: a frame did not match \\`schema\\` and was dropped ` +\n `(${summary}). Pass \\`onValidationError\\` to handle it yourself. This warning ` +\n `appears once.`,\n );\n}\n\n/**\n * Decode one frame, reporting whether it should be delivered.\n *\n * A caller-supplied `parser` owns the frame completely: its result is delivered\n * as it is, or validated when a `schema` was also supplied — decoding text,\n * binary-as-base64 or a protocol of its own is the point of that option.\n *\n * Without one, the frame is parsed as JSON. When that throws:\n *\n * - with `onParseError`, the callback fires and the frame is **not** delivered,\n * because a consumer that asked to hear about failures did not ask to also\n * receive the broken frame;\n * - with `schema` and no `onParseError`, the raw string goes to the schema,\n * which refuses it — a caller who asked for validation never receives an\n * unvalidated payload, and a frame the server sent empty is exactly this case;\n * - with neither, the raw string is delivered as `T` — the behaviour every\n * version before this one had, kept so nothing breaks — and development builds\n * warn once that it happened.\n *\n * With a `schema`, a payload the schema refuses is not delivered, and\n * `onValidationError` hears the issues. The value delivered is the schema's\n * **output**, so a schema that coerces or defaults is honoured.\n *\n * @param raw - The frame body as text.\n * @param transport - Label used in the development warnings.\n * @param options - Caller-supplied decoder, schema and failure handlers.\n * @returns Whether to deliver, and the payload.\n */\nexport function decodeFrame<T>(\n raw: string,\n transport: string,\n options: DecodeFrameOptions<T>,\n): DecodedFrame<T> {\n const { parser, onParseError, schema, onValidationError } = options;\n\n /**\n * Put one decoded payload through the schema, when there is one.\n *\n * @param value - The payload as parsing produced it.\n * @returns Whether to deliver, and the payload the consumer should see.\n */\n function gate(value: unknown): DecodedFrame<T> {\n if (!schema) return { delivered: true, data: value as T };\n const result = validateWithSchema(schema, value);\n if (result.ok) return { delivered: true, data: result.data };\n if (onValidationError) onValidationError(result.issues, raw);\n else warnValidationOnce(transport, result.issues);\n return { delivered: false, data: undefined as T };\n }\n\n if (parser) return gate(parser(raw));\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error) {\n if (onParseError) {\n onParseError(error, raw);\n return { delivered: false, data: undefined as T };\n }\n if (schema) return gate(raw);\n warnOnce(transport);\n return { delivered: true, data: raw as unknown as T };\n }\n return gate(parsed);\n}\n\n/**\n * Forget which transports have already warned.\n *\n * Exists for tests, which would otherwise see the first case swallow the\n * warning for every case after it.\n *\n * @returns Nothing.\n */\nexport function resetFrameWarnings(): void {\n warned.clear();\n}\n"],"mappings":";;;AAqCA,IAAMA,oBAAS,IAAI,IAAY;AAW/B,SAASC,EAAS,GAAyB;CACvC,AAAKC,EAAW,KAAK,GAAO,IAAIC,CAAS,MACzCH,EAAO,IAAIG,CAAS,GACpB,QAAQ,KACJ,uBAAuBA,EAAU,oNAGrC;AACJ;AAcA,SAASC,EAAmB,GAAmB,GAA6B;CACxE,IAAMC,IAAM,GAAGF,EAAU;CACzB,IAAI,CAACD,EAAW,KAAKF,EAAO,IAAIK,CAAG,GAAG;CACtC,EAAO,IAAIA,CAAG;CACd,IAAMC,IAAUC,EAAO,KAAK,MAAU,GAAGC,EAAM,KAAK,IAAIA,EAAM,SAAS,CAAC,CAAC,KAAK,IAAI;CAClF,QAAQ,KACJ,uBAAuBL,EAAU,sDACzBG,EAAQ,gFAEpB;AACJ;AA8BA,SAAgBG,EACZ,GACA,GACA,GACe;CACf,IAAM,EAAE,WAAQ,iBAAc,WAAQ,yBAAsBC;CAQ5D,SAASC,EAAK,GAAiC;EAC3C,IAAI,CAACC,GAAQ,OAAO;GAAE,WAAW;GAAM,MAAMC;EAAW;EACxD,IAAMC,IAASC,EAAmBH,GAAQC,CAAK;EAI/C,OAHIC,EAAO,KAAW;GAAE,WAAW;GAAM,MAAMA,EAAO;EAAK,KACvDE,IAAmBA,EAAkBF,EAAO,QAAQG,CAAG,IACtDb,EAAmBD,GAAWW,EAAO,MAAM,GACzC;GAAE,WAAW;GAAO,MAAM,KAAA;EAAe;CACpD;CAEA,IAAII,GAAQ,OAAOP,EAAKO,EAAOD,CAAG,CAAC;CACnC,IAAIE;CACJ,IAAI;EACA,IAAS,KAAK,MAAMF,CAAG;CAC3B,SAASG,GAAO;EAOZ,OANIC,KACAA,EAAaD,GAAOH,CAAG,GAChB;GAAE,WAAW;GAAO,MAAM,KAAA;EAAe,KAEhDL,IAAeD,EAAKM,CAAG,KAC3BhB,EAASE,CAAS,GACX;GAAE,WAAW;GAAM,MAAMc;EAAoB;CACxD;CACA,OAAON,EAAKQ,CAAM;AACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.cjs","names":[],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { numberFormat } from \"@/utils/intl-cache\";\n/**\n * Clamp `value` between `min` and `max` (inclusive).\n *\n * @example\n * clamp(120, 0, 100); // 100\n * clamp(-5, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (Number.isNaN(value)) return value;\n if (min > max) {\n const swap = min;\n min = max;\n max = swap;\n }\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/**\n * Format a byte count as a human-readable size string.\n *\n * Scales through B, KB, MB, GB and TB using 1024 as the base. `decimals`\n * controls the fractional digits for scaled units (default 1); `0` bytes\n * always renders as `\"0 B\"`.\n *\n * An absent or unrepresentable count renders as `\"—\"`. It used to render as\n * **`\"NaN undefined\"`**: `Math.log(NaN)` walks the exponent off the end of the\n * unit table, so the unit itself came out `undefined` — the size was not merely\n * unreadable, it claimed a unit that does not exist.\n *\n * @example\n * formatBytes(0); // \"0 B\"\n * formatBytes(1536); // \"1.5 KB\"\n * formatBytes(1048576); // \"1 MB\"\n * formatBytes(1536, 2); // \"1.50 KB\"\n * formatBytes(null); // \"—\"\n */\nexport function formatBytes(\n bytes: number | null | undefined,\n decimals: number = 1,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(bytes) || !Number.isFinite(bytes)) return fallbackText(options);\n if (bytes === 0) return \"0 B\";\n\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const base = 1024;\n const exponent = Math.min(\n Math.floor(Math.log(Math.abs(bytes)) / Math.log(base)),\n units.length - 1,\n );\n const value = bytes / base ** exponent;\n const digits = exponent === 0 ? 0 : Math.max(0, decimals);\n const formatted = parseFloat(value.toFixed(digits)).toString();\n\n return `${formatted} ${units[exponent]}`;\n}\n\n/**\n * What percentage of `total` is `part`, with an empty base yielding `0`.\n *\n * The guard is the whole point: `(part / total) * 100` produces `NaN` when the\n * base is zero and `Infinity` when only the base is missing, and both reach the\n * screen as a broken label — `NaN%` on an empty dashboard is the single most\n * common way a panel announces that it has no data yet.\n *\n * Returns a **0–100** number, which is what a bar width and a label want.\n * `formatPercent` takes a 0–1 fraction instead, so pair them as\n * `formatPercent(percentOf(a, b) / 100)` — or skip `percentOf` and pass the\n * fraction straight in.\n *\n * The result is not clamped: 120% of a target is a real number somebody wants to\n * see, and capping it would hide the interesting case.\n *\n * @example\n * percentOf(3, 4); // 75\n * percentOf(5, 0); // 0\n * percentOf(12, 8); // 150\n *\n * @param part - The measured amount.\n * @param total - The base it is measured against.\n * @returns The percentage, or `0` when the base is zero or either input is not finite.\n */\nexport function percentOf(part: number, total: number): number {\n if (!Number.isFinite(part) || !Number.isFinite(total) || total === 0) return 0;\n return (part / total) * 100;\n}\n\n/**\n * Format a number using compact notation (e.g. `1.2K`, `3.4M`).\n *\n * Wraps `Intl.NumberFormat` with `notation: \"compact\"`. The `locale` defaults\n * to `\"en-US\"`.\n *\n * An absent or unrepresentable value renders as `\"—\"`. The `null` case is the\n * one that matters: `Intl` coerces it to zero, so a count the backend left out\n * used to read as **`\"0\"`** — a number the reader has no reason to doubt.\n *\n * @example\n * formatCompactNumber(1234); // \"1.2K\"\n * formatCompactNumber(5600000); // \"5.6M\"\n * formatCompactNumber(1234, \"pt-BR\"); // \"1,2 mil\"\n * formatCompactNumber(null); // \"—\"\n */\nexport function formatCompactNumber(\n value: number | null | undefined,\n locale: string = \"en-US\",\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(locale, { notation: \"compact\", maximumFractionDigits: 1 }).format(value);\n}\n"],"mappings":"8DAUA,
|
|
1
|
+
{"version":3,"file":"numbers.cjs","names":["isAbsent","fallbackText","numberFormat","require_absent","require_intl_cache","clamp","value","min","max","swap","formatBytes","bytes","options","units","base","exponent","digits","decimals","percentOf","part","total","formatCompactNumber","locale"],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { numberFormat } from \"@/utils/intl-cache\";\n/**\n * Clamp `value` between `min` and `max` (inclusive).\n *\n * @example\n * clamp(120, 0, 100); // 100\n * clamp(-5, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (Number.isNaN(value)) return value;\n if (min > max) {\n const swap = min;\n min = max;\n max = swap;\n }\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/**\n * Format a byte count as a human-readable size string.\n *\n * Scales through B, KB, MB, GB and TB using 1024 as the base. `decimals`\n * controls the fractional digits for scaled units (default 1); `0` bytes\n * always renders as `\"0 B\"`.\n *\n * An absent or unrepresentable count renders as `\"—\"`. It used to render as\n * **`\"NaN undefined\"`**: `Math.log(NaN)` walks the exponent off the end of the\n * unit table, so the unit itself came out `undefined` — the size was not merely\n * unreadable, it claimed a unit that does not exist.\n *\n * @example\n * formatBytes(0); // \"0 B\"\n * formatBytes(1536); // \"1.5 KB\"\n * formatBytes(1048576); // \"1 MB\"\n * formatBytes(1536, 2); // \"1.50 KB\"\n * formatBytes(null); // \"—\"\n */\nexport function formatBytes(\n bytes: number | null | undefined,\n decimals: number = 1,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(bytes) || !Number.isFinite(bytes)) return fallbackText(options);\n if (bytes === 0) return \"0 B\";\n\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const base = 1024;\n const exponent = Math.min(\n Math.floor(Math.log(Math.abs(bytes)) / Math.log(base)),\n units.length - 1,\n );\n const value = bytes / base ** exponent;\n const digits = exponent === 0 ? 0 : Math.max(0, decimals);\n const formatted = parseFloat(value.toFixed(digits)).toString();\n\n return `${formatted} ${units[exponent]}`;\n}\n\n/**\n * What percentage of `total` is `part`, with an empty base yielding `0`.\n *\n * The guard is the whole point: `(part / total) * 100` produces `NaN` when the\n * base is zero and `Infinity` when only the base is missing, and both reach the\n * screen as a broken label — `NaN%` on an empty dashboard is the single most\n * common way a panel announces that it has no data yet.\n *\n * Returns a **0–100** number, which is what a bar width and a label want.\n * `formatPercent` takes a 0–1 fraction instead, so pair them as\n * `formatPercent(percentOf(a, b) / 100)` — or skip `percentOf` and pass the\n * fraction straight in.\n *\n * The result is not clamped: 120% of a target is a real number somebody wants to\n * see, and capping it would hide the interesting case.\n *\n * @example\n * percentOf(3, 4); // 75\n * percentOf(5, 0); // 0\n * percentOf(12, 8); // 150\n *\n * @param part - The measured amount.\n * @param total - The base it is measured against.\n * @returns The percentage, or `0` when the base is zero or either input is not finite.\n */\nexport function percentOf(part: number, total: number): number {\n if (!Number.isFinite(part) || !Number.isFinite(total) || total === 0) return 0;\n return (part / total) * 100;\n}\n\n/**\n * Format a number using compact notation (e.g. `1.2K`, `3.4M`).\n *\n * Wraps `Intl.NumberFormat` with `notation: \"compact\"`. The `locale` defaults\n * to `\"en-US\"`.\n *\n * An absent or unrepresentable value renders as `\"—\"`. The `null` case is the\n * one that matters: `Intl` coerces it to zero, so a count the backend left out\n * used to read as **`\"0\"`** — a number the reader has no reason to doubt.\n *\n * @example\n * formatCompactNumber(1234); // \"1.2K\"\n * formatCompactNumber(5600000); // \"5.6M\"\n * formatCompactNumber(1234, \"pt-BR\"); // \"1,2 mil\"\n * formatCompactNumber(null); // \"—\"\n */\nexport function formatCompactNumber(\n value: number | null | undefined,\n locale: string = \"en-US\",\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(locale, { notation: \"compact\", maximumFractionDigits: 1 }).format(value);\n}\n"],"mappings":"A,8DAUA,SAAgBK,EAAM,EAAe,EAAa,EAAqB,CACnE,GAAI,OAAO,MAAMC,CAAK,EAAG,OAAOA,EAChC,GAAIC,EAAMC,EAAK,CACX,IAAMC,EAAOF,EACb,EAAMC,EACN,EAAMC,CACV,CAGA,OAFIH,EAAQC,EAAYA,EACpBD,EAAQE,EAAYA,EACjBF,CACX,CAqBA,SAAgBI,EACZ,EACA,EAAmB,EACnB,EACM,CACN,GAAIV,EAAAA,SAASW,CAAK,GAAK,CAAC,OAAO,SAASA,CAAK,EAAG,OAAOV,EAAAA,aAAaW,CAAO,EAC3E,GAAID,IAAU,EAAG,MAAO,MAExB,IAAME,EAAQ,CAAC,IAAK,KAAM,KAAM,KAAM,IAAI,EACpCC,EAAO,KACPC,EAAW,KAAK,IAClB,KAAK,MAAM,KAAK,IAAI,KAAK,IAAIJ,CAAK,CAAC,EAAI,KAAK,IAAIG,CAAI,CAAC,EACrDD,EAAM,OAAS,CACnB,EACMP,EAAQK,EAAQG,GAAQC,EACxBC,EAASD,IAAa,EAAI,EAAI,KAAK,IAAI,EAAGE,CAAQ,EAGxD,MAAO,GAFW,WAAWX,EAAM,QAAQU,CAAM,CAAC,CAAC,CAAC,SAE1C,EAAU,GAAGH,EAAME,IACjC,CA2BA,SAAgBG,EAAU,EAAc,EAAuB,CAE3D,MADI,CAAC,OAAO,SAASC,CAAI,GAAK,CAAC,OAAO,SAASC,CAAK,GAAKA,IAAU,EAAU,EACrED,EAAOC,EAAS,GAC5B,CAkBA,SAAgBC,EACZ,EACA,EAAiB,QACjB,EACM,CAEN,OADIrB,EAAAA,SAASM,CAAK,GAAK,CAAC,OAAO,SAASA,CAAK,EAAUL,EAAAA,aAAaW,CAAO,EACpEV,EAAAA,aAAaoB,EAAQ,CAAE,SAAU,UAAW,sBAAuB,CAAE,CAAC,CAAC,CAAC,OAAOhB,CAAK,CAC/F,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","names":[],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { numberFormat } from \"@/utils/intl-cache\";\n/**\n * Clamp `value` between `min` and `max` (inclusive).\n *\n * @example\n * clamp(120, 0, 100); // 100\n * clamp(-5, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (Number.isNaN(value)) return value;\n if (min > max) {\n const swap = min;\n min = max;\n max = swap;\n }\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/**\n * Format a byte count as a human-readable size string.\n *\n * Scales through B, KB, MB, GB and TB using 1024 as the base. `decimals`\n * controls the fractional digits for scaled units (default 1); `0` bytes\n * always renders as `\"0 B\"`.\n *\n * An absent or unrepresentable count renders as `\"—\"`. It used to render as\n * **`\"NaN undefined\"`**: `Math.log(NaN)` walks the exponent off the end of the\n * unit table, so the unit itself came out `undefined` — the size was not merely\n * unreadable, it claimed a unit that does not exist.\n *\n * @example\n * formatBytes(0); // \"0 B\"\n * formatBytes(1536); // \"1.5 KB\"\n * formatBytes(1048576); // \"1 MB\"\n * formatBytes(1536, 2); // \"1.50 KB\"\n * formatBytes(null); // \"—\"\n */\nexport function formatBytes(\n bytes: number | null | undefined,\n decimals: number = 1,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(bytes) || !Number.isFinite(bytes)) return fallbackText(options);\n if (bytes === 0) return \"0 B\";\n\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const base = 1024;\n const exponent = Math.min(\n Math.floor(Math.log(Math.abs(bytes)) / Math.log(base)),\n units.length - 1,\n );\n const value = bytes / base ** exponent;\n const digits = exponent === 0 ? 0 : Math.max(0, decimals);\n const formatted = parseFloat(value.toFixed(digits)).toString();\n\n return `${formatted} ${units[exponent]}`;\n}\n\n/**\n * What percentage of `total` is `part`, with an empty base yielding `0`.\n *\n * The guard is the whole point: `(part / total) * 100` produces `NaN` when the\n * base is zero and `Infinity` when only the base is missing, and both reach the\n * screen as a broken label — `NaN%` on an empty dashboard is the single most\n * common way a panel announces that it has no data yet.\n *\n * Returns a **0–100** number, which is what a bar width and a label want.\n * `formatPercent` takes a 0–1 fraction instead, so pair them as\n * `formatPercent(percentOf(a, b) / 100)` — or skip `percentOf` and pass the\n * fraction straight in.\n *\n * The result is not clamped: 120% of a target is a real number somebody wants to\n * see, and capping it would hide the interesting case.\n *\n * @example\n * percentOf(3, 4); // 75\n * percentOf(5, 0); // 0\n * percentOf(12, 8); // 150\n *\n * @param part - The measured amount.\n * @param total - The base it is measured against.\n * @returns The percentage, or `0` when the base is zero or either input is not finite.\n */\nexport function percentOf(part: number, total: number): number {\n if (!Number.isFinite(part) || !Number.isFinite(total) || total === 0) return 0;\n return (part / total) * 100;\n}\n\n/**\n * Format a number using compact notation (e.g. `1.2K`, `3.4M`).\n *\n * Wraps `Intl.NumberFormat` with `notation: \"compact\"`. The `locale` defaults\n * to `\"en-US\"`.\n *\n * An absent or unrepresentable value renders as `\"—\"`. The `null` case is the\n * one that matters: `Intl` coerces it to zero, so a count the backend left out\n * used to read as **`\"0\"`** — a number the reader has no reason to doubt.\n *\n * @example\n * formatCompactNumber(1234); // \"1.2K\"\n * formatCompactNumber(5600000); // \"5.6M\"\n * formatCompactNumber(1234, \"pt-BR\"); // \"1,2 mil\"\n * formatCompactNumber(null); // \"—\"\n */\nexport function formatCompactNumber(\n value: number | null | undefined,\n locale: string = \"en-US\",\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(locale, { notation: \"compact\", maximumFractionDigits: 1 }).format(value);\n}\n"],"mappings":";;;AAUA,
|
|
1
|
+
{"version":3,"file":"numbers.js","names":["clamp","value","min","max","swap","formatBytes","isAbsent","bytes","fallbackText","options","units","base","exponent","digits","decimals","percentOf","part","total","formatCompactNumber","numberFormat","locale"],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { numberFormat } from \"@/utils/intl-cache\";\n/**\n * Clamp `value` between `min` and `max` (inclusive).\n *\n * @example\n * clamp(120, 0, 100); // 100\n * clamp(-5, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (Number.isNaN(value)) return value;\n if (min > max) {\n const swap = min;\n min = max;\n max = swap;\n }\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/**\n * Format a byte count as a human-readable size string.\n *\n * Scales through B, KB, MB, GB and TB using 1024 as the base. `decimals`\n * controls the fractional digits for scaled units (default 1); `0` bytes\n * always renders as `\"0 B\"`.\n *\n * An absent or unrepresentable count renders as `\"—\"`. It used to render as\n * **`\"NaN undefined\"`**: `Math.log(NaN)` walks the exponent off the end of the\n * unit table, so the unit itself came out `undefined` — the size was not merely\n * unreadable, it claimed a unit that does not exist.\n *\n * @example\n * formatBytes(0); // \"0 B\"\n * formatBytes(1536); // \"1.5 KB\"\n * formatBytes(1048576); // \"1 MB\"\n * formatBytes(1536, 2); // \"1.50 KB\"\n * formatBytes(null); // \"—\"\n */\nexport function formatBytes(\n bytes: number | null | undefined,\n decimals: number = 1,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(bytes) || !Number.isFinite(bytes)) return fallbackText(options);\n if (bytes === 0) return \"0 B\";\n\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const base = 1024;\n const exponent = Math.min(\n Math.floor(Math.log(Math.abs(bytes)) / Math.log(base)),\n units.length - 1,\n );\n const value = bytes / base ** exponent;\n const digits = exponent === 0 ? 0 : Math.max(0, decimals);\n const formatted = parseFloat(value.toFixed(digits)).toString();\n\n return `${formatted} ${units[exponent]}`;\n}\n\n/**\n * What percentage of `total` is `part`, with an empty base yielding `0`.\n *\n * The guard is the whole point: `(part / total) * 100` produces `NaN` when the\n * base is zero and `Infinity` when only the base is missing, and both reach the\n * screen as a broken label — `NaN%` on an empty dashboard is the single most\n * common way a panel announces that it has no data yet.\n *\n * Returns a **0–100** number, which is what a bar width and a label want.\n * `formatPercent` takes a 0–1 fraction instead, so pair them as\n * `formatPercent(percentOf(a, b) / 100)` — or skip `percentOf` and pass the\n * fraction straight in.\n *\n * The result is not clamped: 120% of a target is a real number somebody wants to\n * see, and capping it would hide the interesting case.\n *\n * @example\n * percentOf(3, 4); // 75\n * percentOf(5, 0); // 0\n * percentOf(12, 8); // 150\n *\n * @param part - The measured amount.\n * @param total - The base it is measured against.\n * @returns The percentage, or `0` when the base is zero or either input is not finite.\n */\nexport function percentOf(part: number, total: number): number {\n if (!Number.isFinite(part) || !Number.isFinite(total) || total === 0) return 0;\n return (part / total) * 100;\n}\n\n/**\n * Format a number using compact notation (e.g. `1.2K`, `3.4M`).\n *\n * Wraps `Intl.NumberFormat` with `notation: \"compact\"`. The `locale` defaults\n * to `\"en-US\"`.\n *\n * An absent or unrepresentable value renders as `\"—\"`. The `null` case is the\n * one that matters: `Intl` coerces it to zero, so a count the backend left out\n * used to read as **`\"0\"`** — a number the reader has no reason to doubt.\n *\n * @example\n * formatCompactNumber(1234); // \"1.2K\"\n * formatCompactNumber(5600000); // \"5.6M\"\n * formatCompactNumber(1234, \"pt-BR\"); // \"1,2 mil\"\n * formatCompactNumber(null); // \"—\"\n */\nexport function formatCompactNumber(\n value: number | null | undefined,\n locale: string = \"en-US\",\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(locale, { notation: \"compact\", maximumFractionDigits: 1 }).format(value);\n}\n"],"mappings":";;;AAUA,SAAgBA,EAAM,GAAe,GAAa,GAAqB;CACnE,IAAI,OAAO,MAAMC,CAAK,GAAG,OAAOA;CAChC,IAAIC,IAAMC,GAAK;EACX,IAAMC,IAAOF;EAEb,AADA,IAAMC,GACN,IAAMC;CACV;CAGA,OAFIH,IAAQC,IAAYA,IACpBD,IAAQE,IAAYA,IACjBF;AACX;AAqBA,SAAgBI,EACZ,GACA,IAAmB,GACnB,GACM;CACN,IAAIC,EAASC,CAAK,KAAK,CAAC,OAAO,SAASA,CAAK,GAAG,OAAOC,EAAaC,CAAO;CAC3E,IAAIF,MAAU,GAAG,OAAO;CAExB,IAAMG,IAAQ;EAAC;EAAK;EAAM;EAAM;EAAM;CAAI,GACpCC,IAAO,MACPC,IAAW,KAAK,IAClB,KAAK,MAAM,KAAK,IAAI,KAAK,IAAIL,CAAK,CAAC,IAAI,KAAK,IAAII,CAAI,CAAC,GACrDD,EAAM,SAAS,CACnB,GACMT,IAAQM,IAAQI,KAAQC,GACxBC,IAASD,MAAa,IAAI,IAAI,KAAK,IAAI,GAAGE,CAAQ;CAGxD,OAAO,GAFW,WAAWb,EAAM,QAAQY,CAAM,CAAC,CAAC,CAAC,SAE1C,EAAU,GAAGH,EAAME;AACjC;AA2BA,SAAgBG,EAAU,GAAc,GAAuB;CAE3D,OADI,CAAC,OAAO,SAASC,CAAI,KAAK,CAAC,OAAO,SAASC,CAAK,KAAKA,MAAU,IAAU,IACrED,IAAOC,IAAS;AAC5B;AAkBA,SAAgBC,EACZ,GACA,IAAiB,SACjB,GACM;CAEN,OADIZ,EAASL,CAAK,KAAK,CAAC,OAAO,SAASA,CAAK,IAAUO,EAAaC,CAAO,IACpEU,EAAaC,GAAQ;EAAE,UAAU;EAAW,uBAAuB;CAAE,CAAC,CAAC,CAAC,OAAOnB,CAAK;AAC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.cjs","names":[],"sources":["../../src/utils/objects.ts"],"sourcesContent":["/**\n * Determine whether a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances.\n *\n * @internal\n */\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Create a new object containing only the given `keys` from `obj`.\n *\n * Missing keys are skipped. The input is never mutated.\n *\n * @example\n * pick({ id: 1, name: \"Ana\", age: 30 }, [\"id\", \"name\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n for (const key of keys) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n/**\n * Create a new object with the given `keys` removed from `obj`.\n *\n * The input is never mutated.\n *\n * @example\n * omit({ id: 1, name: \"Ana\", age: 30 }, [\"age\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const exclude = new Set<PropertyKey>(keys);\n const result = {} as Record<PropertyKey, unknown>;\n for (const key of Object.keys(obj) as (keyof T)[]) {\n if (!exclude.has(key)) {\n result[key] = obj[key];\n }\n }\n return result as Omit<T, K>;\n}\n\n/**\n * Recursively merge `source` into `target`, returning a new object.\n *\n * - Plain objects are merged key by key, recursing into nested plain objects.\n * - Arrays and non-plain values (dates, class instances, primitives) replace\n * the target value entirely — they are not merged element by element.\n * - Neither `target` nor `source` is mutated.\n *\n * @example\n * deepMerge(\n * { a: 1, nested: { x: 1, y: 2 } },\n * { nested: { y: 20, z: 30 } },\n * );\n * // { a: 1, nested: { x: 1, y: 20, z: 30 } }\n *\n * @example\n * deepMerge({ tags: [\"a\", \"b\"] }, { tags: [\"c\"] });\n * // { tags: [\"c\"] } (arrays replaced, not merged)\n */\nexport function deepMerge<T>(target: T, source: Partial<T>): T {\n if (!isPlainRecord(target) || !isPlainRecord(source)) {\n return (source === undefined ? target : (source as unknown as T)) as T;\n }\n const result: Record<string, unknown> = { ...target };\n for (const key of Object.keys(source)) {\n const sourceValue = (source as Record<string, unknown>)[key];\n const targetValue = result[key];\n if (isPlainRecord(targetValue) && isPlainRecord(sourceValue)) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else {\n result[key] = sourceValue;\n }\n }\n return result as T;\n}\n\n/**\n * Check whether a value is considered \"empty\".\n *\n * Returns `true` for `null`, `undefined`, empty strings, empty arrays, empty\n * plain objects, and empty `Map`/`Set` instances. Returns `false` for numbers\n * (including `0` and `NaN`), booleans, and dates, which are never empty.\n *\n * @example\n * isEmpty(null); // true\n * isEmpty(\"\"); // true\n * isEmpty([]); // true\n * isEmpty({}); // true\n * isEmpty(new Map()); // true\n * isEmpty(0); // false\n * isEmpty(false); // false\n * isEmpty(new Date()); // false\n */\nexport function isEmpty(value: unknown): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (value instanceof Map || value instanceof Set) return value.size === 0;\n if (isPlainRecord(value)) return Object.keys(value).length === 0;\n return false;\n}\n"],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"objects.cjs","names":["isPlainRecord","value","proto","pick","result","key","keys","obj","omit","exclude","deepMerge","target","source","sourceValue","targetValue","isEmpty"],"sources":["../../src/utils/objects.ts"],"sourcesContent":["/**\n * Determine whether a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances.\n *\n * @internal\n */\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Create a new object containing only the given `keys` from `obj`.\n *\n * Missing keys are skipped. The input is never mutated.\n *\n * @example\n * pick({ id: 1, name: \"Ana\", age: 30 }, [\"id\", \"name\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n for (const key of keys) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n/**\n * Create a new object with the given `keys` removed from `obj`.\n *\n * The input is never mutated.\n *\n * @example\n * omit({ id: 1, name: \"Ana\", age: 30 }, [\"age\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const exclude = new Set<PropertyKey>(keys);\n const result = {} as Record<PropertyKey, unknown>;\n for (const key of Object.keys(obj) as (keyof T)[]) {\n if (!exclude.has(key)) {\n result[key] = obj[key];\n }\n }\n return result as Omit<T, K>;\n}\n\n/**\n * Recursively merge `source` into `target`, returning a new object.\n *\n * - Plain objects are merged key by key, recursing into nested plain objects.\n * - Arrays and non-plain values (dates, class instances, primitives) replace\n * the target value entirely — they are not merged element by element.\n * - Neither `target` nor `source` is mutated.\n *\n * @example\n * deepMerge(\n * { a: 1, nested: { x: 1, y: 2 } },\n * { nested: { y: 20, z: 30 } },\n * );\n * // { a: 1, nested: { x: 1, y: 20, z: 30 } }\n *\n * @example\n * deepMerge({ tags: [\"a\", \"b\"] }, { tags: [\"c\"] });\n * // { tags: [\"c\"] } (arrays replaced, not merged)\n */\nexport function deepMerge<T>(target: T, source: Partial<T>): T {\n if (!isPlainRecord(target) || !isPlainRecord(source)) {\n return (source === undefined ? target : (source as unknown as T)) as T;\n }\n const result: Record<string, unknown> = { ...target };\n for (const key of Object.keys(source)) {\n const sourceValue = (source as Record<string, unknown>)[key];\n const targetValue = result[key];\n if (isPlainRecord(targetValue) && isPlainRecord(sourceValue)) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else {\n result[key] = sourceValue;\n }\n }\n return result as T;\n}\n\n/**\n * Check whether a value is considered \"empty\".\n *\n * Returns `true` for `null`, `undefined`, empty strings, empty arrays, empty\n * plain objects, and empty `Map`/`Set` instances. Returns `false` for numbers\n * (including `0` and `NaN`), booleans, and dates, which are never empty.\n *\n * @example\n * isEmpty(null); // true\n * isEmpty(\"\"); // true\n * isEmpty([]); // true\n * isEmpty({}); // true\n * isEmpty(new Map()); // true\n * isEmpty(0); // false\n * isEmpty(false); // false\n * isEmpty(new Date()); // false\n */\nexport function isEmpty(value: unknown): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (value instanceof Map || value instanceof Set) return value.size === 0;\n if (isPlainRecord(value)) return Object.keys(value).length === 0;\n return false;\n}\n"],"mappings":"AAOA,SAASA,EAAc,EAAkD,CACrE,GAAI,OAAOC,GAAU,WAAYA,EAAgB,MAAO,GACxD,IAAMC,EAAQ,OAAO,eAAeD,CAAK,EACzC,OAAOC,IAAU,OAAO,WAAaA,IAAU,IACnD,CAWA,SAAgBC,EAA0C,EAAQ,EAAuB,CACrF,IAAMC,EAAS,CAAC,EAChB,IAAK,IAAMC,KAAOC,EACV,OAAO,UAAU,eAAe,KAAKC,EAAKF,CAAG,IAC7C,EAAOA,GAAOE,EAAIF,IAG1B,OAAOD,CACX,CAWA,SAAgBI,EAA0C,EAAQ,EAAuB,CACrF,IAAMC,EAAU,IAAI,IAAiBH,CAAI,EACnCF,EAAS,CAAC,EAChB,IAAK,IAAMC,KAAO,OAAO,KAAKE,CAAG,EACxBE,EAAQ,IAAIJ,CAAG,IAChB,EAAOA,GAAOE,EAAIF,IAG1B,OAAOD,CACX,CAqBA,SAAgBM,EAAa,EAAW,EAAuB,CAC3D,GAAI,CAACV,EAAcW,CAAM,GAAK,CAACX,EAAcY,CAAM,EAC/C,OAAQA,IAAW,IAAA,GAAYD,EAAUC,EAE7C,IAAMR,EAAkC,CAAE,GAAGO,CAAO,EACpD,IAAK,IAAMN,KAAO,OAAO,KAAKO,CAAM,EAAG,CACnC,IAAMC,EAAeD,EAAmCP,GAClDS,EAAcV,EAAOC,GAC3B,AAGID,EAAOC,GAHPL,EAAcc,CAAW,GAAKd,EAAca,CAAW,EACzCH,EAAUI,EAAaD,CAAW,EAElCA,CAEtB,CACA,OAAOT,CACX,CAmBA,SAAgBW,EAAQ,EAAyB,CAM7C,OALId,GAAU,KAAoC,GAC9C,OAAOA,GAAU,UACjB,MAAM,QAAQA,CAAK,EAAUA,EAAM,SAAW,EAC9CA,aAAiB,KAAOA,aAAiB,IAAYA,EAAM,OAAS,EACpED,EAAcC,CAAK,EAAU,OAAO,KAAKA,CAAK,CAAC,CAAC,SAAW,EACxD,EACX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","names":[],"sources":["../../src/utils/objects.ts"],"sourcesContent":["/**\n * Determine whether a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances.\n *\n * @internal\n */\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Create a new object containing only the given `keys` from `obj`.\n *\n * Missing keys are skipped. The input is never mutated.\n *\n * @example\n * pick({ id: 1, name: \"Ana\", age: 30 }, [\"id\", \"name\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n for (const key of keys) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n/**\n * Create a new object with the given `keys` removed from `obj`.\n *\n * The input is never mutated.\n *\n * @example\n * omit({ id: 1, name: \"Ana\", age: 30 }, [\"age\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const exclude = new Set<PropertyKey>(keys);\n const result = {} as Record<PropertyKey, unknown>;\n for (const key of Object.keys(obj) as (keyof T)[]) {\n if (!exclude.has(key)) {\n result[key] = obj[key];\n }\n }\n return result as Omit<T, K>;\n}\n\n/**\n * Recursively merge `source` into `target`, returning a new object.\n *\n * - Plain objects are merged key by key, recursing into nested plain objects.\n * - Arrays and non-plain values (dates, class instances, primitives) replace\n * the target value entirely — they are not merged element by element.\n * - Neither `target` nor `source` is mutated.\n *\n * @example\n * deepMerge(\n * { a: 1, nested: { x: 1, y: 2 } },\n * { nested: { y: 20, z: 30 } },\n * );\n * // { a: 1, nested: { x: 1, y: 20, z: 30 } }\n *\n * @example\n * deepMerge({ tags: [\"a\", \"b\"] }, { tags: [\"c\"] });\n * // { tags: [\"c\"] } (arrays replaced, not merged)\n */\nexport function deepMerge<T>(target: T, source: Partial<T>): T {\n if (!isPlainRecord(target) || !isPlainRecord(source)) {\n return (source === undefined ? target : (source as unknown as T)) as T;\n }\n const result: Record<string, unknown> = { ...target };\n for (const key of Object.keys(source)) {\n const sourceValue = (source as Record<string, unknown>)[key];\n const targetValue = result[key];\n if (isPlainRecord(targetValue) && isPlainRecord(sourceValue)) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else {\n result[key] = sourceValue;\n }\n }\n return result as T;\n}\n\n/**\n * Check whether a value is considered \"empty\".\n *\n * Returns `true` for `null`, `undefined`, empty strings, empty arrays, empty\n * plain objects, and empty `Map`/`Set` instances. Returns `false` for numbers\n * (including `0` and `NaN`), booleans, and dates, which are never empty.\n *\n * @example\n * isEmpty(null); // true\n * isEmpty(\"\"); // true\n * isEmpty([]); // true\n * isEmpty({}); // true\n * isEmpty(new Map()); // true\n * isEmpty(0); // false\n * isEmpty(false); // false\n * isEmpty(new Date()); // false\n */\nexport function isEmpty(value: unknown): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (value instanceof Map || value instanceof Set) return value.size === 0;\n if (isPlainRecord(value)) return Object.keys(value).length === 0;\n return false;\n}\n"],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"objects.js","names":["isPlainRecord","value","proto","pick","result","key","keys","obj","omit","exclude","deepMerge","target","source","sourceValue","targetValue","isEmpty"],"sources":["../../src/utils/objects.ts"],"sourcesContent":["/**\n * Determine whether a value is a plain object literal.\n *\n * Returns `false` for arrays, `null`, dates, maps, sets, and class instances.\n *\n * @internal\n */\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Create a new object containing only the given `keys` from `obj`.\n *\n * Missing keys are skipped. The input is never mutated.\n *\n * @example\n * pick({ id: 1, name: \"Ana\", age: 30 }, [\"id\", \"name\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n for (const key of keys) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n/**\n * Create a new object with the given `keys` removed from `obj`.\n *\n * The input is never mutated.\n *\n * @example\n * omit({ id: 1, name: \"Ana\", age: 30 }, [\"age\"]);\n * // { id: 1, name: \"Ana\" }\n */\nexport function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const exclude = new Set<PropertyKey>(keys);\n const result = {} as Record<PropertyKey, unknown>;\n for (const key of Object.keys(obj) as (keyof T)[]) {\n if (!exclude.has(key)) {\n result[key] = obj[key];\n }\n }\n return result as Omit<T, K>;\n}\n\n/**\n * Recursively merge `source` into `target`, returning a new object.\n *\n * - Plain objects are merged key by key, recursing into nested plain objects.\n * - Arrays and non-plain values (dates, class instances, primitives) replace\n * the target value entirely — they are not merged element by element.\n * - Neither `target` nor `source` is mutated.\n *\n * @example\n * deepMerge(\n * { a: 1, nested: { x: 1, y: 2 } },\n * { nested: { y: 20, z: 30 } },\n * );\n * // { a: 1, nested: { x: 1, y: 20, z: 30 } }\n *\n * @example\n * deepMerge({ tags: [\"a\", \"b\"] }, { tags: [\"c\"] });\n * // { tags: [\"c\"] } (arrays replaced, not merged)\n */\nexport function deepMerge<T>(target: T, source: Partial<T>): T {\n if (!isPlainRecord(target) || !isPlainRecord(source)) {\n return (source === undefined ? target : (source as unknown as T)) as T;\n }\n const result: Record<string, unknown> = { ...target };\n for (const key of Object.keys(source)) {\n const sourceValue = (source as Record<string, unknown>)[key];\n const targetValue = result[key];\n if (isPlainRecord(targetValue) && isPlainRecord(sourceValue)) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else {\n result[key] = sourceValue;\n }\n }\n return result as T;\n}\n\n/**\n * Check whether a value is considered \"empty\".\n *\n * Returns `true` for `null`, `undefined`, empty strings, empty arrays, empty\n * plain objects, and empty `Map`/`Set` instances. Returns `false` for numbers\n * (including `0` and `NaN`), booleans, and dates, which are never empty.\n *\n * @example\n * isEmpty(null); // true\n * isEmpty(\"\"); // true\n * isEmpty([]); // true\n * isEmpty({}); // true\n * isEmpty(new Map()); // true\n * isEmpty(0); // false\n * isEmpty(false); // false\n * isEmpty(new Date()); // false\n */\nexport function isEmpty(value: unknown): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (value instanceof Map || value instanceof Set) return value.size === 0;\n if (isPlainRecord(value)) return Object.keys(value).length === 0;\n return false;\n}\n"],"mappings":";AAOA,SAASA,EAAc,GAAkD;CACrE,IAAI,OAAOC,KAAU,aAAYA,GAAgB,OAAO;CACxD,IAAMC,IAAQ,OAAO,eAAeD,CAAK;CACzC,OAAOC,MAAU,OAAO,aAAaA,MAAU;AACnD;AAWA,SAAgBC,EAA0C,GAAQ,GAAuB;CACrF,IAAMC,IAAS,CAAC;CAChB,KAAK,IAAMC,KAAOC,GACd,AAAI,OAAO,UAAU,eAAe,KAAKC,GAAKF,CAAG,MAC7C,EAAOA,KAAOE,EAAIF;CAG1B,OAAOD;AACX;AAWA,SAAgBI,EAA0C,GAAQ,GAAuB;CACrF,IAAMC,IAAU,IAAI,IAAiBH,CAAI,GACnCF,IAAS,CAAC;CAChB,KAAK,IAAMC,KAAO,OAAO,KAAKE,CAAG,GAC7B,AAAKE,EAAQ,IAAIJ,CAAG,MAChB,EAAOA,KAAOE,EAAIF;CAG1B,OAAOD;AACX;AAqBA,SAAgBM,EAAa,GAAW,GAAuB;CAC3D,IAAI,CAACV,EAAcW,CAAM,KAAK,CAACX,EAAcY,CAAM,GAC/C,OAAQA,MAAW,KAAA,IAAYD,IAAUC;CAE7C,IAAMR,IAAkC,EAAE,GAAGO,EAAO;CACpD,KAAK,IAAMN,KAAO,OAAO,KAAKO,CAAM,GAAG;EACnC,IAAMC,IAAeD,EAAmCP,IAClDS,IAAcV,EAAOC;EAC3B,AAGID,EAAOC,KAHPL,EAAcc,CAAW,KAAKd,EAAca,CAAW,IACzCH,EAAUI,GAAaD,CAAW,IAElCA;CAEtB;CACA,OAAOT;AACX;AAmBA,SAAgBW,EAAQ,GAAyB;CAM7C,OALId,KAAU,OAAoC,KAC9C,OAAOA,KAAU,YACjB,MAAM,QAAQA,CAAK,IAAUA,EAAM,WAAW,IAC9CA,aAAiB,OAAOA,aAAiB,MAAYA,EAAM,SAAS,IACpED,EAAcC,CAAK,IAAU,OAAO,KAAKA,CAAK,CAAC,CAAC,WAAW,IACxD;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-fingerprint.cjs","names":[],"sources":["../../src/utils/owner-fingerprint.ts"],"sourcesContent":["/**\n * FNV-1a 32-bit offset basis, the seed of the first half of the fingerprint.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `offset_basis` for 32 bits).\n */\nexport const FNV_OFFSET_BASIS_32 = 0x811c9dc5;\n\n/**\n * FNV-1a 32-bit prime.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `FNV_prime` for 32 bits).\n */\nexport const FNV_PRIME_32 = 0x01000193;\n\n/**\n * Seed of the second half of the fingerprint: the basis with every bit\n * flipped, so the two halves are independent hashes of the same text.\n */\nconst SECOND_SEED = ~FNV_OFFSET_BASIS_32 >>> 0;\n\n/**\n * Hash `text` with FNV-1a from `seed`.\n *\n * @param text - What to hash, read as UTF-16 code units.\n * @param seed - Starting value.\n * @returns The 32-bit hash as an unsigned integer.\n */\nfunction fnv1a(text: string, seed: number): number {\n let hash = seed;\n for (let index = 0; index < text.length; index += 1) {\n hash ^= text.charCodeAt(index);\n hash = Math.imul(hash, FNV_PRIME_32);\n }\n return hash >>> 0;\n}\n\n/**\n * A 64-bit one-way fingerprint of `text`, as 16 hex characters.\n *\n * Not a cryptographic hash, and it does not need to be: it only has to tell\n * two signed-in identities apart on one device, and it must not let anyone\n * holding a stored record send as the user. Sixty-four bits cannot be turned\n * back into a bearer token, and two different users colliding on one browser\n * is a one-in-2^64 event. A synchronous hash is what lets a caller such as the\n * error reporter's `report()` stamp the owner without awaiting\n * `crypto.subtle`.\n *\n * @param text - The principal or token to fingerprint.\n * @returns Sixteen lowercase hex characters.\n */\nexport function fingerprintOwner(text: string): string {\n const first = fnv1a(text, FNV_OFFSET_BASIS_32).toString(16).padStart(8, \"0\");\n const second = fnv1a(text, SECOND_SEED).toString(16).padStart(8, \"0\");\n return `${first}${second}`;\n}\n\n/**\n * Turn a principal or a token into the fingerprint a persisted record stores —\n * an error-report queue entry, a resumable-upload record.\n *\n * The prefix keeps the two sources from ever matching each other: a record\n * stamped from a principal is never taken for one stamped from a token.\n *\n * Only a non-empty string or a finite number is an identity. Anything else —\n * notably the `Promise` an `async` getter returns from untyped JS — reads as\n * nobody, because stringifying it would give every user the same\n * `\"[object Promise]\"` fingerprint.\n *\n * @param source - `\"p\"` for a principal from `getPrincipal`, `\"t\"` for a token.\n * @param value - The identity, or nothing when nobody is signed in.\n * @returns `\"<source>:<fingerprint>\"`, or `null` when `value` is no identity.\n */\nexport function ownerFingerprint(source: \"p\" | \"t\", value: unknown): string | null {\n const text =\n typeof value === \"string\"\n ? value\n : typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : \"\";\n return text ? `${source}:${fingerprintOwner(text)}` : null;\n}\n"],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"owner-fingerprint.cjs","names":["FNV_OFFSET_BASIS_32","FNV_PRIME_32","fnv1a","hash","seed","index","text","fingerprintOwner","ownerFingerprint","value","source"],"sources":["../../src/utils/owner-fingerprint.ts"],"sourcesContent":["/**\n * FNV-1a 32-bit offset basis, the seed of the first half of the fingerprint.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `offset_basis` for 32 bits).\n */\nexport const FNV_OFFSET_BASIS_32 = 0x811c9dc5;\n\n/**\n * FNV-1a 32-bit prime.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `FNV_prime` for 32 bits).\n */\nexport const FNV_PRIME_32 = 0x01000193;\n\n/**\n * Seed of the second half of the fingerprint: the basis with every bit\n * flipped, so the two halves are independent hashes of the same text.\n */\nconst SECOND_SEED = ~FNV_OFFSET_BASIS_32 >>> 0;\n\n/**\n * Hash `text` with FNV-1a from `seed`.\n *\n * @param text - What to hash, read as UTF-16 code units.\n * @param seed - Starting value.\n * @returns The 32-bit hash as an unsigned integer.\n */\nfunction fnv1a(text: string, seed: number): number {\n let hash = seed;\n for (let index = 0; index < text.length; index += 1) {\n hash ^= text.charCodeAt(index);\n hash = Math.imul(hash, FNV_PRIME_32);\n }\n return hash >>> 0;\n}\n\n/**\n * A 64-bit one-way fingerprint of `text`, as 16 hex characters.\n *\n * Not a cryptographic hash, and it does not need to be: it only has to tell\n * two signed-in identities apart on one device, and it must not let anyone\n * holding a stored record send as the user. Sixty-four bits cannot be turned\n * back into a bearer token, and two different users colliding on one browser\n * is a one-in-2^64 event. A synchronous hash is what lets a caller such as the\n * error reporter's `report()` stamp the owner without awaiting\n * `crypto.subtle`.\n *\n * @param text - The principal or token to fingerprint.\n * @returns Sixteen lowercase hex characters.\n */\nexport function fingerprintOwner(text: string): string {\n const first = fnv1a(text, FNV_OFFSET_BASIS_32).toString(16).padStart(8, \"0\");\n const second = fnv1a(text, SECOND_SEED).toString(16).padStart(8, \"0\");\n return `${first}${second}`;\n}\n\n/**\n * Turn a principal or a token into the fingerprint a persisted record stores —\n * an error-report queue entry, a resumable-upload record.\n *\n * The prefix keeps the two sources from ever matching each other: a record\n * stamped from a principal is never taken for one stamped from a token.\n *\n * Only a non-empty string or a finite number is an identity. Anything else —\n * notably the `Promise` an `async` getter returns from untyped JS — reads as\n * nobody, because stringifying it would give every user the same\n * `\"[object Promise]\"` fingerprint.\n *\n * @param source - `\"p\"` for a principal from `getPrincipal`, `\"t\"` for a token.\n * @param value - The identity, or nothing when nobody is signed in.\n * @returns `\"<source>:<fingerprint>\"`, or `null` when `value` is no identity.\n */\nexport function ownerFingerprint(source: \"p\" | \"t\", value: unknown): string | null {\n const text =\n typeof value === \"string\"\n ? value\n : typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : \"\";\n return text ? `${source}:${fingerprintOwner(text)}` : null;\n}\n"],"mappings":"AAKA,IAAaA,EAAsB,WAOtBC,EAAe,SAe5B,SAASC,EAAM,EAAc,EAAsB,CAC/C,IAAIC,EAAOC,EACX,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAK,OAAQ,GAAS,EAC9C,GAAQA,EAAK,WAAWD,CAAK,EAC7B,EAAO,KAAK,KAAKF,EAAMF,CAAY,EAEvC,OAAOE,IAAS,CACpB,CAgBA,SAAgBI,EAAiB,EAAsB,CAGnD,MAAO,GAFOL,EAAMI,EAAMN,CAAmB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAG,GAE9D,IADKE,EAAMI,EAAM,UAAW,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAG,GAC/C,GACtB,CAkBA,SAAgBE,EAAiB,EAAmB,EAA+B,CAC/E,IAAMF,EACF,OAAOG,GAAU,SACXA,EACA,OAAOA,GAAU,UAAY,OAAO,SAASA,CAAK,EAChD,OAAOA,CAAK,EACZ,GACZ,OAAOH,EAAO,GAAGI,EAAO,GAAGH,EAAiBD,CAAI,IAAM,IAC1D,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-fingerprint.js","names":[],"sources":["../../src/utils/owner-fingerprint.ts"],"sourcesContent":["/**\n * FNV-1a 32-bit offset basis, the seed of the first half of the fingerprint.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `offset_basis` for 32 bits).\n */\nexport const FNV_OFFSET_BASIS_32 = 0x811c9dc5;\n\n/**\n * FNV-1a 32-bit prime.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `FNV_prime` for 32 bits).\n */\nexport const FNV_PRIME_32 = 0x01000193;\n\n/**\n * Seed of the second half of the fingerprint: the basis with every bit\n * flipped, so the two halves are independent hashes of the same text.\n */\nconst SECOND_SEED = ~FNV_OFFSET_BASIS_32 >>> 0;\n\n/**\n * Hash `text` with FNV-1a from `seed`.\n *\n * @param text - What to hash, read as UTF-16 code units.\n * @param seed - Starting value.\n * @returns The 32-bit hash as an unsigned integer.\n */\nfunction fnv1a(text: string, seed: number): number {\n let hash = seed;\n for (let index = 0; index < text.length; index += 1) {\n hash ^= text.charCodeAt(index);\n hash = Math.imul(hash, FNV_PRIME_32);\n }\n return hash >>> 0;\n}\n\n/**\n * A 64-bit one-way fingerprint of `text`, as 16 hex characters.\n *\n * Not a cryptographic hash, and it does not need to be: it only has to tell\n * two signed-in identities apart on one device, and it must not let anyone\n * holding a stored record send as the user. Sixty-four bits cannot be turned\n * back into a bearer token, and two different users colliding on one browser\n * is a one-in-2^64 event. A synchronous hash is what lets a caller such as the\n * error reporter's `report()` stamp the owner without awaiting\n * `crypto.subtle`.\n *\n * @param text - The principal or token to fingerprint.\n * @returns Sixteen lowercase hex characters.\n */\nexport function fingerprintOwner(text: string): string {\n const first = fnv1a(text, FNV_OFFSET_BASIS_32).toString(16).padStart(8, \"0\");\n const second = fnv1a(text, SECOND_SEED).toString(16).padStart(8, \"0\");\n return `${first}${second}`;\n}\n\n/**\n * Turn a principal or a token into the fingerprint a persisted record stores —\n * an error-report queue entry, a resumable-upload record.\n *\n * The prefix keeps the two sources from ever matching each other: a record\n * stamped from a principal is never taken for one stamped from a token.\n *\n * Only a non-empty string or a finite number is an identity. Anything else —\n * notably the `Promise` an `async` getter returns from untyped JS — reads as\n * nobody, because stringifying it would give every user the same\n * `\"[object Promise]\"` fingerprint.\n *\n * @param source - `\"p\"` for a principal from `getPrincipal`, `\"t\"` for a token.\n * @param value - The identity, or nothing when nobody is signed in.\n * @returns `\"<source>:<fingerprint>\"`, or `null` when `value` is no identity.\n */\nexport function ownerFingerprint(source: \"p\" | \"t\", value: unknown): string | null {\n const text =\n typeof value === \"string\"\n ? value\n : typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : \"\";\n return text ? `${source}:${fingerprintOwner(text)}` : null;\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"owner-fingerprint.js","names":["FNV_OFFSET_BASIS_32","FNV_PRIME_32","fnv1a","hash","seed","index","text","fingerprintOwner","ownerFingerprint","value","source"],"sources":["../../src/utils/owner-fingerprint.ts"],"sourcesContent":["/**\n * FNV-1a 32-bit offset basis, the seed of the first half of the fingerprint.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `offset_basis` for 32 bits).\n */\nexport const FNV_OFFSET_BASIS_32 = 0x811c9dc5;\n\n/**\n * FNV-1a 32-bit prime.\n *\n * Ported from the FNV specification (Fowler/Noll/Vo, `FNV_prime` for 32 bits).\n */\nexport const FNV_PRIME_32 = 0x01000193;\n\n/**\n * Seed of the second half of the fingerprint: the basis with every bit\n * flipped, so the two halves are independent hashes of the same text.\n */\nconst SECOND_SEED = ~FNV_OFFSET_BASIS_32 >>> 0;\n\n/**\n * Hash `text` with FNV-1a from `seed`.\n *\n * @param text - What to hash, read as UTF-16 code units.\n * @param seed - Starting value.\n * @returns The 32-bit hash as an unsigned integer.\n */\nfunction fnv1a(text: string, seed: number): number {\n let hash = seed;\n for (let index = 0; index < text.length; index += 1) {\n hash ^= text.charCodeAt(index);\n hash = Math.imul(hash, FNV_PRIME_32);\n }\n return hash >>> 0;\n}\n\n/**\n * A 64-bit one-way fingerprint of `text`, as 16 hex characters.\n *\n * Not a cryptographic hash, and it does not need to be: it only has to tell\n * two signed-in identities apart on one device, and it must not let anyone\n * holding a stored record send as the user. Sixty-four bits cannot be turned\n * back into a bearer token, and two different users colliding on one browser\n * is a one-in-2^64 event. A synchronous hash is what lets a caller such as the\n * error reporter's `report()` stamp the owner without awaiting\n * `crypto.subtle`.\n *\n * @param text - The principal or token to fingerprint.\n * @returns Sixteen lowercase hex characters.\n */\nexport function fingerprintOwner(text: string): string {\n const first = fnv1a(text, FNV_OFFSET_BASIS_32).toString(16).padStart(8, \"0\");\n const second = fnv1a(text, SECOND_SEED).toString(16).padStart(8, \"0\");\n return `${first}${second}`;\n}\n\n/**\n * Turn a principal or a token into the fingerprint a persisted record stores —\n * an error-report queue entry, a resumable-upload record.\n *\n * The prefix keeps the two sources from ever matching each other: a record\n * stamped from a principal is never taken for one stamped from a token.\n *\n * Only a non-empty string or a finite number is an identity. Anything else —\n * notably the `Promise` an `async` getter returns from untyped JS — reads as\n * nobody, because stringifying it would give every user the same\n * `\"[object Promise]\"` fingerprint.\n *\n * @param source - `\"p\"` for a principal from `getPrincipal`, `\"t\"` for a token.\n * @param value - The identity, or nothing when nobody is signed in.\n * @returns `\"<source>:<fingerprint>\"`, or `null` when `value` is no identity.\n */\nexport function ownerFingerprint(source: \"p\" | \"t\", value: unknown): string | null {\n const text =\n typeof value === \"string\"\n ? value\n : typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : \"\";\n return text ? `${source}:${fingerprintOwner(text)}` : null;\n}\n"],"mappings":";AAKA,IAAaA,IAAsB,YAOtBC,IAAe;AAe5B,SAASC,EAAM,GAAc,GAAsB;CAC/C,IAAIC,IAAOC;CACX,KAAK,IAAIC,IAAQ,GAAGA,IAAQC,EAAK,QAAQ,KAAS,GAE9C,AADA,KAAQA,EAAK,WAAWD,CAAK,GAC7B,IAAO,KAAK,KAAKF,GAAMF,CAAY;CAEvC,OAAOE,MAAS;AACpB;AAgBA,SAAgBI,EAAiB,GAAsB;CAGnD,OAAO,GAFOL,EAAMI,GAAMN,CAAmB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAE9D,IADKE,EAAMI,GAAM,UAAW,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAC/C;AACtB;AAkBA,SAAgBE,EAAiB,GAAmB,GAA+B;CAC/E,IAAMF,IACF,OAAOG,KAAU,WACXA,IACA,OAAOA,KAAU,YAAY,OAAO,SAASA,CAAK,IAChD,OAAOA,CAAK,IACZ;CACZ,OAAOH,IAAO,GAAGI,EAAO,GAAGH,EAAiBD,CAAI,MAAM;AAC1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promises.cjs","names":[],"sources":["../../src/utils/promises.ts"],"sourcesContent":["/**\n * Resolve after `ms` milliseconds.\n *\n * @example\n * await sleep(500); // pauses for half a second\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Race `promise` against a timeout.\n *\n * Resolves/rejects with `promise` when it settles first. If `ms` elapses\n * before that, the returned promise rejects with an `Error` whose `name` is\n * `\"TimeoutError\"`.\n *\n * @example\n * await withTimeout(fetch(\"/slow\"), 3000);\n * await withTimeout(fetch(\"/slow\"), 3000, \"request too slow\");\n */\nexport function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => {\n const error = new Error(message ?? `Operation timed out after ${ms}ms`);\n error.name = \"TimeoutError\";\n reject(error);\n }, ms);\n\n promise.then(\n (value) => {\n clearTimeout(timer);\n resolve(value);\n },\n (reason) => {\n clearTimeout(timer);\n reject(reason);\n },\n );\n });\n}\n"],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"promises.cjs","names":["sleep","resolve","ms","withTimeout","timer","error","message","reject","promise","value","reason"],"sources":["../../src/utils/promises.ts"],"sourcesContent":["/**\n * Resolve after `ms` milliseconds.\n *\n * @example\n * await sleep(500); // pauses for half a second\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Race `promise` against a timeout.\n *\n * Resolves/rejects with `promise` when it settles first. If `ms` elapses\n * before that, the returned promise rejects with an `Error` whose `name` is\n * `\"TimeoutError\"`.\n *\n * @example\n * await withTimeout(fetch(\"/slow\"), 3000);\n * await withTimeout(fetch(\"/slow\"), 3000, \"request too slow\");\n */\nexport function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => {\n const error = new Error(message ?? `Operation timed out after ${ms}ms`);\n error.name = \"TimeoutError\";\n reject(error);\n }, ms);\n\n promise.then(\n (value) => {\n clearTimeout(timer);\n resolve(value);\n },\n (reason) => {\n clearTimeout(timer);\n reject(reason);\n },\n );\n });\n}\n"],"mappings":"AAMA,SAAgBA,EAAM,EAA2B,CAC7C,OAAO,IAAI,QAAe,GAAY,WAAWC,EAASC,CAAE,CAAC,CACjE,CAaA,SAAgBC,EAAe,EAAqB,EAAY,EAA8B,CAC1F,OAAO,IAAI,SAAY,EAAS,IAAW,CACvC,IAAMC,EAAQ,eAAiB,CAC3B,IAAMC,EAAY,MAAMC,GAAW,6BAA6BJ,EAAG,GAAG,EACtE,EAAM,KAAO,eACbK,EAAOF,CAAK,CAChB,EAAGH,CAAE,EAELM,EAAQ,KACH,GAAU,CACP,aAAaJ,CAAK,EAClBH,EAAQQ,CAAK,CACjB,EACC,GAAW,CACR,aAAaL,CAAK,EAClBG,EAAOG,CAAM,CACjB,CACJ,CACJ,CAAC,CACL,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promises.js","names":[],"sources":["../../src/utils/promises.ts"],"sourcesContent":["/**\n * Resolve after `ms` milliseconds.\n *\n * @example\n * await sleep(500); // pauses for half a second\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Race `promise` against a timeout.\n *\n * Resolves/rejects with `promise` when it settles first. If `ms` elapses\n * before that, the returned promise rejects with an `Error` whose `name` is\n * `\"TimeoutError\"`.\n *\n * @example\n * await withTimeout(fetch(\"/slow\"), 3000);\n * await withTimeout(fetch(\"/slow\"), 3000, \"request too slow\");\n */\nexport function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => {\n const error = new Error(message ?? `Operation timed out after ${ms}ms`);\n error.name = \"TimeoutError\";\n reject(error);\n }, ms);\n\n promise.then(\n (value) => {\n clearTimeout(timer);\n resolve(value);\n },\n (reason) => {\n clearTimeout(timer);\n reject(reason);\n },\n );\n });\n}\n"],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"promises.js","names":["sleep","resolve","ms","withTimeout","timer","error","message","reject","value","reason"],"sources":["../../src/utils/promises.ts"],"sourcesContent":["/**\n * Resolve after `ms` milliseconds.\n *\n * @example\n * await sleep(500); // pauses for half a second\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Race `promise` against a timeout.\n *\n * Resolves/rejects with `promise` when it settles first. If `ms` elapses\n * before that, the returned promise rejects with an `Error` whose `name` is\n * `\"TimeoutError\"`.\n *\n * @example\n * await withTimeout(fetch(\"/slow\"), 3000);\n * await withTimeout(fetch(\"/slow\"), 3000, \"request too slow\");\n */\nexport function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => {\n const error = new Error(message ?? `Operation timed out after ${ms}ms`);\n error.name = \"TimeoutError\";\n reject(error);\n }, ms);\n\n promise.then(\n (value) => {\n clearTimeout(timer);\n resolve(value);\n },\n (reason) => {\n clearTimeout(timer);\n reject(reason);\n },\n );\n });\n}\n"],"mappings":";AAMA,SAAgBA,EAAM,GAA2B;CAC7C,OAAO,IAAI,SAAe,MAAY,WAAWC,GAASC,CAAE,CAAC;AACjE;AAaA,SAAgBC,EAAe,GAAqB,GAAY,GAA8B;CAC1F,OAAO,IAAI,SAAY,GAAS,MAAW;EACvC,IAAMC,IAAQ,iBAAiB;GAC3B,IAAMC,IAAY,MAAMC,KAAW,6BAA6BJ,EAAG,GAAG;GAEtE,AADA,EAAM,OAAO,gBACbK,EAAOF,CAAK;EAChB,GAAGH,CAAE;EAEL,EAAQ,MACH,MAAU;GAEP,AADA,aAAaE,CAAK,GAClBH,EAAQO,CAAK;EACjB,IACC,MAAW;GAER,AADA,aAAaJ,CAAK,GAClBG,EAAOE,CAAM;EACjB,CACJ;CACJ,CAAC;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relative-time.cjs","names":[],"sources":["../../src/utils/relative-time.ts"],"sourcesContent":["export type RelativeTimeLocale = \"pt-BR\" | \"en\";\n\ninterface Strings {\n justNow: string;\n secondsAgo: (n: number) => string;\n minutesAgo: (n: number) => string;\n hoursAgo: (n: number) => string;\n daysAgo: (n: number) => string;\n weeksAgo: (n: number) => string;\n monthsAgo: (n: number) => string;\n yearsAgo: (n: number) => string;\n inSeconds: (n: number) => string;\n inMinutes: (n: number) => string;\n inHours: (n: number) => string;\n inDays: (n: number) => string;\n inWeeks: (n: number) => string;\n inMonths: (n: number) => string;\n inYears: (n: number) => string;\n}\n\nconst PT_BR: Strings = {\n justNow: \"agora há pouco\",\n secondsAgo: (n) => `${n} s atrás`,\n minutesAgo: (n) => `${n} min atrás`,\n hoursAgo: (n) => (n === 1 ? \"1 hora atrás\" : `${n} horas atrás`),\n daysAgo: (n) => (n === 1 ? \"ontem\" : `${n} dias atrás`),\n weeksAgo: (n) => (n === 1 ? \"semana passada\" : `${n} semanas atrás`),\n monthsAgo: (n) => (n === 1 ? \"mês passado\" : `${n} meses atrás`),\n yearsAgo: (n) => (n === 1 ? \"ano passado\" : `${n} anos atrás`),\n inSeconds: (n) => `em ${n} s`,\n inMinutes: (n) => `em ${n} min`,\n inHours: (n) => `em ${n} h`,\n inDays: (n) => `em ${n} ${n === 1 ? \"dia\" : \"dias\"}`,\n inWeeks: (n) => `em ${n} ${n === 1 ? \"semana\" : \"semanas\"}`,\n inMonths: (n) => `em ${n} ${n === 1 ? \"mês\" : \"meses\"}`,\n inYears: (n) => `em ${n} ${n === 1 ? \"ano\" : \"anos\"}`,\n};\n\nconst EN: Strings = {\n justNow: \"just now\",\n secondsAgo: (n) => `${n}s ago`,\n minutesAgo: (n) => `${n}m ago`,\n hoursAgo: (n) => `${n}h ago`,\n daysAgo: (n) => (n === 1 ? \"yesterday\" : `${n} days ago`),\n weeksAgo: (n) => `${n}w ago`,\n monthsAgo: (n) => `${n}mo ago`,\n yearsAgo: (n) => `${n}y ago`,\n inSeconds: (n) => `in ${n}s`,\n inMinutes: (n) => `in ${n}m`,\n inHours: (n) => `in ${n}h`,\n inDays: (n) => `in ${n}d`,\n inWeeks: (n) => `in ${n}w`,\n inMonths: (n) => `in ${n}mo`,\n inYears: (n) => `in ${n}y`,\n};\n\nconst LOCALES: Record<RelativeTimeLocale, Strings> = { \"pt-BR\": PT_BR, en: EN };\n\nconst SECOND = 1000;\nconst MINUTE = 60 * SECOND;\nconst HOUR = 60 * MINUTE;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\nconst YEAR = 365 * DAY;\n\n/**\n * Render a `Date` / ISO string as a relative-time string. Supports past and\n * future, PT-BR (default) and English.\n *\n * @example\n * relativeTime(new Date(Date.now() - 90_000)); // \"1 min atrás\"\n * relativeTime(\"2026-05-17T10:00:00Z\", { locale: \"en\" }); // \"5h ago\"\n */\nexport function relativeTime(\n input: Date | string | number,\n options: { locale?: RelativeTimeLocale; now?: Date | number } = {},\n): string {\n const { locale = \"pt-BR\", now = Date.now() } = options;\n const strings = LOCALES[locale];\n const target = input instanceof Date ? input.getTime() : new Date(input).getTime();\n const nowMs = typeof now === \"number\" ? now : now.getTime();\n const diff = nowMs - target;\n const past = diff >= 0;\n const abs = Math.abs(diff);\n\n if (abs < 30 * SECOND) return strings.justNow;\n if (abs < MINUTE) {\n const n = Math.round(abs / SECOND);\n return past ? strings.secondsAgo(n) : strings.inSeconds(n);\n }\n if (abs < HOUR) {\n const n = Math.round(abs / MINUTE);\n return past ? strings.minutesAgo(n) : strings.inMinutes(n);\n }\n if (abs < DAY) {\n const n = Math.round(abs / HOUR);\n return past ? strings.hoursAgo(n) : strings.inHours(n);\n }\n if (abs < WEEK) {\n const n = Math.round(abs / DAY);\n return past ? strings.daysAgo(n) : strings.inDays(n);\n }\n if (abs < MONTH) {\n const n = Math.round(abs / WEEK);\n return past ? strings.weeksAgo(n) : strings.inWeeks(n);\n }\n if (abs < YEAR) {\n const n = Math.round(abs / MONTH);\n return past ? strings.monthsAgo(n) : strings.inMonths(n);\n }\n const n = Math.round(abs / YEAR);\n return past ? strings.yearsAgo(n) : strings.inYears(n);\n}\n"],"mappings":"AAwDA,
|
|
1
|
+
{"version":3,"file":"relative-time.cjs","names":["LOCALES","n","SECOND","MINUTE","HOUR","DAY","WEEK","MONTH","YEAR","relativeTime","options","strings","locale","target","input","diff","now","past","abs"],"sources":["../../src/utils/relative-time.ts"],"sourcesContent":["export type RelativeTimeLocale = \"pt-BR\" | \"en\";\n\ninterface Strings {\n justNow: string;\n secondsAgo: (n: number) => string;\n minutesAgo: (n: number) => string;\n hoursAgo: (n: number) => string;\n daysAgo: (n: number) => string;\n weeksAgo: (n: number) => string;\n monthsAgo: (n: number) => string;\n yearsAgo: (n: number) => string;\n inSeconds: (n: number) => string;\n inMinutes: (n: number) => string;\n inHours: (n: number) => string;\n inDays: (n: number) => string;\n inWeeks: (n: number) => string;\n inMonths: (n: number) => string;\n inYears: (n: number) => string;\n}\n\nconst PT_BR: Strings = {\n justNow: \"agora há pouco\",\n secondsAgo: (n) => `${n} s atrás`,\n minutesAgo: (n) => `${n} min atrás`,\n hoursAgo: (n) => (n === 1 ? \"1 hora atrás\" : `${n} horas atrás`),\n daysAgo: (n) => (n === 1 ? \"ontem\" : `${n} dias atrás`),\n weeksAgo: (n) => (n === 1 ? \"semana passada\" : `${n} semanas atrás`),\n monthsAgo: (n) => (n === 1 ? \"mês passado\" : `${n} meses atrás`),\n yearsAgo: (n) => (n === 1 ? \"ano passado\" : `${n} anos atrás`),\n inSeconds: (n) => `em ${n} s`,\n inMinutes: (n) => `em ${n} min`,\n inHours: (n) => `em ${n} h`,\n inDays: (n) => `em ${n} ${n === 1 ? \"dia\" : \"dias\"}`,\n inWeeks: (n) => `em ${n} ${n === 1 ? \"semana\" : \"semanas\"}`,\n inMonths: (n) => `em ${n} ${n === 1 ? \"mês\" : \"meses\"}`,\n inYears: (n) => `em ${n} ${n === 1 ? \"ano\" : \"anos\"}`,\n};\n\nconst EN: Strings = {\n justNow: \"just now\",\n secondsAgo: (n) => `${n}s ago`,\n minutesAgo: (n) => `${n}m ago`,\n hoursAgo: (n) => `${n}h ago`,\n daysAgo: (n) => (n === 1 ? \"yesterday\" : `${n} days ago`),\n weeksAgo: (n) => `${n}w ago`,\n monthsAgo: (n) => `${n}mo ago`,\n yearsAgo: (n) => `${n}y ago`,\n inSeconds: (n) => `in ${n}s`,\n inMinutes: (n) => `in ${n}m`,\n inHours: (n) => `in ${n}h`,\n inDays: (n) => `in ${n}d`,\n inWeeks: (n) => `in ${n}w`,\n inMonths: (n) => `in ${n}mo`,\n inYears: (n) => `in ${n}y`,\n};\n\nconst LOCALES: Record<RelativeTimeLocale, Strings> = { \"pt-BR\": PT_BR, en: EN };\n\nconst SECOND = 1000;\nconst MINUTE = 60 * SECOND;\nconst HOUR = 60 * MINUTE;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\nconst YEAR = 365 * DAY;\n\n/**\n * Render a `Date` / ISO string as a relative-time string. Supports past and\n * future, PT-BR (default) and English.\n *\n * @example\n * relativeTime(new Date(Date.now() - 90_000)); // \"1 min atrás\"\n * relativeTime(\"2026-05-17T10:00:00Z\", { locale: \"en\" }); // \"5h ago\"\n */\nexport function relativeTime(\n input: Date | string | number,\n options: { locale?: RelativeTimeLocale; now?: Date | number } = {},\n): string {\n const { locale = \"pt-BR\", now = Date.now() } = options;\n const strings = LOCALES[locale];\n const target = input instanceof Date ? input.getTime() : new Date(input).getTime();\n const nowMs = typeof now === \"number\" ? now : now.getTime();\n const diff = nowMs - target;\n const past = diff >= 0;\n const abs = Math.abs(diff);\n\n if (abs < 30 * SECOND) return strings.justNow;\n if (abs < MINUTE) {\n const n = Math.round(abs / SECOND);\n return past ? strings.secondsAgo(n) : strings.inSeconds(n);\n }\n if (abs < HOUR) {\n const n = Math.round(abs / MINUTE);\n return past ? strings.minutesAgo(n) : strings.inMinutes(n);\n }\n if (abs < DAY) {\n const n = Math.round(abs / HOUR);\n return past ? strings.hoursAgo(n) : strings.inHours(n);\n }\n if (abs < WEEK) {\n const n = Math.round(abs / DAY);\n return past ? strings.daysAgo(n) : strings.inDays(n);\n }\n if (abs < MONTH) {\n const n = Math.round(abs / WEEK);\n return past ? strings.weeksAgo(n) : strings.inWeeks(n);\n }\n if (abs < YEAR) {\n const n = Math.round(abs / MONTH);\n return past ? strings.monthsAgo(n) : strings.inMonths(n);\n }\n const n = Math.round(abs / YEAR);\n return past ? strings.yearsAgo(n) : strings.inYears(n);\n}\n"],"mappings":"AAwDA,IAAMA,EAA+C,CAAE,QAAS,CAnC5D,QAAS,iBACT,WAAa,GAAM,GAAGC,EAAE,UACxB,WAAa,GAAM,GAAGA,EAAE,YACxB,SAAW,GAAOA,IAAM,EAAI,eAAiB,GAAGA,EAAE,cAClD,QAAU,GAAOA,IAAM,EAAI,QAAU,GAAGA,EAAE,aAC1C,SAAW,GAAOA,IAAM,EAAI,iBAAmB,GAAGA,EAAE,gBACpD,UAAY,GAAOA,IAAM,EAAI,cAAgB,GAAGA,EAAE,cAClD,SAAW,GAAOA,IAAM,EAAI,cAAgB,GAAGA,EAAE,aACjD,UAAY,GAAM,MAAMA,EAAE,IAC1B,UAAY,GAAM,MAAMA,EAAE,MAC1B,QAAU,GAAM,MAAMA,EAAE,IACxB,OAAS,GAAM,MAAMA,EAAE,GAAGA,IAAM,EAAI,MAAQ,SAC5C,QAAU,GAAM,MAAMA,EAAE,GAAGA,IAAM,EAAI,SAAW,YAChD,SAAW,GAAM,MAAMA,EAAE,GAAGA,IAAM,EAAI,MAAQ,UAC9C,QAAU,GAAM,MAAMA,EAAE,GAAGA,IAAM,EAAI,MAAQ,QAqBe,EAAO,GAAI,CAjBvE,QAAS,WACT,WAAa,GAAM,GAAGA,EAAE,OACxB,WAAa,GAAM,GAAGA,EAAE,OACxB,SAAW,GAAM,GAAGA,EAAE,OACtB,QAAU,GAAOA,IAAM,EAAI,YAAc,GAAGA,EAAE,WAC9C,SAAW,GAAM,GAAGA,EAAE,OACtB,UAAY,GAAM,GAAGA,EAAE,QACvB,SAAW,GAAM,GAAGA,EAAE,OACtB,UAAY,GAAM,MAAMA,EAAE,GAC1B,UAAY,GAAM,MAAMA,EAAE,GAC1B,QAAU,GAAM,MAAMA,EAAE,GACxB,OAAS,GAAM,MAAMA,EAAE,GACvB,QAAU,GAAM,MAAMA,EAAE,GACxB,SAAW,GAAM,MAAMA,EAAE,IACzB,QAAU,GAAM,MAAMA,EAAE,EAG+C,CAAG,EAExEC,EAAS,IACTC,EAAS,GAAKD,EACdE,EAAO,GAAKD,EACZE,EAAM,GAAKD,EACXE,EAAO,EAAID,EACXE,EAAQ,GAAKF,EACbG,EAAO,IAAMH,EAUnB,SAAgBI,EACZ,EACA,EAAgE,CAAC,EAC3D,CACN,GAAM,CAAE,SAAS,QAAS,MAAM,KAAK,IAAI,GAAMC,EACzCC,EAAUX,EAAQY,GAClBC,EAASC,aAAiB,KAAOA,EAAM,QAAQ,EAAI,IAAI,KAAKA,CAAK,CAAC,CAAC,QAAQ,EAE3EC,GADQ,OAAOC,GAAQ,SAAWA,EAAMA,EAAI,QAAQ,GACrCH,EACfI,EAAOF,GAAQ,EACfG,EAAM,KAAK,IAAIH,CAAI,EAEzB,GAAIG,EAAM,GAAKhB,EAAQ,OAAOS,EAAQ,QACtC,GAAIO,EAAMf,EAAQ,CACd,IAAMF,EAAI,KAAK,MAAMiB,EAAMhB,CAAM,EACjC,OAAOe,EAAON,EAAQ,WAAWV,CAAC,EAAIU,EAAQ,UAAUV,CAAC,CAC7D,CACA,GAAIiB,EAAMd,EAAM,CACZ,IAAMH,EAAI,KAAK,MAAMiB,EAAMf,CAAM,EACjC,OAAOc,EAAON,EAAQ,WAAWV,CAAC,EAAIU,EAAQ,UAAUV,CAAC,CAC7D,CACA,GAAIiB,EAAMb,EAAK,CACX,IAAMJ,EAAI,KAAK,MAAMiB,EAAMd,CAAI,EAC/B,OAAOa,EAAON,EAAQ,SAASV,CAAC,EAAIU,EAAQ,QAAQV,CAAC,CACzD,CACA,GAAIiB,EAAMZ,EAAM,CACZ,IAAML,EAAI,KAAK,MAAMiB,EAAMb,CAAG,EAC9B,OAAOY,EAAON,EAAQ,QAAQV,CAAC,EAAIU,EAAQ,OAAOV,CAAC,CACvD,CACA,GAAIiB,EAAMX,EAAO,CACb,IAAMN,EAAI,KAAK,MAAMiB,EAAMZ,CAAI,EAC/B,OAAOW,EAAON,EAAQ,SAASV,CAAC,EAAIU,EAAQ,QAAQV,CAAC,CACzD,CACA,GAAIiB,EAAMV,EAAM,CACZ,IAAMP,EAAI,KAAK,MAAMiB,EAAMX,CAAK,EAChC,OAAOU,EAAON,EAAQ,UAAUV,CAAC,EAAIU,EAAQ,SAASV,CAAC,CAC3D,CACA,IAAMA,EAAI,KAAK,MAAMiB,EAAMV,CAAI,EAC/B,OAAOS,EAAON,EAAQ,SAASV,CAAC,EAAIU,EAAQ,QAAQV,CAAC,CACzD,C"}
|