@botiverse/raft-ui 0.23.0 → 0.24.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/CHANGELOG.md +44 -0
- package/dist/{inbox-item-B-y7PxZ_.mjs → inbox-item-BtxMxgoB.mjs} +245 -32
- package/dist/{inbox-item-ChGeZBFb.d.mts → inbox-item-CiTYKTly.d.mts} +15 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +10 -3
- package/dist/wip.d.mts +1 -1
- package/dist/wip.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
## [0.24.0](https://github.com/botiverse/raft-design/compare/v0.23.1...v0.24.0) (2026-10-23)
|
|
2
|
+
|
|
3
|
+
### Design System
|
|
4
|
+
|
|
5
|
+
- **Phone popups 8px from each screen edge**: on a phone, a popup about as wide as the screen is the screen's width less 8px on each side, at most 480px, and stops 8px from the edge it is pushed against, measured from the screen's edge, not the safe area. Its width comes from the positioner's `--available-width`, not `100vw`. It applies to NotificationCenter. ([#737](https://github.com/botiverse/raft-design/pull/737))
|
|
6
|
+
- Why: popups that open from the same phone top bar sat at different insets and widths, so they didn't line up with each other or sit evenly between the screen's edges; every popup that wide now takes the server list's 8px inset.
|
|
7
|
+
- Affects: inset 8px from both screen edges; width `min(var(--available-width), 480px)`. The 480px cap only reaches a phone on its side.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/foundations/elevation/#popups
|
|
9
|
+
- **Located: focus on the item is the inset ring, and a message is an article**: an item that a keyboard jump focuses draws the 2px inset ring in `foreground`, inside the item and with its corners, only after keyboard input, never the browser's outline. A message is announced as an article named by its sender and its time. It applies to MessageItem. ([#740](https://github.com/botiverse/raft-design/pull/740))
|
|
10
|
+
- Why: the browser's outline is drawn outside the item with its own rounded corners, so on a message it framed the transparent gap above the row and a scroller cut it off, and a screen reader landing on a message heard its text with no sender or time; the ring now sits inside the item and the row carries its own name.
|
|
11
|
+
- Affects: focus on a jumped-to item: browser outline → `inset-ring-2 inset-ring-foreground` after keyboard input.
|
|
12
|
+
- Docs: https://raft-design.botiverse.build/foundations/states/#located
|
|
13
|
+
|
|
14
|
+
### Breaking Changes
|
|
15
|
+
|
|
16
|
+
- **MessageItem**: the row is an `article` named by its sender and its time. When it holds a `MessageItemSender` or `MessageItemSenderButton`, a `MessageItemTime` or a `MessageItemContinuationTime`, the row gets `role="article"` and `aria-labelledby` pointing at them, in that order, and those parts get ids raft-ui generates (an `id` you pass is kept and is the one the row points at). A screen reader announces, for example, "Atlas 2:20 PM" before the text; a continuation row is named by its time. A row with none of these parts and no `aria-label` or `aria-labelledby` stays a plain `div`. ([#740](https://github.com/botiverse/raft-design/pull/740))
|
|
17
|
+
- Why: a screen reader landing on a message, after a jump or with its reading keys, read the text with no sender or time; the row now carries its own role and name.
|
|
18
|
+
- Affects: every row with a sender or time part, role none (`div`) → `article`, with `aria-labelledby`; the sender and time parts gain an `id`. Your own `role` or `aria-labelledby` on `MessageItem` or its `render` element is left as is; your own `aria-label` drops the generated `aria-labelledby`, and a role that takes no name (`none`, `presentation`, `generic`) gets none.
|
|
19
|
+
- Migrate: don't render `MessageItem` as an `li` or put rows in a `list`: `role="article"` replaces `listitem`, and a list may hold only list items. Remove the list role from the timeline, or pass `role="listitem"` on `MessageItem` to keep the old semantics. Update tests and selectors that find rows by role or expect no `role` on the row. When `render` is a function, pass `role`, `aria-label` and `aria-labelledby` on `MessageItem`, since a function's props can't be read. Don't give `MessageItemSenderButton` an `aria-label` of its own: the row would read that instead of the visible name.
|
|
20
|
+
- Docs: https://raft-design.botiverse.build/components/message-item/#accessibility
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **MessageItem**: a focused row (`tabIndex={-1}`, set by the caller when a keyboard jump lands on it) shows the 2px inset ring in `foreground`, square like its hover, after keyboard input, and shows its toolbar; it never shows the browser's outline. After a click, nothing shows. raft-ui still doesn't make the row focusable. ([#740](https://github.com/botiverse/raft-design/pull/740))
|
|
25
|
+
- Why: see Located: focus on the item is the inset ring, above.
|
|
26
|
+
- Affects: focused row: browser outline → `outline-none focus-visible:keyboard:inset-ring-2 focus-visible:keyboard:inset-ring-foreground`. While the toolbar shows, its card covers part of the ring's top edge at the right.
|
|
27
|
+
- Docs: https://raft-design.botiverse.build/components/message-item/#states
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **NotificationCenterPopup** `viewport="mobile"`: the popup is the screen's width less 8px on each side, at most 480px, and sits 8px from both screen edges, though it hangs from a bell at the right, lined up with the server list under the same top bar. Pass `collisionPadding` to change the inset. On desktop it is unchanged: 380px with Base UI's default collision padding. ([#737](https://github.com/botiverse/raft-design/pull/737))
|
|
32
|
+
- Why: see Phone popups 8px from each screen edge, above.
|
|
33
|
+
- Affects: width `min(92vw, 360px)` → `min(var(--available-width), 480px)`; collision padding Base UI's default → 8px with `viewport="mobile"`.
|
|
34
|
+
- Docs: https://raft-design.botiverse.build/components/notification-center/#behavior
|
|
35
|
+
|
|
36
|
+
## [0.23.1](https://github.com/botiverse/raft-design/compare/v0.23.0...v0.23.1) (2026-10-22)
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **MessageItemToolbar**: measures its width onto the row (`--mi-toolbar-width`) as the toolbar shows, on the row's `pointerenter` or `focusin`, instead of when the row mounts, so a message row mounts in one commit again and keeps no ResizeObserver of its own. The fade under the toolbar looks the same. ([#738](https://github.com/botiverse/raft-design/pull/738))
|
|
41
|
+
- Why: 0.23.0 kept the toolbar's element in React state and gave every toolbar its own ResizeObserver, and every message row renders a toolbar, so each row committed twice on mount and a long channel held one observer per message; only the toolbar that shows needs its width, so it is now measured then.
|
|
42
|
+
- Affects: per row on mount, 2 commits → 1 and 1 ResizeObserver → 0; while a toolbar shows (hover, focus inside the row, an open popup), one ResizeObserver shared by the page watches it; it lets go of a toolbar once the pointer and focus have left its row with no popup open (after a popup closed elsewhere, the next time any toolbar shows) and is disconnected when it watches none. On mount the row gets `--mi-toolbar-width: 164px` (five buttons' width), replaced by the measured width as the toolbar shows, so a toolbar that ever shows without a pointer or focus event on its row fades five buttons' width until it measures itself: too much for a smaller toolbar rather than too little. A row without a `MessageItemToolbar` still gets no width and masks nothing.
|
|
43
|
+
- Docs: https://raft-design.botiverse.build/components/message-item/#behavior
|
|
44
|
+
|
|
1
45
|
## [0.23.0](https://github.com/botiverse/raft-design/compare/v0.22.1...v0.23.0) (2026-10-22)
|
|
2
46
|
|
|
3
47
|
### Design System
|
|
@@ -3290,7 +3290,7 @@ const targets = /* @__PURE__ */ new Set();
|
|
|
3290
3290
|
const byElement = /* @__PURE__ */ new WeakMap();
|
|
3291
3291
|
const pending = /* @__PURE__ */ new Set();
|
|
3292
3292
|
let frame = 0;
|
|
3293
|
-
let resizeObserver;
|
|
3293
|
+
let resizeObserver$1;
|
|
3294
3294
|
let mutationObserver;
|
|
3295
3295
|
let fontsListening = false;
|
|
3296
3296
|
function flush() {
|
|
@@ -3322,7 +3322,7 @@ function ownerOf(node) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
}
|
|
3324
3324
|
function observers(view) {
|
|
3325
|
-
if (!resizeObserver && "ResizeObserver" in view) resizeObserver = new view.ResizeObserver((entries) => {
|
|
3325
|
+
if (!resizeObserver$1 && "ResizeObserver" in view) resizeObserver$1 = new view.ResizeObserver((entries) => {
|
|
3326
3326
|
for (const entry of entries) {
|
|
3327
3327
|
const target = byElement.get(entry.target);
|
|
3328
3328
|
if (target) scheduleMeasure(target);
|
|
@@ -3353,7 +3353,7 @@ function observeTruncation(target) {
|
|
|
3353
3353
|
targets.add(target);
|
|
3354
3354
|
for (const element of observed) {
|
|
3355
3355
|
byElement.set(element, target);
|
|
3356
|
-
resizeObserver?.observe(element);
|
|
3356
|
+
resizeObserver$1?.observe(element);
|
|
3357
3357
|
}
|
|
3358
3358
|
const watched = target.watch();
|
|
3359
3359
|
if (watched) {
|
|
@@ -3370,7 +3370,7 @@ function observeTruncation(target) {
|
|
|
3370
3370
|
pending.delete(target);
|
|
3371
3371
|
for (const element of observed) {
|
|
3372
3372
|
if (byElement.get(element) === target) byElement.delete(element);
|
|
3373
|
-
resizeObserver?.unobserve(element);
|
|
3373
|
+
resizeObserver$1?.unobserve(element);
|
|
3374
3374
|
}
|
|
3375
3375
|
if (watched && byElement.get(watched) === target) byElement.delete(watched);
|
|
3376
3376
|
if (targets.size === 0) {
|
|
@@ -3707,6 +3707,117 @@ const searchHit = [
|
|
|
3707
3707
|
"text-sticker-ink inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge"
|
|
3708
3708
|
];
|
|
3709
3709
|
//#endregion
|
|
3710
|
+
//#region src/components/message-item/message-item-label.ts
|
|
3711
|
+
const MessageItemLabelContext = createContext(null);
|
|
3712
|
+
const MessageItemLabelProvider = MessageItemLabelContext.Provider;
|
|
3713
|
+
/**
|
|
3714
|
+
* The id of a sender or time part, registered with the MessageItem around it.
|
|
3715
|
+
* A consumer's own `id` wins and is the one registered. Outside a MessageItem
|
|
3716
|
+
* the part gets no id.
|
|
3717
|
+
*/
|
|
3718
|
+
function useMessageItemLabelId(part, id) {
|
|
3719
|
+
const registry = useContext(MessageItemLabelContext);
|
|
3720
|
+
const generatedId = useId();
|
|
3721
|
+
const resolvedId = id ?? (registry ? generatedId : void 0);
|
|
3722
|
+
useLayoutEffect(() => {
|
|
3723
|
+
if (!registry || !resolvedId) return void 0;
|
|
3724
|
+
return registry.register(part, resolvedId);
|
|
3725
|
+
}, [
|
|
3726
|
+
registry,
|
|
3727
|
+
part,
|
|
3728
|
+
resolvedId
|
|
3729
|
+
]);
|
|
3730
|
+
return resolvedId;
|
|
3731
|
+
}
|
|
3732
|
+
/** Roles that can't be named: on them the row writes no `aria-labelledby`. */
|
|
3733
|
+
const NAMELESS_ROLES = /* @__PURE__ */ new Set([
|
|
3734
|
+
"none",
|
|
3735
|
+
"presentation",
|
|
3736
|
+
"generic"
|
|
3737
|
+
]);
|
|
3738
|
+
/**
|
|
3739
|
+
* The row's side: a stable registry for its parts and a ref for its element.
|
|
3740
|
+
* The row writes `role="article"` and `aria-labelledby` itself, and only once
|
|
3741
|
+
* something names it: a sender or time part, or the consumer's `aria-label` or
|
|
3742
|
+
* `aria-labelledby`. A row with none of them (a receipt card in the text
|
|
3743
|
+
* column, say) stays a plain `div`, not an article with no name.
|
|
3744
|
+
*
|
|
3745
|
+
* A consumer's `role` or `aria-labelledby` is rendered by React and left
|
|
3746
|
+
* alone. A consumer's `aria-label`, or a role that takes no name, turns the
|
|
3747
|
+
* parts' `aria-labelledby` off, since it would win over the label.
|
|
3748
|
+
*/
|
|
3749
|
+
function useMessageItemLabel(consumer) {
|
|
3750
|
+
const consumerRef = useRef(consumer);
|
|
3751
|
+
const [label] = useState(() => {
|
|
3752
|
+
const parts = {
|
|
3753
|
+
sender: [],
|
|
3754
|
+
time: []
|
|
3755
|
+
};
|
|
3756
|
+
let element = null;
|
|
3757
|
+
const write = (name, value) => {
|
|
3758
|
+
if (!element) return;
|
|
3759
|
+
if (!value) element.removeAttribute(name);
|
|
3760
|
+
else if (element.getAttribute(name) !== value) element.setAttribute(name, value);
|
|
3761
|
+
};
|
|
3762
|
+
const sync = () => {
|
|
3763
|
+
const { role, ariaLabel, ariaLabelledBy } = consumerRef.current;
|
|
3764
|
+
const ids = [...parts.sender, ...parts.time].join(" ");
|
|
3765
|
+
if (role === void 0) write("role", ids !== "" || ariaLabel !== void 0 || ariaLabelledBy !== void 0 ? "article" : "");
|
|
3766
|
+
if (ariaLabelledBy === void 0) {
|
|
3767
|
+
const nameable = role === void 0 || !NAMELESS_ROLES.has(role);
|
|
3768
|
+
write("aria-labelledby", ariaLabel === void 0 && nameable ? ids : "");
|
|
3769
|
+
}
|
|
3770
|
+
};
|
|
3771
|
+
const registry = { register(part, id) {
|
|
3772
|
+
parts[part].push(id);
|
|
3773
|
+
sync();
|
|
3774
|
+
return () => {
|
|
3775
|
+
const index = parts[part].indexOf(id);
|
|
3776
|
+
if (index !== -1) parts[part].splice(index, 1);
|
|
3777
|
+
sync();
|
|
3778
|
+
};
|
|
3779
|
+
} };
|
|
3780
|
+
const ref = (node) => {
|
|
3781
|
+
element = node;
|
|
3782
|
+
sync();
|
|
3783
|
+
};
|
|
3784
|
+
return {
|
|
3785
|
+
registry,
|
|
3786
|
+
ref,
|
|
3787
|
+
sync
|
|
3788
|
+
};
|
|
3789
|
+
});
|
|
3790
|
+
const { role, ariaLabel, ariaLabelledBy } = consumer;
|
|
3791
|
+
useLayoutEffect(() => {
|
|
3792
|
+
consumerRef.current = {
|
|
3793
|
+
role,
|
|
3794
|
+
ariaLabel,
|
|
3795
|
+
ariaLabelledBy
|
|
3796
|
+
};
|
|
3797
|
+
label.sync();
|
|
3798
|
+
}, [
|
|
3799
|
+
role,
|
|
3800
|
+
ariaLabel,
|
|
3801
|
+
ariaLabelledBy,
|
|
3802
|
+
label
|
|
3803
|
+
]);
|
|
3804
|
+
return label;
|
|
3805
|
+
}
|
|
3806
|
+
/**
|
|
3807
|
+
* The consumer's role and name, from MessageItem's props and, where `render`
|
|
3808
|
+
* is an element, from that element's props, which Base UI merges over them.
|
|
3809
|
+
* A `render` function's props can't be read: pass them to MessageItem.
|
|
3810
|
+
*/
|
|
3811
|
+
function readConsumerLabel(props, render) {
|
|
3812
|
+
const own = isValidElement(render) ? render.props : {};
|
|
3813
|
+
const pick = (key) => key in own ? own[key] : props[key];
|
|
3814
|
+
return {
|
|
3815
|
+
role: pick("role"),
|
|
3816
|
+
ariaLabel: pick("aria-label"),
|
|
3817
|
+
ariaLabelledBy: pick("aria-labelledby")
|
|
3818
|
+
};
|
|
3819
|
+
}
|
|
3820
|
+
//#endregion
|
|
3710
3821
|
//#region src/components/message-item/message-item.recipe.ts
|
|
3711
3822
|
const sender = [
|
|
3712
3823
|
"min-w-0 truncate",
|
|
@@ -3729,7 +3840,8 @@ const messageItem = tv$1({
|
|
|
3729
3840
|
"data-popup-open:[--mi-row-fill:var(--fill-subtle)] has-data-popup-open:[--mi-row-fill:var(--fill-subtle)]",
|
|
3730
3841
|
"has-data-[slot=message-item-search-match]:[--mi-row-fill:var(--info-soft)] has-data-[slot=message-item-search-match]:hover:[--mi-row-fill:var(--info-soft)]",
|
|
3731
3842
|
"has-[[data-slot=message-multi-select-checkbox][data-checked]]:[--mi-row-fill:var(--info-soft)]",
|
|
3732
|
-
"has-[[data-slot=message-multi-select-checkbox][data-checked]]:hover:[--mi-row-fill:var(--info-soft)]"
|
|
3843
|
+
"has-[[data-slot=message-multi-select-checkbox][data-checked]]:hover:[--mi-row-fill:var(--info-soft)]",
|
|
3844
|
+
"outline-none focus-visible:keyboard:inset-ring-2 focus-visible:keyboard:inset-ring-foreground"
|
|
3733
3845
|
],
|
|
3734
3846
|
gutter: ["relative shrink-0 self-stretch", "w-[35px]"],
|
|
3735
3847
|
avatarSlot: [
|
|
@@ -3818,20 +3930,36 @@ const messageItem = tv$1({
|
|
|
3818
3930
|
});
|
|
3819
3931
|
//#endregion
|
|
3820
3932
|
//#region src/components/message-item/message-item-root.tsx
|
|
3933
|
+
/**
|
|
3934
|
+
* One message: an `article` named by its sender and its time
|
|
3935
|
+
* (`aria-labelledby` pointing at `MessageItemSender` or
|
|
3936
|
+
* `MessageItemSenderButton`, then `MessageItemTime` or
|
|
3937
|
+
* `MessageItemContinuationTime`). A row with neither, and no `aria-label` or
|
|
3938
|
+
* `aria-labelledby`, is a plain `div`. Pass `role`, `aria-label` or
|
|
3939
|
+
* `aria-labelledby` on MessageItem or on a `render` element to override
|
|
3940
|
+
* either; a `render` function's props can't be read, so pass them on
|
|
3941
|
+
* MessageItem then.
|
|
3942
|
+
*/
|
|
3821
3943
|
function MessageItem({ className, compact, located = false, render, ...props }) {
|
|
3822
3944
|
const { root } = messageItem({ compact });
|
|
3945
|
+
const label = useMessageItemLabel(readConsumerLabel(props, render));
|
|
3823
3946
|
const defaultProps = {
|
|
3824
3947
|
"data-message-item": "",
|
|
3825
3948
|
"data-compact": compact ? "true" : void 0,
|
|
3826
3949
|
"data-located": located ? "" : void 0,
|
|
3827
3950
|
className: root({ className })
|
|
3828
3951
|
};
|
|
3829
|
-
|
|
3952
|
+
const element = useRender({
|
|
3830
3953
|
defaultTagName: "div",
|
|
3831
3954
|
render,
|
|
3955
|
+
ref: label.ref,
|
|
3832
3956
|
props: mergeProps(defaultProps, props),
|
|
3833
3957
|
state: { slot: "message-item" }
|
|
3834
3958
|
});
|
|
3959
|
+
return /* @__PURE__ */ jsx(MessageItemLabelProvider, {
|
|
3960
|
+
value: label.registry,
|
|
3961
|
+
children: element
|
|
3962
|
+
});
|
|
3835
3963
|
}
|
|
3836
3964
|
//#endregion
|
|
3837
3965
|
//#region src/components/message-item/message-item-gutter.tsx
|
|
@@ -3856,9 +3984,12 @@ function MessageItemAvatarSlot({ className, render, ...props }) {
|
|
|
3856
3984
|
});
|
|
3857
3985
|
}
|
|
3858
3986
|
/** Left-gutter hover clock for continuation rows, a `<time>`: pass the moment in `dateTime`. Show the hour and minute only, in the person's 12h/24h format, with no AM/PM (`6:35`, `18:35`). */
|
|
3859
|
-
function MessageItemContinuationTime({ className, render, ...props }) {
|
|
3987
|
+
function MessageItemContinuationTime({ className, id, render, ...props }) {
|
|
3860
3988
|
const { continuationTime } = messageItem();
|
|
3861
|
-
const defaultProps = {
|
|
3989
|
+
const defaultProps = {
|
|
3990
|
+
id: useMessageItemLabelId("time", id),
|
|
3991
|
+
className: continuationTime({ className })
|
|
3992
|
+
};
|
|
3862
3993
|
return useRender({
|
|
3863
3994
|
defaultTagName: "time",
|
|
3864
3995
|
render,
|
|
@@ -3971,9 +4102,12 @@ function MessageItemSenderGroup({ className, render, ...props }) {
|
|
|
3971
4102
|
state: { slot: "message-item-sender-group" }
|
|
3972
4103
|
});
|
|
3973
4104
|
}
|
|
3974
|
-
function MessageItemSender({ className, render, ...props }) {
|
|
4105
|
+
function MessageItemSender({ className, id, render, ...props }) {
|
|
3975
4106
|
const { sender } = messageItem();
|
|
3976
|
-
const defaultProps = {
|
|
4107
|
+
const defaultProps = {
|
|
4108
|
+
id: useMessageItemLabelId("sender", id),
|
|
4109
|
+
className: sender({ className })
|
|
4110
|
+
};
|
|
3977
4111
|
return useRender({
|
|
3978
4112
|
defaultTagName: "span",
|
|
3979
4113
|
render,
|
|
@@ -3981,10 +4115,11 @@ function MessageItemSender({ className, render, ...props }) {
|
|
|
3981
4115
|
state: { slot: "message-item-sender" }
|
|
3982
4116
|
});
|
|
3983
4117
|
}
|
|
3984
|
-
function MessageItemSenderButton({ className, render, ...props }) {
|
|
4118
|
+
function MessageItemSenderButton({ className, id, render, ...props }) {
|
|
3985
4119
|
const { senderButton } = messageItem();
|
|
3986
4120
|
const defaultProps = {
|
|
3987
4121
|
type: "button",
|
|
4122
|
+
id: useMessageItemLabelId("sender", id),
|
|
3988
4123
|
className: senderButton({ className })
|
|
3989
4124
|
};
|
|
3990
4125
|
return useRender({
|
|
@@ -4018,9 +4153,12 @@ function MessageItemMeta({ className, render, ...props }) {
|
|
|
4018
4153
|
* The message's time, right after the sender. A `<time>`: pass the moment in
|
|
4019
4154
|
* `dateTime` (ISO 8601) and the full date and time as its tooltip.
|
|
4020
4155
|
*/
|
|
4021
|
-
function MessageItemTime({ className, render, ...props }) {
|
|
4156
|
+
function MessageItemTime({ className, id, render, ...props }) {
|
|
4022
4157
|
const { time } = messageItem();
|
|
4023
|
-
const defaultProps = {
|
|
4158
|
+
const defaultProps = {
|
|
4159
|
+
id: useMessageItemLabelId("time", id),
|
|
4160
|
+
className: time({ className })
|
|
4161
|
+
};
|
|
4024
4162
|
return useRender({
|
|
4025
4163
|
defaultTagName: "time",
|
|
4026
4164
|
render,
|
|
@@ -4106,38 +4244,113 @@ function MessageItemDelegatedAvatar({ className, deleted, ...props }) {
|
|
|
4106
4244
|
}
|
|
4107
4245
|
//#endregion
|
|
4108
4246
|
//#region src/components/message-item/message-item-toolbar.tsx
|
|
4247
|
+
const TOOLBAR_WIDTH = "--mi-toolbar-width";
|
|
4248
|
+
/**
|
|
4249
|
+
* Five buttons' width (5 × 28px, 4 × 4px apart, 4px from the frame each
|
|
4250
|
+
* side): what the row fades until the toolbar has measured itself.
|
|
4251
|
+
*/
|
|
4252
|
+
const FALLBACK_WIDTH = "164px";
|
|
4253
|
+
/**
|
|
4254
|
+
* Toolbars watched while their row shows them, each with its row, and the one
|
|
4255
|
+
* ResizeObserver that watches them: it exists only while a toolbar shows.
|
|
4256
|
+
*/
|
|
4257
|
+
const watched = /* @__PURE__ */ new Map();
|
|
4258
|
+
let resizeObserver = null;
|
|
4259
|
+
function writeWidth(toolbar, row) {
|
|
4260
|
+
row.style.setProperty(TOOLBAR_WIDTH, `${toolbar.offsetWidth}px`);
|
|
4261
|
+
}
|
|
4262
|
+
/** The recipe's has-data-popup-open / data-popup-open on the row. */
|
|
4263
|
+
function hasOpenPopup(row) {
|
|
4264
|
+
return row.hasAttribute("data-popup-open") || row.querySelector("[data-popup-open]") !== null;
|
|
4265
|
+
}
|
|
4266
|
+
function resized(entries) {
|
|
4267
|
+
for (const entry of entries) {
|
|
4268
|
+
const target = entry.target;
|
|
4269
|
+
const row = watched.get(target);
|
|
4270
|
+
if (row) writeWidth(target, row);
|
|
4271
|
+
}
|
|
4272
|
+
}
|
|
4273
|
+
function unwatch(toolbar) {
|
|
4274
|
+
if (!watched.delete(toolbar)) return;
|
|
4275
|
+
resizeObserver?.unobserve(toolbar);
|
|
4276
|
+
if (watched.size > 0) return;
|
|
4277
|
+
resizeObserver?.disconnect();
|
|
4278
|
+
resizeObserver = null;
|
|
4279
|
+
}
|
|
4280
|
+
function watch(toolbar, row) {
|
|
4281
|
+
if (watched.has(toolbar)) return;
|
|
4282
|
+
writeWidth(toolbar, row);
|
|
4283
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
4284
|
+
for (const [other, otherRow] of watched) if (!otherRow.matches(":hover, :focus-within") && !hasOpenPopup(otherRow)) unwatch(other);
|
|
4285
|
+
resizeObserver ??= new ResizeObserver(resized);
|
|
4286
|
+
watched.set(toolbar, row);
|
|
4287
|
+
resizeObserver.observe(toolbar);
|
|
4288
|
+
}
|
|
4109
4289
|
/**
|
|
4110
4290
|
* Tells the row how wide the toolbar is (`--mi-toolbar-width` on the row), so
|
|
4111
4291
|
* the header can fade out its end under the toolbar while it shows: the
|
|
4112
4292
|
* header keeps no room for the toolbar (message-item.md, "The hover
|
|
4113
4293
|
* toolbar"), and the toolbar's card only reaches part of the sender line.
|
|
4114
|
-
*
|
|
4115
|
-
*
|
|
4294
|
+
* A toolbar with more or fewer actions covers exactly its own width; nothing
|
|
4295
|
+
* on the row moves.
|
|
4296
|
+
*
|
|
4297
|
+
* Measured when the toolbar is about to show, not when it mounts: every row
|
|
4298
|
+
* of a timeline renders a toolbar, and the width matters only on the row the
|
|
4299
|
+
* pointer or focus is on. So mounting costs no React state (one commit per
|
|
4300
|
+
* row) and no ResizeObserver per row. The row's `pointerenter` and `focusin`
|
|
4301
|
+
* write the width in the input event's own task, before the frame that
|
|
4302
|
+
* applies the row's :hover / :focus-within styles, so the first frame that
|
|
4303
|
+
* shows the toolbar already masks its width; the toolbar is laid out at rest
|
|
4304
|
+
* (only its opacity is 0), so its `offsetWidth` is right then. A popup opens
|
|
4305
|
+
* from the toolbar only after a hover or a focus, so it finds the width
|
|
4306
|
+
* written. While the row shows the toolbar, one ResizeObserver shared by all
|
|
4307
|
+
* rows watches it, so a button added while it shows re-measures; it lets go
|
|
4308
|
+
* when the pointer and focus have left the row and no popup is open, and is
|
|
4309
|
+
* disconnected once no toolbar shows.
|
|
4310
|
+
*
|
|
4311
|
+
* On attach the row gets five buttons' width (164px) as a fallback: a plain
|
|
4312
|
+
* DOM write, no commit and no read, so a show that ever came without a
|
|
4313
|
+
* pointerenter or focusin (a row that appears under a resting pointer) fades
|
|
4314
|
+
* too much rather than leaving letters beside the card. Rows without a
|
|
4315
|
+
* toolbar never get the property, so their header's gradient stays invalid
|
|
4316
|
+
* and masks nothing.
|
|
4317
|
+
*
|
|
4318
|
+
* A stable callback ref with a cleanup (React 19), merged with the caller's
|
|
4319
|
+
* ref by `useRender`.
|
|
4116
4320
|
*/
|
|
4117
|
-
function
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4321
|
+
function measureWidthOnShow(toolbar) {
|
|
4322
|
+
const row = toolbar?.closest("[data-message-item]");
|
|
4323
|
+
if (!toolbar || !row) return void 0;
|
|
4324
|
+
const show = () => watch(toolbar, row);
|
|
4325
|
+
const pointerLeft = () => {
|
|
4326
|
+
if (!row.matches(":focus-within") && !hasOpenPopup(row)) unwatch(toolbar);
|
|
4327
|
+
};
|
|
4328
|
+
const focusLeft = (event) => {
|
|
4329
|
+
const next = event.relatedTarget instanceof Node ? event.relatedTarget : null;
|
|
4330
|
+
if (row.contains(next) || row.matches(":hover") || hasOpenPopup(row)) return;
|
|
4331
|
+
unwatch(toolbar);
|
|
4332
|
+
};
|
|
4333
|
+
row.style.setProperty(TOOLBAR_WIDTH, FALLBACK_WIDTH);
|
|
4334
|
+
row.addEventListener("pointerenter", show);
|
|
4335
|
+
row.addEventListener("focusin", show);
|
|
4336
|
+
row.addEventListener("pointerleave", pointerLeft);
|
|
4337
|
+
row.addEventListener("focusout", focusLeft);
|
|
4338
|
+
return () => {
|
|
4339
|
+
row.removeEventListener("pointerenter", show);
|
|
4340
|
+
row.removeEventListener("focusin", show);
|
|
4341
|
+
row.removeEventListener("pointerleave", pointerLeft);
|
|
4342
|
+
row.removeEventListener("focusout", focusLeft);
|
|
4343
|
+
unwatch(toolbar);
|
|
4344
|
+
row.style.removeProperty(TOOLBAR_WIDTH);
|
|
4345
|
+
};
|
|
4131
4346
|
}
|
|
4132
4347
|
function MessageItemToolbar({ className, render, ref, ...props }) {
|
|
4133
4348
|
const { toolbar } = messageItem();
|
|
4134
|
-
const [element, setElement] = useState(null);
|
|
4135
|
-
useToolbarWidthOnRow(element);
|
|
4136
4349
|
const defaultProps = { className: toolbar({ className }) };
|
|
4137
4350
|
return useRender({
|
|
4138
4351
|
defaultTagName: "div",
|
|
4139
4352
|
render,
|
|
4140
|
-
ref: ref ? [ref,
|
|
4353
|
+
ref: ref ? [ref, measureWidthOnShow] : measureWidthOnShow,
|
|
4141
4354
|
props: mergeProps(defaultProps, props),
|
|
4142
4355
|
state: { slot: "message-item-toolbar" }
|
|
4143
4356
|
});
|
|
@@ -1271,7 +1271,17 @@ type MessageItemProps = useRender.ComponentProps<"div"> & Pick<MessageItemVarian
|
|
|
1271
1271
|
*/
|
|
1272
1272
|
located?: boolean;
|
|
1273
1273
|
};
|
|
1274
|
-
|
|
1274
|
+
/**
|
|
1275
|
+
* One message: an `article` named by its sender and its time
|
|
1276
|
+
* (`aria-labelledby` pointing at `MessageItemSender` or
|
|
1277
|
+
* `MessageItemSenderButton`, then `MessageItemTime` or
|
|
1278
|
+
* `MessageItemContinuationTime`). A row with neither, and no `aria-label` or
|
|
1279
|
+
* `aria-labelledby`, is a plain `div`. Pass `role`, `aria-label` or
|
|
1280
|
+
* `aria-labelledby` on MessageItem or on a `render` element to override
|
|
1281
|
+
* either; a `render` function's props can't be read, so pass them on
|
|
1282
|
+
* MessageItem then.
|
|
1283
|
+
*/
|
|
1284
|
+
declare function MessageItem({ className, compact, located, render, ...props }: MessageItemProps): import("react").JSX.Element;
|
|
1275
1285
|
//#endregion
|
|
1276
1286
|
//#region src/components/message-item/message-item-gutter.d.ts
|
|
1277
1287
|
type MessageItemGutterProps = useRender.ComponentProps<"div">;
|
|
@@ -1280,7 +1290,7 @@ type MessageItemAvatarSlotProps = useRender.ComponentProps<"div">;
|
|
|
1280
1290
|
declare function MessageItemAvatarSlot({ className, render, ...props }: MessageItemAvatarSlotProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1281
1291
|
type MessageItemContinuationTimeProps = useRender.ComponentProps<"time">;
|
|
1282
1292
|
/** Left-gutter hover clock for continuation rows, a `<time>`: pass the moment in `dateTime`. Show the hour and minute only, in the person's 12h/24h format, with no AM/PM (`6:35`, `18:35`). */
|
|
1283
|
-
declare function MessageItemContinuationTime({ className, render, ...props }: MessageItemContinuationTimeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1293
|
+
declare function MessageItemContinuationTime({ className, id, render, ...props }: MessageItemContinuationTimeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1284
1294
|
//#endregion
|
|
1285
1295
|
//#region src/components/message-item/message-item-content.d.ts
|
|
1286
1296
|
type MessageItemContentProps = useRender.ComponentProps<"div">;
|
|
@@ -1315,9 +1325,9 @@ type MessageItemSenderGroupProps = useRender.ComponentProps<"span">;
|
|
|
1315
1325
|
*/
|
|
1316
1326
|
declare function MessageItemSenderGroup({ className, render, ...props }: MessageItemSenderGroupProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1317
1327
|
type MessageItemSenderProps = useRender.ComponentProps<"span">;
|
|
1318
|
-
declare function MessageItemSender({ className, render, ...props }: MessageItemSenderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1328
|
+
declare function MessageItemSender({ className, id, render, ...props }: MessageItemSenderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1319
1329
|
type MessageItemSenderButtonProps = useRender.ComponentProps<"button">;
|
|
1320
|
-
declare function MessageItemSenderButton({ className, render, ...props }: MessageItemSenderButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1330
|
+
declare function MessageItemSenderButton({ className, id, render, ...props }: MessageItemSenderButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1321
1331
|
type MessageItemSenderBadgesProps = useRender.ComponentProps<"span">;
|
|
1322
1332
|
declare function MessageItemSenderBadges({ className, render, ...props }: MessageItemSenderBadgesProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1323
1333
|
type MessageItemMetaProps = useRender.ComponentProps<"span">;
|
|
@@ -1327,7 +1337,7 @@ type MessageItemTimeProps = useRender.ComponentProps<"time">;
|
|
|
1327
1337
|
* The message's time, right after the sender. A `<time>`: pass the moment in
|
|
1328
1338
|
* `dateTime` (ISO 8601) and the full date and time as its tooltip.
|
|
1329
1339
|
*/
|
|
1330
|
-
declare function MessageItemTime({ className, render, ...props }: MessageItemTimeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1340
|
+
declare function MessageItemTime({ className, id, render, ...props }: MessageItemTimeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1331
1341
|
type MessageItemInlineStatusProps = useRender.ComponentProps<"span">;
|
|
1332
1342
|
declare function MessageItemInlineStatus({ className, render, ...props }: MessageItemInlineStatusProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1333
1343
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as MessageListNoticeProps, $a as DropdownMenuCheckboxItemIndicator, $n as MessageItemToolbarButtonProps, $o as ListRowChevron, $r as AvatarGroup, $s as DialogTriggerProps, $t as MessageReferenceLabelProps, A as InboxItemTimestamp, Aa as PopoverHeader, Ai as PreviewCardProps, An as MessageReactionTooltipContent, Ao as DropdownMenuShortcutProps, Ar as MessageItemContentProps, As as DialogContentProps, At as MessageQuotedPreviewUnavailable, Ba as PopoverTitleProps, Bi as TooltipPortal, Bn as MessageReactionTooltipSeparator, Bo as KbdProps, Br as MessageItemAvatarSlotProps, Bs as DialogNavProps, Bt as MessageMultiSelectCheckboxProps, C as InboxItemProps, Ci as PreviewCardHeaderProps, Cn as MessageReactionPickerContentProps, Co as DropdownMenuRadioItem, Cr as MessageItemTime, Ct as MessageQuotedPreviewProps, D as InboxItemSenderProps, Da as PopoverContentProps, Di as PreviewCardPopupProps, Dn as MessageReactionQuickButtonProps, Do as DropdownMenuSeparator, Dr as MessageItemBody, Ds as DialogClose, Dt as MessageQuotedPreviewThreadProps, E as InboxItemSender, Ea as PopoverContent, Ei as PreviewCardPopup, En as MessageReactionQuickButton, Eo as DropdownMenuRadioItemProps, Er as MessageItemAttachmentsProps, Es as DialogBodyProps, Et as MessageQuotedPreviewThread, F as InboxItemTrailingProps, Fa as PopoverPortalProps, Fi as PreviewCardTrigger, Fn as MessageReactionTooltipNameProps, Fo as DropdownMenuTrigger, Fr as MessageItemFooter, Ft as MessageTextSelectionToolbarProps, Ga as MobileNavItem, Gi as TooltipTrigger, Gn as MessageItemBadgeSeparatorProps, Go as Checkbox, Gr as MessageItem, Gs as DialogProps, Gt as MessageMultiSelectToolbarProps, Ha as PopoverTriggerProps, Hi as TooltipProps, Hn as MessageItemBadge, Ho as BadgeProps, Hr as MessageItemContinuationTimeProps, Hs as DialogOverlayProps, Ht as MessageMultiSelectToolbar, I as InboxItemTrigger, Ia as PopoverProps, Ii as PreviewCardTriggerProps, In as MessageReactionTooltipNameText, Io as DropdownMenuTriggerProps, Ir as MessageItemFooterProps, Is as DialogFooterProps, It as MessageTextSelectionToolbarSeparator, J as MessageListEndFade, Ja as MobileNavLabelProps, Jn as MessageItemReadReceiptProps, Jo as ListRow, Jr as AvatarBadge, Js as DialogSurface, K as MessageListDateDivider, Ka as MobileNavItemProps, Ki as TooltipTriggerProps, Kn as MessageItemBadgeStatus, Ko as CheckboxProps, Kr as MessageItemProps, Kt as MessageReferenceChip, L as InboxItemTriggerProps, La as PopoverSeparator, Li as Tooltip, Ln as MessageReactionTooltipNameTextProps, Lo as Kbd, Lr as MessageItemSearchMatch, Ls as DialogHeader, Lt as MessageTextSelectionToolbarSeparatorProps, M as InboxItemTitle, Ma as PopoverPopup, Mi as PreviewCardSeparatorProps, Mn as MessageReactionTooltipMeta, Mo as DropdownMenuSubmenuProps, Mr as MessageItemEditedProps, Ms as DialogDescriptionProps, Mt as MessageTextSelectionToolbar, N as InboxItemTitleProps, Na as PopoverPopupProps, Ni as PreviewCardTitle, Nn as MessageReactionTooltipMetaProps, No as DropdownMenuSubmenuTrigger, Nr as MessageItemEmbedded, Ns as DialogFooter, Nt as MessageTextSelectionToolbarButton, O as InboxItemSubtitle, Oa as PopoverDescription, Oi as PreviewCardPortal, On as MessageReactionQuickRow, Oo as DropdownMenuSeparatorProps, Or as MessageItemBodyProps, Os as DialogCloseProps, Ot as MessageQuotedPreviewTimestamp, P as InboxItemTrailing, Pa as PopoverPortal, Pi as PreviewCardTitleProps, Pn as MessageReactionTooltipName, Po as DropdownMenuSubmenuTriggerProps, Pr as MessageItemEmbeddedProps, Pt as MessageTextSelectionToolbarButtonProps, Q as MessageListNotice, Qa as DropdownMenuCheckboxItem, Qn as MessageItemToolbarButton, Qo as ListRowBottomProps, Qr as AvatarFallbackProps, Qs as DialogTrigger, Qt as MessageReferenceLabel, Ra as PopoverSeparatorProps, Ri as TooltipContent, Rn as MessageReactionTooltipNames, Ro as KbdGroup, Rr as MessageItemSearchMatchProps, Rs as DialogHeaderProps, Rt as MessageMultiSelect, S as InboxItemMetadataProps, Si as PreviewCardHeader, Sn as MessageReactionPickerContent, So as DropdownMenuRadioGroupProps, Sr as MessageItemSenderProps, St as MessageQuotedPreviewLoadingProps, T as InboxItemSelectionProps, Ta as PopoverCloseProps, Tn as MessageReactionPickerStaticProps, To as DropdownMenuRadioItemIndicatorProps, Tr as MessageItemAttachments, Ts as DialogBody, Tt as MessageQuotedPreviewTextProps, Ua as PopoverViewport, Ui as TooltipProvider, Un as MessageItemBadgeProps, Uo as CheckboxIndicator, Ur as MessageItemGutter, Us as DialogPortal, Ut as MessageMultiSelectToolbarActions, Va as PopoverTrigger, Vi as TooltipPortalProps, Vn as MessageReactionTooltipSeparatorProps, Vo as Badge, Vr as MessageItemContinuationTime, Vs as DialogOverlay, Vt as MessageMultiSelectProps, Wa as PopoverViewportProps, Wi as TooltipProviderProps, Wn as MessageItemBadgeSeparator, Wo as CheckboxIndicatorProps, Wr as MessageItemGutterProps, Ws as DialogPortalProps, Wt as MessageMultiSelectToolbarActionsProps, X as MessageListHistoryLimited, Xa as MobileNavRootProps, Xn as MessageItemSavedIndicatorProps, Xo as ListRowBodyProps, Xr as AvatarBadgeProps, Xs as DialogTitle, Xt as MessageReferenceIndicator, Y as MessageListEndFadeProps, Ya as MobileNavRoot, Yn as MessageItemSavedIndicator, Yo as ListRowBody, Yr as AvatarBadgeOffset, Ys as DialogSurfaceProps, Z as MessageListHistoryLimitedProps, Za as DropdownMenu, Zn as MessageItemToolbar, Zo as ListRowBottom, Zr as AvatarFallback, Zs as DialogTitleProps, Zt as MessageReferenceIndicatorProps, _ as InboxItemMarks, _i as PreviewCardDescriptionProps, _n as MessageReactionCountProps, _o as DropdownMenuPopupProps, _r as MessageItemSenderBadgesProps, _s as TextLink, _t as MessageQuotedPreviewContent, a as InboxItemBodyProps, ac as DeprecatedButtonSize, ai as AvatarProps, an as MessageReferenceSuffixProps, ao as DropdownMenuFooterProps, as as ListRowIcon, at as MessageQuotedPreviewAttachments, b as InboxItemMessageProps, ba as PopoverBackdrop, bn as MessageReactionGlyph, bo as DropdownMenuProps, br as MessageItemSenderGroup, bt as MessageQuotedPreviewHeaderProps, c as InboxItemContext, cc as DataAttributes$1, cn as MessageReferenceUnavailable, co as DropdownMenuItemCountProps, cs as ListRowMetaProps, d as InboxItemHeading, di as PreviewCardArrowProps, dn as MessageReferenceTextVariant, do as DropdownMenuItemProps, dr as MessageItemInlineStatus, ds as ListRowTitleProps, dt as MessageQuotedPreviewAuthorMetaProps, ec as PanelAction, ei as AvatarGroupCount, en as MessageReferencePending, eo as DropdownMenuCheckboxItemIndicatorProps, er as MessageItemToolbarProps, es as ListRowChevronProps, et as MessageList, f as InboxItemHeadingProps, fn as MessageReactionAddButton, fo as DropdownMenuLabel, fr as MessageItemInlineStatusProps, fs as ListRowTop, ft as MessageQuotedPreviewAuthorName, g as InboxItemLeadingProps, gi as PreviewCardDescription, gn as MessageReactionCount, go as DropdownMenuPopup, gr as MessageItemSenderBadges, gs as RowTone, gt as MessageQuotedPreviewChannelProps, h as InboxItemLeading, ha as Popover, hi as PreviewCardContentProps, hn as MessageReactionChipProps, hr as MessageItemSender, hs as ListRowValueProps, ht as MessageQuotedPreviewChannel, i as InboxItemBody, ic as ButtonSize, ii as AvatarImageProps, in as MessageReferenceSuffix, io as DropdownMenuFooter, is as ListRowGroupProps, it as MessageQuotedPreviewAttachmentProps, j as InboxItemTimestampProps, ja as PopoverHeaderProps, ji as PreviewCardSeparator, jn as MessageReactionTooltipContentProps, jo as DropdownMenuSubmenu, jr as MessageItemEdited, js as DialogDescription, jt as MessageQuotedPreviewUnavailableProps, k as InboxItemSubtitleProps, ka as PopoverDescriptionProps, ki as PreviewCardPortalProps, kn as MessageReactionQuickRowProps, ko as DropdownMenuShortcut, kr as MessageItemContent, ks as DialogContent, kt as MessageQuotedPreviewTimestampProps, l as InboxItemContextProps, lc as StyledProps, ln as MessageReferenceUnavailableProps, lo as DropdownMenuItemLabel, lr as MessageItemHeader, ls as ListRowProps, m as InboxItemHoverTargetProps, mi as PreviewCardContent, mn as MessageReactionChip, mr as MessageItemMetaProps, ms as ListRowValue, mt as MessageQuotedPreviewAuthorProps, n as InboxItemActions, nc as Button, ni as AvatarGroupProps, no as DropdownMenuContent, ns as ListRowDescriptionProps, nt as MessageQuotedPreview, o as InboxItemContent, oc as buttonVariants, oi as AvatarSize, on as MessageReferenceText, oo as DropdownMenuItem, os as ListRowIconProps, ot as MessageQuotedPreviewAttachmentsProps, p as InboxItemHoverTarget, pn as MessageReactionAddButtonProps, po as DropdownMenuLabelProps, pr as MessageItemMeta, ps as ListRowTopProps, pt as MessageQuotedPreviewAuthorNameProps, q as MessageListDateDividerProps, qa as MobileNavLabel, qn as MessageItemReadReceipt, qo as Presence, qr as Avatar, qt as MessageReferenceChipProps, r as InboxItemActionsProps, rc as ButtonProps, ri as AvatarImage, ro as DropdownMenuContentProps, rs as ListRowGroup, rt as MessageQuotedPreviewAttachment, s as InboxItemContentProps, sc as VariantProps, si as PreviewCard, sn as MessageReferenceTextProps, so as DropdownMenuItemCount, ss as ListRowMeta, st as MessageQuotedPreviewAuthor, t as InboxItem, tc as PanelActionProps, ti as AvatarGroupCountProps, tn as MessageReferencePendingProps, to as DropdownMenuCheckboxItemProps, ts as ListRowDescription, tt as MessageListProps, u as InboxItemDensity, ui as PreviewCardArrow, un as MessageReferenceChipVariant, uo as DropdownMenuItemLabelProps, ur as MessageItemHeaderProps, us as ListRowTitle, ut as MessageQuotedPreviewAuthorMeta, v as InboxItemMarksProps, va as PopoverArrow, vn as MessageReactionErrorIndicator, vo as DropdownMenuPortal, vr as MessageItemSenderButton, vs as TextLinkProps, vt as MessageQuotedPreviewContentProps, w as InboxItemSelection, wa as PopoverClose, wn as MessageReactionPickerStatic, wo as DropdownMenuRadioItemIndicator, wr as MessageItemTimeProps, ws as Dialog, wt as MessageQuotedPreviewText, x as InboxItemMetadata, xa as PopoverBackdropProps, xn as MessageReactionGlyphProps, xo as DropdownMenuRadioGroup, xr as MessageItemSenderGroupProps, xt as MessageQuotedPreviewLoading, y as InboxItemMessage, ya as PopoverArrowProps, yn as MessageReactionErrorIndicatorProps, yo as DropdownMenuPortalProps, yr as MessageItemSenderButtonProps, ys as textLinkVariants, yt as MessageQuotedPreviewHeader, za as PopoverTitle, zi as TooltipContentProps, zn as MessageReactionTooltipNamesProps, zo as KbdGroupProps, zr as MessageItemAvatarSlot, zs as DialogNav, zt as MessageMultiSelectCheckbox } from "./inbox-item-ChGeZBFb.mjs";
|
|
1
|
+
import { $ as MessageListNoticeProps, $a as DropdownMenuCheckboxItemIndicator, $n as MessageItemToolbarButtonProps, $o as ListRowChevron, $r as AvatarGroup, $s as DialogTriggerProps, $t as MessageReferenceLabelProps, A as InboxItemTimestamp, Aa as PopoverHeader, Ai as PreviewCardProps, An as MessageReactionTooltipContent, Ao as DropdownMenuShortcutProps, Ar as MessageItemContentProps, As as DialogContentProps, At as MessageQuotedPreviewUnavailable, Ba as PopoverTitleProps, Bi as TooltipPortal, Bn as MessageReactionTooltipSeparator, Bo as KbdProps, Br as MessageItemAvatarSlotProps, Bs as DialogNavProps, Bt as MessageMultiSelectCheckboxProps, C as InboxItemProps, Ci as PreviewCardHeaderProps, Cn as MessageReactionPickerContentProps, Co as DropdownMenuRadioItem, Cr as MessageItemTime, Ct as MessageQuotedPreviewProps, D as InboxItemSenderProps, Da as PopoverContentProps, Di as PreviewCardPopupProps, Dn as MessageReactionQuickButtonProps, Do as DropdownMenuSeparator, Dr as MessageItemBody, Ds as DialogClose, Dt as MessageQuotedPreviewThreadProps, E as InboxItemSender, Ea as PopoverContent, Ei as PreviewCardPopup, En as MessageReactionQuickButton, Eo as DropdownMenuRadioItemProps, Er as MessageItemAttachmentsProps, Es as DialogBodyProps, Et as MessageQuotedPreviewThread, F as InboxItemTrailingProps, Fa as PopoverPortalProps, Fi as PreviewCardTrigger, Fn as MessageReactionTooltipNameProps, Fo as DropdownMenuTrigger, Fr as MessageItemFooter, Ft as MessageTextSelectionToolbarProps, Ga as MobileNavItem, Gi as TooltipTrigger, Gn as MessageItemBadgeSeparatorProps, Go as Checkbox, Gr as MessageItem, Gs as DialogProps, Gt as MessageMultiSelectToolbarProps, Ha as PopoverTriggerProps, Hi as TooltipProps, Hn as MessageItemBadge, Ho as BadgeProps, Hr as MessageItemContinuationTimeProps, Hs as DialogOverlayProps, Ht as MessageMultiSelectToolbar, I as InboxItemTrigger, Ia as PopoverProps, Ii as PreviewCardTriggerProps, In as MessageReactionTooltipNameText, Io as DropdownMenuTriggerProps, Ir as MessageItemFooterProps, Is as DialogFooterProps, It as MessageTextSelectionToolbarSeparator, J as MessageListEndFade, Ja as MobileNavLabelProps, Jn as MessageItemReadReceiptProps, Jo as ListRow, Jr as AvatarBadge, Js as DialogSurface, K as MessageListDateDivider, Ka as MobileNavItemProps, Ki as TooltipTriggerProps, Kn as MessageItemBadgeStatus, Ko as CheckboxProps, Kr as MessageItemProps, Kt as MessageReferenceChip, L as InboxItemTriggerProps, La as PopoverSeparator, Li as Tooltip, Ln as MessageReactionTooltipNameTextProps, Lo as Kbd, Lr as MessageItemSearchMatch, Ls as DialogHeader, Lt as MessageTextSelectionToolbarSeparatorProps, M as InboxItemTitle, Ma as PopoverPopup, Mi as PreviewCardSeparatorProps, Mn as MessageReactionTooltipMeta, Mo as DropdownMenuSubmenuProps, Mr as MessageItemEditedProps, Ms as DialogDescriptionProps, Mt as MessageTextSelectionToolbar, N as InboxItemTitleProps, Na as PopoverPopupProps, Ni as PreviewCardTitle, Nn as MessageReactionTooltipMetaProps, No as DropdownMenuSubmenuTrigger, Nr as MessageItemEmbedded, Ns as DialogFooter, Nt as MessageTextSelectionToolbarButton, O as InboxItemSubtitle, Oa as PopoverDescription, Oi as PreviewCardPortal, On as MessageReactionQuickRow, Oo as DropdownMenuSeparatorProps, Or as MessageItemBodyProps, Os as DialogCloseProps, Ot as MessageQuotedPreviewTimestamp, P as InboxItemTrailing, Pa as PopoverPortal, Pi as PreviewCardTitleProps, Pn as MessageReactionTooltipName, Po as DropdownMenuSubmenuTriggerProps, Pr as MessageItemEmbeddedProps, Pt as MessageTextSelectionToolbarButtonProps, Q as MessageListNotice, Qa as DropdownMenuCheckboxItem, Qn as MessageItemToolbarButton, Qo as ListRowBottomProps, Qr as AvatarFallbackProps, Qs as DialogTrigger, Qt as MessageReferenceLabel, Ra as PopoverSeparatorProps, Ri as TooltipContent, Rn as MessageReactionTooltipNames, Ro as KbdGroup, Rr as MessageItemSearchMatchProps, Rs as DialogHeaderProps, Rt as MessageMultiSelect, S as InboxItemMetadataProps, Si as PreviewCardHeader, Sn as MessageReactionPickerContent, So as DropdownMenuRadioGroupProps, Sr as MessageItemSenderProps, St as MessageQuotedPreviewLoadingProps, T as InboxItemSelectionProps, Ta as PopoverCloseProps, Tn as MessageReactionPickerStaticProps, To as DropdownMenuRadioItemIndicatorProps, Tr as MessageItemAttachments, Ts as DialogBody, Tt as MessageQuotedPreviewTextProps, Ua as PopoverViewport, Ui as TooltipProvider, Un as MessageItemBadgeProps, Uo as CheckboxIndicator, Ur as MessageItemGutter, Us as DialogPortal, Ut as MessageMultiSelectToolbarActions, Va as PopoverTrigger, Vi as TooltipPortalProps, Vn as MessageReactionTooltipSeparatorProps, Vo as Badge, Vr as MessageItemContinuationTime, Vs as DialogOverlay, Vt as MessageMultiSelectProps, Wa as PopoverViewportProps, Wi as TooltipProviderProps, Wn as MessageItemBadgeSeparator, Wo as CheckboxIndicatorProps, Wr as MessageItemGutterProps, Ws as DialogPortalProps, Wt as MessageMultiSelectToolbarActionsProps, X as MessageListHistoryLimited, Xa as MobileNavRootProps, Xn as MessageItemSavedIndicatorProps, Xo as ListRowBodyProps, Xr as AvatarBadgeProps, Xs as DialogTitle, Xt as MessageReferenceIndicator, Y as MessageListEndFadeProps, Ya as MobileNavRoot, Yn as MessageItemSavedIndicator, Yo as ListRowBody, Yr as AvatarBadgeOffset, Ys as DialogSurfaceProps, Z as MessageListHistoryLimitedProps, Za as DropdownMenu, Zn as MessageItemToolbar, Zo as ListRowBottom, Zr as AvatarFallback, Zs as DialogTitleProps, Zt as MessageReferenceIndicatorProps, _ as InboxItemMarks, _i as PreviewCardDescriptionProps, _n as MessageReactionCountProps, _o as DropdownMenuPopupProps, _r as MessageItemSenderBadgesProps, _s as TextLink, _t as MessageQuotedPreviewContent, a as InboxItemBodyProps, ac as DeprecatedButtonSize, ai as AvatarProps, an as MessageReferenceSuffixProps, ao as DropdownMenuFooterProps, as as ListRowIcon, at as MessageQuotedPreviewAttachments, b as InboxItemMessageProps, ba as PopoverBackdrop, bn as MessageReactionGlyph, bo as DropdownMenuProps, br as MessageItemSenderGroup, bt as MessageQuotedPreviewHeaderProps, c as InboxItemContext, cc as DataAttributes$1, cn as MessageReferenceUnavailable, co as DropdownMenuItemCountProps, cs as ListRowMetaProps, d as InboxItemHeading, di as PreviewCardArrowProps, dn as MessageReferenceTextVariant, do as DropdownMenuItemProps, dr as MessageItemInlineStatus, ds as ListRowTitleProps, dt as MessageQuotedPreviewAuthorMetaProps, ec as PanelAction, ei as AvatarGroupCount, en as MessageReferencePending, eo as DropdownMenuCheckboxItemIndicatorProps, er as MessageItemToolbarProps, es as ListRowChevronProps, et as MessageList, f as InboxItemHeadingProps, fn as MessageReactionAddButton, fo as DropdownMenuLabel, fr as MessageItemInlineStatusProps, fs as ListRowTop, ft as MessageQuotedPreviewAuthorName, g as InboxItemLeadingProps, gi as PreviewCardDescription, gn as MessageReactionCount, go as DropdownMenuPopup, gr as MessageItemSenderBadges, gs as RowTone, gt as MessageQuotedPreviewChannelProps, h as InboxItemLeading, ha as Popover, hi as PreviewCardContentProps, hn as MessageReactionChipProps, hr as MessageItemSender, hs as ListRowValueProps, ht as MessageQuotedPreviewChannel, i as InboxItemBody, ic as ButtonSize, ii as AvatarImageProps, in as MessageReferenceSuffix, io as DropdownMenuFooter, is as ListRowGroupProps, it as MessageQuotedPreviewAttachmentProps, j as InboxItemTimestampProps, ja as PopoverHeaderProps, ji as PreviewCardSeparator, jn as MessageReactionTooltipContentProps, jo as DropdownMenuSubmenu, jr as MessageItemEdited, js as DialogDescription, jt as MessageQuotedPreviewUnavailableProps, k as InboxItemSubtitleProps, ka as PopoverDescriptionProps, ki as PreviewCardPortalProps, kn as MessageReactionQuickRowProps, ko as DropdownMenuShortcut, kr as MessageItemContent, ks as DialogContent, kt as MessageQuotedPreviewTimestampProps, l as InboxItemContextProps, lc as StyledProps, ln as MessageReferenceUnavailableProps, lo as DropdownMenuItemLabel, lr as MessageItemHeader, ls as ListRowProps, m as InboxItemHoverTargetProps, mi as PreviewCardContent, mn as MessageReactionChip, mr as MessageItemMetaProps, ms as ListRowValue, mt as MessageQuotedPreviewAuthorProps, n as InboxItemActions, nc as Button, ni as AvatarGroupProps, no as DropdownMenuContent, ns as ListRowDescriptionProps, nt as MessageQuotedPreview, o as InboxItemContent, oc as buttonVariants, oi as AvatarSize, on as MessageReferenceText, oo as DropdownMenuItem, os as ListRowIconProps, ot as MessageQuotedPreviewAttachmentsProps, p as InboxItemHoverTarget, pn as MessageReactionAddButtonProps, po as DropdownMenuLabelProps, pr as MessageItemMeta, ps as ListRowTopProps, pt as MessageQuotedPreviewAuthorNameProps, q as MessageListDateDividerProps, qa as MobileNavLabel, qn as MessageItemReadReceipt, qo as Presence, qr as Avatar, qt as MessageReferenceChipProps, r as InboxItemActionsProps, rc as ButtonProps, ri as AvatarImage, ro as DropdownMenuContentProps, rs as ListRowGroup, rt as MessageQuotedPreviewAttachment, s as InboxItemContentProps, sc as VariantProps, si as PreviewCard, sn as MessageReferenceTextProps, so as DropdownMenuItemCount, ss as ListRowMeta, st as MessageQuotedPreviewAuthor, t as InboxItem, tc as PanelActionProps, ti as AvatarGroupCountProps, tn as MessageReferencePendingProps, to as DropdownMenuCheckboxItemProps, ts as ListRowDescription, tt as MessageListProps, u as InboxItemDensity, ui as PreviewCardArrow, un as MessageReferenceChipVariant, uo as DropdownMenuItemLabelProps, ur as MessageItemHeaderProps, us as ListRowTitle, ut as MessageQuotedPreviewAuthorMeta, v as InboxItemMarksProps, va as PopoverArrow, vn as MessageReactionErrorIndicator, vo as DropdownMenuPortal, vr as MessageItemSenderButton, vs as TextLinkProps, vt as MessageQuotedPreviewContentProps, w as InboxItemSelection, wa as PopoverClose, wn as MessageReactionPickerStatic, wo as DropdownMenuRadioItemIndicator, wr as MessageItemTimeProps, ws as Dialog, wt as MessageQuotedPreviewText, x as InboxItemMetadata, xa as PopoverBackdropProps, xn as MessageReactionGlyphProps, xo as DropdownMenuRadioGroup, xr as MessageItemSenderGroupProps, xt as MessageQuotedPreviewLoading, y as InboxItemMessage, ya as PopoverArrowProps, yn as MessageReactionErrorIndicatorProps, yo as DropdownMenuPortalProps, yr as MessageItemSenderButtonProps, ys as textLinkVariants, yt as MessageQuotedPreviewHeader, za as PopoverTitle, zi as TooltipContentProps, zn as MessageReactionTooltipNamesProps, zo as KbdGroupProps, zr as MessageItemAvatarSlot, zs as DialogNav, zt as MessageMultiSelectCheckbox } from "./inbox-item-CiTYKTly.mjs";
|
|
2
2
|
import { cn } from "./cn.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { CSSProperties, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, CompositionEventHandler, ElementType, FocusEventHandler, FormEventHandler, HTMLAttributes, KeyboardEventHandler, PointerEvent, ReactElement, ReactNode, Ref, RefObject, SVGProps } from "react";
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { $ as MessageMultiSelect, $n as PopoverTitle, $r as ListRowTitle, $t as MessageItemAvatarSlot, A as MessageQuotedPreview, Ai as DialogSheetReset, Ar as PanelBody, At as MessageItemReadReceipt, B as MessageQuotedPreviewLoading, Bi as ThemeStateContext, Br as ScrollAreaThumb, Bt as MessageItemMeta, Ci as DialogSurface, Cn as PreviewCardHeader, Cr as DropdownMenuShortcut, Ct as MessageReactionTooltipMeta, D as MessageListHistoryLimited, Di as panelToggleAction, Dn as PreviewCardSeparator, Dr as Kbd, Dt as MessageReactionTooltipSeparator, E as MessageListEndFade, Ei as PanelAction, En as PreviewCardPortal, Er as DropdownMenuTrigger, Et as MessageReactionTooltipNames, F as MessageQuotedPreviewAuthorMeta, Fr as PanelSection, G as MessageEmbed, Gi as headEdgePull, Gr as ListRow, Gt as MessageItemTime, H as MessageQuotedPreviewThread, Hi as stackedActions, Hr as Checkbox, Ht as MessageItemSenderBadges, I as MessageQuotedPreviewAuthorName, Ii as useParentOverlayKind, Ir as ScrollArea, J as MessageEmbedHeader, Jn as PopoverDescription, Jr as ListRowChevron, Jt as MessageItemContent, K as MessageEmbedContent, Ki as headEdges, Kn as PopoverClose, Kr as ListRowBody, Kt as MessageItemAttachments, L as MessageQuotedPreviewChannel, Li as withOverlayLayer, Lr as ScrollAreaContent, M as MessageQuotedPreviewAttachments, Mi as buttonVariants, Mr as PanelHeaderRoot, Mt as MessageItemToolbar, N as MessageQuotedPreviewAuthor, Ni as Spinner, Nr as PanelScrollContent, Nt as MessageItemToolbarButton, O as MessageListNotice, Oi as TextLink, On as PreviewCardTitle, Or as KbdGroup, Ot as MessageItemBadge, Pi as defaultNativeButton, Pr as PanelScrollViewport, Q as MessageTextSelectionToolbarSeparator, Qn as PopoverSeparator, Qr as ListRowMeta, Qt as MessageItemSearchMatch, R as MessageQuotedPreviewContent, Ri as useThemeScopeProps, Rr as ScrollAreaCorner, Rt as MessageItemHeader, Sr as DropdownMenuSeparator, St as MessageReactionTooltipContent, T as MessageListDateDivider, Ti as DialogTrigger, Tn as PreviewCardPopup, Tr as DropdownMenuSubmenuTrigger, Tt as MessageReactionTooltipNameText, U as MessageQuotedPreviewTimestamp, Ui as useStackedActions, Un as PopoverArrow, Ur as CheckboxIndicator, Ut as MessageItemSenderButton, V as MessageQuotedPreviewText, Vi as tv, Vn as Popover, Vr as ScrollAreaViewport, Vt as MessageItemSender, W as MessageQuotedPreviewUnavailable, Wi as controlIconInset, Wn as PopoverBackdrop, Wr as PRESENCE_COLOR, Wt as MessageItemSenderGroup, X as MessageTextSelectionToolbar, Xn as PopoverPopup, Xr as ListRowGroup, Xt as MessageItemEmbedded, Y as messageEmbed, Yn as PopoverHeader, Yr as ListRowDescription, Yt as MessageItemEdited, Z as MessageTextSelectionToolbarButton, Zn as PopoverPortal, Zr as ListRowIcon, Zt as MessageItemFooter, _ as InboxItemTrailing, _n as PreviewCardArrow, _r as DropdownMenuPopup, _t as MessageReactionGlyph, a as InboxItemContext, ai as TooltipProvider, an as AvatarBadge, ar as MobileNavLabel, at as MessageReferenceIndicator, b as Skeleton, bi as DialogOverlay, bn as PreviewCardDescription, br as DropdownMenuRadioItem, bt as MessageReactionQuickButton, c as InboxItemLeading, cn as AvatarGroupCount, cr as DropdownMenuCheckboxItem, d as InboxItemMetadata, di as Dialog, dr as DropdownMenuFooter, dt as MessageReferenceUnavailable, ei as ListRowTop, en as MessageItemContinuationTime, er as PopoverTrigger, et as MessageMultiSelectCheckbox, f as InboxItemSelection, fi as DialogBody, fr as DropdownMenuItem, ft as inlineChip, g as InboxItemTitle, gi as DialogFooter, gt as MessageReactionErrorIndicator, h as InboxItemTimestamp, hi as DialogDescription, hn as PreviewCard, hr as DropdownMenuLabel, ht as MessageReactionCount, i as InboxItemContent, ii as TooltipPortal, in as Avatar, ir as MobileNavItem, j as MessageQuotedPreviewAttachment, ji as Button, jr as PanelFooter, jt as MessageItemSavedIndicator, k as MessageList, ki as textLinkVariants, kn as PreviewCardTrigger, kr as Panel, kt as MessageItemBadgeSeparator, l as InboxItemMarks, ln as AvatarImage, lr as DropdownMenuCheckboxItemIndicator, lt as MessageReferenceSuffix, m as InboxItemSubtitle, mi as DialogContent, mr as DropdownMenuItemLabel, mt as MessageReactionChip, n as InboxItemActions, ni as Tooltip, nn as MessageItem, nr as useHoldThenMoveTouchSensor, nt as MessageMultiSelectToolbarActions, o as InboxItemHeading, oi as TooltipTrigger, on as AvatarFallback, or as MobileNavRoot, ot as MessageReferenceLabel, p as InboxItemSender, pi as DialogClose, pr as DropdownMenuItemCount, pt as MessageReactionAddButton, q as MessageEmbedFooter, qi as decisionWidth, qn as PopoverContent, qr as ListRowBottom, qt as MessageItemBody, r as InboxItemBody, ri as TooltipContent, rn as searchHit, rr as useMouseOnlyPointerSensor, rt as MessageReferenceChip, s as InboxItemHoverTarget, si as Badge, sn as AvatarGroup, sr as DropdownMenu, st as MessageReferencePending, t as InboxItem, ti as ListRowValue, tn as MessageItemGutter, tr as PopoverViewport, tt as MessageMultiSelectToolbar, u as InboxItemMessage, ui as useMobileViewport, un as useOverflowTitle, ur as DropdownMenuContent, ut as MessageReferenceText, v as InboxItemTrigger, vi as DialogHeader, vr as DropdownMenuPortal, vt as MessageReactionPickerContent, wi as DialogTitle, wr as DropdownMenuSubmenu, wt as MessageReactionTooltipName, xi as DialogPortal, xr as DropdownMenuRadioItemIndicator, xt as MessageReactionQuickRow, yi as DialogNav, yn as PreviewCardContent, yr as DropdownMenuRadioGroup, yt as MessageReactionPickerStatic, z as MessageQuotedPreviewHeader, zi as useTheme, zr as ScrollAreaScrollbar, zt as MessageItemInlineStatus } from "./inbox-item-
|
|
2
|
+
import { $ as MessageMultiSelect, $n as PopoverTitle, $r as ListRowTitle, $t as MessageItemAvatarSlot, A as MessageQuotedPreview, Ai as DialogSheetReset, Ar as PanelBody, At as MessageItemReadReceipt, B as MessageQuotedPreviewLoading, Bi as ThemeStateContext, Br as ScrollAreaThumb, Bt as MessageItemMeta, Ci as DialogSurface, Cn as PreviewCardHeader, Cr as DropdownMenuShortcut, Ct as MessageReactionTooltipMeta, D as MessageListHistoryLimited, Di as panelToggleAction, Dn as PreviewCardSeparator, Dr as Kbd, Dt as MessageReactionTooltipSeparator, E as MessageListEndFade, Ei as PanelAction, En as PreviewCardPortal, Er as DropdownMenuTrigger, Et as MessageReactionTooltipNames, F as MessageQuotedPreviewAuthorMeta, Fr as PanelSection, G as MessageEmbed, Gi as headEdgePull, Gr as ListRow, Gt as MessageItemTime, H as MessageQuotedPreviewThread, Hi as stackedActions, Hr as Checkbox, Ht as MessageItemSenderBadges, I as MessageQuotedPreviewAuthorName, Ii as useParentOverlayKind, Ir as ScrollArea, J as MessageEmbedHeader, Jn as PopoverDescription, Jr as ListRowChevron, Jt as MessageItemContent, K as MessageEmbedContent, Ki as headEdges, Kn as PopoverClose, Kr as ListRowBody, Kt as MessageItemAttachments, L as MessageQuotedPreviewChannel, Li as withOverlayLayer, Lr as ScrollAreaContent, M as MessageQuotedPreviewAttachments, Mi as buttonVariants, Mr as PanelHeaderRoot, Mt as MessageItemToolbar, N as MessageQuotedPreviewAuthor, Ni as Spinner, Nr as PanelScrollContent, Nt as MessageItemToolbarButton, O as MessageListNotice, Oi as TextLink, On as PreviewCardTitle, Or as KbdGroup, Ot as MessageItemBadge, Pi as defaultNativeButton, Pr as PanelScrollViewport, Q as MessageTextSelectionToolbarSeparator, Qn as PopoverSeparator, Qr as ListRowMeta, Qt as MessageItemSearchMatch, R as MessageQuotedPreviewContent, Ri as useThemeScopeProps, Rr as ScrollAreaCorner, Rt as MessageItemHeader, Sr as DropdownMenuSeparator, St as MessageReactionTooltipContent, T as MessageListDateDivider, Ti as DialogTrigger, Tn as PreviewCardPopup, Tr as DropdownMenuSubmenuTrigger, Tt as MessageReactionTooltipNameText, U as MessageQuotedPreviewTimestamp, Ui as useStackedActions, Un as PopoverArrow, Ur as CheckboxIndicator, Ut as MessageItemSenderButton, V as MessageQuotedPreviewText, Vi as tv, Vn as Popover, Vr as ScrollAreaViewport, Vt as MessageItemSender, W as MessageQuotedPreviewUnavailable, Wi as controlIconInset, Wn as PopoverBackdrop, Wr as PRESENCE_COLOR, Wt as MessageItemSenderGroup, X as MessageTextSelectionToolbar, Xn as PopoverPopup, Xr as ListRowGroup, Xt as MessageItemEmbedded, Y as messageEmbed, Yn as PopoverHeader, Yr as ListRowDescription, Yt as MessageItemEdited, Z as MessageTextSelectionToolbarButton, Zn as PopoverPortal, Zr as ListRowIcon, Zt as MessageItemFooter, _ as InboxItemTrailing, _n as PreviewCardArrow, _r as DropdownMenuPopup, _t as MessageReactionGlyph, a as InboxItemContext, ai as TooltipProvider, an as AvatarBadge, ar as MobileNavLabel, at as MessageReferenceIndicator, b as Skeleton, bi as DialogOverlay, bn as PreviewCardDescription, br as DropdownMenuRadioItem, bt as MessageReactionQuickButton, c as InboxItemLeading, cn as AvatarGroupCount, cr as DropdownMenuCheckboxItem, d as InboxItemMetadata, di as Dialog, dr as DropdownMenuFooter, dt as MessageReferenceUnavailable, ei as ListRowTop, en as MessageItemContinuationTime, er as PopoverTrigger, et as MessageMultiSelectCheckbox, f as InboxItemSelection, fi as DialogBody, fr as DropdownMenuItem, ft as inlineChip, g as InboxItemTitle, gi as DialogFooter, gt as MessageReactionErrorIndicator, h as InboxItemTimestamp, hi as DialogDescription, hn as PreviewCard, hr as DropdownMenuLabel, ht as MessageReactionCount, i as InboxItemContent, ii as TooltipPortal, in as Avatar, ir as MobileNavItem, j as MessageQuotedPreviewAttachment, ji as Button, jr as PanelFooter, jt as MessageItemSavedIndicator, k as MessageList, ki as textLinkVariants, kn as PreviewCardTrigger, kr as Panel, kt as MessageItemBadgeSeparator, l as InboxItemMarks, ln as AvatarImage, lr as DropdownMenuCheckboxItemIndicator, lt as MessageReferenceSuffix, m as InboxItemSubtitle, mi as DialogContent, mr as DropdownMenuItemLabel, mt as MessageReactionChip, n as InboxItemActions, ni as Tooltip, nn as MessageItem, nr as useHoldThenMoveTouchSensor, nt as MessageMultiSelectToolbarActions, o as InboxItemHeading, oi as TooltipTrigger, on as AvatarFallback, or as MobileNavRoot, ot as MessageReferenceLabel, p as InboxItemSender, pi as DialogClose, pr as DropdownMenuItemCount, pt as MessageReactionAddButton, q as MessageEmbedFooter, qi as decisionWidth, qn as PopoverContent, qr as ListRowBottom, qt as MessageItemBody, r as InboxItemBody, ri as TooltipContent, rn as searchHit, rr as useMouseOnlyPointerSensor, rt as MessageReferenceChip, s as InboxItemHoverTarget, si as Badge, sn as AvatarGroup, sr as DropdownMenu, st as MessageReferencePending, t as InboxItem, ti as ListRowValue, tn as MessageItemGutter, tr as PopoverViewport, tt as MessageMultiSelectToolbar, u as InboxItemMessage, ui as useMobileViewport, un as useOverflowTitle, ur as DropdownMenuContent, ut as MessageReferenceText, v as InboxItemTrigger, vi as DialogHeader, vr as DropdownMenuPortal, vt as MessageReactionPickerContent, wi as DialogTitle, wr as DropdownMenuSubmenu, wt as MessageReactionTooltipName, xi as DialogPortal, xr as DropdownMenuRadioItemIndicator, xt as MessageReactionQuickRow, yi as DialogNav, yn as PreviewCardContent, yr as DropdownMenuRadioGroup, yt as MessageReactionPickerStatic, z as MessageQuotedPreviewHeader, zi as useTheme, zr as ScrollAreaScrollbar, zt as MessageItemInlineStatus } from "./inbox-item-BtxMxgoB.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { AlertTriangle, Bell, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, Copy, FileText, Image, Info, TriangleAlert, Upload, X, Zap } from "lucide-react";
|
|
5
5
|
import { Children, cloneElement, createContext, createElement, isValidElement, use, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -9799,7 +9799,7 @@ const notificationCenter = tv({
|
|
|
9799
9799
|
variants: {
|
|
9800
9800
|
viewport: {
|
|
9801
9801
|
desktop: { popup: "w-[380px]" },
|
|
9802
|
-
mobile: { popup: "w-[min(
|
|
9802
|
+
mobile: { popup: "w-[min(var(--available-width,calc(100vw-16px)),480px)]" }
|
|
9803
9803
|
},
|
|
9804
9804
|
size: {
|
|
9805
9805
|
sm: { popup: "h-56" },
|
|
@@ -9828,6 +9828,13 @@ const notificationCenter = tv({
|
|
|
9828
9828
|
status: "info"
|
|
9829
9829
|
}
|
|
9830
9830
|
});
|
|
9831
|
+
/**
|
|
9832
|
+
* On a phone the popup is as wide as the screen less 8px on each side, and the
|
|
9833
|
+
* collision padding stops it 8px from the edge it is pushed against, so it
|
|
9834
|
+
* lines up with the server list under the same top bar
|
|
9835
|
+
* (design/foundations/elevation.md#popups).
|
|
9836
|
+
*/
|
|
9837
|
+
const PHONE_INSET = 8;
|
|
9831
9838
|
function NotificationCenter({ modal = false, ...props }) {
|
|
9832
9839
|
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
9833
9840
|
modal,
|
|
@@ -9876,7 +9883,7 @@ function NotificationCenterPopup({ viewport = "desktop", size = "md", className,
|
|
|
9876
9883
|
arrowPadding,
|
|
9877
9884
|
collisionAvoidance,
|
|
9878
9885
|
collisionBoundary,
|
|
9879
|
-
collisionPadding,
|
|
9886
|
+
collisionPadding: collisionPadding ?? (viewport === "mobile" ? PHONE_INSET : void 0),
|
|
9880
9887
|
disableAnchorTracking,
|
|
9881
9888
|
positionMethod,
|
|
9882
9889
|
side,
|
package/dist/wip.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as MobileNavServerPopoverDestinationProps, As as DialogContentProps, B as MessageListJumpPill, C as InboxItemProps, Ca as PopoverBodyProps, Cs as DialogSheetContentProps, Ds as DialogClose, Fs as DialogFooterNoteProps, G as MessageListJumpPillProps, H as MessageListJumpPillDismissProps, Ji as MobileNavServerItemProps, Jt as MessageReferenceIcon, Ks as DialogSheetBack, Ps as DialogFooterNote, Qi as MobileNavServerPopoverDestination, Qs as DialogTrigger, R as MessageListJumpControls, Sa as PopoverBody, Ss as DialogSheetContent, Ti as PreviewCardMetaProps, U as MessageListJumpPillGroup, V as MessageListJumpPillDismiss, W as MessageListJumpPillGroupProps, Xi as MobileNavServerPopoverContent, Yi as MobileNavServerPopover, Yt as MessageReferenceIconProps, Zi as MobileNavServerPopoverContentProps, Zs as DialogTitleProps, _a as PopoverActionsProps, aa as MobileNavServerPopoverListProps, ar as MessageItemDelegatedByButtonProps, bi as PreviewCardFooter, bs as DialogCommit, ca as MobileNavServerPopoverRowBody, cc as DataAttributes, ci as PreviewCardActions, cr as MessageItemDelegatedByProps, ct as MessageQuotedPreviewAuthorDelegatedBy, da as MobileNavServerPopoverRowDescriptionProps, ea as MobileNavServerPopoverDestinations, fa as MobileNavServerPopoverRowLabel, fi as PreviewCardBody, ga as PopoverActions, ho as DropdownMenuLinkItemProps, ia as MobileNavServerPopoverList, ir as MessageItemDelegatedByButton, la as MobileNavServerPopoverRowBodyProps, lc as StyledProps, li as PreviewCardActionsProps, ls as ListRowProps, lt as MessageQuotedPreviewAuthorDelegatedByProps, ma as MobileNavServerPopoverRowProps, mo as DropdownMenuLinkItem, na as MobileNavServerPopoverGroup, nn as MessageReferenceReadMark, nr as MessageItemDelegatedAvatarProps, oa as MobileNavServerPopoverProps, or as MessageItemDelegatedByName, pa as MobileNavServerPopoverRowLabelProps, pi as PreviewCardBodyProps, qi as MobileNavServerItem, qs as DialogSheetBackProps, ra as MobileNavServerPopoverGroupProps, rc as ButtonProps, rn as MessageReferenceReadMarkProps, rr as MessageItemDelegatedBy, sa as MobileNavServerPopoverRow, sc as VariantProps, sr as MessageItemDelegatedByNameProps, ta as MobileNavServerPopoverDestinationsProps, tr as MessageItemDelegatedAvatar, u as InboxItemDensity, ua as MobileNavServerPopoverRowDescription, vi as PreviewCardEyebrow, vs as TextLinkProps, wi as PreviewCardMeta, ws as Dialog, xi as PreviewCardFooterProps, xs as DialogCommitProps, yi as PreviewCardEyebrowProps, z as MessageListJumpControlsProps } from "./inbox-item-
|
|
1
|
+
import { $i as MobileNavServerPopoverDestinationProps, As as DialogContentProps, B as MessageListJumpPill, C as InboxItemProps, Ca as PopoverBodyProps, Cs as DialogSheetContentProps, Ds as DialogClose, Fs as DialogFooterNoteProps, G as MessageListJumpPillProps, H as MessageListJumpPillDismissProps, Ji as MobileNavServerItemProps, Jt as MessageReferenceIcon, Ks as DialogSheetBack, Ps as DialogFooterNote, Qi as MobileNavServerPopoverDestination, Qs as DialogTrigger, R as MessageListJumpControls, Sa as PopoverBody, Ss as DialogSheetContent, Ti as PreviewCardMetaProps, U as MessageListJumpPillGroup, V as MessageListJumpPillDismiss, W as MessageListJumpPillGroupProps, Xi as MobileNavServerPopoverContent, Yi as MobileNavServerPopover, Yt as MessageReferenceIconProps, Zi as MobileNavServerPopoverContentProps, Zs as DialogTitleProps, _a as PopoverActionsProps, aa as MobileNavServerPopoverListProps, ar as MessageItemDelegatedByButtonProps, bi as PreviewCardFooter, bs as DialogCommit, ca as MobileNavServerPopoverRowBody, cc as DataAttributes, ci as PreviewCardActions, cr as MessageItemDelegatedByProps, ct as MessageQuotedPreviewAuthorDelegatedBy, da as MobileNavServerPopoverRowDescriptionProps, ea as MobileNavServerPopoverDestinations, fa as MobileNavServerPopoverRowLabel, fi as PreviewCardBody, ga as PopoverActions, ho as DropdownMenuLinkItemProps, ia as MobileNavServerPopoverList, ir as MessageItemDelegatedByButton, la as MobileNavServerPopoverRowBodyProps, lc as StyledProps, li as PreviewCardActionsProps, ls as ListRowProps, lt as MessageQuotedPreviewAuthorDelegatedByProps, ma as MobileNavServerPopoverRowProps, mo as DropdownMenuLinkItem, na as MobileNavServerPopoverGroup, nn as MessageReferenceReadMark, nr as MessageItemDelegatedAvatarProps, oa as MobileNavServerPopoverProps, or as MessageItemDelegatedByName, pa as MobileNavServerPopoverRowLabelProps, pi as PreviewCardBodyProps, qi as MobileNavServerItem, qs as DialogSheetBackProps, ra as MobileNavServerPopoverGroupProps, rc as ButtonProps, rn as MessageReferenceReadMarkProps, rr as MessageItemDelegatedBy, sa as MobileNavServerPopoverRow, sc as VariantProps, sr as MessageItemDelegatedByNameProps, ta as MobileNavServerPopoverDestinationsProps, tr as MessageItemDelegatedAvatar, u as InboxItemDensity, ua as MobileNavServerPopoverRowDescription, vi as PreviewCardEyebrow, vs as TextLinkProps, wi as PreviewCardMeta, ws as Dialog, xi as PreviewCardFooterProps, xs as DialogCommitProps, yi as PreviewCardEyebrowProps, z as MessageListJumpControlsProps } from "./inbox-item-CiTYKTly.mjs";
|
|
2
2
|
import { CSSProperties, ComponentProps, ComponentPropsWithRef, PointerEvent, ReactNode, RefObject } from "react";
|
|
3
3
|
import { Button } from "@base-ui/react/button";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
package/dist/wip.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as ListRowTitle, An as MobileNavServerItem, Bn as MobileNavServerPopoverRowLabel, C as MessageListJumpPillDismiss, Fi as OverlayLayerProvider, Fn as MobileNavServerPopoverGroup, Ft as MessageItemDelegatedBy, Gn as PopoverBody, Gr as ListRow, Hn as PopoverActions, Ii as useParentOverlayKind, In as MobileNavServerPopoverList, It as MessageItemDelegatedByButton, Kr as ListRowBody, Ln as MobileNavServerPopoverRow, Lt as MessageItemDelegatedByName, Mn as MobileNavServerPopoverContent, Nn as MobileNavServerPopoverDestination, Oi as TextLink, P as MessageQuotedPreviewAuthorDelegatedBy, Pi as defaultNativeButton, Pn as MobileNavServerPopoverDestinations, Pt as MessageItemDelegatedAvatar, Qr as ListRowMeta, Ri as useThemeScopeProps, Rn as MobileNavServerPopoverRowBody, S as MessageListJumpPill, Si as DialogSheetBack, Sn as PreviewCardFooter, Ti as DialogTrigger, Vi as tv, Yr as ListRowDescription, _ as InboxItemTrailing, _i as DialogFooterNote, a as InboxItemContext, b as Skeleton, c as InboxItemLeading, ci as DialogCommit, ct as MessageReferenceReadMark, di as Dialog, dn as measureContent, ei as ListRowTop, fn as measureElement, g as InboxItemTitle, gn as PreviewCardActions, gr as DropdownMenuLinkItem, h as InboxItemTimestamp, i as InboxItemContent, it as MessageReferenceIcon, ji as Button$1, jn as MobileNavServerPopover, li as DialogSheetContent, mi as DialogContent, mn as readNow, ni as Tooltip, nr as useHoldThenMoveTouchSensor, o as InboxItemHeading, oi as TooltipTrigger, pi as DialogClose, pn as observeTruncation, qr as ListRowBottom, r as InboxItemBody, ri as TooltipContent, t as InboxItem, un as useOverflowTitle, vn as PreviewCardBody, w as MessageListJumpPillGroup, wi as DialogTitle, wn as PreviewCardMeta, x as MessageListJumpControls, xn as PreviewCardEyebrow, y as inboxItem, zi as useTheme, zn as MobileNavServerPopoverRowDescription } from "./inbox-item-
|
|
1
|
+
import { $r as ListRowTitle, An as MobileNavServerItem, Bn as MobileNavServerPopoverRowLabel, C as MessageListJumpPillDismiss, Fi as OverlayLayerProvider, Fn as MobileNavServerPopoverGroup, Ft as MessageItemDelegatedBy, Gn as PopoverBody, Gr as ListRow, Hn as PopoverActions, Ii as useParentOverlayKind, In as MobileNavServerPopoverList, It as MessageItemDelegatedByButton, Kr as ListRowBody, Ln as MobileNavServerPopoverRow, Lt as MessageItemDelegatedByName, Mn as MobileNavServerPopoverContent, Nn as MobileNavServerPopoverDestination, Oi as TextLink, P as MessageQuotedPreviewAuthorDelegatedBy, Pi as defaultNativeButton, Pn as MobileNavServerPopoverDestinations, Pt as MessageItemDelegatedAvatar, Qr as ListRowMeta, Ri as useThemeScopeProps, Rn as MobileNavServerPopoverRowBody, S as MessageListJumpPill, Si as DialogSheetBack, Sn as PreviewCardFooter, Ti as DialogTrigger, Vi as tv, Yr as ListRowDescription, _ as InboxItemTrailing, _i as DialogFooterNote, a as InboxItemContext, b as Skeleton, c as InboxItemLeading, ci as DialogCommit, ct as MessageReferenceReadMark, di as Dialog, dn as measureContent, ei as ListRowTop, fn as measureElement, g as InboxItemTitle, gn as PreviewCardActions, gr as DropdownMenuLinkItem, h as InboxItemTimestamp, i as InboxItemContent, it as MessageReferenceIcon, ji as Button$1, jn as MobileNavServerPopover, li as DialogSheetContent, mi as DialogContent, mn as readNow, ni as Tooltip, nr as useHoldThenMoveTouchSensor, o as InboxItemHeading, oi as TooltipTrigger, pi as DialogClose, pn as observeTruncation, qr as ListRowBottom, r as InboxItemBody, ri as TooltipContent, t as InboxItem, un as useOverflowTitle, vn as PreviewCardBody, w as MessageListJumpPillGroup, wi as DialogTitle, wn as PreviewCardMeta, x as MessageListJumpControls, xn as PreviewCardEyebrow, y as inboxItem, zi as useTheme, zn as MobileNavServerPopoverRowDescription } from "./inbox-item-BtxMxgoB.mjs";
|
|
2
2
|
import { Check, ChevronDown, LoaderCircle, Plus, X } from "lucide-react";
|
|
3
3
|
import { createContext, use, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|