@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,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React Native's primitives typed with the web props react-native-web forwards
|
|
3
|
-
* (a `listbox` role, `aria-*` on a pressable), for Bloom's own hosts. They are
|
|
4
|
-
* React Native's components themselves: Bloom styles through `style` alone
|
|
5
|
-
* (`docs/no-nativewind.mdx`).
|
|
6
|
-
*/
|
|
7
|
-
import type { ComponentRef, ComponentType, Ref } from 'react';
|
|
8
|
-
import {
|
|
9
|
-
Pressable,
|
|
10
|
-
ScrollView,
|
|
11
|
-
Text,
|
|
12
|
-
View,
|
|
13
|
-
type PressableProps,
|
|
14
|
-
type ScrollViewProps,
|
|
15
|
-
type StyleProp,
|
|
16
|
-
type TextProps,
|
|
17
|
-
type ViewProps,
|
|
18
|
-
type ViewStyle,
|
|
19
|
-
} from 'react-native';
|
|
20
|
-
import { BloomImage, type BloomImageProps } from '../image';
|
|
21
|
-
|
|
22
|
-
type StyledPressableBase = Omit<PressableProps, 'style'> & {
|
|
23
|
-
style?: StyleProp<ViewStyle>;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export interface WebAriaProps {
|
|
27
|
-
/**
|
|
28
|
-
* What kind of surface this control opens. `menu` is the only value Bloom
|
|
29
|
-
* currently needs; the union is the ARIA one, narrowed to what is spellable.
|
|
30
|
-
*/
|
|
31
|
-
'aria-haspopup'?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
32
|
-
/**
|
|
33
|
-
* The id list of the elements that DESCRIBE this control — a field's hint or
|
|
34
|
-
* its error message (`field/context.ts`).
|
|
35
|
-
*
|
|
36
|
-
* Here for the same reason as `aria-haspopup`: React Native types no such prop
|
|
37
|
-
* (there is no `accessibilityState` entry for it to fold into) while
|
|
38
|
-
* react-native-web forwards it, so web gets the association and native is
|
|
39
|
-
* unaffected. A control that needs the description READ on native carries it
|
|
40
|
-
* in its accessible name instead.
|
|
41
|
-
*/
|
|
42
|
-
'aria-describedby'?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the control's current value is invalid. Same platform split as
|
|
45
|
-
* `aria-describedby`.
|
|
46
|
-
*/
|
|
47
|
-
'aria-invalid'?: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* `ref` is on the PUBLISHED type and deliberately not on the one handed to
|
|
52
|
-
* `styled()`: adding it to the argument widens that dot-path union past the
|
|
53
|
-
* checker's limit again, and the mapping only ever names `className`. The same
|
|
54
|
-
* goes for {@link WebAriaProps}.
|
|
55
|
-
*/
|
|
56
|
-
export type StyledPressableProps = Omit<StyledPressableBase, 'role'> &
|
|
57
|
-
WebAriaProps & {
|
|
58
|
-
/** RNW supports these menu roles; native callers retain checkbox/radio. */
|
|
59
|
-
role?: PressableProps['role'] | 'menuitemcheckbox' | 'menuitemradio';
|
|
60
|
-
ref?: Ref<ComponentRef<typeof View>>;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* `styled()` is declared as returning `any`, so these annotations are the whole
|
|
65
|
-
* type contract — including `ref`, which under React 19 is an ordinary prop that
|
|
66
|
-
* `useCssElement` spreads onto the wrapped primitive. Leaving it out made a
|
|
67
|
-
* measured node (a flyout's scroll box, a select option) a compile error while
|
|
68
|
-
* the runtime forwarded it fine.
|
|
69
|
-
*/
|
|
70
|
-
export const StyledView = View as ComponentType<
|
|
71
|
-
Omit<ViewProps, 'role'> & {
|
|
72
|
-
/** Web-only listbox semantics; RN's Role type does not include this role. */
|
|
73
|
-
role?: ViewProps['role'] | 'listbox';
|
|
74
|
-
ref?: Ref<ComponentRef<typeof View>>;
|
|
75
|
-
}
|
|
76
|
-
>;
|
|
77
|
-
|
|
78
|
-
export const StyledText: ComponentType<TextProps & { ref?: Ref<ComponentRef<typeof Text>> }> = Text;
|
|
79
|
-
|
|
80
|
-
/** Bloom's one raster renderer (expo-image on a device), never react-native's `Image`. */
|
|
81
|
-
export const StyledImage: ComponentType<BloomImageProps> = BloomImage;
|
|
82
|
-
|
|
83
|
-
export const StyledPressable = Pressable as ComponentType<StyledPressableProps>;
|
|
84
|
-
|
|
85
|
-
export const StyledScrollView: ComponentType<
|
|
86
|
-
ScrollViewProps & { ref?: Ref<ComponentRef<typeof ScrollView>> }
|
|
87
|
-
> = ScrollView;
|
package/src/teleport/Portal.tsx
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/components/Portal.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import { useContext, useEffect } from 'react';
|
|
8
|
-
import { usePortalManagerContext } from './portal-manager';
|
|
9
|
-
import ScrollViewContext from './scroll-view-context/context';
|
|
10
|
-
import PortalView from './PortalView';
|
|
11
|
-
import useId from './use-id';
|
|
12
|
-
import type { PortalProps } from './types';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Portal helps you to render a component in a different place in the view hierarchy.
|
|
16
|
-
* This is useful when you need a view to visually “break out” of its parent container (for example: modals, toasts, floating UI, popovers).
|
|
17
|
-
*
|
|
18
|
-
* @category components
|
|
19
|
-
* @param hostName - The `name` of the `PortalHost`. It's used to identify the host where the content should be rendered.
|
|
20
|
-
* @param name - The name of the portal. It's used to identify the portal.
|
|
21
|
-
* @param children - The content that should be rendered in the portal.
|
|
22
|
-
* @example
|
|
23
|
-
* ```tsx
|
|
24
|
-
* import { useState } from "react";
|
|
25
|
-
* import { View, StyleSheet, Button } from "react-native";
|
|
26
|
-
* import { Portal } from "react-native-teleport";
|
|
27
|
-
* export default function InstantRootExample() {
|
|
28
|
-
* const [shouldBeTeleported, setTeleported] = useState(true);
|
|
29
|
-
* return (
|
|
30
|
-
* <View style={styles.container}>
|
|
31
|
-
* {shouldBeTeleported && (
|
|
32
|
-
* <Portal hostName={"overlay"}>
|
|
33
|
-
* <View style={styles.box} />
|
|
34
|
-
* </Portal>
|
|
35
|
-
* )}
|
|
36
|
-
* <Button
|
|
37
|
-
* title={shouldBeTeleported ? "Hide" : "Show"}
|
|
38
|
-
* onPress={() => setTeleported((t) => !t)}
|
|
39
|
-
* />
|
|
40
|
-
* </View>
|
|
41
|
-
* );
|
|
42
|
-
* }
|
|
43
|
-
* const styles = StyleSheet.create({
|
|
44
|
-
* container: {
|
|
45
|
-
* flex: 1,
|
|
46
|
-
* alignItems: "center",
|
|
47
|
-
* justifyContent: "center",
|
|
48
|
-
* },
|
|
49
|
-
* box: {
|
|
50
|
-
* width: 160,
|
|
51
|
-
* height: 160,
|
|
52
|
-
* marginVertical: 20,
|
|
53
|
-
* backgroundColor: "blue",
|
|
54
|
-
* },
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
const PortalComponent = ({ hostName, name, style, children }: PortalProps) => {
|
|
59
|
-
const sourceScrollViewContext = useContext(ScrollViewContext);
|
|
60
|
-
const { state, dispatch } = usePortalManagerContext();
|
|
61
|
-
const instanceId = useId();
|
|
62
|
-
|
|
63
|
-
const scrollViewContext =
|
|
64
|
-
hostName && state.hosts[hostName]
|
|
65
|
-
? (state.hostScrollViewContexts[hostName] ?? null)
|
|
66
|
-
: sourceScrollViewContext;
|
|
67
|
-
|
|
68
|
-
const isRemoved = hostName && name ? state.removed[hostName]?.[name]?.[instanceId] : false;
|
|
69
|
-
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
if (!hostName || !name) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
dispatch({ type: 'REGISTER_PORTAL', hostName, name, instanceId });
|
|
76
|
-
|
|
77
|
-
return () => {
|
|
78
|
-
dispatch({
|
|
79
|
-
type: 'CLEAR_REMOVED_ON_UNMOUNT',
|
|
80
|
-
hostName,
|
|
81
|
-
name,
|
|
82
|
-
instanceId,
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
}, [dispatch, hostName, name, instanceId]);
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<ScrollViewContext.Provider value={scrollViewContext}>
|
|
89
|
-
<PortalView hostName={hostName} name={name} style={style}>
|
|
90
|
-
{isRemoved ? null : children}
|
|
91
|
-
</PortalView>
|
|
92
|
-
</ScrollViewContext.Provider>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export default PortalComponent;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/components/PortalHost.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import { useContext, useEffect } from 'react';
|
|
8
|
-
import { usePortalManagerContext } from './portal-manager';
|
|
9
|
-
import ScrollViewContext from './scroll-view-context/context';
|
|
10
|
-
import type { PortalHostProps } from './types';
|
|
11
|
-
import PortalHost from './PortalHostView';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* PortalHost is a component that acts as an anchor for the portals.
|
|
15
|
-
* You can define multiple portal hosts in your app and use them to render different portals.
|
|
16
|
-
* Each portal host has a unique name that you can use to identify a necessary one among the others.
|
|
17
|
-
*
|
|
18
|
-
* @category components
|
|
19
|
-
* @param name - The name of the portal host. It's used by `<Portal />` component to identify the host.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* import { StyleSheet, View } from "react-native";
|
|
24
|
-
* import { PortalHost, PortalProvider } from "react-native-teleport";
|
|
25
|
-
* export default function App() {
|
|
26
|
-
* return (
|
|
27
|
-
* <PortalProvider>
|
|
28
|
-
* <PortalHost style={StyleSheet.absoluteFill} name="overlay" />
|
|
29
|
-
* </PortalProvider>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
const PortalHostComponent = ({ name, children, style }: PortalHostProps) => {
|
|
35
|
-
const { dispatch } = usePortalManagerContext();
|
|
36
|
-
const scrollViewContext = useContext(ScrollViewContext);
|
|
37
|
-
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
dispatch({ type: 'REGISTER_HOST', hostName: name });
|
|
40
|
-
|
|
41
|
-
return () => {
|
|
42
|
-
dispatch({ type: 'UNREGISTER_HOST', hostName: name });
|
|
43
|
-
};
|
|
44
|
-
}, [name, dispatch]);
|
|
45
|
-
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
dispatch({
|
|
48
|
-
type: 'SET_HOST_SCROLL_VIEW_CONTEXT',
|
|
49
|
-
hostName: name,
|
|
50
|
-
value: scrollViewContext,
|
|
51
|
-
});
|
|
52
|
-
}, [name, dispatch, scrollViewContext]);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<PortalHost name={name} style={style}>
|
|
56
|
-
{children}
|
|
57
|
-
</PortalHost>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default PortalHostComponent;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalHost/index.native.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import PortalHostNativeComponent from './specs/PortalHostViewNativeComponent';
|
|
8
|
-
import type { PortalHostProps } from './types';
|
|
9
|
-
|
|
10
|
-
const PortalHost = (props: PortalHostProps) => {
|
|
11
|
-
return <PortalHostNativeComponent pointerEvents="box-none" {...props} />;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default PortalHost;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalHost/index.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import { memo, useEffect } from 'react';
|
|
8
|
-
import { usePortalRegistryContext } from './portal-registry';
|
|
9
|
-
import type { PortalHostProps } from './types';
|
|
10
|
-
|
|
11
|
-
function PortalHost({ name, children, style }: PortalHostProps) {
|
|
12
|
-
const { registerHost } = usePortalRegistryContext();
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
return () => {
|
|
16
|
-
registerHost(name, null);
|
|
17
|
-
};
|
|
18
|
-
}, [name, registerHost]);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div
|
|
22
|
-
style={{ ...style, pointerEvents: 'none' } as React.CSSProperties}
|
|
23
|
-
ref={(ref) => registerHost(name, ref)}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default memo(PortalHost);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/PortalProvider.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import PortalHost from './PortalHost';
|
|
8
|
-
import NativePortalProvider from './PortalProviderView';
|
|
9
|
-
import { PortalManagerProvider } from './portal-manager';
|
|
10
|
-
|
|
11
|
-
type PortalProviderProps = {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Wraps your app with this component to use the teleport API.
|
|
17
|
-
*
|
|
18
|
-
* This component provides a context/registry for all Portals so that you can use imperative API, such as `usePortal` hook to manage Portals.
|
|
19
|
-
*
|
|
20
|
-
* @category components
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* import { PortalProvider } from "react-native-teleport";
|
|
24
|
-
* export default function App() {
|
|
25
|
-
* return (
|
|
26
|
-
* <PortalProvider>
|
|
27
|
-
* //* your main application code goes here
|
|
28
|
-
* </PortalProvider>
|
|
29
|
-
* );
|
|
30
|
-
* }
|
|
31
|
-
*/
|
|
32
|
-
export default function PortalProvider({ children }: PortalProviderProps) {
|
|
33
|
-
return (
|
|
34
|
-
<NativePortalProvider>
|
|
35
|
-
<PortalManagerProvider>
|
|
36
|
-
{children}
|
|
37
|
-
<PortalHost name="root" style={styles.root} />
|
|
38
|
-
</PortalManagerProvider>
|
|
39
|
-
</NativePortalProvider>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const styles = {
|
|
44
|
-
root: {
|
|
45
|
-
position: 'absolute',
|
|
46
|
-
top: 0,
|
|
47
|
-
bottom: 0,
|
|
48
|
-
left: 0,
|
|
49
|
-
right: 0,
|
|
50
|
-
},
|
|
51
|
-
} as const;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.native.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: nothing — byte-for-byte, only its path.
|
|
6
|
-
*/
|
|
7
|
-
import type { PortalProviderProps } from './types';
|
|
8
|
-
|
|
9
|
-
export default function PortalProvider({ children }: PortalProviderProps) {
|
|
10
|
-
return children;
|
|
11
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import { useCallback, useMemo, useRef } from 'react';
|
|
8
|
-
import { PortalRegistryContext } from './portal-registry';
|
|
9
|
-
import type { PortalProviderProps } from './types';
|
|
10
|
-
|
|
11
|
-
export default function PortalProvider({ children }: PortalProviderProps) {
|
|
12
|
-
const hostsRef = useRef<Map<string, HTMLElement>>(new Map());
|
|
13
|
-
const pendingPortalsRef = useRef<Map<string, Set<() => void>>>(new Map());
|
|
14
|
-
|
|
15
|
-
const registerHost = useCallback((name: string, node: HTMLElement | null) => {
|
|
16
|
-
if (node) {
|
|
17
|
-
hostsRef.current.set(name, node);
|
|
18
|
-
} else {
|
|
19
|
-
hostsRef.current.delete(name);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const callbacks = pendingPortalsRef.current.get(name);
|
|
23
|
-
if (callbacks) {
|
|
24
|
-
callbacks.forEach((callback) => callback());
|
|
25
|
-
}
|
|
26
|
-
}, []);
|
|
27
|
-
const getHost = useCallback((name: string) => hostsRef.current.get(name) ?? null, []);
|
|
28
|
-
const registerPendingPortal = useCallback((name: string, callback: () => void) => {
|
|
29
|
-
const callbacks = pendingPortalsRef.current.get(name) ?? new Set();
|
|
30
|
-
callbacks.add(callback);
|
|
31
|
-
pendingPortalsRef.current.set(name, callbacks);
|
|
32
|
-
}, []);
|
|
33
|
-
const unregisterPendingPortal = useCallback((name: string, callback: () => void) => {
|
|
34
|
-
const callbacks = pendingPortalsRef.current.get(name);
|
|
35
|
-
if (callbacks) {
|
|
36
|
-
callbacks.delete(callback);
|
|
37
|
-
if (callbacks.size === 0) {
|
|
38
|
-
pendingPortalsRef.current.delete(name);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, []);
|
|
42
|
-
|
|
43
|
-
const value = useMemo(
|
|
44
|
-
() => ({
|
|
45
|
-
registerHost,
|
|
46
|
-
getHost,
|
|
47
|
-
registerPendingPortal,
|
|
48
|
-
unregisterPendingPortal,
|
|
49
|
-
}),
|
|
50
|
-
[registerHost, getHost, registerPendingPortal, unregisterPendingPortal],
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
return <PortalRegistryContext.Provider value={value}>{children}</PortalRegistryContext.Provider>;
|
|
54
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.native.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
export { default } from './specs/PortalViewNativeComponent';
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
/// <reference lib="dom" />
|
|
8
|
-
|
|
9
|
-
import { useRef, useLayoutEffect, useCallback } from 'react';
|
|
10
|
-
import { createPortal } from 'react-dom';
|
|
11
|
-
import { usePortalRegistryContext } from './portal-registry';
|
|
12
|
-
import type { PortalProps } from './types';
|
|
13
|
-
|
|
14
|
-
const supportsMoveBefore = typeof Element !== 'undefined' && 'moveBefore' in Element.prototype;
|
|
15
|
-
|
|
16
|
-
function moveElementTo(parent: Element, child: Element, before: Element | null = null) {
|
|
17
|
-
if (supportsMoveBefore && child.parentNode) {
|
|
18
|
-
parent.moveBefore(child, before);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (child.parentNode) {
|
|
23
|
-
child.parentNode.removeChild(child);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
parent.insertBefore(child, before);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default function Portal({ hostName, children, style }: PortalProps) {
|
|
30
|
-
const { getHost, registerPendingPortal, unregisterPendingPortal } = usePortalRegistryContext();
|
|
31
|
-
const elRef = useRef<HTMLDivElement | null>(null);
|
|
32
|
-
if (!elRef.current) {
|
|
33
|
-
elRef.current = document.createElement('div');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const sentinelRef = useRef<HTMLDivElement>(null);
|
|
37
|
-
|
|
38
|
-
useLayoutEffect(() => {
|
|
39
|
-
if (elRef.current && style) {
|
|
40
|
-
Object.assign(elRef.current.style, style);
|
|
41
|
-
}
|
|
42
|
-
}, [style]);
|
|
43
|
-
|
|
44
|
-
const teleportToHost = useCallback(() => {
|
|
45
|
-
const el = elRef.current;
|
|
46
|
-
if (!el) return;
|
|
47
|
-
|
|
48
|
-
const hostNode = hostName ? getHost(hostName) : null;
|
|
49
|
-
if (hostNode) {
|
|
50
|
-
// teleport view to the host
|
|
51
|
-
moveElementTo(hostNode, el);
|
|
52
|
-
} else if (sentinelRef.current && sentinelRef.current.parentElement) {
|
|
53
|
-
// keep view locally
|
|
54
|
-
const parent = sentinelRef.current.parentElement;
|
|
55
|
-
moveElementTo(parent, el, sentinelRef.current);
|
|
56
|
-
}
|
|
57
|
-
}, [hostName, getHost]);
|
|
58
|
-
|
|
59
|
-
useLayoutEffect(() => {
|
|
60
|
-
teleportToHost();
|
|
61
|
-
|
|
62
|
-
if (!hostName) return;
|
|
63
|
-
|
|
64
|
-
registerPendingPortal(hostName, teleportToHost);
|
|
65
|
-
return () => {
|
|
66
|
-
unregisterPendingPortal(hostName, teleportToHost);
|
|
67
|
-
};
|
|
68
|
-
}, [hostName, registerPendingPortal, unregisterPendingPortal, teleportToHost]);
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<>
|
|
72
|
-
{createPortal(children, elRef.current)}
|
|
73
|
-
{/* Invisible sentinel for local position */}
|
|
74
|
-
<div ref={sentinelRef} style={styles.anchor} />
|
|
75
|
-
</>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const styles = {
|
|
80
|
-
anchor: {
|
|
81
|
-
display: 'contents',
|
|
82
|
-
},
|
|
83
|
-
};
|
package/src/teleport/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* react-native-teleport, vendored.
|
|
3
|
-
*
|
|
4
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/index.ts`. MIT, Copyright (c)
|
|
5
|
-
* 2025 Kiryl Ziusko; the full licence is in `NOTICE` at the repository root and
|
|
6
|
-
* every file in this directory names the file it came from.
|
|
7
|
-
*
|
|
8
|
-
* It is here rather than as a dependency because Bloom needs its NATIVE
|
|
9
|
-
* re-parenting — moving one platform view between hosts instead of mounting a
|
|
10
|
-
* second one — and that arrives as Fabric components, not as JavaScript.
|
|
11
|
-
*
|
|
12
|
-
* WHAT IS DIFFERENT FROM UPSTREAM, and it is not their code: **Bloom mounts
|
|
13
|
-
* these portals from its ROOT LAYER, never from the origin screen.** Their own
|
|
14
|
-
* recipe mounts the `<Portal>` inside the screen the media starts on, which is
|
|
15
|
-
* correct for a navigator that keeps that screen alive — and measured against
|
|
16
|
-
* expo-router on web, where the origin route unmounts on the URL change, it
|
|
17
|
-
* takes the media with it (`count 1 -> 0 -> 0`). The portal is not what fails
|
|
18
|
-
* there; the ownership is. Same piece, mounted where it does not die.
|
|
19
|
-
*
|
|
20
|
-
* Changed: import paths only, for this flat directory. Their file layout uses
|
|
21
|
-
* `index.tsx` per component, which Bloom's family-layout gate reserves for pure
|
|
22
|
-
* barrels, so each one is named after what it exports.
|
|
23
|
-
*/
|
|
24
|
-
export { default as PortalHost } from './PortalHost';
|
|
25
|
-
export { default as Portal } from './Portal';
|
|
26
|
-
export { default as PortalProvider } from './PortalProvider';
|
|
27
|
-
export { default as usePortal } from './use-portal';
|
|
28
|
-
export type {
|
|
29
|
-
PortalHostProps,
|
|
30
|
-
PortalProps,
|
|
31
|
-
PortalProviderProps,
|
|
32
|
-
} from './types';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/PortalManager.tsx`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: import paths only, for this flat directory.
|
|
6
|
-
*/
|
|
7
|
-
import { createContext, useContext, useReducer, useMemo, type ReactNode } from 'react';
|
|
8
|
-
import { initialState, reducer, type Action, type PortalState } from './reducer';
|
|
9
|
-
|
|
10
|
-
const PortalManagerContext = createContext<
|
|
11
|
-
{ state: PortalState; dispatch: React.Dispatch<Action> } | undefined
|
|
12
|
-
>(undefined);
|
|
13
|
-
|
|
14
|
-
export const PortalManagerProvider = ({ children }: { children: ReactNode }) => {
|
|
15
|
-
const [state, dispatch] = useReducer(reducer, initialState);
|
|
16
|
-
const context = useMemo(() => ({ state, dispatch }), [state, dispatch]);
|
|
17
|
-
|
|
18
|
-
return <PortalManagerContext.Provider value={context}>{children}</PortalManagerContext.Provider>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const usePortalManagerContext = () => {
|
|
22
|
-
const context = useContext(PortalManagerContext);
|
|
23
|
-
|
|
24
|
-
if (!context) {
|
|
25
|
-
throw new Error('usePortalContext must be used within PortalProvider');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return context;
|
|
29
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/PortalRegistry.ts`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: nothing — byte-for-byte, only its path.
|
|
6
|
-
*/
|
|
7
|
-
import { createContext, useContext } from 'react';
|
|
8
|
-
|
|
9
|
-
type PortalRegistryContextType = {
|
|
10
|
-
registerHost: (name: string, node: HTMLElement | null) => void;
|
|
11
|
-
getHost: (name: string) => HTMLElement | null;
|
|
12
|
-
registerPendingPortal: (name: string, callback: () => void) => void;
|
|
13
|
-
unregisterPendingPortal: (name: string, callback: () => void) => void;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const PortalRegistryContext = createContext<PortalRegistryContextType | null>(null);
|
|
17
|
-
|
|
18
|
-
export function usePortalRegistryContext() {
|
|
19
|
-
const context = useContext(PortalRegistryContext);
|
|
20
|
-
if (!context) {
|
|
21
|
-
throw new Error('usePortalRegistryContext must be used within a PortalRegistryContext');
|
|
22
|
-
}
|
|
23
|
-
return context;
|
|
24
|
-
}
|
package/src/teleport/reducer.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* COPIED FROM react-native-teleport 1.2.0 — `src/state/reducer.ts`
|
|
3
|
-
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
4
|
-
*
|
|
5
|
-
* Changed: nothing — byte-for-byte, only its path.
|
|
6
|
-
*/
|
|
7
|
-
import type { ScrollViewContextValue } from './scroll-view-context/types';
|
|
8
|
-
|
|
9
|
-
export type PortalState = {
|
|
10
|
-
removed: Record<string, Record<string, Record<string, boolean>>>;
|
|
11
|
-
hosts: Record<string, number>;
|
|
12
|
-
hostScrollViewContexts: Record<string, ScrollViewContextValue | undefined>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type Action =
|
|
16
|
-
| { type: 'REMOVE_PORTAL'; hostName: string; name: string }
|
|
17
|
-
| {
|
|
18
|
-
type: 'CLEAR_REMOVED_ON_UNMOUNT';
|
|
19
|
-
hostName: string;
|
|
20
|
-
name: string;
|
|
21
|
-
instanceId: string;
|
|
22
|
-
}
|
|
23
|
-
| {
|
|
24
|
-
type: 'REGISTER_PORTAL';
|
|
25
|
-
hostName: string;
|
|
26
|
-
name: string;
|
|
27
|
-
instanceId: string;
|
|
28
|
-
}
|
|
29
|
-
| { type: 'REGISTER_HOST'; hostName: string }
|
|
30
|
-
| { type: 'UNREGISTER_HOST'; hostName: string }
|
|
31
|
-
| {
|
|
32
|
-
type: 'SET_HOST_SCROLL_VIEW_CONTEXT';
|
|
33
|
-
hostName: string;
|
|
34
|
-
value: ScrollViewContextValue;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const initialState: PortalState = {
|
|
38
|
-
removed: {},
|
|
39
|
-
hosts: {},
|
|
40
|
-
hostScrollViewContexts: {},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const reducer = (state: PortalState, action: Action): PortalState => {
|
|
44
|
-
const cloned = {
|
|
45
|
-
...state,
|
|
46
|
-
removed: { ...state.removed },
|
|
47
|
-
hostScrollViewContexts: { ...state.hostScrollViewContexts },
|
|
48
|
-
};
|
|
49
|
-
const hostRemoved = 'name' in action ? cloned.removed[action.hostName] || {} : {};
|
|
50
|
-
cloned.removed[action.hostName] = hostRemoved;
|
|
51
|
-
const nameRemoved = 'name' in action ? hostRemoved[action.name] || {} : {};
|
|
52
|
-
if ('name' in action) {
|
|
53
|
-
hostRemoved[action.name] = nameRemoved;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
switch (action.type) {
|
|
57
|
-
case 'REGISTER_HOST': {
|
|
58
|
-
const hosts = { ...cloned.hosts };
|
|
59
|
-
hosts[action.hostName] = (hosts[action.hostName] || 0) + 1;
|
|
60
|
-
return { ...cloned, hosts };
|
|
61
|
-
}
|
|
62
|
-
case 'UNREGISTER_HOST': {
|
|
63
|
-
const hosts = { ...cloned.hosts };
|
|
64
|
-
const count = (hosts[action.hostName] || 0) - 1;
|
|
65
|
-
if (count <= 0) {
|
|
66
|
-
delete hosts[action.hostName];
|
|
67
|
-
delete cloned.hostScrollViewContexts[action.hostName];
|
|
68
|
-
} else {
|
|
69
|
-
hosts[action.hostName] = count;
|
|
70
|
-
}
|
|
71
|
-
return { ...cloned, hosts };
|
|
72
|
-
}
|
|
73
|
-
case 'SET_HOST_SCROLL_VIEW_CONTEXT':
|
|
74
|
-
cloned.hostScrollViewContexts[action.hostName] = action.value;
|
|
75
|
-
return cloned;
|
|
76
|
-
case 'REGISTER_PORTAL':
|
|
77
|
-
if (!nameRemoved[action.instanceId]) {
|
|
78
|
-
nameRemoved[action.instanceId] = false;
|
|
79
|
-
}
|
|
80
|
-
return cloned;
|
|
81
|
-
case 'REMOVE_PORTAL':
|
|
82
|
-
Object.keys(nameRemoved).forEach((id) => (nameRemoved[id] = true));
|
|
83
|
-
return cloned;
|
|
84
|
-
case 'CLEAR_REMOVED_ON_UNMOUNT':
|
|
85
|
-
delete nameRemoved[action.instanceId];
|
|
86
|
-
if (Object.keys(nameRemoved).length === 0) {
|
|
87
|
-
delete hostRemoved[action.name];
|
|
88
|
-
}
|
|
89
|
-
return cloned;
|
|
90
|
-
default:
|
|
91
|
-
return state;
|
|
92
|
-
}
|
|
93
|
-
};
|