@ehfuse/overlay-scrollbar 1.6.11 → 1.6.13

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 KIM YOUNG JIN
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 KIM YOUNG JIN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,120 +1,120 @@
1
- # OverlayScrollbar
2
-
3
- A highly customizable React component that provides a beautiful overlay scrollbar with extensive styling options, interactive features, and smooth animations.
4
-
5
- 다양한 스타일링 옵션, 인터랙티브 기능, 부드러운 애니메이션을 제공하는 고도로 커스터마이징 가능한 React 오버레이 스크롤바 컴포넌트입니다.
6
-
7
- ## 📚 Documentation
8
-
9
- - **[Getting Started (English)](https://github.com/ehfuse/overlay-scrollbar/blob/main/docs/getting-started-en.md)** - Complete setup and usage guide
10
- - **[시작하기 (한국어)](https://github.com/ehfuse/overlay-scrollbar/blob/main/docs/getting-started-ko.md)** - 설치 및 사용법 가이드
11
-
12
- ## ✨ Key Features
13
-
14
- - 🎨 **Fully Customizable** - Control colors, sizes, radius, and positioning
15
- - 🖱️ **Drag Scroll** - Mouse drag scrolling with smart UI library exclusion
16
- - 🏹 **Arrow Navigation** - Optional arrow buttons for precise control
17
- - ⚡ **Smooth Animations** - Fade transitions and hover effects
18
- - 🔍 **Smart Auto-hide** - Intelligent visibility management
19
- - 🧠 **Smart Input Detection** - Excludes interactive elements automatically
20
- - 🤖 **Auto-Detection** - Automatically finds scrollable containers (Virtuoso, react-window, etc.)
21
- - 🔧 **TypeScript** - Complete type definitions
22
- - 🪶 **Zero Dependencies** - Only requires React
23
- - ♿ **Accessible** - Preserves native scroll behavior
24
-
25
- ## ✨ 주요 기능
26
-
27
- - 🎨 **완전한 커스터마이징** - 색상, 크기, 둥근 모서리, 위치 제어
28
- - 🖱️ **드래그 스크롤** - UI 라이브러리 스마트 제외 기능을 가진 마우스 드래그 스크롤
29
- - 🏹 **화살표 내비게이션** - 정밀한 제어를 위한 선택적 화살표 버튼
30
- - ⚡ **부드러운 애니메이션** - 페이드 전환 및 호버 효과
31
- - 🔍 **스마트 자동 숨김** - 지능적인 표시 관리
32
- - 🧠 **스마트 입력 감지** - 인터랙티브 요소 자동 제외
33
- - 🤖 **자동 감지** - 스크롤 가능한 컨테이너 자동 검색 (Virtuoso, react-window 등)
34
- - 🔧 **TypeScript** - 완전한 타입 정의
35
- - 🪶 **의존성 없음** - React만 필요
36
- - ♿ **접근성** - 기본 스크롤 동작 보존
37
-
38
- ## 🚀 Installation
39
-
40
- ```bash
41
- npm install @ehfuse/overlay-scrollbar
42
- # or
43
- yarn add @ehfuse/overlay-scrollbar
44
- ```
45
-
46
- ## 📖 Quick Start
47
-
48
- ```tsx
49
- import React from "react";
50
- import { OverlayScrollbar } from "@ehfuse/overlay-scrollbar";
51
-
52
- function App() {
53
- return (
54
- <div style={{ height: "400px" }}>
55
- <OverlayScrollbar
56
- thumb={{
57
- width: 8,
58
- color: "rgba(100, 100, 100, 0.7)",
59
- }}
60
- dragScroll={{
61
- enabled: true,
62
- excludeClasses: ["no-drag"],
63
- }}
64
- >
65
- <div style={{ height: "1000px" }}>
66
- <p>Your scrollable content here...</p>
67
- <input type="text" placeholder="Auto-excluded from drag" />
68
- </div>
69
- </OverlayScrollbar>
70
- </div>
71
- );
72
- }
73
- ```
74
-
75
- ## 🎯 Main API
76
-
77
- ### Configuration Objects (v1.4.0+)
78
-
79
- ```tsx
80
- interface OverlayScrollbarProps {
81
- children: ReactNode;
82
- className?: string;
83
- style?: React.CSSProperties; // Wrapper div styles
84
- containerStyle?: React.CSSProperties; // Scroll container div styles
85
- contentStyle?: React.CSSProperties; // Inner content div styles
86
- onScroll?: (event: Event) => void;
87
-
88
- // Grouped configuration objects
89
- thumb?: ThumbConfig; // Scrollbar thumb settings
90
- track?: TrackConfig; // Track area settings
91
- arrows?: ArrowsConfig; // Arrow buttons settings
92
- dragScroll?: DragScrollConfig; // Drag scroll settings
93
- autoHide?: AutoHideConfig; // Auto-hide behavior settings
94
-
95
- // General settings
96
- showScrollbar?: boolean; // Show scrollbar (default: true)
97
- }
98
-
99
- interface AutoHideConfig {
100
- enabled?: boolean; // Enable auto-hide (default: true)
101
- delay?: number; // Auto-hide delay (default: 1500ms)
102
- delayOnWheel?: number; // Quick hide after wheel (default: 700ms)
103
- initialDelay?: number; // Delay before showing scrollbar on mount (default: 200ms)
104
- }
105
- ```
106
-
107
- ## 🌍 Browser Support
108
-
109
- - Chrome/Edge: Full support
110
- - Firefox: Full support
111
- - Safari: Full support
112
- - Mobile: Touch scrolling supported
113
-
114
- ## 📄 License
115
-
116
- MIT © [KIM YOUNG JIN](mailto:ehfuse@gmail.com)
117
-
118
- ## 🐛 Issues
119
-
120
- If you find any bugs or have feature requests, please create an issue on [GitHub](https://github.com/ehfuse/overlay-scrollbar/issues).
1
+ # OverlayScrollbar
2
+
3
+ A highly customizable React component that provides a beautiful overlay scrollbar with extensive styling options, interactive features, and smooth animations.
4
+
5
+ 다양한 스타일링 옵션, 인터랙티브 기능, 부드러운 애니메이션을 제공하는 고도로 커스터마이징 가능한 React 오버레이 스크롤바 컴포넌트입니다.
6
+
7
+ ## 📚 Documentation
8
+
9
+ - **[Getting Started (English)](https://github.com/ehfuse/overlay-scrollbar/blob/main/docs/getting-started-en.md)** - Complete setup and usage guide
10
+ - **[시작하기 (한국어)](https://github.com/ehfuse/overlay-scrollbar/blob/main/docs/getting-started-ko.md)** - 설치 및 사용법 가이드
11
+
12
+ ## ✨ Key Features
13
+
14
+ - 🎨 **Fully Customizable** - Control colors, sizes, radius, and positioning
15
+ - 🖱️ **Drag Scroll** - Mouse drag scrolling with smart UI library exclusion
16
+ - 🏹 **Arrow Navigation** - Optional arrow buttons for precise control
17
+ - ⚡ **Smooth Animations** - Fade transitions and hover effects
18
+ - 🔍 **Smart Auto-hide** - Intelligent visibility management
19
+ - 🧠 **Smart Input Detection** - Excludes interactive elements automatically
20
+ - 🤖 **Auto-Detection** - Automatically finds scrollable containers (Virtuoso, react-window, etc.)
21
+ - 🔧 **TypeScript** - Complete type definitions
22
+ - 🪶 **Zero Dependencies** - Only requires React
23
+ - ♿ **Accessible** - Preserves native scroll behavior
24
+
25
+ ## ✨ 주요 기능
26
+
27
+ - 🎨 **완전한 커스터마이징** - 색상, 크기, 둥근 모서리, 위치 제어
28
+ - 🖱️ **드래그 스크롤** - UI 라이브러리 스마트 제외 기능을 가진 마우스 드래그 스크롤
29
+ - 🏹 **화살표 내비게이션** - 정밀한 제어를 위한 선택적 화살표 버튼
30
+ - ⚡ **부드러운 애니메이션** - 페이드 전환 및 호버 효과
31
+ - 🔍 **스마트 자동 숨김** - 지능적인 표시 관리
32
+ - 🧠 **스마트 입력 감지** - 인터랙티브 요소 자동 제외
33
+ - 🤖 **자동 감지** - 스크롤 가능한 컨테이너 자동 검색 (Virtuoso, react-window 등)
34
+ - 🔧 **TypeScript** - 완전한 타입 정의
35
+ - 🪶 **의존성 없음** - React만 필요
36
+ - ♿ **접근성** - 기본 스크롤 동작 보존
37
+
38
+ ## 🚀 Installation
39
+
40
+ ```bash
41
+ npm install @ehfuse/overlay-scrollbar
42
+ # or
43
+ yarn add @ehfuse/overlay-scrollbar
44
+ ```
45
+
46
+ ## 📖 Quick Start
47
+
48
+ ```tsx
49
+ import React from "react";
50
+ import { OverlayScrollbar } from "@ehfuse/overlay-scrollbar";
51
+
52
+ function App() {
53
+ return (
54
+ <div style={{ height: "400px" }}>
55
+ <OverlayScrollbar
56
+ thumb={{
57
+ width: 8,
58
+ color: "rgba(100, 100, 100, 0.7)",
59
+ }}
60
+ dragScroll={{
61
+ enabled: true,
62
+ excludeClasses: ["no-drag"],
63
+ }}
64
+ >
65
+ <div style={{ height: "1000px" }}>
66
+ <p>Your scrollable content here...</p>
67
+ <input type="text" placeholder="Auto-excluded from drag" />
68
+ </div>
69
+ </OverlayScrollbar>
70
+ </div>
71
+ );
72
+ }
73
+ ```
74
+
75
+ ## 🎯 Main API
76
+
77
+ ### Configuration Objects (v1.4.0+)
78
+
79
+ ```tsx
80
+ interface OverlayScrollbarProps {
81
+ children: ReactNode;
82
+ className?: string;
83
+ style?: React.CSSProperties; // Wrapper div styles
84
+ containerStyle?: React.CSSProperties; // Scroll container div styles
85
+ contentStyle?: React.CSSProperties; // Inner content div styles
86
+ onScroll?: (event: Event) => void;
87
+
88
+ // Grouped configuration objects
89
+ thumb?: ThumbConfig; // Scrollbar thumb settings
90
+ track?: TrackConfig; // Track area settings
91
+ arrows?: ArrowsConfig; // Arrow buttons settings
92
+ dragScroll?: DragScrollConfig; // Drag scroll settings
93
+ autoHide?: AutoHideConfig; // Auto-hide behavior settings
94
+
95
+ // General settings
96
+ showScrollbar?: boolean; // Show scrollbar (default: true)
97
+ }
98
+
99
+ interface AutoHideConfig {
100
+ enabled?: boolean; // Enable auto-hide (default: true)
101
+ delay?: number; // Auto-hide delay (default: 1500ms)
102
+ delayOnWheel?: number; // Quick hide after wheel (default: 700ms)
103
+ initialDelay?: number; // Delay before showing scrollbar on mount (default: 200ms)
104
+ }
105
+ ```
106
+
107
+ ## 🌍 Browser Support
108
+
109
+ - Chrome/Edge: Full support
110
+ - Firefox: Full support
111
+ - Safari: Full support
112
+ - Mobile: Touch scrolling supported
113
+
114
+ ## 📄 License
115
+
116
+ MIT © [KIM YOUNG JIN](mailto:ehfuse@gmail.com)
117
+
118
+ ## 🐛 Issues
119
+
120
+ If you find any bugs or have feature requests, please create an issue on [GitHub](https://github.com/ehfuse/overlay-scrollbar/issues).
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,EAMV,SAAS,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qBAAqB,GAAI,yHAQnC,0BAA0B,SAyF5B,CAAC"}
1
+ {"version":3,"file":"useKeyboardNavigation.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardNavigation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,UAAU,0BAA0B;IAChC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,qBAAqB,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAChD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,GAAI,yHAQnC,0BAA0B,SA+F5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollbarInitialization.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollbarInitialization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,UAAU,+BAA+B;IACrC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,wBAAwB,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrE,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,QAAQ,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,0BAA0B,GAAI,uHAQxC,+BAA+B;;CA6HjC,CAAC"}
1
+ {"version":3,"file":"useScrollbarInitialization.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollbarInitialization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,UAAU,+BAA+B;IACrC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,wBAAwB,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrE,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,QAAQ,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,0BAA0B,GAAI,uHAQxC,+BAA+B;;CAqHjC,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import{useRef as E,useEffect as C,useState as p,useCallback as m,useMemo as ie,forwardRef as Mt,useImperativeHandle as St,useLayoutEffect as Et}from"react";var wt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],be=(L,B)=>{let U=L.tagName.toLowerCase(),k=["text","password","email","number","search","tel","url","checkbox","radio"];if(U==="input"){let R=L.type;return k.includes(R)}if(["textarea","select","button"].includes(U)||["svg","path","circle","rect","line","polygon","polyline"].includes(U)||L.getAttribute("contenteditable")==="true")return!0;if(B?.excludeSelectors){for(let R of B.excludeSelectors)if(L.matches(R))return!0}return Tt(L,B)},Tt=(L,B)=>{let U=[...wt,...B?.excludeClasses||[]],k=L,R=0,z=5;for(;k&&R<=z;){if(U.some(T=>k.classList.contains(T)))return!0;if(k.classList.contains("MuiDialogContent-root"))break;k=k.parentElement,R++}return!1};import{jsx as _,jsxs as Ie}from"react/jsx-runtime";var Ct={},Ht={},Dt={},Lt={},kt={},Rt=Mt(({className:L="",style:B={},containerStyle:U={},contentStyle:k={},children:R,onScroll:z,thumb:T=Ct,track:H=Ht,arrows:N=Dt,dragScroll:V=Lt,autoHide:q=kt,showScrollbar:Q=!0,detectInnerScroll:Je=!1},Ke)=>{let Ze=E({});C(()=>{Ze.current={children:R,onScroll:z,showScrollbar:Q,thumb:T,track:H,arrows:N,dragScroll:V,autoHide:q}});let ge=E(null),i=E(null),X=E(null),J=E(null),je=E(null),I=E(null),[ae,y]=p(!1),[A,Ae]=p(!1),[Oe,We]=p(!1),[ve,Ve]=p({y:0,scrollTop:0}),[ee,Qe]=p(0),[et,$e]=p(0),[K,ze]=p(!1),[Ne,Pe]=p(!1),[O,Fe]=p(!1),[ye,tt]=p({x:0,scrollLeft:0}),[xe,ot]=p(0),[we,rt]=p(0),[nt,Te]=p(!1),[P,Me]=p(!1),[W,_e]=p(!1),[te,lt]=p({x:0,y:0,scrollTop:0,scrollLeft:0}),[It,At]=p(null),[ce,se]=p(null),[Ot,it]=p(!1),[at,ct]=p(0),oe=E(null),[Be,Ue]=p(!1),re=E(null),Y=E(null),G=E(null),v=ie(()=>{let e=T.color??"#606060";return{width:T.width??8,minHeight:T.minHeight??50,radius:T.radius??(T.width??8)/2,color:e,opacity:T.opacity??.6,hoverColor:T.hoverColor??e,hoverOpacity:T.hoverOpacity??1}},[T]),r=ie(()=>({width:H.width??16,color:H.color??"rgba(128, 128, 128, 0.1)",visible:H.visible??!0,alignment:H.alignment??"default",radius:H.radius??v.radius??4,margin:H.margin??4,overflowX:H.overflowX??!0,overflowY:H.overflowY??!0}),[H,v.radius]),D=ie(()=>{let e=N.color??"#808080";return{visible:N.visible??!1,step:N.step??50,color:e,opacity:N.opacity??.6,hoverColor:N.hoverColor??e,hoverOpacity:N.hoverOpacity??1}},[N]),Se=ie(()=>({enabled:V.enabled??!0,excludeClasses:V.excludeClasses??[],excludeSelectors:V.excludeSelectors??[]}),[V]),l=ie(()=>({enabled:q.enabled??!0,delay:q.delay??1500,delayOnWheel:q.delayOnWheel??700,initialDelay:q.initialDelay??200}),[q]),[Z,st]=p(()=>(q.initialDelay??200)>0),f=v.width,ut=r.width,Ee=v.minHeight,$=D.visible,ue=D.step,M=m(()=>{if(!i.current)return;let e=document.activeElement;e&&i.current.contains(e)&&e!==i.current||i.current.focus()},[]);St(Ke,()=>({getScrollContainer:()=>i.current,scrollTo:e=>{i.current&&i.current.scrollTo(e)},get scrollTop(){return i.current?.scrollTop||0},get scrollHeight(){return i.current?.scrollHeight||0},get clientHeight(){return i.current?.clientHeight||0}}),[]);let u=m(()=>{if(I.current){let t=I.current;if(document.contains(t)&&t.scrollHeight>t.clientHeight+2)return t;I.current=null}if(!i.current)return null;if(X.current&&X.current.scrollHeight>i.current.clientHeight+2)return I.current=i.current,i.current;if(!Je)return null;let e=i.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==i.current&&o.classList.contains("overlay-scrollbar-container"))continue;let a=o.parentElement,n=!1;for(;a&&a!==i.current;){if(a.classList.contains("overlay-scrollbar-container")&&a!==i.current){n=!0;break}a=a.parentElement}if(!n&&o.scrollHeight>o.clientHeight+2)return I.current=o,o}return null},[]),F=m(()=>u()!==null,[u]),g=m(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),de=m(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null)},[]),qe=m(()=>{G.current&&(clearTimeout(G.current),G.current=null)},[]),dt=m(()=>{de(),!(A||O||W||P)&&(g(),y(!1))},[g,de,A,O,W,P]),h=m(e=>{l.enabled&&(g(),re.current=setTimeout(()=>{y(!1),re.current=null},e))},[g,l.enabled]),s=m(()=>{let e=u();if(!e){y(!1),ze(!1),Te(!1),g();return}if(ze(!0),!J.current)return;!l.enabled&&!Z&&(y(!0),g());let t=e.clientHeight,o=e.scrollHeight,a=e.scrollTop,n=e.clientWidth,c=e.scrollWidth,b=e.scrollLeft,x=0,d=0;if(ge.current){let he=window.getComputedStyle(ge.current),fe=parseFloat(he.paddingTop)||0;d=parseFloat(he.paddingBottom)||0,x=fe+d,ct(d)}let j=$?f*2+r.margin*4:r.margin*2,ne=t-j+x,S=t/o,pe=Math.max(ne*S,Ee),me=o-t,Xe=ne-pe,Ye=me>0?a/me*Xe:0;Qe(pe),$e(Ye);let le=c-n;if(le>0){Te(!0);let he=n/c,fe=Math.max(n*he,50),yt=n-fe,xt=le>0?b/le*yt:0;ot(fe),rt(xt)}else Te(!1)},[u,g,$,f,Ee,l.enabled,Z]),pt=m(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(Ae(!0),Ve({y:e.clientY,scrollTop:t.scrollTop}),g(),y(!0),M())},[u,g,M]),Ce=m(e=>{if(!A)return;let t=u();if(!t)return;let o=t.clientHeight,n=t.scrollHeight-o,c=e.clientY-ve.y,b=o-ee,x=c/b*n,d=Math.max(0,Math.min(n,ve.scrollTop+x));t.scrollTop=d,s()},[A,ve,ee,s,u]),He=m(()=>{Ae(!1),F()&&h(l.delay)},[F,h,l.delay]),mt=m(e=>{if(!J.current)return;let o=J.current.getBoundingClientRect(),a=e.clientY-o.top,n=u();if(!n)return;let c=n.clientHeight,b=n.scrollHeight,d=a/c*(b-c);n.scrollTop=Math.max(0,Math.min(b-c,d)),s(),y(!0),h(l.delay),M()},[s,h,l.delay,u,M]),ht=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current)return;let t=Math.max(0,i.current.scrollTop-ue);i.current.scrollTop=t,s(),y(!0),h(l.delay),M()},[s,h,ue,l.delay,M]),ft=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current||!X.current)return;let t=i.current,a=X.current.scrollHeight-t.clientHeight,n=Math.min(a,t.scrollTop+ue);t.scrollTop=n,s(),y(!0),h(l.delay),M()},[s,h,ue,l.delay,M]),bt=m(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(Fe(!0),tt({x:e.clientX,scrollLeft:t.scrollLeft}),g(),y(!0),M())},[u,g,M]),De=m(e=>{if(!O)return;let t=u();if(!t)return;let o=t.clientWidth,n=t.scrollWidth-o,c=e.clientX-ye.x,b=o-xe,x=c/b*n,d=Math.max(0,Math.min(n,ye.scrollLeft+x));t.scrollLeft=d,s()},[O,ye,xe,s,u]),Le=m(()=>{Fe(!1),F()&&h(l.delay)},[F,h,l.delay]),gt=m(e=>{if(!J.current)return;let o=J.current.getBoundingClientRect(),a=e.clientX-o.left,n=u();if(!n)return;let c=n.clientWidth,b=n.scrollWidth,d=a/c*(b-c);n.scrollLeft=Math.max(0,Math.min(b-c,d)),s(),y(!0),h(l.delay),M()},[s,h,l.delay,u,M]),vt=m(e=>{if(!Se.enabled)return;let t=e.target;if(be(t,Se)||e.button!==0)return;let o=u();o&&(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth||(e.preventDefault(),Me(!0),lt({x:e.clientX,y:e.clientY,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft||0}),g()))},[Se,be,u,g]),ke=m(e=>{if(!P&&!W)return;let t=u();if(!t)return;let o=te.x-e.clientX,a=te.y-e.clientY;if(Math.abs(a)<5&&Math.abs(o)<5)return;P&&(Me(!1),_e(!0)),y(!0);let n=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,te.scrollTop+a)),c=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,te.scrollLeft+o));t.scrollTop=n,t.scrollLeft=c,s()},[P,W,te,u,s]),Re=m(()=>{let e=W;Me(!1),_e(!1),e&&F()&&h(l.delay)},[W,F,h,l.delay]);C(()=>{let e=c=>{if(s(),Z){z&&z(c);return}g(),y(!0),qe();let b=Be?l.delayOnWheel:l.delay;h(b),z&&z(c)},t=()=>{Ue(!0),oe.current&&clearTimeout(oe.current),oe.current=setTimeout(()=>{Ue(!1)},300),qe(),G.current=setTimeout(()=>{y(!0),G.current=null,h(l.delayOnWheel)},50)},o=[],a=u();a&&o.push(a);let n=i.current;return n&&!a&&(o.push(n),n.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(b=>{let x=b;if(x!==n&&x.classList.contains("overlay-scrollbar-container"))return;let d=x.parentElement;for(;d&&d!==n;){if(d.classList.contains("overlay-scrollbar-container")&&d!==n)return;d=d.parentElement}o.push(x)})),o.forEach(c=>{c.addEventListener("scroll",e,{passive:!0}),c.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(c=>{c.removeEventListener("scroll",e),c.removeEventListener("wheel",t)}),oe.current&&clearTimeout(oe.current),G.current&&clearTimeout(G.current)}},[u,s,z,g,h,l,Be,Z]),C(()=>{let e=o=>{let a=o.target;if(o.defaultPrevented||a instanceof Element&&be(a))return;let n=u();if(!n)return;let{key:c}=o,{scrollTop:b,scrollHeight:x,clientHeight:d}=n,j=x-d,ne=50,S=null;switch(c){case"ArrowUp":o.preventDefault(),S=Math.max(0,b-ne);break;case"ArrowDown":o.preventDefault(),S=Math.min(j,b+ne);break;case"PageUp":o.preventDefault(),S=Math.max(0,b-d);break;case"PageDown":o.preventDefault(),S=Math.min(j,b+d);break;case"Home":o.preventDefault(),S=0;break;case"End":o.preventDefault(),S=j;break;default:return}if(S!==null){let pe=S/j,me=$?f*2+r.margin*4:r.margin*2,le=(d-me-ee)*pe;$e(le),n.scrollTop=S,g(),y(!0),h(l.delay)}},t=i.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[u,$,f,r.margin,ee,g,h,l.delay]),C(()=>{if(P||W)return document.addEventListener("mousemove",ke),document.addEventListener("mouseup",Re),()=>{document.removeEventListener("mousemove",ke),document.removeEventListener("mouseup",Re)}},[P,W,ke,Re]),C(()=>{if(A)return document.addEventListener("mousemove",Ce),document.addEventListener("mouseup",He),()=>{document.removeEventListener("mousemove",Ce),document.removeEventListener("mouseup",He)}},[A,Ce,He]),C(()=>{if(O)return document.addEventListener("mousemove",De),document.addEventListener("mouseup",Le),()=>{document.removeEventListener("mousemove",De),document.removeEventListener("mouseup",Le)}},[O,De,Le]),C(()=>{s();let e=setTimeout(()=>{s()},100);return()=>clearTimeout(e)},[s]),Et(()=>{it(!0),s(),!l.enabled&&!Z&&F()&&y(!0)},[F,s,l.enabled,Z]),C(()=>{if(l.initialDelay>0){let e=setTimeout(()=>{st(!1)},l.initialDelay);return()=>clearTimeout(e)}},[l.initialDelay]),C(()=>{let e=new ResizeObserver(()=>{s()}),t=[];return i.current&&t.push(i.current),X.current&&t.push(X.current),I.current&&document.contains(I.current)&&t.push(I.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[s]),C(()=>{if(!i.current)return;let e=new MutationObserver(()=>{I.current=null,s()});return e.observe(i.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[s]);let w=Math.max(ut,f);return C(()=>{let e="overlay-scrollbar-webkit-hide",t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");return o.id=e,o.textContent=`
1
+ import{useRef as E,useEffect as C,useState as h,useCallback as p,useMemo as re,forwardRef as Tt,useImperativeHandle as Mt,useLayoutEffect as St}from"react";var xt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],Re=(L,_)=>{let B=L.tagName.toLowerCase(),k=["text","password","email","number","search","tel","url","checkbox","radio"];if(B==="input"){let R=L.type;return k.includes(R)}if(["textarea","select","button"].includes(B)||["svg","path","circle","rect","line","polygon","polyline"].includes(B)||L.getAttribute("contenteditable")==="true")return!0;if(_?.excludeSelectors){for(let R of _.excludeSelectors)if(L.matches(R))return!0}return wt(L,_)},wt=(L,_)=>{let B=[...xt,..._?.excludeClasses||[]],k=L,R=0,$=5;for(;k&&R<=$;){if(B.some(T=>k.classList.contains(T)))return!0;if(k.classList.contains("MuiDialogContent-root"))break;k=k.parentElement,R++}return!1};import{jsx as F,jsxs as Ie}from"react/jsx-runtime";var Et={},Ct={},Ht={},Dt={},Lt={},kt=Tt(({className:L="",style:_={},containerStyle:B={},contentStyle:k={},children:R,onScroll:$,thumb:T=Et,track:H=Ct,arrows:z=Ht,dragScroll:V=Dt,autoHide:U=Lt,showScrollbar:J=!0,detectInnerScroll:Ge=!1},Ke)=>{let Ze=E({});C(()=>{Ze.current={children:R,onScroll:$,showScrollbar:J,thumb:T,track:H,arrows:z,dragScroll:V,autoHide:U}});let me=E(null),a=E(null),q=E(null),G=E(null),je=E(null),I=E(null),[ne,y]=h(!1),[A,Ae]=h(!1),[Oe,We]=h(!1),[he,Ve]=h({y:0,scrollTop:0}),[Q,Je]=h(0),[Qe,$e]=h(0),[K,ze]=h(!1),[Pe,Ne]=h(!1),[O,Fe]=h(!1),[fe,et]=h({x:0,scrollLeft:0}),[be,tt]=h(0),[ge,ot]=h(0),[rt,ve]=h(!1),Z=E(!1),[P,_e]=h(!1),[ee,nt]=h({x:0,y:0,scrollTop:0,scrollLeft:0}),[Rt,It]=h(null),[le,ie]=h(null),[At,lt]=h(!1),[it,at]=h(0),te=E(null),[Be,Ue]=h(!1),oe=E(null),X=E(null),Y=E(null),g=re(()=>{let e=T.color??"#606060";return{width:T.width??8,minHeight:T.minHeight??50,radius:T.radius??(T.width??8)/2,color:e,opacity:T.opacity??.6,hoverColor:T.hoverColor??e,hoverOpacity:T.hoverOpacity??1}},[T]),r=re(()=>({width:H.width??16,color:H.color??"rgba(128, 128, 128, 0.1)",visible:H.visible??!0,alignment:H.alignment??"default",radius:H.radius??g.radius??4,margin:H.margin??4,overflowX:H.overflowX??!0,overflowY:H.overflowY??!0}),[H,g.radius]),D=re(()=>{let e=z.color??"#808080";return{visible:z.visible??!1,step:z.step??50,color:e,opacity:z.opacity??.6,hoverColor:z.hoverColor??e,hoverOpacity:z.hoverOpacity??1}},[z]),ye=re(()=>({enabled:V.enabled??!0,excludeClasses:V.excludeClasses??[],excludeSelectors:V.excludeSelectors??[]}),[V]),l=re(()=>({enabled:U.enabled??!0,delay:U.delay??1500,delayOnWheel:U.delayOnWheel??700,initialDelay:U.initialDelay??200}),[U]),[j,ct]=h(()=>(U.initialDelay??200)>0),f=g.width,st=r.width,xe=g.minHeight,W=D.visible,ae=D.step,M=p(()=>{if(!a.current)return;let e=document.activeElement;e&&a.current.contains(e)&&e!==a.current||a.current.focus()},[]);Mt(Ke,()=>({getScrollContainer:()=>a.current,scrollTo:e=>{a.current&&a.current.scrollTo(e)},get scrollTop(){return a.current?.scrollTop||0},get scrollHeight(){return a.current?.scrollHeight||0},get clientHeight(){return a.current?.clientHeight||0}}),[]);let u=p(()=>{if(I.current){let t=I.current;if(document.contains(t)&&t.scrollHeight>t.clientHeight+2)return t;I.current=null}if(!a.current)return null;if(q.current&&q.current.scrollHeight>a.current.clientHeight+2)return I.current=a.current,a.current;if(!Ge)return null;let e=a.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==a.current&&o.classList.contains("overlay-scrollbar-container"))continue;let c=o.parentElement,n=!1;for(;c&&c!==a.current;){if(c.classList.contains("overlay-scrollbar-container")&&c!==a.current){n=!0;break}c=c.parentElement}if(!n&&o.scrollHeight>o.clientHeight+2)return I.current=o,o}return null},[]),N=p(()=>u()!==null,[u]),b=p(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),ce=p(()=>{X.current&&(clearTimeout(X.current),X.current=null)},[]),qe=p(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null)},[]),ut=p(()=>{ce(),!(A||O||P||Z.current)&&(b(),y(!1))},[b,ce,A,O,P]),m=p(e=>{l.enabled&&(b(),oe.current=setTimeout(()=>{y(!1),oe.current=null},e))},[b,l.enabled]),s=p(()=>{let e=u();if(!e){y(!1),ze(!1),ve(!1),b();return}if(ze(!0),!G.current)return;!l.enabled&&!j&&(y(!0),b());let t=e.clientHeight,o=e.scrollHeight,c=e.scrollTop,n=e.clientWidth,i=e.scrollWidth,x=e.scrollLeft,v=0,d=0;if(me.current){let de=window.getComputedStyle(me.current),pe=parseFloat(de.paddingTop)||0;d=parseFloat(de.paddingBottom)||0,v=pe+d,at(d)}let se=W?f*2+r.margin*4:r.margin*2,S=t-se+v,He=t/o,ue=Math.max(S*He,xe),De=o-t,Xe=S-ue,Le=De>0?c/De*Xe:0;Je(ue),$e(Le);let ke=i-n;if(ke>0){ve(!0);let de=n/i,pe=Math.max(n*de,50),vt=n-pe,yt=ke>0?x/ke*vt:0;tt(pe),ot(yt)}else ve(!1)},[u,b,W,f,xe,l.enabled,j]),dt=p(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(Ae(!0),Ve({y:e.clientY,scrollTop:t.scrollTop}),b(),y(!0),M())},[u,b,M]),we=p(e=>{if(!A)return;let t=u();if(!t)return;let o=t.clientHeight,n=t.scrollHeight-o,i=e.clientY-he.y,x=o-Q,v=i/x*n,d=Math.max(0,Math.min(n,he.scrollTop+v));t.scrollTop=d,s()},[A,he,Q,s,u]),Te=p(()=>{Ae(!1),N()&&m(l.delay)},[N,m,l.delay]),pt=p(e=>{if(!G.current)return;let o=G.current.getBoundingClientRect(),c=e.clientY-o.top,n=u();if(!n)return;let i=n.clientHeight,x=n.scrollHeight,d=c/i*(x-i);n.scrollTop=Math.max(0,Math.min(x-i,d)),s(),y(!0),m(l.delay),M()},[s,m,l.delay,u,M]),mt=p(e=>{if(e.preventDefault(),e.stopPropagation(),!a.current)return;let t=Math.max(0,a.current.scrollTop-ae);a.current.scrollTop=t,s(),y(!0),m(l.delay),M()},[s,m,ae,l.delay,M]),ht=p(e=>{if(e.preventDefault(),e.stopPropagation(),!a.current||!q.current)return;let t=a.current,c=q.current.scrollHeight-t.clientHeight,n=Math.min(c,t.scrollTop+ae);t.scrollTop=n,s(),y(!0),m(l.delay),M()},[s,m,ae,l.delay,M]),ft=p(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(Fe(!0),et({x:e.clientX,scrollLeft:t.scrollLeft}),b(),y(!0),M())},[u,b,M]),Me=p(e=>{if(!O)return;let t=u();if(!t)return;let o=t.clientWidth,n=t.scrollWidth-o,i=e.clientX-fe.x,x=o-be,v=i/x*n,d=Math.max(0,Math.min(n,fe.scrollLeft+v));t.scrollLeft=d,s()},[O,fe,be,s,u]),Se=p(()=>{Fe(!1),N()&&m(l.delay)},[N,m,l.delay]),bt=p(e=>{if(!G.current)return;let o=G.current.getBoundingClientRect(),c=e.clientX-o.left,n=u();if(!n)return;let i=n.clientWidth,x=n.scrollWidth,d=c/i*(x-i);n.scrollLeft=Math.max(0,Math.min(x-i,d)),s(),y(!0),m(l.delay),M()},[s,m,l.delay,u,M]),gt=p(e=>{if(!ye.enabled)return;let t=e.target;if(Re(t,ye)||e.button!==0)return;let o=u();o&&(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth||(e.preventDefault(),Z.current=!0,nt({x:e.clientX,y:e.clientY,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft||0}),b()))},[ye,Re,u,b]),Ee=p(e=>{if(!Z.current&&!P)return;let t=u();if(!t)return;let o=ee.x-e.clientX,c=ee.y-e.clientY;if(Math.abs(c)<5&&Math.abs(o)<5)return;Z.current&&(Z.current=!1,_e(!0)),y(!0);let n=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,ee.scrollTop+c)),i=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,ee.scrollLeft+o));t.scrollTop=n,t.scrollLeft=i,s()},[P,ee,u,s]),Ce=p(()=>{let e=P;Z.current=!1,_e(!1),e&&N()&&m(l.delay)},[P,N,m,l.delay]);C(()=>{let e=i=>{if(s(),j){$&&$(i);return}b(),y(!0),qe();let x=Be?l.delayOnWheel:l.delay;m(x),$&&$(i)},t=()=>{Ue(!0),te.current&&clearTimeout(te.current),te.current=setTimeout(()=>{Ue(!1)},300),qe(),Y.current=setTimeout(()=>{y(!0),Y.current=null,m(l.delayOnWheel)},50)},o=[],c=u();c&&o.push(c);let n=a.current;return n&&!c&&(o.push(n),n.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(x=>{let v=x;if(v!==n&&v.classList.contains("overlay-scrollbar-container"))return;let d=v.parentElement;for(;d&&d!==n;){if(d.classList.contains("overlay-scrollbar-container")&&d!==n)return;d=d.parentElement}o.push(v)})),o.forEach(i=>{i.addEventListener("scroll",e,{passive:!0}),i.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(i=>{i.removeEventListener("scroll",e),i.removeEventListener("wheel",t)}),te.current&&clearTimeout(te.current),Y.current&&clearTimeout(Y.current)}},[u,s,$,b,m,l,Be,j]),C(()=>{let e=o=>{let c=u();if(!c)return;let{key:n}=o,{scrollTop:i,scrollHeight:x,clientHeight:v}=c,d=x-v,se=50,S=null;switch(n){case"ArrowUp":o.preventDefault(),S=Math.max(0,i-se);break;case"ArrowDown":o.preventDefault(),S=Math.min(d,i+se);break;case"PageUp":o.preventDefault(),S=Math.max(0,i-v);break;case"PageDown":o.preventDefault(),S=Math.min(d,i+v);break;case"Home":o.preventDefault(),S=0;break;case"End":o.preventDefault(),S=d;break;default:return}if(S!==null){let He=S/d,ue=W?f*2+r.margin*4:r.margin*2,Le=(v-ue-Q)*He;$e(Le),c.scrollTop=S,b(),y(!0),m(l.delay)}},t=a.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[u,W,f,r.margin,Q,b,m,l.delay]),C(()=>(document.addEventListener("mousemove",Ee),document.addEventListener("mouseup",Ce),()=>{document.removeEventListener("mousemove",Ee),document.removeEventListener("mouseup",Ce)}),[P,Ee,Ce]),C(()=>{if(A)return document.addEventListener("mousemove",we),document.addEventListener("mouseup",Te),()=>{document.removeEventListener("mousemove",we),document.removeEventListener("mouseup",Te)}},[A,we,Te]),C(()=>{if(O)return document.addEventListener("mousemove",Me),document.addEventListener("mouseup",Se),()=>{document.removeEventListener("mousemove",Me),document.removeEventListener("mouseup",Se)}},[O,Me,Se]),C(()=>{s();let e=setTimeout(()=>{s()},100);return()=>clearTimeout(e)},[s]),St(()=>{lt(!0),s(),!l.enabled&&!j&&N()&&y(!0)},[N,s,l.enabled,j]),C(()=>{if(l.initialDelay>0){let e=setTimeout(()=>{ct(!1)},l.initialDelay);return()=>clearTimeout(e)}},[l.initialDelay]),C(()=>{let e=new ResizeObserver(()=>{s()}),t=[];return a.current&&t.push(a.current),q.current&&t.push(q.current),I.current&&document.contains(I.current)&&t.push(I.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[s]),C(()=>{if(!a.current)return;let e=new MutationObserver(()=>{I.current=null,s()});return e.observe(a.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[s]);let w=Math.max(st,f);return C(()=>{let e="overlay-scrollbar-webkit-hide",t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");return o.id=e,o.textContent=`
2
2
  /* \uBAA8\uB4E0 \uC2A4\uD06C\uB864\uBC14 \uC228\uAE30\uAE30 */
3
3
  .overlay-scrollbar-container {
4
4
  scrollbar-width: none !important;
@@ -38,13 +38,5 @@ import{useRef as E,useEffect as C,useState as p,useCallback as m,useMemo as ie,f
38
38
  .overlay-scrollbar-container .ehfuse-editor-content::-webkit-scrollbar-thumb:hover {
39
39
  background: #a1a1a1 !important;
40
40
  }
41
- .overlay-scrollbar-container:focus {
42
- outline: 2px solid rgba(0, 123, 255, 0.3);
43
- outline-offset: -2px;
44
- }
45
- .overlay-scrollbar-container:focus-visible {
46
- outline: 2px solid rgba(0, 123, 255, 0.5);
47
- outline-offset: -2px;
48
- }
49
- `,document.head.appendChild(o),()=>{let a=document.getElementById(e);a&&a.remove()}},[]),Ie("div",{ref:ge,className:`overlay-scrollbar-wrapper ${L}`,onMouseLeave:dt,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"hidden",...B},children:[_("div",{ref:i,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:vt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:P||W?"none":"auto",...U},children:_("div",{ref:X,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...k},children:R})}),Q&&K&&(r.overflowY??!0)&&Ie("div",{ref:J,className:"overlay-scrollbar-track",onMouseEnter:()=>{g(),Y.current=setTimeout(()=>{y(!0),Y.current=null},100)},onMouseLeave:()=>{de(),A||h(l.delay)},style:{position:"absolute",top:0,right:0,width:`${w}px`,height:"100%",opacity:ae?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&_("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),mt(e)},style:{position:"absolute",top:$?`${v.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-v.width)/2}px`,width:`${v.width}px`,height:$?`calc(100% - ${v.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),_("div",{ref:je,className:"overlay-scrollbar-thumb",onMouseDown:pt,onMouseEnter:()=>We(!0),onMouseLeave:()=>We(!1),style:{position:"absolute",top:`${($?f+r.margin*2:r.margin)+et}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${Math.max(ee,Ee)}px`,backgroundColor:Oe||A?v.hoverColor:v.color,opacity:Oe||A?v.hoverOpacity:v.opacity,borderRadius:`${v.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),Q&&K&&$&&_("div",{className:"overlay-scrollbar-up-arrow",onClick:ht,onMouseEnter:()=>se("up"),onMouseLeave:()=>se(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${f}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(f*.75,8)}px`,color:ce==="up"?D.hoverColor:D.color,userSelect:"none",zIndex:1001,opacity:ae?ce==="up"?D.hoverOpacity:D.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),Q&&K&&$&&_("div",{className:"overlay-scrollbar-down-arrow",onClick:ft,onMouseEnter:()=>se("down"),onMouseLeave:()=>se(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${f}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(f*.75,8)}px`,color:ce==="down"?D.hoverColor:D.color,userSelect:"none",zIndex:1001,opacity:ae?ce==="down"?D.hoverOpacity:D.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),Q&&nt&&(r.overflowX??!0)&&Ie("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{g(),Y.current=setTimeout(()=>{y(!0),Y.current=null},100)},onMouseLeave:()=>{de(),O||h(l.delay)},style:{position:"absolute",bottom:`${at}px`,left:0,width:"100%",height:`${w}px`,opacity:ae?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&_("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),gt(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(w-f)/2}px`,left:`${r.margin}px`,right:K?r.alignment==="outside"?`${w-r.margin}px`:`${w}px`:`${r.margin}px`,height:`${f}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),_("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:bt,onMouseEnter:()=>Pe(!0),onMouseLeave:()=>Pe(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(w-f)/2}px`,left:`${r.margin+we}px`,right:K?r.alignment==="outside"?`${w-r.margin}px`:`${w}px`:"auto",maxWidth:K?r.alignment==="outside"?`calc(100% - ${r.margin+we+w-r.margin}px)`:`calc(100% - ${r.margin+we+w}px)`:"none",width:`${Math.max(xe,50)}px`,height:`${f}px`,backgroundColor:Ne||O?v.hoverColor:v.color,opacity:Ne||O?v.hoverOpacity:v.opacity,borderRadius:`${v.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]})]})}),Ge=Rt;export{Ge as OverlayScrollbar,Ge as default};
41
+ `,document.head.appendChild(o),()=>{let c=document.getElementById(e);c&&c.remove()}},[]),Ie("div",{ref:me,className:`overlay-scrollbar-wrapper ${L}`,onMouseLeave:ut,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"hidden",..._},children:[F("div",{ref:a,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:gt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:P?"none":"auto",...B},children:F("div",{ref:q,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...k},children:R})}),J&&K&&(r.overflowY??!0)&&Ie("div",{ref:G,className:"overlay-scrollbar-track",onMouseEnter:()=>{b(),X.current=setTimeout(()=>{y(!0),X.current=null},100)},onMouseLeave:()=>{ce(),A||m(l.delay)},style:{position:"absolute",top:0,right:0,width:`${w}px`,height:"100%",opacity:ne?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&F("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),pt(e)},style:{position:"absolute",top:W?`${g.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-g.width)/2}px`,width:`${g.width}px`,height:W?`calc(100% - ${g.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),F("div",{ref:je,className:"overlay-scrollbar-thumb",onMouseDown:dt,onMouseEnter:()=>We(!0),onMouseLeave:()=>We(!1),style:{position:"absolute",top:`${(W?f+r.margin*2:r.margin)+Qe}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${Math.max(Q,xe)}px`,backgroundColor:Oe||A?g.hoverColor:g.color,opacity:Oe||A?g.hoverOpacity:g.opacity,borderRadius:`${g.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),J&&K&&W&&F("div",{className:"overlay-scrollbar-up-arrow",onClick:mt,onMouseEnter:()=>ie("up"),onMouseLeave:()=>ie(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${f}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(f*.75,8)}px`,color:le==="up"?D.hoverColor:D.color,userSelect:"none",zIndex:1001,opacity:ne?le==="up"?D.hoverOpacity:D.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),J&&K&&W&&F("div",{className:"overlay-scrollbar-down-arrow",onClick:ht,onMouseEnter:()=>ie("down"),onMouseLeave:()=>ie(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(w-f)/2}px`,width:`${f}px`,height:`${f}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(f*.75,8)}px`,color:le==="down"?D.hoverColor:D.color,userSelect:"none",zIndex:1001,opacity:ne?le==="down"?D.hoverOpacity:D.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),J&&rt&&(r.overflowX??!0)&&Ie("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{b(),X.current=setTimeout(()=>{y(!0),X.current=null},100)},onMouseLeave:()=>{ce(),O||m(l.delay)},style:{position:"absolute",bottom:`${it}px`,left:0,width:"100%",height:`${w}px`,opacity:ne?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&F("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),bt(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(w-f)/2}px`,left:`${r.margin}px`,right:K?r.alignment==="outside"?`${w-r.margin}px`:`${w}px`:`${r.margin}px`,height:`${f}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),F("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:ft,onMouseEnter:()=>Ne(!0),onMouseLeave:()=>Ne(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(w-f)/2}px`,left:`${r.margin+ge}px`,right:K?r.alignment==="outside"?`${w-r.margin}px`:`${w}px`:"auto",maxWidth:K?r.alignment==="outside"?`calc(100% - ${r.margin+ge+w-r.margin}px)`:`calc(100% - ${r.margin+ge+w}px)`:"none",width:`${Math.max(be,50)}px`,height:`${f}px`,backgroundColor:Pe||O?g.hoverColor:g.color,opacity:Pe||O?g.hoverOpacity:g.opacity,borderRadius:`${g.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]})]})}),Ye=kt;export{Ye as OverlayScrollbar,Ye as default};
50
42
  //# sourceMappingURL=index.esm.js.map