@oxy.so/bloom 19.6.0 → 19.7.1
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/docs/adoption-matrix.mdx +9 -9
- package/docs/bottom-bar.mdx +66 -1
- package/docs/button.mdx +19 -0
- package/docs/chat-composer.mdx +59 -1
- package/docs/collapsible.mdx +13 -4
- package/docs/composer-loader.mdx +6 -0
- package/docs/icons.mdx +22 -0
- package/docs/public-parts.mdx +13 -2
- package/docs/tab-pager.mdx +10 -0
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/app-shell/EdgeDock.js +7 -7
- package/lib/commonjs/app-shell/EdgeDock.js.map +1 -1
- package/lib/commonjs/bottom-bar/BottomBarBase.js +174 -38
- package/lib/commonjs/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/commonjs/button/GlyphAttention.js +110 -0
- package/lib/commonjs/button/GlyphAttention.js.map +1 -0
- package/lib/commonjs/button/GlyphButton.js +18 -7
- package/lib/commonjs/button/GlyphButton.js.map +1 -1
- package/lib/commonjs/chat-composer/CompactComposer.js +18 -0
- package/lib/commonjs/chat-composer/CompactComposer.js.map +1 -0
- package/lib/commonjs/chat-composer/CompactComposer.web.js +18 -0
- package/lib/commonjs/chat-composer/CompactComposer.web.js.map +1 -0
- package/lib/commonjs/chat-composer/compact-text.js +11 -0
- package/lib/commonjs/chat-composer/compact-text.js.map +1 -0
- package/lib/commonjs/chat-composer/compact-types.js +6 -0
- package/lib/commonjs/chat-composer/compact-types.js.map +1 -0
- package/lib/commonjs/chat-composer/create-compact-composer.js +185 -0
- package/lib/commonjs/chat-composer/create-compact-composer.js.map +1 -0
- package/lib/commonjs/chat-composer/index.js +14 -0
- package/lib/commonjs/chat-composer/index.js.map +1 -1
- package/lib/commonjs/chat-composer/index.web.js +14 -0
- package/lib/commonjs/chat-composer/index.web.js.map +1 -1
- package/lib/commonjs/chat-composer/messages.js +8 -1
- package/lib/commonjs/chat-composer/messages.js.map +1 -1
- package/lib/commonjs/collapsible/Collapsible.web.js +2 -3
- package/lib/commonjs/collapsible/Collapsible.web.js.map +1 -1
- package/lib/commonjs/collapsible/CollapsibleFrame.web.js +59 -20
- package/lib/commonjs/collapsible/CollapsibleFrame.web.js.map +1 -1
- package/lib/commonjs/icons/index.js +12 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/social/BookmarkFillIcon.js +12 -0
- package/lib/commonjs/icons/social/BookmarkFillIcon.js.map +1 -0
- package/lib/commonjs/icons/social/BookmarkIcon.js +12 -0
- package/lib/commonjs/icons/social/BookmarkIcon.js.map +1 -0
- package/lib/commonjs/icons/social/GifAttachmentIcon.js +12 -0
- package/lib/commonjs/icons/social/GifAttachmentIcon.js.map +1 -0
- package/lib/commonjs/icons/social/LikeFillIcon.js +13 -0
- package/lib/commonjs/icons/social/LikeFillIcon.js.map +1 -0
- package/lib/commonjs/icons/social/LikeIcon.js +14 -0
- package/lib/commonjs/icons/social/LikeIcon.js.map +1 -0
- package/lib/commonjs/icons/social/MediaAttachmentIcon.js +12 -0
- package/lib/commonjs/icons/social/MediaAttachmentIcon.js.map +1 -0
- package/lib/commonjs/icons/social/ReplyIcon.js +14 -0
- package/lib/commonjs/icons/social/ReplyIcon.js.map +1 -0
- package/lib/commonjs/icons/social/RepostIcon.js +12 -0
- package/lib/commonjs/icons/social/RepostIcon.js.map +1 -0
- package/lib/commonjs/icons/social/ShareIcon.js +12 -0
- package/lib/commonjs/icons/social/ShareIcon.js.map +1 -0
- package/lib/commonjs/icons/social/index.js +69 -0
- package/lib/commonjs/icons/social/index.js.map +1 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +14 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/layout/bottom-edge.js +14 -0
- package/lib/commonjs/layout/bottom-edge.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +8 -0
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +8 -0
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +8 -0
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +8 -0
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +8 -0
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +8 -0
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +8 -0
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +8 -0
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +8 -0
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +8 -0
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +8 -0
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +8 -0
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +8 -0
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +8 -0
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/commonjs/styles/web-view-style.js +9 -0
- package/lib/commonjs/styles/web-view-style.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +126 -20
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/commonjs/tab-bar/shared.js +3 -1
- package/lib/commonjs/tab-bar/shared.js.map +1 -1
- package/lib/commonjs/tab-pager/TabPagerBottomBar.js +12 -2
- package/lib/commonjs/tab-pager/TabPagerBottomBar.js.map +1 -1
- package/lib/module/app-shell/EdgeDock.js +4 -4
- package/lib/module/app-shell/EdgeDock.js.map +1 -1
- package/lib/module/bottom-bar/BottomBarBase.js +176 -40
- package/lib/module/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/module/button/GlyphAttention.js +104 -0
- package/lib/module/button/GlyphAttention.js.map +1 -0
- package/lib/module/button/GlyphButton.js +18 -7
- package/lib/module/button/GlyphButton.js.map +1 -1
- package/lib/module/chat-composer/CompactComposer.js +14 -0
- package/lib/module/chat-composer/CompactComposer.js.map +1 -0
- package/lib/module/chat-composer/CompactComposer.web.js +14 -0
- package/lib/module/chat-composer/CompactComposer.web.js.map +1 -0
- package/lib/module/chat-composer/compact-text.js +7 -0
- package/lib/module/chat-composer/compact-text.js.map +1 -0
- package/lib/module/chat-composer/compact-types.js +4 -0
- package/lib/module/chat-composer/compact-types.js.map +1 -0
- package/lib/module/chat-composer/create-compact-composer.js +181 -0
- package/lib/module/chat-composer/create-compact-composer.js.map +1 -0
- package/lib/module/chat-composer/index.js +2 -0
- package/lib/module/chat-composer/index.js.map +1 -1
- package/lib/module/chat-composer/index.web.js +2 -0
- package/lib/module/chat-composer/index.web.js.map +1 -1
- package/lib/module/chat-composer/messages.js +7 -0
- package/lib/module/chat-composer/messages.js.map +1 -1
- package/lib/module/collapsible/Collapsible.web.js +3 -4
- package/lib/module/collapsible/Collapsible.web.js.map +1 -1
- package/lib/module/collapsible/CollapsibleFrame.web.js +59 -18
- package/lib/module/collapsible/CollapsibleFrame.web.js.map +1 -1
- package/lib/module/icons/index.js +2 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/social/BookmarkFillIcon.js +9 -0
- package/lib/module/icons/social/BookmarkFillIcon.js.map +1 -0
- package/lib/module/icons/social/BookmarkIcon.js +9 -0
- package/lib/module/icons/social/BookmarkIcon.js.map +1 -0
- package/lib/module/icons/social/GifAttachmentIcon.js +9 -0
- package/lib/module/icons/social/GifAttachmentIcon.js.map +1 -0
- package/lib/module/icons/social/LikeFillIcon.js +10 -0
- package/lib/module/icons/social/LikeFillIcon.js.map +1 -0
- package/lib/module/icons/social/LikeIcon.js +11 -0
- package/lib/module/icons/social/LikeIcon.js.map +1 -0
- package/lib/module/icons/social/MediaAttachmentIcon.js +9 -0
- package/lib/module/icons/social/MediaAttachmentIcon.js.map +1 -0
- package/lib/module/icons/social/ReplyIcon.js +11 -0
- package/lib/module/icons/social/ReplyIcon.js.map +1 -0
- package/lib/module/icons/social/RepostIcon.js +9 -0
- package/lib/module/icons/social/RepostIcon.js.map +1 -0
- package/lib/module/icons/social/ShareIcon.js +9 -0
- package/lib/module/icons/social/ShareIcon.js.map +1 -0
- package/lib/module/icons/social/index.js +12 -0
- package/lib/module/icons/social/index.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/layout/bottom-edge.js +14 -1
- package/lib/module/layout/bottom-edge.js.map +1 -1
- package/lib/module/locale/translations/ar.js +8 -0
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +8 -0
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +8 -0
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +8 -0
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +8 -0
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +8 -0
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +8 -0
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +8 -0
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +8 -0
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +8 -0
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +8 -0
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +8 -0
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +8 -0
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +8 -0
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/module/styles/web-view-style.js +8 -0
- package/lib/module/styles/web-view-style.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +130 -23
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/tab-bar/shared.js +2 -0
- package/lib/module/tab-bar/shared.js.map +1 -1
- package/lib/module/tab-pager/TabPagerBottomBar.js +13 -3
- package/lib/module/tab-pager/TabPagerBottomBar.js.map +1 -1
- package/lib/typescript/commonjs/app-shell/EdgeDock.d.ts +1 -1
- package/lib/typescript/commonjs/app-shell/EdgeDock.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/types.d.ts +10 -2
- package/lib/typescript/commonjs/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/GlyphAttention.d.ts +11 -0
- package/lib/typescript/commonjs/button/GlyphAttention.d.ts.map +1 -0
- package/lib/typescript/commonjs/button/GlyphButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/types.d.ts +11 -0
- package/lib/typescript/commonjs/button/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/CompactComposer.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/compact-text.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/compact-text.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/compact-types.d.ts +45 -0
- package/lib/typescript/commonjs/chat-composer/compact-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-compact-composer.d.ts +13 -0
- package/lib/typescript/commonjs/chat-composer/create-compact-composer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/index.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/messages.d.ts +8 -0
- package/lib/typescript/commonjs/chat-composer/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/collapsible/Collapsible.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/collapsible/CollapsibleFrame.web.d.ts +2 -2
- package/lib/typescript/commonjs/collapsible/CollapsibleFrame.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/social/BookmarkFillIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/BookmarkFillIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/BookmarkIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/BookmarkIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/GifAttachmentIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/GifAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/LikeFillIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/LikeFillIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/LikeIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/LikeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/MediaAttachmentIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/MediaAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/ReplyIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/ReplyIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/RepostIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/RepostIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/ShareIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/ShareIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/index.d.ts +10 -0
- package/lib/typescript/commonjs/icons/social/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts +2 -0
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts +2 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/web-view-style.d.ts +3 -0
- package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/shared.d.ts +2 -0
- package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/types.d.ts +2 -0
- package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-pager/TabPagerBottomBar.d.ts +1 -1
- package/lib/typescript/commonjs/tab-pager/TabPagerBottomBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-pager/types.d.ts +4 -1
- package/lib/typescript/commonjs/tab-pager/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/EdgeDock.d.ts +1 -1
- package/lib/typescript/module/app-shell/EdgeDock.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/types.d.ts +10 -2
- package/lib/typescript/module/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/button/GlyphAttention.d.ts +11 -0
- package/lib/typescript/module/button/GlyphAttention.d.ts.map +1 -0
- package/lib/typescript/module/button/GlyphButton.d.ts.map +1 -1
- package/lib/typescript/module/button/types.d.ts +11 -0
- package/lib/typescript/module/button/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/CompactComposer.d.ts +2 -0
- package/lib/typescript/module/chat-composer/CompactComposer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/CompactComposer.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/CompactComposer.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/compact-text.d.ts +3 -0
- package/lib/typescript/module/chat-composer/compact-text.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/compact-types.d.ts +45 -0
- package/lib/typescript/module/chat-composer/compact-types.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-compact-composer.d.ts +13 -0
- package/lib/typescript/module/chat-composer/create-compact-composer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/index.d.ts +3 -0
- package/lib/typescript/module/chat-composer/index.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/index.web.d.ts +3 -0
- package/lib/typescript/module/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/messages.d.ts +8 -0
- package/lib/typescript/module/chat-composer/messages.d.ts.map +1 -1
- package/lib/typescript/module/collapsible/Collapsible.web.d.ts.map +1 -1
- package/lib/typescript/module/collapsible/CollapsibleFrame.web.d.ts +2 -2
- package/lib/typescript/module/collapsible/CollapsibleFrame.web.d.ts.map +1 -1
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/icons/social/BookmarkFillIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/BookmarkFillIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/BookmarkIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/BookmarkIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/GifAttachmentIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/GifAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/LikeFillIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/LikeFillIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/LikeIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/LikeIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/MediaAttachmentIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/MediaAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/ReplyIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/ReplyIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/RepostIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/RepostIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/ShareIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/ShareIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/index.d.ts +10 -0
- package/lib/typescript/module/icons/social/index.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/bottom-edge.d.ts +2 -0
- package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/types.d.ts +2 -1
- package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/styles/web-view-style.d.ts +3 -0
- package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/shared.d.ts +2 -0
- package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/types.d.ts +2 -0
- package/lib/typescript/module/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/tab-pager/TabPagerBottomBar.d.ts +1 -1
- package/lib/typescript/module/tab-pager/TabPagerBottomBar.d.ts.map +1 -1
- package/lib/typescript/module/tab-pager/types.d.ts +4 -1
- package/lib/typescript/module/tab-pager/types.d.ts.map +1 -1
- package/package.json +154 -1
- package/src/__tests__/support/public-part-classifications.json +22 -1
- package/src/__tests__/support/yoga-host-tree.ts +12 -2
- package/src/app-shell/EdgeDock.tsx +4 -5
- package/src/bottom-bar/BottomBarBase.tsx +280 -46
- package/src/bottom-bar/types.ts +10 -2
- package/src/button/GlyphAttention.tsx +100 -0
- package/src/button/GlyphButton.tsx +21 -6
- package/src/button/types.ts +11 -0
- package/src/chat-composer/CompactComposer.tsx +7 -0
- package/src/chat-composer/CompactComposer.web.tsx +7 -0
- package/src/chat-composer/compact-text.ts +4 -0
- package/src/chat-composer/compact-types.ts +47 -0
- package/src/chat-composer/create-compact-composer.tsx +213 -0
- package/src/chat-composer/index.ts +8 -0
- package/src/chat-composer/index.web.ts +8 -0
- package/src/chat-composer/messages.ts +16 -0
- package/src/collapsible/Collapsible.web.tsx +2 -7
- package/src/collapsible/CollapsibleFrame.web.tsx +73 -20
- package/src/icons/index.ts +2 -1
- package/src/icons/social/BookmarkFillIcon.tsx +6 -0
- package/src/icons/social/BookmarkIcon.tsx +6 -0
- package/src/icons/social/GifAttachmentIcon.tsx +6 -0
- package/src/icons/social/LikeFillIcon.tsx +7 -0
- package/src/icons/social/LikeIcon.tsx +8 -0
- package/src/icons/social/MediaAttachmentIcon.tsx +6 -0
- package/src/icons/social/ReplyIcon.tsx +8 -0
- package/src/icons/social/RepostIcon.tsx +6 -0
- package/src/icons/social/ShareIcon.tsx +6 -0
- package/src/icons/social/index.ts +9 -0
- package/src/index.ts +5 -0
- package/src/index.web.ts +5 -0
- package/src/layout/bottom-edge.tsx +17 -0
- package/src/locale/translations/ar.ts +9 -0
- package/src/locale/translations/bn.ts +9 -0
- package/src/locale/translations/ca.ts +10 -0
- package/src/locale/translations/de.ts +10 -0
- package/src/locale/translations/es.ts +10 -0
- package/src/locale/translations/fr.ts +10 -0
- package/src/locale/translations/hi.ts +9 -0
- package/src/locale/translations/id.ts +10 -0
- package/src/locale/translations/it.ts +10 -0
- package/src/locale/translations/ja.ts +10 -0
- package/src/locale/translations/pt.ts +10 -0
- package/src/locale/translations/ru.ts +10 -0
- package/src/locale/translations/tr.ts +10 -0
- package/src/locale/translations/types.ts +5 -1
- package/src/locale/translations/zh.ts +9 -0
- package/src/styles/web-view-style.ts +7 -0
- package/src/tab-bar/TabBarBase.tsx +193 -27
- package/src/tab-bar/shared.ts +2 -0
- package/src/tab-bar/types.ts +2 -0
- package/src/tab-pager/TabPagerBottomBar.tsx +23 -3
- package/src/tab-pager/types.ts +4 -1
package/src/button/types.ts
CHANGED
|
@@ -347,6 +347,17 @@ export interface CloseButtonProps {
|
|
|
347
347
|
* 0.6 is the middle of it (and exactly what the 40-box media header used).
|
|
348
348
|
*/
|
|
349
349
|
export interface GlyphButtonProps {
|
|
350
|
+
/** Original focus events from the interactive host; never activate the button. */
|
|
351
|
+
onFocus?: (event: ButtonFocusEvent) => void;
|
|
352
|
+
onBlur?: (event: ButtonFocusEvent) => void;
|
|
353
|
+
/**
|
|
354
|
+
* Opt-in attention token. Initialize it (for example to 0), then change it for
|
|
355
|
+
* each event that should softly pulse the glyph. Mounting is silent; repeated
|
|
356
|
+
* values do nothing. The button and its target keep their size and identity.
|
|
357
|
+
* Reduced motion, disabled and busy suppress the pulse. Supply a label or
|
|
358
|
+
* other visible feedback too: this motion carries no accessibility message.
|
|
359
|
+
*/
|
|
360
|
+
attention?: number;
|
|
350
361
|
/** Diameter of the round target. Default 36. */
|
|
351
362
|
size?: number;
|
|
352
363
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Button } from '../button/Button';
|
|
2
|
+
import { Collapsible } from '../collapsible/Collapsible';
|
|
3
|
+
import { ScrollArea } from '../layout/ScrollArea';
|
|
4
|
+
import { Surface } from '../surface/Surface';
|
|
5
|
+
import { createCompactComposer } from './create-compact-composer';
|
|
6
|
+
|
|
7
|
+
export const CompactComposer = createCompactComposer({ Button, Collapsible, ScrollArea, Surface });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Button } from '../button/Button.web';
|
|
2
|
+
import { Collapsible } from '../collapsible/Collapsible.web';
|
|
3
|
+
import { ScrollArea } from '../layout/ScrollArea.web';
|
|
4
|
+
import { Surface } from '../surface/Surface.web';
|
|
5
|
+
import { createCompactComposer } from './create-compact-composer';
|
|
6
|
+
|
|
7
|
+
export const CompactComposer = createCompactComposer({ Button, Collapsible, ScrollArea, Surface });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Existing longer drafts remain intact; edits may shorten or replace them without growing. */
|
|
2
|
+
export function acceptsComposerText(current: string, next: string, maxLength: number): boolean {
|
|
3
|
+
return next.length <= maxLength || (current.length > maxLength && next.length <= current.length);
|
|
4
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../button/types';
|
|
3
|
+
import type { TextareaProps } from '../textarea/types';
|
|
4
|
+
import type { ViewStyleProp } from '../styles';
|
|
5
|
+
|
|
6
|
+
export interface CompactComposerAction {
|
|
7
|
+
id: string;
|
|
8
|
+
icon: NonNullable<ButtonProps['icon']>;
|
|
9
|
+
label: string;
|
|
10
|
+
onPress: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
testID?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CompactComposerLabels {
|
|
16
|
+
input: string;
|
|
17
|
+
expand: string;
|
|
18
|
+
submit: string;
|
|
19
|
+
limitHint: string;
|
|
20
|
+
characterCount: string;
|
|
21
|
+
characterCountValue: (count: number, max: number) => string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A controlled compact editor. The application owns drafts, uploads and publication. */
|
|
25
|
+
export interface CompactComposerProps extends ViewStyleProp {
|
|
26
|
+
value: string;
|
|
27
|
+
onChangeText: (value: string) => void;
|
|
28
|
+
/** UTF-16 character limit. Existing longer values remain editable toward this limit. */
|
|
29
|
+
maxLength: number;
|
|
30
|
+
inputRef?: TextareaProps['inputRef'];
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
avatar?: ReactNode;
|
|
33
|
+
/** Pass null when empty; previews and their domain actions belong to the application. */
|
|
34
|
+
attachments?: ReactNode;
|
|
35
|
+
attachmentActions?: readonly CompactComposerAction[];
|
|
36
|
+
onExpand?: () => void;
|
|
37
|
+
onSubmit: () => void;
|
|
38
|
+
/** Input focus, retained when focus moves to a capsule control. Resets on leaving or unmount. */
|
|
39
|
+
onFocusChange?: (focused: boolean) => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
busy?: boolean;
|
|
42
|
+
/** Additional application permission; empty or over-limit drafts still cannot submit. */
|
|
43
|
+
canSubmit?: boolean;
|
|
44
|
+
labels?: Partial<CompactComposerLabels>;
|
|
45
|
+
className?: string;
|
|
46
|
+
testID?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ComponentRef,
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
useState,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import type { View as NativeView } from 'react-native';
|
|
10
|
+
import type { Button as ButtonComponent } from '../button/Button';
|
|
11
|
+
import { GlyphButton } from '../button/GlyphButton';
|
|
12
|
+
import type { Collapsible as CollapsibleComponent } from '../collapsible/Collapsible';
|
|
13
|
+
import { RiExpandDiagonalSLine } from '../icons/remix/RiExpandDiagonalSLine';
|
|
14
|
+
import type { ScrollArea as ScrollAreaComponent } from '../layout/ScrollArea';
|
|
15
|
+
import { Toolbar } from '../layout/Toolbar';
|
|
16
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
17
|
+
import { useMessages } from '../locale/messages';
|
|
18
|
+
import { MeterRing } from '../stat-bar/MeterRing';
|
|
19
|
+
import { IS_WEB } from '../styles/platform';
|
|
20
|
+
import { StyledView as View } from '../styles/styled-primitives';
|
|
21
|
+
import type { Surface as SurfaceComponent } from '../surface/Surface';
|
|
22
|
+
import { Textarea } from '../textarea/Textarea';
|
|
23
|
+
import { COMPACT_COMPOSER_MESSAGES } from './messages';
|
|
24
|
+
import { acceptsComposerText } from './compact-text';
|
|
25
|
+
import type { CompactComposerProps } from './compact-types';
|
|
26
|
+
|
|
27
|
+
/** Bind platform surfaces once. Both renderers share the same editor and behavior. */
|
|
28
|
+
export function createCompactComposer({
|
|
29
|
+
Button,
|
|
30
|
+
Collapsible,
|
|
31
|
+
ScrollArea,
|
|
32
|
+
Surface,
|
|
33
|
+
}: {
|
|
34
|
+
Button: typeof ButtonComponent;
|
|
35
|
+
Collapsible: typeof CollapsibleComponent;
|
|
36
|
+
ScrollArea: typeof ScrollAreaComponent;
|
|
37
|
+
Surface: typeof SurfaceComponent;
|
|
38
|
+
}) {
|
|
39
|
+
function CompactComposer({
|
|
40
|
+
value,
|
|
41
|
+
onChangeText,
|
|
42
|
+
maxLength,
|
|
43
|
+
inputRef,
|
|
44
|
+
placeholder,
|
|
45
|
+
avatar,
|
|
46
|
+
attachments,
|
|
47
|
+
attachmentActions = [],
|
|
48
|
+
onExpand,
|
|
49
|
+
onSubmit,
|
|
50
|
+
onFocusChange,
|
|
51
|
+
disabled = false,
|
|
52
|
+
busy = false,
|
|
53
|
+
canSubmit = true,
|
|
54
|
+
labels,
|
|
55
|
+
className,
|
|
56
|
+
style,
|
|
57
|
+
testID,
|
|
58
|
+
}: CompactComposerProps) {
|
|
59
|
+
const { messages } = useMessages(COMPACT_COMPOSER_MESSAGES);
|
|
60
|
+
const common = useCommonMessages();
|
|
61
|
+
const capsule = useRef<ComponentRef<typeof NativeView>>(null);
|
|
62
|
+
const [focused, setFocused] = useState(false);
|
|
63
|
+
const [attempt, setAttempt] = useState(0);
|
|
64
|
+
const focusCallback = useRef(onFocusChange);
|
|
65
|
+
useLayoutEffect(() => {
|
|
66
|
+
focusCallback.current = onFocusChange;
|
|
67
|
+
}, [onFocusChange]);
|
|
68
|
+
useEffect(() => () => focusCallback.current?.(false), []);
|
|
69
|
+
const updateFocus = useCallback((next: boolean) => {
|
|
70
|
+
setFocused(next);
|
|
71
|
+
focusCallback.current?.(next);
|
|
72
|
+
}, []);
|
|
73
|
+
const handleBlur = useCallback(
|
|
74
|
+
(event: unknown) => {
|
|
75
|
+
const next = (event as { relatedTarget?: Node }).relatedTarget;
|
|
76
|
+
const node = capsule.current as unknown as { contains?: (target: Node) => boolean } | null;
|
|
77
|
+
if (IS_WEB && next && node?.contains?.(next)) return;
|
|
78
|
+
updateFocus(false);
|
|
79
|
+
},
|
|
80
|
+
[updateFocus],
|
|
81
|
+
);
|
|
82
|
+
const hasAttachments = attachments != null && attachments !== false;
|
|
83
|
+
const blocked = disabled || busy;
|
|
84
|
+
const expanded = focused || value.length > 0 || busy || hasAttachments;
|
|
85
|
+
const submitEnabled =
|
|
86
|
+
!blocked &&
|
|
87
|
+
canSubmit &&
|
|
88
|
+
value.length <= maxLength &&
|
|
89
|
+
(value.trim().length > 0 || hasAttachments);
|
|
90
|
+
const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
|
|
91
|
+
const inputLabel = labels?.input ?? placeholder ?? messages.input;
|
|
92
|
+
const actions = (location: string) =>
|
|
93
|
+
attachmentActions.map((action) => (
|
|
94
|
+
<Button
|
|
95
|
+
key={action.id}
|
|
96
|
+
appearance="plain"
|
|
97
|
+
tone="neutral"
|
|
98
|
+
size="sm"
|
|
99
|
+
iconOnly
|
|
100
|
+
icon={action.icon}
|
|
101
|
+
iconSize={24}
|
|
102
|
+
accessibilityLabel={action.label}
|
|
103
|
+
onPress={action.onPress}
|
|
104
|
+
onBlur={handleBlur}
|
|
105
|
+
disabled={blocked || action.disabled}
|
|
106
|
+
testID={action.testID ?? id(`${location}-${action.id}`)}
|
|
107
|
+
/>
|
|
108
|
+
));
|
|
109
|
+
return (
|
|
110
|
+
<Surface
|
|
111
|
+
ref={capsule}
|
|
112
|
+
radius={28}
|
|
113
|
+
className={['overflow-hidden', className].filter(Boolean).join(' ')}
|
|
114
|
+
style={style}
|
|
115
|
+
testID={testID}
|
|
116
|
+
>
|
|
117
|
+
<ScrollArea
|
|
118
|
+
className="max-h-64 md:max-h-80"
|
|
119
|
+
containerClassName="max-h-64 md:max-h-80"
|
|
120
|
+
contentContainerClassName="px-3 py-1.5"
|
|
121
|
+
scrollbar="always"
|
|
122
|
+
keyboardShouldPersistTaps="handled"
|
|
123
|
+
testID={id('scroll')}
|
|
124
|
+
>
|
|
125
|
+
{attachments}
|
|
126
|
+
<View className="min-h-11 flex-row items-center gap-3">
|
|
127
|
+
{avatar}
|
|
128
|
+
<Textarea
|
|
129
|
+
inputRef={inputRef}
|
|
130
|
+
onFocus={() => updateFocus(true)}
|
|
131
|
+
onBlur={handleBlur}
|
|
132
|
+
value={value}
|
|
133
|
+
onChangeText={(next) => {
|
|
134
|
+
if (disabled) return;
|
|
135
|
+
if (acceptsComposerText(value, next, maxLength)) onChangeText(next);
|
|
136
|
+
else setAttempt((current) => current + 1);
|
|
137
|
+
}}
|
|
138
|
+
disabled={disabled}
|
|
139
|
+
placeholder={placeholder ?? messages.input}
|
|
140
|
+
accessibilityLabel={inputLabel}
|
|
141
|
+
size="sm"
|
|
142
|
+
rows={1}
|
|
143
|
+
autoResize
|
|
144
|
+
scrollEnabled={false}
|
|
145
|
+
className="min-w-0 flex-1"
|
|
146
|
+
fieldClassName="bg-transparent"
|
|
147
|
+
inputClassName="overflow-hidden p-0 text-base leading-5 text-foreground"
|
|
148
|
+
testID={id('input')}
|
|
149
|
+
/>
|
|
150
|
+
<View className="flex-row items-center">
|
|
151
|
+
{!expanded ? actions('inline') : null}
|
|
152
|
+
{onExpand ? (
|
|
153
|
+
<GlyphButton
|
|
154
|
+
onBlur={handleBlur}
|
|
155
|
+
size={32}
|
|
156
|
+
glyphSize={32}
|
|
157
|
+
hitSlop={6}
|
|
158
|
+
attention={attempt}
|
|
159
|
+
accessibilityHint={labels?.limitHint ?? messages.limitHint(maxLength)}
|
|
160
|
+
icon={RiExpandDiagonalSLine}
|
|
161
|
+
accessibilityLabel={labels?.expand ?? messages.expand}
|
|
162
|
+
disabled={blocked}
|
|
163
|
+
testID={id('maximize')}
|
|
164
|
+
onPress={onExpand}
|
|
165
|
+
/>
|
|
166
|
+
) : null}
|
|
167
|
+
</View>
|
|
168
|
+
</View>
|
|
169
|
+
</ScrollArea>
|
|
170
|
+
<Collapsible open={expanded}>
|
|
171
|
+
<Toolbar
|
|
172
|
+
size="sm"
|
|
173
|
+
style={{ paddingLeft: 8, paddingRight: 12, paddingTop: 8, paddingBottom: 8 }}
|
|
174
|
+
testID={id('toolbar')}
|
|
175
|
+
actions={
|
|
176
|
+
<View className="flex-row items-center gap-3">
|
|
177
|
+
<MeterRing
|
|
178
|
+
value={value.length}
|
|
179
|
+
max={maxLength}
|
|
180
|
+
size={20}
|
|
181
|
+
thickness={2}
|
|
182
|
+
accessibilityLabel={labels?.characterCount ?? messages.characterCount}
|
|
183
|
+
valueText={(labels?.characterCountValue ?? messages.characterCountValue)(
|
|
184
|
+
value.length,
|
|
185
|
+
maxLength,
|
|
186
|
+
)}
|
|
187
|
+
testID={id('count')}
|
|
188
|
+
/>
|
|
189
|
+
<Button
|
|
190
|
+
onBlur={handleBlur}
|
|
191
|
+
tone="action"
|
|
192
|
+
size="md"
|
|
193
|
+
className="min-w-20"
|
|
194
|
+
onPress={() => {
|
|
195
|
+
if (submitEnabled) onSubmit();
|
|
196
|
+
}}
|
|
197
|
+
disabled={!submitEnabled}
|
|
198
|
+
loading={busy}
|
|
199
|
+
testID={id('submit')}
|
|
200
|
+
>
|
|
201
|
+
{labels?.submit ?? common.send}
|
|
202
|
+
</Button>
|
|
203
|
+
</View>
|
|
204
|
+
}
|
|
205
|
+
>
|
|
206
|
+
<View className="flex-row items-center">{actions('toolbar')}</View>
|
|
207
|
+
</Toolbar>
|
|
208
|
+
</Collapsible>
|
|
209
|
+
</Surface>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
return CompactComposer;
|
|
213
|
+
}
|
|
@@ -47,3 +47,11 @@ export type {
|
|
|
47
47
|
VoiceRecorderProps,
|
|
48
48
|
VoiceRecorderState,
|
|
49
49
|
} from './types';
|
|
50
|
+
|
|
51
|
+
export { CompactComposer } from './CompactComposer';
|
|
52
|
+
export { acceptsComposerText } from './compact-text';
|
|
53
|
+
export type {
|
|
54
|
+
CompactComposerProps,
|
|
55
|
+
CompactComposerLabels,
|
|
56
|
+
CompactComposerAction,
|
|
57
|
+
} from './compact-types';
|
|
@@ -52,3 +52,11 @@ export type {
|
|
|
52
52
|
VoiceRecorderProps,
|
|
53
53
|
VoiceRecorderState,
|
|
54
54
|
} from './types';
|
|
55
|
+
|
|
56
|
+
export { CompactComposer } from './CompactComposer.web';
|
|
57
|
+
export { acceptsComposerText } from './compact-text';
|
|
58
|
+
export type {
|
|
59
|
+
CompactComposerProps,
|
|
60
|
+
CompactComposerLabels,
|
|
61
|
+
CompactComposerAction,
|
|
62
|
+
} from './compact-types';
|
|
@@ -108,3 +108,19 @@ export const CHAT_COMPOSER_MESSAGES: MessageCatalog<ChatComposerMessages> =
|
|
|
108
108
|
music: 'Music',
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
|
+
|
|
112
|
+
export interface CompactComposerMessages {
|
|
113
|
+
input: string;
|
|
114
|
+
expand: string;
|
|
115
|
+
characterCount: string;
|
|
116
|
+
characterCountValue: (count: number, max: number) => string;
|
|
117
|
+
limitHint: (max: number) => string;
|
|
118
|
+
}
|
|
119
|
+
export const COMPACT_COMPOSER_MESSAGES: MessageCatalog<CompactComposerMessages> =
|
|
120
|
+
defineMessages<CompactComposerMessages>('COMPACT_COMPOSER_MESSAGES', {
|
|
121
|
+
input: 'Write a message',
|
|
122
|
+
expand: 'Open full composer',
|
|
123
|
+
characterCount: 'Characters',
|
|
124
|
+
characterCountValue: (count, max) => `${count} of ${max} characters`,
|
|
125
|
+
limitHint: (max) => `Compact messages allow ${max} characters. Expand to write more.`,
|
|
126
|
+
});
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { CollapsibleFrame } from './CollapsibleFrame.web';
|
|
3
|
-
import {
|
|
4
|
-
DEFAULT_COLLAPSIBLE_TRANSITION,
|
|
5
|
-
useAppearingOpen,
|
|
6
|
-
useCollapsibleMotion,
|
|
7
|
-
} from './use-collapsible-motion';
|
|
3
|
+
import { DEFAULT_COLLAPSIBLE_TRANSITION, useAppearingOpen } from './use-collapsible-motion';
|
|
8
4
|
import type { CollapsibleProps } from './types';
|
|
9
5
|
|
|
10
6
|
export const Collapsible = memo(function Collapsible({
|
|
@@ -13,6 +9,5 @@ export const Collapsible = memo(function Collapsible({
|
|
|
13
9
|
...props
|
|
14
10
|
}: CollapsibleProps) {
|
|
15
11
|
const open = useAppearingOpen(props.open, appear);
|
|
16
|
-
|
|
17
|
-
return <CollapsibleFrame {...props} open={open} transition={transition} {...motion} />;
|
|
12
|
+
return <CollapsibleFrame {...props} open={open} appear={appear} transition={transition} />;
|
|
18
13
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { forwardRef, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
2
3
|
import { Animated, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
4
|
import { resolveNativeWebStyle } from '../styles/resolve-native-web-style';
|
|
4
5
|
import { useInteractiveWebCss } from '../styles/interactive-web-css';
|
|
5
6
|
import { CollapsibleVisibilityContext, useCollapsibleVisibility } from './context';
|
|
6
7
|
import type { CollapsibleFrameProps } from './frame-types';
|
|
8
|
+
import type { WebCssStyle } from '../styles/web-view-style';
|
|
7
9
|
import { usePrefersReducedMotion } from '../hooks/use-prefers-reduced-motion';
|
|
8
10
|
import { surfacePresenceVars, useSurfacePresenceContent } from '../surface/use-surface-presence';
|
|
9
11
|
import { resolveSurfaceTransition } from '../motion/surface-transition';
|
|
@@ -11,7 +13,12 @@ import { DEFAULT_COLLAPSIBLE_TRANSITION } from './use-collapsible-motion';
|
|
|
11
13
|
|
|
12
14
|
const CSS = `@layer base {
|
|
13
15
|
.bloom-collapsible-panel,.bloom-collapsible-content { box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;min-width:0; }
|
|
14
|
-
|
|
16
|
+
.bloom-collapsible-css { display:grid;grid-template-rows:minmax(0,0fr);transition:grid-template-rows var(--bloom-collapsible-duration) var(--bloom-collapsible-easing); }
|
|
17
|
+
.bloom-collapsible-css[data-open="true"] { grid-template-rows:minmax(0,1fr); }
|
|
18
|
+
.bloom-collapsible-clip { min-height:0;overflow:hidden; }
|
|
19
|
+
.bloom-collapsible-css[data-settled="true"] > .bloom-collapsible-clip { overflow:visible; }
|
|
20
|
+
@starting-style { .bloom-collapsible-css[data-appear="true"] { grid-template-rows:minmax(0,0fr); } }
|
|
21
|
+
@media (prefers-reduced-motion:reduce) { .bloom-collapsible-css { transition-duration:0ms; } }
|
|
15
22
|
}`;
|
|
16
23
|
const PanelHost = forwardRef<
|
|
17
24
|
HTMLDivElement,
|
|
@@ -26,9 +33,10 @@ const AnimatedPanel = Animated.createAnimatedComponent(PanelHost);
|
|
|
26
33
|
|
|
27
34
|
export function CollapsibleFrame({
|
|
28
35
|
open,
|
|
29
|
-
hidden,
|
|
30
|
-
settled
|
|
36
|
+
hidden: drivenHidden,
|
|
37
|
+
settled: drivenSettled,
|
|
31
38
|
progress,
|
|
39
|
+
appear,
|
|
32
40
|
keepMounted = true,
|
|
33
41
|
transition = DEFAULT_COLLAPSIBLE_TRANSITION,
|
|
34
42
|
children,
|
|
@@ -42,8 +50,15 @@ export function CollapsibleFrame({
|
|
|
42
50
|
labelledBy,
|
|
43
51
|
returnFocusId,
|
|
44
52
|
region,
|
|
45
|
-
}: CollapsibleFrameProps
|
|
53
|
+
}: Omit<CollapsibleFrameProps, 'progress' | 'hidden' | 'settled'> &
|
|
54
|
+
Partial<Pick<CollapsibleFrameProps, 'progress' | 'hidden' | 'settled'>>) {
|
|
46
55
|
useInteractiveWebCss('bloom-collapsible', CSS);
|
|
56
|
+
const cssMotion = progress === undefined;
|
|
57
|
+
const [cssHidden, setCssHidden] = useState(!open);
|
|
58
|
+
const [cssSettled, setCssSettled] = useState(open);
|
|
59
|
+
if (cssMotion && open && cssHidden) setCssHidden(false);
|
|
60
|
+
const hidden = cssMotion ? cssHidden : drivenHidden;
|
|
61
|
+
const settled = cssMotion ? cssSettled : (drivenSettled ?? false);
|
|
47
62
|
const visible = useCollapsibleVisibility() && open;
|
|
48
63
|
const panel = useRef<HTMLDivElement>(null);
|
|
49
64
|
const focusWithin = useRef(false);
|
|
@@ -56,16 +71,16 @@ export function CollapsibleFrame({
|
|
|
56
71
|
}, []);
|
|
57
72
|
useLayoutEffect(() => {
|
|
58
73
|
const node = body.current;
|
|
59
|
-
if (!node) return;
|
|
74
|
+
if (cssMotion || !node) return;
|
|
60
75
|
const observer = new ResizeObserver(measure);
|
|
61
76
|
observer.observe(node);
|
|
62
77
|
return () => observer.disconnect();
|
|
63
|
-
}, [measure]);
|
|
78
|
+
}, [cssMotion, measure]);
|
|
64
79
|
// Children mounting again on opening are measured before paint, not a frame late.
|
|
65
80
|
const mounted = keepMounted || !hidden;
|
|
66
81
|
useLayoutEffect(() => {
|
|
67
|
-
if (mounted) measure();
|
|
68
|
-
}, [mounted, measure]);
|
|
82
|
+
if (mounted && !cssMotion) measure();
|
|
83
|
+
}, [mounted, cssMotion, measure]);
|
|
69
84
|
useLayoutEffect(() => {
|
|
70
85
|
const active = document.activeElement;
|
|
71
86
|
if (visible) {
|
|
@@ -90,15 +105,40 @@ export function CollapsibleFrame({
|
|
|
90
105
|
const reduced = usePrefersReducedMotion();
|
|
91
106
|
const fade = resolveSurfaceTransition(transition);
|
|
92
107
|
const fadeMs = reduced ? 0 : fade.duration;
|
|
93
|
-
|
|
108
|
+
const previousOpen = useRef(open);
|
|
109
|
+
useLayoutEffect(() => {
|
|
110
|
+
if (!cssMotion) return;
|
|
111
|
+
const changed = previousOpen.current !== open;
|
|
112
|
+
previousOpen.current = open;
|
|
113
|
+
if (fadeMs === 0) {
|
|
114
|
+
setCssHidden(!open);
|
|
115
|
+
setCssSettled(open);
|
|
116
|
+
} else if (changed) {
|
|
117
|
+
setCssSettled(false);
|
|
118
|
+
}
|
|
119
|
+
}, [cssMotion, open, fadeMs]);
|
|
120
|
+
useSurfacePresenceContent(cssMotion ? body : panel, {
|
|
94
121
|
presence: visible ? 1 : 0,
|
|
95
122
|
duration: fadeMs,
|
|
96
123
|
easing: fade.cssEasing,
|
|
97
124
|
});
|
|
98
|
-
const maxHeight = progress
|
|
125
|
+
const maxHeight = progress?.interpolate({
|
|
99
126
|
inputRange: [0, 1],
|
|
100
127
|
outputRange: [0, height],
|
|
101
128
|
});
|
|
129
|
+
const content = (
|
|
130
|
+
<div
|
|
131
|
+
ref={body}
|
|
132
|
+
className={['bloom-collapsible-content', contentClassName].filter(Boolean).join(' ')}
|
|
133
|
+
style={resolveNativeWebStyle(contentStyle)}
|
|
134
|
+
>
|
|
135
|
+
{mounted ? children : null}
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
const cssTiming: WebCssStyle = {
|
|
139
|
+
'--bloom-collapsible-duration': `${fadeMs}ms`,
|
|
140
|
+
'--bloom-collapsible-easing': fade.cssEasing,
|
|
141
|
+
};
|
|
102
142
|
return (
|
|
103
143
|
<CollapsibleVisibilityContext.Provider value={visible}>
|
|
104
144
|
<AnimatedPanel
|
|
@@ -109,29 +149,42 @@ export function CollapsibleFrame({
|
|
|
109
149
|
aria-labelledby={labelledBy}
|
|
110
150
|
aria-hidden={!visible}
|
|
111
151
|
inert={!visible}
|
|
152
|
+
data-open={open}
|
|
153
|
+
data-settled={settled}
|
|
154
|
+
data-appear={appear || undefined}
|
|
155
|
+
onTransitionEnd={
|
|
156
|
+
cssMotion
|
|
157
|
+
? (event) => {
|
|
158
|
+
if (
|
|
159
|
+
event.target !== event.currentTarget ||
|
|
160
|
+
event.propertyName !== 'grid-template-rows'
|
|
161
|
+
)
|
|
162
|
+
return;
|
|
163
|
+
setCssHidden(!open);
|
|
164
|
+
setCssSettled(open);
|
|
165
|
+
}
|
|
166
|
+
: undefined
|
|
167
|
+
}
|
|
112
168
|
onFocusCapture={() => {
|
|
113
169
|
focusWithin.current = true;
|
|
114
170
|
}}
|
|
115
171
|
onBlurCapture={() => {
|
|
116
172
|
focusWithin.current = false;
|
|
117
173
|
}}
|
|
118
|
-
className={['bloom-collapsible-panel', className]
|
|
174
|
+
className={['bloom-collapsible-panel', cssMotion && 'bloom-collapsible-css', className]
|
|
175
|
+
.filter(Boolean)
|
|
176
|
+
.join(' ')}
|
|
119
177
|
style={[
|
|
120
178
|
{
|
|
121
179
|
...surfacePresenceVars(visible ? 1 : 0, fadeMs),
|
|
122
|
-
|
|
180
|
+
...cssTiming,
|
|
181
|
+
maxHeight: cssMotion || settled || (height === 0 && open) ? undefined : maxHeight,
|
|
123
182
|
overflow: settled ? 'visible' : 'hidden',
|
|
124
183
|
},
|
|
125
184
|
style,
|
|
126
185
|
]}
|
|
127
186
|
>
|
|
128
|
-
<div
|
|
129
|
-
ref={body}
|
|
130
|
-
className={['bloom-collapsible-content', contentClassName].filter(Boolean).join(' ')}
|
|
131
|
-
style={resolveNativeWebStyle(contentStyle)}
|
|
132
|
-
>
|
|
133
|
-
{mounted ? children : null}
|
|
134
|
-
</div>
|
|
187
|
+
{cssMotion ? <div className="bloom-collapsible-clip">{content}</div> : content}
|
|
135
188
|
</AnimatedPanel>
|
|
136
189
|
</CollapsibleVisibilityContext.Provider>
|
|
137
190
|
);
|
package/src/icons/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// General glyphs use Remix Icon (Remix Icon License 1.0, `remix/LICENSE.txt`),
|
|
2
2
|
// one file per icon under `remix/`. The few brand marks Remix lacks come from
|
|
3
3
|
// Simple Icons (CC0 1.0) under `simple-icons/`. Old Bloom icon names map to
|
|
4
4
|
// their Remix equivalents in `remix-mapping.json`;
|
|
@@ -10,3 +10,4 @@ export { resolveIconSlot } from './render-icon';
|
|
|
10
10
|
export { sizes, useCommonSVGProps } from './shared';
|
|
11
11
|
export * from './remix';
|
|
12
12
|
export * from './simple-icons';
|
|
13
|
+
export * from './social';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An outlined bookmark. */
|
|
4
|
+
export const BookmarkIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M4 4.5C4 3.12 5.119 2 6.5 2h11C18.881 2 20 3.12 20 4.5v18.44l-8-5.71-8 5.71V4.5zM6.5 4c-.276 0-.5.22-.5.5v14.56l6-4.29 6 4.29V4.5c0-.28-.224-.5-.5-.5h-11z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A rounded square with GIF lettering. */
|
|
4
|
+
export const GifAttachmentIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M3 5.5C3 4.119 4.12 3 5.5 3h13C19.88 3 21 4.119 21 5.5v13c0 1.381-1.12 2.5-2.5 2.5h-13C4.12 21 3 19.881 3 18.5v-13zM5.5 5c-.28 0-.5.224-.5.5v13c0 .276.22.5.5.5h13c.28 0 .5-.224.5-.5v-13c0-.276-.22-.5-.5-.5h-13zM18 10.711V9.25h-3.74v5.5h1.44v-1.719h1.7V11.57h-1.7v-.859H18zM11.79 9.25h1.44v5.5h-1.44v-5.5zm-3.07 1.375c.34 0 .77.172 1.02.43l1.03-.86c-.51-.601-1.28-.945-2.05-.945C7.19 9.25 6 10.453 6 12s1.19 2.75 2.72 2.75c.85 0 1.54-.344 2.05-.945v-2.149H8.38v1.032H9.4v.515c-.17.086-.42.172-.68.172-.76 0-1.36-.602-1.36-1.375 0-.688.6-1.375 1.36-1.375z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A filled heart. */
|
|
4
|
+
export const LikeFillIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M1.34375 7.03125L1.34375 7.04043C1.34374 7.54211 1.34372 8.26295 1.6611 9.15585C1.9795 10.0516 2.60026 11.0779 3.77681 12.2544C5.59273 14.0704 7.58105 15.5215 8.33387 16.0497C8.73525 16.3313 9.26573 16.3313 9.66705 16.0496C10.4197 15.5213 12.4074 14.0703 14.2232 12.2544C15.3997 11.0779 16.0205 10.0516 16.3389 9.15585C16.6563 8.26296 16.6563 7.54211 16.6562 7.04043V7.03125C16.6562 4.73466 15.0849 2.75 12.6562 2.75C11.5214 2.75 10.6433 3.28244 9.99228 3.95476C9.59009 4.37012 9.26356 4.8491 9 5.31533C8.73645 4.8491 8.40991 4.37012 8.00772 3.95476C7.35672 3.28244 6.47861 2.75 5.34375 2.75C2.9151 2.75 1.34375 4.73466 1.34375 7.03125Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An outlined heart. */
|
|
4
|
+
export const LikeIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M1.34375 7.53125L1.34375 7.54043C1.34374 8.04211 1.34372 8.76295 1.6611 9.65585C1.9795 10.5516 2.60026 11.5779 3.77681 12.7544C5.59273 14.5704 7.58105 16.0215 8.33387 16.5497C8.73525 16.8313 9.26573 16.8313 9.66705 16.5496C10.4197 16.0213 12.4074 14.5703 14.2232 12.7544C15.3997 11.5779 16.0205 10.5516 16.3389 9.65585C16.6563 8.76296 16.6563 8.04211 16.6562 7.54043V7.53125C16.6562 5.23466 15.0849 3.25 12.6562 3.25C11.5214 3.25 10.6433 3.78244 9.99228 4.45476C9.59009 4.87012 9.26356 5.3491 9 5.81533C8.73645 5.3491 8.40991 4.87012 8.00772 4.45476C7.35672 3.78244 6.47861 3.25 5.34375 3.25C2.9151 3.25 1.34375 5.23466 1.34375 7.53125Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
strokeWidth: 1.8,
|
|
8
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** Two overlapping photo and video cards. */
|
|
4
|
+
export const MediaAttachmentIcon = createSinglePathSVG({
|
|
5
|
+
path: 'm18.509 14.757-4.285-2.474a.857.857 0 0 0-1.286.743v4.948a.857.857 0 0 0 1.286.742l4.285-2.474a.857.857 0 0 0 0-1.485ZM5.225 3.977a1.25 1.25 0 1 0 1.25 1.25 1.25 1.25 0 0 0-1.25-1.25ZM19.5 7.5h-3v-3a4.004 4.004 0 0 0-4-4h-8a4.004 4.004 0 0 0-4 4v8a4.004 4.004 0 0 0 4 4h3v3a4.004 4.004 0 0 0 4 4h8a4.004 4.004 0 0 0 4-4v-8a4.004 4.004 0 0 0-4-4Zm-12 7h-3a1.997 1.997 0 0 1-1.882-1.349l2.607-2.607L7.5 12.819Zm.23-4.28L6.41 8.9a1.679 1.679 0 0 0-2.37 0L2.5 10.44V4.5a2.003 2.003 0 0 1 2-2h8a2.003 2.003 0 0 1 2 2v3h-3a3.992 3.992 0 0 0-3.77 2.72ZM21.5 19.5a2.003 2.003 0 0 1-2 2h-8a2.003 2.003 0 0 1-2-2v-8a2.003 2.003 0 0 1 2-2h8a2.003 2.003 0 0 1 2 2Z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A rounded reply bubble with a trailing tail. */
|
|
4
|
+
export const ReplyIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M15.376 13.2177L16.2861 16.7955L12.7106 15.8848C12.6781 15.8848 12.6131 15.8848 12.5806 15.8848C11.3779 16.5678 9.94767 16.8931 8.41995 16.7955C4.94194 16.5353 2.08152 13.7381 1.72397 10.2578C1.2689 5.63919 5.13697 1.76863 9.75264 2.22399C13.2307 2.58177 16.0261 5.41151 16.2861 8.92429C16.4161 10.453 16.0586 11.8841 15.376 13.0876C15.376 13.1526 15.376 13.1852 15.376 13.2177Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
strokeWidth: 1.5,
|
|
8
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** Two opposing arrows for reposting. */
|
|
4
|
+
export const RepostIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An upward arrow above an open tray. */
|
|
4
|
+
export const ShareIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { MediaAttachmentIcon } from './MediaAttachmentIcon';
|
|
2
|
+
export { GifAttachmentIcon } from './GifAttachmentIcon';
|
|
3
|
+
export { ReplyIcon } from './ReplyIcon';
|
|
4
|
+
export { RepostIcon } from './RepostIcon';
|
|
5
|
+
export { LikeIcon } from './LikeIcon';
|
|
6
|
+
export { LikeFillIcon } from './LikeFillIcon';
|
|
7
|
+
export { BookmarkIcon } from './BookmarkIcon';
|
|
8
|
+
export { BookmarkFillIcon } from './BookmarkFillIcon';
|
|
9
|
+
export { ShareIcon } from './ShareIcon';
|
package/src/index.ts
CHANGED
|
@@ -663,6 +663,8 @@ export {
|
|
|
663
663
|
AttachmentMenu,
|
|
664
664
|
ATTACHMENT_MENU_ITEMS,
|
|
665
665
|
ChatComposer,
|
|
666
|
+
CompactComposer,
|
|
667
|
+
acceptsComposerText,
|
|
666
668
|
ComposerAttachmentStrip,
|
|
667
669
|
ComposerBanner,
|
|
668
670
|
ComposerIconButton,
|
|
@@ -687,6 +689,9 @@ export type {
|
|
|
687
689
|
ChatComposerIcon,
|
|
688
690
|
ChatComposerLabels,
|
|
689
691
|
ChatComposerProps,
|
|
692
|
+
CompactComposerProps,
|
|
693
|
+
CompactComposerLabels,
|
|
694
|
+
CompactComposerAction,
|
|
690
695
|
ChatComposerSendOn,
|
|
691
696
|
ChatComposerSuggestion,
|
|
692
697
|
ComposerAttachmentStripProps,
|