@nexus-cross/design-system 1.0.3-beta.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.
Files changed (256) hide show
  1. package/cursor-rules/nexus-project-setup.mdc +188 -0
  2. package/cursor-rules/nexus-ui-api.mdc +698 -0
  3. package/cursor-rules/nexus-ui-components.mdc +104 -0
  4. package/dist/accordion.d.mts +28 -0
  5. package/dist/accordion.d.ts +28 -0
  6. package/dist/accordion.js +28 -0
  7. package/dist/accordion.mjs +3 -0
  8. package/dist/avatar.d.mts +17 -0
  9. package/dist/avatar.d.ts +17 -0
  10. package/dist/avatar.js +16 -0
  11. package/dist/avatar.mjs +3 -0
  12. package/dist/button.d.mts +15 -0
  13. package/dist/button.d.ts +15 -0
  14. package/dist/button.js +16 -0
  15. package/dist/button.mjs +3 -0
  16. package/dist/carousel.d.mts +36 -0
  17. package/dist/carousel.d.ts +36 -0
  18. package/dist/carousel.js +32 -0
  19. package/dist/carousel.mjs +3 -0
  20. package/dist/checkbox.d.mts +21 -0
  21. package/dist/checkbox.d.ts +21 -0
  22. package/dist/checkbox.js +20 -0
  23. package/dist/checkbox.mjs +3 -0
  24. package/dist/chip.d.mts +16 -0
  25. package/dist/chip.d.ts +16 -0
  26. package/dist/chip.js +16 -0
  27. package/dist/chip.mjs +3 -0
  28. package/dist/chunks/chunk-22ULI3BF.js +21 -0
  29. package/dist/chunks/chunk-2JTPRBHZ.mjs +36 -0
  30. package/dist/chunks/chunk-377KBJQG.js +74 -0
  31. package/dist/chunks/chunk-3CHRUKSJ.mjs +120 -0
  32. package/dist/chunks/chunk-4ITJA3IS.mjs +83 -0
  33. package/dist/chunks/chunk-4J3GCZ7W.mjs +102 -0
  34. package/dist/chunks/chunk-53A2SL62.js +218 -0
  35. package/dist/chunks/chunk-54IA2P2Z.mjs +40 -0
  36. package/dist/chunks/chunk-5I2VRWWU.js +172 -0
  37. package/dist/chunks/chunk-5TBXVD56.js +88 -0
  38. package/dist/chunks/chunk-6DZVNFVY.js +82 -0
  39. package/dist/chunks/chunk-6FHK6CBR.js +117 -0
  40. package/dist/chunks/chunk-6H7V2I3X.mjs +270 -0
  41. package/dist/chunks/chunk-6MRM5K2N.js +106 -0
  42. package/dist/chunks/chunk-6NTASYZO.js +132 -0
  43. package/dist/chunks/chunk-76CY4STF.js +165 -0
  44. package/dist/chunks/chunk-76K6KXCT.js +100 -0
  45. package/dist/chunks/chunk-7MT3QYE6.js +92 -0
  46. package/dist/chunks/chunk-7OEK2KX3.mjs +81 -0
  47. package/dist/chunks/chunk-AKIBUO5A.mjs +83 -0
  48. package/dist/chunks/chunk-AOVU67NI.mjs +139 -0
  49. package/dist/chunks/chunk-AOXXE5UQ.mjs +14 -0
  50. package/dist/chunks/chunk-AWBGWBFS.js +135 -0
  51. package/dist/chunks/chunk-AZ2URLDD.js +39 -0
  52. package/dist/chunks/chunk-BEA727LO.mjs +108 -0
  53. package/dist/chunks/chunk-C3E7CSKG.mjs +115 -0
  54. package/dist/chunks/chunk-C6H2UNOX.js +83 -0
  55. package/dist/chunks/chunk-CVYXRSXT.mjs +8 -0
  56. package/dist/chunks/chunk-EIOP4DOE.mjs +292 -0
  57. package/dist/chunks/chunk-FA2OPP3U.mjs +140 -0
  58. package/dist/chunks/chunk-FHPHDK3O.mjs +89 -0
  59. package/dist/chunks/chunk-FKHW7QYG.js +725 -0
  60. package/dist/chunks/chunk-FKZI2HTI.js +104 -0
  61. package/dist/chunks/chunk-G4XJG7XI.js +66 -0
  62. package/dist/chunks/chunk-GMIGQ5VP.mjs +86 -0
  63. package/dist/chunks/chunk-GSLIY6WW.js +109 -0
  64. package/dist/chunks/chunk-HHXDOKXY.js +108 -0
  65. package/dist/chunks/chunk-HUPAHDJ7.js +273 -0
  66. package/dist/chunks/chunk-I252NERB.mjs +21 -0
  67. package/dist/chunks/chunk-I7YJB2F5.js +143 -0
  68. package/dist/chunks/chunk-IB5UCYQY.mjs +66 -0
  69. package/dist/chunks/chunk-IJG7J2VU.mjs +148 -0
  70. package/dist/chunks/chunk-INP2AH3B.js +27 -0
  71. package/dist/chunks/chunk-IUNNTSD2.mjs +195 -0
  72. package/dist/chunks/chunk-JNMCYWGY.js +10 -0
  73. package/dist/chunks/chunk-JZ3PWHKS.mjs +51 -0
  74. package/dist/chunks/chunk-KWPIEHD2.mjs +78 -0
  75. package/dist/chunks/chunk-LBKBCI2K.mjs +44 -0
  76. package/dist/chunks/chunk-LVTD2UQN.mjs +48 -0
  77. package/dist/chunks/chunk-MPKRXMCJ.js +93 -0
  78. package/dist/chunks/chunk-NCQDOPBR.mjs +86 -0
  79. package/dist/chunks/chunk-NHDGKOAM.js +104 -0
  80. package/dist/chunks/chunk-OTGS6BDQ.mjs +25 -0
  81. package/dist/chunks/chunk-Q2TMXHPK.js +178 -0
  82. package/dist/chunks/chunk-Q7GQVAYY.js +88 -0
  83. package/dist/chunks/chunk-Q7H6LCNN.js +169 -0
  84. package/dist/chunks/chunk-QJNQCLMV.js +25 -0
  85. package/dist/chunks/chunk-QK6NCII4.js +36 -0
  86. package/dist/chunks/chunk-RLP3U52D.mjs +153 -0
  87. package/dist/chunks/chunk-T2IY2TSR.js +43 -0
  88. package/dist/chunks/chunk-TLTEUIBY.js +112 -0
  89. package/dist/chunks/chunk-TPBKQ3WC.js +303 -0
  90. package/dist/chunks/chunk-TR5JBBEA.mjs +116 -0
  91. package/dist/chunks/chunk-TWHDXCKR.js +61 -0
  92. package/dist/chunks/chunk-U56AGSLE.mjs +106 -0
  93. package/dist/chunks/chunk-U6KOUYWX.mjs +66 -0
  94. package/dist/chunks/chunk-U76LT5GE.js +70 -0
  95. package/dist/chunks/chunk-UDQXLI5Y.mjs +81 -0
  96. package/dist/chunks/chunk-UH667FUK.mjs +712 -0
  97. package/dist/chunks/chunk-UR6JOKVB.mjs +65 -0
  98. package/dist/chunks/chunk-VH5FF6DZ.mjs +38 -0
  99. package/dist/chunks/chunk-WJ2OVQD3.mjs +105 -0
  100. package/dist/chunks/chunk-WNFJ4NJN.mjs +55 -0
  101. package/dist/chunks/chunk-WSWD5ZUJ.js +106 -0
  102. package/dist/chunks/chunk-XALPBGSC.mjs +23 -0
  103. package/dist/chunks/chunk-XEHFB62A.js +82 -0
  104. package/dist/chunks/chunk-YEGPB7A7.js +83 -0
  105. package/dist/chunks/chunk-YEWKPWK3.mjs +80 -0
  106. package/dist/chunks/chunk-Z7OKV6NW.mjs +59 -0
  107. package/dist/chunks/chunk-ZCMKIB5U.js +140 -0
  108. package/dist/client-only.d.mts +13 -0
  109. package/dist/client-only.d.ts +13 -0
  110. package/dist/client-only.js +11 -0
  111. package/dist/client-only.mjs +2 -0
  112. package/dist/countdown.d.mts +27 -0
  113. package/dist/countdown.d.ts +27 -0
  114. package/dist/countdown.js +16 -0
  115. package/dist/countdown.mjs +3 -0
  116. package/dist/counter.d.mts +15 -0
  117. package/dist/counter.d.ts +15 -0
  118. package/dist/counter.js +11 -0
  119. package/dist/counter.mjs +2 -0
  120. package/dist/divider.d.mts +14 -0
  121. package/dist/divider.d.ts +14 -0
  122. package/dist/divider.js +16 -0
  123. package/dist/divider.mjs +3 -0
  124. package/dist/drawer.d.mts +42 -0
  125. package/dist/drawer.d.ts +42 -0
  126. package/dist/drawer.js +44 -0
  127. package/dist/drawer.mjs +3 -0
  128. package/dist/ellipsis.d.mts +16 -0
  129. package/dist/ellipsis.d.ts +16 -0
  130. package/dist/ellipsis.js +12 -0
  131. package/dist/ellipsis.mjs +3 -0
  132. package/dist/error-boundary.d.mts +20 -0
  133. package/dist/error-boundary.d.ts +20 -0
  134. package/dist/error-boundary.js +11 -0
  135. package/dist/error-boundary.mjs +2 -0
  136. package/dist/hooks/useCheckDevice.d.mts +47 -0
  137. package/dist/hooks/useCheckDevice.d.ts +47 -0
  138. package/dist/hooks/useCheckDevice.js +8 -0
  139. package/dist/hooks/useCheckDevice.mjs +2 -0
  140. package/dist/hooks/useClickOutside.d.mts +12 -0
  141. package/dist/hooks/useClickOutside.d.ts +12 -0
  142. package/dist/hooks/useClickOutside.js +8 -0
  143. package/dist/hooks/useClickOutside.mjs +2 -0
  144. package/dist/hooks/useDraggableBottomSheet.d.mts +24 -0
  145. package/dist/hooks/useDraggableBottomSheet.d.ts +24 -0
  146. package/dist/hooks/useDraggableBottomSheet.js +11 -0
  147. package/dist/hooks/useDraggableBottomSheet.mjs +2 -0
  148. package/dist/hooks/useDraggableWindow.d.mts +21 -0
  149. package/dist/hooks/useDraggableWindow.d.ts +21 -0
  150. package/dist/hooks/useDraggableWindow.js +11 -0
  151. package/dist/hooks/useDraggableWindow.mjs +2 -0
  152. package/dist/hooks/useInView.d.mts +14 -0
  153. package/dist/hooks/useInView.d.ts +14 -0
  154. package/dist/hooks/useInView.js +17 -0
  155. package/dist/hooks/useInView.mjs +2 -0
  156. package/dist/hooks/useModal.d.mts +2 -0
  157. package/dist/hooks/useModal.d.ts +2 -0
  158. package/dist/hooks/useModal.js +11 -0
  159. package/dist/hooks/useModal.mjs +2 -0
  160. package/dist/index.d.mts +74 -0
  161. package/dist/index.d.ts +74 -0
  162. package/dist/index.js +633 -0
  163. package/dist/index.mjs +227 -0
  164. package/dist/infinite-scroll.d.mts +26 -0
  165. package/dist/infinite-scroll.d.ts +26 -0
  166. package/dist/infinite-scroll.js +12 -0
  167. package/dist/infinite-scroll.mjs +3 -0
  168. package/dist/marquee.d.mts +12 -0
  169. package/dist/marquee.d.ts +12 -0
  170. package/dist/marquee.js +12 -0
  171. package/dist/marquee.mjs +3 -0
  172. package/dist/modal/index.d.mts +87 -0
  173. package/dist/modal/index.d.ts +87 -0
  174. package/dist/modal/index.js +54 -0
  175. package/dist/modal/index.mjs +9 -0
  176. package/dist/number-input.d.mts +21 -0
  177. package/dist/number-input.d.ts +21 -0
  178. package/dist/number-input.js +16 -0
  179. package/dist/number-input.mjs +3 -0
  180. package/dist/pagination.d.mts +21 -0
  181. package/dist/pagination.d.ts +21 -0
  182. package/dist/pagination.js +20 -0
  183. package/dist/pagination.mjs +3 -0
  184. package/dist/popover.d.mts +25 -0
  185. package/dist/popover.d.ts +25 -0
  186. package/dist/popover.js +32 -0
  187. package/dist/popover.mjs +3 -0
  188. package/dist/radio-group.d.mts +29 -0
  189. package/dist/radio-group.d.ts +29 -0
  190. package/dist/radio-group.js +24 -0
  191. package/dist/radio-group.mjs +3 -0
  192. package/dist/select.d.mts +31 -0
  193. package/dist/select.d.ts +31 -0
  194. package/dist/select.js +24 -0
  195. package/dist/select.mjs +3 -0
  196. package/dist/spinner.d.mts +9 -0
  197. package/dist/spinner.d.ts +9 -0
  198. package/dist/spinner.js +12 -0
  199. package/dist/spinner.mjs +3 -0
  200. package/dist/styles.css +2 -0
  201. package/dist/styles.d.mts +3 -0
  202. package/dist/styles.d.ts +3 -0
  203. package/dist/styles.js +19 -0
  204. package/dist/styles.mjs +17 -0
  205. package/dist/switch.d.mts +15 -0
  206. package/dist/switch.d.ts +15 -0
  207. package/dist/switch.js +16 -0
  208. package/dist/switch.mjs +3 -0
  209. package/dist/tab.d.mts +36 -0
  210. package/dist/tab.d.ts +36 -0
  211. package/dist/tab.js +20 -0
  212. package/dist/tab.mjs +3 -0
  213. package/dist/table.d.mts +80 -0
  214. package/dist/table.d.ts +80 -0
  215. package/dist/table.js +32 -0
  216. package/dist/table.mjs +3 -0
  217. package/dist/text-area.d.mts +15 -0
  218. package/dist/text-area.d.ts +15 -0
  219. package/dist/text-area.js +16 -0
  220. package/dist/text-area.mjs +3 -0
  221. package/dist/text-input.d.mts +17 -0
  222. package/dist/text-input.d.ts +17 -0
  223. package/dist/text-input.js +16 -0
  224. package/dist/text-input.mjs +3 -0
  225. package/dist/theme-provider.d.mts +25 -0
  226. package/dist/theme-provider.d.ts +25 -0
  227. package/dist/theme-provider.js +15 -0
  228. package/dist/theme-provider.mjs +2 -0
  229. package/dist/toast.d.mts +42 -0
  230. package/dist/toast.d.ts +42 -0
  231. package/dist/toast.js +20 -0
  232. package/dist/toast.mjs +3 -0
  233. package/dist/tooltip.d.mts +24 -0
  234. package/dist/tooltip.d.ts +24 -0
  235. package/dist/tooltip.js +20 -0
  236. package/dist/tooltip.mjs +3 -0
  237. package/dist/typography.d.mts +19 -0
  238. package/dist/typography.d.ts +19 -0
  239. package/dist/typography.js +102 -0
  240. package/dist/typography.mjs +79 -0
  241. package/dist/useModal-BsGIcP8t.d.mts +128 -0
  242. package/dist/useModal-BsGIcP8t.d.ts +128 -0
  243. package/dist/utils/cn.d.mts +15 -0
  244. package/dist/utils/cn.d.ts +15 -0
  245. package/dist/utils/cn.js +11 -0
  246. package/dist/utils/cn.mjs +2 -0
  247. package/dist/utils/scroll.d.mts +4 -0
  248. package/dist/utils/scroll.d.ts +4 -0
  249. package/dist/utils/scroll.js +15 -0
  250. package/dist/utils/scroll.mjs +2 -0
  251. package/dist/virtual-scroll.d.mts +34 -0
  252. package/dist/virtual-scroll.d.ts +34 -0
  253. package/dist/virtual-scroll.js +16 -0
  254. package/dist/virtual-scroll.mjs +3 -0
  255. package/package.json +271 -0
  256. package/scripts/setup-cursor-rules.cjs +92 -0
@@ -0,0 +1,104 @@
1
+ ---
2
+ description: "@nexus-cross/design-system 공용 컴포넌트 사용 규칙 — AI가 코드 생성 시 반드시 따라야 하는 컴포넌트 사용 지침"
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # @nexus-cross/design-system 컴포넌트 사용 규칙
7
+
8
+ > 이 프로젝트에는 `@nexus-cross/design-system` 디자인 시스템이 설치되어 있다.
9
+ > 코드를 생성할 때 아래 규칙을 반드시 따른다.
10
+
11
+ ## 핵심 원칙
12
+
13
+ 1. **Figma 디자인에 아래 목록에 해당하는 UI 요소가 있으면, 반드시 `@nexus-cross/design-system`에서 import하여 사용한다.**
14
+ 2. **동일 기능의 컴포넌트를 직접 구현하지 않는다.** 예: 직접 `<button className="...">` 대신 `<Button>`을 사용.
15
+ 3. **스타일 커스텀은 `className` prop으로 오버라이드**한다. 래퍼 div를 추가하지 않는다.
16
+ 4. **`asChild` prop**을 지원하는 컴포넌트는 렌더링 요소를 변경할 수 있다.
17
+ 5. **variants 함수만 가져다 쓸 수도 있다** (예: `buttonVariants({ variant: 'primary', size: 'lg' })`).
18
+
19
+ ## 컴포넌트 매핑 가이드
20
+
21
+ | Figma 요소 | 사용할 컴포넌트 | import |
22
+ |---|---|---|
23
+ | 버튼 | `<Button>` | `import { Button } from '@nexus-cross/design-system'` |
24
+ | 텍스트 입력 필드 | `<TextInput>` | `import { TextInput } from '@nexus-cross/design-system'` |
25
+ | 텍스트 영역 | `<TextArea>` | `import { TextArea } from '@nexus-cross/design-system'` |
26
+ | 셀렉트/드롭다운 | `<Select>` + `<SelectItem>` | `import { Select, SelectItem } from '@nexus-cross/design-system'` |
27
+ | 체크박스 | `<CheckBox>` | `import { CheckBox } from '@nexus-cross/design-system'` |
28
+ | 라디오 그룹 | `<RadioGroup>` + `<RadioItem>` | `import { RadioGroup, RadioItem } from '@nexus-cross/design-system'` |
29
+ | 토글/스위치 | `<Switch>` | `import { Switch } from '@nexus-cross/design-system'` |
30
+ | 칩/태그/뱃지 | `<Chip>` | `import { Chip } from '@nexus-cross/design-system'` |
31
+ | 로딩 스피너 | `<Spinner>` | `import { Spinner } from '@nexus-cross/design-system'` |
32
+ | 구분선 | `<Divider>` | `import { Divider } from '@nexus-cross/design-system'` |
33
+ | 툴팁 | `<Tooltip>` | `import { Tooltip } from '@nexus-cross/design-system'` |
34
+ | 팝오버 | `<Popover>` | `import { Popover } from '@nexus-cross/design-system'` |
35
+ | 아코디언/접기 | `<Accordion>` | `import { Accordion } from '@nexus-cross/design-system'` |
36
+ | 드로어/바텀시트 | `<Drawer>` | `import { Drawer } from '@nexus-cross/design-system'` |
37
+ | 모달/다이얼로그 | `openModal()` | `import { openModal } from '@nexus-cross/design-system'` |
38
+ | 토스트/알림 | `toast()` | `import { toast } from '@nexus-cross/design-system'` |
39
+ | 테이블 | `<Table>` | `import { Table, TableRow, TdColumn } from '@nexus-cross/design-system'` |
40
+ | 무한 스크롤 | `<InfiniteScroll>` | `import { InfiniteScroll } from '@nexus-cross/design-system'` |
41
+ | 텍스트 말줄임 | `<Ellipsis>` | `import { Ellipsis } from '@nexus-cross/design-system'` |
42
+ | 페이지네이션 | `<Pagination>` | `import { Pagination } from '@nexus-cross/design-system'` |
43
+ | 숫자 입력 | `<NumberInput>` | `import { NumberInput } from '@nexus-cross/design-system'` |
44
+ | 아바타/프로필 | `<Avatar>` | `import { Avatar } from '@nexus-cross/design-system'` |
45
+ | 숫자 카운트 | `<Counter>` | `import { Counter } from '@nexus-cross/design-system'` |
46
+ | 카운트다운 | `<Countdown>` | `import { Countdown } from '@nexus-cross/design-system'` |
47
+ | 마퀴/흐르는 텍스트 | `<Marquee>` | `import { Marquee } from '@nexus-cross/design-system'` |
48
+ | 탭 | `<Tab>` | `import { Tab } from '@nexus-cross/design-system'` |
49
+ | 캐러셀/슬라이더 | `<Carousel>` | `import { Carousel, CarouselSlide } from '@nexus-cross/design-system'` |
50
+ | 가상 스크롤 리스트 | `<VirtualList>` | `import { VirtualList } from '@nexus-cross/design-system'` |
51
+ | 가상 스크롤 그리드 | `<VirtualGrid>` | `import { VirtualGrid } from '@nexus-cross/design-system'` |
52
+
53
+ ## 유틸리티 & 훅
54
+
55
+ | 기능 | 사용 | import |
56
+ |---|---|---|
57
+ | 클래스 병합 | `cn()` | `import { cn } from '@nexus-cross/design-system'` |
58
+ | 모달 훅 | `useModal()` | `import { useModal } from '@nexus-cross/design-system'` |
59
+ | 뷰포트 감지 | `useInView()` | `import { useInView } from '@nexus-cross/design-system'` |
60
+ | 디바이스 체크 | `useCheckDevice()` | `import { useCheckDevice } from '@nexus-cross/design-system'` |
61
+ | 외부 클릭 | `useClickOutside()` | `import { useClickOutside } from '@nexus-cross/design-system'` |
62
+
63
+ ## asChild 패턴
64
+
65
+ `asChild`를 지원하는 컴포넌트: **Button**, **Chip**
66
+
67
+ ```tsx
68
+ // Button을 <a> 태그로 렌더링
69
+ <Button asChild variant="primary">
70
+ <a href="/about">About</a>
71
+ </Button>
72
+
73
+ // Chip을 <li>로 렌더링
74
+ <Chip asChild variant="accent" size="sm">
75
+ <li>리스트 아이템</li>
76
+ </Chip>
77
+ ```
78
+
79
+ ## variants 함수만 사용하기
80
+
81
+ 컴포넌트를 사용하지 않고 variant 클래스만 필요할 때:
82
+
83
+ ```tsx
84
+ import { buttonVariants } from '@nexus-cross/design-system';
85
+
86
+ // 직접 <a> 태그에 Button 스타일 적용
87
+ <a href="/link" className={buttonVariants({ variant: 'outline', size: 'sm' })}>
88
+ 링크
89
+ </a>
90
+ ```
91
+
92
+ 사용 가능한 variants 함수: `buttonVariants`, `chipVariants`, `switchVariants`, `textInputVariants`, `textAreaVariants`, `checkBoxVariants`, `radioGroupVariants`, `radioItemVariants`, `dividerVariants`, `typographyVariants`, `selectTriggerVariants`, `selectContentVariants`, `tooltipContentVariants`, `popoverContentVariants`, `drawerContentVariants`
93
+
94
+ ## 커스텀이 필요한 경우
95
+
96
+ 1. **스타일만 다를 때**: `className` prop으로 오버라이드
97
+ 2. **variant가 프로젝트 전용일 때**: 프로젝트 래퍼 컴포넌트 생성 (공용 컴포넌트를 내부에서 사용)
98
+ 3. **구조가 완전히 다를 때**: `<button>` 등 네이티브 요소 직접 사용 가능 (강제 아님)
99
+
100
+ ## 금지 사항
101
+
102
+ - `@nexus-cross/design-system`에 이미 있는 컴포넌트를 직접 구현하지 않는다
103
+ - Radix UI, Headless UI 등을 직접 import하여 동일 기능 컴포넌트를 만들지 않는다
104
+ - `@nexus-cross/design-system` 컴포넌트의 내부 구현을 복사하지 않는다
@@ -0,0 +1,28 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as React from 'react';
3
+
4
+ declare const AccordionRoot: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ type AccordionItemData = {
9
+ id: string;
10
+ trigger: React.ReactNode;
11
+ content: React.ReactNode;
12
+ disabled?: boolean;
13
+ className?: string;
14
+ triggerClassName?: string;
15
+ contentClassName?: string;
16
+ };
17
+ interface SimpleAccordionProps {
18
+ items: AccordionItemData[];
19
+ type?: 'single' | 'multiple';
20
+ collapsible?: boolean;
21
+ value?: string | string[];
22
+ defaultValue?: string | string[];
23
+ className?: string;
24
+ onValueChange?: (value: string | string[]) => void;
25
+ }
26
+ declare const Accordion: React.FC<SimpleAccordionProps>;
27
+
28
+ export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger };
@@ -0,0 +1,28 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as React from 'react';
3
+
4
+ declare const AccordionRoot: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ type AccordionItemData = {
9
+ id: string;
10
+ trigger: React.ReactNode;
11
+ content: React.ReactNode;
12
+ disabled?: boolean;
13
+ className?: string;
14
+ triggerClassName?: string;
15
+ contentClassName?: string;
16
+ };
17
+ interface SimpleAccordionProps {
18
+ items: AccordionItemData[];
19
+ type?: 'single' | 'multiple';
20
+ collapsible?: boolean;
21
+ value?: string | string[];
22
+ defaultValue?: string | string[];
23
+ className?: string;
24
+ onValueChange?: (value: string | string[]) => void;
25
+ }
26
+ declare const Accordion: React.FC<SimpleAccordionProps>;
27
+
28
+ export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var chunkMPKRXMCJ_js = require('./chunks/chunk-MPKRXMCJ.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "Accordion", {
10
+ enumerable: true,
11
+ get: function () { return chunkMPKRXMCJ_js.Accordion; }
12
+ });
13
+ Object.defineProperty(exports, "AccordionContent", {
14
+ enumerable: true,
15
+ get: function () { return chunkMPKRXMCJ_js.AccordionContent; }
16
+ });
17
+ Object.defineProperty(exports, "AccordionItem", {
18
+ enumerable: true,
19
+ get: function () { return chunkMPKRXMCJ_js.AccordionItem; }
20
+ });
21
+ Object.defineProperty(exports, "AccordionRoot", {
22
+ enumerable: true,
23
+ get: function () { return chunkMPKRXMCJ_js.AccordionRoot; }
24
+ });
25
+ Object.defineProperty(exports, "AccordionTrigger", {
26
+ enumerable: true,
27
+ get: function () { return chunkMPKRXMCJ_js.AccordionTrigger; }
28
+ });
@@ -0,0 +1,3 @@
1
+ export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger } from './chunks/chunk-U6KOUYWX.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,17 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const avatarVariants: (props?: ({
6
+ size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
7
+ shape?: "circle" | "square" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof avatarVariants> {
10
+ src?: string;
11
+ alt?: string;
12
+ fallback?: React.ReactNode;
13
+ onImageError?: () => void;
14
+ }
15
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
16
+
17
+ export { Avatar, type AvatarProps, avatarVariants };
@@ -0,0 +1,17 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const avatarVariants: (props?: ({
6
+ size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
7
+ shape?: "circle" | "square" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof avatarVariants> {
10
+ src?: string;
11
+ alt?: string;
12
+ fallback?: React.ReactNode;
13
+ onImageError?: () => void;
14
+ }
15
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
16
+
17
+ export { Avatar, type AvatarProps, avatarVariants };
package/dist/avatar.js ADDED
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunk377KBJQG_js = require('./chunks/chunk-377KBJQG.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "Avatar", {
10
+ enumerable: true,
11
+ get: function () { return chunk377KBJQG_js.Avatar; }
12
+ });
13
+ Object.defineProperty(exports, "avatarVariants", {
14
+ enumerable: true,
15
+ get: function () { return chunk377KBJQG_js.avatarVariants; }
16
+ });
@@ -0,0 +1,3 @@
1
+ export { Avatar, avatarVariants } from './chunks/chunk-JZ3PWHKS.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,15 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | null | undefined;
7
+ size?: "sm" | "md" | "lg" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ asChild?: boolean;
11
+ detectDoubleClick?: boolean;
12
+ }
13
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, buttonVariants };
@@ -0,0 +1,15 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | null | undefined;
7
+ size?: "sm" | "md" | "lg" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ asChild?: boolean;
11
+ detectDoubleClick?: boolean;
12
+ }
13
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, buttonVariants };
package/dist/button.js ADDED
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunk6MRM5K2N_js = require('./chunks/chunk-6MRM5K2N.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "Button", {
10
+ enumerable: true,
11
+ get: function () { return chunk6MRM5K2N_js.Button; }
12
+ });
13
+ Object.defineProperty(exports, "buttonVariants", {
14
+ enumerable: true,
15
+ get: function () { return chunk6MRM5K2N_js.buttonVariants; }
16
+ });
@@ -0,0 +1,3 @@
1
+ export { Button, buttonVariants } from './chunks/chunk-4ITJA3IS.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
+
5
+ type CarouselApi = UseEmblaCarouselType[1];
6
+ interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ opts?: Parameters<typeof useEmblaCarousel>[0];
8
+ plugins?: Parameters<typeof useEmblaCarousel>[1];
9
+ onApiChange?: (api: CarouselApi) => void;
10
+ }
11
+ interface CarouselContextValue {
12
+ api: CarouselApi;
13
+ canScrollPrev: boolean;
14
+ canScrollNext: boolean;
15
+ scrollPrev: () => void;
16
+ scrollNext: () => void;
17
+ selectedIndex: number;
18
+ scrollSnapCount: number;
19
+ }
20
+ declare function useCarousel(): CarouselContextValue;
21
+ declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<HTMLDivElement>>;
22
+ interface CarouselSlideProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ }
24
+ declare const CarouselSlide: React.ForwardRefExoticComponent<CarouselSlideProps & React.RefAttributes<HTMLDivElement>>;
25
+ interface CarouselButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
26
+ }
27
+ declare const CarouselPrev: React.ForwardRefExoticComponent<CarouselButtonProps & React.RefAttributes<HTMLButtonElement>>;
28
+ declare const CarouselNext: React.ForwardRefExoticComponent<CarouselButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
+ declare function CarouselDots({ className }: {
30
+ className?: string;
31
+ }): react_jsx_runtime.JSX.Element;
32
+ declare namespace CarouselDots {
33
+ var displayName: string;
34
+ }
35
+
36
+ export { Carousel, type CarouselApi, CarouselDots, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, useCarousel };
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
+
5
+ type CarouselApi = UseEmblaCarouselType[1];
6
+ interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ opts?: Parameters<typeof useEmblaCarousel>[0];
8
+ plugins?: Parameters<typeof useEmblaCarousel>[1];
9
+ onApiChange?: (api: CarouselApi) => void;
10
+ }
11
+ interface CarouselContextValue {
12
+ api: CarouselApi;
13
+ canScrollPrev: boolean;
14
+ canScrollNext: boolean;
15
+ scrollPrev: () => void;
16
+ scrollNext: () => void;
17
+ selectedIndex: number;
18
+ scrollSnapCount: number;
19
+ }
20
+ declare function useCarousel(): CarouselContextValue;
21
+ declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<HTMLDivElement>>;
22
+ interface CarouselSlideProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ }
24
+ declare const CarouselSlide: React.ForwardRefExoticComponent<CarouselSlideProps & React.RefAttributes<HTMLDivElement>>;
25
+ interface CarouselButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
26
+ }
27
+ declare const CarouselPrev: React.ForwardRefExoticComponent<CarouselButtonProps & React.RefAttributes<HTMLButtonElement>>;
28
+ declare const CarouselNext: React.ForwardRefExoticComponent<CarouselButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
+ declare function CarouselDots({ className }: {
30
+ className?: string;
31
+ }): react_jsx_runtime.JSX.Element;
32
+ declare namespace CarouselDots {
33
+ var displayName: string;
34
+ }
35
+
36
+ export { Carousel, type CarouselApi, CarouselDots, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, useCarousel };
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var chunkQ7H6LCNN_js = require('./chunks/chunk-Q7H6LCNN.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "Carousel", {
10
+ enumerable: true,
11
+ get: function () { return chunkQ7H6LCNN_js.Carousel; }
12
+ });
13
+ Object.defineProperty(exports, "CarouselDots", {
14
+ enumerable: true,
15
+ get: function () { return chunkQ7H6LCNN_js.CarouselDots; }
16
+ });
17
+ Object.defineProperty(exports, "CarouselNext", {
18
+ enumerable: true,
19
+ get: function () { return chunkQ7H6LCNN_js.CarouselNext; }
20
+ });
21
+ Object.defineProperty(exports, "CarouselPrev", {
22
+ enumerable: true,
23
+ get: function () { return chunkQ7H6LCNN_js.CarouselPrev; }
24
+ });
25
+ Object.defineProperty(exports, "CarouselSlide", {
26
+ enumerable: true,
27
+ get: function () { return chunkQ7H6LCNN_js.CarouselSlide; }
28
+ });
29
+ Object.defineProperty(exports, "useCarousel", {
30
+ enumerable: true,
31
+ get: function () { return chunkQ7H6LCNN_js.useCarousel; }
32
+ });
@@ -0,0 +1,3 @@
1
+ export { Carousel, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, useCarousel } from './chunks/chunk-AOVU67NI.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,21 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const checkBoxVariants: (props?: ({
6
+ size?: "sm" | "md" | null | undefined;
7
+ shape?: "round" | "square" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ declare const boxVariants: (props?: ({
10
+ size?: "sm" | "md" | null | undefined;
11
+ shape?: "round" | "square" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
13
+ interface CheckBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, VariantProps<typeof checkBoxVariants> {
14
+ checked?: boolean;
15
+ indeterminate?: boolean;
16
+ onCheckedChange?: (checked: boolean) => void;
17
+ label?: React.ReactNode;
18
+ }
19
+ declare const CheckBox: React.ForwardRefExoticComponent<CheckBoxProps & React.RefAttributes<HTMLInputElement>>;
20
+
21
+ export { CheckBox, type CheckBoxProps, boxVariants, checkBoxVariants };
@@ -0,0 +1,21 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const checkBoxVariants: (props?: ({
6
+ size?: "sm" | "md" | null | undefined;
7
+ shape?: "round" | "square" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ declare const boxVariants: (props?: ({
10
+ size?: "sm" | "md" | null | undefined;
11
+ shape?: "round" | "square" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
13
+ interface CheckBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, VariantProps<typeof checkBoxVariants> {
14
+ checked?: boolean;
15
+ indeterminate?: boolean;
16
+ onCheckedChange?: (checked: boolean) => void;
17
+ label?: React.ReactNode;
18
+ }
19
+ declare const CheckBox: React.ForwardRefExoticComponent<CheckBoxProps & React.RefAttributes<HTMLInputElement>>;
20
+
21
+ export { CheckBox, type CheckBoxProps, boxVariants, checkBoxVariants };
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var chunkZCMKIB5U_js = require('./chunks/chunk-ZCMKIB5U.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "CheckBox", {
10
+ enumerable: true,
11
+ get: function () { return chunkZCMKIB5U_js.CheckBox; }
12
+ });
13
+ Object.defineProperty(exports, "boxVariants", {
14
+ enumerable: true,
15
+ get: function () { return chunkZCMKIB5U_js.boxVariants; }
16
+ });
17
+ Object.defineProperty(exports, "checkBoxVariants", {
18
+ enumerable: true,
19
+ get: function () { return chunkZCMKIB5U_js.checkBoxVariants; }
20
+ });
@@ -0,0 +1,3 @@
1
+ export { CheckBox, boxVariants, checkBoxVariants } from './chunks/chunk-TR5JBBEA.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,16 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const chipVariants: (props?: ({
6
+ variant?: "accent" | "outline" | "default" | "filled" | null | undefined;
7
+ size?: "sm" | "md" | "lg" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ChipProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof chipVariants> {
10
+ asChild?: boolean;
11
+ onClose?: (e: React.MouseEvent) => void;
12
+ disabled?: boolean;
13
+ }
14
+ declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLElement>>;
15
+
16
+ export { Chip, type ChipProps, chipVariants };
package/dist/chip.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const chipVariants: (props?: ({
6
+ variant?: "accent" | "outline" | "default" | "filled" | null | undefined;
7
+ size?: "sm" | "md" | "lg" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ChipProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof chipVariants> {
10
+ asChild?: boolean;
11
+ onClose?: (e: React.MouseEvent) => void;
12
+ disabled?: boolean;
13
+ }
14
+ declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLElement>>;
15
+
16
+ export { Chip, type ChipProps, chipVariants };
package/dist/chip.js ADDED
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunkWSWD5ZUJ_js = require('./chunks/chunk-WSWD5ZUJ.js');
4
+ require('./chunks/chunk-QJNQCLMV.js');
5
+ require('./chunks/chunk-JNMCYWGY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "Chip", {
10
+ enumerable: true,
11
+ get: function () { return chunkWSWD5ZUJ_js.Chip; }
12
+ });
13
+ Object.defineProperty(exports, "chipVariants", {
14
+ enumerable: true,
15
+ get: function () { return chunkWSWD5ZUJ_js.chipVariants; }
16
+ });
package/dist/chip.mjs ADDED
@@ -0,0 +1,3 @@
1
+ export { Chip, chipVariants } from './chunks/chunk-AKIBUO5A.mjs';
2
+ import './chunks/chunk-XALPBGSC.mjs';
3
+ import './chunks/chunk-CVYXRSXT.mjs';
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var chunkJNMCYWGY_js = require('./chunk-JNMCYWGY.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ exports.ThemeProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
7
+ exports.useTheme = () => ({
8
+ theme: void 0,
9
+ setTheme: () => {
10
+ },
11
+ resolvedTheme: void 0,
12
+ themes: [],
13
+ systemTheme: void 0,
14
+ forcedTheme: void 0
15
+ });
16
+ try {
17
+ const nextThemes = chunkJNMCYWGY_js.__require("next-themes");
18
+ exports.ThemeProvider = nextThemes.ThemeProvider;
19
+ exports.useTheme = nextThemes.useTheme;
20
+ } catch {
21
+ }
@@ -0,0 +1,36 @@
1
+ import { useState, useRef, useCallback } from 'react';
2
+
3
+ // src/hooks/useInView.ts
4
+ function useInView(options) {
5
+ const { triggerOnce = true, rootMargin = "200px", threshold = 0 } = options ?? {};
6
+ const [isInView, setIsInView] = useState(false);
7
+ const observerRef = useRef(null);
8
+ const ref = useCallback(
9
+ (node) => {
10
+ if (observerRef.current) {
11
+ observerRef.current.disconnect();
12
+ observerRef.current = null;
13
+ }
14
+ if (!node) return;
15
+ if (triggerOnce && isInView) return;
16
+ const observer = new IntersectionObserver(
17
+ ([entry]) => {
18
+ if (entry.isIntersecting) {
19
+ setIsInView(true);
20
+ if (triggerOnce) observer.disconnect();
21
+ } else if (!triggerOnce) {
22
+ setIsInView(false);
23
+ }
24
+ },
25
+ { rootMargin, threshold }
26
+ );
27
+ observer.observe(node);
28
+ observerRef.current = observer;
29
+ },
30
+ [triggerOnce, rootMargin, threshold, isInView]
31
+ );
32
+ return { ref, isInView };
33
+ }
34
+ var useInView_default = useInView;
35
+
36
+ export { useInView, useInView_default };