@daeryun/dr_components 0.9.65 → 0.9.67

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.
@@ -19,7 +19,6 @@ import ChatConversationHeader from './ChatConversationItem/ChatConversationHeade
19
19
  import ChatLoading from './ChatItem/ChatLoading';
20
20
  import { useWindowSize } from './_hooks/useWindowSize';
21
21
  import TypingComp from './ChatItem/TypingComp';
22
- import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
23
22
  const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose, isHash }) => {
24
23
  var _a, _b;
25
24
  const { getNextMessageList, isNextPage, inquiryStatus, messages, isLoading, inquiryMainData, messageObject, workFlowBack, workFlowStack, chatInquiryNumber, isTyping } = useDaeryuntalk();
@@ -38,7 +37,7 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
38
37
  // 이후
39
38
  const messagesContainerRef = useRef(null);
40
39
  const messagesEndRef = useRef(null);
41
- const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
40
+ // const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
42
41
  useEffect(() => {
43
42
  var _a;
44
43
  if (!mobileBottomRef.current || !pcBottomRef.current)
@@ -220,11 +219,14 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
220
219
  {/* 여기서 isMpblie일때 위에 2개 헤더부분이랑 아래 메시지 입력이랑 높이를 빼서 넣어야한ㄷ */}
221
220
  <div ref={messagesContainerRef} className={`
222
221
  ${isMobile ? `${isLoading ? ' pb-[50px]' : ''} mx-[20px] overflow-y-auto ` : 'flex- ml-[20px] mr-[5px] xs:pb-[100px] '} overlay-scrollbar overflow-auto pt-[20px]
223
- `} style={Object.assign({ height: isMobile
222
+ `} style={{
223
+ height: isMobile
224
224
  ? `calc(100vh - ${bottomHeight}px - ${((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0}px)`
225
225
  : bottomHeight && headerRef.current
226
226
  ? `calc(100% - ${bottomHeight}px - ${(_b = headerRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight}px)`
227
- : '100%' }, (!isMobile ? hoverStyle : {}))}>
227
+ : '100%' // fallback
228
+ // ...(!isMobile ? hoverStyle : {})
229
+ }}>
228
230
  {messages.length === 0 ? (<div className="dr_talk_body_medium2 flex h-full flex-col items-center justify-center text-center text-drTalkGrayscale1">
229
231
  <p>문의하실 내용을 입력해 주세요.</p>
230
232
  <p className="mt-2 text-sm">24시간 운영하고 있습니다.</p>
@@ -65,7 +65,7 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
65
65
  const messagesContainerRef = useRef<HTMLDivElement>(null);
66
66
  const messagesEndRef = useRef<HTMLDivElement>(null);
67
67
 
68
- const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
68
+ // const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
69
69
 
70
70
  useEffect(() => {
71
71
  if (!mobileBottomRef.current || !pcBottomRef.current) return;
@@ -307,8 +307,8 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
307
307
  ? `calc(100vh - ${bottomHeight}px - ${headerRef.current?.offsetHeight || 0}px)`
308
308
  : bottomHeight && headerRef.current
309
309
  ? `calc(100% - ${bottomHeight}px - ${headerRef.current?.offsetHeight}px)`
310
- : '100%', // fallback
311
- ...(!isMobile ? hoverStyle : {})
310
+ : '100%' // fallback
311
+ // ...(!isMobile ? hoverStyle : {})
312
312
  }}
313
313
  >
314
314
  {messages.length === 0 ? (
@@ -1,12 +1,12 @@
1
1
  import { RefObject, CSSProperties } from 'react';
2
- type MaybeRef = RefObject<HTMLElement> | undefined;
3
2
  /**
4
3
  * useHoverScrollbar (scrollbar-gutter 완전 해결)
5
4
  * - scrollbar-gutter: stable로 항상 스크롤바 공간 확보
6
5
  * - 가로 밀림 현상 완전 방지
7
6
  */
8
- export declare function useHoverScrollbar(refParam?: MaybeRef): {
9
- ref: RefObject<HTMLDivElement> | null;
7
+ type MaybeDivRef = RefObject<HTMLDivElement> | undefined;
8
+ export declare function useHoverScrollbar(refParam?: MaybeDivRef): {
9
+ ref: RefObject<HTMLDivElement>;
10
10
  style: CSSProperties;
11
11
  };
12
12
  export {};
@@ -1,10 +1,5 @@
1
1
  // useHoverScrollbar.ts
2
2
  import { useRef, useState, useEffect } from 'react';
3
- /**
4
- * useHoverScrollbar (scrollbar-gutter 완전 해결)
5
- * - scrollbar-gutter: stable로 항상 스크롤바 공간 확보
6
- * - 가로 밀림 현상 완전 방지
7
- */
8
3
  export function useHoverScrollbar(refParam) {
9
4
  const localRef = useRef(null);
10
5
  const ref = refParam || localRef;
@@ -1,17 +1,14 @@
1
1
  // useHoverScrollbar.ts
2
2
  import { useRef, useState, useEffect, RefObject, CSSProperties } from 'react';
3
3
 
4
- type MaybeRef = RefObject<HTMLElement> | undefined;
5
-
6
4
  /**
7
5
  * useHoverScrollbar (scrollbar-gutter 완전 해결)
8
6
  * - scrollbar-gutter: stable로 항상 스크롤바 공간 확보
9
7
  * - 가로 밀림 현상 완전 방지
10
8
  */
11
- export function useHoverScrollbar(refParam?: MaybeRef): {
12
- ref: RefObject<HTMLDivElement> | null;
13
- style: CSSProperties;
14
- } {
9
+ type MaybeDivRef = RefObject<HTMLDivElement> | undefined;
10
+
11
+ export function useHoverScrollbar(refParam?: MaybeDivRef): { ref: RefObject<HTMLDivElement>; style: CSSProperties } {
15
12
  const localRef = useRef<HTMLDivElement>(null);
16
13
  const ref = (refParam as RefObject<HTMLDivElement>) || localRef;
17
14