@dbcdk/react-components 0.0.103 → 0.0.105

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 (357) hide show
  1. package/dist/assets/logo.cjs +87 -0
  2. package/dist/assets/logo.js +85 -0
  3. package/dist/client.cjs +587 -0
  4. package/dist/client.d.ts +83 -0
  5. package/dist/client.js +84 -0
  6. package/dist/components/accordion/Accordion.cjs +117 -0
  7. package/dist/components/accordion/Accordion.d.ts +5 -2
  8. package/dist/components/accordion/Accordion.js +111 -0
  9. package/dist/components/accordion/Accordion.module.css +41 -0
  10. package/dist/components/accordion/components/AccordionRow.cjs +120 -0
  11. package/dist/components/accordion/components/AccordionRow.js +114 -0
  12. package/dist/components/accordion/components/AccordionRow.module.css +133 -0
  13. package/dist/components/alert/Alert.cjs +52 -0
  14. package/dist/components/alert/Alert.d.ts +2 -1
  15. package/dist/components/alert/Alert.js +46 -0
  16. package/dist/components/alert/Alert.module.css +97 -0
  17. package/dist/components/app-header/AppHeader.cjs +14 -0
  18. package/dist/components/app-header/AppHeader.js +8 -0
  19. package/dist/components/app-header/AppHeader.module.css +74 -0
  20. package/dist/components/attribute-chip/AttributeChip.cjs +22 -0
  21. package/dist/components/attribute-chip/AttributeChip.js +16 -0
  22. package/dist/components/attribute-chip/AttributeChip.module.css +65 -0
  23. package/dist/components/avatar/Avatar.cjs +111 -0
  24. package/dist/components/avatar/Avatar.js +86 -0
  25. package/dist/components/avatar/Avatar.module.css +91 -0
  26. package/dist/components/breadcrumbs/Breadcrumbs.cjs +24 -0
  27. package/dist/components/breadcrumbs/Breadcrumbs.js +18 -0
  28. package/dist/components/breadcrumbs/Breadcrumbs.module.css +80 -0
  29. package/dist/components/button/Button.cjs +149 -0
  30. package/dist/components/button/Button.js +124 -0
  31. package/dist/components/button/Button.module.css +260 -0
  32. package/dist/components/button-select/ButtonSelect.cjs +35 -0
  33. package/dist/components/button-select/ButtonSelect.js +29 -0
  34. package/dist/components/button-select/ButtonSelect.module.css +40 -0
  35. package/dist/components/card/Card.cjs +112 -0
  36. package/dist/components/card/Card.d.ts +2 -1
  37. package/dist/components/card/Card.js +106 -0
  38. package/dist/components/card/Card.module.css +187 -0
  39. package/dist/components/card/components/CardMeta.cjs +62 -0
  40. package/dist/components/card/components/CardMeta.js +55 -0
  41. package/dist/components/card/components/CardMeta.module.css +55 -0
  42. package/dist/components/card-container/CardContainer.cjs +34 -0
  43. package/dist/components/card-container/CardContainer.js +28 -0
  44. package/dist/components/card-container/CardContainer.module.css +63 -0
  45. package/dist/components/chip/Chip.cjs +65 -0
  46. package/dist/components/chip/Chip.js +59 -0
  47. package/dist/components/chip/Chip.module.css +236 -0
  48. package/dist/components/circle/Circle.cjs +33 -0
  49. package/dist/components/circle/Circle.js +27 -0
  50. package/dist/components/circle/Circle.module.css +128 -0
  51. package/dist/components/clear-button/ClearButton.cjs +33 -0
  52. package/dist/components/clear-button/ClearButton.d.ts +2 -1
  53. package/dist/components/clear-button/ClearButton.js +27 -0
  54. package/dist/components/clear-button/ClearButton.module.css +26 -0
  55. package/dist/components/code-block/CodeBlock.cjs +97 -0
  56. package/dist/components/code-block/CodeBlock.js +91 -0
  57. package/dist/components/code-block/CodeBlock.module.css +124 -0
  58. package/dist/components/copy-button/CopyButton.cjs +139 -0
  59. package/dist/components/copy-button/CopyButton.js +133 -0
  60. package/dist/components/copy-button/CopyButton.module.css +22 -0
  61. package/dist/components/datetime-picker/DateTimePicker.cjs +559 -0
  62. package/dist/components/datetime-picker/DateTimePicker.js +553 -0
  63. package/dist/components/datetime-picker/DateTimePicker.module.css +155 -0
  64. package/dist/components/datetime-picker/dateTimeHelpers.cjs +179 -0
  65. package/dist/components/datetime-picker/dateTimeHelpers.js +160 -0
  66. package/dist/components/divider/Divider.cjs +22 -0
  67. package/dist/components/divider/Divider.js +20 -0
  68. package/dist/components/filter-field/FilterField.cjs +296 -0
  69. package/dist/components/filter-field/FilterField.js +289 -0
  70. package/dist/components/filter-field/FilterField.module.css +379 -0
  71. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +115 -0
  72. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +108 -0
  73. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +59 -0
  74. package/dist/components/forms/checkbox/Checkbox.cjs +88 -0
  75. package/dist/components/forms/checkbox/Checkbox.js +82 -0
  76. package/dist/components/forms/checkbox/Checkbox.module.css +104 -0
  77. package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +121 -0
  78. package/dist/components/forms/checkbox-group/CheckboxGroup.js +115 -0
  79. package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +115 -0
  80. package/dist/components/forms/form-select/FormSelect.cjs +191 -0
  81. package/dist/components/forms/form-select/FormSelect.js +166 -0
  82. package/dist/components/forms/form-select/FormSelect.module.css +236 -0
  83. package/dist/components/forms/input/Input.cjs +188 -0
  84. package/dist/components/forms/input/Input.d.ts +1 -0
  85. package/dist/components/forms/input/Input.js +182 -0
  86. package/dist/components/forms/input/Input.module.css +468 -0
  87. package/dist/components/forms/input-container/InputContainer.cjs +72 -0
  88. package/dist/components/forms/input-container/InputContainer.js +66 -0
  89. package/dist/components/forms/input-container/InputContainer.module.css +59 -0
  90. package/dist/components/forms/multi-select/MultiSelect.cjs +227 -0
  91. package/dist/components/forms/multi-select/MultiSelect.js +225 -0
  92. package/dist/components/forms/radio-buttons/RadioButton.cjs +91 -0
  93. package/dist/components/forms/radio-buttons/RadioButton.js +85 -0
  94. package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +74 -0
  95. package/dist/components/forms/radio-buttons/RadioButtonGroup.js +72 -0
  96. package/dist/components/forms/radio-buttons/RadioButtons.module.css +118 -0
  97. package/dist/components/forms/select/Select.cjs +286 -0
  98. package/dist/components/forms/select/Select.js +280 -0
  99. package/dist/components/forms/select/Select.module.css +32 -0
  100. package/dist/components/forms/text-area/Textarea.cjs +116 -0
  101. package/dist/components/forms/text-area/Textarea.js +110 -0
  102. package/dist/components/forms/text-area/Textarea.module.css +70 -0
  103. package/dist/components/forms/typeahead/Typeahead.cjs +792 -0
  104. package/dist/components/forms/typeahead/Typeahead.js +768 -0
  105. package/dist/components/forms/typeahead/Typeahead.module.css +38 -0
  106. package/dist/components/grid/Grid.cjs +45 -0
  107. package/dist/components/grid/Grid.js +38 -0
  108. package/dist/components/grid/Grid.module.css +35 -0
  109. package/dist/components/headline/CollapsibleHeadline.cjs +89 -0
  110. package/dist/components/headline/CollapsibleHeadline.d.ts +4 -4
  111. package/dist/components/headline/CollapsibleHeadline.js +83 -0
  112. package/dist/components/headline/Headline.cjs +59 -0
  113. package/dist/components/headline/Headline.js +53 -0
  114. package/dist/components/headline/Headline.module.css +185 -0
  115. package/dist/components/hyperlink/Hyperlink.cjs +107 -0
  116. package/dist/components/hyperlink/Hyperlink.js +82 -0
  117. package/dist/components/hyperlink/Hyperlink.module.css +121 -0
  118. package/dist/components/icon/Icon.cjs +27 -0
  119. package/dist/components/icon/Icon.js +20 -0
  120. package/dist/components/icon/Icon.module.css +36 -0
  121. package/dist/components/inline-status/InlineStatus.cjs +39 -0
  122. package/dist/components/inline-status/InlineStatus.js +33 -0
  123. package/dist/components/inline-status/InlineStatus.module.css +92 -0
  124. package/dist/components/interval-select/IntervalSelect.cjs +203 -0
  125. package/dist/components/interval-select/IntervalSelect.js +201 -0
  126. package/dist/components/json-viewer/HighlightedText.cjs +13 -0
  127. package/dist/components/json-viewer/HighlightedText.js +11 -0
  128. package/dist/components/json-viewer/JsonNode.cjs +124 -0
  129. package/dist/components/json-viewer/JsonNode.js +118 -0
  130. package/dist/components/json-viewer/JsonViewer.cjs +164 -0
  131. package/dist/components/json-viewer/JsonViewer.js +158 -0
  132. package/dist/components/json-viewer/JsonViewer.module.css +346 -0
  133. package/dist/components/json-viewer/types.cjs +2 -0
  134. package/dist/components/json-viewer/types.js +1 -0
  135. package/dist/components/json-viewer/useClipboardStatus.cjs +15 -0
  136. package/dist/components/json-viewer/useClipboardStatus.js +13 -0
  137. package/dist/components/json-viewer/utils.cjs +126 -0
  138. package/dist/components/json-viewer/utils.js +111 -0
  139. package/dist/components/media-card/MediaCard.cjs +60 -0
  140. package/dist/components/media-card/MediaCard.d.ts +19 -0
  141. package/dist/components/media-card/MediaCard.js +54 -0
  142. package/dist/components/media-card/MediaCard.module.css +92 -0
  143. package/dist/components/menu/Menu.cjs +287 -0
  144. package/dist/components/menu/Menu.js +262 -0
  145. package/dist/components/menu/Menu.module.css +220 -0
  146. package/dist/components/meta-bar/MetaBar.cjs +28 -0
  147. package/dist/components/meta-bar/MetaBar.js +22 -0
  148. package/dist/components/meta-bar/MetaBar.module.css +27 -0
  149. package/dist/components/nav-bar/NavBar.cjs +104 -0
  150. package/dist/components/nav-bar/NavBar.d.ts +4 -3
  151. package/dist/components/nav-bar/NavBar.js +98 -0
  152. package/dist/components/nav-bar/NavBar.module.css +225 -0
  153. package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +30 -0
  154. package/dist/components/overlay/fade-overlay/FadeOverlay.js +24 -0
  155. package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
  156. package/dist/components/overlay/modal/Modal.cjs +189 -0
  157. package/dist/components/overlay/modal/Modal.d.ts +2 -1
  158. package/dist/components/overlay/modal/Modal.js +183 -0
  159. package/dist/components/overlay/modal/Modal.module.css +112 -0
  160. package/dist/components/overlay/modal/provider/ModalProvider.cjs +98 -0
  161. package/dist/components/overlay/modal/provider/ModalProvider.js +95 -0
  162. package/dist/components/overlay/side-panel/SidePanel.cjs +173 -0
  163. package/dist/components/overlay/side-panel/SidePanel.js +167 -0
  164. package/dist/components/overlay/side-panel/SidePanel.module.css +177 -0
  165. package/dist/components/overlay/side-panel/useSidePanel.cjs +16 -0
  166. package/dist/components/overlay/side-panel/useSidePanel.js +14 -0
  167. package/dist/components/overlay/tooltip/Tooltip.cjs +34 -0
  168. package/dist/components/overlay/tooltip/Tooltip.js +32 -0
  169. package/dist/components/overlay/tooltip/Tooltip.module.css +104 -0
  170. package/dist/components/overlay/tooltip/TooltipProvider.cjs +238 -0
  171. package/dist/components/overlay/tooltip/TooltipProvider.js +231 -0
  172. package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +117 -0
  173. package/dist/components/overlay/tooltip/useTooltipTrigger.js +115 -0
  174. package/dist/components/page/Page.cjs +63 -0
  175. package/dist/components/page/Page.js +57 -0
  176. package/dist/components/page/Page.module.css +95 -0
  177. package/dist/components/page-layout/PageLayout.cjs +97 -0
  178. package/dist/components/page-layout/PageLayout.d.ts +0 -5
  179. package/dist/components/page-layout/PageLayout.js +91 -0
  180. package/dist/components/page-layout/PageLayout.module.css +236 -0
  181. package/dist/components/page-layout/components/footer/Footer.cjs +53 -0
  182. package/dist/components/page-layout/components/footer/Footer.js +47 -0
  183. package/dist/components/page-layout/components/footer/Footer.module.css +89 -0
  184. package/dist/components/pagination/Pagination.cjs +160 -0
  185. package/dist/components/pagination/Pagination.js +154 -0
  186. package/dist/components/pagination/Pagination.module.css +25 -0
  187. package/dist/components/panel/Panel.cjs +38 -0
  188. package/dist/components/panel/Panel.js +32 -0
  189. package/dist/components/panel/Panel.module.css +30 -0
  190. package/dist/components/popover/Popover.cjs +331 -0
  191. package/dist/components/popover/Popover.js +307 -0
  192. package/dist/components/popover/Popover.module.css +52 -0
  193. package/dist/components/search-box/SearchBox.cjs +274 -0
  194. package/dist/components/search-box/SearchBox.js +268 -0
  195. package/dist/components/search-box/SearchBox.module.css +27 -0
  196. package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +127 -0
  197. package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +121 -0
  198. package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +174 -0
  199. package/dist/components/sidebar/Sidebar.cjs +39 -0
  200. package/dist/components/sidebar/Sidebar.js +37 -0
  201. package/dist/components/sidebar/components/SidebarItem.cjs +29 -0
  202. package/dist/components/sidebar/components/SidebarItem.js +27 -0
  203. package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
  204. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +133 -0
  205. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +127 -0
  206. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +29 -0
  207. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +214 -0
  208. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +207 -0
  209. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +260 -0
  210. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +54 -0
  211. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +47 -0
  212. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +106 -0
  213. package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +61 -0
  214. package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +55 -0
  215. package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +20 -0
  216. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +97 -0
  217. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +91 -0
  218. package/dist/components/sidebar/providers/SidebarProvider.cjs +223 -0
  219. package/dist/components/sidebar/providers/SidebarProvider.js +220 -0
  220. package/dist/components/skeleton-loader/SkeletonLoader.cjs +442 -0
  221. package/dist/components/skeleton-loader/SkeletonLoader.js +440 -0
  222. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +42 -0
  223. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +36 -0
  224. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +51 -0
  225. package/dist/components/split-button/SplitButton.cjs +46 -0
  226. package/dist/components/split-button/SplitButton.js +40 -0
  227. package/dist/components/split-button/SplitButton.module.css +32 -0
  228. package/dist/components/split-pane/SplitPane.cjs +188 -0
  229. package/dist/components/split-pane/SplitPane.d.ts +2 -1
  230. package/dist/components/split-pane/SplitPane.js +179 -0
  231. package/dist/components/split-pane/SplitPane.module.css +118 -0
  232. package/dist/components/split-pane/provider/SplitPaneContext.cjs +129 -0
  233. package/dist/components/split-pane/provider/SplitPaneContext.js +121 -0
  234. package/dist/components/stack/Stack.cjs +47 -0
  235. package/dist/components/stack/Stack.d.ts +1 -1
  236. package/dist/components/stack/Stack.js +41 -0
  237. package/dist/components/stack/Stack.module.css +61 -0
  238. package/dist/components/state-page/StatePage.cjs +48 -0
  239. package/dist/components/state-page/StatePage.js +42 -0
  240. package/dist/components/state-page/StatePage.module.css +9 -0
  241. package/dist/components/state-page/empty.cjs +664 -0
  242. package/dist/components/state-page/empty.js +662 -0
  243. package/dist/components/state-page/error.cjs +310 -0
  244. package/dist/components/state-page/error.js +308 -0
  245. package/dist/components/state-page/notFound.cjs +243 -0
  246. package/dist/components/state-page/notFound.js +241 -0
  247. package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +98 -0
  248. package/dist/components/sticky-footer-layout/StickyFooterLayout.js +96 -0
  249. package/dist/components/table/Table.cjs +216 -0
  250. package/dist/components/table/Table.js +210 -0
  251. package/dist/components/table/Table.module.css +534 -0
  252. package/dist/components/table/Table.types.cjs +2 -0
  253. package/dist/components/table/Table.types.js +1 -0
  254. package/dist/components/table/TanstackTable.cjs +172 -0
  255. package/dist/components/table/TanstackTable.js +147 -0
  256. package/dist/components/table/components/TableBody.cjs +50 -0
  257. package/dist/components/table/components/TableBody.js +44 -0
  258. package/dist/components/table/components/TableHeader.cjs +56 -0
  259. package/dist/components/table/components/TableHeader.js +50 -0
  260. package/dist/components/table/components/TableHeaderCell.cjs +69 -0
  261. package/dist/components/table/components/TableHeaderCell.js +63 -0
  262. package/dist/components/table/components/TableLoadingBody.cjs +35 -0
  263. package/dist/components/table/components/TableLoadingBody.js +29 -0
  264. package/dist/components/table/components/TablePagination.cjs +2 -0
  265. package/dist/components/table/components/TablePagination.js +1 -0
  266. package/dist/components/table/components/TableRow.cjs +151 -0
  267. package/dist/components/table/components/TableRow.js +145 -0
  268. package/dist/components/table/components/TableSelectionCell.cjs +41 -0
  269. package/dist/components/table/components/TableSelectionCell.js +35 -0
  270. package/dist/components/table/components/column-resizer/ColumnResizer.cjs +25 -0
  271. package/dist/components/table/components/column-resizer/ColumnResizer.js +19 -0
  272. package/dist/components/table/components/column-resizer/ColumnResizer.module.css +22 -0
  273. package/dist/components/table/components/empty-state/EmptyState.cjs +33 -0
  274. package/dist/components/table/components/empty-state/EmptyState.js +31 -0
  275. package/dist/components/table/components/empty-state/EmptyState.module.css +4 -0
  276. package/dist/components/table/components/table-settings/TableSettings.cjs +139 -0
  277. package/dist/components/table/components/table-settings/TableSettings.js +137 -0
  278. package/dist/components/table/hooks/useTableRowInteractions.cjs +46 -0
  279. package/dist/components/table/hooks/useTableRowInteractions.js +44 -0
  280. package/dist/components/table/table.classes.cjs +49 -0
  281. package/dist/components/table/table.classes.js +40 -0
  282. package/dist/components/table/table.utils.cjs +57 -0
  283. package/dist/components/table/table.utils.js +45 -0
  284. package/dist/components/table/tanstackTable.utils.cjs +166 -0
  285. package/dist/components/table/tanstackTable.utils.js +159 -0
  286. package/dist/components/tabs/Tabs.cjs +172 -0
  287. package/dist/components/tabs/Tabs.js +166 -0
  288. package/dist/components/tabs/Tabs.module.css +261 -0
  289. package/dist/components/theme-button/ThemeButton.cjs +78 -0
  290. package/dist/components/theme-button/ThemeButton.js +75 -0
  291. package/dist/components/toast/Toast.cjs +68 -0
  292. package/dist/components/toast/Toast.js +62 -0
  293. package/dist/components/toast/Toast.module.css +161 -0
  294. package/dist/components/toast/provider/ToastProvider.cjs +105 -0
  295. package/dist/components/toast/provider/ToastProvider.js +97 -0
  296. package/dist/components/user-display/UserDisplay.cjs +22 -0
  297. package/dist/components/user-display/UserDisplay.js +16 -0
  298. package/dist/components/user-display/UserDisplay.module.css +25 -0
  299. package/dist/constants/chart-colors.cjs +10 -0
  300. package/dist/constants/chart-colors.js +8 -0
  301. package/dist/constants/chart-colors.types.cjs +2 -0
  302. package/dist/constants/chart-colors.types.js +1 -0
  303. package/dist/constants/severity.cjs +30 -0
  304. package/dist/constants/severity.js +26 -0
  305. package/dist/constants/severity.types.cjs +2 -0
  306. package/dist/constants/severity.types.js +1 -0
  307. package/dist/constants/sizes.cjs +11 -0
  308. package/dist/constants/sizes.js +9 -0
  309. package/dist/hooks/useDeviceSize.cjs +35 -0
  310. package/dist/hooks/useDeviceSize.js +33 -0
  311. package/dist/hooks/useListNavigation.cjs +237 -0
  312. package/dist/hooks/useListNavigation.js +235 -0
  313. package/dist/hooks/usePagination.cjs +144 -0
  314. package/dist/hooks/usePagination.js +142 -0
  315. package/dist/hooks/useSorting.cjs +119 -0
  316. package/dist/hooks/useSorting.js +117 -0
  317. package/dist/hooks/useTableData.cjs +53 -0
  318. package/dist/hooks/useTableData.js +51 -0
  319. package/dist/hooks/useTableSelection.cjs +172 -0
  320. package/dist/hooks/useTableSelection.js +170 -0
  321. package/dist/hooks/useTableSettings.cjs +90 -0
  322. package/dist/hooks/useTableSettings.js +87 -0
  323. package/dist/hooks/useTheme.cjs +64 -0
  324. package/dist/hooks/useTheme.js +62 -0
  325. package/dist/hooks/useTimeDuration.cjs +72 -0
  326. package/dist/hooks/useTimeDuration.js +70 -0
  327. package/dist/hooks/useViewportFill.cjs +82 -0
  328. package/dist/hooks/useViewportFill.js +80 -0
  329. package/dist/index.cjs +161 -12908
  330. package/dist/index.css +67 -7357
  331. package/dist/index.d.ts +0 -58
  332. package/dist/index.js +24 -12809
  333. package/dist/styles/animation.cjs +9 -0
  334. package/dist/styles/animation.js +7 -0
  335. package/dist/styles/themes/dbc/colors.css +5 -0
  336. package/dist/styles/themes/types.cjs +2 -0
  337. package/dist/styles/themes/types.js +1 -0
  338. package/dist/tanstack.cjs +18 -2717
  339. package/dist/tanstack.js +3 -2701
  340. package/dist/types/a11y-props.types.cjs +2 -0
  341. package/dist/types/a11y-props.types.js +1 -0
  342. package/dist/types/assets.d.cjs +2 -0
  343. package/dist/types/assets.d.js +1 -0
  344. package/dist/types/css.d.cjs +2 -0
  345. package/dist/types/css.d.js +1 -0
  346. package/dist/types/sizes.types.cjs +2 -0
  347. package/dist/types/sizes.types.js +1 -0
  348. package/dist/utils/arrays/nested-filtering.cjs +40 -0
  349. package/dist/utils/arrays/nested-filtering.js +38 -0
  350. package/dist/utils/date/formatDate.cjs +35 -0
  351. package/dist/utils/date/formatDate.js +33 -0
  352. package/dist/utils/localStorage.utils.cjs +53 -0
  353. package/dist/utils/localStorage.utils.js +49 -0
  354. package/dist/utils/text/get-highlighted-segments.cjs +49 -0
  355. package/dist/utils/text/get-highlighted-segments.js +47 -0
  356. package/package.json +8 -3
  357. package/dist/tanstack.css +0 -1385
@@ -0,0 +1,188 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('react');
6
+ var SplitPaneContext = require('./provider/SplitPaneContext');
7
+ var styles = require('./SplitPane.module.css');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
12
+
13
+ function clamp(n, min, max) {
14
+ return Math.max(min, Math.min(max, n));
15
+ }
16
+ function SplitPane({
17
+ children,
18
+ initialPrimarySize = 300,
19
+ minPrimarySize = 160,
20
+ minSecondarySize = 160,
21
+ direction = "horizontal",
22
+ showDivider = "hover",
23
+ gutterSize = 16,
24
+ storageKey,
25
+ fillViewport = false
26
+ }) {
27
+ return /* @__PURE__ */ jsxRuntime.jsx(
28
+ SplitPaneContext.SplitPaneProvider,
29
+ {
30
+ direction,
31
+ initialPrimarySize,
32
+ minPrimarySize,
33
+ minSecondarySize,
34
+ storageKey,
35
+ children: /* @__PURE__ */ jsxRuntime.jsx(
36
+ SplitPaneContainer,
37
+ {
38
+ showDivider,
39
+ gutterSize,
40
+ fillViewport,
41
+ children
42
+ }
43
+ )
44
+ }
45
+ );
46
+ }
47
+ function SplitPaneContainer({
48
+ children,
49
+ showDivider,
50
+ gutterSize,
51
+ fillViewport
52
+ }) {
53
+ const { direction, primarySize, containerRef } = SplitPaneContext.useSplitPaneContext();
54
+ const style = react.useMemo(
55
+ () => ({
56
+ "--split-pane-primary-size": `${primarySize}px`,
57
+ "--split-pane-gutter": `${gutterSize}px`
58
+ }),
59
+ [primarySize, gutterSize]
60
+ );
61
+ return /* @__PURE__ */ jsxRuntime.jsx(
62
+ "div",
63
+ {
64
+ ref: containerRef,
65
+ className: styles__default.default.container,
66
+ "data-direction": direction,
67
+ "data-divider": showDivider,
68
+ "data-fill-viewport": fillViewport,
69
+ style,
70
+ children
71
+ }
72
+ );
73
+ }
74
+ function SplitPanePrimary({ children }) {
75
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.primary, children });
76
+ }
77
+ function SplitPaneSecondary({ children }) {
78
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.secondary, children });
79
+ }
80
+ function SplitPaneGutter() {
81
+ const {
82
+ direction,
83
+ primarySize,
84
+ setPrimarySize,
85
+ minPrimarySize,
86
+ minSecondarySize,
87
+ containerRef,
88
+ resetDefault
89
+ } = SplitPaneContext.useSplitPaneContext();
90
+ const draggingRef = react.useRef(false);
91
+ const pointerIdRef = react.useRef(null);
92
+ const startPosRef = react.useRef(0);
93
+ const startSizeRef = react.useRef(primarySize);
94
+ const maxPrimaryRef = react.useRef(Infinity);
95
+ const getClientPos = react.useCallback(
96
+ (e) => direction === "horizontal" ? e.clientX : e.clientY,
97
+ [direction]
98
+ );
99
+ const computeClamp = react.useCallback(() => {
100
+ const el = containerRef.current;
101
+ if (!el) return { maxPrimary: Infinity, total: 0 };
102
+ const rect = el.getBoundingClientRect();
103
+ const total = direction === "horizontal" ? rect.width : rect.height;
104
+ const maxPrimary2 = Math.max(minPrimarySize, total - minSecondarySize);
105
+ return { maxPrimary: maxPrimary2, total };
106
+ }, [containerRef, direction, minPrimarySize, minSecondarySize]);
107
+ const onPointerDown = react.useCallback(
108
+ (e) => {
109
+ const el = containerRef.current;
110
+ if (!el) return;
111
+ e.currentTarget.setPointerCapture(e.pointerId);
112
+ const { maxPrimary: maxPrimary2 } = computeClamp();
113
+ maxPrimaryRef.current = maxPrimary2;
114
+ draggingRef.current = true;
115
+ pointerIdRef.current = e.pointerId;
116
+ startPosRef.current = getClientPos(e);
117
+ startSizeRef.current = primarySize;
118
+ document.body.style.userSelect = "none";
119
+ document.body.style.cursor = direction === "horizontal" ? "col-resize" : "row-resize";
120
+ },
121
+ [computeClamp, containerRef, direction, getClientPos, primarySize]
122
+ );
123
+ const onPointerMove = react.useCallback(
124
+ (e) => {
125
+ if (!draggingRef.current) return;
126
+ if (pointerIdRef.current !== null && e.pointerId !== pointerIdRef.current) return;
127
+ const delta = getClientPos(e) - startPosRef.current;
128
+ const next = startSizeRef.current + delta;
129
+ const maxPrimary2 = maxPrimaryRef.current;
130
+ setPrimarySize(clamp(next, minPrimarySize, maxPrimary2));
131
+ },
132
+ [getClientPos, minPrimarySize, setPrimarySize]
133
+ );
134
+ const endDrag = react.useCallback(() => {
135
+ if (!draggingRef.current) return;
136
+ draggingRef.current = false;
137
+ pointerIdRef.current = null;
138
+ document.body.style.cursor = "";
139
+ document.body.style.userSelect = "";
140
+ }, []);
141
+ const onPointerUp = react.useCallback(() => endDrag(), [endDrag]);
142
+ const onPointerCancel = react.useCallback(() => endDrag(), [endDrag]);
143
+ const onKeyDown = react.useCallback(
144
+ (e) => {
145
+ const { maxPrimary: maxPrimary2 } = computeClamp();
146
+ const step = e.shiftKey ? 32 : 8;
147
+ let next = null;
148
+ if (direction === "horizontal") {
149
+ if (e.key === "ArrowLeft") next = primarySize - step;
150
+ if (e.key === "ArrowRight") next = primarySize + step;
151
+ } else {
152
+ if (e.key === "ArrowUp") next = primarySize - step;
153
+ if (e.key === "ArrowDown") next = primarySize + step;
154
+ }
155
+ if (e.key === "Home") next = minPrimarySize;
156
+ if (e.key === "End") next = maxPrimary2;
157
+ if (next === null) return;
158
+ e.preventDefault();
159
+ setPrimarySize(clamp(next, minPrimarySize, maxPrimary2));
160
+ },
161
+ [computeClamp, direction, minPrimarySize, primarySize, setPrimarySize]
162
+ );
163
+ const ariaOrientation = direction === "horizontal" ? "vertical" : "horizontal";
164
+ const { maxPrimary } = computeClamp();
165
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.gutter, children: /* @__PURE__ */ jsxRuntime.jsx(
166
+ "div",
167
+ {
168
+ className: styles__default.default.resizer,
169
+ role: "separator",
170
+ "aria-orientation": ariaOrientation,
171
+ "aria-valuemin": Math.round(minPrimarySize),
172
+ "aria-valuemax": Number.isFinite(maxPrimary) ? Math.round(maxPrimary) : void 0,
173
+ "aria-valuenow": Math.round(primarySize),
174
+ tabIndex: 0,
175
+ onPointerDown,
176
+ onPointerMove,
177
+ onPointerUp,
178
+ onPointerCancel,
179
+ onDoubleClick: resetDefault,
180
+ onKeyDown
181
+ }
182
+ ) });
183
+ }
184
+
185
+ exports.SplitPane = SplitPane;
186
+ exports.SplitPaneGutter = SplitPaneGutter;
187
+ exports.SplitPanePrimary = SplitPanePrimary;
188
+ exports.SplitPaneSecondary = SplitPaneSecondary;
@@ -9,8 +9,9 @@ export interface SplitPaneProps {
9
9
  showDivider?: 'hover' | 'always' | 'never';
10
10
  gutterSize?: number;
11
11
  storageKey?: string;
12
+ fillViewport?: boolean;
12
13
  }
13
- export declare function SplitPane({ children, initialPrimarySize, minPrimarySize, minSecondarySize, direction, showDivider, gutterSize, storageKey, }: SplitPaneProps): JSX.Element;
14
+ export declare function SplitPane({ children, initialPrimarySize, minPrimarySize, minSecondarySize, direction, showDivider, gutterSize, storageKey, fillViewport, }: SplitPaneProps): JSX.Element;
14
15
  export declare function SplitPanePrimary({ children }: {
15
16
  children: ReactNode;
16
17
  }): JSX.Element;
@@ -0,0 +1,179 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useMemo, useRef, useCallback } from 'react';
4
+ import { SplitPaneProvider, useSplitPaneContext } from './provider/SplitPaneContext';
5
+ import styles from './SplitPane.module.css';
6
+
7
+ function clamp(n, min, max) {
8
+ return Math.max(min, Math.min(max, n));
9
+ }
10
+ function SplitPane({
11
+ children,
12
+ initialPrimarySize = 300,
13
+ minPrimarySize = 160,
14
+ minSecondarySize = 160,
15
+ direction = "horizontal",
16
+ showDivider = "hover",
17
+ gutterSize = 16,
18
+ storageKey,
19
+ fillViewport = false
20
+ }) {
21
+ return /* @__PURE__ */ jsx(
22
+ SplitPaneProvider,
23
+ {
24
+ direction,
25
+ initialPrimarySize,
26
+ minPrimarySize,
27
+ minSecondarySize,
28
+ storageKey,
29
+ children: /* @__PURE__ */ jsx(
30
+ SplitPaneContainer,
31
+ {
32
+ showDivider,
33
+ gutterSize,
34
+ fillViewport,
35
+ children
36
+ }
37
+ )
38
+ }
39
+ );
40
+ }
41
+ function SplitPaneContainer({
42
+ children,
43
+ showDivider,
44
+ gutterSize,
45
+ fillViewport
46
+ }) {
47
+ const { direction, primarySize, containerRef } = useSplitPaneContext();
48
+ const style = useMemo(
49
+ () => ({
50
+ "--split-pane-primary-size": `${primarySize}px`,
51
+ "--split-pane-gutter": `${gutterSize}px`
52
+ }),
53
+ [primarySize, gutterSize]
54
+ );
55
+ return /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref: containerRef,
59
+ className: styles.container,
60
+ "data-direction": direction,
61
+ "data-divider": showDivider,
62
+ "data-fill-viewport": fillViewport,
63
+ style,
64
+ children
65
+ }
66
+ );
67
+ }
68
+ function SplitPanePrimary({ children }) {
69
+ return /* @__PURE__ */ jsx("div", { className: styles.primary, children });
70
+ }
71
+ function SplitPaneSecondary({ children }) {
72
+ return /* @__PURE__ */ jsx("div", { className: styles.secondary, children });
73
+ }
74
+ function SplitPaneGutter() {
75
+ const {
76
+ direction,
77
+ primarySize,
78
+ setPrimarySize,
79
+ minPrimarySize,
80
+ minSecondarySize,
81
+ containerRef,
82
+ resetDefault
83
+ } = useSplitPaneContext();
84
+ const draggingRef = useRef(false);
85
+ const pointerIdRef = useRef(null);
86
+ const startPosRef = useRef(0);
87
+ const startSizeRef = useRef(primarySize);
88
+ const maxPrimaryRef = useRef(Infinity);
89
+ const getClientPos = useCallback(
90
+ (e) => direction === "horizontal" ? e.clientX : e.clientY,
91
+ [direction]
92
+ );
93
+ const computeClamp = useCallback(() => {
94
+ const el = containerRef.current;
95
+ if (!el) return { maxPrimary: Infinity, total: 0 };
96
+ const rect = el.getBoundingClientRect();
97
+ const total = direction === "horizontal" ? rect.width : rect.height;
98
+ const maxPrimary2 = Math.max(minPrimarySize, total - minSecondarySize);
99
+ return { maxPrimary: maxPrimary2, total };
100
+ }, [containerRef, direction, minPrimarySize, minSecondarySize]);
101
+ const onPointerDown = useCallback(
102
+ (e) => {
103
+ const el = containerRef.current;
104
+ if (!el) return;
105
+ e.currentTarget.setPointerCapture(e.pointerId);
106
+ const { maxPrimary: maxPrimary2 } = computeClamp();
107
+ maxPrimaryRef.current = maxPrimary2;
108
+ draggingRef.current = true;
109
+ pointerIdRef.current = e.pointerId;
110
+ startPosRef.current = getClientPos(e);
111
+ startSizeRef.current = primarySize;
112
+ document.body.style.userSelect = "none";
113
+ document.body.style.cursor = direction === "horizontal" ? "col-resize" : "row-resize";
114
+ },
115
+ [computeClamp, containerRef, direction, getClientPos, primarySize]
116
+ );
117
+ const onPointerMove = useCallback(
118
+ (e) => {
119
+ if (!draggingRef.current) return;
120
+ if (pointerIdRef.current !== null && e.pointerId !== pointerIdRef.current) return;
121
+ const delta = getClientPos(e) - startPosRef.current;
122
+ const next = startSizeRef.current + delta;
123
+ const maxPrimary2 = maxPrimaryRef.current;
124
+ setPrimarySize(clamp(next, minPrimarySize, maxPrimary2));
125
+ },
126
+ [getClientPos, minPrimarySize, setPrimarySize]
127
+ );
128
+ const endDrag = useCallback(() => {
129
+ if (!draggingRef.current) return;
130
+ draggingRef.current = false;
131
+ pointerIdRef.current = null;
132
+ document.body.style.cursor = "";
133
+ document.body.style.userSelect = "";
134
+ }, []);
135
+ const onPointerUp = useCallback(() => endDrag(), [endDrag]);
136
+ const onPointerCancel = useCallback(() => endDrag(), [endDrag]);
137
+ const onKeyDown = useCallback(
138
+ (e) => {
139
+ const { maxPrimary: maxPrimary2 } = computeClamp();
140
+ const step = e.shiftKey ? 32 : 8;
141
+ let next = null;
142
+ if (direction === "horizontal") {
143
+ if (e.key === "ArrowLeft") next = primarySize - step;
144
+ if (e.key === "ArrowRight") next = primarySize + step;
145
+ } else {
146
+ if (e.key === "ArrowUp") next = primarySize - step;
147
+ if (e.key === "ArrowDown") next = primarySize + step;
148
+ }
149
+ if (e.key === "Home") next = minPrimarySize;
150
+ if (e.key === "End") next = maxPrimary2;
151
+ if (next === null) return;
152
+ e.preventDefault();
153
+ setPrimarySize(clamp(next, minPrimarySize, maxPrimary2));
154
+ },
155
+ [computeClamp, direction, minPrimarySize, primarySize, setPrimarySize]
156
+ );
157
+ const ariaOrientation = direction === "horizontal" ? "vertical" : "horizontal";
158
+ const { maxPrimary } = computeClamp();
159
+ return /* @__PURE__ */ jsx("div", { className: styles.gutter, children: /* @__PURE__ */ jsx(
160
+ "div",
161
+ {
162
+ className: styles.resizer,
163
+ role: "separator",
164
+ "aria-orientation": ariaOrientation,
165
+ "aria-valuemin": Math.round(minPrimarySize),
166
+ "aria-valuemax": Number.isFinite(maxPrimary) ? Math.round(maxPrimary) : void 0,
167
+ "aria-valuenow": Math.round(primarySize),
168
+ tabIndex: 0,
169
+ onPointerDown,
170
+ onPointerMove,
171
+ onPointerUp,
172
+ onPointerCancel,
173
+ onDoubleClick: resetDefault,
174
+ onKeyDown
175
+ }
176
+ ) });
177
+ }
178
+
179
+ export { SplitPane, SplitPaneGutter, SplitPanePrimary, SplitPaneSecondary };
@@ -0,0 +1,118 @@
1
+ .container {
2
+ display: flex;
3
+ inline-size: 100%;
4
+ overflow: hidden;
5
+ min-inline-size: 0;
6
+ min-block-size: 0;
7
+ }
8
+
9
+ .container[data-fill-viewport='true'] {
10
+ block-size: 100%;
11
+ max-block-size: 100%;
12
+ height: 100%;
13
+ max-height: 100%;
14
+ }
15
+
16
+ .container[data-direction='horizontal'] {
17
+ flex-direction: row;
18
+ }
19
+
20
+ .container[data-direction='vertical'] {
21
+ flex-direction: column;
22
+ }
23
+
24
+ /* ===== Primary pane ===== */
25
+ .primary {
26
+ flex: 0 0 var(--split-pane-primary-size, 300px);
27
+ min-inline-size: 0;
28
+ min-block-size: 0;
29
+ overflow: auto;
30
+ display: flex;
31
+ flex-direction: column;
32
+ }
33
+
34
+ /* ===== Secondary pane ===== */
35
+ .secondary {
36
+ flex: 1 1 auto;
37
+ min-inline-size: 0;
38
+ min-block-size: 0;
39
+ overflow: auto;
40
+ display: flex;
41
+ flex-direction: column;
42
+ }
43
+
44
+ /* ===== Gutter (spacing + hit area wrapper) ===== */
45
+ .gutter {
46
+ position: relative;
47
+ flex: 0 0 var(--split-pane-gutter, 8px);
48
+ background: transparent;
49
+ z-index: 1;
50
+ }
51
+
52
+ .container[data-direction='vertical'] .gutter {
53
+ inline-size: 100%;
54
+ block-size: var(--split-pane-gutter, 8px);
55
+ }
56
+
57
+ /* ===== Resizer (interaction element) ===== */
58
+ .resizer {
59
+ position: absolute;
60
+ inset: 0;
61
+ cursor: col-resize;
62
+ user-select: none;
63
+ touch-action: none;
64
+ outline: none;
65
+ }
66
+
67
+ .container[data-direction='vertical'] .resizer {
68
+ cursor: row-resize;
69
+ }
70
+
71
+ /* Focus ring for keyboard resizing */
72
+ .resizer:focus-visible {
73
+ box-shadow: var(--focus-ring);
74
+ }
75
+
76
+ /* ===== Divider line ===== */
77
+ .resizer::after {
78
+ content: '';
79
+ position: absolute;
80
+ inset-block: 0;
81
+ inset-inline: 50%;
82
+ inline-size: var(--border-width-thin);
83
+ background-color: var(--color-border-subtle);
84
+ opacity: 0;
85
+ transform: translateX(-50%);
86
+ transition:
87
+ opacity var(--transition-fast) var(--ease-standard),
88
+ background-color var(--transition-fast) var(--ease-standard);
89
+ }
90
+
91
+ /* Vertical divider */
92
+ .container[data-direction='vertical'] .resizer::after {
93
+ inset-inline: 0;
94
+ inset-block: 50%;
95
+ inline-size: 100%;
96
+ block-size: var(--border-width-thin);
97
+ transform: translateY(-50%);
98
+ }
99
+
100
+ /* ===== Divider visibility modes ===== */
101
+ .container[data-divider='hover'] .resizer:hover::after,
102
+ .container[data-divider='hover'] .resizer:active::after {
103
+ opacity: 1;
104
+ background-color: var(--color-border-strong);
105
+ }
106
+
107
+ .container[data-divider='always'] .resizer::after {
108
+ opacity: 1;
109
+ }
110
+
111
+ .container[data-divider='never'] .resizer::after {
112
+ display: none;
113
+ }
114
+
115
+ .container[data-divider='hover'] .resizer:active::after,
116
+ .container[data-divider='always'] .resizer:active::after {
117
+ background-color: var(--color-brand);
118
+ }
@@ -0,0 +1,129 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefault(React);
9
+
10
+ const SplitPaneContext = React__default.default.createContext(null);
11
+ function clamp(n, min, max) {
12
+ return Math.max(min, Math.min(max, n));
13
+ }
14
+ function readStoredSize(key) {
15
+ try {
16
+ const raw = localStorage.getItem(key);
17
+ if (!raw) return null;
18
+ const num = Number(raw);
19
+ return Number.isFinite(num) ? num : null;
20
+ } catch {
21
+ return null;
22
+ }
23
+ }
24
+ function writeStoredSize(key, value) {
25
+ try {
26
+ localStorage.setItem(key, String(Math.round(value)));
27
+ } catch {
28
+ }
29
+ }
30
+ function removeStoredSize(key) {
31
+ try {
32
+ localStorage.removeItem(key);
33
+ } catch {
34
+ }
35
+ }
36
+ function useSplitPaneContext() {
37
+ const ctx = React__default.default.useContext(SplitPaneContext);
38
+ if (!ctx) throw new Error("SplitPane components must be used within <SplitPane />");
39
+ return ctx;
40
+ }
41
+ function SplitPaneProvider({
42
+ children,
43
+ direction,
44
+ initialPrimarySize,
45
+ minPrimarySize,
46
+ minSecondarySize,
47
+ storageKey
48
+ }) {
49
+ const containerRef = React.useRef(null);
50
+ const [primarySize, setPrimarySize] = React.useState(initialPrimarySize);
51
+ const [manualPrimarySize, setManualPrimarySize] = React.useState(null);
52
+ const getMaxPrimary = React.useCallback(() => {
53
+ const el = containerRef.current;
54
+ if (!el) return null;
55
+ const rect = el.getBoundingClientRect();
56
+ const total = direction === "horizontal" ? rect.width : rect.height;
57
+ if (!Number.isFinite(total) || total <= 0) return null;
58
+ return Math.max(minPrimarySize, total - minSecondarySize);
59
+ }, [direction, minPrimarySize, minSecondarySize]);
60
+ React.useEffect(() => {
61
+ if (!storageKey) return;
62
+ const stored = readStoredSize(storageKey);
63
+ if (stored === null) return;
64
+ setManualPrimarySize(stored);
65
+ setPrimarySize(stored);
66
+ }, [storageKey]);
67
+ React.useEffect(() => {
68
+ const el = containerRef.current;
69
+ if (!el) return;
70
+ if (typeof ResizeObserver === "undefined") return;
71
+ const clampToContainer = () => {
72
+ const maxPrimary = getMaxPrimary();
73
+ if (maxPrimary === null) return;
74
+ const targetSize = manualPrimarySize != null ? manualPrimarySize : initialPrimarySize;
75
+ setPrimarySize(clamp(targetSize, minPrimarySize, maxPrimary));
76
+ };
77
+ clampToContainer();
78
+ const ro = new ResizeObserver(clampToContainer);
79
+ ro.observe(el);
80
+ return () => ro.disconnect();
81
+ }, [getMaxPrimary, initialPrimarySize, manualPrimarySize]);
82
+ React.useEffect(() => {
83
+ if (!storageKey) return;
84
+ if (manualPrimarySize === null) {
85
+ removeStoredSize(storageKey);
86
+ return;
87
+ }
88
+ writeStoredSize(storageKey, manualPrimarySize);
89
+ }, [manualPrimarySize, storageKey]);
90
+ const handleSizeChange = React.useCallback((newSize) => {
91
+ setManualPrimarySize(newSize);
92
+ setPrimarySize(newSize);
93
+ }, []);
94
+ const resetDefault = React.useCallback(() => {
95
+ setManualPrimarySize(null);
96
+ const maxPrimary = getMaxPrimary();
97
+ if (maxPrimary === null) {
98
+ setPrimarySize(initialPrimarySize);
99
+ return;
100
+ }
101
+ setPrimarySize(clamp(initialPrimarySize, minPrimarySize, maxPrimary));
102
+ }, [getMaxPrimary, initialPrimarySize, minPrimarySize]);
103
+ const value = React.useMemo(
104
+ () => ({
105
+ direction,
106
+ primarySize,
107
+ setPrimarySize: handleSizeChange,
108
+ resetDefault,
109
+ minPrimarySize,
110
+ minSecondarySize,
111
+ containerRef,
112
+ storageKey
113
+ }),
114
+ [
115
+ direction,
116
+ primarySize,
117
+ handleSizeChange,
118
+ resetDefault,
119
+ minPrimarySize,
120
+ minSecondarySize,
121
+ storageKey
122
+ ]
123
+ );
124
+ return /* @__PURE__ */ jsxRuntime.jsx(SplitPaneContext.Provider, { value, children });
125
+ }
126
+
127
+ exports.SplitPaneContext = SplitPaneContext;
128
+ exports.SplitPaneProvider = SplitPaneProvider;
129
+ exports.useSplitPaneContext = useSplitPaneContext;