@oxy.so/bloom 23.1.0 → 23.3.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/NOTICE +1 -2
- package/README.md +1 -1
- package/docs/adoption-matrix.mdx +1 -2
- package/docs/bloom-language-codemod.mdx +4 -2
- package/docs/bloom-language-for-agents.mdx +1 -0
- package/docs/bloom-language.mdx +9 -1
- package/docs/page-header.mdx +3 -3
- package/docs/public-parts.mdx +2 -5
- package/docs/semantic-composition.mdx +2 -2
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/docs/verification.mdx +1 -1
- package/docs/zoomable-media-gallery.mdx +33 -3
- package/lib/commonjs/agent-chat/shared.js +1 -3
- package/lib/commonjs/agent-chat/shared.js.map +1 -1
- package/lib/commonjs/agent-progress/AgentProgressPlan.js +1 -2
- package/lib/commonjs/agent-progress/AgentProgressPlan.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChatGalleryPanelBase.js +9 -9
- package/lib/commonjs/ai-chat/AiChatGalleryPanelBase.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChatImageGenerationBase.js +6 -6
- package/lib/commonjs/ai-chat/AiChatImageGenerationBase.js.map +1 -1
- package/lib/commonjs/app-shell/use-shell-viewport.js +0 -11
- package/lib/commonjs/app-shell/use-shell-viewport.js.map +1 -1
- package/lib/commonjs/avatar/Avatar.js +37 -18
- package/lib/commonjs/avatar/Avatar.js.map +1 -1
- package/lib/commonjs/avatar/LiveBadge.js +6 -1
- package/lib/commonjs/avatar/LiveBadge.js.map +1 -1
- package/lib/commonjs/avatar-flight/create-avatar-flight-layer.js +5 -5
- package/lib/commonjs/avatar-flight/create-avatar-flight-layer.js.map +1 -1
- package/lib/commonjs/button/shared.js +0 -7
- package/lib/commonjs/button/shared.js.map +1 -1
- package/lib/commonjs/canvas/CanvasPanelBase.js +2 -2
- package/lib/commonjs/canvas/CanvasPanelBase.js.map +1 -1
- package/lib/commonjs/card/SelectionCard.js +11 -11
- package/lib/commonjs/card/SelectionCard.js.map +1 -1
- package/lib/commonjs/chat-composer/shared.js +0 -7
- package/lib/commonjs/chat-composer/shared.js.map +1 -1
- package/lib/commonjs/chat-list/shared.js +1 -8
- package/lib/commonjs/chat-list/shared.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +2 -2
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/composer-panel/ModelPickerBase.js +2 -1
- package/lib/commonjs/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/commonjs/composer-panel/shared.js +0 -7
- package/lib/commonjs/composer-panel/shared.js.map +1 -1
- package/lib/commonjs/content-panel/ContentPanel.web.js +12 -35
- package/lib/commonjs/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/commonjs/cover-header/CoverHeader.js +1 -2
- package/lib/commonjs/cover-header/CoverHeader.js.map +1 -1
- package/lib/commonjs/dialog/DetailDialogMotion.js +1 -2
- package/lib/commonjs/dialog/DetailDialogMotion.js.map +1 -1
- package/lib/commonjs/floating/FloatingPanel.js +3 -3
- package/lib/commonjs/floating/FloatingPanel.js.map +1 -1
- package/lib/commonjs/floating/TriggerSlot.js +2 -2
- package/lib/commonjs/floating/TriggerSlot.js.map +1 -1
- package/lib/commonjs/floating/constants.js +1 -1
- package/lib/commonjs/floating/menu-swatch-row.js +2 -2
- package/lib/commonjs/floating/menu-swatch-row.js.map +1 -1
- package/lib/commonjs/floating/shared.js +2 -2
- package/lib/commonjs/floating/shared.js.map +1 -1
- package/lib/commonjs/image/BloomImage.js +4 -0
- package/lib/commonjs/image/BloomImage.js.map +1 -1
- package/lib/commonjs/image/expo-image-module.js.map +1 -1
- package/lib/commonjs/link-preview/LinkPreviewCard.js +21 -5
- package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/commonjs/lyrics/shared.js +0 -12
- package/lib/commonjs/lyrics/shared.js.map +1 -1
- package/lib/commonjs/mail-list/shared.js +1 -11
- package/lib/commonjs/mail-list/shared.js.map +1 -1
- package/lib/commonjs/media-card/shared.js +0 -12
- package/lib/commonjs/media-card/shared.js.map +1 -1
- package/lib/commonjs/media-flight/MediaSurface.js +34 -12
- package/lib/commonjs/media-flight/MediaSurface.js.map +1 -1
- package/lib/commonjs/media-header/shared.js +0 -12
- package/lib/commonjs/media-header/shared.js.map +1 -1
- package/lib/commonjs/media-player/shared.js +0 -12
- package/lib/commonjs/media-player/shared.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/Marketplace.js +3 -3
- package/lib/commonjs/multi-agent-chat/Marketplace.js.map +1 -1
- package/lib/commonjs/music-library/shared.js +0 -12
- package/lib/commonjs/music-library/shared.js.map +1 -1
- package/lib/commonjs/page-header/EdgeScrim.js +19 -16
- package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +10 -2
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardCanvas.js +2 -2
- package/lib/commonjs/project-board/ProjectBoardCanvas.js.map +1 -1
- package/lib/commonjs/property-insights/shared.js +1 -14
- package/lib/commonjs/property-insights/shared.js.map +1 -1
- package/lib/commonjs/radio/RadioHost.js +2 -2
- package/lib/commonjs/radio/RadioHost.js.map +1 -1
- package/lib/commonjs/select/Select.js +2 -2
- package/lib/commonjs/select/Select.js.map +1 -1
- package/lib/commonjs/select/Select.web.js +2 -2
- package/lib/commonjs/select/Select.web.js.map +1 -1
- package/lib/commonjs/select/shared.js +2 -2
- package/lib/commonjs/select/shared.js.map +1 -1
- package/lib/commonjs/shapes/Image.js +11 -3
- package/lib/commonjs/shapes/Image.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarItem.js +2 -2
- package/lib/commonjs/sidebar/SidebarItem.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarOnboardingCard.js +2 -2
- package/lib/commonjs/sidebar/SidebarOnboardingCard.js.map +1 -1
- package/lib/commonjs/sidebar/parts.js +0 -50
- package/lib/commonjs/sidebar/parts.js.map +1 -1
- package/lib/commonjs/stay-filters/EnergyRatingFilter.js +0 -6
- package/lib/commonjs/stay-filters/EnergyRatingFilter.js.map +1 -1
- package/lib/commonjs/styles/aria-hosts.js +20 -0
- package/lib/commonjs/styles/aria-hosts.js.map +1 -0
- package/lib/commonjs/surface/Surface.js +8 -2
- package/lib/commonjs/surface/Surface.js.map +1 -1
- package/lib/commonjs/surface/Surface.web.js +1 -2
- package/lib/commonjs/surface/Surface.web.js.map +1 -1
- package/lib/commonjs/surface/SurfacePaint.js +1 -2
- package/lib/commonjs/surface/SurfacePaint.js.map +1 -1
- package/lib/commonjs/toast/animations.js +1 -2
- package/lib/commonjs/toast/animations.js.map +1 -1
- package/lib/commonjs/typography/TypographyScope.js +0 -6
- package/lib/commonjs/typography/TypographyScope.js.map +1 -1
- package/lib/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.js +255 -258
- package/lib/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.js.map +1 -1
- package/lib/module/agent-chat/shared.js +0 -2
- package/lib/module/agent-chat/shared.js.map +1 -1
- package/lib/module/agent-progress/AgentProgressPlan.js +1 -2
- package/lib/module/agent-progress/AgentProgressPlan.js.map +1 -1
- package/lib/module/ai-chat/AiChatGalleryPanelBase.js +1 -1
- package/lib/module/ai-chat/AiChatGalleryPanelBase.js.map +1 -1
- package/lib/module/ai-chat/AiChatImageGenerationBase.js +1 -1
- package/lib/module/ai-chat/AiChatImageGenerationBase.js.map +1 -1
- package/lib/module/app-shell/use-shell-viewport.js +1 -11
- package/lib/module/app-shell/use-shell-viewport.js.map +1 -1
- package/lib/module/avatar/Avatar.js +37 -18
- package/lib/module/avatar/Avatar.js.map +1 -1
- package/lib/module/avatar/LiveBadge.js +6 -1
- package/lib/module/avatar/LiveBadge.js.map +1 -1
- package/lib/module/avatar-flight/create-avatar-flight-layer.js +6 -6
- package/lib/module/avatar-flight/create-avatar-flight-layer.js.map +1 -1
- package/lib/module/button/shared.js +0 -6
- package/lib/module/button/shared.js.map +1 -1
- package/lib/module/canvas/CanvasPanelBase.js +2 -2
- package/lib/module/canvas/CanvasPanelBase.js.map +1 -1
- package/lib/module/card/SelectionCard.js +1 -1
- package/lib/module/card/SelectionCard.js.map +1 -1
- package/lib/module/chat-composer/shared.js +1 -1
- package/lib/module/chat-composer/shared.js.map +1 -1
- package/lib/module/chat-list/shared.js +0 -7
- package/lib/module/chat-list/shared.js.map +1 -1
- package/lib/module/chip/Chip.js +2 -2
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/composer-panel/ModelPickerBase.js +2 -1
- package/lib/module/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/module/composer-panel/shared.js +0 -1
- package/lib/module/composer-panel/shared.js.map +1 -1
- package/lib/module/content-panel/ContentPanel.web.js +12 -35
- package/lib/module/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/module/cover-header/CoverHeader.js +1 -2
- package/lib/module/cover-header/CoverHeader.js.map +1 -1
- package/lib/module/dialog/DetailDialogMotion.js +2 -3
- package/lib/module/dialog/DetailDialogMotion.js.map +1 -1
- package/lib/module/floating/FloatingPanel.js +3 -3
- package/lib/module/floating/FloatingPanel.js.map +1 -1
- package/lib/module/floating/TriggerSlot.js +2 -2
- package/lib/module/floating/TriggerSlot.js.map +1 -1
- package/lib/module/floating/constants.js +1 -1
- package/lib/module/floating/menu-swatch-row.js +2 -2
- package/lib/module/floating/menu-swatch-row.js.map +1 -1
- package/lib/module/floating/shared.js +2 -2
- package/lib/module/floating/shared.js.map +1 -1
- package/lib/module/image/BloomImage.js +4 -0
- package/lib/module/image/BloomImage.js.map +1 -1
- package/lib/module/image/expo-image-module.js.map +1 -1
- package/lib/module/link-preview/LinkPreviewCard.js +21 -5
- package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/module/lyrics/shared.js +1 -2
- package/lib/module/lyrics/shared.js.map +1 -1
- package/lib/module/mail-list/shared.js +0 -9
- package/lib/module/mail-list/shared.js.map +1 -1
- package/lib/module/media-card/shared.js +1 -2
- package/lib/module/media-card/shared.js.map +1 -1
- package/lib/module/media-flight/MediaSurface.js +34 -12
- package/lib/module/media-flight/MediaSurface.js.map +1 -1
- package/lib/module/media-header/shared.js +1 -2
- package/lib/module/media-header/shared.js.map +1 -1
- package/lib/module/media-player/shared.js +1 -2
- package/lib/module/media-player/shared.js.map +1 -1
- package/lib/module/multi-agent-chat/Marketplace.js +3 -3
- package/lib/module/multi-agent-chat/Marketplace.js.map +1 -1
- package/lib/module/music-library/shared.js +0 -1
- package/lib/module/music-library/shared.js.map +1 -1
- package/lib/module/page-header/EdgeScrim.js +19 -16
- package/lib/module/page-header/EdgeScrim.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +11 -3
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/project-board/ProjectBoardCanvas.js +2 -2
- package/lib/module/project-board/ProjectBoardCanvas.js.map +1 -1
- package/lib/module/property-insights/shared.js +1 -2
- package/lib/module/property-insights/shared.js.map +1 -1
- package/lib/module/radio/RadioHost.js +2 -2
- package/lib/module/radio/RadioHost.js.map +1 -1
- package/lib/module/select/Select.js +2 -2
- package/lib/module/select/Select.js.map +1 -1
- package/lib/module/select/Select.web.js +2 -2
- package/lib/module/select/Select.web.js.map +1 -1
- package/lib/module/select/shared.js +2 -2
- package/lib/module/select/shared.js.map +1 -1
- package/lib/module/shapes/Image.js +11 -3
- package/lib/module/shapes/Image.js.map +1 -1
- package/lib/module/sidebar/SidebarItem.js +2 -2
- package/lib/module/sidebar/SidebarItem.js.map +1 -1
- package/lib/module/sidebar/SidebarOnboardingCard.js +2 -2
- package/lib/module/sidebar/SidebarOnboardingCard.js.map +1 -1
- package/lib/module/sidebar/parts.js +3 -52
- package/lib/module/sidebar/parts.js.map +1 -1
- package/lib/module/stay-filters/EnergyRatingFilter.js +0 -1
- package/lib/module/stay-filters/EnergyRatingFilter.js.map +1 -1
- package/lib/module/styles/aria-hosts.js +16 -0
- package/lib/module/styles/aria-hosts.js.map +1 -0
- package/lib/module/surface/Surface.js +11 -5
- package/lib/module/surface/Surface.js.map +1 -1
- package/lib/module/surface/Surface.web.js +2 -3
- package/lib/module/surface/Surface.web.js.map +1 -1
- package/lib/module/surface/SurfacePaint.js +1 -2
- package/lib/module/surface/SurfacePaint.js.map +1 -1
- package/lib/module/toast/animations.js +0 -1
- package/lib/module/toast/animations.js.map +1 -1
- package/lib/module/typography/TypographyScope.js +0 -5
- package/lib/module/typography/TypographyScope.js.map +1 -1
- package/lib/module/zoomable-media-gallery/ZoomableMediaGalleryBase.js +256 -259
- package/lib/module/zoomable-media-gallery/ZoomableMediaGalleryBase.js.map +1 -1
- package/lib/typescript/commonjs/agent-chat/shared.d.ts +0 -2
- package/lib/typescript/commonjs/agent-chat/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-progress/AgentProgressPlan.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-shell-viewport.d.ts +0 -1
- package/lib/typescript/commonjs/app-shell/use-shell-viewport.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/LiveBadge.d.ts +6 -2
- package/lib/typescript/commonjs/avatar/LiveBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/shared.d.ts +0 -2
- package/lib/typescript/commonjs/button/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/types.d.ts +1 -1
- package/lib/typescript/commonjs/button/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/shared.d.ts +0 -1
- package/lib/typescript/commonjs/chat-composer/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-list/shared.d.ts +0 -9
- package/lib/typescript/commonjs/chat-list/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/shared.d.ts +0 -1
- package/lib/typescript/commonjs/composer-panel/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts +9 -11
- package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/cover-header/CoverHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/constants.d.ts +1 -1
- package/lib/typescript/commonjs/floating/shared.d.ts +1 -1
- package/lib/typescript/commonjs/floating/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/types.d.ts +2 -2
- package/lib/typescript/commonjs/floating/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/image/BloomImage.d.ts +1 -1
- package/lib/typescript/commonjs/image/BloomImage.d.ts.map +1 -1
- package/lib/typescript/commonjs/image/expo-image-module.d.ts +3 -1
- package/lib/typescript/commonjs/image/expo-image-module.d.ts.map +1 -1
- package/lib/typescript/commonjs/image/index.d.ts +1 -1
- package/lib/typescript/commonjs/image/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/image/types.d.ts +18 -0
- package/lib/typescript/commonjs/image/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/link-preview/types.d.ts +7 -0
- package/lib/typescript/commonjs/link-preview/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/lyrics/shared.d.ts +0 -2
- package/lib/typescript/commonjs/lyrics/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-list/shared.d.ts +0 -9
- package/lib/typescript/commonjs/mail-list/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/shared.d.ts +0 -2
- package/lib/typescript/commonjs/media-card/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts +10 -1
- package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-header/shared.d.ts +0 -2
- package/lib/typescript/commonjs/media-header/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-header/types.d.ts +1 -1
- package/lib/typescript/commonjs/media-header/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-player/PlayerIconButton.d.ts +1 -1
- package/lib/typescript/commonjs/media-player/PlayerIconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-player/shared.d.ts +0 -2
- package/lib/typescript/commonjs/media-player/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/music-library/shared.d.ts +0 -2
- package/lib/typescript/commonjs/music-library/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +19 -16
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/property-insights/shared.d.ts +0 -2
- package/lib/typescript/commonjs/property-insights/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts +1 -1
- package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/shapes/Image.d.ts +1 -1
- package/lib/typescript/commonjs/shapes/Image.d.ts.map +1 -1
- package/lib/typescript/commonjs/shapes/types.d.ts +10 -0
- package/lib/typescript/commonjs/shapes/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/parts.d.ts +0 -6
- package/lib/typescript/commonjs/sidebar/parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-filters/EnergyRatingFilter.d.ts +1 -2
- package/lib/typescript/commonjs/stay-filters/EnergyRatingFilter.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/aria-hosts.d.ts +49 -0
- package/lib/typescript/commonjs/styles/aria-hosts.d.ts.map +1 -0
- package/lib/typescript/commonjs/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/commonjs/surface/Surface.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/surface/SurfacePaint.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/animations.d.ts +0 -1
- package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -1
- package/lib/typescript/commonjs/track-list/parts.d.ts +1 -1
- package/lib/typescript/commonjs/track-list/parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/typography/TypographyScope.d.ts +0 -4
- package/lib/typescript/commonjs/typography/TypographyScope.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts +11 -0
- package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts.map +1 -1
- package/lib/typescript/module/agent-chat/shared.d.ts +0 -2
- package/lib/typescript/module/agent-chat/shared.d.ts.map +1 -1
- package/lib/typescript/module/agent-progress/AgentProgressPlan.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-shell-viewport.d.ts +0 -1
- package/lib/typescript/module/app-shell/use-shell-viewport.d.ts.map +1 -1
- package/lib/typescript/module/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/module/avatar/LiveBadge.d.ts +6 -2
- package/lib/typescript/module/avatar/LiveBadge.d.ts.map +1 -1
- package/lib/typescript/module/button/shared.d.ts +0 -2
- package/lib/typescript/module/button/shared.d.ts.map +1 -1
- package/lib/typescript/module/button/types.d.ts +1 -1
- package/lib/typescript/module/button/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/shared.d.ts +0 -1
- package/lib/typescript/module/chat-composer/shared.d.ts.map +1 -1
- package/lib/typescript/module/chat-list/shared.d.ts +0 -9
- package/lib/typescript/module/chat-list/shared.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/shared.d.ts +0 -1
- package/lib/typescript/module/composer-panel/shared.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/ContentPanel.web.d.ts +9 -11
- package/lib/typescript/module/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/module/cover-header/CoverHeader.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DetailDialogMotion.d.ts.map +1 -1
- package/lib/typescript/module/floating/constants.d.ts +1 -1
- package/lib/typescript/module/floating/shared.d.ts +1 -1
- package/lib/typescript/module/floating/shared.d.ts.map +1 -1
- package/lib/typescript/module/floating/types.d.ts +2 -2
- package/lib/typescript/module/floating/types.d.ts.map +1 -1
- package/lib/typescript/module/image/BloomImage.d.ts +1 -1
- package/lib/typescript/module/image/BloomImage.d.ts.map +1 -1
- package/lib/typescript/module/image/expo-image-module.d.ts +3 -1
- package/lib/typescript/module/image/expo-image-module.d.ts.map +1 -1
- package/lib/typescript/module/image/index.d.ts +1 -1
- package/lib/typescript/module/image/index.d.ts.map +1 -1
- package/lib/typescript/module/image/types.d.ts +18 -0
- package/lib/typescript/module/image/types.d.ts.map +1 -1
- package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts.map +1 -1
- package/lib/typescript/module/link-preview/types.d.ts +7 -0
- package/lib/typescript/module/link-preview/types.d.ts.map +1 -1
- package/lib/typescript/module/lyrics/shared.d.ts +0 -2
- package/lib/typescript/module/lyrics/shared.d.ts.map +1 -1
- package/lib/typescript/module/mail-list/shared.d.ts +0 -9
- package/lib/typescript/module/mail-list/shared.d.ts.map +1 -1
- package/lib/typescript/module/media-card/shared.d.ts +0 -2
- package/lib/typescript/module/media-card/shared.d.ts.map +1 -1
- package/lib/typescript/module/media-flight/MediaSurface.d.ts +10 -1
- package/lib/typescript/module/media-flight/MediaSurface.d.ts.map +1 -1
- package/lib/typescript/module/media-header/shared.d.ts +0 -2
- package/lib/typescript/module/media-header/shared.d.ts.map +1 -1
- package/lib/typescript/module/media-header/types.d.ts +1 -1
- package/lib/typescript/module/media-header/types.d.ts.map +1 -1
- package/lib/typescript/module/media-player/PlayerIconButton.d.ts +1 -1
- package/lib/typescript/module/media-player/PlayerIconButton.d.ts.map +1 -1
- package/lib/typescript/module/media-player/shared.d.ts +0 -2
- package/lib/typescript/module/media-player/shared.d.ts.map +1 -1
- package/lib/typescript/module/music-library/shared.d.ts +0 -2
- package/lib/typescript/module/music-library/shared.d.ts.map +1 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts +19 -16
- package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/property-insights/shared.d.ts +0 -2
- package/lib/typescript/module/property-insights/shared.d.ts.map +1 -1
- package/lib/typescript/module/queue-panel/QueueIconButton.d.ts +1 -1
- package/lib/typescript/module/queue-panel/QueueIconButton.d.ts.map +1 -1
- package/lib/typescript/module/shapes/Image.d.ts +1 -1
- package/lib/typescript/module/shapes/Image.d.ts.map +1 -1
- package/lib/typescript/module/shapes/types.d.ts +10 -0
- package/lib/typescript/module/shapes/types.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/parts.d.ts +0 -6
- package/lib/typescript/module/sidebar/parts.d.ts.map +1 -1
- package/lib/typescript/module/stay-filters/EnergyRatingFilter.d.ts +1 -2
- package/lib/typescript/module/stay-filters/EnergyRatingFilter.d.ts.map +1 -1
- package/lib/typescript/module/styles/aria-hosts.d.ts +49 -0
- package/lib/typescript/module/styles/aria-hosts.d.ts.map +1 -0
- package/lib/typescript/module/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/module/surface/Surface.web.d.ts.map +1 -1
- package/lib/typescript/module/surface/SurfacePaint.d.ts.map +1 -1
- package/lib/typescript/module/toast/animations.d.ts +0 -1
- package/lib/typescript/module/toast/animations.d.ts.map +1 -1
- package/lib/typescript/module/track-list/parts.d.ts +1 -1
- package/lib/typescript/module/track-list/parts.d.ts.map +1 -1
- package/lib/typescript/module/typography/TypographyScope.d.ts +0 -4
- package/lib/typescript/module/typography/TypographyScope.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-media-gallery/ZoomableMediaGalleryBase.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-media-gallery/types.d.ts +11 -0
- package/lib/typescript/module/zoomable-media-gallery/types.d.ts.map +1 -1
- package/package.json +1 -18
- package/src/__tests__/support/held-animations.ts +33 -0
- package/src/__tests__/support/public-part-classifications.json +0 -3
- package/src/agent-chat/shared.ts +0 -2
- package/src/agent-progress/AgentProgressPlan.tsx +2 -3
- package/src/ai-chat/AiChatGalleryPanelBase.tsx +1 -1
- package/src/ai-chat/AiChatImageGenerationBase.tsx +1 -1
- package/src/app-shell/use-shell-viewport.ts +1 -7
- package/src/avatar/Avatar.tsx +44 -16
- package/src/avatar/LiveBadge.tsx +10 -3
- package/src/avatar-flight/create-avatar-flight-layer.tsx +8 -8
- package/src/button/shared.ts +0 -6
- package/src/button/types.ts +1 -1
- package/src/canvas/CanvasPanelBase.tsx +3 -3
- package/src/card/SelectionCard.tsx +1 -1
- package/src/chat-composer/shared.ts +0 -1
- package/src/chat-list/shared.ts +0 -7
- package/src/chip/Chip.tsx +3 -3
- package/src/composer-panel/ModelPickerBase.tsx +1 -1
- package/src/composer-panel/shared.ts +0 -1
- package/src/content-panel/ContentPanel.web.tsx +12 -35
- package/src/cover-header/CoverHeader.tsx +2 -3
- package/src/dialog/DetailDialogMotion.tsx +2 -3
- package/src/floating/FloatingPanel.tsx +3 -3
- package/src/floating/TriggerSlot.tsx +2 -2
- package/src/floating/constants.ts +1 -1
- package/src/floating/menu-swatch-row.tsx +3 -3
- package/src/floating/shared.tsx +3 -3
- package/src/floating/types.ts +2 -2
- package/src/image/BloomImage.tsx +4 -0
- package/src/image/expo-image-module.ts +3 -1
- package/src/image/index.ts +1 -0
- package/src/image/types.ts +19 -0
- package/src/link-preview/LinkPreviewCard.tsx +27 -5
- package/src/link-preview/types.ts +7 -0
- package/src/lyrics/shared.ts +0 -3
- package/src/mail-list/shared.ts +0 -9
- package/src/media-card/shared.ts +1 -9
- package/src/media-flight/MediaSurface.tsx +46 -8
- package/src/media-header/shared.ts +1 -8
- package/src/media-header/types.ts +1 -1
- package/src/media-player/PlayerIconButton.tsx +1 -1
- package/src/media-player/shared.ts +1 -8
- package/src/multi-agent-chat/Marketplace.tsx +5 -5
- package/src/music-library/shared.ts +0 -2
- package/src/page-header/EdgeScrim.tsx +17 -14
- package/src/page-header/PageHeader.tsx +11 -6
- package/src/project-board/ProjectBoardCanvas.tsx +3 -3
- package/src/property-insights/shared.ts +1 -3
- package/src/queue-panel/QueueIconButton.tsx +1 -1
- package/src/radio/RadioHost.tsx +2 -2
- package/src/select/Select.tsx +3 -3
- package/src/select/Select.web.tsx +3 -3
- package/src/select/shared.tsx +3 -3
- package/src/shapes/Image.tsx +18 -2
- package/src/shapes/types.ts +10 -0
- package/src/sidebar/SidebarItem.tsx +2 -2
- package/src/sidebar/SidebarOnboardingCard.tsx +3 -3
- package/src/sidebar/parts.tsx +3 -36
- package/src/stay-filters/EnergyRatingFilter.tsx +0 -2
- package/src/styles/aria-hosts.ts +62 -0
- package/src/surface/Surface.tsx +12 -6
- package/src/surface/Surface.web.tsx +3 -4
- package/src/surface/SurfacePaint.tsx +1 -2
- package/src/toast/animations.ts +0 -1
- package/src/track-list/parts.tsx +1 -1
- package/src/typography/TypographyScope.tsx +0 -5
- package/src/zoomable-media-gallery/ZoomableMediaGalleryBase.tsx +368 -324
- package/src/zoomable-media-gallery/types.ts +11 -0
- package/docs/teleport.mdx +0 -72
- package/lib/commonjs/styles/styled-primitives.js +0 -37
- package/lib/commonjs/styles/styled-primitives.js.map +0 -1
- package/lib/commonjs/teleport/Portal.js +0 -109
- package/lib/commonjs/teleport/Portal.js.map +0 -1
- package/lib/commonjs/teleport/PortalHost.js +0 -75
- package/lib/commonjs/teleport/PortalHost.js.map +0 -1
- package/lib/commonjs/teleport/PortalHostView.js +0 -40
- package/lib/commonjs/teleport/PortalHostView.js.map +0 -1
- package/lib/commonjs/teleport/PortalHostView.native.js +0 -24
- package/lib/commonjs/teleport/PortalHostView.native.js.map +0 -1
- package/lib/commonjs/teleport/PortalProvider.js +0 -57
- package/lib/commonjs/teleport/PortalProvider.js.map +0 -1
- package/lib/commonjs/teleport/PortalProviderView.js +0 -59
- package/lib/commonjs/teleport/PortalProviderView.js.map +0 -1
- package/lib/commonjs/teleport/PortalProviderView.native.js +0 -19
- package/lib/commonjs/teleport/PortalProviderView.native.js.map +0 -1
- package/lib/commonjs/teleport/PortalView.js +0 -83
- package/lib/commonjs/teleport/PortalView.js.map +0 -1
- package/lib/commonjs/teleport/PortalView.native.js +0 -14
- package/lib/commonjs/teleport/PortalView.native.js.map +0 -1
- package/lib/commonjs/teleport/index.js +0 -35
- package/lib/commonjs/teleport/index.js.map +0 -1
- package/lib/commonjs/teleport/portal-manager.js +0 -40
- package/lib/commonjs/teleport/portal-manager.js.map +0 -1
- package/lib/commonjs/teleport/portal-registry.js +0 -24
- package/lib/commonjs/teleport/portal-registry.js.map +0 -1
- package/lib/commonjs/teleport/reducer.js +0 -86
- package/lib/commonjs/teleport/reducer.js.map +0 -1
- package/lib/commonjs/teleport/scroll-view-context/context.js +0 -17
- package/lib/commonjs/teleport/scroll-view-context/context.js.map +0 -1
- package/lib/commonjs/teleport/scroll-view-context/context.native.js +0 -22
- package/lib/commonjs/teleport/scroll-view-context/context.native.js.map +0 -1
- package/lib/commonjs/teleport/scroll-view-context/types.js +0 -2
- package/lib/commonjs/teleport/scroll-view-context/types.js.map +0 -1
- package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js +0 -17
- package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js.map +0 -1
- package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js +0 -17
- package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js.map +0 -1
- package/lib/commonjs/teleport/teleport-global.d.ts +0 -11
- package/lib/commonjs/teleport/types.js +0 -6
- package/lib/commonjs/teleport/types.js.map +0 -1
- package/lib/commonjs/teleport/use-id.js +0 -24
- package/lib/commonjs/teleport/use-id.js.map +0 -1
- package/lib/commonjs/teleport/use-portal.js +0 -59
- package/lib/commonjs/teleport/use-portal.js.map +0 -1
- package/lib/module/styles/styled-primitives.js +0 -34
- package/lib/module/styles/styled-primitives.js.map +0 -1
- package/lib/module/teleport/Portal.js +0 -103
- package/lib/module/teleport/Portal.js.map +0 -1
- package/lib/module/teleport/PortalHost.js +0 -71
- package/lib/module/teleport/PortalHost.js.map +0 -1
- package/lib/module/teleport/PortalHostView.js +0 -35
- package/lib/module/teleport/PortalHostView.js.map +0 -1
- package/lib/module/teleport/PortalHostView.native.js +0 -18
- package/lib/module/teleport/PortalHostView.native.js.map +0 -1
- package/lib/module/teleport/PortalProvider.js +0 -51
- package/lib/module/teleport/PortalProvider.js.map +0 -1
- package/lib/module/teleport/PortalProviderView.js +0 -54
- package/lib/module/teleport/PortalProviderView.js.map +0 -1
- package/lib/module/teleport/PortalProviderView.native.js +0 -15
- package/lib/module/teleport/PortalProviderView.native.js.map +0 -1
- package/lib/module/teleport/PortalView.js +0 -79
- package/lib/module/teleport/PortalView.js.map +0 -1
- package/lib/module/teleport/PortalView.native.js +0 -10
- package/lib/module/teleport/PortalView.native.js.map +0 -1
- package/lib/module/teleport/index.js +0 -30
- package/lib/module/teleport/index.js.map +0 -1
- package/lib/module/teleport/portal-manager.js +0 -33
- package/lib/module/teleport/portal-manager.js.map +0 -1
- package/lib/module/teleport/portal-registry.js +0 -18
- package/lib/module/teleport/portal-registry.js.map +0 -1
- package/lib/module/teleport/reducer.js +0 -81
- package/lib/module/teleport/reducer.js.map +0 -1
- package/lib/module/teleport/scroll-view-context/context.js +0 -12
- package/lib/module/teleport/scroll-view-context/context.js.map +0 -1
- package/lib/module/teleport/scroll-view-context/context.native.js +0 -18
- package/lib/module/teleport/scroll-view-context/context.native.js.map +0 -1
- package/lib/module/teleport/scroll-view-context/types.js +0 -2
- package/lib/module/teleport/scroll-view-context/types.js.map +0 -1
- package/lib/module/teleport/specs/PortalHostViewNativeComponent.js +0 -13
- package/lib/module/teleport/specs/PortalHostViewNativeComponent.js.map +0 -1
- package/lib/module/teleport/specs/PortalViewNativeComponent.js +0 -13
- package/lib/module/teleport/specs/PortalViewNativeComponent.js.map +0 -1
- package/lib/module/teleport/teleport-global.d.ts +0 -11
- package/lib/module/teleport/types.js +0 -4
- package/lib/module/teleport/types.js.map +0 -1
- package/lib/module/teleport/use-id.js +0 -19
- package/lib/module/teleport/use-id.js.map +0 -1
- package/lib/module/teleport/use-portal.js +0 -55
- package/lib/module/teleport/use-portal.js.map +0 -1
- package/lib/typescript/commonjs/styles/styled-primitives.d.ts +0 -69
- package/lib/typescript/commonjs/styles/styled-primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/Portal.d.ts +0 -48
- package/lib/typescript/commonjs/teleport/Portal.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalHost.d.ts +0 -25
- package/lib/typescript/commonjs/teleport/PortalHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalHostView.d.ts +0 -5
- package/lib/typescript/commonjs/teleport/PortalHostView.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts +0 -4
- package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalProvider.d.ts +0 -23
- package/lib/typescript/commonjs/teleport/PortalProvider.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts +0 -3
- package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts +0 -9
- package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalView.d.ts +0 -9
- package/lib/typescript/commonjs/teleport/PortalView.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/PortalView.native.d.ts +0 -8
- package/lib/typescript/commonjs/teleport/PortalView.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/index.d.ts +0 -29
- package/lib/typescript/commonjs/teleport/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/portal-manager.d.ts +0 -16
- package/lib/typescript/commonjs/teleport/portal-manager.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/portal-registry.d.ts +0 -10
- package/lib/typescript/commonjs/teleport/portal-registry.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/reducer.d.ts +0 -40
- package/lib/typescript/commonjs/teleport/reducer.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts +0 -4
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts +0 -13
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts +0 -10
- package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts +0 -13
- package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts +0 -14
- package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/types.d.ts +0 -22
- package/lib/typescript/commonjs/teleport/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/use-id.d.ts +0 -2
- package/lib/typescript/commonjs/teleport/use-id.d.ts.map +0 -1
- package/lib/typescript/commonjs/teleport/use-portal.d.ts +0 -35
- package/lib/typescript/commonjs/teleport/use-portal.d.ts.map +0 -1
- package/lib/typescript/module/styles/styled-primitives.d.ts +0 -69
- package/lib/typescript/module/styles/styled-primitives.d.ts.map +0 -1
- package/lib/typescript/module/teleport/Portal.d.ts +0 -48
- package/lib/typescript/module/teleport/Portal.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalHost.d.ts +0 -25
- package/lib/typescript/module/teleport/PortalHost.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalHostView.d.ts +0 -5
- package/lib/typescript/module/teleport/PortalHostView.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalHostView.native.d.ts +0 -4
- package/lib/typescript/module/teleport/PortalHostView.native.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalProvider.d.ts +0 -23
- package/lib/typescript/module/teleport/PortalProvider.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalProviderView.d.ts +0 -3
- package/lib/typescript/module/teleport/PortalProviderView.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalProviderView.native.d.ts +0 -9
- package/lib/typescript/module/teleport/PortalProviderView.native.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalView.d.ts +0 -9
- package/lib/typescript/module/teleport/PortalView.d.ts.map +0 -1
- package/lib/typescript/module/teleport/PortalView.native.d.ts +0 -8
- package/lib/typescript/module/teleport/PortalView.native.d.ts.map +0 -1
- package/lib/typescript/module/teleport/index.d.ts +0 -29
- package/lib/typescript/module/teleport/index.d.ts.map +0 -1
- package/lib/typescript/module/teleport/portal-manager.d.ts +0 -16
- package/lib/typescript/module/teleport/portal-manager.d.ts.map +0 -1
- package/lib/typescript/module/teleport/portal-registry.d.ts +0 -10
- package/lib/typescript/module/teleport/portal-registry.d.ts.map +0 -1
- package/lib/typescript/module/teleport/reducer.d.ts +0 -40
- package/lib/typescript/module/teleport/reducer.d.ts.map +0 -1
- package/lib/typescript/module/teleport/scroll-view-context/context.d.ts +0 -4
- package/lib/typescript/module/teleport/scroll-view-context/context.d.ts.map +0 -1
- package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts +0 -13
- package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts.map +0 -1
- package/lib/typescript/module/teleport/scroll-view-context/types.d.ts +0 -10
- package/lib/typescript/module/teleport/scroll-view-context/types.d.ts.map +0 -1
- package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts +0 -13
- package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts +0 -14
- package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/teleport/types.d.ts +0 -22
- package/lib/typescript/module/teleport/types.d.ts.map +0 -1
- package/lib/typescript/module/teleport/use-id.d.ts +0 -2
- package/lib/typescript/module/teleport/use-id.d.ts.map +0 -1
- package/lib/typescript/module/teleport/use-portal.d.ts +0 -35
- package/lib/typescript/module/teleport/use-portal.d.ts.map +0 -1
- package/src/styles/styled-primitives.ts +0 -87
- package/src/teleport/Portal.tsx +0 -96
- package/src/teleport/PortalHost.tsx +0 -61
- package/src/teleport/PortalHostView.native.tsx +0 -14
- package/src/teleport/PortalHostView.tsx +0 -30
- package/src/teleport/PortalProvider.tsx +0 -51
- package/src/teleport/PortalProviderView.native.tsx +0 -11
- package/src/teleport/PortalProviderView.tsx +0 -54
- package/src/teleport/PortalView.native.tsx +0 -7
- package/src/teleport/PortalView.tsx +0 -83
- package/src/teleport/index.ts +0 -32
- package/src/teleport/portal-manager.tsx +0 -29
- package/src/teleport/portal-registry.ts +0 -24
- package/src/teleport/reducer.ts +0 -93
- package/src/teleport/scroll-view-context/context.native.ts +0 -19
- package/src/teleport/scroll-view-context/context.ts +0 -12
- package/src/teleport/scroll-view-context/types.ts +0 -7
- package/src/teleport/specs/PortalHostViewNativeComponent.ts +0 -15
- package/src/teleport/specs/PortalViewNativeComponent.ts +0 -16
- package/src/teleport/teleport-global.d.ts +0 -11
- package/src/teleport/types.ts +0 -22
- package/src/teleport/use-id.ts +0 -18
- package/src/teleport/use-portal.ts +0 -46
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
3
|
import type { MeasuredRect, MediaSurfaceImage, MediaSurfaceVideo } from '../media-flight/types';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -139,4 +140,14 @@ export interface ZoomableMediaGalleryProps {
|
|
|
139
140
|
* on for a viewer whose job is watching rather than glancing.
|
|
140
141
|
*/
|
|
141
142
|
videoControls?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The thumbnail the open viewer stands in for, as an index into the opened
|
|
145
|
+
* items, or `-1` when none — written by the viewer on the UI thread. Hide the
|
|
146
|
+
* thumbnail whose index it holds (`opacity: 0` in an animated style) and the
|
|
147
|
+
* photo is never on screen twice: it is set when the open flight starts,
|
|
148
|
+
* follows the page while swiping, and goes back to `-1` on the very frame the
|
|
149
|
+
* fly-back lands, the frame the viewer's own copy disappears. Keep the
|
|
150
|
+
* thumbnail mounted while hidden, so nothing reloads when it comes back.
|
|
151
|
+
*/
|
|
152
|
+
hiddenThumbIndex?: SharedValue<number>;
|
|
142
153
|
}
|
package/docs/teleport.mdx
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Teleport
|
|
3
|
-
description: react-native-teleport, vendored — one view moved between hosts, not rebuilt at each end
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Teleport
|
|
7
|
-
|
|
8
|
-
`@oxy.so/bloom/teleport` is **a copy of [react-native-teleport][upstream] 1.2.0**,
|
|
9
|
-
by Kiryl Ziusko, MIT-licensed. It is not a reimplementation and not an
|
|
10
|
-
adaptation: the files under `src/teleport/` are theirs, each one carrying a
|
|
11
|
-
header that names the file it came from and what changed — import paths, in
|
|
12
|
-
almost every case, and nothing else.
|
|
13
|
-
|
|
14
|
-
The full licence is in `NOTICE` at the repository root, and it ships in the
|
|
15
|
-
published tarball.
|
|
16
|
-
|
|
17
|
-
[upstream]: https://github.com/kirillzyusko/react-native-teleport
|
|
18
|
-
|
|
19
|
-
## Why Bloom carries it rather than depending on it
|
|
20
|
-
|
|
21
|
-
Bloom needs its **native re-parenting**: moving one platform view between hosts
|
|
22
|
-
instead of mounting a second one somewhere else. That arrives as Fabric
|
|
23
|
-
components — C++ shadow nodes, Kotlin, Objective-C++ — not as JavaScript, and
|
|
24
|
-
Bloom's media flight is the consumer.
|
|
25
|
-
|
|
26
|
-
Vendoring is a decision with a cost, and the cost is that **this is a fork**.
|
|
27
|
-
Their fixes will not arrive here on their own; their repository is active. Read
|
|
28
|
-
theirs before rewriting anything here.
|
|
29
|
-
|
|
30
|
-
## The one thing Bloom does differently, and it is not their code
|
|
31
|
-
|
|
32
|
-
**Bloom mounts these portals from its ROOT LAYER. Never from the origin screen.**
|
|
33
|
-
|
|
34
|
-
Their `<Portal>` renders `createPortal(children, …)` inside the component that
|
|
35
|
-
mounts it, so the children belong to that component's tree. Their Instagram
|
|
36
|
-
recipe mounts it inside the screen the media starts on and keeps that screen
|
|
37
|
-
alive with `presentation: 'transparentModal'`, which is correct for a navigator
|
|
38
|
-
that behaves that way — and it is the premise the design needs.
|
|
39
|
-
|
|
40
|
-
Under expo-router on **web** the origin route is unmounted the moment the URL
|
|
41
|
-
changes. Measured against their library, with the origin unmounting:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
origin UNMOUNTS count 1 -> 0 -> 0 the media is gone
|
|
45
|
-
origin STAYS stamps ["1","1","1"], ct 0.93 -> 1.73 one element, still playing
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The portal is not what fails there; the **ownership** is. Same piece, mounted
|
|
49
|
-
where it does not die — which is what `MediaFlightLayer` does.
|
|
50
|
-
|
|
51
|
-
`src/__tests__/Teleport.test.tsx` pins all three behaviours, including that last
|
|
52
|
-
one, so nobody re-discovers it in an app.
|
|
53
|
-
|
|
54
|
-
## Status
|
|
55
|
-
|
|
56
|
-
- **Web: in, and used.** The move primitive in `media-flight/media-node.web.ts`
|
|
57
|
-
is theirs (`moveBefore` with an `insertBefore` fallback).
|
|
58
|
-
- **Native: not yet.** The Fabric components are not in this repo. Until they
|
|
59
|
-
are, Bloom's native flight keeps its three surfaces on one player.
|
|
60
|
-
- **Their own test suite is not here yet, and the reason is measured.** It is
|
|
61
|
-
written for `preset: react-native`, and Bloom's jest resolves no platform
|
|
62
|
-
extensions, so it reaches the web files instead. Moving their tests to a web
|
|
63
|
-
renderer does not work either: they depend on react-native-testing-library's
|
|
64
|
-
API, not only its renderer — `fireEvent.press` and `toBeOnTheScreen` appear
|
|
65
|
-
37 times in one 221-line file, and neither exists in
|
|
66
|
-
`@testing-library/react`. Rewriting those is rewriting every interaction and
|
|
67
|
-
every assertion, which is not vendoring their tests, it is writing ours.
|
|
68
|
-
|
|
69
|
-
So they arrive with the native side, which is what they were written for. They
|
|
70
|
-
are held, not `.skip`ped: a skipped vendored test claims coverage that does not
|
|
71
|
-
exist. Meanwhile `src/__tests__/Teleport.test.tsx` covers their code on the
|
|
72
|
-
path Bloom uses today. See `AGENTS.md`, "Jest resolves no platform extensions".
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledView = exports.StyledText = exports.StyledScrollView = exports.StyledPressable = exports.StyledImage = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _index = require("../image/index.js");
|
|
9
|
-
/**
|
|
10
|
-
* React Native's primitives typed with the web props react-native-web forwards
|
|
11
|
-
* (a `listbox` role, `aria-*` on a pressable), for Bloom's own hosts. They are
|
|
12
|
-
* React Native's components themselves: Bloom styles through `style` alone
|
|
13
|
-
* (`docs/no-nativewind.mdx`).
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* `ref` is on the PUBLISHED type and deliberately not on the one handed to
|
|
18
|
-
* `styled()`: adding it to the argument widens that dot-path union past the
|
|
19
|
-
* checker's limit again, and the mapping only ever names `className`. The same
|
|
20
|
-
* goes for {@link WebAriaProps}.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* `styled()` is declared as returning `any`, so these annotations are the whole
|
|
25
|
-
* type contract — including `ref`, which under React 19 is an ordinary prop that
|
|
26
|
-
* `useCssElement` spreads onto the wrapped primitive. Leaving it out made a
|
|
27
|
-
* measured node (a flyout's scroll box, a select option) a compile error while
|
|
28
|
-
* the runtime forwarded it fine.
|
|
29
|
-
*/
|
|
30
|
-
const StyledView = exports.StyledView = _reactNative.View;
|
|
31
|
-
const StyledText = exports.StyledText = _reactNative.Text;
|
|
32
|
-
|
|
33
|
-
/** Bloom's one raster renderer (expo-image on a device), never react-native's `Image`. */
|
|
34
|
-
const StyledImage = exports.StyledImage = _index.BloomImage;
|
|
35
|
-
const StyledPressable = exports.StyledPressable = _reactNative.Pressable;
|
|
36
|
-
const StyledScrollView = exports.StyledScrollView = _reactNative.ScrollView;
|
|
37
|
-
//# sourceMappingURL=styled-primitives.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_index","StyledView","exports","View","StyledText","Text","StyledImage","BloomImage","StyledPressable","Pressable","StyledScrollView","ScrollView"],"sourceRoot":"../../../src","sources":["styles/styled-primitives.ts"],"mappings":";;;;;;AAOA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,MAAA,GAAAD,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;;AA4CA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGE,iBAMzB;AAEM,MAAMC,UAA+E,GAAAF,OAAA,CAAAE,UAAA,GAAGC,iBAAI;;AAEnG;AACO,MAAMC,WAA2C,GAAAJ,OAAA,CAAAI,WAAA,GAAGC,iBAAU;AAE9D,MAAMC,eAAe,GAAAN,OAAA,CAAAM,eAAA,GAAGC,sBAAgD;AAExE,MAAMC,gBAEZ,GAAAR,OAAA,CAAAQ,gBAAA,GAAGC,uBAAU","ignoreList":[]}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _portalManager = require("./portal-manager.js");
|
|
9
|
-
var _context = _interopRequireDefault(require("./scroll-view-context/context"));
|
|
10
|
-
var _PortalView = _interopRequireDefault(require("./PortalView"));
|
|
11
|
-
var _useId = _interopRequireDefault(require("./use-id.js"));
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
/**
|
|
15
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/components/Portal.tsx`
|
|
16
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
17
|
-
*
|
|
18
|
-
* Changed: import paths only, for this flat directory.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Portal helps you to render a component in a different place in the view hierarchy.
|
|
23
|
-
* This is useful when you need a view to visually “break out” of its parent container (for example: modals, toasts, floating UI, popovers).
|
|
24
|
-
*
|
|
25
|
-
* @category components
|
|
26
|
-
* @param hostName - The `name` of the `PortalHost`. It's used to identify the host where the content should be rendered.
|
|
27
|
-
* @param name - The name of the portal. It's used to identify the portal.
|
|
28
|
-
* @param children - The content that should be rendered in the portal.
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* import { useState } from "react";
|
|
32
|
-
* import { View, StyleSheet, Button } from "react-native";
|
|
33
|
-
* import { Portal } from "react-native-teleport";
|
|
34
|
-
* export default function InstantRootExample() {
|
|
35
|
-
* const [shouldBeTeleported, setTeleported] = useState(true);
|
|
36
|
-
* return (
|
|
37
|
-
* <View style={styles.container}>
|
|
38
|
-
* {shouldBeTeleported && (
|
|
39
|
-
* <Portal hostName={"overlay"}>
|
|
40
|
-
* <View style={styles.box} />
|
|
41
|
-
* </Portal>
|
|
42
|
-
* )}
|
|
43
|
-
* <Button
|
|
44
|
-
* title={shouldBeTeleported ? "Hide" : "Show"}
|
|
45
|
-
* onPress={() => setTeleported((t) => !t)}
|
|
46
|
-
* />
|
|
47
|
-
* </View>
|
|
48
|
-
* );
|
|
49
|
-
* }
|
|
50
|
-
* const styles = StyleSheet.create({
|
|
51
|
-
* container: {
|
|
52
|
-
* flex: 1,
|
|
53
|
-
* alignItems: "center",
|
|
54
|
-
* justifyContent: "center",
|
|
55
|
-
* },
|
|
56
|
-
* box: {
|
|
57
|
-
* width: 160,
|
|
58
|
-
* height: 160,
|
|
59
|
-
* marginVertical: 20,
|
|
60
|
-
* backgroundColor: "blue",
|
|
61
|
-
* },
|
|
62
|
-
* });
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
const PortalComponent = ({
|
|
66
|
-
hostName,
|
|
67
|
-
name,
|
|
68
|
-
style,
|
|
69
|
-
children
|
|
70
|
-
}) => {
|
|
71
|
-
const sourceScrollViewContext = (0, _react.useContext)(_context.default);
|
|
72
|
-
const {
|
|
73
|
-
state,
|
|
74
|
-
dispatch
|
|
75
|
-
} = (0, _portalManager.usePortalManagerContext)();
|
|
76
|
-
const instanceId = (0, _useId.default)();
|
|
77
|
-
const scrollViewContext = hostName && state.hosts[hostName] ? state.hostScrollViewContexts[hostName] ?? null : sourceScrollViewContext;
|
|
78
|
-
const isRemoved = hostName && name ? state.removed[hostName]?.[name]?.[instanceId] : false;
|
|
79
|
-
(0, _react.useEffect)(() => {
|
|
80
|
-
if (!hostName || !name) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
dispatch({
|
|
84
|
-
type: 'REGISTER_PORTAL',
|
|
85
|
-
hostName,
|
|
86
|
-
name,
|
|
87
|
-
instanceId
|
|
88
|
-
});
|
|
89
|
-
return () => {
|
|
90
|
-
dispatch({
|
|
91
|
-
type: 'CLEAR_REMOVED_ON_UNMOUNT',
|
|
92
|
-
hostName,
|
|
93
|
-
name,
|
|
94
|
-
instanceId
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
}, [dispatch, hostName, name, instanceId]);
|
|
98
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.default.Provider, {
|
|
99
|
-
value: scrollViewContext,
|
|
100
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PortalView.default, {
|
|
101
|
-
hostName: hostName,
|
|
102
|
-
name: name,
|
|
103
|
-
style: style,
|
|
104
|
-
children: isRemoved ? null : children
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
var _default = exports.default = PortalComponent;
|
|
109
|
-
//# sourceMappingURL=Portal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_portalManager","_context","_interopRequireDefault","_PortalView","_useId","_jsxRuntime","e","__esModule","default","PortalComponent","hostName","name","style","children","sourceScrollViewContext","useContext","ScrollViewContext","state","dispatch","usePortalManagerContext","instanceId","useId","scrollViewContext","hosts","hostScrollViewContexts","isRemoved","removed","useEffect","type","jsx","Provider","value","_default","exports"],"sourceRoot":"../../../src","sources":["teleport/Portal.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA6B,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAV7B;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,IAAI;EAAEC,KAAK;EAAEC;AAAsB,CAAC,KAAK;EAC5E,MAAMC,uBAAuB,GAAG,IAAAC,iBAAU,EAACC,gBAAiB,CAAC;EAC7D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,sCAAuB,EAAC,CAAC;EACrD,MAAMC,UAAU,GAAG,IAAAC,cAAK,EAAC,CAAC;EAE1B,MAAMC,iBAAiB,GACrBZ,QAAQ,IAAIO,KAAK,CAACM,KAAK,CAACb,QAAQ,CAAC,GAC5BO,KAAK,CAACO,sBAAsB,CAACd,QAAQ,CAAC,IAAI,IAAI,GAC/CI,uBAAuB;EAE7B,MAAMW,SAAS,GAAGf,QAAQ,IAAIC,IAAI,GAAGM,KAAK,CAACS,OAAO,CAAChB,QAAQ,CAAC,GAAGC,IAAI,CAAC,GAAGS,UAAU,CAAC,GAAG,KAAK;EAE1F,IAAAO,gBAAS,EAAC,MAAM;IACd,IAAI,CAACjB,QAAQ,IAAI,CAACC,IAAI,EAAE;MACtB;IACF;IAEAO,QAAQ,CAAC;MAAEU,IAAI,EAAE,iBAAiB;MAAElB,QAAQ;MAAEC,IAAI;MAAES;IAAW,CAAC,CAAC;IAEjE,OAAO,MAAM;MACXF,QAAQ,CAAC;QACPU,IAAI,EAAE,0BAA0B;QAChClB,QAAQ;QACRC,IAAI;QACJS;MACF,CAAC,CAAC;IACJ,CAAC;EACH,CAAC,EAAE,CAACF,QAAQ,EAAER,QAAQ,EAAEC,IAAI,EAAES,UAAU,CAAC,CAAC;EAE1C,oBACE,IAAAf,WAAA,CAAAwB,GAAA,EAAC5B,QAAA,CAAAO,OAAiB,CAACsB,QAAQ;IAACC,KAAK,EAAET,iBAAkB;IAAAT,QAAA,eACnD,IAAAR,WAAA,CAAAwB,GAAA,EAAC1B,WAAA,CAAAK,OAAU;MAACE,QAAQ,EAAEA,QAAS;MAACC,IAAI,EAAEA,IAAK;MAACC,KAAK,EAAEA,KAAM;MAAAC,QAAA,EACtDY,SAAS,GAAG,IAAI,GAAGZ;IAAQ,CAClB;EAAC,CACa,CAAC;AAEjC,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEaC,eAAe","ignoreList":[]}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _portalManager = require("./portal-manager.js");
|
|
9
|
-
var _context = _interopRequireDefault(require("./scroll-view-context/context"));
|
|
10
|
-
var _PortalHostView = _interopRequireDefault(require("./PortalHostView"));
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
/**
|
|
14
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/components/PortalHost.tsx`
|
|
15
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
16
|
-
*
|
|
17
|
-
* Changed: import paths only, for this flat directory.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* PortalHost is a component that acts as an anchor for the portals.
|
|
22
|
-
* You can define multiple portal hosts in your app and use them to render different portals.
|
|
23
|
-
* Each portal host has a unique name that you can use to identify a necessary one among the others.
|
|
24
|
-
*
|
|
25
|
-
* @category components
|
|
26
|
-
* @param name - The name of the portal host. It's used by `<Portal />` component to identify the host.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* import { StyleSheet, View } from "react-native";
|
|
31
|
-
* import { PortalHost, PortalProvider } from "react-native-teleport";
|
|
32
|
-
* export default function App() {
|
|
33
|
-
* return (
|
|
34
|
-
* <PortalProvider>
|
|
35
|
-
* <PortalHost style={StyleSheet.absoluteFill} name="overlay" />
|
|
36
|
-
* </PortalProvider>
|
|
37
|
-
* );
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/const PortalHostComponent = ({
|
|
41
|
-
name,
|
|
42
|
-
children,
|
|
43
|
-
style
|
|
44
|
-
}) => {
|
|
45
|
-
const {
|
|
46
|
-
dispatch
|
|
47
|
-
} = (0, _portalManager.usePortalManagerContext)();
|
|
48
|
-
const scrollViewContext = (0, _react.useContext)(_context.default);
|
|
49
|
-
(0, _react.useEffect)(() => {
|
|
50
|
-
dispatch({
|
|
51
|
-
type: 'REGISTER_HOST',
|
|
52
|
-
hostName: name
|
|
53
|
-
});
|
|
54
|
-
return () => {
|
|
55
|
-
dispatch({
|
|
56
|
-
type: 'UNREGISTER_HOST',
|
|
57
|
-
hostName: name
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
}, [name, dispatch]);
|
|
61
|
-
(0, _react.useEffect)(() => {
|
|
62
|
-
dispatch({
|
|
63
|
-
type: 'SET_HOST_SCROLL_VIEW_CONTEXT',
|
|
64
|
-
hostName: name,
|
|
65
|
-
value: scrollViewContext
|
|
66
|
-
});
|
|
67
|
-
}, [name, dispatch, scrollViewContext]);
|
|
68
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PortalHostView.default, {
|
|
69
|
-
name: name,
|
|
70
|
-
style: style,
|
|
71
|
-
children: children
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
var _default = exports.default = PortalHostComponent;
|
|
75
|
-
//# sourceMappingURL=PortalHost.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_portalManager","_context","_interopRequireDefault","_PortalHostView","_jsxRuntime","e","__esModule","default","PortalHostComponent","name","children","style","dispatch","usePortalManagerContext","scrollViewContext","useContext","ScrollViewContext","useEffect","type","hostName","value","jsx","_default","exports"],"sourceRoot":"../../../src","sources":["teleport/PortalHost.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,eAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA0C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAV1C;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,mBAAmB,GAAGA,CAAC;EAAEC,IAAI;EAAEC,QAAQ;EAAEC;AAAuB,CAAC,KAAK;EAC1E,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,sCAAuB,EAAC,CAAC;EAC9C,MAAMC,iBAAiB,GAAG,IAAAC,iBAAU,EAACC,gBAAiB,CAAC;EAEvD,IAAAC,gBAAS,EAAC,MAAM;IACdL,QAAQ,CAAC;MAAEM,IAAI,EAAE,eAAe;MAAEC,QAAQ,EAAEV;IAAK,CAAC,CAAC;IAEnD,OAAO,MAAM;MACXG,QAAQ,CAAC;QAAEM,IAAI,EAAE,iBAAiB;QAAEC,QAAQ,EAAEV;MAAK,CAAC,CAAC;IACvD,CAAC;EACH,CAAC,EAAE,CAACA,IAAI,EAAEG,QAAQ,CAAC,CAAC;EAEpB,IAAAK,gBAAS,EAAC,MAAM;IACdL,QAAQ,CAAC;MACPM,IAAI,EAAE,8BAA8B;MACpCC,QAAQ,EAAEV,IAAI;MACdW,KAAK,EAAEN;IACT,CAAC,CAAC;EACJ,CAAC,EAAE,CAACL,IAAI,EAAEG,QAAQ,EAAEE,iBAAiB,CAAC,CAAC;EAEvC,oBACE,IAAAV,WAAA,CAAAiB,GAAA,EAAClB,eAAA,CAAAI,OAAU;IAACE,IAAI,EAAEA,IAAK;IAACE,KAAK,EAAEA,KAAM;IAAAD,QAAA,EAClCA;EAAQ,CACC,CAAC;AAEjB,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAEaC,mBAAmB","ignoreList":[]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _portalRegistry = require("./portal-registry.js");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalHost/index.tsx`
|
|
12
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
13
|
-
*
|
|
14
|
-
* Changed: import paths only, for this flat directory.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
function PortalHost({
|
|
18
|
-
name,
|
|
19
|
-
children,
|
|
20
|
-
style
|
|
21
|
-
}) {
|
|
22
|
-
const {
|
|
23
|
-
registerHost
|
|
24
|
-
} = (0, _portalRegistry.usePortalRegistryContext)();
|
|
25
|
-
(0, _react.useEffect)(() => {
|
|
26
|
-
return () => {
|
|
27
|
-
registerHost(name, null);
|
|
28
|
-
};
|
|
29
|
-
}, [name, registerHost]);
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
31
|
-
style: {
|
|
32
|
-
...style,
|
|
33
|
-
pointerEvents: 'none'
|
|
34
|
-
},
|
|
35
|
-
ref: ref => registerHost(name, ref),
|
|
36
|
-
children: children
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(PortalHost);
|
|
40
|
-
//# sourceMappingURL=PortalHostView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_portalRegistry","_jsxRuntime","PortalHost","name","children","style","registerHost","usePortalRegistryContext","useEffect","jsx","pointerEvents","ref","_default","exports","default","memo"],"sourceRoot":"../../../src","sources":["teleport/PortalHostView.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAA6D,IAAAE,WAAA,GAAAF,OAAA;AAP7D;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASG,UAAUA,CAAC;EAAEC,IAAI;EAAEC,QAAQ;EAAEC;AAAuB,CAAC,EAAE;EAC9D,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,wCAAwB,EAAC,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACXF,YAAY,CAACH,IAAI,EAAE,IAAI,CAAC;IAC1B,CAAC;EACH,CAAC,EAAE,CAACA,IAAI,EAAEG,YAAY,CAAC,CAAC;EAExB,oBACE,IAAAL,WAAA,CAAAQ,GAAA;IACEJ,KAAK,EAAE;MAAE,GAAGA,KAAK;MAAEK,aAAa,EAAE;IAAO,CAAyB;IAClEC,GAAG,EAAGA,GAAG,IAAKL,YAAY,CAACH,IAAI,EAAEQ,GAAG,CAAE;IAAAP,QAAA,EAErCA;EAAQ,CACN,CAAC;AAEV;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,gBAEc,IAAAC,WAAI,EAACb,UAAU,CAAC","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _PortalHostViewNativeComponent = _interopRequireDefault(require("./specs/PortalHostViewNativeComponent.js"));
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
/**
|
|
11
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalHost/index.native.tsx`
|
|
12
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
13
|
-
*
|
|
14
|
-
* Changed: import paths only, for this flat directory.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const PortalHost = props => {
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PortalHostViewNativeComponent.default, {
|
|
19
|
-
pointerEvents: "box-none",
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
var _default = exports.default = PortalHost;
|
|
24
|
-
//# sourceMappingURL=PortalHostView.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_PortalHostViewNativeComponent","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","PortalHost","props","jsx","pointerEvents","_default","exports"],"sourceRoot":"../../../src","sources":["teleport/PortalHostView.native.tsx"],"mappings":";;;;;;AAMA,IAAAA,8BAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8E,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAN9E;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMG,UAAU,GAAIC,KAAsB,IAAK;EAC7C,oBAAO,IAAAL,WAAA,CAAAM,GAAA,EAACT,8BAAA,CAAAM,OAAyB;IAACI,aAAa,EAAC,UAAU;IAAA,GAAKF;EAAK,CAAG,CAAC;AAC1E,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEaC,UAAU","ignoreList":[]}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PortalProvider;
|
|
7
|
-
var _PortalHost = _interopRequireDefault(require("./PortalHost.js"));
|
|
8
|
-
var _PortalProviderView = _interopRequireDefault(require("./PortalProviderView"));
|
|
9
|
-
var _portalManager = require("./portal-manager.js");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
/**
|
|
13
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/PortalProvider.tsx`
|
|
14
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
15
|
-
*
|
|
16
|
-
* Changed: import paths only, for this flat directory.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Wraps your app with this component to use the teleport API.
|
|
21
|
-
*
|
|
22
|
-
* This component provides a context/registry for all Portals so that you can use imperative API, such as `usePortal` hook to manage Portals.
|
|
23
|
-
*
|
|
24
|
-
* @category components
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* import { PortalProvider } from "react-native-teleport";
|
|
28
|
-
* export default function App() {
|
|
29
|
-
* return (
|
|
30
|
-
* <PortalProvider>
|
|
31
|
-
* //* your main application code goes here
|
|
32
|
-
* </PortalProvider>
|
|
33
|
-
* );
|
|
34
|
-
* }
|
|
35
|
-
*/
|
|
36
|
-
function PortalProvider({
|
|
37
|
-
children
|
|
38
|
-
}) {
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PortalProviderView.default, {
|
|
40
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_portalManager.PortalManagerProvider, {
|
|
41
|
-
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_PortalHost.default, {
|
|
42
|
-
name: "root",
|
|
43
|
-
style: styles.root
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
const styles = {
|
|
49
|
-
root: {
|
|
50
|
-
position: 'absolute',
|
|
51
|
-
top: 0,
|
|
52
|
-
bottom: 0,
|
|
53
|
-
left: 0,
|
|
54
|
-
right: 0
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=PortalProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_PortalHost","_interopRequireDefault","require","_PortalProviderView","_portalManager","_jsxRuntime","e","__esModule","default","PortalProvider","children","jsx","jsxs","PortalManagerProvider","name","style","styles","root","position","top","bottom","left","right"],"sourceRoot":"../../../src","sources":["teleport/PortalProvider.tsx"],"mappings":";;;;;;AAMA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAAyD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AARzD;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,cAAcA,CAAC;EAAEC;AAA8B,CAAC,EAAE;EACxE,oBACE,IAAAL,WAAA,CAAAM,GAAA,EAACR,mBAAA,CAAAK,OAAoB;IAAAE,QAAA,eACnB,IAAAL,WAAA,CAAAO,IAAA,EAACR,cAAA,CAAAS,qBAAqB;MAAAH,QAAA,GACnBA,QAAQ,eACT,IAAAL,WAAA,CAAAM,GAAA,EAACX,WAAA,CAAAQ,OAAU;QAACM,IAAI,EAAC,MAAM;QAACC,KAAK,EAAEC,MAAM,CAACC;MAAK,CAAE,CAAC;IAAA,CACzB;EAAC,CACJ,CAAC;AAE3B;AAEA,MAAMD,MAAM,GAAG;EACbC,IAAI,EAAE;IACJC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAU","ignoreList":[]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PortalProvider;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _portalRegistry = require("./portal-registry.js");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.tsx`
|
|
12
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
13
|
-
*
|
|
14
|
-
* Changed: import paths only, for this flat directory.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
function PortalProvider({
|
|
18
|
-
children
|
|
19
|
-
}) {
|
|
20
|
-
const hostsRef = (0, _react.useRef)(new Map());
|
|
21
|
-
const pendingPortalsRef = (0, _react.useRef)(new Map());
|
|
22
|
-
const registerHost = (0, _react.useCallback)((name, node) => {
|
|
23
|
-
if (node) {
|
|
24
|
-
hostsRef.current.set(name, node);
|
|
25
|
-
} else {
|
|
26
|
-
hostsRef.current.delete(name);
|
|
27
|
-
}
|
|
28
|
-
const callbacks = pendingPortalsRef.current.get(name);
|
|
29
|
-
if (callbacks) {
|
|
30
|
-
callbacks.forEach(callback => callback());
|
|
31
|
-
}
|
|
32
|
-
}, []);
|
|
33
|
-
const getHost = (0, _react.useCallback)(name => hostsRef.current.get(name) ?? null, []);
|
|
34
|
-
const registerPendingPortal = (0, _react.useCallback)((name, callback) => {
|
|
35
|
-
const callbacks = pendingPortalsRef.current.get(name) ?? new Set();
|
|
36
|
-
callbacks.add(callback);
|
|
37
|
-
pendingPortalsRef.current.set(name, callbacks);
|
|
38
|
-
}, []);
|
|
39
|
-
const unregisterPendingPortal = (0, _react.useCallback)((name, callback) => {
|
|
40
|
-
const callbacks = pendingPortalsRef.current.get(name);
|
|
41
|
-
if (callbacks) {
|
|
42
|
-
callbacks.delete(callback);
|
|
43
|
-
if (callbacks.size === 0) {
|
|
44
|
-
pendingPortalsRef.current.delete(name);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}, []);
|
|
48
|
-
const value = (0, _react.useMemo)(() => ({
|
|
49
|
-
registerHost,
|
|
50
|
-
getHost,
|
|
51
|
-
registerPendingPortal,
|
|
52
|
-
unregisterPendingPortal
|
|
53
|
-
}), [registerHost, getHost, registerPendingPortal, unregisterPendingPortal]);
|
|
54
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalRegistry.PortalRegistryContext.Provider, {
|
|
55
|
-
value: value,
|
|
56
|
-
children: children
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=PortalProviderView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_portalRegistry","_jsxRuntime","PortalProvider","children","hostsRef","useRef","Map","pendingPortalsRef","registerHost","useCallback","name","node","current","set","delete","callbacks","get","forEach","callback","getHost","registerPendingPortal","Set","add","unregisterPendingPortal","size","value","useMemo","jsx","PortalRegistryContext","Provider"],"sourceRoot":"../../../src","sources":["teleport/PortalProviderView.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAA0D,IAAAE,WAAA,GAAAF,OAAA;AAP1D;AACA;AACA;AACA;AACA;AACA;;AAKe,SAASG,cAAcA,CAAC;EAAEC;AAA8B,CAAC,EAAE;EACxE,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAA2B,IAAIC,GAAG,CAAC,CAAC,CAAC;EAC5D,MAAMC,iBAAiB,GAAG,IAAAF,aAAM,EAA+B,IAAIC,GAAG,CAAC,CAAC,CAAC;EAEzE,MAAME,YAAY,GAAG,IAAAC,kBAAW,EAAC,CAACC,IAAY,EAAEC,IAAwB,KAAK;IAC3E,IAAIA,IAAI,EAAE;MACRP,QAAQ,CAACQ,OAAO,CAACC,GAAG,CAACH,IAAI,EAAEC,IAAI,CAAC;IAClC,CAAC,MAAM;MACLP,QAAQ,CAACQ,OAAO,CAACE,MAAM,CAACJ,IAAI,CAAC;IAC/B;IAEA,MAAMK,SAAS,GAAGR,iBAAiB,CAACK,OAAO,CAACI,GAAG,CAACN,IAAI,CAAC;IACrD,IAAIK,SAAS,EAAE;MACbA,SAAS,CAACE,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;IAC7C;EACF,CAAC,EAAE,EAAE,CAAC;EACN,MAAMC,OAAO,GAAG,IAAAV,kBAAW,EAAEC,IAAY,IAAKN,QAAQ,CAACQ,OAAO,CAACI,GAAG,CAACN,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;EACrF,MAAMU,qBAAqB,GAAG,IAAAX,kBAAW,EAAC,CAACC,IAAY,EAAEQ,QAAoB,KAAK;IAChF,MAAMH,SAAS,GAAGR,iBAAiB,CAACK,OAAO,CAACI,GAAG,CAACN,IAAI,CAAC,IAAI,IAAIW,GAAG,CAAC,CAAC;IAClEN,SAAS,CAACO,GAAG,CAACJ,QAAQ,CAAC;IACvBX,iBAAiB,CAACK,OAAO,CAACC,GAAG,CAACH,IAAI,EAAEK,SAAS,CAAC;EAChD,CAAC,EAAE,EAAE,CAAC;EACN,MAAMQ,uBAAuB,GAAG,IAAAd,kBAAW,EAAC,CAACC,IAAY,EAAEQ,QAAoB,KAAK;IAClF,MAAMH,SAAS,GAAGR,iBAAiB,CAACK,OAAO,CAACI,GAAG,CAACN,IAAI,CAAC;IACrD,IAAIK,SAAS,EAAE;MACbA,SAAS,CAACD,MAAM,CAACI,QAAQ,CAAC;MAC1B,IAAIH,SAAS,CAACS,IAAI,KAAK,CAAC,EAAE;QACxBjB,iBAAiB,CAACK,OAAO,CAACE,MAAM,CAACJ,IAAI,CAAC;MACxC;IACF;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMe,KAAK,GAAG,IAAAC,cAAO,EACnB,OAAO;IACLlB,YAAY;IACZW,OAAO;IACPC,qBAAqB;IACrBG;EACF,CAAC,CAAC,EACF,CAACf,YAAY,EAAEW,OAAO,EAAEC,qBAAqB,EAAEG,uBAAuB,CACxE,CAAC;EAED,oBAAO,IAAAtB,WAAA,CAAA0B,GAAA,EAAC3B,eAAA,CAAA4B,qBAAqB,CAACC,QAAQ;IAACJ,KAAK,EAAEA,KAAM;IAAAtB,QAAA,EAAEA;EAAQ,CAAiC,CAAC;AAClG","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PortalProvider;
|
|
7
|
-
/**
|
|
8
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.native.tsx`
|
|
9
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
10
|
-
*
|
|
11
|
-
* Changed: nothing — byte-for-byte, only its path.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
function PortalProvider({
|
|
15
|
-
children
|
|
16
|
-
}) {
|
|
17
|
-
return children;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=PortalProviderView.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PortalProvider","children"],"sourceRoot":"../../../src","sources":["teleport/PortalProviderView.native.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;AAGe,SAASA,cAAcA,CAAC;EAAEC;AAA8B,CAAC,EAAE;EACxE,OAAOA,QAAQ;AACjB","ignoreList":[]}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = Portal;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactDom = require("react-dom");
|
|
9
|
-
var _portalRegistry = require("./portal-registry.js");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`
|
|
13
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
14
|
-
*
|
|
15
|
-
* Changed: import paths only, for this flat directory.
|
|
16
|
-
*/
|
|
17
|
-
/// <reference lib="dom" />
|
|
18
|
-
|
|
19
|
-
const supportsMoveBefore = typeof Element !== 'undefined' && 'moveBefore' in Element.prototype;
|
|
20
|
-
function moveElementTo(parent, child, before = null) {
|
|
21
|
-
if (supportsMoveBefore && child.parentNode) {
|
|
22
|
-
parent.moveBefore(child, before);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (child.parentNode) {
|
|
26
|
-
child.parentNode.removeChild(child);
|
|
27
|
-
}
|
|
28
|
-
parent.insertBefore(child, before);
|
|
29
|
-
}
|
|
30
|
-
function Portal({
|
|
31
|
-
hostName,
|
|
32
|
-
children,
|
|
33
|
-
style
|
|
34
|
-
}) {
|
|
35
|
-
const {
|
|
36
|
-
getHost,
|
|
37
|
-
registerPendingPortal,
|
|
38
|
-
unregisterPendingPortal
|
|
39
|
-
} = (0, _portalRegistry.usePortalRegistryContext)();
|
|
40
|
-
const elRef = (0, _react.useRef)(null);
|
|
41
|
-
if (!elRef.current) {
|
|
42
|
-
elRef.current = document.createElement('div');
|
|
43
|
-
}
|
|
44
|
-
const sentinelRef = (0, _react.useRef)(null);
|
|
45
|
-
(0, _react.useLayoutEffect)(() => {
|
|
46
|
-
if (elRef.current && style) {
|
|
47
|
-
Object.assign(elRef.current.style, style);
|
|
48
|
-
}
|
|
49
|
-
}, [style]);
|
|
50
|
-
const teleportToHost = (0, _react.useCallback)(() => {
|
|
51
|
-
const el = elRef.current;
|
|
52
|
-
if (!el) return;
|
|
53
|
-
const hostNode = hostName ? getHost(hostName) : null;
|
|
54
|
-
if (hostNode) {
|
|
55
|
-
// teleport view to the host
|
|
56
|
-
moveElementTo(hostNode, el);
|
|
57
|
-
} else if (sentinelRef.current && sentinelRef.current.parentElement) {
|
|
58
|
-
// keep view locally
|
|
59
|
-
const parent = sentinelRef.current.parentElement;
|
|
60
|
-
moveElementTo(parent, el, sentinelRef.current);
|
|
61
|
-
}
|
|
62
|
-
}, [hostName, getHost]);
|
|
63
|
-
(0, _react.useLayoutEffect)(() => {
|
|
64
|
-
teleportToHost();
|
|
65
|
-
if (!hostName) return;
|
|
66
|
-
registerPendingPortal(hostName, teleportToHost);
|
|
67
|
-
return () => {
|
|
68
|
-
unregisterPendingPortal(hostName, teleportToHost);
|
|
69
|
-
};
|
|
70
|
-
}, [hostName, registerPendingPortal, unregisterPendingPortal, teleportToHost]);
|
|
71
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
72
|
-
children: [/*#__PURE__*/(0, _reactDom.createPortal)(children, elRef.current), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
|
-
ref: sentinelRef,
|
|
74
|
-
style: styles.anchor
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
const styles = {
|
|
79
|
-
anchor: {
|
|
80
|
-
display: 'contents'
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=PortalView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactDom","_portalRegistry","_jsxRuntime","supportsMoveBefore","Element","prototype","moveElementTo","parent","child","before","parentNode","moveBefore","removeChild","insertBefore","Portal","hostName","children","style","getHost","registerPendingPortal","unregisterPendingPortal","usePortalRegistryContext","elRef","useRef","current","document","createElement","sentinelRef","useLayoutEffect","Object","assign","teleportToHost","useCallback","el","hostNode","parentElement","jsxs","Fragment","createPortal","jsx","ref","styles","anchor","display"],"sourceRoot":"../../../src","sources":["teleport/PortalView.tsx"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAA6D,IAAAG,WAAA,GAAAH,OAAA;AAV7D;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMI,kBAAkB,GAAG,OAAOC,OAAO,KAAK,WAAW,IAAI,YAAY,IAAIA,OAAO,CAACC,SAAS;AAE9F,SAASC,aAAaA,CAACC,MAAe,EAAEC,KAAc,EAAEC,MAAsB,GAAG,IAAI,EAAE;EACrF,IAAIN,kBAAkB,IAAIK,KAAK,CAACE,UAAU,EAAE;IAC1CH,MAAM,CAACI,UAAU,CAACH,KAAK,EAAEC,MAAM,CAAC;IAChC;EACF;EAEA,IAAID,KAAK,CAACE,UAAU,EAAE;IACpBF,KAAK,CAACE,UAAU,CAACE,WAAW,CAACJ,KAAK,CAAC;EACrC;EAEAD,MAAM,CAACM,YAAY,CAACL,KAAK,EAAEC,MAAM,CAAC;AACpC;AAEe,SAASK,MAAMA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAmB,CAAC,EAAE;EACzE,MAAM;IAAEC,OAAO;IAAEC,qBAAqB;IAAEC;EAAwB,CAAC,GAAG,IAAAC,wCAAwB,EAAC,CAAC;EAC9F,MAAMC,KAAK,GAAG,IAAAC,aAAM,EAAwB,IAAI,CAAC;EACjD,IAAI,CAACD,KAAK,CAACE,OAAO,EAAE;IAClBF,KAAK,CAACE,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC/C;EAEA,MAAMC,WAAW,GAAG,IAAAJ,aAAM,EAAiB,IAAI,CAAC;EAEhD,IAAAK,sBAAe,EAAC,MAAM;IACpB,IAAIN,KAAK,CAACE,OAAO,IAAIP,KAAK,EAAE;MAC1BY,MAAM,CAACC,MAAM,CAACR,KAAK,CAACE,OAAO,CAACP,KAAK,EAAEA,KAAK,CAAC;IAC3C;EACF,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,MAAMc,cAAc,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACvC,MAAMC,EAAE,GAAGX,KAAK,CAACE,OAAO;IACxB,IAAI,CAACS,EAAE,EAAE;IAET,MAAMC,QAAQ,GAAGnB,QAAQ,GAAGG,OAAO,CAACH,QAAQ,CAAC,GAAG,IAAI;IACpD,IAAImB,QAAQ,EAAE;MACZ;MACA5B,aAAa,CAAC4B,QAAQ,EAAED,EAAE,CAAC;IAC7B,CAAC,MAAM,IAAIN,WAAW,CAACH,OAAO,IAAIG,WAAW,CAACH,OAAO,CAACW,aAAa,EAAE;MACnE;MACA,MAAM5B,MAAM,GAAGoB,WAAW,CAACH,OAAO,CAACW,aAAa;MAChD7B,aAAa,CAACC,MAAM,EAAE0B,EAAE,EAAEN,WAAW,CAACH,OAAO,CAAC;IAChD;EACF,CAAC,EAAE,CAACT,QAAQ,EAAEG,OAAO,CAAC,CAAC;EAEvB,IAAAU,sBAAe,EAAC,MAAM;IACpBG,cAAc,CAAC,CAAC;IAEhB,IAAI,CAAChB,QAAQ,EAAE;IAEfI,qBAAqB,CAACJ,QAAQ,EAAEgB,cAAc,CAAC;IAC/C,OAAO,MAAM;MACXX,uBAAuB,CAACL,QAAQ,EAAEgB,cAAc,CAAC;IACnD,CAAC;EACH,CAAC,EAAE,CAAChB,QAAQ,EAAEI,qBAAqB,EAAEC,uBAAuB,EAAEW,cAAc,CAAC,CAAC;EAE9E,oBACE,IAAA7B,WAAA,CAAAkC,IAAA,EAAAlC,WAAA,CAAAmC,QAAA;IAAArB,QAAA,gBACG,IAAAsB,sBAAY,EAACtB,QAAQ,EAAEM,KAAK,CAACE,OAAO,CAAC,eAEtC,IAAAtB,WAAA,CAAAqC,GAAA;MAAKC,GAAG,EAAEb,WAAY;MAACV,KAAK,EAAEwB,MAAM,CAACC;IAAO,CAAE,CAAC;EAAA,CAC/C,CAAC;AAEP;AAEA,MAAMD,MAAM,GAAG;EACbC,MAAM,EAAE;IACNC,OAAO,EAAE;EACX;AACF,CAAC","ignoreList":[]}
|