@nu-grid/nuxt 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +261 -0
  3. package/dist/module.d.mts +13 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +52 -0
  6. package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.d.vue.ts +12 -0
  7. package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.vue +123 -0
  8. package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.vue.d.ts +12 -0
  9. package/dist/runtime/cell-types/action-menu/index.d.ts +8 -0
  10. package/dist/runtime/cell-types/action-menu/index.js +28 -0
  11. package/dist/runtime/cell-types/boolean/BooleanEditor.d.vue.ts +15 -0
  12. package/dist/runtime/cell-types/boolean/BooleanEditor.vue +32 -0
  13. package/dist/runtime/cell-types/boolean/BooleanEditor.vue.d.ts +15 -0
  14. package/dist/runtime/cell-types/boolean/BooleanFilter.d.vue.ts +7 -0
  15. package/dist/runtime/cell-types/boolean/BooleanFilter.vue +42 -0
  16. package/dist/runtime/cell-types/boolean/BooleanFilter.vue.d.ts +7 -0
  17. package/dist/runtime/cell-types/boolean/BooleanRenderer.d.vue.ts +13 -0
  18. package/dist/runtime/cell-types/boolean/BooleanRenderer.vue +23 -0
  19. package/dist/runtime/cell-types/boolean/BooleanRenderer.vue.d.ts +13 -0
  20. package/dist/runtime/cell-types/boolean/index.d.ts +8 -0
  21. package/dist/runtime/cell-types/boolean/index.js +31 -0
  22. package/dist/runtime/cell-types/currency/CurrencyEditor.d.vue.ts +15 -0
  23. package/dist/runtime/cell-types/currency/CurrencyEditor.vue +40 -0
  24. package/dist/runtime/cell-types/currency/CurrencyEditor.vue.d.ts +15 -0
  25. package/dist/runtime/cell-types/currency/CurrencyFilter.d.vue.ts +7 -0
  26. package/dist/runtime/cell-types/currency/CurrencyFilter.vue +76 -0
  27. package/dist/runtime/cell-types/currency/CurrencyFilter.vue.d.ts +7 -0
  28. package/dist/runtime/cell-types/currency/index.d.ts +6 -0
  29. package/dist/runtime/cell-types/currency/index.js +42 -0
  30. package/dist/runtime/cell-types/date/DateEditor.d.vue.ts +15 -0
  31. package/dist/runtime/cell-types/date/DateEditor.vue +42 -0
  32. package/dist/runtime/cell-types/date/DateEditor.vue.d.ts +15 -0
  33. package/dist/runtime/cell-types/date/DateFilter.d.vue.ts +7 -0
  34. package/dist/runtime/cell-types/date/DateFilter.vue +58 -0
  35. package/dist/runtime/cell-types/date/DateFilter.vue.d.ts +7 -0
  36. package/dist/runtime/cell-types/date/index.d.ts +6 -0
  37. package/dist/runtime/cell-types/date/index.js +13 -0
  38. package/dist/runtime/cell-types/index.d.ts +17 -0
  39. package/dist/runtime/cell-types/index.js +34 -0
  40. package/dist/runtime/cell-types/lookup/LookupEditor.d.vue.ts +15 -0
  41. package/dist/runtime/cell-types/lookup/LookupEditor.vue +291 -0
  42. package/dist/runtime/cell-types/lookup/LookupEditor.vue.d.ts +15 -0
  43. package/dist/runtime/cell-types/lookup/LookupRenderer.d.vue.ts +8 -0
  44. package/dist/runtime/cell-types/lookup/LookupRenderer.vue +43 -0
  45. package/dist/runtime/cell-types/lookup/LookupRenderer.vue.d.ts +8 -0
  46. package/dist/runtime/cell-types/lookup/index.d.ts +36 -0
  47. package/dist/runtime/cell-types/lookup/index.js +50 -0
  48. package/dist/runtime/cell-types/number/NumberEditor.d.vue.ts +15 -0
  49. package/dist/runtime/cell-types/number/NumberEditor.vue +34 -0
  50. package/dist/runtime/cell-types/number/NumberEditor.vue.d.ts +15 -0
  51. package/dist/runtime/cell-types/number/NumberFilter.d.vue.ts +7 -0
  52. package/dist/runtime/cell-types/number/NumberFilter.vue +66 -0
  53. package/dist/runtime/cell-types/number/NumberFilter.vue.d.ts +7 -0
  54. package/dist/runtime/cell-types/number/index.d.ts +6 -0
  55. package/dist/runtime/cell-types/number/index.js +13 -0
  56. package/dist/runtime/cell-types/rating/RatingEditor.d.vue.ts +15 -0
  57. package/dist/runtime/cell-types/rating/RatingEditor.vue +219 -0
  58. package/dist/runtime/cell-types/rating/RatingEditor.vue.d.ts +15 -0
  59. package/dist/runtime/cell-types/rating/RatingFilter.d.vue.ts +7 -0
  60. package/dist/runtime/cell-types/rating/RatingFilter.vue +74 -0
  61. package/dist/runtime/cell-types/rating/RatingFilter.vue.d.ts +7 -0
  62. package/dist/runtime/cell-types/rating/RatingRenderer.d.vue.ts +10 -0
  63. package/dist/runtime/cell-types/rating/RatingRenderer.vue +75 -0
  64. package/dist/runtime/cell-types/rating/RatingRenderer.vue.d.ts +10 -0
  65. package/dist/runtime/cell-types/rating/index.d.ts +6 -0
  66. package/dist/runtime/cell-types/rating/index.js +67 -0
  67. package/dist/runtime/cell-types/selection/SelectionEditor.d.vue.ts +15 -0
  68. package/dist/runtime/cell-types/selection/SelectionEditor.vue +42 -0
  69. package/dist/runtime/cell-types/selection/SelectionEditor.vue.d.ts +15 -0
  70. package/dist/runtime/cell-types/selection/SelectionRenderer.d.vue.ts +14 -0
  71. package/dist/runtime/cell-types/selection/SelectionRenderer.vue +25 -0
  72. package/dist/runtime/cell-types/selection/SelectionRenderer.vue.d.ts +14 -0
  73. package/dist/runtime/cell-types/selection/index.d.ts +8 -0
  74. package/dist/runtime/cell-types/selection/index.js +36 -0
  75. package/dist/runtime/cell-types/text/TextEditor.d.vue.ts +15 -0
  76. package/dist/runtime/cell-types/text/TextEditor.vue +70 -0
  77. package/dist/runtime/cell-types/text/TextEditor.vue.d.ts +15 -0
  78. package/dist/runtime/cell-types/text/TextFilter.d.vue.ts +7 -0
  79. package/dist/runtime/cell-types/text/TextFilter.vue +50 -0
  80. package/dist/runtime/cell-types/text/TextFilter.vue.d.ts +7 -0
  81. package/dist/runtime/cell-types/text/TextareaEditor.d.vue.ts +15 -0
  82. package/dist/runtime/cell-types/text/TextareaEditor.vue +100 -0
  83. package/dist/runtime/cell-types/text/TextareaEditor.vue.d.ts +15 -0
  84. package/dist/runtime/cell-types/text/index.d.ts +10 -0
  85. package/dist/runtime/cell-types/text/index.js +16 -0
  86. package/dist/runtime/cell-types/text/textarea.d.ts +13 -0
  87. package/dist/runtime/cell-types/text/textarea.js +13 -0
  88. package/dist/runtime/components/NuGrid.d.vue.ts +96 -0
  89. package/dist/runtime/components/NuGrid.vue +651 -0
  90. package/dist/runtime/components/NuGrid.vue.d.ts +96 -0
  91. package/dist/runtime/components/NuGridCellCheckbox.d.vue.ts +24 -0
  92. package/dist/runtime/components/NuGridCellCheckbox.vue +105 -0
  93. package/dist/runtime/components/NuGridCellCheckbox.vue.d.ts +24 -0
  94. package/dist/runtime/components/NuGridGroup.d.vue.ts +20 -0
  95. package/dist/runtime/components/NuGridGroup.vue +650 -0
  96. package/dist/runtime/components/NuGridGroup.vue.d.ts +20 -0
  97. package/dist/runtime/components/NuGridLazyCell.d.vue.ts +62 -0
  98. package/dist/runtime/components/NuGridLazyCell.vue +133 -0
  99. package/dist/runtime/components/NuGridLazyCell.vue.d.ts +62 -0
  100. package/dist/runtime/components/_internal/NuGridAddRow.d.vue.ts +36 -0
  101. package/dist/runtime/components/_internal/NuGridAddRow.vue +144 -0
  102. package/dist/runtime/components/_internal/NuGridAddRow.vue.d.ts +36 -0
  103. package/dist/runtime/components/_internal/NuGridBase.d.vue.ts +20 -0
  104. package/dist/runtime/components/_internal/NuGridBase.vue +1172 -0
  105. package/dist/runtime/components/_internal/NuGridBase.vue.d.ts +20 -0
  106. package/dist/runtime/components/_internal/NuGridCellContent.d.vue.ts +9 -0
  107. package/dist/runtime/components/_internal/NuGridCellContent.vue +202 -0
  108. package/dist/runtime/components/_internal/NuGridCellContent.vue.d.ts +9 -0
  109. package/dist/runtime/components/_internal/NuGridColumnMenu.d.vue.ts +25 -0
  110. package/dist/runtime/components/_internal/NuGridColumnMenu.vue +391 -0
  111. package/dist/runtime/components/_internal/NuGridColumnMenu.vue.d.ts +25 -0
  112. package/dist/runtime/components/_internal/NuGridGroup.d.vue.ts +20 -0
  113. package/dist/runtime/components/_internal/NuGridGroup.vue +650 -0
  114. package/dist/runtime/components/_internal/NuGridGroup.vue.d.ts +20 -0
  115. package/dist/runtime/components/_internal/NuGridGroupCheckbox.d.vue.ts +22 -0
  116. package/dist/runtime/components/_internal/NuGridGroupCheckbox.vue +132 -0
  117. package/dist/runtime/components/_internal/NuGridGroupCheckbox.vue.d.ts +22 -0
  118. package/dist/runtime/components/_internal/NuGridHeaderSortButton.d.vue.ts +31 -0
  119. package/dist/runtime/components/_internal/NuGridHeaderSortButton.vue +61 -0
  120. package/dist/runtime/components/_internal/NuGridHeaderSortButton.vue.d.ts +31 -0
  121. package/dist/runtime/components/_internal/NuGridPaging.d.vue.ts +3 -0
  122. package/dist/runtime/components/_internal/NuGridPaging.vue +65 -0
  123. package/dist/runtime/components/_internal/NuGridPaging.vue.d.ts +3 -0
  124. package/dist/runtime/components/_internal/NuGridRow.d.vue.ts +40 -0
  125. package/dist/runtime/components/_internal/NuGridRow.vue +645 -0
  126. package/dist/runtime/components/_internal/NuGridRow.vue.d.ts +40 -0
  127. package/dist/runtime/components/_internal/NuGridSplitGroup.d.vue.ts +20 -0
  128. package/dist/runtime/components/_internal/NuGridSplitGroup.vue +735 -0
  129. package/dist/runtime/components/_internal/NuGridSplitGroup.vue.d.ts +20 -0
  130. package/dist/runtime/components/_internal/NuGridTooltip.d.vue.ts +3 -0
  131. package/dist/runtime/components/_internal/NuGridTooltip.vue +36 -0
  132. package/dist/runtime/components/_internal/NuGridTooltip.vue.d.ts +3 -0
  133. package/dist/runtime/composables/_internal/index.d.ts +31 -0
  134. package/dist/runtime/composables/_internal/index.js +28 -0
  135. package/dist/runtime/composables/_internal/keyboard-handlers/index.d.ts +5 -0
  136. package/dist/runtime/composables/_internal/keyboard-handlers/index.js +9 -0
  137. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardCellTypeDispatch.d.ts +18 -0
  138. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardCellTypeDispatch.js +53 -0
  139. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardEditingTriggers.d.ts +12 -0
  140. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardEditingTriggers.js +53 -0
  141. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardNavigation.d.ts +9 -0
  142. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardNavigation.js +35 -0
  143. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardSetup.d.ts +33 -0
  144. package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardSetup.js +111 -0
  145. package/dist/runtime/composables/_internal/keyboard-handlers/usePagingKeyboard.d.ts +11 -0
  146. package/dist/runtime/composables/_internal/keyboard-handlers/usePagingKeyboard.js +67 -0
  147. package/dist/runtime/composables/_internal/useNuGridActionMenu.d.ts +15 -0
  148. package/dist/runtime/composables/_internal/useNuGridActionMenu.js +137 -0
  149. package/dist/runtime/composables/_internal/useNuGridAddRow.d.ts +39 -0
  150. package/dist/runtime/composables/_internal/useNuGridAddRow.js +735 -0
  151. package/dist/runtime/composables/_internal/useNuGridAnimation.d.ts +33 -0
  152. package/dist/runtime/composables/_internal/useNuGridAnimation.js +178 -0
  153. package/dist/runtime/composables/_internal/useNuGridAutosize.d.ts +14 -0
  154. package/dist/runtime/composables/_internal/useNuGridAutosize.js +161 -0
  155. package/dist/runtime/composables/_internal/useNuGridCellEditing.d.ts +15 -0
  156. package/dist/runtime/composables/_internal/useNuGridCellEditing.js +1243 -0
  157. package/dist/runtime/composables/_internal/useNuGridColumnDragDrop.d.ts +8 -0
  158. package/dist/runtime/composables/_internal/useNuGridColumnDragDrop.js +148 -0
  159. package/dist/runtime/composables/_internal/useNuGridColumnPinning.d.ts +15 -0
  160. package/dist/runtime/composables/_internal/useNuGridColumnPinning.js +44 -0
  161. package/dist/runtime/composables/_internal/useNuGridColumnResize.d.ts +22 -0
  162. package/dist/runtime/composables/_internal/useNuGridColumnResize.js +427 -0
  163. package/dist/runtime/composables/_internal/useNuGridCore.d.ts +62 -0
  164. package/dist/runtime/composables/_internal/useNuGridCore.js +359 -0
  165. package/dist/runtime/composables/_internal/useNuGridExcel.d.ts +60 -0
  166. package/dist/runtime/composables/_internal/useNuGridExcel.js +35 -0
  167. package/dist/runtime/composables/_internal/useNuGridFocus.d.ts +15 -0
  168. package/dist/runtime/composables/_internal/useNuGridFocus.js +1378 -0
  169. package/dist/runtime/composables/_internal/useNuGridGroupSelection.d.ts +13 -0
  170. package/dist/runtime/composables/_internal/useNuGridGroupSelection.js +38 -0
  171. package/dist/runtime/composables/_internal/useNuGridGrouping.d.ts +28 -0
  172. package/dist/runtime/composables/_internal/useNuGridGrouping.js +211 -0
  173. package/dist/runtime/composables/_internal/useNuGridInteractionRouter.d.ts +9 -0
  174. package/dist/runtime/composables/_internal/useNuGridInteractionRouter.js +441 -0
  175. package/dist/runtime/composables/_internal/useNuGridInteractions.d.ts +10 -0
  176. package/dist/runtime/composables/_internal/useNuGridInteractions.js +36 -0
  177. package/dist/runtime/composables/_internal/useNuGridKeyboardNavigation.d.ts +54 -0
  178. package/dist/runtime/composables/_internal/useNuGridKeyboardNavigation.js +407 -0
  179. package/dist/runtime/composables/_internal/useNuGridPaging.d.ts +76 -0
  180. package/dist/runtime/composables/_internal/useNuGridPaging.js +147 -0
  181. package/dist/runtime/composables/_internal/useNuGridRowDragDrop.d.ts +68 -0
  182. package/dist/runtime/composables/_internal/useNuGridRowDragDrop.js +295 -0
  183. package/dist/runtime/composables/_internal/useNuGridRowSelection.d.ts +14 -0
  184. package/dist/runtime/composables/_internal/useNuGridRowSelection.js +214 -0
  185. package/dist/runtime/composables/_internal/useNuGridScroll.d.ts +110 -0
  186. package/dist/runtime/composables/_internal/useNuGridScroll.js +463 -0
  187. package/dist/runtime/composables/_internal/useNuGridScrollState.d.ts +32 -0
  188. package/dist/runtime/composables/_internal/useNuGridScrollState.js +60 -0
  189. package/dist/runtime/composables/_internal/useNuGridScrollbars.d.ts +24 -0
  190. package/dist/runtime/composables/_internal/useNuGridScrollbars.js +69 -0
  191. package/dist/runtime/composables/_internal/useNuGridStatePersistence.d.ts +27 -0
  192. package/dist/runtime/composables/_internal/useNuGridStatePersistence.js +243 -0
  193. package/dist/runtime/composables/_internal/useNuGridTooltip.d.ts +41 -0
  194. package/dist/runtime/composables/_internal/useNuGridTooltip.js +304 -0
  195. package/dist/runtime/composables/_internal/useNuGridUI.d.ts +3283 -0
  196. package/dist/runtime/composables/_internal/useNuGridUI.js +58 -0
  197. package/dist/runtime/composables/_internal/useNuGridVirtualization.d.ts +75 -0
  198. package/dist/runtime/composables/_internal/useNuGridVirtualization.js +534 -0
  199. package/dist/runtime/composables/_internal/useNuGridWheelSmoothing.d.ts +25 -0
  200. package/dist/runtime/composables/_internal/useNuGridWheelSmoothing.js +157 -0
  201. package/dist/runtime/composables/index.d.ts +3 -0
  202. package/dist/runtime/composables/index.js +2 -0
  203. package/dist/runtime/composables/useNuGridCellEditor.d.ts +91 -0
  204. package/dist/runtime/composables/useNuGridCellEditor.js +82 -0
  205. package/dist/runtime/composables/useNuGridCellTypeRegistry.d.ts +85 -0
  206. package/dist/runtime/composables/useNuGridCellTypeRegistry.js +202 -0
  207. package/dist/runtime/config/_internal/index.d.ts +5 -0
  208. package/dist/runtime/config/_internal/index.js +2 -0
  209. package/dist/runtime/config/_internal/options-defaults.d.ts +121 -0
  210. package/dist/runtime/config/_internal/options-defaults.js +121 -0
  211. package/dist/runtime/config/_internal/prop-utils.d.ts +54 -0
  212. package/dist/runtime/config/_internal/prop-utils.js +21 -0
  213. package/dist/runtime/config/config.d.ts +44 -0
  214. package/dist/runtime/config/config.js +18 -0
  215. package/dist/runtime/config/index.d.ts +2 -0
  216. package/dist/runtime/config/index.js +2 -0
  217. package/dist/runtime/config/presets.d.ts +15 -0
  218. package/dist/runtime/config/presets.js +58 -0
  219. package/dist/runtime/index.css +1 -0
  220. package/dist/runtime/index.d.ts +1 -0
  221. package/dist/runtime/index.js +1 -0
  222. package/dist/runtime/plugin.d.ts +5 -0
  223. package/dist/runtime/plugin.js +10 -0
  224. package/dist/runtime/themes/index.d.ts +56 -0
  225. package/dist/runtime/themes/index.js +68 -0
  226. package/dist/runtime/themes/nuGridTheme.d.ts +329 -0
  227. package/dist/runtime/themes/nuGridTheme.js +236 -0
  228. package/dist/runtime/themes/nuGridThemeCompact.d.ts +331 -0
  229. package/dist/runtime/themes/nuGridThemeCompact.js +236 -0
  230. package/dist/runtime/types/_internal/action-menu.d.ts +55 -0
  231. package/dist/runtime/types/_internal/action-menu.js +0 -0
  232. package/dist/runtime/types/_internal/cell-editing.d.ts +75 -0
  233. package/dist/runtime/types/_internal/cell-editing.js +0 -0
  234. package/dist/runtime/types/_internal/composable-returns.d.ts +52 -0
  235. package/dist/runtime/types/_internal/composable-returns.js +0 -0
  236. package/dist/runtime/types/_internal/config.d.ts +16 -0
  237. package/dist/runtime/types/_internal/config.js +0 -0
  238. package/dist/runtime/types/_internal/contexts/add-row.d.ts +25 -0
  239. package/dist/runtime/types/_internal/contexts/add-row.js +0 -0
  240. package/dist/runtime/types/_internal/contexts/animation.d.ts +24 -0
  241. package/dist/runtime/types/_internal/contexts/animation.js +0 -0
  242. package/dist/runtime/types/_internal/contexts/core.d.ts +24 -0
  243. package/dist/runtime/types/_internal/contexts/core.js +0 -0
  244. package/dist/runtime/types/_internal/contexts/drag.d.ts +13 -0
  245. package/dist/runtime/types/_internal/contexts/drag.js +0 -0
  246. package/dist/runtime/types/_internal/contexts/focus.d.ts +11 -0
  247. package/dist/runtime/types/_internal/contexts/focus.js +0 -0
  248. package/dist/runtime/types/_internal/contexts/grouping.d.ts +9 -0
  249. package/dist/runtime/types/_internal/contexts/grouping.js +0 -0
  250. package/dist/runtime/types/_internal/contexts/index.d.ts +15 -0
  251. package/dist/runtime/types/_internal/contexts/index.js +0 -0
  252. package/dist/runtime/types/_internal/contexts/interaction-router.d.ts +5 -0
  253. package/dist/runtime/types/_internal/contexts/interaction-router.js +0 -0
  254. package/dist/runtime/types/_internal/contexts/multi-row.d.ts +40 -0
  255. package/dist/runtime/types/_internal/contexts/multi-row.js +0 -0
  256. package/dist/runtime/types/_internal/contexts/paging.d.ts +39 -0
  257. package/dist/runtime/types/_internal/contexts/paging.js +0 -0
  258. package/dist/runtime/types/_internal/contexts/performance.d.ts +15 -0
  259. package/dist/runtime/types/_internal/contexts/performance.js +0 -0
  260. package/dist/runtime/types/_internal/contexts/resize.d.ts +12 -0
  261. package/dist/runtime/types/_internal/contexts/resize.js +0 -0
  262. package/dist/runtime/types/_internal/contexts/row-interactions.d.ts +12 -0
  263. package/dist/runtime/types/_internal/contexts/row-interactions.js +0 -0
  264. package/dist/runtime/types/_internal/contexts/scroll-state.d.ts +21 -0
  265. package/dist/runtime/types/_internal/contexts/scroll-state.js +0 -0
  266. package/dist/runtime/types/_internal/contexts/ui-config.d.ts +21 -0
  267. package/dist/runtime/types/_internal/contexts/ui-config.js +0 -0
  268. package/dist/runtime/types/_internal/contexts/virtualization.d.ts +16 -0
  269. package/dist/runtime/types/_internal/contexts/virtualization.js +0 -0
  270. package/dist/runtime/types/_internal/drag-drop.d.ts +48 -0
  271. package/dist/runtime/types/_internal/drag-drop.js +0 -0
  272. package/dist/runtime/types/_internal/focus.d.ts +68 -0
  273. package/dist/runtime/types/_internal/focus.js +0 -0
  274. package/dist/runtime/types/_internal/grouping.d.ts +48 -0
  275. package/dist/runtime/types/_internal/grouping.js +0 -0
  276. package/dist/runtime/types/_internal/index.d.ts +37 -0
  277. package/dist/runtime/types/_internal/index.js +2 -0
  278. package/dist/runtime/types/_internal/interaction-router.d.ts +176 -0
  279. package/dist/runtime/types/_internal/interaction-router.js +39 -0
  280. package/dist/runtime/types/_internal/props.d.ts +28 -0
  281. package/dist/runtime/types/_internal/props.js +0 -0
  282. package/dist/runtime/types/_internal/resize.d.ts +37 -0
  283. package/dist/runtime/types/_internal/resize.js +0 -0
  284. package/dist/runtime/types/_internal/row-interactions.d.ts +15 -0
  285. package/dist/runtime/types/_internal/row-interactions.js +0 -0
  286. package/dist/runtime/types/_internal/row-selection.d.ts +27 -0
  287. package/dist/runtime/types/_internal/row-selection.js +0 -0
  288. package/dist/runtime/types/_internal/states.d.ts +24 -0
  289. package/dist/runtime/types/_internal/states.js +0 -0
  290. package/dist/runtime/types/_internal/sticky-headers.d.ts +10 -0
  291. package/dist/runtime/types/_internal/sticky-headers.js +0 -0
  292. package/dist/runtime/types/_internal/validation.d.ts +54 -0
  293. package/dist/runtime/types/_internal/validation.js +0 -0
  294. package/dist/runtime/types/_internal/virtualization.d.ts +114 -0
  295. package/dist/runtime/types/_internal/virtualization.js +0 -0
  296. package/dist/runtime/types/action-menu.d.ts +62 -0
  297. package/dist/runtime/types/action-menu.js +0 -0
  298. package/dist/runtime/types/autosize.d.ts +8 -0
  299. package/dist/runtime/types/autosize.js +0 -0
  300. package/dist/runtime/types/cells.d.ts +292 -0
  301. package/dist/runtime/types/cells.js +5 -0
  302. package/dist/runtime/types/column.d.ts +248 -0
  303. package/dist/runtime/types/column.js +0 -0
  304. package/dist/runtime/types/config.d.ts +35 -0
  305. package/dist/runtime/types/config.js +0 -0
  306. package/dist/runtime/types/drag-drop.d.ts +92 -0
  307. package/dist/runtime/types/drag-drop.js +0 -0
  308. package/dist/runtime/types/events.d.ts +164 -0
  309. package/dist/runtime/types/events.js +1 -0
  310. package/dist/runtime/types/focus.d.ts +50 -0
  311. package/dist/runtime/types/focus.js +0 -0
  312. package/dist/runtime/types/grouping.d.ts +7 -0
  313. package/dist/runtime/types/grouping.js +0 -0
  314. package/dist/runtime/types/index.d.ts +15 -0
  315. package/dist/runtime/types/index.js +0 -0
  316. package/dist/runtime/types/option-groups.d.ts +624 -0
  317. package/dist/runtime/types/option-groups.js +0 -0
  318. package/dist/runtime/types/props.d.ts +418 -0
  319. package/dist/runtime/types/props.js +0 -0
  320. package/dist/runtime/types/resize.d.ts +14 -0
  321. package/dist/runtime/types/resize.js +0 -0
  322. package/dist/runtime/types/row-interactions.d.ts +11 -0
  323. package/dist/runtime/types/row-interactions.js +0 -0
  324. package/dist/runtime/types/row-selection.d.ts +48 -0
  325. package/dist/runtime/types/row-selection.js +0 -0
  326. package/dist/runtime/types/row.d.ts +7 -0
  327. package/dist/runtime/types/row.js +0 -0
  328. package/dist/runtime/types/sort-icon.d.ts +35 -0
  329. package/dist/runtime/types/sort-icon.js +0 -0
  330. package/dist/runtime/types/states.d.ts +17 -0
  331. package/dist/runtime/types/states.js +0 -0
  332. package/dist/runtime/types/sticky-headers.d.ts +6 -0
  333. package/dist/runtime/types/sticky-headers.js +0 -0
  334. package/dist/runtime/types/tanstack-table.d.ts +126 -0
  335. package/dist/runtime/types/theme.d.ts +22 -0
  336. package/dist/runtime/types/theme.js +0 -0
  337. package/dist/runtime/types/validation.d.ts +94 -0
  338. package/dist/runtime/types/validation.js +0 -0
  339. package/dist/runtime/utils/columnHelper.d.ts +208 -0
  340. package/dist/runtime/utils/columnHelper.js +23 -0
  341. package/dist/runtime/utils/excelExport.d.ts +63 -0
  342. package/dist/runtime/utils/excelExport.js +297 -0
  343. package/dist/runtime/utils/index.d.ts +2 -0
  344. package/dist/runtime/utils/index.js +2 -0
  345. package/dist/runtime/utils/standardSchema.d.ts +77 -0
  346. package/dist/runtime/utils/standardSchema.js +141 -0
  347. package/dist/types.d.mts +3 -0
  348. package/package.json +117 -0
@@ -0,0 +1,121 @@
1
+ export declare const nuGridDefaults: {
2
+ focus: {
3
+ mode: "cell";
4
+ retain: false;
5
+ cmdArrows: "paging";
6
+ loopNavigation: false;
7
+ pageStep: number;
8
+ alignOnModel: "nearest";
9
+ };
10
+ editing: {
11
+ enabled: false;
12
+ startKeys: "all";
13
+ startClicks: "double";
14
+ debounce: number;
15
+ commitOnBlur: true;
16
+ };
17
+ validation: {
18
+ validateOn: "reward";
19
+ showErrors: "always";
20
+ onInvalid: "block";
21
+ validateOnAddRow: true;
22
+ icon: string;
23
+ };
24
+ selection: {
25
+ mode: "multi";
26
+ placement: "start";
27
+ enabled: true;
28
+ hidden: false;
29
+ };
30
+ actions: {
31
+ enabled: false;
32
+ placement: "end";
33
+ hidden: false;
34
+ getActions: () => never[];
35
+ button: {
36
+ icon: string;
37
+ color: "neutral";
38
+ variant: "ghost";
39
+ class: string;
40
+ };
41
+ };
42
+ layout: {
43
+ mode: "div";
44
+ stickyHeaders: false;
45
+ scrollbars: "scroll";
46
+ autoSize: false;
47
+ maintainWidth: false;
48
+ };
49
+ columnDefaults: {
50
+ sortIcons: {
51
+ unsorted: string;
52
+ asc: string;
53
+ desc: string;
54
+ unsortedHover: true;
55
+ position: "edge";
56
+ };
57
+ menu: {
58
+ visibilityToggle: true;
59
+ button: {
60
+ icon: string;
61
+ color: "neutral";
62
+ variant: "ghost";
63
+ };
64
+ };
65
+ lookup: {
66
+ valueKey: string;
67
+ labelKey: string;
68
+ searchable: true;
69
+ placeholder: string;
70
+ clearable: false;
71
+ autoOpen: true;
72
+ };
73
+ resize: false;
74
+ reorder: false;
75
+ wrapText: false;
76
+ };
77
+ virtualization: {
78
+ enabled: false;
79
+ estimateSize: number;
80
+ overscan: number;
81
+ dynamicRowHeights: true;
82
+ rowHeights: {
83
+ groupHeader: number;
84
+ columnHeader: number;
85
+ dataRow: number;
86
+ footer: number;
87
+ };
88
+ };
89
+ tooltip: {
90
+ truncatedOnly: true;
91
+ showDelay: number;
92
+ hideDelay: number;
93
+ mouseFollow: false;
94
+ };
95
+ multiRow: {
96
+ enabled: false;
97
+ rowCount: number;
98
+ alignColumns: false;
99
+ };
100
+ animation: {
101
+ enabled: false;
102
+ preset: "refresh";
103
+ duration: number;
104
+ easing: string;
105
+ stagger: number;
106
+ maxStagger: number;
107
+ };
108
+ paging: {
109
+ enabled: false;
110
+ pageSize: number;
111
+ pageSizeSelector: number[];
112
+ autoPageSize: false;
113
+ autoPageSizeMinimum: number;
114
+ suppressPanel: false;
115
+ };
116
+ skipAutoSizeColumns: never[];
117
+ cellTypes: never[];
118
+ addNewRow: false;
119
+ rowId: string;
120
+ theme: "default";
121
+ };
@@ -0,0 +1,121 @@
1
+ export const nuGridDefaults = {
2
+ focus: {
3
+ mode: "cell",
4
+ retain: false,
5
+ cmdArrows: "paging",
6
+ loopNavigation: false,
7
+ pageStep: 10,
8
+ alignOnModel: "nearest"
9
+ },
10
+ editing: {
11
+ enabled: false,
12
+ startKeys: "all",
13
+ startClicks: "double",
14
+ debounce: 0,
15
+ commitOnBlur: true
16
+ },
17
+ validation: {
18
+ validateOn: "reward",
19
+ showErrors: "always",
20
+ onInvalid: "block",
21
+ validateOnAddRow: true,
22
+ icon: "i-lucide-alert-circle"
23
+ },
24
+ selection: {
25
+ mode: "multi",
26
+ placement: "start",
27
+ enabled: true,
28
+ hidden: false
29
+ },
30
+ actions: {
31
+ enabled: false,
32
+ placement: "end",
33
+ hidden: false,
34
+ getActions: () => [],
35
+ button: {
36
+ icon: "i-lucide-ellipsis-vertical",
37
+ color: "neutral",
38
+ variant: "ghost",
39
+ class: "ml-auto"
40
+ }
41
+ },
42
+ layout: {
43
+ mode: "div",
44
+ stickyHeaders: false,
45
+ scrollbars: "scroll",
46
+ autoSize: false,
47
+ maintainWidth: false
48
+ },
49
+ columnDefaults: {
50
+ sortIcons: {
51
+ unsorted: "i-lucide-chevrons-up-down",
52
+ asc: "i-lucide-arrow-up",
53
+ desc: "i-lucide-arrow-down",
54
+ unsortedHover: true,
55
+ position: "edge"
56
+ },
57
+ menu: {
58
+ visibilityToggle: true,
59
+ button: {
60
+ icon: "i-lucide-more-vertical",
61
+ color: "neutral",
62
+ variant: "ghost"
63
+ }
64
+ },
65
+ lookup: {
66
+ valueKey: "value",
67
+ labelKey: "label",
68
+ searchable: true,
69
+ placeholder: "Select...",
70
+ clearable: false,
71
+ autoOpen: true
72
+ },
73
+ resize: false,
74
+ reorder: false,
75
+ wrapText: false
76
+ },
77
+ virtualization: {
78
+ enabled: false,
79
+ estimateSize: 65,
80
+ overscan: 20,
81
+ dynamicRowHeights: true,
82
+ rowHeights: {
83
+ groupHeader: 50,
84
+ columnHeader: 50,
85
+ dataRow: 80,
86
+ footer: 45
87
+ }
88
+ },
89
+ tooltip: {
90
+ truncatedOnly: true,
91
+ showDelay: 500,
92
+ hideDelay: 100,
93
+ mouseFollow: false
94
+ },
95
+ multiRow: {
96
+ enabled: false,
97
+ rowCount: 1,
98
+ alignColumns: false
99
+ },
100
+ animation: {
101
+ enabled: false,
102
+ preset: "refresh",
103
+ duration: 300,
104
+ easing: "ease-out",
105
+ stagger: 15,
106
+ maxStagger: 120
107
+ },
108
+ paging: {
109
+ enabled: false,
110
+ pageSize: 20,
111
+ pageSizeSelector: [10, 20, 50, 100],
112
+ autoPageSize: false,
113
+ autoPageSizeMinimum: 5,
114
+ suppressPanel: false
115
+ },
116
+ skipAutoSizeColumns: [],
117
+ cellTypes: [],
118
+ addNewRow: false,
119
+ rowId: "id",
120
+ theme: "default"
121
+ };
@@ -0,0 +1,54 @@
1
+ import type { ComputedRef } from 'vue';
2
+ import type { NuGridAnimationOptions, NuGridEditingOptions, NuGridFocusOptions, NuGridLayoutOptions, NuGridMultiRowOptions, NuGridPagingOptions, NuGridSelectionOptions, NuGridTooltipOptions, NuGridValidationOptions } from '../../types/index.js';
3
+ import type { NuGridVirtualizerOptions } from '../../types/_internal/virtualization.js';
4
+ import { nuGridDefaults } from './options-defaults.js';
5
+ /**
6
+ * Mapping from defaults keys to their corresponding config types.
7
+ * Keys must match nuGridDefaults - TypeScript will error if they diverge.
8
+ */
9
+ type OptionsTypeMap = {
10
+ [K in keyof typeof nuGridDefaults]: K extends 'focus' ? NuGridFocusOptions : K extends 'editing' ? NuGridEditingOptions : K extends 'validation' ? NuGridValidationOptions : K extends 'selection' ? NuGridSelectionOptions : K extends 'layout' ? NuGridLayoutOptions : K extends 'virtualization' ? NuGridVirtualizerOptions : K extends 'tooltip' ? NuGridTooltipOptions : K extends 'multiRow' ? NuGridMultiRowOptions : K extends 'animation' ? NuGridAnimationOptions : K extends 'paging' ? NuGridPagingOptions : never;
11
+ };
12
+ type DefaultsKey = {
13
+ [K in keyof OptionsTypeMap]: OptionsTypeMap[K] extends never ? never : K;
14
+ }[keyof OptionsTypeMap];
15
+ type DefaultsGroup<K extends DefaultsKey> = NonNullable<(typeof nuGridDefaults)[K]>;
16
+ /**
17
+ * Type-safe accessor for nuGridDefaults groups.
18
+ * Returns the defaults with proper typing (NonNullable).
19
+ */
20
+ export declare function getDefaults<K extends DefaultsKey>(key: K): DefaultsGroup<K>;
21
+ /**
22
+ * Creates a computed ref that extracts a prop value with fallback to nuGridDefaults.
23
+ * Defaults are automatically sourced from the centralized nuGridDefaults.
24
+ *
25
+ * @param props - The props object (reactive)
26
+ * @param group - The defaults group key (e.g., 'focus', 'editing', 'validation')
27
+ * @param key - The key to extract from the prop group
28
+ * @returns ComputedRef with the resolved value
29
+ *
30
+ * @example
31
+ * const focusMode = usePropWithDefault(props, 'focus', 'mode')
32
+ * const enableEditing = usePropWithDefault(props, 'editing', 'enabled')
33
+ */
34
+ export declare function usePropWithDefault<G extends DefaultsKey, K extends keyof OptionsTypeMap[G] & keyof DefaultsGroup<G>>(props: Record<string, any>, group: G, key: K): ComputedRef<NonNullable<OptionsTypeMap[G][K]>>;
35
+ /**
36
+ * Creates multiple computed refs for a prop group with defaults from nuGridDefaults.
37
+ * Useful when extracting several properties from the same group.
38
+ *
39
+ * @param props - The props object (reactive)
40
+ * @param group - The defaults group key
41
+ * @param keys - Array of keys to extract
42
+ * @returns Object with computed refs for each key
43
+ *
44
+ * @example
45
+ * const { mode, retain, cmdArrows } = usePropsWithDefaults(
46
+ * props,
47
+ * 'focus',
48
+ * ['mode', 'retain', 'cmdArrows']
49
+ * )
50
+ */
51
+ export declare function usePropsWithDefaults<G extends DefaultsKey, K extends keyof OptionsTypeMap[G] & keyof DefaultsGroup<G>>(props: Record<string, any>, group: G, keys: K[]): {
52
+ [P in K]: ComputedRef<NonNullable<OptionsTypeMap[G][P]>>;
53
+ };
54
+ export {};
@@ -0,0 +1,21 @@
1
+ import { computed } from "vue";
2
+ import { nuGridDefaults } from "./options-defaults.js";
3
+ export function getDefaults(key) {
4
+ return nuGridDefaults[key];
5
+ }
6
+ export function usePropWithDefault(props, group, key) {
7
+ const defaults = nuGridDefaults[group];
8
+ return computed(
9
+ () => props[group]?.[key] ?? defaults[key]
10
+ );
11
+ }
12
+ export function usePropsWithDefaults(props, group, keys) {
13
+ const defaults = nuGridDefaults[group];
14
+ const result = {};
15
+ for (const key of keys) {
16
+ result[key] = computed(
17
+ () => props[group]?.[key] ?? defaults[key]
18
+ );
19
+ }
20
+ return result;
21
+ }
@@ -0,0 +1,44 @@
1
+ import type { TableData } from '@nuxt/ui';
2
+ import type { NuGridProps } from '../types/index.js';
3
+ import type { NuGridCreateConfigOptions } from '../types/_internal/index.js';
4
+ /**
5
+ * Create a fully typed NuGrid configuration
6
+ * This factory function helps with type inference and provides a convenient way to build configurations
7
+ *
8
+ * @example
9
+ * // Create a config with a preset
10
+ * const config = createNuGridConfig({
11
+ * preset: 'editable',
12
+ * config: {
13
+ * columns: myColumns,
14
+ * data: myData
15
+ * }
16
+ * })
17
+ *
18
+ * @example
19
+ * // Create a config from scratch
20
+ * const config = createNuGridConfig({
21
+ * config: {
22
+ * columns: myColumns,
23
+ * data: myData,
24
+ * focus: { mode: 'cell' }
25
+ * }
26
+ * })
27
+ */
28
+ export declare function createNuGridConfig<T extends TableData = TableData>(options?: NuGridCreateConfigOptions<T>): Partial<NuGridProps<T>>;
29
+ /**
30
+ * Merge multiple NuGrid configurations
31
+ * Later configurations override earlier ones
32
+ *
33
+ * @example
34
+ * const base = { focus: { mode: 'cell' } }
35
+ * const override = { focus: { retain: true } }
36
+ * const merged = mergeNuGridConfig(base, override)
37
+ * // Result: { focus: { mode: 'cell', retain: true } }
38
+ */
39
+ export declare function mergeNuGridConfig<T extends TableData = TableData>(...configs: Array<Partial<NuGridProps<T>>>): Partial<NuGridProps<T>>;
40
+ /**
41
+ * Get default values for NuGrid configuration
42
+ * Useful for documentation and understanding defaults
43
+ */
44
+ export declare function getNuGridDefaults<T extends TableData = TableData>(): Partial<NuGridProps<T>>;
@@ -0,0 +1,18 @@
1
+ import { defu } from "defu";
2
+ import { nuGridDefaults } from "./_internal/options-defaults.js";
3
+ import { applyNuGridPreset } from "./presets.js";
4
+ export function createNuGridConfig(options = {}) {
5
+ const { preset, config = {} } = options;
6
+ const layers = [nuGridDefaults];
7
+ if (preset) {
8
+ layers.push(applyNuGridPreset(preset));
9
+ }
10
+ layers.push(config);
11
+ return mergeNuGridConfig(...layers);
12
+ }
13
+ export function mergeNuGridConfig(...configs) {
14
+ return defu({}, ...configs.toReversed());
15
+ }
16
+ export function getNuGridDefaults() {
17
+ return nuGridDefaults;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { createNuGridConfig, getNuGridDefaults, mergeNuGridConfig } from './config.js';
2
+ export { applyNuGridPreset, getNuGridPreset } from './presets.js';
@@ -0,0 +1,2 @@
1
+ export { createNuGridConfig, getNuGridDefaults, mergeNuGridConfig } from "./config.js";
2
+ export { applyNuGridPreset, getNuGridPreset } from "./presets.js";
@@ -0,0 +1,15 @@
1
+ import type { TableData } from '@nuxt/ui';
2
+ import type { NuGridPreset, NuGridPresetOptions } from '../types/_internal/index.js';
3
+ /**
4
+ * Get preset configuration for a given preset name
5
+ * @param preset The preset name
6
+ * @returns Configuration object for the preset
7
+ */
8
+ export declare function getNuGridPreset<T extends TableData = TableData>(preset: NuGridPreset): NuGridPresetOptions<T>;
9
+ /**
10
+ * Apply a preset with optional overrides
11
+ * @param preset The preset name
12
+ * @param overrides Optional configuration overrides
13
+ * @returns Merged configuration
14
+ */
15
+ export declare function applyNuGridPreset<T extends TableData = TableData>(preset: NuGridPreset, overrides?: Partial<NuGridPresetOptions<T>>): NuGridPresetOptions<T>;
@@ -0,0 +1,58 @@
1
+ import { defu } from "defu";
2
+ const presets = {
3
+ /**
4
+ * Read-only grid with row navigation, no editing
5
+ */
6
+ readOnly: {
7
+ focus: { mode: "row" },
8
+ editing: { enabled: false }
9
+ },
10
+ /**
11
+ * Full-featured editable grid with cell navigation,
12
+ * sticky headers, and auto-sizing columns
13
+ */
14
+ editable: {
15
+ focus: { mode: "cell", retain: true },
16
+ editing: { enabled: true },
17
+ layout: { stickyHeaders: true, autoSize: "fitCell" }
18
+ },
19
+ /**
20
+ * Kanban-style grouped grid with row navigation
21
+ * and minimal keyboard editing triggers
22
+ */
23
+ kanban: {
24
+ focus: { mode: "row" },
25
+ editing: { enabled: true, startKeys: "minimal" },
26
+ layout: { mode: "group", stickyHeaders: true }
27
+ },
28
+ /**
29
+ * Form-like grid optimized for data entry with
30
+ * single-click editing and first/last navigation
31
+ */
32
+ forms: {
33
+ focus: { mode: "cell", retain: true, cmdArrows: "firstlast", pageStep: 5 },
34
+ editing: { enabled: true, startClicks: "single" },
35
+ validation: { validateOn: "blur" },
36
+ layout: { scrollbars: "native", autoSize: "fitGrid", maintainWidth: true }
37
+ },
38
+ /**
39
+ * Analytics grid optimized for large read-only datasets
40
+ * with virtualization and sticky headers
41
+ */
42
+ analytics: {
43
+ focus: { mode: "row" },
44
+ editing: { enabled: false },
45
+ virtualization: { estimateSize: 50, overscan: 20, dynamicRowHeights: false },
46
+ layout: { stickyHeaders: true }
47
+ }
48
+ };
49
+ export function getNuGridPreset(preset) {
50
+ return presets[preset];
51
+ }
52
+ export function applyNuGridPreset(preset, overrides) {
53
+ const baseConfig = getNuGridPreset(preset);
54
+ if (!overrides) {
55
+ return baseConfig;
56
+ }
57
+ return defu({}, overrides, baseConfig);
58
+ }
@@ -0,0 +1 @@
1
+ @source "./components";@source "./cell-types";@source "./config";@source "./themes";@theme static{--animate-nugrid-refresh:nugrid-refresh var(--nugrid-animation-duration,300ms) var(--nugrid-animation-easing,ease-out) both;@keyframes nugrid-refresh{0%{opacity:.6;translate:0 14px}to{opacity:1;translate:0 0}}--animate-nugrid-fade:nugrid-fade var(--nugrid-animation-duration,300ms) var(--nugrid-animation-easing,ease-out) both;@keyframes nugrid-fade{0%{opacity:.55}to{opacity:1}}--animate-nugrid-slide:nugrid-slide var(--nugrid-animation-duration,300ms) var(--nugrid-animation-easing,ease-out) both;@keyframes nugrid-slide{0%{opacity:.6;translate:0 28px}to{opacity:1;translate:0 0}}--animate-nugrid-scale:nugrid-scale var(--nugrid-animation-duration,300ms) var(--nugrid-animation-easing,ease-out) both;@keyframes nugrid-scale{0%{opacity:.62;scale:.92}to{opacity:1;scale:1}}}
@@ -0,0 +1 @@
1
+ export { createColumnHelper } from './utils/columnHelper.js';
@@ -0,0 +1 @@
1
+ export { createColumnHelper } from "./utils/columnHelper.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * NuGrid plugin - registers custom themes from app.config.ts
3
+ */
4
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
5
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { defineNuxtPlugin, useAppConfig } from "#app";
2
+ import { createNuGridTheme, registerTheme } from "./themes/index.js";
3
+ export default defineNuxtPlugin(() => {
4
+ const appConfig = useAppConfig();
5
+ const customThemes = appConfig.nuGrid?.themes || [];
6
+ for (const themeConfig of customThemes) {
7
+ const theme = createNuGridTheme(themeConfig);
8
+ registerTheme(theme);
9
+ }
10
+ });
@@ -0,0 +1,56 @@
1
+ import type { NuGridThemeDefinition } from '../types/theme.js';
2
+ export { nuGridTheme } from './nuGridTheme.js';
3
+ export { nuGridThemeCompact } from './nuGridThemeCompact.js';
4
+ /**
5
+ * Register a custom theme with NuGrid
6
+ * @param theme - The theme definition to register
7
+ */
8
+ export declare function registerTheme(theme: NuGridThemeDefinition): void;
9
+ /**
10
+ * Get a registered theme by name
11
+ * @param name - The theme name to retrieve
12
+ * @returns The theme definition or undefined if not found
13
+ */
14
+ export declare function getTheme(name: string): NuGridThemeDefinition | undefined;
15
+ /**
16
+ * Get all available theme names
17
+ * @returns Array of registered theme names
18
+ */
19
+ export declare function getAvailableThemes(): string[];
20
+ /**
21
+ * Get all registered themes
22
+ * @returns Array of theme definitions
23
+ */
24
+ export declare function getAllThemes(): NuGridThemeDefinition[];
25
+ /**
26
+ * Helper to create a custom NuGrid theme
27
+ * Supports extending existing themes with slot/variant overrides
28
+ *
29
+ * @example
30
+ * // Create a theme extending the compact theme
31
+ * const oceanTheme = createNuGridTheme({
32
+ * name: 'ocean',
33
+ * displayName: 'Ocean Blue',
34
+ * baseTheme: 'compact',
35
+ * slots: {
36
+ * base: 'flex flex-col bg-cyan-50 dark:bg-cyan-950',
37
+ * th: 'flex shrink-0 items-stretch overflow-hidden p-0! group bg-cyan-100 dark:bg-cyan-900 ...',
38
+ * }
39
+ * })
40
+ */
41
+ export declare function createNuGridTheme(config: {
42
+ /** Unique theme identifier */
43
+ name: string;
44
+ /** Human-readable display name */
45
+ displayName?: string;
46
+ /** Theme description */
47
+ description?: string;
48
+ /** Base theme to extend (e.g., 'default', 'compact', or custom theme name) */
49
+ baseTheme?: string;
50
+ /** Custom slot classes (merged with base theme) */
51
+ slots?: Partial<Record<string, string>>;
52
+ /** Custom variants (merged with base theme) */
53
+ variants?: Record<string, any>;
54
+ /** Custom compound variants (appended to base theme) */
55
+ compoundVariants?: any[];
56
+ }): NuGridThemeDefinition;
@@ -0,0 +1,68 @@
1
+ import { nuGridTheme } from "./nuGridTheme.js";
2
+ import { nuGridThemeCompact } from "./nuGridThemeCompact.js";
3
+ export { nuGridTheme } from "./nuGridTheme.js";
4
+ export { nuGridThemeCompact } from "./nuGridThemeCompact.js";
5
+ const themeRegistry = /* @__PURE__ */ new Map();
6
+ export function registerTheme(theme) {
7
+ themeRegistry.set(theme.name, theme);
8
+ }
9
+ export function getTheme(name) {
10
+ return themeRegistry.get(name);
11
+ }
12
+ export function getAvailableThemes() {
13
+ return Array.from(themeRegistry.keys());
14
+ }
15
+ export function getAllThemes() {
16
+ return Array.from(themeRegistry.values());
17
+ }
18
+ export function createNuGridTheme(config) {
19
+ let baseThemeObj;
20
+ if (config.baseTheme) {
21
+ const baseThemeDef = getTheme(config.baseTheme);
22
+ if (baseThemeDef) {
23
+ baseThemeObj = baseThemeDef.theme;
24
+ } else if (import.meta.dev) {
25
+ console.warn(`[createNuGridTheme] Base theme "${config.baseTheme}" not found`);
26
+ }
27
+ }
28
+ const mergedSlots = {
29
+ ...baseThemeObj?.slots || {}
30
+ };
31
+ if (config.slots) {
32
+ for (const [key, value] of Object.entries(config.slots)) {
33
+ if (value !== void 0) {
34
+ mergedSlots[key] = value;
35
+ }
36
+ }
37
+ }
38
+ const theme = {
39
+ ...baseThemeObj || {},
40
+ slots: mergedSlots,
41
+ variants: {
42
+ ...baseThemeObj?.variants || {},
43
+ ...config.variants || {}
44
+ },
45
+ compoundVariants: [
46
+ ...baseThemeObj?.compoundVariants || [],
47
+ ...config.compoundVariants || []
48
+ ]
49
+ };
50
+ return {
51
+ name: config.name,
52
+ displayName: config.displayName || config.name,
53
+ description: config.description,
54
+ theme
55
+ };
56
+ }
57
+ registerTheme({
58
+ name: "default",
59
+ displayName: "Default",
60
+ description: "Standard NuGrid theme with primary color accents and comfortable spacing",
61
+ theme: nuGridTheme
62
+ });
63
+ registerTheme({
64
+ name: "compact",
65
+ displayName: "Compact",
66
+ description: "Compact theme with blue accents and tighter spacing for data-dense displays",
67
+ theme: nuGridThemeCompact
68
+ });