@oxy.so/bloom 6.2.0 → 6.4.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/docs/adoption-matrix.mdx +2 -2
- package/docs/message-media.mdx +1 -1
- package/docs/page-header.mdx +18 -0
- package/lib/commonjs/message-bubble/MessageBubble.js +17 -11
- package/lib/commonjs/message-bubble/MessageBubble.js.map +1 -1
- package/lib/commonjs/message-media/StickerMessage.js +1 -1
- package/lib/commonjs/page-header/EdgeScrim.js +7 -3
- package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
- package/lib/commonjs/page-header/index.js +13 -0
- package/lib/commonjs/page-header/index.js.map +1 -1
- package/lib/commonjs/settings-modal/SettingsModal.js +19 -9
- package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarScrollArea.js +3 -5
- package/lib/commonjs/sidebar/SidebarScrollArea.js.map +1 -1
- package/lib/module/message-bubble/MessageBubble.js +17 -11
- package/lib/module/message-bubble/MessageBubble.js.map +1 -1
- package/lib/module/message-media/StickerMessage.js +1 -1
- package/lib/module/page-header/EdgeScrim.js +7 -3
- package/lib/module/page-header/EdgeScrim.js.map +1 -1
- package/lib/module/page-header/index.js +1 -0
- package/lib/module/page-header/index.js.map +1 -1
- package/lib/module/settings-modal/SettingsModal.js +19 -9
- package/lib/module/settings-modal/SettingsModal.js.map +1 -1
- package/lib/module/sidebar/SidebarScrollArea.js +3 -5
- package/lib/module/sidebar/SidebarScrollArea.js.map +1 -1
- package/lib/typescript/commonjs/message-bubble/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-bubble/types.d.ts +13 -6
- package/lib/typescript/commonjs/message-bubble/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-media/StickerMessage.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +10 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/index.d.ts +2 -0
- package/lib/typescript/commonjs/page-header/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/module/message-bubble/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/module/message-bubble/types.d.ts +13 -6
- package/lib/typescript/module/message-bubble/types.d.ts.map +1 -1
- package/lib/typescript/module/message-media/StickerMessage.d.ts +1 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts +10 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/module/page-header/index.d.ts +2 -0
- package/lib/typescript/module/page-header/index.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/message-bubble/MessageBubble.tsx +17 -11
- package/src/message-bubble/types.ts +13 -6
- package/src/message-media/StickerMessage.tsx +1 -1
- package/src/page-header/EdgeScrim.tsx +13 -3
- package/src/page-header/index.ts +2 -0
- package/src/settings-modal/SettingsModal.tsx +19 -9
- package/src/sidebar/SidebarScrollArea.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAuFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAuFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,kDA0WpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../src/message-bubble/MessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA8ChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../src/message-bubble/MessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA8ChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA0DlD,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,QAAmB,EACnB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,QAAkB,EAClB,WAAW,EACX,IAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,WAAW,EACX,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,OAAe,EACf,MAAc,EACd,OAAO,EACP,QAAQ,EACR,WAAmB,EACnB,OAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,QAA4B,EAC5B,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,SAAS,EACT,MAAM,GACP,EAAE,kBAAkB,2CAmUpB;AAED,eAAO,MAAM,aAAa,0DAA+B,CAAC"}
|
|
@@ -13,16 +13,22 @@ export type MessagePosition = 'single' | 'first' | 'middle' | 'last';
|
|
|
13
13
|
* How the `media` slot is fitted inside the bubble.
|
|
14
14
|
*
|
|
15
15
|
* bleed the bubble's padding is CANCELLED and the block runs to the radius
|
|
16
|
-
* — a photo, a video, an album
|
|
17
|
-
*
|
|
16
|
+
* — a photo, a video, an album: something with its own edge, which
|
|
17
|
+
* an inset would frame twice
|
|
18
18
|
* inset the block keeps the bubble's padding — a poll, a place, a contact
|
|
19
19
|
* card: typography with no padding of its own, which bled means a
|
|
20
20
|
* question clipped against the top edge and an avatar on the left one
|
|
21
|
+
* bare NO bubble at all — no fill, border, padding or tail — for a
|
|
22
|
+
* media-only message whose block is its own shape: a sticker. A
|
|
23
|
+
* sticker drawn inside a bubble is a picture of a sticker, and the
|
|
24
|
+
* fill turns its cut-out into a square. With text beside the media
|
|
25
|
+
* this falls back to `bleed`, because the text needs a surface.
|
|
21
26
|
*
|
|
22
|
-
* It also decides where the meta row lands by default: over a bled
|
|
23
|
-
* translucent pill, under an inset one where it cannot cover a line
|
|
27
|
+
* It also decides where the meta row lands by default: over a bled or bare
|
|
28
|
+
* block on a translucent pill, under an inset one where it cannot cover a line
|
|
29
|
+
* of text.
|
|
24
30
|
*/
|
|
25
|
-
export type MessageMediaFit = 'bleed' | 'inset';
|
|
31
|
+
export type MessageMediaFit = 'bleed' | 'inset' | 'bare';
|
|
26
32
|
/** A text span the bubble hands back to the caller to render. */
|
|
27
33
|
export type MessageEntityType = 'link' | 'mention' | 'hashtag';
|
|
28
34
|
export interface MessageEntity {
|
|
@@ -91,7 +97,8 @@ export interface MessageBubbleProps {
|
|
|
91
97
|
/**
|
|
92
98
|
* How `media` is fitted. Default `'bleed'` — today's photo. Pass `'inset'`
|
|
93
99
|
* for a block that draws no padding of its own (`PollMessage`,
|
|
94
|
-
* `LocationMessage`, `ContactMessage`)
|
|
100
|
+
* `LocationMessage`, `ContactMessage`), and `'bare'` for a sticker, which
|
|
101
|
+
* draws no bubble at all. See {@link MessageMediaFit}.
|
|
95
102
|
*/
|
|
96
103
|
mediaFit?: MessageMediaFit;
|
|
97
104
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/message-bubble/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/message-bubble/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,I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;AAED,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC;AAE5F,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAClC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,yFAAyF;IACzF,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -6,7 +6,7 @@ import type { StickerMessageProps } from './types';
|
|
|
6
6
|
*
|
|
7
7
|
* IT DRAWS NO SURFACE AT ALL — no background, no radius, no padding — because a
|
|
8
8
|
* sticker with a bubble behind it is a picture of a sticker. The shell renders it
|
|
9
|
-
* with `
|
|
9
|
+
* with `mediaFit="bare"`, which is `message-bubble`'s no-chrome mode; a bubble
|
|
10
10
|
* around one would also put a scrim behind the transparent parts and turn a
|
|
11
11
|
* cut-out into a square.
|
|
12
12
|
*
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* The floating header's EDGE EFFECT: the page colour at the top, fading to
|
|
4
|
-
* nothing below the islands.
|
|
4
|
+
* nothing below the islands. `edge="bottom"` is the same ramp mirrored — the
|
|
5
|
+
* colour at the bottom, fading to nothing above — for chrome that floats at the
|
|
6
|
+
* bottom of a scroller (a pinned composer, a sidebar's lower edge).
|
|
5
7
|
*
|
|
6
8
|
* ── WHY IT IS A GRADIENT AND NOT A BLUR ─────────────────────────────────────
|
|
7
9
|
*
|
|
@@ -89,6 +91,13 @@ export declare const SCRIM_STOPS: readonly [{
|
|
|
89
91
|
export interface EdgeScrimProps {
|
|
90
92
|
/** The page colour the ramp starts from — opaque, alpha travels separately. */
|
|
91
93
|
color: string;
|
|
94
|
+
/**
|
|
95
|
+
* The edge the colour is solid at. `top` (default) fades downward; `bottom`
|
|
96
|
+
* fades upward. Mirrored in the gradient's own axis rather than with a
|
|
97
|
+
* `rotate` transform on the host, so the scrim's box stays where its layout
|
|
98
|
+
* put it on every platform.
|
|
99
|
+
*/
|
|
100
|
+
edge?: 'top' | 'bottom';
|
|
92
101
|
testID?: string;
|
|
93
102
|
}
|
|
94
103
|
export declare const EdgeScrim: React.NamedExoticComponent<EdgeScrimProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeScrim.d.ts","sourceRoot":"","sources":["../../../../src/page-header/EdgeScrim.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAMpC
|
|
1
|
+
{"version":3,"file":"EdgeScrim.d.ts","sourceRoot":"","sources":["../../../../src/page-header/EdgeScrim.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAMpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;EAKd,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwBD,eAAO,MAAM,SAAS,4CAA2B,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { PageHeader } from './PageHeader';
|
|
2
|
+
export { EdgeScrim, SCRIM_TAIL_RATIO } from './EdgeScrim';
|
|
3
|
+
export type { EdgeScrimProps } from './EdgeScrim';
|
|
2
4
|
export type { PageHeaderBorder, PageHeaderPlacement, PageHeaderPresentation, PageHeaderProps, PageHeaderScrim, PageHeaderTitleAlign, PageHeaderTitleReveal, } from './types';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAuFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAuFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,kDA0WpB"}
|
package/package.json
CHANGED
|
@@ -89,7 +89,8 @@ import type { MessageBubbleProps } from './types';
|
|
|
89
89
|
*
|
|
90
90
|
* THE SLOT HAS TWO FITS, and the bubble cannot tell them apart by looking.
|
|
91
91
|
* `mediaFit="bleed"` (the default) cancels the bubble's padding so a photo runs
|
|
92
|
-
* to the radius. `mediaFit="
|
|
92
|
+
* to the radius. `mediaFit="bare"` draws no bubble at all around media alone —
|
|
93
|
+
* a sticker. `mediaFit="inset"` keeps the padding, for a block that carries no
|
|
93
94
|
* padding of its own — `PollMessage`, `LocationMessage`, `ContactMessage` are
|
|
94
95
|
* all typography, and bled they clip a question against the top edge, cut an
|
|
95
96
|
* address off at the bottom and put an avatar on the left one. The fit also
|
|
@@ -233,10 +234,13 @@ function MessageBubbleComponent({
|
|
|
233
234
|
|
|
234
235
|
const radii = bubbleRadii(direction, position);
|
|
235
236
|
const fill = failed ? mixColor(side.fill, paint.failed, theme.isDark ? 0.3 : 0.22) : side.fill;
|
|
236
|
-
const showTail = tail && hasTail(position);
|
|
237
237
|
const mediaOnly = media !== undefined && text === undefined && children === undefined && !deleted;
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
// `bare` only holds for media alone: with text beside it the text needs a
|
|
239
|
+
// surface, so the block is fitted as `bleed` instead.
|
|
240
|
+
const bare = mediaFit === 'bare' && mediaOnly;
|
|
241
|
+
const bleed = mediaFit === 'bleed' || (mediaFit === 'bare' && !mediaOnly);
|
|
242
|
+
const showTail = tail && hasTail(position) && !bare;
|
|
243
|
+
const overlayMeta = metaOverlay ?? (mediaOnly && (bleed || bare));
|
|
240
244
|
const hasMeta =
|
|
241
245
|
!deleted &&
|
|
242
246
|
(time !== undefined ||
|
|
@@ -274,16 +278,18 @@ function MessageBubbleComponent({
|
|
|
274
278
|
{
|
|
275
279
|
borderRadius: 0,
|
|
276
280
|
...radii,
|
|
277
|
-
backgroundColor: fill,
|
|
278
|
-
borderWidth: side.border === undefined ? 0 : 1,
|
|
281
|
+
backgroundColor: bare ? 'transparent' : fill,
|
|
282
|
+
borderWidth: bare || side.border === undefined ? 0 : 1,
|
|
279
283
|
borderColor: side.border,
|
|
280
|
-
paddingTop: BUBBLE_PADDING_Y,
|
|
281
|
-
paddingBottom: BUBBLE_PADDING_Y,
|
|
282
|
-
paddingLeft: BUBBLE_PADDING_X,
|
|
283
|
-
paddingRight: BUBBLE_PADDING_X,
|
|
284
|
+
paddingTop: bare ? 0 : BUBBLE_PADDING_Y,
|
|
285
|
+
paddingBottom: bare ? 0 : BUBBLE_PADDING_Y,
|
|
286
|
+
paddingLeft: bare ? 0 : BUBBLE_PADDING_X,
|
|
287
|
+
paddingRight: bare ? 0 : BUBBLE_PADDING_X,
|
|
284
288
|
gap: 2,
|
|
285
289
|
opacity: pending && !failed ? 0.65 : 1,
|
|
286
|
-
|
|
290
|
+
// A bare block keeps its own shape: clipping it to the bubble's radii
|
|
291
|
+
// would round a sticker's corners off.
|
|
292
|
+
overflow: bare ? 'visible' : 'hidden',
|
|
287
293
|
},
|
|
288
294
|
bubbleStyle,
|
|
289
295
|
]}
|
|
@@ -17,16 +17,22 @@ export type MessagePosition = 'single' | 'first' | 'middle' | 'last';
|
|
|
17
17
|
* How the `media` slot is fitted inside the bubble.
|
|
18
18
|
*
|
|
19
19
|
* bleed the bubble's padding is CANCELLED and the block runs to the radius
|
|
20
|
-
* — a photo, a video, an album
|
|
21
|
-
*
|
|
20
|
+
* — a photo, a video, an album: something with its own edge, which
|
|
21
|
+
* an inset would frame twice
|
|
22
22
|
* inset the block keeps the bubble's padding — a poll, a place, a contact
|
|
23
23
|
* card: typography with no padding of its own, which bled means a
|
|
24
24
|
* question clipped against the top edge and an avatar on the left one
|
|
25
|
+
* bare NO bubble at all — no fill, border, padding or tail — for a
|
|
26
|
+
* media-only message whose block is its own shape: a sticker. A
|
|
27
|
+
* sticker drawn inside a bubble is a picture of a sticker, and the
|
|
28
|
+
* fill turns its cut-out into a square. With text beside the media
|
|
29
|
+
* this falls back to `bleed`, because the text needs a surface.
|
|
25
30
|
*
|
|
26
|
-
* It also decides where the meta row lands by default: over a bled
|
|
27
|
-
* translucent pill, under an inset one where it cannot cover a line
|
|
31
|
+
* It also decides where the meta row lands by default: over a bled or bare
|
|
32
|
+
* block on a translucent pill, under an inset one where it cannot cover a line
|
|
33
|
+
* of text.
|
|
28
34
|
*/
|
|
29
|
-
export type MessageMediaFit = 'bleed' | 'inset';
|
|
35
|
+
export type MessageMediaFit = 'bleed' | 'inset' | 'bare';
|
|
30
36
|
|
|
31
37
|
/** A text span the bubble hands back to the caller to render. */
|
|
32
38
|
export type MessageEntityType = 'link' | 'mention' | 'hashtag';
|
|
@@ -102,7 +108,8 @@ export interface MessageBubbleProps {
|
|
|
102
108
|
/**
|
|
103
109
|
* How `media` is fitted. Default `'bleed'` — today's photo. Pass `'inset'`
|
|
104
110
|
* for a block that draws no padding of its own (`PollMessage`,
|
|
105
|
-
* `LocationMessage`, `ContactMessage`)
|
|
111
|
+
* `LocationMessage`, `ContactMessage`), and `'bare'` for a sticker, which
|
|
112
|
+
* draws no bubble at all. See {@link MessageMediaFit}.
|
|
106
113
|
*/
|
|
107
114
|
mediaFit?: MessageMediaFit;
|
|
108
115
|
/**
|
|
@@ -18,7 +18,7 @@ const TRANSPARENT = 'transparent';
|
|
|
18
18
|
*
|
|
19
19
|
* IT DRAWS NO SURFACE AT ALL — no background, no radius, no padding — because a
|
|
20
20
|
* sticker with a bubble behind it is a picture of a sticker. The shell renders it
|
|
21
|
-
* with `
|
|
21
|
+
* with `mediaFit="bare"`, which is `message-bubble`'s no-chrome mode; a bubble
|
|
22
22
|
* around one would also put a scrim behind the transparent parts and turn a
|
|
23
23
|
* cut-out into a square.
|
|
24
24
|
*
|
|
@@ -6,7 +6,9 @@ import { useSvgIdPrefix } from '../styles/svg-id';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The floating header's EDGE EFFECT: the page colour at the top, fading to
|
|
9
|
-
* nothing below the islands.
|
|
9
|
+
* nothing below the islands. `edge="bottom"` is the same ramp mirrored — the
|
|
10
|
+
* colour at the bottom, fading to nothing above — for chrome that floats at the
|
|
11
|
+
* bottom of a scroller (a pinned composer, a sidebar's lower edge).
|
|
10
12
|
*
|
|
11
13
|
* ── WHY IT IS A GRADIENT AND NOT A BLUR ─────────────────────────────────────
|
|
12
14
|
*
|
|
@@ -90,15 +92,23 @@ export const SCRIM_STOPS = [
|
|
|
90
92
|
export interface EdgeScrimProps {
|
|
91
93
|
/** The page colour the ramp starts from — opaque, alpha travels separately. */
|
|
92
94
|
color: string;
|
|
95
|
+
/**
|
|
96
|
+
* The edge the colour is solid at. `top` (default) fades downward; `bottom`
|
|
97
|
+
* fades upward. Mirrored in the gradient's own axis rather than with a
|
|
98
|
+
* `rotate` transform on the host, so the scrim's box stays where its layout
|
|
99
|
+
* put it on every platform.
|
|
100
|
+
*/
|
|
101
|
+
edge?: 'top' | 'bottom';
|
|
93
102
|
testID?: string;
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
const EdgeScrimComponent: React.FC<EdgeScrimProps> = ({ color, testID }) => {
|
|
105
|
+
const EdgeScrimComponent: React.FC<EdgeScrimProps> = ({ color, edge = 'top', testID }) => {
|
|
97
106
|
const id = `${useSvgIdPrefix('bloom-page-header-scrim')}gradient`;
|
|
107
|
+
const fromBottom = edge === 'bottom';
|
|
98
108
|
return (
|
|
99
109
|
<Svg width="100%" height="100%" style={StyleSheet.absoluteFill} testID={testID}>
|
|
100
110
|
<Defs>
|
|
101
|
-
<LinearGradient id={id} x1="0" y1=
|
|
111
|
+
<LinearGradient id={id} x1="0" y1={fromBottom ? '1' : '0'} x2="0" y2={fromBottom ? '0' : '1'}>
|
|
102
112
|
{SCRIM_STOPS.map((stop) => (
|
|
103
113
|
<Stop
|
|
104
114
|
key={stop.offset}
|
package/src/page-header/index.ts
CHANGED
|
@@ -152,6 +152,11 @@ export function SettingsModal({
|
|
|
152
152
|
const isControlled = controlledOpen !== undefined;
|
|
153
153
|
|
|
154
154
|
const [mounted, setMounted] = useState(controlledOpen === true);
|
|
155
|
+
// Whether the modal is WANTED open. It leads `visible`, which only turns true
|
|
156
|
+
// a painted frame after mount: a close requested inside that window (Escape
|
|
157
|
+
// pressed the moment the panel appears) must cancel the pending enter, not be
|
|
158
|
+
// overwritten by it.
|
|
159
|
+
const [wanted, setWanted] = useState(controlledOpen === true);
|
|
155
160
|
const [visible, setVisible] = useState(false);
|
|
156
161
|
// Bumped by every open, so reopening during an exit replays the enter.
|
|
157
162
|
const [openCount, setOpenCount] = useState(0);
|
|
@@ -186,38 +191,43 @@ export function SettingsModal({
|
|
|
186
191
|
setInternalPage(defaultPageRef.current);
|
|
187
192
|
setCompactPageOpen(initialViewRef.current === 'page');
|
|
188
193
|
setMounted(true);
|
|
194
|
+
setWanted(true);
|
|
189
195
|
setOpenCount((count) => count + 1);
|
|
190
196
|
}, []);
|
|
191
197
|
|
|
192
198
|
const hide = useCallback(() => {
|
|
199
|
+
setWanted(false);
|
|
193
200
|
setVisible(false);
|
|
194
201
|
}, []);
|
|
195
202
|
|
|
196
|
-
// Enter: once mounted, the hidden frame commits, then the transition runs
|
|
203
|
+
// Enter: once mounted, the hidden frame commits, then the transition runs —
|
|
204
|
+
// unless a close arrived first, which cancels the pending frame.
|
|
197
205
|
useEffect(() => {
|
|
198
|
-
if (!mounted) return;
|
|
206
|
+
if (!mounted || !wanted) return;
|
|
199
207
|
return afterPaint(() => setVisible(true));
|
|
200
|
-
}, [mounted, openCount]);
|
|
208
|
+
}, [mounted, wanted, openCount]);
|
|
201
209
|
|
|
202
|
-
// Exit:
|
|
203
|
-
//
|
|
210
|
+
// Exit: `wanted` and `visible` go false before `mounted` does, so this runs
|
|
211
|
+
// for every close. A modal that was shown unmounts after the reverse
|
|
212
|
+
// transition; one closed before it ever became visible has nothing to
|
|
213
|
+
// animate and unmounts at once.
|
|
204
214
|
const wasVisible = useRef(false);
|
|
205
215
|
useEffect(() => {
|
|
206
216
|
if (visible) {
|
|
207
217
|
wasVisible.current = true;
|
|
208
218
|
return;
|
|
209
219
|
}
|
|
210
|
-
if (!mounted ||
|
|
220
|
+
if (!mounted || wanted) return;
|
|
211
221
|
const timer = setTimeout(
|
|
212
222
|
() => {
|
|
213
223
|
wasVisible.current = false;
|
|
214
224
|
setMounted(false);
|
|
215
225
|
if (!isControlledRef.current) onCloseRef.current?.();
|
|
216
226
|
},
|
|
217
|
-
reducedMotion ? 0 : UNMOUNT_MS,
|
|
227
|
+
reducedMotion || !wasVisible.current ? 0 : UNMOUNT_MS,
|
|
218
228
|
);
|
|
219
229
|
return () => clearTimeout(timer);
|
|
220
|
-
}, [visible, mounted, reducedMotion]);
|
|
230
|
+
}, [visible, mounted, wanted, reducedMotion]);
|
|
221
231
|
|
|
222
232
|
// Controlled mode mirrors `open` into the same two-phase lifecycle.
|
|
223
233
|
useEffect(() => {
|
|
@@ -348,7 +358,7 @@ export function SettingsModal({
|
|
|
348
358
|
{IS_WEB ? (
|
|
349
359
|
<ModalKeyboard
|
|
350
360
|
panelRef={panelRef}
|
|
351
|
-
closing={!
|
|
361
|
+
closing={!wanted}
|
|
352
362
|
dismissible
|
|
353
363
|
dismiss={requestClose}
|
|
354
364
|
/>
|
|
@@ -48,7 +48,7 @@ export const SidebarScrollArea = forwardRef<ScrollView, SidebarScrollAreaProps>(
|
|
|
48
48
|
{children}
|
|
49
49
|
</ScrollView>
|
|
50
50
|
{edges.top && <Animated.View testID={`${prefix}-fade-top`} pointerEvents="none" aria-hidden accessibilityElementsHidden importantForAccessibility="no-hide-descendants" style={[{ position: 'absolute', left: 0, right: 0, top: 0, height: fadeHeight }, topStyle]}><EdgeScrim color={color} /></Animated.View>}
|
|
51
|
-
{edges.bottom && <Animated.View testID={`${prefix}-fade-bottom`} pointerEvents="none" aria-hidden accessibilityElementsHidden importantForAccessibility="no-hide-descendants" style={[{ position: 'absolute', left: 0, right: 0, bottom: 0, height: fadeHeight
|
|
51
|
+
{edges.bottom && <Animated.View testID={`${prefix}-fade-bottom`} pointerEvents="none" aria-hidden accessibilityElementsHidden importantForAccessibility="no-hide-descendants" style={[{ position: 'absolute', left: 0, right: 0, bottom: 0, height: fadeHeight }, bottomStyle]}><EdgeScrim color={color} edge="bottom" /></Animated.View>}
|
|
52
52
|
</View>;
|
|
53
53
|
});
|
|
54
54
|
SidebarScrollArea.displayName = 'SidebarScrollArea';
|