@vlrc-fe/components 3.0.6 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +6 -2
  3. package/dist/ConfirmModal.cjs +29 -4
  4. package/dist/ConfirmModal.d.ts.map +1 -1
  5. package/dist/ConfirmModal.js +29 -4
  6. package/dist/DataTable/components/DataTableFacetedFilter.cjs +0 -2
  7. package/dist/DataTable/components/DataTableFacetedFilter.js +0 -2
  8. package/dist/DataTable/components/DataTablePagination.cjs +0 -1
  9. package/dist/DataTable/components/DataTablePagination.js +0 -1
  10. package/dist/DataTable/components/DataTableRowActions.cjs +1 -1
  11. package/dist/DataTable/components/DataTableRowActions.js +1 -1
  12. package/dist/DataTable/components/DataTableTable.cjs +3 -2
  13. package/dist/DataTable/components/DataTableTable.d.ts.map +1 -1
  14. package/dist/DataTable/components/DataTableTable.js +3 -2
  15. package/dist/DataTable/render/createColumns.cjs +1 -1
  16. package/dist/DataTable/render/createColumns.js +1 -1
  17. package/dist/Dropdown/Dropdown.cjs +14 -12
  18. package/dist/Dropdown/Dropdown.js +14 -12
  19. package/dist/Form/Form.cjs +3 -4
  20. package/dist/Form/Form.js +2 -3
  21. package/dist/Form/FormDatePicker/DatePickerTrigger.cjs +263 -0
  22. package/dist/Form/FormDatePicker/DatePickerTrigger.d.ts +111 -0
  23. package/dist/Form/FormDatePicker/DatePickerTrigger.d.ts.map +1 -0
  24. package/dist/Form/FormDatePicker/DatePickerTrigger.js +259 -0
  25. package/dist/Form/FormDatePicker/FormDatePicker.cjs +65 -66
  26. package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  27. package/dist/Form/FormDatePicker/FormDatePicker.js +66 -65
  28. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +25 -68
  29. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +5 -2
  30. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  31. package/dist/Form/FormDatePicker/RangeDatePicker.js +26 -69
  32. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +43 -66
  33. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -2
  34. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  35. package/dist/Form/FormDatePicker/SingleDatePicker.js +44 -67
  36. package/dist/Form/FormDatePicker/TimeInput.cjs +44 -59
  37. package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
  38. package/dist/Form/FormDatePicker/TimeInput.js +44 -59
  39. package/dist/Form/FormDatePicker/TimePicker.cjs +39 -17
  40. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  41. package/dist/Form/FormDatePicker/TimePicker.js +39 -17
  42. package/dist/Form/FormDatePicker/types.d.ts +5 -0
  43. package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
  44. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +3 -4
  45. package/dist/Form/FormDatePicker/useFormDatePicker.js +1 -2
  46. package/dist/Form/FormFileUpload/FileUpload.cjs +24 -29
  47. package/dist/Form/FormFileUpload/FileUpload.js +24 -29
  48. package/dist/Form/FormFileUpload/index.cjs +2 -2
  49. package/dist/Form/FormFileUpload/index.js +1 -1
  50. package/dist/Form/FormMultiSelect/FormMultiSelect.d.ts +6 -1
  51. package/dist/Form/FormMultiSelect/FormMultiSelect.d.ts.map +1 -1
  52. package/dist/Form/FormNumberInput/FormNumberInput.cjs +21 -11
  53. package/dist/Form/FormNumberInput/FormNumberInput.d.ts.map +1 -1
  54. package/dist/Form/FormNumberInput/FormNumberInput.js +20 -10
  55. package/dist/Form/FormSelect/FormSelect.cjs +45 -18
  56. package/dist/Form/FormSelect/FormSelect.js +45 -18
  57. package/dist/Form/FormSelect/types.d.ts +2 -0
  58. package/dist/Form/FormSelect/types.d.ts.map +1 -1
  59. package/dist/Icons/Icons.cjs +47 -0
  60. package/dist/Icons/Icons.d.ts +46 -0
  61. package/dist/Icons/Icons.d.ts.map +1 -1
  62. package/dist/Icons/Icons.js +48 -1
  63. package/dist/Icons/JiraIcons.cjs +251 -0
  64. package/dist/Icons/JiraIcons.d.ts +25 -0
  65. package/dist/Icons/JiraIcons.d.ts.map +1 -0
  66. package/dist/Icons/JiraIcons.js +248 -0
  67. package/dist/Icons/index.d.ts +1 -0
  68. package/dist/Icons/index.d.ts.map +1 -1
  69. package/dist/MultiSelect/MultiSelect.cjs +20 -9
  70. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  71. package/dist/MultiSelect/MultiSelect.js +20 -9
  72. package/dist/MultiSelect/renderers.cjs +95 -52
  73. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  74. package/dist/MultiSelect/renderers.js +95 -52
  75. package/dist/Select/BaseSelect.cjs +68 -21
  76. package/dist/Select/BaseSelect.d.ts.map +1 -1
  77. package/dist/Select/BaseSelect.js +69 -22
  78. package/dist/Select/MultiSelectTags.cjs +0 -1
  79. package/dist/Select/MultiSelectTags.d.ts.map +1 -1
  80. package/dist/Select/MultiSelectTags.js +0 -1
  81. package/dist/Tag/Tag.cjs +154 -0
  82. package/dist/Tag/Tag.d.ts +19 -0
  83. package/dist/Tag/Tag.d.ts.map +1 -0
  84. package/dist/Tag/Tag.js +151 -0
  85. package/dist/Tag/index.d.ts +3 -0
  86. package/dist/Tag/index.d.ts.map +1 -0
  87. package/dist/Typography/Blockquote.cjs +2 -1
  88. package/dist/Typography/Blockquote.d.ts +1 -1
  89. package/dist/Typography/Blockquote.d.ts.map +1 -1
  90. package/dist/Typography/Blockquote.js +2 -1
  91. package/dist/Typography/Code.cjs +2 -2
  92. package/dist/Typography/Code.d.ts +1 -1
  93. package/dist/Typography/Code.d.ts.map +1 -1
  94. package/dist/Typography/Code.js +2 -2
  95. package/dist/Typography/Link.cjs +2 -1
  96. package/dist/Typography/Link.d.ts +1 -1
  97. package/dist/Typography/Link.d.ts.map +1 -1
  98. package/dist/Typography/Link.js +2 -1
  99. package/dist/Typography/Paragraph.cjs +2 -1
  100. package/dist/Typography/Paragraph.d.ts +1 -1
  101. package/dist/Typography/Paragraph.d.ts.map +1 -1
  102. package/dist/Typography/Paragraph.js +2 -1
  103. package/dist/Typography/Text.cjs +2 -1
  104. package/dist/Typography/Text.d.ts +1 -1
  105. package/dist/Typography/Text.d.ts.map +1 -1
  106. package/dist/Typography/Text.js +2 -1
  107. package/dist/Typography/types.d.ts +2 -0
  108. package/dist/Typography/types.d.ts.map +1 -1
  109. package/dist/assets/stylex.css +139 -31
  110. package/dist/index.cjs +27 -7
  111. package/dist/index.d.ts +5 -2
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +15 -12
  114. package/dist/layout/index.js +2 -2
  115. package/dist/theme/index.cjs +4 -0
  116. package/dist/theme/index.js +4 -2
  117. package/dist/theme/tokens.stylex.cjs +33 -0
  118. package/dist/theme/tokens.stylex.d.ts +53 -0
  119. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  120. package/dist/theme/tokens.stylex.js +32 -1
  121. package/dist/theme.css +160 -37
  122. package/dist/ui/accordion.cjs +0 -1
  123. package/dist/ui/accordion.d.ts.map +1 -1
  124. package/dist/ui/accordion.js +0 -1
  125. package/dist/ui/alert-dialog.cjs +11 -11
  126. package/dist/ui/alert-dialog.js +9 -9
  127. package/dist/ui/aspect-ratio.cjs +2 -2
  128. package/dist/ui/aspect-ratio.js +1 -1
  129. package/dist/ui/avatar.cjs +110 -41
  130. package/dist/ui/avatar.d.ts +7 -1
  131. package/dist/ui/avatar.d.ts.map +1 -1
  132. package/dist/ui/avatar.js +110 -41
  133. package/dist/ui/badge-overflow.cjs +33 -8
  134. package/dist/ui/badge-overflow.d.ts.map +1 -1
  135. package/dist/ui/badge-overflow.js +33 -8
  136. package/dist/ui/breadcrumb.cjs +18 -8
  137. package/dist/ui/breadcrumb.d.ts.map +1 -1
  138. package/dist/ui/breadcrumb.js +18 -8
  139. package/dist/ui/card.cjs +23 -88
  140. package/dist/ui/card.d.ts +11 -4
  141. package/dist/ui/card.d.ts.map +1 -1
  142. package/dist/ui/card.js +23 -88
  143. package/dist/ui/carousel.cjs +27 -8
  144. package/dist/ui/carousel.d.ts.map +1 -1
  145. package/dist/ui/carousel.js +25 -7
  146. package/dist/ui/code-block.cjs +6 -12
  147. package/dist/ui/code-block.js +6 -12
  148. package/dist/ui/collapsible.cjs +4 -4
  149. package/dist/ui/collapsible.js +6 -6
  150. package/dist/ui/command.cjs +1 -2
  151. package/dist/ui/command.d.ts.map +1 -1
  152. package/dist/ui/command.js +1 -2
  153. package/dist/ui/context-menu.cjs +42 -48
  154. package/dist/ui/context-menu.d.ts.map +1 -1
  155. package/dist/ui/context-menu.js +41 -47
  156. package/dist/ui/copy-button.cjs +0 -1
  157. package/dist/ui/copy-button.js +0 -1
  158. package/dist/ui/dialog.cjs +3 -3
  159. package/dist/ui/dialog.js +3 -3
  160. package/dist/ui/drawer.cjs +9 -9
  161. package/dist/ui/drawer.js +11 -11
  162. package/dist/ui/dropdown-menu.cjs +4 -4
  163. package/dist/ui/dropdown-menu.d.ts +3 -1
  164. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  165. package/dist/ui/dropdown-menu.js +4 -4
  166. package/dist/ui/editable.cjs +0 -1
  167. package/dist/ui/editable.d.ts.map +1 -1
  168. package/dist/ui/editable.js +0 -1
  169. package/dist/ui/empty.cjs +6 -5
  170. package/dist/ui/empty.d.ts +2 -0
  171. package/dist/ui/empty.d.ts.map +1 -1
  172. package/dist/ui/empty.js +6 -6
  173. package/dist/ui/field.cjs +0 -2
  174. package/dist/ui/field.d.ts.map +1 -1
  175. package/dist/ui/field.js +0 -2
  176. package/dist/ui/file-upload.cjs +88 -85
  177. package/dist/ui/file-upload.d.ts +1 -0
  178. package/dist/ui/file-upload.d.ts.map +1 -1
  179. package/dist/ui/file-upload.js +88 -86
  180. package/dist/ui/form.cjs +54 -66
  181. package/dist/ui/form.d.ts.map +1 -1
  182. package/dist/ui/form.js +50 -62
  183. package/dist/ui/hover-card.cjs +5 -5
  184. package/dist/ui/hover-card.js +3 -3
  185. package/dist/ui/input-group.cjs +0 -1
  186. package/dist/ui/input-group.d.ts.map +1 -1
  187. package/dist/ui/input-group.js +0 -1
  188. package/dist/ui/input-otp.cjs +3 -3
  189. package/dist/ui/input-otp.js +3 -3
  190. package/dist/ui/input.cjs +69 -7
  191. package/dist/ui/input.d.ts +3 -1
  192. package/dist/ui/input.d.ts.map +1 -1
  193. package/dist/ui/input.js +69 -7
  194. package/dist/ui/kbd.cjs +22 -16
  195. package/dist/ui/kbd.d.ts.map +1 -1
  196. package/dist/ui/kbd.js +22 -16
  197. package/dist/ui/menubar.cjs +42 -48
  198. package/dist/ui/menubar.d.ts.map +1 -1
  199. package/dist/ui/menubar.js +40 -46
  200. package/dist/ui/navigation-menu.cjs +9 -9
  201. package/dist/ui/navigation-menu.js +4 -4
  202. package/dist/ui/pagination.cjs +7 -7
  203. package/dist/ui/pagination.d.ts.map +1 -1
  204. package/dist/ui/pagination.js +7 -7
  205. package/dist/ui/progress.cjs +27 -12
  206. package/dist/ui/progress.d.ts +3 -1
  207. package/dist/ui/progress.d.ts.map +1 -1
  208. package/dist/ui/progress.js +27 -12
  209. package/dist/ui/resizable.cjs +4 -4
  210. package/dist/ui/resizable.js +1 -1
  211. package/dist/ui/responsive-dialog.cjs +1 -1
  212. package/dist/ui/responsive-dialog.js +1 -1
  213. package/dist/ui/segmented.cjs +19 -10
  214. package/dist/ui/segmented.d.ts.map +1 -1
  215. package/dist/ui/segmented.js +20 -11
  216. package/dist/ui/sheet.cjs +1 -1
  217. package/dist/ui/sheet.js +1 -1
  218. package/dist/ui/sidebar.cjs +9 -5
  219. package/dist/ui/sidebar.d.ts.map +1 -1
  220. package/dist/ui/sidebar.js +9 -5
  221. package/dist/ui/signature-pad.cjs +3 -0
  222. package/dist/ui/signature-pad.d.ts.map +1 -1
  223. package/dist/ui/signature-pad.js +3 -0
  224. package/dist/ui/slider.cjs +7 -8
  225. package/dist/ui/slider.js +7 -8
  226. package/dist/ui/sonner.cjs +6 -0
  227. package/dist/ui/sonner.d.ts +1 -0
  228. package/dist/ui/sonner.d.ts.map +1 -1
  229. package/dist/ui/sonner.js +2 -2
  230. package/dist/ui/stat.cjs +2 -3
  231. package/dist/ui/stat.d.ts.map +1 -1
  232. package/dist/ui/stat.js +2 -3
  233. package/dist/ui/stepper.cjs +107 -70
  234. package/dist/ui/stepper.d.ts +2 -2
  235. package/dist/ui/stepper.d.ts.map +1 -1
  236. package/dist/ui/stepper.js +108 -71
  237. package/dist/ui/switch.cjs +3 -3
  238. package/dist/ui/switch.js +3 -3
  239. package/dist/ui/tabs.cjs +150 -64
  240. package/dist/ui/tabs.d.ts +34 -5
  241. package/dist/ui/tabs.d.ts.map +1 -1
  242. package/dist/ui/tabs.js +148 -62
  243. package/dist/ui/timeline.cjs +2 -3
  244. package/dist/ui/timeline.d.ts.map +1 -1
  245. package/dist/ui/timeline.js +2 -3
  246. package/dist/ui/toggle-group.cjs +3 -3
  247. package/dist/ui/toggle-group.js +3 -3
  248. package/dist/ui/toggle.cjs +2 -2
  249. package/dist/ui/toggle.js +1 -1
  250. package/dist/ui/tooltip.cjs +61 -11
  251. package/dist/ui/tooltip.d.ts +10 -2
  252. package/dist/ui/tooltip.d.ts.map +1 -1
  253. package/dist/ui/tooltip.js +61 -11
  254. package/dist/utils.cjs +72 -0
  255. package/dist/utils.d.ts +63 -1
  256. package/dist/utils.d.ts.map +1 -1
  257. package/dist/utils.js +68 -1
  258. package/dist/vlrc-theme.css +21 -1
  259. package/package.json +16 -3
  260. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +0 -551
  261. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -542
  262. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +0 -546
  263. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -537
  264. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +0 -330
  265. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -319
  266. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +0 -150
  267. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +0 -132
  268. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -113
  269. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  270. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +0 -11
  271. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +0 -11
  272. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +0 -48
  273. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +0 -43
  274. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +0 -145
  275. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -125
  276. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +0 -38
  277. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +0 -34
  278. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +0 -126
  279. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +0 -118
  280. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +0 -134
  281. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -128
  282. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +0 -541
  283. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +0 -537
  284. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -39
  285. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -35
  286. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +0 -304
  287. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +0 -272
  288. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +0 -108
  289. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +0 -104
  290. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -19
  291. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +0 -16
  292. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -275
  293. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -271
  294. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +0 -53
  295. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -48
  296. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +0 -215
  297. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -212
  298. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +0 -219
  299. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -209
  300. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +0 -22
  301. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +0 -19
  302. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +0 -802
  303. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +0 -769
  304. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +0 -410
  305. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +0 -376
  306. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +0 -741
  307. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +0 -722
  308. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -246
  309. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +0 -237
  310. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -27
  311. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +0 -23
  312. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +0 -148
  313. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +0 -145
  314. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -55
  315. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +0 -50
  316. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +0 -223
  317. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -216
  318. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +0 -576
  319. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +0 -560
  320. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +0 -202
  321. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +0 -190
  322. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +0 -159
  323. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +0 -149
  324. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +0 -158
  325. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +0 -152
  326. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +0 -39
  327. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +0 -35
  328. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -19
  329. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
  330. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -109
  331. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -105
  332. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +0 -28
  333. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +0 -25
  334. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +0 -33
  335. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -30
  336. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -7
  337. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -4
  338. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -25
  339. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -22
  340. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +0 -47
  341. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +0 -44
  342. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +0 -38
  343. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -33
  344. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +0 -106
  345. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -106
  346. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +0 -5
  347. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +0 -5
  348. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +0 -6
  349. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +0 -6
  350. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +0 -423
  351. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +0 -423
  352. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +0 -45
  353. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +0 -45
  354. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +0 -42
  355. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +0 -42
  356. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -20
  357. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -20
  358. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +0 -7
  359. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +0 -7
  360. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +0 -27
  361. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +0 -25
  362. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +0 -45
  363. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +0 -42
  364. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +0 -45
  365. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +0 -44
  366. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +0 -49
  367. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +0 -48
  368. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +0 -358
  369. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +0 -354
  370. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +0 -31
  371. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +0 -30
  372. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +0 -35
  373. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +0 -34
  374. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +0 -44
  375. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +0 -43
  376. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +0 -49
  377. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +0 -48
  378. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +0 -61
  379. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +0 -60
  380. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +0 -38
  381. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +0 -37
  382. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +0 -39
  383. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +0 -38
  384. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +0 -8
  385. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -8
  386. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +0 -50
  387. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -50
  388. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +0 -27
  389. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -27
  390. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +0 -18
  391. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -18
  392. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +0 -77
  393. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -77
  394. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +0 -31
  395. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -31
  396. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +0 -11
  397. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
  398. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +0 -210
  399. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -210
  400. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +0 -122
  401. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +0 -123
  402. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +0 -28
  403. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +0 -27
  404. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +0 -34
  405. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +0 -33
  406. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +0 -37
  407. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +0 -36
  408. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +0 -41
  409. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +0 -40
  410. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +0 -45
  411. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +0 -44
  412. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +0 -56
  413. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +0 -55
  414. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +0 -35
  415. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +0 -34
  416. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +0 -45
  417. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +0 -44
  418. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +0 -34
  419. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +0 -34
  420. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +0 -39
  421. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -36
  422. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +0 -1391
  423. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1391
  424. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +0 -7
  425. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -4
  426. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +0 -387
  427. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +0 -383
  428. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +0 -625
  429. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +0 -616
  430. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +0 -1033
  431. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +0 -1026
  432. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +0 -47
  433. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -43
  434. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +0 -13
  435. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
  436. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +0 -4
  437. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.js +0 -3
  438. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +0 -36
  439. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -35
  440. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +0 -15
  441. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -13
  442. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +0 -167
  443. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -163
  444. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +0 -63
  445. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -61
  446. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +0 -14
  447. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -14
  448. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +0 -84
  449. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -83
  450. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +0 -3
  451. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -4
  452. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +0 -6
  453. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -6
  454. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +0 -1617
  455. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +0 -1600
  456. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +0 -18
  457. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +0 -18
  458. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +0 -26
  459. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +0 -24
  460. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +0 -4
  461. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.js +0 -3
  462. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +0 -40
  463. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -40
  464. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +0 -36
  465. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -29
  466. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +0 -20
  467. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -20
  468. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +0 -46
  469. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -44
  470. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +0 -39
  471. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -39
  472. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +0 -18
  473. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +0 -16
  474. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -81
  475. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +0 -81
  476. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +0 -1252
  477. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +0 -1243
@@ -1,1600 +0,0 @@
1
- import * as React$1 from "react";
2
- import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
3
- // ../../node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js
4
- var PanelGroupContext = createContext(null);
5
- PanelGroupContext.displayName = "PanelGroupContext";
6
- var DATA_ATTRIBUTES = {
7
- group: "data-panel-group",
8
- groupDirection: "data-panel-group-direction",
9
- groupId: "data-panel-group-id",
10
- panel: "data-panel",
11
- panelCollapsible: "data-panel-collapsible",
12
- panelId: "data-panel-id",
13
- panelSize: "data-panel-size",
14
- resizeHandle: "data-resize-handle",
15
- resizeHandleActive: "data-resize-handle-active",
16
- resizeHandleEnabled: "data-panel-resize-handle-enabled",
17
- resizeHandleId: "data-panel-resize-handle-id",
18
- resizeHandleState: "data-resize-handle-state"
19
- };
20
- var PRECISION = 10;
21
- var useIsomorphicLayoutEffect = useLayoutEffect;
22
- var useId$1 = React$1["useId".toString()];
23
- var wrappedUseId = typeof useId$1 === "function" ? useId$1 : () => null;
24
- var counter = 0;
25
- function useUniqueId(idFromParams = null) {
26
- const idFromUseId = wrappedUseId();
27
- const idRef = useRef(idFromParams || idFromUseId || null);
28
- if (idRef.current === null) idRef.current = "" + counter++;
29
- return idFromParams !== null && idFromParams !== void 0 ? idFromParams : idRef.current;
30
- }
31
- function PanelWithForwardedRef({ children, className: classNameFromProps = "", collapsedSize, collapsible, defaultSize, forwardedRef, id: idFromProps, maxSize, minSize, onCollapse, onExpand, onResize, order, style: styleFromProps, tagName: Type = "div", ...rest }) {
32
- const context = useContext(PanelGroupContext);
33
- if (context === null) throw Error(`Panel components must be rendered within a PanelGroup container`);
34
- const { collapsePanel, expandPanel, getPanelSize, getPanelStyle, groupId, isPanelCollapsed, reevaluatePanelConstraints, registerPanel, resizePanel, unregisterPanel } = context;
35
- const panelId = useUniqueId(idFromProps);
36
- const panelDataRef = useRef({
37
- callbacks: {
38
- onCollapse,
39
- onExpand,
40
- onResize
41
- },
42
- constraints: {
43
- collapsedSize,
44
- collapsible,
45
- defaultSize,
46
- maxSize,
47
- minSize
48
- },
49
- id: panelId,
50
- idIsFromProps: idFromProps !== void 0,
51
- order
52
- });
53
- useRef({ didLogMissingDefaultSizeWarning: false });
54
- useIsomorphicLayoutEffect(() => {
55
- const { callbacks, constraints } = panelDataRef.current;
56
- const prevConstraints = { ...constraints };
57
- panelDataRef.current.id = panelId;
58
- panelDataRef.current.idIsFromProps = idFromProps !== void 0;
59
- panelDataRef.current.order = order;
60
- callbacks.onCollapse = onCollapse;
61
- callbacks.onExpand = onExpand;
62
- callbacks.onResize = onResize;
63
- constraints.collapsedSize = collapsedSize;
64
- constraints.collapsible = collapsible;
65
- constraints.defaultSize = defaultSize;
66
- constraints.maxSize = maxSize;
67
- constraints.minSize = minSize;
68
- if (prevConstraints.collapsedSize !== constraints.collapsedSize || prevConstraints.collapsible !== constraints.collapsible || prevConstraints.maxSize !== constraints.maxSize || prevConstraints.minSize !== constraints.minSize) reevaluatePanelConstraints(panelDataRef.current, prevConstraints);
69
- });
70
- useIsomorphicLayoutEffect(() => {
71
- const panelData = panelDataRef.current;
72
- registerPanel(panelData);
73
- return () => {
74
- unregisterPanel(panelData);
75
- };
76
- }, [
77
- order,
78
- panelId,
79
- registerPanel,
80
- unregisterPanel
81
- ]);
82
- useImperativeHandle(forwardedRef, () => ({
83
- collapse: () => {
84
- collapsePanel(panelDataRef.current);
85
- },
86
- expand: (minSize) => {
87
- expandPanel(panelDataRef.current, minSize);
88
- },
89
- getId() {
90
- return panelId;
91
- },
92
- getSize() {
93
- return getPanelSize(panelDataRef.current);
94
- },
95
- isCollapsed() {
96
- return isPanelCollapsed(panelDataRef.current);
97
- },
98
- isExpanded() {
99
- return !isPanelCollapsed(panelDataRef.current);
100
- },
101
- resize: (size) => {
102
- resizePanel(panelDataRef.current, size);
103
- }
104
- }), [
105
- collapsePanel,
106
- expandPanel,
107
- getPanelSize,
108
- isPanelCollapsed,
109
- panelId,
110
- resizePanel
111
- ]);
112
- const style = getPanelStyle(panelDataRef.current, defaultSize);
113
- return createElement(Type, {
114
- ...rest,
115
- children,
116
- className: classNameFromProps,
117
- id: panelId,
118
- style: {
119
- ...style,
120
- ...styleFromProps
121
- },
122
- [DATA_ATTRIBUTES.groupId]: groupId,
123
- [DATA_ATTRIBUTES.panel]: "",
124
- [DATA_ATTRIBUTES.panelCollapsible]: collapsible || void 0,
125
- [DATA_ATTRIBUTES.panelId]: panelId,
126
- [DATA_ATTRIBUTES.panelSize]: parseFloat("" + style.flexGrow).toFixed(1)
127
- });
128
- }
129
- var Panel = forwardRef((props, ref) => createElement(PanelWithForwardedRef, {
130
- ...props,
131
- forwardedRef: ref
132
- }));
133
- PanelWithForwardedRef.displayName = "Panel";
134
- Panel.displayName = "forwardRef(Panel)";
135
- var currentCursorStyle = null;
136
- var enabled = true;
137
- var prevRuleIndex = -1;
138
- var styleElement = null;
139
- function getCursorStyle(state, constraintFlags) {
140
- if (constraintFlags) {
141
- const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
142
- const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
143
- const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
144
- const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
145
- if (horizontalMin) {
146
- if (verticalMin) return "se-resize";
147
- else if (verticalMax) return "ne-resize";
148
- else return "e-resize";
149
- } else if (horizontalMax) {
150
- if (verticalMin) return "sw-resize";
151
- else if (verticalMax) return "nw-resize";
152
- else return "w-resize";
153
- } else if (verticalMin) return "s-resize";
154
- else if (verticalMax) return "n-resize";
155
- }
156
- switch (state) {
157
- case "horizontal": return "ew-resize";
158
- case "intersection": return "move";
159
- case "vertical": return "ns-resize";
160
- }
161
- }
162
- function resetGlobalCursorStyle() {
163
- if (styleElement !== null) {
164
- document.head.removeChild(styleElement);
165
- currentCursorStyle = null;
166
- styleElement = null;
167
- prevRuleIndex = -1;
168
- }
169
- }
170
- function setGlobalCursorStyle(state, constraintFlags) {
171
- var _styleElement$sheet$i, _styleElement$sheet2;
172
- if (!enabled) return;
173
- const style = getCursorStyle(state, constraintFlags);
174
- if (currentCursorStyle === style) return;
175
- currentCursorStyle = style;
176
- if (styleElement === null) {
177
- styleElement = document.createElement("style");
178
- document.head.appendChild(styleElement);
179
- }
180
- if (prevRuleIndex >= 0) {
181
- var _styleElement$sheet;
182
- (_styleElement$sheet = styleElement.sheet) === null || _styleElement$sheet === void 0 || _styleElement$sheet.removeRule(prevRuleIndex);
183
- }
184
- prevRuleIndex = (_styleElement$sheet$i = (_styleElement$sheet2 = styleElement.sheet) === null || _styleElement$sheet2 === void 0 ? void 0 : _styleElement$sheet2.insertRule(`*{cursor: ${style} !important;}`)) !== null && _styleElement$sheet$i !== void 0 ? _styleElement$sheet$i : -1;
185
- }
186
- function isKeyDown(event) {
187
- return event.type === "keydown";
188
- }
189
- function isPointerEvent(event) {
190
- return event.type.startsWith("pointer");
191
- }
192
- function isMouseEvent(event) {
193
- return event.type.startsWith("mouse");
194
- }
195
- function getResizeEventCoordinates(event) {
196
- if (isPointerEvent(event)) {
197
- if (event.isPrimary) return {
198
- x: event.clientX,
199
- y: event.clientY
200
- };
201
- } else if (isMouseEvent(event)) return {
202
- x: event.clientX,
203
- y: event.clientY
204
- };
205
- return {
206
- x: Infinity,
207
- y: Infinity
208
- };
209
- }
210
- function getInputType() {
211
- if (typeof matchMedia === "function") return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
212
- }
213
- function intersects(rectOne, rectTwo, strict) {
214
- if (strict) return rectOne.x < rectTwo.x + rectTwo.width && rectOne.x + rectOne.width > rectTwo.x && rectOne.y < rectTwo.y + rectTwo.height && rectOne.y + rectOne.height > rectTwo.y;
215
- else return rectOne.x <= rectTwo.x + rectTwo.width && rectOne.x + rectOne.width >= rectTwo.x && rectOne.y <= rectTwo.y + rectTwo.height && rectOne.y + rectOne.height >= rectTwo.y;
216
- }
217
- /**
218
- * Determine which of two nodes appears in front of the other —
219
- * if `a` is in front, returns 1, otherwise returns -1
220
- * @param {HTMLElement | SVGElement} a
221
- * @param {HTMLElement | SVGElement} b
222
- */
223
- function compare(a, b) {
224
- if (a === b) throw new Error("Cannot compare node with itself");
225
- const ancestors = {
226
- a: get_ancestors(a),
227
- b: get_ancestors(b)
228
- };
229
- let common_ancestor;
230
- while (ancestors.a.at(-1) === ancestors.b.at(-1)) {
231
- a = ancestors.a.pop();
232
- b = ancestors.b.pop();
233
- common_ancestor = a;
234
- }
235
- assert(common_ancestor, "Stacking order can only be calculated for elements with a common ancestor");
236
- const z_indexes = {
237
- a: get_z_index(find_stacking_context(ancestors.a)),
238
- b: get_z_index(find_stacking_context(ancestors.b))
239
- };
240
- if (z_indexes.a === z_indexes.b) {
241
- const children = common_ancestor.childNodes;
242
- const furthest_ancestors = {
243
- a: ancestors.a.at(-1),
244
- b: ancestors.b.at(-1)
245
- };
246
- let i = children.length;
247
- while (i--) {
248
- const child = children[i];
249
- if (child === furthest_ancestors.a) return 1;
250
- if (child === furthest_ancestors.b) return -1;
251
- }
252
- }
253
- return Math.sign(z_indexes.a - z_indexes.b);
254
- }
255
- var props = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
256
- /** @param {HTMLElement | SVGElement} node */
257
- function is_flex_item(node) {
258
- var _get_parent;
259
- const display = getComputedStyle((_get_parent = get_parent(node)) !== null && _get_parent !== void 0 ? _get_parent : node).display;
260
- return display === "flex" || display === "inline-flex";
261
- }
262
- /** @param {HTMLElement | SVGElement} node */
263
- function creates_stacking_context(node) {
264
- const style = getComputedStyle(node);
265
- if (style.position === "fixed") return true;
266
- if (style.zIndex !== "auto" && (style.position !== "static" || is_flex_item(node))) return true;
267
- if (+style.opacity < 1) return true;
268
- if ("transform" in style && style.transform !== "none") return true;
269
- if ("webkitTransform" in style && style.webkitTransform !== "none") return true;
270
- if ("mixBlendMode" in style && style.mixBlendMode !== "normal") return true;
271
- if ("filter" in style && style.filter !== "none") return true;
272
- if ("webkitFilter" in style && style.webkitFilter !== "none") return true;
273
- if ("isolation" in style && style.isolation === "isolate") return true;
274
- if (props.test(style.willChange)) return true;
275
- if (style.webkitOverflowScrolling === "touch") return true;
276
- return false;
277
- }
278
- /** @param {(HTMLElement| SVGElement)[]} nodes */
279
- function find_stacking_context(nodes) {
280
- let i = nodes.length;
281
- while (i--) {
282
- const node = nodes[i];
283
- assert(node, "Missing node");
284
- if (creates_stacking_context(node)) return node;
285
- }
286
- return null;
287
- }
288
- /** @param {HTMLElement | SVGElement} node */
289
- function get_z_index(node) {
290
- return node && Number(getComputedStyle(node).zIndex) || 0;
291
- }
292
- /** @param {HTMLElement} node */
293
- function get_ancestors(node) {
294
- const ancestors = [];
295
- while (node) {
296
- ancestors.push(node);
297
- node = get_parent(node);
298
- }
299
- return ancestors;
300
- }
301
- /** @param {HTMLElement} node */
302
- function get_parent(node) {
303
- const { parentNode } = node;
304
- if (parentNode && parentNode instanceof ShadowRoot) return parentNode.host;
305
- return parentNode;
306
- }
307
- var EXCEEDED_HORIZONTAL_MIN = 1;
308
- var EXCEEDED_HORIZONTAL_MAX = 2;
309
- var EXCEEDED_VERTICAL_MIN = 4;
310
- var EXCEEDED_VERTICAL_MAX = 8;
311
- var isCoarsePointer = getInputType() === "coarse";
312
- var intersectingHandles = [];
313
- var isPointerDown = false;
314
- var ownerDocumentCounts = /* @__PURE__ */ new Map();
315
- var panelConstraintFlags = /* @__PURE__ */ new Map();
316
- var registeredResizeHandlers = /* @__PURE__ */ new Set();
317
- function registerResizeHandle(resizeHandleId, element, direction, hitAreaMargins, setResizeHandlerState) {
318
- var _ownerDocumentCounts$;
319
- const { ownerDocument } = element;
320
- const data = {
321
- direction,
322
- element,
323
- hitAreaMargins,
324
- setResizeHandlerState
325
- };
326
- const count = (_ownerDocumentCounts$ = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$ !== void 0 ? _ownerDocumentCounts$ : 0;
327
- ownerDocumentCounts.set(ownerDocument, count + 1);
328
- registeredResizeHandlers.add(data);
329
- updateListeners();
330
- return function unregisterResizeHandle() {
331
- var _ownerDocumentCounts$2;
332
- panelConstraintFlags.delete(resizeHandleId);
333
- registeredResizeHandlers.delete(data);
334
- const count = (_ownerDocumentCounts$2 = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$2 !== void 0 ? _ownerDocumentCounts$2 : 1;
335
- ownerDocumentCounts.set(ownerDocument, count - 1);
336
- updateListeners();
337
- if (count === 1) ownerDocumentCounts.delete(ownerDocument);
338
- if (intersectingHandles.includes(data)) {
339
- const index = intersectingHandles.indexOf(data);
340
- if (index >= 0) intersectingHandles.splice(index, 1);
341
- updateCursor();
342
- setResizeHandlerState("up", true, null);
343
- }
344
- };
345
- }
346
- function handlePointerDown(event) {
347
- const { target } = event;
348
- const { x, y } = getResizeEventCoordinates(event);
349
- isPointerDown = true;
350
- recalculateIntersectingHandles({
351
- target,
352
- x,
353
- y
354
- });
355
- updateListeners();
356
- if (intersectingHandles.length > 0) {
357
- updateResizeHandlerStates("down", event);
358
- event.preventDefault();
359
- if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
360
- }
361
- }
362
- function handlePointerMove(event) {
363
- const { x, y } = getResizeEventCoordinates(event);
364
- if (isPointerDown && event.buttons === 0) {
365
- isPointerDown = false;
366
- updateResizeHandlerStates("up", event);
367
- }
368
- if (!isPointerDown) {
369
- const { target } = event;
370
- recalculateIntersectingHandles({
371
- target,
372
- x,
373
- y
374
- });
375
- }
376
- updateResizeHandlerStates("move", event);
377
- updateCursor();
378
- if (intersectingHandles.length > 0) event.preventDefault();
379
- }
380
- function handlePointerUp(event) {
381
- const { target } = event;
382
- const { x, y } = getResizeEventCoordinates(event);
383
- panelConstraintFlags.clear();
384
- isPointerDown = false;
385
- if (intersectingHandles.length > 0) {
386
- event.preventDefault();
387
- if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
388
- }
389
- updateResizeHandlerStates("up", event);
390
- recalculateIntersectingHandles({
391
- target,
392
- x,
393
- y
394
- });
395
- updateCursor();
396
- updateListeners();
397
- }
398
- function isWithinResizeHandle(element) {
399
- let currentElement = element;
400
- while (currentElement) {
401
- if (currentElement.hasAttribute(DATA_ATTRIBUTES.resizeHandle)) return true;
402
- currentElement = currentElement.parentElement;
403
- }
404
- return false;
405
- }
406
- function recalculateIntersectingHandles({ target, x, y }) {
407
- intersectingHandles.splice(0);
408
- let targetElement = null;
409
- if (target instanceof HTMLElement || target instanceof SVGElement) targetElement = target;
410
- registeredResizeHandlers.forEach((data) => {
411
- const { element: dragHandleElement, hitAreaMargins } = data;
412
- const dragHandleRect = dragHandleElement.getBoundingClientRect();
413
- const { bottom, left, right, top } = dragHandleRect;
414
- const margin = isCoarsePointer ? hitAreaMargins.coarse : hitAreaMargins.fine;
415
- if (x >= left - margin && x <= right + margin && y >= top - margin && y <= bottom + margin) {
416
- if (targetElement !== null && document.contains(targetElement) && dragHandleElement !== targetElement && !dragHandleElement.contains(targetElement) && !targetElement.contains(dragHandleElement) && compare(targetElement, dragHandleElement) > 0) {
417
- let currentElement = targetElement;
418
- let didIntersect = false;
419
- while (currentElement) {
420
- if (currentElement.contains(dragHandleElement)) break;
421
- else if (intersects(currentElement.getBoundingClientRect(), dragHandleRect, true)) {
422
- didIntersect = true;
423
- break;
424
- }
425
- currentElement = currentElement.parentElement;
426
- }
427
- if (didIntersect) return;
428
- }
429
- intersectingHandles.push(data);
430
- }
431
- });
432
- }
433
- function reportConstraintsViolation(resizeHandleId, flag) {
434
- panelConstraintFlags.set(resizeHandleId, flag);
435
- }
436
- function updateCursor() {
437
- let intersectsHorizontal = false;
438
- let intersectsVertical = false;
439
- intersectingHandles.forEach((data) => {
440
- const { direction } = data;
441
- if (direction === "horizontal") intersectsHorizontal = true;
442
- else intersectsVertical = true;
443
- });
444
- let constraintFlags = 0;
445
- panelConstraintFlags.forEach((flag) => {
446
- constraintFlags |= flag;
447
- });
448
- if (intersectsHorizontal && intersectsVertical) setGlobalCursorStyle("intersection", constraintFlags);
449
- else if (intersectsHorizontal) setGlobalCursorStyle("horizontal", constraintFlags);
450
- else if (intersectsVertical) setGlobalCursorStyle("vertical", constraintFlags);
451
- else resetGlobalCursorStyle();
452
- }
453
- var listenersAbortController = new AbortController();
454
- function updateListeners() {
455
- listenersAbortController.abort();
456
- listenersAbortController = new AbortController();
457
- const options = {
458
- capture: true,
459
- signal: listenersAbortController.signal
460
- };
461
- if (!registeredResizeHandlers.size) return;
462
- if (isPointerDown) {
463
- if (intersectingHandles.length > 0) ownerDocumentCounts.forEach((count, ownerDocument) => {
464
- const { body } = ownerDocument;
465
- if (count > 0) {
466
- body.addEventListener("contextmenu", handlePointerUp, options);
467
- body.addEventListener("pointerleave", handlePointerMove, options);
468
- body.addEventListener("pointermove", handlePointerMove, options);
469
- }
470
- });
471
- window.addEventListener("pointerup", handlePointerUp, options);
472
- window.addEventListener("pointercancel", handlePointerUp, options);
473
- } else ownerDocumentCounts.forEach((count, ownerDocument) => {
474
- const { body } = ownerDocument;
475
- if (count > 0) {
476
- body.addEventListener("pointerdown", handlePointerDown, options);
477
- body.addEventListener("pointermove", handlePointerMove, options);
478
- }
479
- });
480
- }
481
- function updateResizeHandlerStates(action, event) {
482
- registeredResizeHandlers.forEach((data) => {
483
- const { setResizeHandlerState } = data;
484
- setResizeHandlerState(action, intersectingHandles.includes(data), event);
485
- });
486
- }
487
- function useForceUpdate() {
488
- const [_, setCount] = useState(0);
489
- return useCallback(() => setCount((prevCount) => prevCount + 1), []);
490
- }
491
- function assert(expectedCondition, message) {
492
- if (!expectedCondition) {
493
- console.error(message);
494
- throw Error(message);
495
- }
496
- }
497
- function fuzzyCompareNumbers(actual, expected, fractionDigits = PRECISION) {
498
- if (actual.toFixed(fractionDigits) === expected.toFixed(fractionDigits)) return 0;
499
- else return actual > expected ? 1 : -1;
500
- }
501
- function fuzzyNumbersEqual$1(actual, expected, fractionDigits = PRECISION) {
502
- return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
503
- }
504
- function fuzzyNumbersEqual(actual, expected, fractionDigits) {
505
- return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
506
- }
507
- function fuzzyLayoutsEqual(actual, expected, fractionDigits) {
508
- if (actual.length !== expected.length) return false;
509
- for (let index = 0; index < actual.length; index++) {
510
- const actualSize = actual[index];
511
- const expectedSize = expected[index];
512
- if (!fuzzyNumbersEqual(actualSize, expectedSize, fractionDigits)) return false;
513
- }
514
- return true;
515
- }
516
- function resizePanel({ panelConstraints: panelConstraintsArray, panelIndex, size }) {
517
- const panelConstraints = panelConstraintsArray[panelIndex];
518
- assert(panelConstraints != null, `Panel constraints not found for index ${panelIndex}`);
519
- let { collapsedSize = 0, collapsible, maxSize = 100, minSize = 0 } = panelConstraints;
520
- if (fuzzyCompareNumbers(size, minSize) < 0) {
521
- if (collapsible) {
522
- const halfwayPoint = (collapsedSize + minSize) / 2;
523
- if (fuzzyCompareNumbers(size, halfwayPoint) < 0) size = collapsedSize;
524
- else size = minSize;
525
- } else size = minSize;
526
- }
527
- size = Math.min(maxSize, size);
528
- size = parseFloat(size.toFixed(PRECISION));
529
- return size;
530
- }
531
- function adjustLayoutByDelta({ delta, initialLayout, panelConstraints: panelConstraintsArray, pivotIndices, prevLayout, trigger }) {
532
- if (fuzzyNumbersEqual(delta, 0)) return initialLayout;
533
- const nextLayout = [...initialLayout];
534
- const [firstPivotIndex, secondPivotIndex] = pivotIndices;
535
- assert(firstPivotIndex != null, "Invalid first pivot index");
536
- assert(secondPivotIndex != null, "Invalid second pivot index");
537
- let deltaApplied = 0;
538
- if (trigger === "keyboard") {
539
- {
540
- const index = delta < 0 ? secondPivotIndex : firstPivotIndex;
541
- const panelConstraints = panelConstraintsArray[index];
542
- assert(panelConstraints, `Panel constraints not found for index ${index}`);
543
- const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
544
- if (collapsible) {
545
- const prevSize = initialLayout[index];
546
- assert(prevSize != null, `Previous layout not found for panel index ${index}`);
547
- if (fuzzyNumbersEqual(prevSize, collapsedSize)) {
548
- const localDelta = minSize - prevSize;
549
- if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
550
- }
551
- }
552
- }
553
- {
554
- const index = delta < 0 ? firstPivotIndex : secondPivotIndex;
555
- const panelConstraints = panelConstraintsArray[index];
556
- assert(panelConstraints, `No panel constraints found for index ${index}`);
557
- const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
558
- if (collapsible) {
559
- const prevSize = initialLayout[index];
560
- assert(prevSize != null, `Previous layout not found for panel index ${index}`);
561
- if (fuzzyNumbersEqual(prevSize, minSize)) {
562
- const localDelta = prevSize - collapsedSize;
563
- if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
564
- }
565
- }
566
- }
567
- }
568
- {
569
- const increment = delta < 0 ? 1 : -1;
570
- let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
571
- let maxAvailableDelta = 0;
572
- while (true) {
573
- const prevSize = initialLayout[index];
574
- assert(prevSize != null, `Previous layout not found for panel index ${index}`);
575
- const delta = resizePanel({
576
- panelConstraints: panelConstraintsArray,
577
- panelIndex: index,
578
- size: 100
579
- }) - prevSize;
580
- maxAvailableDelta += delta;
581
- index += increment;
582
- if (index < 0 || index >= panelConstraintsArray.length) break;
583
- }
584
- const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));
585
- delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta;
586
- }
587
- {
588
- let index = delta < 0 ? firstPivotIndex : secondPivotIndex;
589
- while (index >= 0 && index < panelConstraintsArray.length) {
590
- const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);
591
- const prevSize = initialLayout[index];
592
- assert(prevSize != null, `Previous layout not found for panel index ${index}`);
593
- const unsafeSize = prevSize - deltaRemaining;
594
- const safeSize = resizePanel({
595
- panelConstraints: panelConstraintsArray,
596
- panelIndex: index,
597
- size: unsafeSize
598
- });
599
- if (!fuzzyNumbersEqual(prevSize, safeSize)) {
600
- deltaApplied += prevSize - safeSize;
601
- nextLayout[index] = safeSize;
602
- if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, { numeric: true }) >= 0) break;
603
- }
604
- if (delta < 0) index--;
605
- else index++;
606
- }
607
- }
608
- if (fuzzyLayoutsEqual(prevLayout, nextLayout)) return prevLayout;
609
- {
610
- const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;
611
- const prevSize = initialLayout[pivotIndex];
612
- assert(prevSize != null, `Previous layout not found for panel index ${pivotIndex}`);
613
- const unsafeSize = prevSize + deltaApplied;
614
- const safeSize = resizePanel({
615
- panelConstraints: panelConstraintsArray,
616
- panelIndex: pivotIndex,
617
- size: unsafeSize
618
- });
619
- nextLayout[pivotIndex] = safeSize;
620
- if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {
621
- let deltaRemaining = unsafeSize - safeSize;
622
- let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
623
- while (index >= 0 && index < panelConstraintsArray.length) {
624
- const prevSize = nextLayout[index];
625
- assert(prevSize != null, `Previous layout not found for panel index ${index}`);
626
- const unsafeSize = prevSize + deltaRemaining;
627
- const safeSize = resizePanel({
628
- panelConstraints: panelConstraintsArray,
629
- panelIndex: index,
630
- size: unsafeSize
631
- });
632
- if (!fuzzyNumbersEqual(prevSize, safeSize)) {
633
- deltaRemaining -= safeSize - prevSize;
634
- nextLayout[index] = safeSize;
635
- }
636
- if (fuzzyNumbersEqual(deltaRemaining, 0)) break;
637
- if (delta > 0) index--;
638
- else index++;
639
- }
640
- }
641
- }
642
- if (!fuzzyNumbersEqual(nextLayout.reduce((total, size) => size + total, 0), 100)) return prevLayout;
643
- return nextLayout;
644
- }
645
- function calculateAriaValues({ layout, panelsArray, pivotIndices }) {
646
- let currentMinSize = 0;
647
- let currentMaxSize = 100;
648
- let totalMinSize = 0;
649
- let totalMaxSize = 0;
650
- const firstIndex = pivotIndices[0];
651
- assert(firstIndex != null, "No pivot index found");
652
- panelsArray.forEach((panelData, index) => {
653
- const { constraints } = panelData;
654
- const { maxSize = 100, minSize = 0 } = constraints;
655
- if (index === firstIndex) {
656
- currentMinSize = minSize;
657
- currentMaxSize = maxSize;
658
- } else {
659
- totalMinSize += minSize;
660
- totalMaxSize += maxSize;
661
- }
662
- });
663
- return {
664
- valueMax: Math.min(currentMaxSize, 100 - totalMinSize),
665
- valueMin: Math.max(currentMinSize, 100 - totalMaxSize),
666
- valueNow: layout[firstIndex]
667
- };
668
- }
669
- function getResizeHandleElementsForGroup(groupId, scope = document) {
670
- return Array.from(scope.querySelectorAll(`[${DATA_ATTRIBUTES.resizeHandleId}][data-panel-group-id="${groupId}"]`));
671
- }
672
- function getResizeHandleElementIndex(groupId, id, scope = document) {
673
- const index = getResizeHandleElementsForGroup(groupId, scope).findIndex((handle) => handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId) === id);
674
- return index !== null && index !== void 0 ? index : null;
675
- }
676
- function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
677
- const index = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
678
- return index != null ? [index, index + 1] : [-1, -1];
679
- }
680
- function getPanelGroupElement(id, rootElement = document) {
681
- var _dataset;
682
- if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) return rootElement;
683
- const element = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
684
- if (element) return element;
685
- return null;
686
- }
687
- function getResizeHandleElement(id, scope = document) {
688
- const element = scope.querySelector(`[${DATA_ATTRIBUTES.resizeHandleId}="${id}"]`);
689
- if (element) return element;
690
- return null;
691
- }
692
- function getResizeHandlePanelIds(groupId, handleId, panelsArray, scope = document) {
693
- var _panelsArray$index$id, _panelsArray$index, _panelsArray$id, _panelsArray;
694
- const handle = getResizeHandleElement(handleId, scope);
695
- const handles = getResizeHandleElementsForGroup(groupId, scope);
696
- const index = handle ? handles.indexOf(handle) : -1;
697
- return [(_panelsArray$index$id = (_panelsArray$index = panelsArray[index]) === null || _panelsArray$index === void 0 ? void 0 : _panelsArray$index.id) !== null && _panelsArray$index$id !== void 0 ? _panelsArray$index$id : null, (_panelsArray$id = (_panelsArray = panelsArray[index + 1]) === null || _panelsArray === void 0 ? void 0 : _panelsArray.id) !== null && _panelsArray$id !== void 0 ? _panelsArray$id : null];
698
- }
699
- function useWindowSplitterPanelGroupBehavior({ committedValuesRef, eagerValuesRef, groupId, layout, panelDataArray, panelGroupElement, setLayout }) {
700
- useRef({ didWarnAboutMissingResizeHandle: false });
701
- useIsomorphicLayoutEffect(() => {
702
- if (!panelGroupElement) return;
703
- const resizeHandleElements = getResizeHandleElementsForGroup(groupId, panelGroupElement);
704
- for (let index = 0; index < panelDataArray.length - 1; index++) {
705
- const { valueMax, valueMin, valueNow } = calculateAriaValues({
706
- layout,
707
- panelsArray: panelDataArray,
708
- pivotIndices: [index, index + 1]
709
- });
710
- const resizeHandleElement = resizeHandleElements[index];
711
- if (resizeHandleElement == null);
712
- else {
713
- const panelData = panelDataArray[index];
714
- assert(panelData, `No panel data found for index "${index}"`);
715
- resizeHandleElement.setAttribute("aria-controls", panelData.id);
716
- resizeHandleElement.setAttribute("aria-valuemax", "" + Math.round(valueMax));
717
- resizeHandleElement.setAttribute("aria-valuemin", "" + Math.round(valueMin));
718
- resizeHandleElement.setAttribute("aria-valuenow", valueNow != null ? "" + Math.round(valueNow) : "");
719
- }
720
- }
721
- return () => {
722
- resizeHandleElements.forEach((resizeHandleElement, index) => {
723
- resizeHandleElement.removeAttribute("aria-controls");
724
- resizeHandleElement.removeAttribute("aria-valuemax");
725
- resizeHandleElement.removeAttribute("aria-valuemin");
726
- resizeHandleElement.removeAttribute("aria-valuenow");
727
- });
728
- };
729
- }, [
730
- groupId,
731
- layout,
732
- panelDataArray,
733
- panelGroupElement
734
- ]);
735
- useEffect(() => {
736
- if (!panelGroupElement) return;
737
- const eagerValues = eagerValuesRef.current;
738
- assert(eagerValues, `Eager values not found`);
739
- const { panelDataArray } = eagerValues;
740
- assert(getPanelGroupElement(groupId, panelGroupElement) != null, `No group found for id "${groupId}"`);
741
- const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
742
- assert(handles, `No resize handles found for group id "${groupId}"`);
743
- const cleanupFunctions = handles.map((handle) => {
744
- const handleId = handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId);
745
- assert(handleId, `Resize handle element has no handle id attribute`);
746
- const [idBefore, idAfter] = getResizeHandlePanelIds(groupId, handleId, panelDataArray, panelGroupElement);
747
- if (idBefore == null || idAfter == null) return () => {};
748
- const onKeyDown = (event) => {
749
- if (event.defaultPrevented) return;
750
- switch (event.key) {
751
- case "Enter": {
752
- event.preventDefault();
753
- const index = panelDataArray.findIndex((panelData) => panelData.id === idBefore);
754
- if (index >= 0) {
755
- const panelData = panelDataArray[index];
756
- assert(panelData, `No panel data found for index ${index}`);
757
- const size = layout[index];
758
- const { collapsedSize = 0, collapsible, minSize = 0 } = panelData.constraints;
759
- if (size != null && collapsible) {
760
- const nextLayout = adjustLayoutByDelta({
761
- delta: fuzzyNumbersEqual(size, collapsedSize) ? minSize - collapsedSize : collapsedSize - size,
762
- initialLayout: layout,
763
- panelConstraints: panelDataArray.map((panelData) => panelData.constraints),
764
- pivotIndices: determinePivotIndices(groupId, handleId, panelGroupElement),
765
- prevLayout: layout,
766
- trigger: "keyboard"
767
- });
768
- if (layout !== nextLayout) setLayout(nextLayout);
769
- }
770
- }
771
- break;
772
- }
773
- }
774
- };
775
- handle.addEventListener("keydown", onKeyDown);
776
- return () => {
777
- handle.removeEventListener("keydown", onKeyDown);
778
- };
779
- });
780
- return () => {
781
- cleanupFunctions.forEach((cleanupFunction) => cleanupFunction());
782
- };
783
- }, [
784
- panelGroupElement,
785
- committedValuesRef,
786
- eagerValuesRef,
787
- groupId,
788
- layout,
789
- panelDataArray,
790
- setLayout
791
- ]);
792
- }
793
- function areEqual(arrayA, arrayB) {
794
- if (arrayA.length !== arrayB.length) return false;
795
- for (let index = 0; index < arrayA.length; index++) if (arrayA[index] !== arrayB[index]) return false;
796
- return true;
797
- }
798
- function getResizeEventCursorPosition(direction, event) {
799
- const isHorizontal = direction === "horizontal";
800
- const { x, y } = getResizeEventCoordinates(event);
801
- return isHorizontal ? x : y;
802
- }
803
- function calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement) {
804
- const isHorizontal = direction === "horizontal";
805
- const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement);
806
- assert(handleElement, `No resize handle element found for id "${dragHandleId}"`);
807
- const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
808
- assert(groupId, `Resize handle element has no group id attribute`);
809
- let { initialCursorPosition } = initialDragState;
810
- const cursorPosition = getResizeEventCursorPosition(direction, event);
811
- const groupElement = getPanelGroupElement(groupId, panelGroupElement);
812
- assert(groupElement, `No group element found for id "${groupId}"`);
813
- const groupRect = groupElement.getBoundingClientRect();
814
- const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height;
815
- return (cursorPosition - initialCursorPosition) / groupSizeInPixels * 100;
816
- }
817
- function calculateDeltaPercentage(event, dragHandleId, direction, initialDragState, keyboardResizeBy, panelGroupElement) {
818
- if (isKeyDown(event)) {
819
- const isHorizontal = direction === "horizontal";
820
- let delta = 0;
821
- if (event.shiftKey) delta = 100;
822
- else if (keyboardResizeBy != null) delta = keyboardResizeBy;
823
- else delta = 10;
824
- let movement = 0;
825
- switch (event.key) {
826
- case "ArrowDown":
827
- movement = isHorizontal ? 0 : delta;
828
- break;
829
- case "ArrowLeft":
830
- movement = isHorizontal ? -delta : 0;
831
- break;
832
- case "ArrowRight":
833
- movement = isHorizontal ? delta : 0;
834
- break;
835
- case "ArrowUp":
836
- movement = isHorizontal ? 0 : -delta;
837
- break;
838
- case "End":
839
- movement = 100;
840
- break;
841
- case "Home": movement = -100;
842
- }
843
- return movement;
844
- } else {
845
- if (initialDragState == null) return 0;
846
- return calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement);
847
- }
848
- }
849
- function calculateUnsafeDefaultLayout({ panelDataArray }) {
850
- const layout = Array(panelDataArray.length);
851
- const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
852
- let numPanelsWithSizes = 0;
853
- let remainingSize = 100;
854
- for (let index = 0; index < panelDataArray.length; index++) {
855
- const panelConstraints = panelConstraintsArray[index];
856
- assert(panelConstraints, `Panel constraints not found for index ${index}`);
857
- const { defaultSize } = panelConstraints;
858
- if (defaultSize != null) {
859
- numPanelsWithSizes++;
860
- layout[index] = defaultSize;
861
- remainingSize -= defaultSize;
862
- }
863
- }
864
- for (let index = 0; index < panelDataArray.length; index++) {
865
- const panelConstraints = panelConstraintsArray[index];
866
- assert(panelConstraints, `Panel constraints not found for index ${index}`);
867
- const { defaultSize } = panelConstraints;
868
- if (defaultSize != null) continue;
869
- const numRemainingPanels = panelDataArray.length - numPanelsWithSizes;
870
- const size = remainingSize / numRemainingPanels;
871
- numPanelsWithSizes++;
872
- layout[index] = size;
873
- remainingSize -= size;
874
- }
875
- return layout;
876
- }
877
- function callPanelCallbacks(panelsArray, layout, panelIdToLastNotifiedSizeMap) {
878
- layout.forEach((size, index) => {
879
- const panelData = panelsArray[index];
880
- assert(panelData, `Panel data not found for index ${index}`);
881
- const { callbacks, constraints, id: panelId } = panelData;
882
- const { collapsedSize = 0, collapsible } = constraints;
883
- const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId];
884
- if (lastNotifiedSize == null || size !== lastNotifiedSize) {
885
- panelIdToLastNotifiedSizeMap[panelId] = size;
886
- const { onCollapse, onExpand, onResize } = callbacks;
887
- if (onResize) onResize(size, lastNotifiedSize);
888
- if (collapsible && (onCollapse || onExpand)) {
889
- if (onExpand && (lastNotifiedSize == null || fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && !fuzzyNumbersEqual$1(size, collapsedSize)) onExpand();
890
- if (onCollapse && (lastNotifiedSize == null || !fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && fuzzyNumbersEqual$1(size, collapsedSize)) onCollapse();
891
- }
892
- }
893
- });
894
- }
895
- function compareLayouts(a, b) {
896
- if (a.length !== b.length) return false;
897
- else for (let index = 0; index < a.length; index++) if (a[index] != b[index]) return false;
898
- return true;
899
- }
900
- function computePanelFlexBoxStyle({ defaultSize, dragState, layout, panelData, panelIndex, precision = 3 }) {
901
- const size = layout[panelIndex];
902
- let flexGrow;
903
- if (size == null) flexGrow = defaultSize != void 0 ? defaultSize.toPrecision(precision) : "1";
904
- else if (panelData.length === 1) flexGrow = "1";
905
- else flexGrow = size.toPrecision(precision);
906
- return {
907
- flexBasis: 0,
908
- flexGrow,
909
- flexShrink: 1,
910
- overflow: "hidden",
911
- pointerEvents: dragState !== null ? "none" : void 0
912
- };
913
- }
914
- function debounce(callback, durationMs = 10) {
915
- let timeoutId = null;
916
- let callable = (...args) => {
917
- if (timeoutId !== null) clearTimeout(timeoutId);
918
- timeoutId = setTimeout(() => {
919
- callback(...args);
920
- }, durationMs);
921
- };
922
- return callable;
923
- }
924
- function initializeDefaultStorage(storageObject) {
925
- try {
926
- if (typeof localStorage !== "undefined") {
927
- storageObject.getItem = (name) => {
928
- return localStorage.getItem(name);
929
- };
930
- storageObject.setItem = (name, value) => {
931
- localStorage.setItem(name, value);
932
- };
933
- } else throw new Error("localStorage not supported in this environment");
934
- } catch (error) {
935
- console.error(error);
936
- storageObject.getItem = () => null;
937
- storageObject.setItem = () => {};
938
- }
939
- }
940
- function getPanelGroupKey(autoSaveId) {
941
- return `react-resizable-panels:${autoSaveId}`;
942
- }
943
- function getPanelKey(panels) {
944
- return panels.map((panel) => {
945
- const { constraints, id, idIsFromProps, order } = panel;
946
- if (idIsFromProps) return id;
947
- else return order ? `${order}:${JSON.stringify(constraints)}` : JSON.stringify(constraints);
948
- }).sort((a, b) => a.localeCompare(b)).join(",");
949
- }
950
- function loadSerializedPanelGroupState(autoSaveId, storage) {
951
- try {
952
- const panelGroupKey = getPanelGroupKey(autoSaveId);
953
- const serialized = storage.getItem(panelGroupKey);
954
- if (serialized) {
955
- const parsed = JSON.parse(serialized);
956
- if (typeof parsed === "object" && parsed != null) return parsed;
957
- }
958
- } catch (error) {}
959
- return null;
960
- }
961
- function loadPanelGroupState(autoSaveId, panels, storage) {
962
- var _loadSerializedPanelG, _state$panelKey;
963
- return (_state$panelKey = ((_loadSerializedPanelG = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG !== void 0 ? _loadSerializedPanelG : {})[getPanelKey(panels)]) !== null && _state$panelKey !== void 0 ? _state$panelKey : null;
964
- }
965
- function savePanelGroupState(autoSaveId, panels, panelSizesBeforeCollapse, sizes, storage) {
966
- var _loadSerializedPanelG2;
967
- const panelGroupKey = getPanelGroupKey(autoSaveId);
968
- const panelKey = getPanelKey(panels);
969
- const state = (_loadSerializedPanelG2 = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG2 !== void 0 ? _loadSerializedPanelG2 : {};
970
- state[panelKey] = {
971
- expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),
972
- layout: sizes
973
- };
974
- try {
975
- storage.setItem(panelGroupKey, JSON.stringify(state));
976
- } catch (error) {
977
- console.error(error);
978
- }
979
- }
980
- function validatePanelGroupLayout({ layout: prevLayout, panelConstraints }) {
981
- const nextLayout = [...prevLayout];
982
- const nextLayoutTotalSize = nextLayout.reduce((accumulated, current) => accumulated + current, 0);
983
- if (nextLayout.length !== panelConstraints.length) throw Error(`Invalid ${panelConstraints.length} panel layout: ${nextLayout.map((size) => `${size}%`).join(", ")}`);
984
- else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100) && nextLayout.length > 0) for (let index = 0; index < panelConstraints.length; index++) {
985
- const unsafeSize = nextLayout[index];
986
- assert(unsafeSize != null, `No layout data found for index ${index}`);
987
- const safeSize = 100 / nextLayoutTotalSize * unsafeSize;
988
- nextLayout[index] = safeSize;
989
- }
990
- let remainingSize = 0;
991
- for (let index = 0; index < panelConstraints.length; index++) {
992
- const unsafeSize = nextLayout[index];
993
- assert(unsafeSize != null, `No layout data found for index ${index}`);
994
- const safeSize = resizePanel({
995
- panelConstraints,
996
- panelIndex: index,
997
- size: unsafeSize
998
- });
999
- if (unsafeSize != safeSize) {
1000
- remainingSize += unsafeSize - safeSize;
1001
- nextLayout[index] = safeSize;
1002
- }
1003
- }
1004
- if (!fuzzyNumbersEqual(remainingSize, 0)) for (let index = 0; index < panelConstraints.length; index++) {
1005
- const prevSize = nextLayout[index];
1006
- assert(prevSize != null, `No layout data found for index ${index}`);
1007
- const unsafeSize = prevSize + remainingSize;
1008
- const safeSize = resizePanel({
1009
- panelConstraints,
1010
- panelIndex: index,
1011
- size: unsafeSize
1012
- });
1013
- if (prevSize !== safeSize) {
1014
- remainingSize -= safeSize - prevSize;
1015
- nextLayout[index] = safeSize;
1016
- if (fuzzyNumbersEqual(remainingSize, 0)) break;
1017
- }
1018
- }
1019
- return nextLayout;
1020
- }
1021
- var LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100;
1022
- var defaultStorage = {
1023
- getItem: (name) => {
1024
- initializeDefaultStorage(defaultStorage);
1025
- return defaultStorage.getItem(name);
1026
- },
1027
- setItem: (name, value) => {
1028
- initializeDefaultStorage(defaultStorage);
1029
- defaultStorage.setItem(name, value);
1030
- }
1031
- };
1032
- var debounceMap = {};
1033
- function PanelGroupWithForwardedRef({ autoSaveId = null, children, className: classNameFromProps = "", direction, forwardedRef, id: idFromProps = null, onLayout = null, keyboardResizeBy = null, storage = defaultStorage, style: styleFromProps, tagName: Type = "div", ...rest }) {
1034
- const groupId = useUniqueId(idFromProps);
1035
- const panelGroupElementRef = useRef(null);
1036
- const [dragState, setDragState] = useState(null);
1037
- const [layout, setLayout] = useState([]);
1038
- const forceUpdate = useForceUpdate();
1039
- const panelIdToLastNotifiedSizeMapRef = useRef({});
1040
- const panelSizeBeforeCollapseRef = useRef(/* @__PURE__ */ new Map());
1041
- const prevDeltaRef = useRef(0);
1042
- const committedValuesRef = useRef({
1043
- autoSaveId,
1044
- direction,
1045
- dragState,
1046
- id: groupId,
1047
- keyboardResizeBy,
1048
- onLayout,
1049
- storage
1050
- });
1051
- const eagerValuesRef = useRef({
1052
- layout,
1053
- panelDataArray: [],
1054
- panelDataArrayChanged: false
1055
- });
1056
- useRef({
1057
- didLogIdAndOrderWarning: false,
1058
- didLogPanelConstraintsWarning: false,
1059
- prevPanelIds: []
1060
- });
1061
- useImperativeHandle(forwardedRef, () => ({
1062
- getId: () => committedValuesRef.current.id,
1063
- getLayout: () => {
1064
- const { layout } = eagerValuesRef.current;
1065
- return layout;
1066
- },
1067
- setLayout: (unsafeLayout) => {
1068
- const { onLayout } = committedValuesRef.current;
1069
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1070
- const safeLayout = validatePanelGroupLayout({
1071
- layout: unsafeLayout,
1072
- panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
1073
- });
1074
- if (!areEqual(prevLayout, safeLayout)) {
1075
- setLayout(safeLayout);
1076
- eagerValuesRef.current.layout = safeLayout;
1077
- if (onLayout) onLayout(safeLayout);
1078
- callPanelCallbacks(panelDataArray, safeLayout, panelIdToLastNotifiedSizeMapRef.current);
1079
- }
1080
- }
1081
- }), []);
1082
- useIsomorphicLayoutEffect(() => {
1083
- committedValuesRef.current.autoSaveId = autoSaveId;
1084
- committedValuesRef.current.direction = direction;
1085
- committedValuesRef.current.dragState = dragState;
1086
- committedValuesRef.current.id = groupId;
1087
- committedValuesRef.current.onLayout = onLayout;
1088
- committedValuesRef.current.storage = storage;
1089
- });
1090
- useWindowSplitterPanelGroupBehavior({
1091
- committedValuesRef,
1092
- eagerValuesRef,
1093
- groupId,
1094
- layout,
1095
- panelDataArray: eagerValuesRef.current.panelDataArray,
1096
- setLayout,
1097
- panelGroupElement: panelGroupElementRef.current
1098
- });
1099
- useEffect(() => {
1100
- const { panelDataArray } = eagerValuesRef.current;
1101
- if (autoSaveId) {
1102
- if (layout.length === 0 || layout.length !== panelDataArray.length) return;
1103
- let debouncedSave = debounceMap[autoSaveId];
1104
- if (debouncedSave == null) {
1105
- debouncedSave = debounce(savePanelGroupState, LOCAL_STORAGE_DEBOUNCE_INTERVAL);
1106
- debounceMap[autoSaveId] = debouncedSave;
1107
- }
1108
- const clonedPanelDataArray = [...panelDataArray];
1109
- const clonedPanelSizesBeforeCollapse = new Map(panelSizeBeforeCollapseRef.current);
1110
- debouncedSave(autoSaveId, clonedPanelDataArray, clonedPanelSizesBeforeCollapse, layout, storage);
1111
- }
1112
- }, [
1113
- autoSaveId,
1114
- layout,
1115
- storage
1116
- ]);
1117
- useEffect(() => {});
1118
- const collapsePanel = useCallback((panelData) => {
1119
- const { onLayout } = committedValuesRef.current;
1120
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1121
- if (panelData.constraints.collapsible) {
1122
- const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1123
- const { collapsedSize = 0, panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1124
- assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1125
- if (!fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
1126
- panelSizeBeforeCollapseRef.current.set(panelData.id, panelSize);
1127
- const nextLayout = adjustLayoutByDelta({
1128
- delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - collapsedSize : collapsedSize - panelSize,
1129
- initialLayout: prevLayout,
1130
- panelConstraints: panelConstraintsArray,
1131
- pivotIndices,
1132
- prevLayout,
1133
- trigger: "imperative-api"
1134
- });
1135
- if (!compareLayouts(prevLayout, nextLayout)) {
1136
- setLayout(nextLayout);
1137
- eagerValuesRef.current.layout = nextLayout;
1138
- if (onLayout) onLayout(nextLayout);
1139
- callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1140
- }
1141
- }
1142
- }
1143
- }, []);
1144
- const expandPanel = useCallback((panelData, minSizeOverride) => {
1145
- const { onLayout } = committedValuesRef.current;
1146
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1147
- if (panelData.constraints.collapsible) {
1148
- const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1149
- const { collapsedSize = 0, panelSize = 0, minSize: minSizeFromProps = 0, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1150
- const minSize = minSizeOverride !== null && minSizeOverride !== void 0 ? minSizeOverride : minSizeFromProps;
1151
- if (fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
1152
- const prevPanelSize = panelSizeBeforeCollapseRef.current.get(panelData.id);
1153
- const baseSize = prevPanelSize != null && prevPanelSize >= minSize ? prevPanelSize : minSize;
1154
- const nextLayout = adjustLayoutByDelta({
1155
- delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - baseSize : baseSize - panelSize,
1156
- initialLayout: prevLayout,
1157
- panelConstraints: panelConstraintsArray,
1158
- pivotIndices,
1159
- prevLayout,
1160
- trigger: "imperative-api"
1161
- });
1162
- if (!compareLayouts(prevLayout, nextLayout)) {
1163
- setLayout(nextLayout);
1164
- eagerValuesRef.current.layout = nextLayout;
1165
- if (onLayout) onLayout(nextLayout);
1166
- callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1167
- }
1168
- }
1169
- }
1170
- }, []);
1171
- const getPanelSize = useCallback((panelData) => {
1172
- const { layout, panelDataArray } = eagerValuesRef.current;
1173
- const { panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1174
- assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1175
- return panelSize;
1176
- }, []);
1177
- const getPanelStyle = useCallback((panelData, defaultSize) => {
1178
- const { panelDataArray } = eagerValuesRef.current;
1179
- const panelIndex = findPanelDataIndex(panelDataArray, panelData);
1180
- return computePanelFlexBoxStyle({
1181
- defaultSize,
1182
- dragState,
1183
- layout,
1184
- panelData: panelDataArray,
1185
- panelIndex
1186
- });
1187
- }, [dragState, layout]);
1188
- const isPanelCollapsed = useCallback((panelData) => {
1189
- const { layout, panelDataArray } = eagerValuesRef.current;
1190
- const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1191
- assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1192
- return collapsible === true && fuzzyNumbersEqual$1(panelSize, collapsedSize);
1193
- }, []);
1194
- const isPanelExpanded = useCallback((panelData) => {
1195
- const { layout, panelDataArray } = eagerValuesRef.current;
1196
- const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
1197
- assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1198
- return !collapsible || fuzzyCompareNumbers(panelSize, collapsedSize) > 0;
1199
- }, []);
1200
- const registerPanel = useCallback((panelData) => {
1201
- const { panelDataArray } = eagerValuesRef.current;
1202
- panelDataArray.push(panelData);
1203
- panelDataArray.sort((panelA, panelB) => {
1204
- const orderA = panelA.order;
1205
- const orderB = panelB.order;
1206
- if (orderA == null && orderB == null) return 0;
1207
- else if (orderA == null) return -1;
1208
- else if (orderB == null) return 1;
1209
- else return orderA - orderB;
1210
- });
1211
- eagerValuesRef.current.panelDataArrayChanged = true;
1212
- forceUpdate();
1213
- }, [forceUpdate]);
1214
- useIsomorphicLayoutEffect(() => {
1215
- if (eagerValuesRef.current.panelDataArrayChanged) {
1216
- eagerValuesRef.current.panelDataArrayChanged = false;
1217
- const { autoSaveId, onLayout, storage } = committedValuesRef.current;
1218
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1219
- let unsafeLayout = null;
1220
- if (autoSaveId) {
1221
- const state = loadPanelGroupState(autoSaveId, panelDataArray, storage);
1222
- if (state) {
1223
- panelSizeBeforeCollapseRef.current = new Map(Object.entries(state.expandToSizes));
1224
- unsafeLayout = state.layout;
1225
- }
1226
- }
1227
- if (unsafeLayout == null) unsafeLayout = calculateUnsafeDefaultLayout({ panelDataArray });
1228
- const nextLayout = validatePanelGroupLayout({
1229
- layout: unsafeLayout,
1230
- panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
1231
- });
1232
- if (!areEqual(prevLayout, nextLayout)) {
1233
- setLayout(nextLayout);
1234
- eagerValuesRef.current.layout = nextLayout;
1235
- if (onLayout) onLayout(nextLayout);
1236
- callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1237
- }
1238
- }
1239
- });
1240
- useIsomorphicLayoutEffect(() => {
1241
- const eagerValues = eagerValuesRef.current;
1242
- return () => {
1243
- eagerValues.layout = [];
1244
- };
1245
- }, []);
1246
- const registerResizeHandle = useCallback((dragHandleId) => {
1247
- let isRTL = false;
1248
- const panelGroupElement = panelGroupElementRef.current;
1249
- if (panelGroupElement) {
1250
- if (window.getComputedStyle(panelGroupElement, null).getPropertyValue("direction") === "rtl") isRTL = true;
1251
- }
1252
- return function resizeHandler(event) {
1253
- event.preventDefault();
1254
- const panelGroupElement = panelGroupElementRef.current;
1255
- if (!panelGroupElement) return () => null;
1256
- const { direction, dragState, id: groupId, keyboardResizeBy, onLayout } = committedValuesRef.current;
1257
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1258
- const { initialLayout } = dragState !== null && dragState !== void 0 ? dragState : {};
1259
- const pivotIndices = determinePivotIndices(groupId, dragHandleId, panelGroupElement);
1260
- let delta = calculateDeltaPercentage(event, dragHandleId, direction, dragState, keyboardResizeBy, panelGroupElement);
1261
- const isHorizontal = direction === "horizontal";
1262
- if (isHorizontal && isRTL) delta = -delta;
1263
- const panelConstraints = panelDataArray.map((panelData) => panelData.constraints);
1264
- const nextLayout = adjustLayoutByDelta({
1265
- delta,
1266
- initialLayout: initialLayout !== null && initialLayout !== void 0 ? initialLayout : prevLayout,
1267
- panelConstraints,
1268
- pivotIndices,
1269
- prevLayout,
1270
- trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
1271
- });
1272
- const layoutChanged = !compareLayouts(prevLayout, nextLayout);
1273
- if (isPointerEvent(event) || isMouseEvent(event)) {
1274
- if (prevDeltaRef.current != delta) {
1275
- prevDeltaRef.current = delta;
1276
- if (!layoutChanged && delta !== 0) {
1277
- if (isHorizontal) reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX);
1278
- else reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX);
1279
- } else reportConstraintsViolation(dragHandleId, 0);
1280
- }
1281
- }
1282
- if (layoutChanged) {
1283
- setLayout(nextLayout);
1284
- eagerValuesRef.current.layout = nextLayout;
1285
- if (onLayout) onLayout(nextLayout);
1286
- callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1287
- }
1288
- };
1289
- }, []);
1290
- const resizePanel = useCallback((panelData, unsafePanelSize) => {
1291
- const { onLayout } = committedValuesRef.current;
1292
- const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
1293
- const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
1294
- const { panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
1295
- assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
1296
- const nextLayout = adjustLayoutByDelta({
1297
- delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - unsafePanelSize : unsafePanelSize - panelSize,
1298
- initialLayout: prevLayout,
1299
- panelConstraints: panelConstraintsArray,
1300
- pivotIndices,
1301
- prevLayout,
1302
- trigger: "imperative-api"
1303
- });
1304
- if (!compareLayouts(prevLayout, nextLayout)) {
1305
- setLayout(nextLayout);
1306
- eagerValuesRef.current.layout = nextLayout;
1307
- if (onLayout) onLayout(nextLayout);
1308
- callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
1309
- }
1310
- }, []);
1311
- const reevaluatePanelConstraints = useCallback((panelData, prevConstraints) => {
1312
- const { layout, panelDataArray } = eagerValuesRef.current;
1313
- const { collapsedSize: prevCollapsedSize = 0, collapsible: prevCollapsible } = prevConstraints;
1314
- const { collapsedSize: nextCollapsedSize = 0, collapsible: nextCollapsible, maxSize: nextMaxSize = 100, minSize: nextMinSize = 0 } = panelData.constraints;
1315
- const { panelSize: prevPanelSize } = panelDataHelper(panelDataArray, panelData, layout);
1316
- if (prevPanelSize == null) return;
1317
- if (prevCollapsible && nextCollapsible && fuzzyNumbersEqual$1(prevPanelSize, prevCollapsedSize)) {
1318
- if (!fuzzyNumbersEqual$1(prevCollapsedSize, nextCollapsedSize)) resizePanel(panelData, nextCollapsedSize);
1319
- } else if (prevPanelSize < nextMinSize) resizePanel(panelData, nextMinSize);
1320
- else if (prevPanelSize > nextMaxSize) resizePanel(panelData, nextMaxSize);
1321
- }, [resizePanel]);
1322
- const startDragging = useCallback((dragHandleId, event) => {
1323
- const { direction } = committedValuesRef.current;
1324
- const { layout } = eagerValuesRef.current;
1325
- if (!panelGroupElementRef.current) return;
1326
- const handleElement = getResizeHandleElement(dragHandleId, panelGroupElementRef.current);
1327
- assert(handleElement, `Drag handle element not found for id "${dragHandleId}"`);
1328
- const initialCursorPosition = getResizeEventCursorPosition(direction, event);
1329
- setDragState({
1330
- dragHandleId,
1331
- dragHandleRect: handleElement.getBoundingClientRect(),
1332
- initialCursorPosition,
1333
- initialLayout: layout
1334
- });
1335
- }, []);
1336
- const stopDragging = useCallback(() => {
1337
- setDragState(null);
1338
- }, []);
1339
- const unregisterPanel = useCallback((panelData) => {
1340
- const { panelDataArray } = eagerValuesRef.current;
1341
- const index = findPanelDataIndex(panelDataArray, panelData);
1342
- if (index >= 0) {
1343
- panelDataArray.splice(index, 1);
1344
- delete panelIdToLastNotifiedSizeMapRef.current[panelData.id];
1345
- eagerValuesRef.current.panelDataArrayChanged = true;
1346
- forceUpdate();
1347
- }
1348
- }, [forceUpdate]);
1349
- const context = useMemo(() => ({
1350
- collapsePanel,
1351
- direction,
1352
- dragState,
1353
- expandPanel,
1354
- getPanelSize,
1355
- getPanelStyle,
1356
- groupId,
1357
- isPanelCollapsed,
1358
- isPanelExpanded,
1359
- reevaluatePanelConstraints,
1360
- registerPanel,
1361
- registerResizeHandle,
1362
- resizePanel,
1363
- startDragging,
1364
- stopDragging,
1365
- unregisterPanel,
1366
- panelGroupElement: panelGroupElementRef.current
1367
- }), [
1368
- collapsePanel,
1369
- dragState,
1370
- direction,
1371
- expandPanel,
1372
- getPanelSize,
1373
- getPanelStyle,
1374
- groupId,
1375
- isPanelCollapsed,
1376
- isPanelExpanded,
1377
- reevaluatePanelConstraints,
1378
- registerPanel,
1379
- registerResizeHandle,
1380
- resizePanel,
1381
- startDragging,
1382
- stopDragging,
1383
- unregisterPanel
1384
- ]);
1385
- const style = {
1386
- display: "flex",
1387
- flexDirection: direction === "horizontal" ? "row" : "column",
1388
- height: "100%",
1389
- overflow: "hidden",
1390
- width: "100%"
1391
- };
1392
- return createElement(PanelGroupContext.Provider, { value: context }, createElement(Type, {
1393
- ...rest,
1394
- children,
1395
- className: classNameFromProps,
1396
- id: idFromProps,
1397
- ref: panelGroupElementRef,
1398
- style: {
1399
- ...style,
1400
- ...styleFromProps
1401
- },
1402
- [DATA_ATTRIBUTES.group]: "",
1403
- [DATA_ATTRIBUTES.groupDirection]: direction,
1404
- [DATA_ATTRIBUTES.groupId]: groupId
1405
- }));
1406
- }
1407
- var PanelGroup = forwardRef((props, ref) => createElement(PanelGroupWithForwardedRef, {
1408
- ...props,
1409
- forwardedRef: ref
1410
- }));
1411
- PanelGroupWithForwardedRef.displayName = "PanelGroup";
1412
- PanelGroup.displayName = "forwardRef(PanelGroup)";
1413
- function findPanelDataIndex(panelDataArray, panelData) {
1414
- return panelDataArray.findIndex((prevPanelData) => prevPanelData === panelData || prevPanelData.id === panelData.id);
1415
- }
1416
- function panelDataHelper(panelDataArray, panelData, layout) {
1417
- const panelIndex = findPanelDataIndex(panelDataArray, panelData);
1418
- const pivotIndices = panelIndex === panelDataArray.length - 1 ? [panelIndex - 1, panelIndex] : [panelIndex, panelIndex + 1];
1419
- const panelSize = layout[panelIndex];
1420
- return {
1421
- ...panelData.constraints,
1422
- panelSize,
1423
- pivotIndices
1424
- };
1425
- }
1426
- function useWindowSplitterResizeHandlerBehavior({ disabled, handleId, resizeHandler, panelGroupElement }) {
1427
- useEffect(() => {
1428
- if (disabled || resizeHandler == null || panelGroupElement == null) return;
1429
- const handleElement = getResizeHandleElement(handleId, panelGroupElement);
1430
- if (handleElement == null) return;
1431
- const onKeyDown = (event) => {
1432
- if (event.defaultPrevented) return;
1433
- switch (event.key) {
1434
- case "ArrowDown":
1435
- case "ArrowLeft":
1436
- case "ArrowRight":
1437
- case "ArrowUp":
1438
- case "End":
1439
- case "Home":
1440
- event.preventDefault();
1441
- resizeHandler(event);
1442
- break;
1443
- case "F6": {
1444
- event.preventDefault();
1445
- const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
1446
- assert(groupId, `No group element found for id "${groupId}"`);
1447
- const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
1448
- const index = getResizeHandleElementIndex(groupId, handleId, panelGroupElement);
1449
- assert(index !== null, `No resize element found for id "${handleId}"`);
1450
- handles[event.shiftKey ? index > 0 ? index - 1 : handles.length - 1 : index + 1 < handles.length ? index + 1 : 0].focus();
1451
- break;
1452
- }
1453
- }
1454
- };
1455
- handleElement.addEventListener("keydown", onKeyDown);
1456
- return () => {
1457
- handleElement.removeEventListener("keydown", onKeyDown);
1458
- };
1459
- }, [
1460
- panelGroupElement,
1461
- disabled,
1462
- handleId,
1463
- resizeHandler
1464
- ]);
1465
- }
1466
- function PanelResizeHandle({ children = null, className: classNameFromProps = "", disabled = false, hitAreaMargins, id: idFromProps, onBlur, onClick, onDragging, onFocus, onPointerDown, onPointerUp, style: styleFromProps = {}, tabIndex = 0, tagName: Type = "div", ...rest }) {
1467
- var _hitAreaMargins$coars, _hitAreaMargins$fine;
1468
- const elementRef = useRef(null);
1469
- const callbacksRef = useRef({
1470
- onClick,
1471
- onDragging,
1472
- onPointerDown,
1473
- onPointerUp
1474
- });
1475
- useEffect(() => {
1476
- callbacksRef.current.onClick = onClick;
1477
- callbacksRef.current.onDragging = onDragging;
1478
- callbacksRef.current.onPointerDown = onPointerDown;
1479
- callbacksRef.current.onPointerUp = onPointerUp;
1480
- });
1481
- const panelGroupContext = useContext(PanelGroupContext);
1482
- if (panelGroupContext === null) throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);
1483
- const { direction, groupId, registerResizeHandle: registerResizeHandleWithParentGroup, startDragging, stopDragging, panelGroupElement } = panelGroupContext;
1484
- const resizeHandleId = useUniqueId(idFromProps);
1485
- const [state, setState] = useState("inactive");
1486
- const [isFocused, setIsFocused] = useState(false);
1487
- const [resizeHandler, setResizeHandler] = useState(null);
1488
- const committedValuesRef = useRef({ state });
1489
- useIsomorphicLayoutEffect(() => {
1490
- committedValuesRef.current.state = state;
1491
- });
1492
- useEffect(() => {
1493
- if (disabled) setResizeHandler(null);
1494
- else {
1495
- const resizeHandler = registerResizeHandleWithParentGroup(resizeHandleId);
1496
- setResizeHandler(() => resizeHandler);
1497
- }
1498
- }, [
1499
- disabled,
1500
- resizeHandleId,
1501
- registerResizeHandleWithParentGroup
1502
- ]);
1503
- const coarseHitAreaMargins = (_hitAreaMargins$coars = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.coarse) !== null && _hitAreaMargins$coars !== void 0 ? _hitAreaMargins$coars : 15;
1504
- const fineHitAreaMargins = (_hitAreaMargins$fine = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.fine) !== null && _hitAreaMargins$fine !== void 0 ? _hitAreaMargins$fine : 5;
1505
- useEffect(() => {
1506
- if (disabled || resizeHandler == null) return;
1507
- const element = elementRef.current;
1508
- assert(element, "Element ref not attached");
1509
- let didMove = false;
1510
- const setResizeHandlerState = (action, isActive, event) => {
1511
- if (!isActive) {
1512
- setState("inactive");
1513
- return;
1514
- }
1515
- switch (action) {
1516
- case "down": {
1517
- setState("drag");
1518
- didMove = false;
1519
- assert(event, "Expected event to be defined for \"down\" action");
1520
- startDragging(resizeHandleId, event);
1521
- const { onDragging, onPointerDown } = callbacksRef.current;
1522
- onDragging === null || onDragging === void 0 || onDragging(true);
1523
- onPointerDown === null || onPointerDown === void 0 || onPointerDown();
1524
- break;
1525
- }
1526
- case "move": {
1527
- const { state } = committedValuesRef.current;
1528
- didMove = true;
1529
- if (state !== "drag") setState("hover");
1530
- assert(event, "Expected event to be defined for \"move\" action");
1531
- resizeHandler(event);
1532
- break;
1533
- }
1534
- case "up": {
1535
- setState("hover");
1536
- stopDragging();
1537
- const { onClick, onDragging, onPointerUp } = callbacksRef.current;
1538
- onDragging === null || onDragging === void 0 || onDragging(false);
1539
- onPointerUp === null || onPointerUp === void 0 || onPointerUp();
1540
- if (!didMove) onClick === null || onClick === void 0 || onClick();
1541
- break;
1542
- }
1543
- }
1544
- };
1545
- return registerResizeHandle(resizeHandleId, element, direction, {
1546
- coarse: coarseHitAreaMargins,
1547
- fine: fineHitAreaMargins
1548
- }, setResizeHandlerState);
1549
- }, [
1550
- coarseHitAreaMargins,
1551
- direction,
1552
- disabled,
1553
- fineHitAreaMargins,
1554
- registerResizeHandleWithParentGroup,
1555
- resizeHandleId,
1556
- resizeHandler,
1557
- startDragging,
1558
- stopDragging
1559
- ]);
1560
- useWindowSplitterResizeHandlerBehavior({
1561
- disabled,
1562
- handleId: resizeHandleId,
1563
- resizeHandler,
1564
- panelGroupElement
1565
- });
1566
- const style = {
1567
- touchAction: "none",
1568
- userSelect: "none"
1569
- };
1570
- return createElement(Type, {
1571
- ...rest,
1572
- children,
1573
- className: classNameFromProps,
1574
- id: idFromProps,
1575
- onBlur: () => {
1576
- setIsFocused(false);
1577
- onBlur === null || onBlur === void 0 || onBlur();
1578
- },
1579
- onFocus: () => {
1580
- setIsFocused(true);
1581
- onFocus === null || onFocus === void 0 || onFocus();
1582
- },
1583
- ref: elementRef,
1584
- role: "separator",
1585
- style: {
1586
- ...style,
1587
- ...styleFromProps
1588
- },
1589
- tabIndex,
1590
- [DATA_ATTRIBUTES.groupDirection]: direction,
1591
- [DATA_ATTRIBUTES.groupId]: groupId,
1592
- [DATA_ATTRIBUTES.resizeHandle]: "",
1593
- [DATA_ATTRIBUTES.resizeHandleActive]: state === "drag" ? "pointer" : isFocused ? "keyboard" : void 0,
1594
- [DATA_ATTRIBUTES.resizeHandleEnabled]: !disabled,
1595
- [DATA_ATTRIBUTES.resizeHandleId]: resizeHandleId,
1596
- [DATA_ATTRIBUTES.resizeHandleState]: state
1597
- });
1598
- }
1599
- PanelResizeHandle.displayName = "PanelResizeHandle";
1600
- export { DATA_ATTRIBUTES, Panel, PanelGroup, PanelResizeHandle, assert, getPanelGroupElement, getResizeHandleElement, getResizeHandleElementIndex, getResizeHandleElementsForGroup, getResizeHandlePanelIds, intersects };