@box/threaded-annotations 3.2.3 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,13 +7,13 @@ import '../styles/delete-confirmation-popover.css';var c = {
7
7
  deletePopover: "_deletePopover_1c8ll_2",
8
8
  footer: "_footer_1c8ll_6"
9
9
  }, l = {
10
- headerContainer: "_headerContainer_hkxx4_7",
11
- information: "_information_hkxx4_15",
12
- textContainer: "_textContainer_hkxx4_22",
13
- author: "_author_hkxx4_30",
14
- optionsMenu: "_optionsMenu_hkxx4_37",
15
- deletePopoverAnchorWrapper: "_deletePopoverAnchorWrapper_hkxx4_56",
16
- deletePopoverAnchor: "_deletePopoverAnchor_hkxx4_56"
10
+ headerContainer: "_headerContainer_1kmrp_29",
11
+ information: "_information_1kmrp_37",
12
+ textContainer: "_textContainer_1kmrp_44",
13
+ author: "_author_1kmrp_52",
14
+ optionsMenu: "_optionsMenu_1kmrp_59",
15
+ deletePopoverAnchorWrapper: "_deletePopoverAnchorWrapper_1kmrp_78",
16
+ deletePopoverAnchor: "_deletePopoverAnchor_1kmrp_78"
17
17
  }, u = ({ hasReplies: u = !1, isAnnotation: d = !1, open: f, onOpenChange: p, onConfirm: m, onCancel: h }) => {
18
18
  let g = a();
19
19
  return /* @__PURE__ */ o("div", {
@@ -6,7 +6,7 @@ import { useCallback as i, useEffect as a, useRef as o, useState as s } from "re
6
6
  import { useIntl as c } from "react-intl";
7
7
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
8
  import { CollaborationPopover as d } from "@box/collaboration-popover";
9
- import '../styles/mention-component.css';var f = { mention: "_mention_1cdf1_5" }, p = ({ mentionedUserName: p, mentionedUserId: m, mentionedUserEmail: h, authorId: g, mentionId: _ }) => {
9
+ import '../styles/mention-component.css';var f = { mention: "_mention_hc7gc_27" }, p = ({ mentionedUserName: p, mentionedUserId: m, mentionedUserEmail: h, authorId: g, mentionId: _ }) => {
10
10
  let v = c(), y = o(!1), { collaborationPopoverProps: b, getAvatarUrl: x, fetchCollaboratorState: S, fetchEmail: C, openPopoverMentionId: w, openPopoverForMentionId: T, closeAllPopovers: E } = n(), [D, O] = s(!1), [k, A] = s(!1), [j, M] = s(h);
11
11
  a(() => {
12
12
  M(h);
@@ -1,12 +1,12 @@
1
1
  import '../styles/message-editor.css';var e = {
2
- editorDisabled: "_editorDisabled_1nmfa_7",
3
- editor: "_editor_1nmfa_7",
4
- messageEditor: "_messageEditor_1nmfa_14",
5
- errorMessage: "_errorMessage_1nmfa_17",
6
- errorText: "_errorText_1nmfa_23",
7
- actionsContainer: "_actionsContainer_1nmfa_26",
8
- editorContainer: "_editorContainer_1nmfa_34",
9
- editorError: "_editorError_1nmfa_73",
10
- anchorElement: "_anchorElement_1nmfa_82"
2
+ editorDisabled: "_editorDisabled_ng6un_29",
3
+ editor: "_editor_ng6un_29",
4
+ messageEditor: "_messageEditor_ng6un_36",
5
+ errorMessage: "_errorMessage_ng6un_39",
6
+ errorText: "_errorText_ng6un_45",
7
+ actionsContainer: "_actionsContainer_ng6un_48",
8
+ editorContainer: "_editorContainer_ng6un_56",
9
+ editorError: "_editorError_ng6un_95",
10
+ anchorElement: "_anchorElement_ng6un_104"
11
11
  };
12
12
  export { e as t };
@@ -1,29 +1,29 @@
1
1
  import '../styles/message-editor2.css';var e = {
2
- messageEditorWrapper: "_messageEditorWrapper_12g8n_7",
3
- editActionsColumn: "_editActionsColumn_12g8n_12",
4
- editActionsRow: "_editActionsRow_12g8n_19",
5
- characterLimitCounter: "_characterLimitCounter_12g8n_25",
6
- characterLimitCounterExceeded: "_characterLimitCounterExceeded_12g8n_28",
7
- messageEditor: "_messageEditor_12g8n_7",
8
- editorEditMode: "_editorEditMode_12g8n_46",
9
- editorFirstAnnotation: "_editorFirstAnnotation_12g8n_53",
10
- editorError: "_editorError_12g8n_53",
11
- editorViewport: "_editorViewport_12g8n_61",
12
- editorContainer: "_editorContainer_12g8n_67",
13
- editor: "_editor_12g8n_46",
14
- editorFade: "_editorFade_12g8n_113",
15
- editorFadeHidden: "_editorFadeHidden_12g8n_124",
16
- editorFullWidth: "_editorFullWidth_12g8n_127",
17
- actionsWrapper: "_actionsWrapper_12g8n_131",
18
- actionsWrapperInner: "_actionsWrapperInner_12g8n_141",
19
- timestampToggle: "_timestampToggle_12g8n_148",
20
- errorMessage: "_errorMessage_12g8n_151",
21
- errorText: "_errorText_12g8n_160",
22
- editorHasScroll: "_editorHasScroll_12g8n_169",
23
- editorCharacterLimitExceeded: "_editorCharacterLimitExceeded_12g8n_180",
24
- characterLimitExceeded: "_characterLimitExceeded_12g8n_202",
25
- scrolledToBottom: "_scrolledToBottom_12g8n_205",
26
- anchorElement: "_anchorElement_12g8n_209",
27
- withTimestampToggle: "_withTimestampToggle_12g8n_218"
2
+ messageEditorWrapper: "_messageEditorWrapper_1hnvj_29",
3
+ editActionsColumn: "_editActionsColumn_1hnvj_34",
4
+ editActionsRow: "_editActionsRow_1hnvj_41",
5
+ characterLimitCounter: "_characterLimitCounter_1hnvj_47",
6
+ characterLimitCounterExceeded: "_characterLimitCounterExceeded_1hnvj_50",
7
+ messageEditor: "_messageEditor_1hnvj_29",
8
+ editorEditMode: "_editorEditMode_1hnvj_68",
9
+ editorFirstAnnotation: "_editorFirstAnnotation_1hnvj_75",
10
+ editorError: "_editorError_1hnvj_75",
11
+ editorViewport: "_editorViewport_1hnvj_83",
12
+ editorContainer: "_editorContainer_1hnvj_89",
13
+ editor: "_editor_1hnvj_68",
14
+ editorFade: "_editorFade_1hnvj_135",
15
+ editorFadeHidden: "_editorFadeHidden_1hnvj_146",
16
+ editorFullWidth: "_editorFullWidth_1hnvj_149",
17
+ actionsWrapper: "_actionsWrapper_1hnvj_153",
18
+ actionsWrapperInner: "_actionsWrapperInner_1hnvj_163",
19
+ timestampToggle: "_timestampToggle_1hnvj_170",
20
+ errorMessage: "_errorMessage_1hnvj_173",
21
+ errorText: "_errorText_1hnvj_182",
22
+ editorHasScroll: "_editorHasScroll_1hnvj_191",
23
+ editorCharacterLimitExceeded: "_editorCharacterLimitExceeded_1hnvj_202",
24
+ characterLimitExceeded: "_characterLimitExceeded_1hnvj_224",
25
+ scrolledToBottom: "_scrolledToBottom_1hnvj_227",
26
+ anchorElement: "_anchorElement_1hnvj_231",
27
+ withTimestampToggle: "_withTimestampToggle_1hnvj_240"
28
28
  };
29
29
  export { e as t };
@@ -5,11 +5,11 @@ import { useState as r } from "react";
5
5
  import { ReadableTime as i } from "@box/readable-time";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import '../styles/message-header.css';var s = {
8
- headerContainer: "_headerContainer_1jcw4_7",
9
- information: "_information_1jcw4_15",
10
- textContainer: "_textContainer_1jcw4_22",
11
- author: "_author_1jcw4_30",
12
- deleteAction: "_deleteAction_1jcw4_36"
8
+ headerContainer: "_headerContainer_18dlz_29",
9
+ information: "_information_18dlz_37",
10
+ textContainer: "_textContainer_18dlz_44",
11
+ author: "_author_18dlz_52",
12
+ deleteAction: "_deleteAction_18dlz_58"
13
13
  }, c = ({ author: c, createdAt: l, isDeleteAllowed: u = !0, onAvatarClick: d, onDelete: f }) => {
14
14
  let [p, m] = r(!1);
15
15
  return /* @__PURE__ */ o("div", {
@@ -7,34 +7,34 @@ import o from "clsx";
7
7
  import { useRef as s } from "react";
8
8
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
9
  import '../styles/messages-view.css';var u = {
10
- messagesViewWrapper: "_messagesViewWrapper_gor1q_7",
11
- overflowing: "_overflowing_gor1q_12",
12
- scrollable: "_scrollable_gor1q_12",
13
- withEditorBelow: "_withEditorBelow_gor1q_15",
14
- messagesView: "_messagesView_gor1q_7",
15
- repliesContainer: "_repliesContainer_gor1q_56",
16
- messagesFade: "_messagesFade_gor1q_62"
10
+ messagesViewWrapper: "_messagesViewWrapper_1awp7_29",
11
+ overflowing: "_overflowing_1awp7_34",
12
+ scrollable: "_scrollable_1awp7_34",
13
+ withEditorBelow: "_withEditorBelow_1awp7_37",
14
+ messagesView: "_messagesView_1awp7_29",
15
+ repliesContainer: "_repliesContainer_1awp7_78",
16
+ messagesFade: "_messagesFade_1awp7_84"
17
17
  }, d = ({ messages: d, isResolved: f = !1, resolvedBy: p, resolvedAt: m, maxCharacterCount: h, onDelete: g, onThreadDelete: _, onAvatarClick: v, onCopyLink: y, onEdit: b, onEditError: x, onResolve: S, onUnresolve: C, userSelectorProps: w, annotationTarget: T, onAnnotationBadgeClick: E, originalContentDeleted: D }) => {
18
- let { viewState: O, dispatch: k, isAnnotations: A, scrollTargetMessageId: j } = t(), M = s(null), N = O !== e.Collapsed, P = O === e.Composing, F = d.length > 2, I = F && !N, { handleScroll: L, isOverflowing: R } = a({
18
+ let { viewState: O, dispatch: k, isAnnotations: A } = t(), j = s(null), M = O !== e.Collapsed, N = O === e.Composing, P = d.length > 2, F = P && !M, { handleScroll: I, isOverflowing: L } = a({
19
19
  messageCount: d.length,
20
- containerRef: M,
20
+ containerRef: j,
21
21
  enabled: A,
22
- isExpanded: N,
23
- suppressAutoScroll: I || !!j
24
- }), z = d[0], B = d.slice(1), V = B.length >= 1, H = B[B.length - 1], U = B.slice(0, -1), W = F && !N;
25
- if (!z) return null;
26
- let G = U[U.length - 1]?.author, K = U.length >= 2 ? U[U.length - 2].author : void 0, q = () => k({ type: "EXPAND" });
22
+ isExpanded: M,
23
+ suppressAutoScroll: F
24
+ }), R = d[0], z = d.slice(1), B = z.length >= 1, V = z[z.length - 1], H = z.slice(0, -1), U = P && !M;
25
+ if (!R) return null;
26
+ let W = H[H.length - 1]?.author, G = H.length >= 2 ? H[H.length - 2].author : void 0, K = () => k({ type: "EXPAND" });
27
27
  return /* @__PURE__ */ l("div", {
28
- className: o(u.messagesViewWrapper, R && u.overflowing, R && P && u.withEditorBelow),
28
+ className: o(u.messagesViewWrapper, L && u.overflowing, L && N && u.withEditorBelow),
29
29
  children: [/* @__PURE__ */ l("div", {
30
- ref: M,
30
+ ref: j,
31
31
  className: o(u.messagesView, A && u.scrollable),
32
- onScroll: L,
32
+ onScroll: I,
33
33
  children: [
34
34
  /* @__PURE__ */ c(i, {
35
- ...z,
36
- hasReplies: V,
37
- showThreadedIndicator: V || f,
35
+ ...R,
36
+ hasReplies: B,
37
+ showThreadedIndicator: B || f,
38
38
  isResolved: f,
39
39
  maxCharacterCount: h,
40
40
  onDelete: g,
@@ -51,15 +51,15 @@ import '../styles/messages-view.css';var u = {
51
51
  onAnnotationBadgeClick: E,
52
52
  originalContentDeleted: D
53
53
  }),
54
- W && G && /* @__PURE__ */ c(r, {
55
- lastUser: G,
56
- repliesCount: U.length,
57
- secondLastUser: K,
58
- onShowReplies: q
54
+ U && W && /* @__PURE__ */ c(r, {
55
+ lastUser: W,
56
+ repliesCount: H.length,
57
+ secondLastUser: G,
58
+ onShowReplies: K
59
59
  }),
60
- N && U.length > 0 && /* @__PURE__ */ c("div", {
60
+ M && H.length > 0 && /* @__PURE__ */ c("div", {
61
61
  className: u.repliesContainer,
62
- children: U.map((e) => /* @__PURE__ */ c(i, {
62
+ children: H.map((e) => /* @__PURE__ */ c(i, {
63
63
  ...e,
64
64
  showThreadedIndicator: !0,
65
65
  isResolved: f,
@@ -74,8 +74,8 @@ import '../styles/messages-view.css';var u = {
74
74
  userSelectorProps: w
75
75
  }, e.id))
76
76
  }),
77
- H && /* @__PURE__ */ c(i, {
78
- ...H,
77
+ V && /* @__PURE__ */ c(i, {
78
+ ...V,
79
79
  showThreadedIndicator: f,
80
80
  isResolved: f,
81
81
  maxCharacterCount: h,
@@ -93,7 +93,7 @@ import '../styles/messages-view.css';var u = {
93
93
  createdAt: m
94
94
  })
95
95
  ]
96
- }), R && /* @__PURE__ */ c("div", { className: u.messagesFade })]
96
+ }), L && /* @__PURE__ */ c("div", { className: u.messagesFade })]
97
97
  });
98
98
  };
99
99
  export { d as t };
@@ -6,12 +6,12 @@ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { bpGreenLight125 as o } from "@box/blueprint-web-assets/tokens/tokens";
7
7
  import { CheckmarkCircle as s } from "@box/blueprint-web-assets/icons/MediumFilled";
8
8
  import '../styles/resolved-state.css';var c = {
9
- resolvedState: "_resolvedState_12vpz_7",
10
- leftContainer: "_leftContainer_12vpz_15",
11
- rightContainer: "_rightContainer_12vpz_19",
12
- statusLine: "_statusLine_12vpz_25",
13
- authorName: "_authorName_12vpz_33",
14
- statusText: "_statusText_12vpz_40"
9
+ resolvedState: "_resolvedState_1ts95_29",
10
+ leftContainer: "_leftContainer_1ts95_37",
11
+ rightContainer: "_rightContainer_1ts95_41",
12
+ statusLine: "_statusLine_1ts95_47",
13
+ authorName: "_authorName_1ts95_55",
14
+ statusText: "_statusText_1ts95_62"
15
15
  }, l = ({ authorName: l, createdAt: u }) => {
16
16
  let d = n();
17
17
  return /* @__PURE__ */ a("div", {
@@ -1,14 +1,14 @@
1
1
  import '../styles/text-message2.css';var e = {
2
- textMessage: "_textMessage_1nzt2_7",
3
- contentWrapper: "_contentWrapper_1nzt2_16",
4
- threadedIndicator: "_threadedIndicator_1nzt2_21",
5
- threadedIndicatorHidden: "_threadedIndicatorHidden_1nzt2_37",
6
- messageContent: "_messageContent_1nzt2_40",
7
- inlineEditSlot: "_inlineEditSlot_1nzt2_47",
8
- annotationBadgeWrapper: "_annotationBadgeWrapper_1nzt2_50",
9
- messageFooter: "_messageFooter_1nzt2_59",
10
- readableTimeWrapper: "_readableTimeWrapper_1nzt2_67",
11
- replyButton: "_replyButton_1nzt2_71",
12
- seeMoreButton: "_seeMoreButton_1nzt2_86"
2
+ textMessage: "_textMessage_1mths_29",
3
+ contentWrapper: "_contentWrapper_1mths_38",
4
+ threadedIndicator: "_threadedIndicator_1mths_43",
5
+ threadedIndicatorHidden: "_threadedIndicatorHidden_1mths_59",
6
+ messageContent: "_messageContent_1mths_62",
7
+ inlineEditSlot: "_inlineEditSlot_1mths_69",
8
+ annotationBadgeWrapper: "_annotationBadgeWrapper_1mths_72",
9
+ messageFooter: "_messageFooter_1mths_81",
10
+ readableTimeWrapper: "_readableTimeWrapper_1mths_89",
11
+ replyButton: "_replyButton_1mths_93",
12
+ seeMoreButton: "_seeMoreButton_1mths_108"
13
13
  };
14
14
  export { e as t };
@@ -2,91 +2,85 @@ import { THREADED_ANNOTATIONS_PORTAL as e } from "../esm/lib/v2/constants.js";
2
2
  import { MessageEditor as t } from "../esm/lib/components/v2/message-editor/message-editor.js";
3
3
  import { ThreadViewState as n, ThreadedAnnotationsProvider as r, useThreadedAnnotationsContext as i } from "../esm/lib/v2/threaded-annotations-context.js";
4
4
  import { t as a } from "./messages-view.js";
5
- import { useScrollToMessage as o } from "../esm/lib/v2/hooks/useScrollToMessage.js";
6
- import { buildMentionContent as s } from "../esm/lib/v2/utils/build-mention-content.js";
7
- import c from "clsx";
8
- import { useCallback as l, useEffect as u, useMemo as d, useRef as f } from "react";
9
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
- import '../styles/threaded-annotations2.css';var h = {
5
+ import { buildMentionContent as o } from "../esm/lib/v2/utils/build-mention-content.js";
6
+ import s from "clsx";
7
+ import { useCallback as c, useEffect as l, useMemo as u, useRef as d } from "react";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import '../styles/threaded-annotations2.css';var m = {
11
10
  threadedAnnotations: "_threadedAnnotations_16hhz_1",
12
11
  expandable: "_expandable_16hhz_10",
13
12
  annotations: "_annotations_16hhz_18",
14
13
  highlighted: "_highlighted_16hhz_18"
15
- }, g = ({ messages: r, isResolved: g = !1, resolvedBy: _, resolvedAt: v, maxCharacterCount: y, onDelete: b, onThreadDelete: x, onAvatarClick: S, onCopyLink: C, onEdit: w, onEditError: T, onResolve: E, onUnresolve: D, onPost: O, onPostError: k, userSelectorProps: A, onEditorOpenChange: j, annotationTarget: M, onAnnotationBadgeClick: N, originalContentDeleted: P, scrollToMessageId: F, onScrollToMessageComplete: I, isHighlighted: L = !1 }) => {
16
- let { viewState: R, dispatch: z, editingMessageId: B, replyMention: V, isReplyDisabled: H, isAnnotations: U } = i(), W = f(null), G = R !== n.Collapsed, K = r.length > 2, q = R === n.Collapsed && (K || !H && !g);
17
- o({
18
- containerRef: W,
19
- messages: r,
20
- scrollToMessageId: F,
21
- onScrollToMessageComplete: I
22
- }), u(() => {
23
- B && !r.some((e) => e.id === B) && z({ type: "CLEAR_EDIT" });
14
+ }, h = ({ messages: r, isResolved: h = !1, resolvedBy: g, resolvedAt: _, maxCharacterCount: v, onDelete: y, onThreadDelete: b, onAvatarClick: x, onCopyLink: S, onEdit: C, onEditError: w, onResolve: T, onUnresolve: E, onPost: D, onPostError: O, userSelectorProps: k, onEditorOpenChange: A, annotationTarget: j, onAnnotationBadgeClick: M, originalContentDeleted: N, isHighlighted: P = !1 }) => {
15
+ let { viewState: F, dispatch: I, editingMessageId: L, replyMention: R, isReplyDisabled: z, isAnnotations: B } = i(), V = d(null), H = F !== n.Collapsed, U = r.length > 2, W = F === n.Collapsed && (U || !z && !h);
16
+ l(() => {
17
+ L && !r.some((e) => e.id === L) && I({ type: "CLEAR_EDIT" });
24
18
  }, [
25
- B,
19
+ L,
26
20
  r,
27
- z
28
- ]), u(() => {
29
- j?.(G);
30
- }, [G, j]), u(() => {
31
- if (!G) return;
21
+ I
22
+ ]), l(() => {
23
+ A?.(H);
24
+ }, [H, A]), l(() => {
25
+ if (!H) return;
32
26
  let t = `[${Object.keys(e)[0]}]`, n = (e) => {
33
27
  let n = e.target;
34
- W.current?.contains(n) || document.querySelector(t)?.contains(n) || z({ type: "COLLAPSE" });
28
+ V.current?.contains(n) || document.querySelector(t)?.contains(n) || I({ type: "COLLAPSE" });
35
29
  };
36
30
  return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
37
- }, [G, z]);
38
- let J = r.length === 0, Y = l(() => z({ type: "CLEAR_MENTION" }), [z]), X = d(() => V ? s(V) : null, [V]), Z = l((e) => {
39
- if (!q) return;
31
+ }, [H, I]);
32
+ let G = r.length === 0, K = c(() => I({ type: "CLEAR_MENTION" }), [I]), q = u(() => R ? o(R) : null, [R]), J = c((e) => {
33
+ if (!W) return;
40
34
  let t = e.target;
41
- !e.currentTarget.contains(t) || t.closest("[data-no-expand]") || z({ type: "EXPAND" });
42
- }, [q, z]);
43
- return U && J ? /* @__PURE__ */ p(t, {
35
+ !e.currentTarget.contains(t) || t.closest("[data-no-expand]") || I({ type: "EXPAND" });
36
+ }, [W, I]);
37
+ return B && G ? /* @__PURE__ */ f(t, {
44
38
  isFirstAnnotation: !0,
45
- maxCharacterCount: y,
46
- onPost: O,
47
- onPostError: k,
48
- onPostSuccess: Y,
49
- userSelectorProps: A
50
- }) : /* @__PURE__ */ m("div", {
51
- ref: W,
52
- className: c(h.threadedAnnotations, q && h.expandable, U && h.annotations, L && h.highlighted),
53
- "data-thread-expandable": q ? !0 : void 0,
54
- "data-thread-highlighted": L ? !0 : void 0,
55
- onClick: q ? Z : void 0,
56
- children: [/* @__PURE__ */ p(a, {
39
+ maxCharacterCount: v,
40
+ onPost: D,
41
+ onPostError: O,
42
+ onPostSuccess: K,
43
+ userSelectorProps: k
44
+ }) : /* @__PURE__ */ p("div", {
45
+ ref: V,
46
+ className: s(m.threadedAnnotations, W && m.expandable, B && m.annotations, P && m.highlighted),
47
+ "data-thread-expandable": W ? !0 : void 0,
48
+ "data-thread-highlighted": P ? !0 : void 0,
49
+ onClick: W ? J : void 0,
50
+ children: [/* @__PURE__ */ f(a, {
57
51
  messages: r,
58
- isResolved: g,
59
- resolvedBy: _,
60
- resolvedAt: v,
61
- maxCharacterCount: y,
62
- onDelete: b,
63
- onThreadDelete: x,
64
- onAvatarClick: S,
65
- onCopyLink: C,
66
- onEdit: w,
67
- onEditError: T,
68
- onResolve: E,
69
- onUnresolve: D,
70
- userSelectorProps: A,
71
- annotationTarget: M,
72
- onAnnotationBadgeClick: N,
73
- originalContentDeleted: P
74
- }), R === n.Composing && /* @__PURE__ */ p(t, {
75
- initialContent: X,
76
- maxCharacterCount: y,
77
- onPost: O,
78
- onPostError: k,
79
- onPostSuccess: Y,
52
+ isResolved: h,
53
+ resolvedBy: g,
54
+ resolvedAt: _,
55
+ maxCharacterCount: v,
56
+ onDelete: y,
57
+ onThreadDelete: b,
58
+ onAvatarClick: x,
59
+ onCopyLink: S,
60
+ onEdit: C,
61
+ onEditError: w,
62
+ onResolve: T,
63
+ onUnresolve: E,
64
+ userSelectorProps: k,
65
+ annotationTarget: j,
66
+ onAnnotationBadgeClick: M,
67
+ originalContentDeleted: N
68
+ }), F === n.Composing && /* @__PURE__ */ f(t, {
69
+ initialContent: q,
70
+ maxCharacterCount: v,
71
+ onPost: D,
72
+ onPostError: O,
73
+ onPostSuccess: K,
80
74
  isReply: !0,
81
- userSelectorProps: A
75
+ userSelectorProps: k
82
76
  })]
83
77
  });
84
- }, _ = (e) => /* @__PURE__ */ p(r, {
85
- defaultExpanded: e.messages.length === 0,
78
+ }, g = (e) => /* @__PURE__ */ f(r, {
79
+ defaultExpanded: e.defaultExpanded || e.messages.length === 0,
86
80
  isReplyDisabled: e.isReplyDisabled || e.isResolved,
87
81
  isEditDisabled: e.isEditDisabled || e.isResolved,
88
82
  isAnnotations: e.isAnnotations,
89
83
  collapsed: e.collapsed,
90
- children: /* @__PURE__ */ p(g, { ...e })
84
+ children: /* @__PURE__ */ f(h, { ...e })
91
85
  });
92
- export { _ as t };
86
+ export { g as t };
@@ -1,13 +1,13 @@
1
1
  import { t as e } from "./text-message.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import '../styles/virtualized-messages.css';var n = {
4
- messagesView: "_messagesView_124mt_7",
5
- moreRepliesButton: "_moreRepliesButton_124mt_17",
6
- repliesContainer: "_repliesContainer_124mt_20",
7
- threadIndicator: "_threadIndicator_124mt_27",
8
- virtualizedMessages: "_virtualizedMessages_124mt_32",
9
- messageWrapper: "_messageWrapper_124mt_37",
10
- singleMessageWrapper: "_singleMessageWrapper_124mt_71"
4
+ messagesView: "_messagesView_h8l31_29",
5
+ moreRepliesButton: "_moreRepliesButton_h8l31_39",
6
+ repliesContainer: "_repliesContainer_h8l31_42",
7
+ threadIndicator: "_threadIndicator_h8l31_49",
8
+ virtualizedMessages: "_virtualizedMessages_h8l31_54",
9
+ messageWrapper: "_messageWrapper_h8l31_59",
10
+ singleMessageWrapper: "_singleMessageWrapper_h8l31_93"
11
11
  }, r = ({ messages: r, totalSize: i, virtualItems: a, measureElement: o, onDelete: s, onAvatarClick: c, isDeleteAllowed: l }) => /* @__PURE__ */ t("div", {
12
12
  className: n.virtualizedMessages,
13
13
  style: { height: `${i}px` },
@@ -3,15 +3,15 @@ import { jsx as o } from "react/jsx-runtime";
3
3
  var s = /* @__PURE__ */ function(e) {
4
4
  return e.Collapsed = "collapsed", e.RepliesOnly = "repliesOnly", e.Composing = "composing", e;
5
5
  }({}), c = /*#__PURE__*/ e(void 0), l = ({ children: e, defaultExpanded: n = !1, isReplyDisabled: s = !1, isEditDisabled: l = !1, collapsed: u = !1, isAnnotations: d = !1 }) => {
6
- let [f, p] = a(() => n ? s ? "repliesOnly" : "composing" : "collapsed"), [m, h] = a(null), [g, _] = a(null), [v, y] = a(null);
6
+ let [f, p] = a(() => n ? s ? "repliesOnly" : "composing" : "collapsed"), [m, h] = a(null), [g, _] = a(null);
7
7
  r(() => {
8
8
  s ? (p((e) => e === "composing" ? "collapsed" : e), h(null)) : p((e) => e === "repliesOnly" ? "composing" : e);
9
9
  }, [s]), r(() => {
10
10
  l && _(null);
11
11
  }, [l]), r(() => {
12
- u && (p("collapsed"), h(null), _(null), y(null));
12
+ u && (p("collapsed"), h(null), _(null));
13
13
  }, [u]);
14
- let b = t((e) => {
14
+ let v = t((e) => {
15
15
  switch (e.type) {
16
16
  case "EXPAND":
17
17
  p((e) => e === "collapsed" ? s ? "repliesOnly" : "composing" : e);
@@ -26,39 +26,31 @@ var s = /* @__PURE__ */ function(e) {
26
26
  _(null);
27
27
  break;
28
28
  case "COLLAPSE":
29
- p("collapsed"), h(null), _(null), y(null);
29
+ p("collapsed"), h(null), _(null);
30
30
  break;
31
31
  case "CLEAR_MENTION":
32
32
  h(null);
33
33
  break;
34
- case "SET_SCROLL_TARGET":
35
- y(e.id), p((e) => e === "collapsed" ? s ? "repliesOnly" : "composing" : e);
36
- break;
37
- case "CLEAR_SCROLL_TARGET":
38
- y(null);
39
- break;
40
34
  }
41
- }, [s, l]), x = i(() => ({
35
+ }, [s, l]), y = i(() => ({
42
36
  viewState: f,
43
37
  replyMention: m,
44
38
  editingMessageId: g,
45
- scrollTargetMessageId: v,
46
39
  isAnnotations: d,
47
40
  isReplyDisabled: s,
48
41
  isEditDisabled: l,
49
- dispatch: b
42
+ dispatch: v
50
43
  }), [
51
44
  f,
52
45
  m,
53
46
  g,
54
- v,
55
47
  d,
56
48
  s,
57
49
  l,
58
- b
50
+ v
59
51
  ]);
60
52
  return /* @__PURE__ */ o(c.Provider, {
61
- value: x,
53
+ value: y,
62
54
  children: e
63
55
  });
64
56
  }, u = () => {
@@ -1 +1 @@
1
- ._deletePopover_1c8ll_2{width:17rem;margin:0}._deletePopover_1c8ll_2 ._footer_1c8ll_6{gap:var(--space-2);justify-content:flex-end;display:flex}._headerContainer_hkxx4_7{gap:var(--space-4);justify-content:space-between;align-items:center;width:100%;display:flex;position:relative}._headerContainer_hkxx4_7 ._information_hkxx4_15{gap:var(--space-2);justify-content:flex-start;align-items:center;width:100%;display:flex}._headerContainer_hkxx4_7 ._information_hkxx4_15 ._textContainer_hkxx4_22{word-break:break-all;overflow-wrap:break-word;width:fit-content;min-width:0;max-width:100%;overflow:hidden}._headerContainer_hkxx4_7 ._information_hkxx4_15 ._textContainer_hkxx4_22 ._author_hkxx4_30{-webkit-line-clamp:1;-webkit-box-orient:vertical;width:fit-content;display:-webkit-box;overflow:hidden}._headerContainer_hkxx4_7 ._optionsMenu_hkxx4_37{gap:var(--space-1);opacity:0;align-items:center;transition:opacity .1s;display:flex;position:relative}[data-message-wrapper]:hover ._headerContainer_hkxx4_7 ._optionsMenu_hkxx4_37,[data-message-wrapper]:focus-within ._headerContainer_hkxx4_7 ._optionsMenu_hkxx4_37{opacity:1}@media (pointer:coarse),(hover:none){._headerContainer_hkxx4_7 ._optionsMenu_hkxx4_37{opacity:1}}._headerContainer_hkxx4_7 ._optionsMenu_hkxx4_37[data-state=open]{opacity:1}._headerContainer_hkxx4_7 ._deletePopoverAnchorWrapper_hkxx4_56{width:0;height:0;position:absolute;bottom:0;right:0}._headerContainer_hkxx4_7 ._deletePopoverAnchor_hkxx4_56{pointer-events:none;width:1px;height:1px;position:absolute;top:100%;right:0}
1
+ ._deletePopover_1c8ll_2{width:17rem;margin:0}._deletePopover_1c8ll_2 ._footer_1c8ll_6{gap:var(--space-2);justify-content:flex-end;display:flex}._headerContainer_1kmrp_29{gap:var(--space-4);justify-content:space-between;align-items:center;width:100%;display:flex;position:relative}._headerContainer_1kmrp_29 ._information_1kmrp_37{gap:var(--space-2);justify-content:flex-start;align-items:center;width:100%;display:flex}._headerContainer_1kmrp_29 ._information_1kmrp_37 ._textContainer_1kmrp_44{word-break:break-all;overflow-wrap:break-word;width:fit-content;min-width:0;max-width:100%;overflow:hidden}._headerContainer_1kmrp_29 ._information_1kmrp_37 ._textContainer_1kmrp_44 ._author_1kmrp_52{-webkit-line-clamp:1;-webkit-box-orient:vertical;width:fit-content;display:-webkit-box;overflow:hidden}._headerContainer_1kmrp_29 ._optionsMenu_1kmrp_59{gap:var(--space-1);opacity:0;align-items:center;transition:opacity .1s;display:flex;position:relative}[data-message-wrapper]:hover ._headerContainer_1kmrp_29 ._optionsMenu_1kmrp_59,[data-message-wrapper]:focus-within ._headerContainer_1kmrp_29 ._optionsMenu_1kmrp_59{opacity:1}@media (pointer:coarse),(hover:none){._headerContainer_1kmrp_29 ._optionsMenu_1kmrp_59{opacity:1}}._headerContainer_1kmrp_29 ._optionsMenu_1kmrp_59[data-state=open]{opacity:1}._headerContainer_1kmrp_29 ._deletePopoverAnchorWrapper_1kmrp_78{width:0;height:0;position:absolute;bottom:0;right:0}._headerContainer_1kmrp_29 ._deletePopoverAnchor_1kmrp_78{pointer-events:none;width:1px;height:1px;position:absolute;top:100%;right:0}
@@ -1 +1 @@
1
- ._mention_1cdf1_5{vertical-align:baseline;cursor:pointer;pointer-events:auto;color:var(--box-blue-100)!important}
1
+ ._mention_hc7gc_27{vertical-align:baseline;cursor:pointer;pointer-events:auto;color:var(--box-blue-100)!important}
@@ -1 +1 @@
1
- ._editorDisabled_1nmfa_7{opacity:.5}._editorDisabled_1nmfa_7 ._editor_1nmfa_7{pointer-events:none}._messageEditor_1nmfa_14{position:relative}._messageEditor_1nmfa_14 ._errorMessage_1nmfa_17{gap:var(--space-1);padding-top:var(--space-2);align-items:center;display:flex}._messageEditor_1nmfa_14 ._errorMessage_1nmfa_17 ._errorText_1nmfa_23{color:var(--text-text-destructive-on-light)}._messageEditor_1nmfa_14 ._actionsContainer_1nmfa_26{gap:var(--space-3);width:100%;margin-top:var(--space-2);justify-content:flex-end;display:flex}._editorContainer_1nmfa_34{position:relative}._editorContainer_1nmfa_34 ._editor_1nmfa_7{scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent}@supports not (scrollbar-color:gray transparent){._editorContainer_1nmfa_34 ._editor_1nmfa_7{scrollbar-width:initial}._editorContainer_1nmfa_34 ._editor_1nmfa_7::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._editorContainer_1nmfa_34 ._editor_1nmfa_7::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._editorContainer_1nmfa_34 ._editor_1nmfa_7::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._editorContainer_1nmfa_34 ._editor_1nmfa_7{box-sizing:border-box;min-height:var(--size-20);max-height:8.75rem;padding:.625rem var(--space-3);border-radius:var(--radius-2);outline:var(--border-1) solid var(--border-input-border);overflow-y:auto}._editorContainer_1nmfa_34 ._editor_1nmfa_7:focus{outline-width:var(--border-2);outline-color:var(--border-input-border-focus)}._editorContainer_1nmfa_34._editorError_1nmfa_73 ._editor_1nmfa_7,._editorContainer_1nmfa_34._editorError_1nmfa_73 ._editor_1nmfa_7:focus{outline-width:var(--border-2);outline-color:var(--border-input-border-error)}._anchorElement_1nmfa_82{width:100%;position:absolute;top:100%;left:0}
1
+ ._editorDisabled_ng6un_29{opacity:.5}._editorDisabled_ng6un_29 ._editor_ng6un_29{pointer-events:none}._messageEditor_ng6un_36{position:relative}._messageEditor_ng6un_36 ._errorMessage_ng6un_39{gap:var(--space-1);padding-top:var(--space-2);align-items:center;display:flex}._messageEditor_ng6un_36 ._errorMessage_ng6un_39 ._errorText_ng6un_45{color:var(--text-text-destructive-on-light)}._messageEditor_ng6un_36 ._actionsContainer_ng6un_48{gap:var(--space-3);width:100%;margin-top:var(--space-2);justify-content:flex-end;display:flex}._editorContainer_ng6un_56{position:relative}._editorContainer_ng6un_56 ._editor_ng6un_29{scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent}@supports not (scrollbar-color:gray transparent){._editorContainer_ng6un_56 ._editor_ng6un_29{scrollbar-width:initial}._editorContainer_ng6un_56 ._editor_ng6un_29::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._editorContainer_ng6un_56 ._editor_ng6un_29::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._editorContainer_ng6un_56 ._editor_ng6un_29::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._editorContainer_ng6un_56 ._editor_ng6un_29{box-sizing:border-box;min-height:var(--size-20);max-height:8.75rem;padding:.625rem var(--space-3);border-radius:var(--radius-2);outline:var(--border-1) solid var(--border-input-border);overflow-y:auto}._editorContainer_ng6un_56 ._editor_ng6un_29:focus{outline-width:var(--border-2);outline-color:var(--border-input-border-focus)}._editorContainer_ng6un_56._editorError_ng6un_95 ._editor_ng6un_29,._editorContainer_ng6un_56._editorError_ng6un_95 ._editor_ng6un_29:focus{outline-width:var(--border-2);outline-color:var(--border-input-border-error)}._anchorElement_ng6un_104{width:100%;position:absolute;top:100%;left:0}
@@ -1 +1 @@
1
- ._messageEditorWrapper_12g8n_7{cursor:auto;width:100%}._editActionsColumn_12g8n_12{align-items:flex-end;gap:var(--bp-space-010);flex-direction:column;display:flex}._editActionsRow_12g8n_19{align-items:center;gap:var(--bp-space-020);display:flex}._characterLimitCounter_12g8n_25{white-space:nowrap}._characterLimitCounter_12g8n_25._characterLimitCounterExceeded_12g8n_28{font-weight:var(--font-weights-bold)}._messageEditor_12g8n_7{--gradient-fade-height:var(--bp-size-040);box-sizing:border-box;padding:.625rem var(--bp-space-005) .625rem var(--bp-space-040);background-color:var(--surface-surface);outline:var(--bp-border-01) solid var(--border-divider-border);border-radius:var(--bp-radius-10);gap:var(--bp-space-020) var(--bp-space-010);cursor:auto;flex-wrap:wrap;width:100%;display:flex;position:relative}._messageEditor_12g8n_7._editorEditMode_12g8n_46{--gradient-fade-height:var(--bp-size-050)}._messageEditor_12g8n_7:focus-within{outline-width:var(--bp-border-02);outline-color:var(--border-input-border-focus)}._messageEditor_12g8n_7._editorFirstAnnotation_12g8n_53:not(._editorError_12g8n_53):focus-within{outline-width:var(--bp-border-01);outline-color:var(--border-divider-border)}._messageEditor_12g8n_7._editorError_12g8n_53{outline-color:var(--bp-border-message-border-error);outline-width:var(--bp-border-02)}._messageEditor_12g8n_7 ._editorViewport_12g8n_61{width:fit-content;min-width:calc(100% - 2.875rem);margin:auto 0;position:relative}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent;position:relative;overflow-y:scroll}@supports not (scrollbar-color:gray transparent){._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67{scrollbar-width:initial}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67{max-height:10rem;padding:.375rem .625rem .375rem 0}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67 ._editor_12g8n_46{outline:none;width:100%}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67 ._editor_12g8n_46 [data-placeholder]:first-child:before{font-family:var(--font-families-sans);font-size:var(--bp-font-size-05);font-weight:var(--font-weights-regular);line-height:var(--bp-font-line-height-04);letter-spacing:var(--bp-font-letter-spacing-01);color:var(--text-text-on-light-tertiary);content:attr(data-placeholder);float:left;pointer-events:none;height:0}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorFade_12g8n_113{height:var(--bp-size-060);background:linear-gradient(to bottom, transparent, var(--bp-canvas-background,var(--surface-surface)));pointer-events:none;opacity:1;transition:opacity .15s ease-out;position:absolute;bottom:0;left:0;right:0}._messageEditor_12g8n_7 ._editorViewport_12g8n_61 ._editorFade_12g8n_113._editorFadeHidden_12g8n_124{opacity:0}._messageEditor_12g8n_7 ._editorFullWidth_12g8n_127{width:100%;min-width:100%}._messageEditor_12g8n_7 ._actionsWrapper_12g8n_131{min-height:var(--bp-size-080);width:fit-content;padding-right:var(--bp-space-020);flex:1;justify-content:flex-end;align-items:center;display:flex;position:relative}._messageEditor_12g8n_7 ._actionsWrapper_12g8n_131 ._actionsWrapperInner_12g8n_141{align-items:center;gap:var(--bp-space-020);width:fit-content;display:flex;position:relative}._messageEditor_12g8n_7 ._timestampToggle_12g8n_148{margin-right:auto}._messageEditor_12g8n_7 ._errorMessage_12g8n_151{gap:var(--bp-space-010);align-items:center;min-width:0;display:flex}._messageEditor_12g8n_7 ._errorMessage_12g8n_151>:first-child{flex-shrink:0}._messageEditor_12g8n_7 ._errorMessage_12g8n_151 ._errorText_12g8n_160{color:var(--bp-text-text-destructive-on-light);-webkit-line-clamp:1;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}._editorHasScroll_12g8n_169{gap:unset;padding-bottom:0}._editorHasScroll_12g8n_169 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67{padding-bottom:var(--bp-space-040);scroll-padding-bottom:var(--bp-space-040)}._editorHasScroll_12g8n_169 ._editorViewport_12g8n_61 ._editorFade_12g8n_113{display:none}._editorHasScroll_12g8n_169._editorCharacterLimitExceeded_12g8n_180 ._editorViewport_12g8n_61 ._editorContainer_12g8n_67{padding-bottom:calc(var(--gradient-fade-height,var(--bp-size-040)) + var(--bp-space-040));scroll-padding-bottom:calc(var(--gradient-fade-height,var(--bp-size-040)) + var(--bp-space-040))}._editorHasScroll_12g8n_169 ._actionsWrapper_12g8n_131{min-width:100%;height:1.875rem;padding-right:0}._editorHasScroll_12g8n_169 ._actionsWrapper_12g8n_131 ._actionsWrapperInner_12g8n_141{bottom:.625rem;left:0;right:var(--bp-space-020);pointer-events:none;background:linear-gradient(to bottom, #fff0 10%, #ffffffbf 18%, #fffffff7 28%, var(--bp-canvas-background,var(--surface-surface)) 71%);justify-content:flex-end;width:auto;position:absolute}._editorHasScroll_12g8n_169 ._actionsWrapper_12g8n_131 ._actionsWrapperInner_12g8n_141>*{pointer-events:auto}._editorHasScroll_12g8n_169 ._actionsWrapper_12g8n_131 ._actionsWrapperInner_12g8n_141._characterLimitExceeded_12g8n_202{padding-top:var(--gradient-fade-height,var(--bp-size-040))}._editorHasScroll_12g8n_169 ._actionsWrapper_12g8n_131 ._actionsWrapperInner_12g8n_141._scrolledToBottom_12g8n_205{background:0 0}._anchorElement_12g8n_209{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}._messageEditor_12g8n_7 ._actionsWrapper_12g8n_131._withTimestampToggle_12g8n_218,._messageEditor_12g8n_7 ._actionsWrapper_12g8n_131._withTimestampToggle_12g8n_218 ._actionsWrapperInner_12g8n_141{width:100%}
1
+ ._messageEditorWrapper_1hnvj_29{cursor:auto;width:100%}._editActionsColumn_1hnvj_34{align-items:flex-end;gap:var(--bp-space-010);flex-direction:column;display:flex}._editActionsRow_1hnvj_41{align-items:center;gap:var(--bp-space-020);display:flex}._characterLimitCounter_1hnvj_47{white-space:nowrap}._characterLimitCounter_1hnvj_47._characterLimitCounterExceeded_1hnvj_50{font-weight:var(--font-weights-bold)}._messageEditor_1hnvj_29{--gradient-fade-height:var(--bp-size-040);box-sizing:border-box;padding:.625rem var(--bp-space-005) .625rem var(--bp-space-040);background-color:var(--surface-surface);outline:var(--bp-border-01) solid var(--border-divider-border);border-radius:var(--bp-radius-10);gap:var(--bp-space-020) var(--bp-space-010);cursor:auto;flex-wrap:wrap;width:100%;display:flex;position:relative}._messageEditor_1hnvj_29._editorEditMode_1hnvj_68{--gradient-fade-height:var(--bp-size-050)}._messageEditor_1hnvj_29:focus-within{outline-width:var(--bp-border-02);outline-color:var(--border-input-border-focus)}._messageEditor_1hnvj_29._editorFirstAnnotation_1hnvj_75:not(._editorError_1hnvj_75):focus-within{outline-width:var(--bp-border-01);outline-color:var(--border-divider-border)}._messageEditor_1hnvj_29._editorError_1hnvj_75{outline-color:var(--bp-border-message-border-error);outline-width:var(--bp-border-02)}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83{width:fit-content;min-width:calc(100% - 2.875rem);margin:auto 0;position:relative}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent;position:relative;overflow-y:scroll}@supports not (scrollbar-color:gray transparent){._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89{scrollbar-width:initial}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89{max-height:10rem;padding:.375rem .625rem .375rem 0}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89 ._editor_1hnvj_68{outline:none;width:100%}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89 ._editor_1hnvj_68 [data-placeholder]:first-child:before{font-family:var(--font-families-sans);font-size:var(--bp-font-size-05);font-weight:var(--font-weights-regular);line-height:var(--bp-font-line-height-04);letter-spacing:var(--bp-font-letter-spacing-01);color:var(--text-text-on-light-tertiary);content:attr(data-placeholder);float:left;pointer-events:none;height:0}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorFade_1hnvj_135{height:var(--bp-size-060);background:linear-gradient(to bottom, transparent, var(--bp-canvas-background,var(--surface-surface)));pointer-events:none;opacity:1;transition:opacity .15s ease-out;position:absolute;bottom:0;left:0;right:0}._messageEditor_1hnvj_29 ._editorViewport_1hnvj_83 ._editorFade_1hnvj_135._editorFadeHidden_1hnvj_146{opacity:0}._messageEditor_1hnvj_29 ._editorFullWidth_1hnvj_149{width:100%;min-width:100%}._messageEditor_1hnvj_29 ._actionsWrapper_1hnvj_153{min-height:var(--bp-size-080);width:fit-content;padding-right:var(--bp-space-020);flex:1;justify-content:flex-end;align-items:center;display:flex;position:relative}._messageEditor_1hnvj_29 ._actionsWrapper_1hnvj_153 ._actionsWrapperInner_1hnvj_163{align-items:center;gap:var(--bp-space-020);width:fit-content;display:flex;position:relative}._messageEditor_1hnvj_29 ._timestampToggle_1hnvj_170{margin-right:auto}._messageEditor_1hnvj_29 ._errorMessage_1hnvj_173{gap:var(--bp-space-010);align-items:center;min-width:0;display:flex}._messageEditor_1hnvj_29 ._errorMessage_1hnvj_173>:first-child{flex-shrink:0}._messageEditor_1hnvj_29 ._errorMessage_1hnvj_173 ._errorText_1hnvj_182{color:var(--bp-text-text-destructive-on-light);-webkit-line-clamp:1;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}._editorHasScroll_1hnvj_191{gap:unset;padding-bottom:0}._editorHasScroll_1hnvj_191 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89{padding-bottom:var(--bp-space-040);scroll-padding-bottom:var(--bp-space-040)}._editorHasScroll_1hnvj_191 ._editorViewport_1hnvj_83 ._editorFade_1hnvj_135{display:none}._editorHasScroll_1hnvj_191._editorCharacterLimitExceeded_1hnvj_202 ._editorViewport_1hnvj_83 ._editorContainer_1hnvj_89{padding-bottom:calc(var(--gradient-fade-height,var(--bp-size-040)) + var(--bp-space-040));scroll-padding-bottom:calc(var(--gradient-fade-height,var(--bp-size-040)) + var(--bp-space-040))}._editorHasScroll_1hnvj_191 ._actionsWrapper_1hnvj_153{min-width:100%;height:1.875rem;padding-right:0}._editorHasScroll_1hnvj_191 ._actionsWrapper_1hnvj_153 ._actionsWrapperInner_1hnvj_163{bottom:.625rem;left:0;right:var(--bp-space-020);pointer-events:none;background:linear-gradient(to bottom, #fff0 10%, #ffffffbf 18%, #fffffff7 28%, var(--bp-canvas-background,var(--surface-surface)) 71%);justify-content:flex-end;width:auto;position:absolute}._editorHasScroll_1hnvj_191 ._actionsWrapper_1hnvj_153 ._actionsWrapperInner_1hnvj_163>*{pointer-events:auto}._editorHasScroll_1hnvj_191 ._actionsWrapper_1hnvj_153 ._actionsWrapperInner_1hnvj_163._characterLimitExceeded_1hnvj_224{padding-top:var(--gradient-fade-height,var(--bp-size-040))}._editorHasScroll_1hnvj_191 ._actionsWrapper_1hnvj_153 ._actionsWrapperInner_1hnvj_163._scrolledToBottom_1hnvj_227{background:0 0}._anchorElement_1hnvj_231{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}._messageEditor_1hnvj_29 ._actionsWrapper_1hnvj_153._withTimestampToggle_1hnvj_240,._messageEditor_1hnvj_29 ._actionsWrapper_1hnvj_153._withTimestampToggle_1hnvj_240 ._actionsWrapperInner_1hnvj_163{width:100%}
@@ -1 +1 @@
1
- ._headerContainer_1jcw4_7{gap:var(--space-4);justify-content:space-between;align-items:center;width:100%;display:flex;position:relative}._headerContainer_1jcw4_7 ._information_1jcw4_15{gap:var(--space-4);justify-content:flex-start;align-items:center;width:100%;display:flex}._headerContainer_1jcw4_7 ._information_1jcw4_15 ._textContainer_1jcw4_22{word-break:break-all;overflow-wrap:break-word;width:100%;min-width:0;max-width:100%;overflow:hidden}._headerContainer_1jcw4_7 ._information_1jcw4_15 ._textContainer_1jcw4_22 ._author_1jcw4_30{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}._headerContainer_1jcw4_7 ._deleteAction_1jcw4_36{opacity:0;transition:opacity .1s}[data-message-wrapper]:hover ._headerContainer_1jcw4_7 ._deleteAction_1jcw4_36,[data-message-wrapper]:focus-within ._headerContainer_1jcw4_7 ._deleteAction_1jcw4_36{opacity:1}@media (pointer:coarse),(hover:none){._headerContainer_1jcw4_7 ._deleteAction_1jcw4_36{opacity:1}}._headerContainer_1jcw4_7 ._deleteAction_1jcw4_36[data-state=open]{opacity:1}
1
+ ._headerContainer_18dlz_29{gap:var(--space-4);justify-content:space-between;align-items:center;width:100%;display:flex;position:relative}._headerContainer_18dlz_29 ._information_18dlz_37{gap:var(--space-4);justify-content:flex-start;align-items:center;width:100%;display:flex}._headerContainer_18dlz_29 ._information_18dlz_37 ._textContainer_18dlz_44{word-break:break-all;overflow-wrap:break-word;width:100%;min-width:0;max-width:100%;overflow:hidden}._headerContainer_18dlz_29 ._information_18dlz_37 ._textContainer_18dlz_44 ._author_18dlz_52{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}._headerContainer_18dlz_29 ._deleteAction_18dlz_58{opacity:0;transition:opacity .1s}[data-message-wrapper]:hover ._headerContainer_18dlz_29 ._deleteAction_18dlz_58,[data-message-wrapper]:focus-within ._headerContainer_18dlz_29 ._deleteAction_18dlz_58{opacity:1}@media (pointer:coarse),(hover:none){._headerContainer_18dlz_29 ._deleteAction_18dlz_58{opacity:1}}._headerContainer_18dlz_29 ._deleteAction_18dlz_58[data-state=open]{opacity:1}
@@ -1 +1 @@
1
- ._messagesViewWrapper_gor1q_7{z-index:0;width:100%;position:relative}._messagesViewWrapper_gor1q_7._overflowing_gor1q_12 ._scrollable_gor1q_12{padding-bottom:var(--space-4)}._messagesViewWrapper_gor1q_7._withEditorBelow_gor1q_15{margin-bottom:-1.125rem}._messagesView_gor1q_7{width:100%;height:100%;padding-top:var(--space-1);padding-bottom:var(--bp-border-02);padding-left:var(--space-1);flex-direction:column;display:flex}._messagesView_gor1q_7._scrollable_gor1q_12{max-height:27rem;margin-right:calc(-1 * var(--space-3) + .125rem);padding-right:calc(var(--space-3) - .125rem);scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent;overflow:hidden auto}@supports not (scrollbar-color:gray transparent){._messagesView_gor1q_7._scrollable_gor1q_12{scrollbar-width:initial}._messagesView_gor1q_7._scrollable_gor1q_12::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messagesView_gor1q_7._scrollable_gor1q_12::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messagesView_gor1q_7._scrollable_gor1q_12::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._messagesView_gor1q_7 ._repliesContainer_gor1q_56{flex-direction:column;width:100%;display:flex}._messagesFade_gor1q_62{z-index:1;height:var(--size-8);background:linear-gradient(to bottom, transparent, var(--fade-bg,var(--surface-surface)));pointer-events:none;position:absolute;bottom:0;left:0;right:0}
1
+ ._messagesViewWrapper_1awp7_29{z-index:0;width:100%;position:relative}._messagesViewWrapper_1awp7_29._overflowing_1awp7_34 ._scrollable_1awp7_34{padding-bottom:var(--space-4)}._messagesViewWrapper_1awp7_29._withEditorBelow_1awp7_37{margin-bottom:-1.125rem}._messagesView_1awp7_29{width:100%;height:100%;padding-top:var(--space-1);padding-bottom:var(--bp-border-02);padding-left:var(--space-1);flex-direction:column;display:flex}._messagesView_1awp7_29._scrollable_1awp7_34{max-height:27rem;margin-right:calc(-1 * var(--space-3) + .125rem);padding-right:calc(var(--space-3) - .125rem);scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent;overflow:hidden auto}@supports not (scrollbar-color:gray transparent){._messagesView_1awp7_29._scrollable_1awp7_34{scrollbar-width:initial}._messagesView_1awp7_29._scrollable_1awp7_34::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messagesView_1awp7_29._scrollable_1awp7_34::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messagesView_1awp7_29._scrollable_1awp7_34::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._messagesView_1awp7_29 ._repliesContainer_1awp7_78{flex-direction:column;width:100%;display:flex}._messagesFade_1awp7_84{z-index:1;height:var(--size-8);background:linear-gradient(to bottom, transparent, var(--fade-bg,var(--surface-surface)));pointer-events:none;position:absolute;bottom:0;left:0;right:0}
@@ -1 +1 @@
1
- ._resolvedState_12vpz_7{gap:var(--space-3);padding-left:var(--space-05);align-items:flex-start;width:100%;display:flex}._leftContainer_12vpz_15{flex-shrink:0}._rightContainer_12vpz_19{flex-direction:column;min-width:0;display:flex;overflow:hidden}._rightContainer_12vpz_19 ._statusLine_12vpz_25{gap:var(--space-1);text-overflow:ellipsis;white-space:nowrap;align-items:baseline;display:flex;overflow:hidden}._rightContainer_12vpz_19 ._statusLine_12vpz_25 ._authorName_12vpz_33{-webkit-line-clamp:1;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}._rightContainer_12vpz_19 ._statusLine_12vpz_25 ._statusText_12vpz_40{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
1
+ ._resolvedState_1ts95_29{gap:var(--space-3);padding-left:var(--space-05);align-items:flex-start;width:100%;display:flex}._leftContainer_1ts95_37{flex-shrink:0}._rightContainer_1ts95_41{flex-direction:column;min-width:0;display:flex;overflow:hidden}._rightContainer_1ts95_41 ._statusLine_1ts95_47{gap:var(--space-1);text-overflow:ellipsis;white-space:nowrap;align-items:baseline;display:flex;overflow:hidden}._rightContainer_1ts95_41 ._statusLine_1ts95_47 ._authorName_1ts95_55{-webkit-line-clamp:1;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}._rightContainer_1ts95_41 ._statusLine_1ts95_47 ._statusText_1ts95_62{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
@@ -1 +1 @@
1
- ._textMessage_1nzt2_7{flex-direction:column;flex:1;width:100%;height:100%;display:flex;position:relative;overflow:visible}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16{gap:var(--space-2);margin-top:.125rem;display:flex}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._threadedIndicator_1nzt2_21{width:var(--space-7);flex-shrink:0;position:relative}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._threadedIndicator_1nzt2_21:after{content:"";left:50%;top:var(--space-05);bottom:var(--space-05);width:var(--border-2);background-color:var(--border-divider-border);border-radius:var(--radius-1);position:absolute;transform:translate(-50%)}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._threadedIndicatorHidden_1nzt2_37:after{visibility:hidden}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._messageContent_1nzt2_40{overflow-wrap:break-word;flex-direction:column;flex:1;min-width:0;display:flex}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._messageContent_1nzt2_40 ._inlineEditSlot_1nzt2_47{margin-top:var(--space-2)}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._messageContent_1nzt2_40 ._annotationBadgeWrapper_1nzt2_50{min-width:0;max-width:100%;padding-bottom:var(--space-1);flex-direction:column;align-items:flex-start;display:flex;overflow:hidden}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._messageFooter_1nzt2_59{align-items:center;gap:var(--space-1);padding-bottom:var(--space-2);margin-top:var(--space-1);flex-direction:row;display:flex}._textMessage_1nzt2_7 ._contentWrapper_1nzt2_16 ._messageFooter_1nzt2_59 ._readableTimeWrapper_1nzt2_67{cursor:auto}._replyButton_1nzt2_71{padding-top:var(--space-05);padding-bottom:var(--space-05);opacity:0;transition:opacity .1s}[data-message-wrapper]:hover ._replyButton_1nzt2_71,[data-message-wrapper]:focus-within ._replyButton_1nzt2_71{opacity:1}@media (pointer:coarse),(hover:none){._replyButton_1nzt2_71{opacity:1}}._seeMoreButton_1nzt2_86{margin-inline-start:var(--bp-space-010)}
1
+ ._textMessage_1mths_29{flex-direction:column;flex:1;width:100%;height:100%;display:flex;position:relative;overflow:visible}._textMessage_1mths_29 ._contentWrapper_1mths_38{gap:var(--space-2);margin-top:.125rem;display:flex}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._threadedIndicator_1mths_43{width:var(--space-7);flex-shrink:0;position:relative}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._threadedIndicator_1mths_43:after{content:"";left:50%;top:var(--space-05);bottom:var(--space-05);width:var(--border-2);background-color:var(--border-divider-border);border-radius:var(--radius-1);position:absolute;transform:translate(-50%)}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._threadedIndicatorHidden_1mths_59:after{visibility:hidden}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._messageContent_1mths_62{overflow-wrap:break-word;flex-direction:column;flex:1;min-width:0;display:flex}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._messageContent_1mths_62 ._inlineEditSlot_1mths_69{margin-top:var(--space-2)}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._messageContent_1mths_62 ._annotationBadgeWrapper_1mths_72{min-width:0;max-width:100%;padding-bottom:var(--space-1);flex-direction:column;align-items:flex-start;display:flex;overflow:hidden}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._messageFooter_1mths_81{align-items:center;gap:var(--space-1);padding-bottom:var(--space-2);margin-top:var(--space-1);flex-direction:row;display:flex}._textMessage_1mths_29 ._contentWrapper_1mths_38 ._messageFooter_1mths_81 ._readableTimeWrapper_1mths_89{cursor:auto}._replyButton_1mths_93{padding-top:var(--space-05);padding-bottom:var(--space-05);opacity:0;transition:opacity .1s}[data-message-wrapper]:hover ._replyButton_1mths_93,[data-message-wrapper]:focus-within ._replyButton_1mths_93{opacity:1}@media (pointer:coarse),(hover:none){._replyButton_1mths_93{opacity:1}}._seeMoreButton_1mths_108{margin-inline-start:var(--bp-space-010)}
@@ -1 +1 @@
1
- ._messagesView_124mt_7{min-height:0;padding-top:var(--size-1);padding-right:var(--size-2);contain:content;scrollbar-gutter:stable;flex:1;position:relative;overflow-y:auto}._messagesView_124mt_7 ._moreRepliesButton_124mt_17{margin-top:var(--space-4)}._messagesView_124mt_7 ._repliesContainer_124mt_20{gap:var(--space-4);width:100%;margin-top:var(--space-6);padding-bottom:var(--space-2);display:flex}._messagesView_124mt_7 ._repliesContainer_124mt_20 ._threadIndicator_124mt_27{width:var(--size-1);background-color:var(--border-divider-border);border-radius:var(--radius-1)}._messagesView_124mt_7 ._repliesContainer_124mt_20 ._virtualizedMessages_124mt_32{flex:1;display:flex;position:relative}._messagesView_124mt_7 ._repliesContainer_124mt_20 ._virtualizedMessages_124mt_32 ._messageWrapper_124mt_37{width:100%;padding-bottom:var(--space-6);position:absolute;top:0;left:0}._messagesView_124mt_7 ._repliesContainer_124mt_20 ._virtualizedMessages_124mt_32 ._messageWrapper_124mt_37:last-child{padding-bottom:0}._messagesView_124mt_7{scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent}@supports not (scrollbar-color:gray transparent){._messagesView_124mt_7{scrollbar-width:initial}._messagesView_124mt_7::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messagesView_124mt_7::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messagesView_124mt_7::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._singleMessageWrapper_124mt_71{overflow-wrap:break-word;width:100%;min-width:0;max-width:100%;overflow:hidden}
1
+ ._messagesView_h8l31_29{min-height:0;padding-top:var(--size-1);padding-right:var(--size-2);contain:content;scrollbar-gutter:stable;flex:1;position:relative;overflow-y:auto}._messagesView_h8l31_29 ._moreRepliesButton_h8l31_39{margin-top:var(--space-4)}._messagesView_h8l31_29 ._repliesContainer_h8l31_42{gap:var(--space-4);width:100%;margin-top:var(--space-6);padding-bottom:var(--space-2);display:flex}._messagesView_h8l31_29 ._repliesContainer_h8l31_42 ._threadIndicator_h8l31_49{width:var(--size-1);background-color:var(--border-divider-border);border-radius:var(--radius-1)}._messagesView_h8l31_29 ._repliesContainer_h8l31_42 ._virtualizedMessages_h8l31_54{flex:1;display:flex;position:relative}._messagesView_h8l31_29 ._repliesContainer_h8l31_42 ._virtualizedMessages_h8l31_54 ._messageWrapper_h8l31_59{width:100%;padding-bottom:var(--space-6);position:absolute;top:0;left:0}._messagesView_h8l31_29 ._repliesContainer_h8l31_42 ._virtualizedMessages_h8l31_54 ._messageWrapper_h8l31_59:last-child{padding-bottom:0}._messagesView_h8l31_29{scrollbar-width:thin;scrollbar-color:var(--black-opacity-50) transparent}@supports not (scrollbar-color:gray transparent){._messagesView_h8l31_29{scrollbar-width:initial}._messagesView_h8l31_29::-webkit-scrollbar{width:var(--size-2);background-color:#0000}._messagesView_h8l31_29::-webkit-scrollbar-thumb{background:var(--black-opacity-50);border-radius:var(--radius-2)}._messagesView_h8l31_29::-webkit-scrollbar-thumb:hover{background:var(--black-opacity-50)}}._singleMessageWrapper_h8l31_93{overflow-wrap:break-word;width:100%;min-width:0;max-width:100%;overflow:hidden}
@@ -7,13 +7,12 @@ export declare const defaultUserSelectorProps: Omit<import('@box/user-selector')
7
7
  export declare const DefaultThreadedAnnotations: (props: ThreadedAnnotationsProps) => import("react/jsx-runtime").JSX.Element;
8
8
  interface InteractiveModuleBaseProps {
9
9
  initialMessages?: TextMessageType[];
10
+ defaultExpanded?: boolean;
10
11
  isEditDisabled?: boolean;
11
12
  isHighlighted?: boolean;
12
13
  isReplyDisabled?: boolean;
13
14
  maxCharacterCount?: number;
14
15
  onCopyLink?: (id: string) => void;
15
- scrollToMessageId?: string;
16
- onScrollToMessageComplete?: (messageId: string, found: boolean) => void;
17
16
  }
18
17
  type InteractiveModuleProps = (InteractiveModuleBaseProps & {
19
18
  isAnnotations: true;
@@ -30,13 +30,6 @@ export type ThreadEvent = {
30
30
  type: 'COLLAPSE';
31
31
  } | {
32
32
  type: 'CLEAR_MENTION';
33
- }
34
- /** Mark a message as the pending scroll target and expand the thread so hidden replies mount. */
35
- | {
36
- type: 'SET_SCROLL_TARGET';
37
- id: string;
38
- } | {
39
- type: 'CLEAR_SCROLL_TARGET';
40
33
  };
41
34
  export interface ThreadedAnnotationsContextValue {
42
35
  viewState: ThreadViewState;
@@ -46,11 +39,6 @@ export interface ThreadedAnnotationsContextValue {
46
39
  * `isEditDisabled` or `collapsed` flip true, or when the id disappears from the messages list.
47
40
  */
48
41
  editingMessageId: string | null;
49
- /**
50
- * Id of the message to scroll into view, or null. Set via SET_SCROLL_TARGET (which also expands
51
- * the thread). Cleared once the scroll runs, or on COLLAPSE / when `collapsed` flips true.
52
- */
53
- scrollTargetMessageId: string | null;
54
42
  /** Whether the component is rendered in annotation mode (scrollable, fixed-height) vs comments mode. */
55
43
  isAnnotations: boolean;
56
44
  /** When true, globally disables replies (hides reply buttons and blocks editor opening on click). */
@@ -44,13 +44,11 @@ interface ThreadedAnnotationsBaseProps {
44
44
  /** When true, collapses the editor and replies panel. */
45
45
  collapsed?: boolean;
46
46
  /**
47
- * Scrolls the message with this id into view (comments mode only). When the message is a
48
- * hidden (middle) reply, the thread expands first so the row mounts. Ignored when the id
49
- * is not in `messages`, or in annotations mode where the messages list scrolls internally.
47
+ * When true, the thread mounts expanded (all replies visible, editor open unless replies are
48
+ * disabled) instead of collapsed. Initial state only — changing it after mount has no effect,
49
+ * and `collapsed` always wins. Threads with no messages always mount expanded.
50
50
  */
51
- scrollToMessageId?: string;
52
- /** Called after a scroll attempt. `found` is false when `scrollToMessageId` was not in the DOM. */
53
- onScrollToMessageComplete?: (messageId: string, found: boolean) => void;
51
+ defaultExpanded?: boolean;
54
52
  /** When true, applies a visual highlight (border + background tint) to the thread card. Not a focus state. */
55
53
  isHighlighted?: boolean;
56
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/threaded-annotations",
3
- "version": "3.2.3",
3
+ "version": "4.0.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "dependencies": {
6
6
  "@floating-ui/dom": "^1.6.0",
@@ -17,23 +17,23 @@
17
17
  "uuid": "^9.0.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@box/blueprint-web": "^16.7.0",
21
- "@box/blueprint-web-assets": "^5.4.1",
22
- "@box/collaboration-popover": "^2.1.21",
23
- "@box/readable-time": "^2.1.21",
24
- "@box/user-selector": "^2.1.22",
20
+ "@box/blueprint-web": "^16.7.1",
21
+ "@box/blueprint-web-assets": "^5.4.2",
22
+ "@box/collaboration-popover": "^2.1.22",
23
+ "@box/readable-time": "^2.1.22",
24
+ "@box/user-selector": "^2.1.23",
25
25
  "clsx": "^1.2.1",
26
26
  "react": "^18.0.0",
27
27
  "react-dom": "^18.0.0",
28
28
  "react-intl": "^6.4.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@box/blueprint-web": "^16.7.0",
32
- "@box/blueprint-web-assets": "^5.4.1",
31
+ "@box/blueprint-web": "^16.7.1",
32
+ "@box/blueprint-web-assets": "^5.4.2",
33
33
  "@box/eslint-plugin-blueprint": "2.1.9",
34
- "@box/readable-time": "^2.1.21",
35
- "@box/storybook-utils": "^1.1.20",
36
- "@box/user-selector": "^2.1.22",
34
+ "@box/readable-time": "^2.1.22",
35
+ "@box/storybook-utils": "^1.1.21",
36
+ "@box/user-selector": "^2.1.23",
37
37
  "react": "^18.0.0",
38
38
  "react-dom": "^18.0.0"
39
39
  },
@@ -1,37 +0,0 @@
1
- import { useThreadedAnnotationsContext as e } from "../threaded-annotations-context.js";
2
- import { useEffect as t, useLayoutEffect as n } from "react";
3
- var r = ({ containerRef: r, messages: i, scrollToMessageId: a, onScrollToMessageComplete: o }) => {
4
- let { scrollTargetMessageId: s, dispatch: c, isAnnotations: l } = e();
5
- t(() => {
6
- if (!(l || !a)) {
7
- if (!i.some((e) => e.id === a)) {
8
- o?.(a, !1);
9
- return;
10
- }
11
- c({
12
- type: "SET_SCROLL_TARGET",
13
- id: a
14
- });
15
- }
16
- }, [
17
- l,
18
- a,
19
- i,
20
- c,
21
- o
22
- ]), n(() => {
23
- if (l || !s) return;
24
- let e = r.current?.querySelector(`[data-message-id="${CSS.escape(s)}"]`);
25
- e?.scrollIntoView({
26
- behavior: "smooth",
27
- block: "nearest"
28
- }), o?.(s, !!e), c({ type: "CLEAR_SCROLL_TARGET" });
29
- }, [
30
- l,
31
- s,
32
- c,
33
- o,
34
- r
35
- ]);
36
- };
37
- export { r as useScrollToMessage };
@@ -1,24 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { TextMessageType } from '../types/message-types';
3
- interface UseScrollToMessageProps {
4
- /** Scroll container that holds the message elements (`[data-message-id]`). */
5
- containerRef: RefObject<HTMLElement | null>;
6
- /** Messages in the thread; used to ignore unknown `scrollToMessageId` values. */
7
- messages: TextMessageType[];
8
- /**
9
- * Id of the message to scroll into view. Setting it expands the thread (so hidden replies
10
- * mount) and then scrolls the matching element into view. Ignored when not in `messages`.
11
- * Only active in comments mode (no internal messages scroll); ignored in annotations mode.
12
- */
13
- scrollToMessageId?: string;
14
- /** Called after a scroll attempt. `found` is false when the id was not in the DOM. */
15
- onScrollToMessageComplete?: (messageId: string, found: boolean) => void;
16
- }
17
- /**
18
- * Wires the declarative `scrollToMessageId` prop to the thread's scroll behavior in comments
19
- * mode: registers the target (which expands the thread), then scrolls the matching element
20
- * into view via the nearest outer scroll container. No-op in annotations mode where the
21
- * messages list has its own internal scroll.
22
- */
23
- export declare const useScrollToMessage: ({ containerRef, messages, scrollToMessageId, onScrollToMessageComplete, }: UseScrollToMessageProps) => void;
24
- export {};