@nqlib/nqui 0.3.2 → 0.4.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 (475) hide show
  1. package/README.md +26 -3
  2. package/dist/button-CYFTFDKe.cjs +1 -0
  3. package/dist/button-nJvDl3w8.js +44 -0
  4. package/dist/calendar.cjs.js +1 -0
  5. package/dist/calendar.es.js +6 -0
  6. package/dist/carousel-DEyyJi49.js +179 -0
  7. package/dist/carousel-Dhhz8m5V.cjs +1 -0
  8. package/dist/carousel.cjs.js +1 -0
  9. package/dist/carousel.es.js +8 -0
  10. package/dist/command-palette-UHk8zZOg.cjs +45 -0
  11. package/dist/command-palette-d-TrdBsM.js +1778 -0
  12. package/dist/command.cjs.js +1 -0
  13. package/dist/command.es.js +13 -0
  14. package/dist/components/custom/color-picker.d.ts.map +1 -1
  15. package/dist/components/custom/command-palette.d.ts.map +1 -1
  16. package/dist/components/custom/enhanced-checkbox.d.ts +1 -1
  17. package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
  18. package/dist/components/custom/enhanced-combobox.d.ts +1 -1
  19. package/dist/components/custom/enhanced-combobox.d.ts.map +1 -1
  20. package/dist/components/custom/enhanced-radio-group.d.ts.map +1 -1
  21. package/dist/components/custom/enhanced-scroll-area.d.ts +12 -0
  22. package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
  23. package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
  24. package/dist/components/debug/debug-panel.d.ts.map +1 -1
  25. package/dist/components/debug/magnifier.d.ts.map +1 -1
  26. package/dist/components/debug/ui-tester.d.ts.map +1 -1
  27. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  28. package/dist/components/ui/button-group.d.ts.map +1 -1
  29. package/dist/components/ui/checkbox.d.ts.map +1 -1
  30. package/dist/components/ui/combobox.d.ts +1 -1
  31. package/dist/components/ui/combobox.d.ts.map +1 -1
  32. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  33. package/dist/components/ui/item.d.ts +1 -1
  34. package/dist/components/ui/separator.d.ts +34 -1
  35. package/dist/components/ui/separator.d.ts.map +1 -1
  36. package/dist/components/ui/sheet.d.ts.map +1 -1
  37. package/dist/components/ui/sidebar.d.ts +1 -1
  38. package/dist/components/ui/sidebar.d.ts.map +1 -1
  39. package/dist/components/ui/toggle-group.d.ts +8 -2
  40. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  41. package/dist/components/ui/toggle.d.ts +1 -1
  42. package/dist/components/ui/toggle.d.ts.map +1 -1
  43. package/dist/components/ui/tooltip.d.ts.map +1 -1
  44. package/dist/drawer-BcIxWRN8.cjs +1 -0
  45. package/dist/drawer-CU4lkcz7.js +119 -0
  46. package/dist/drawer.cjs.js +1 -0
  47. package/dist/drawer.es.js +13 -0
  48. package/dist/enhanced-calendar-5PA8CeF7.cjs +61 -0
  49. package/dist/enhanced-calendar-BENbxw7_.js +375 -0
  50. package/dist/entries/calendar.d.ts +9 -0
  51. package/dist/entries/calendar.d.ts.map +1 -0
  52. package/dist/entries/carousel.d.ts +7 -0
  53. package/dist/entries/carousel.d.ts.map +1 -0
  54. package/dist/entries/command.d.ts +9 -0
  55. package/dist/entries/command.d.ts.map +1 -0
  56. package/dist/entries/drawer.d.ts +7 -0
  57. package/dist/entries/drawer.d.ts.map +1 -0
  58. package/dist/entries/sonner.d.ts +8 -0
  59. package/dist/entries/sonner.d.ts.map +1 -0
  60. package/dist/entries/sortable.d.ts +7 -0
  61. package/dist/entries/sortable.d.ts.map +1 -0
  62. package/dist/hooks/index.d.ts +2 -3
  63. package/dist/hooks/index.d.ts.map +1 -1
  64. package/dist/hooks/use-as-ref.d.ts +1 -1
  65. package/dist/hooks/use-as-ref.d.ts.map +1 -1
  66. package/dist/hooks/use-intersection-observer.d.ts +13 -0
  67. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  68. package/dist/index.d.ts +13 -37
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/keyboard-BapbM2wb.cjs +1 -0
  71. package/dist/keyboard-pkY42Y3a.js +39 -0
  72. package/dist/nqui.cjs.js +171 -802
  73. package/dist/nqui.es.js +15299 -72452
  74. package/dist/sonner-Co6YpYVs.js +546 -0
  75. package/dist/sonner-DbQhVp8m.cjs +330 -0
  76. package/dist/sonner.cjs.js +1 -0
  77. package/dist/sonner.es.js +6 -0
  78. package/dist/sortable-Cj3cdxGc.cjs +5 -0
  79. package/dist/sortable-wG_cXiUk.js +366 -0
  80. package/dist/sortable.cjs.js +1 -0
  81. package/dist/sortable.es.js +8 -0
  82. package/dist/styles.css +21 -17
  83. package/dist/utils-B6yFEsav.js +8 -0
  84. package/dist/utils-IjLH3w2e.cjs +1 -0
  85. package/docs/components/README.md +309 -0
  86. package/docs/components/nqui-accordion.md +20 -0
  87. package/docs/components/nqui-alert-dialog.md +31 -0
  88. package/docs/components/nqui-alert.md +19 -0
  89. package/docs/components/nqui-aspect-ratio.md +17 -0
  90. package/docs/components/nqui-avatar.md +18 -0
  91. package/docs/components/nqui-badge.md +42 -0
  92. package/docs/components/nqui-breadcrumb.md +24 -0
  93. package/docs/components/nqui-button-group.md +50 -0
  94. package/docs/components/nqui-button.md +56 -0
  95. package/docs/components/nqui-calendar.md +46 -0
  96. package/docs/components/nqui-card.md +31 -0
  97. package/docs/components/nqui-carousel.md +22 -0
  98. package/docs/components/nqui-checkbox.md +34 -0
  99. package/docs/components/nqui-code-block.md +41 -0
  100. package/docs/components/nqui-code-editor.md +21 -0
  101. package/docs/components/nqui-collapsible.md +18 -0
  102. package/docs/components/nqui-color-picker.md +38 -0
  103. package/docs/components/nqui-color-slider.md +23 -0
  104. package/docs/components/nqui-combobox.md +73 -0
  105. package/docs/components/nqui-command-palette.md +29 -0
  106. package/docs/components/nqui-command.md +39 -0
  107. package/docs/components/nqui-context-menu.md +33 -0
  108. package/docs/components/nqui-data-table.md +46 -0
  109. package/docs/components/nqui-dialog.md +36 -0
  110. package/docs/components/nqui-drawer.md +27 -0
  111. package/docs/components/nqui-dropdown-menu.md +56 -0
  112. package/docs/components/nqui-empty.md +22 -0
  113. package/docs/components/nqui-field.md +42 -0
  114. package/docs/components/nqui-frosted-glass.md +19 -0
  115. package/docs/components/nqui-hover-card.md +18 -0
  116. package/docs/components/nqui-input-group.md +30 -0
  117. package/docs/components/nqui-input-otp.md +23 -0
  118. package/docs/components/nqui-input.md +25 -0
  119. package/docs/components/nqui-item.md +25 -0
  120. package/docs/components/nqui-kbd.md +25 -0
  121. package/docs/components/nqui-label.md +16 -0
  122. package/docs/components/nqui-logo.md +16 -0
  123. package/docs/components/nqui-menubar.md +22 -0
  124. package/docs/components/nqui-native-select.md +28 -0
  125. package/docs/components/nqui-navigation-menu.md +25 -0
  126. package/docs/components/nqui-pagination.md +25 -0
  127. package/docs/components/nqui-popover.md +34 -0
  128. package/docs/components/nqui-progress.md +22 -0
  129. package/docs/components/nqui-radio-group.md +42 -0
  130. package/docs/components/nqui-rating.md +35 -0
  131. package/docs/components/nqui-resizable.md +23 -0
  132. package/docs/components/nqui-sandbox.md +27 -0
  133. package/docs/components/nqui-scroll-area.md +32 -0
  134. package/docs/components/nqui-select.md +53 -0
  135. package/docs/components/nqui-separator.md +48 -0
  136. package/docs/components/nqui-sheet.md +27 -0
  137. package/docs/components/nqui-sidebar.md +45 -0
  138. package/docs/components/nqui-skeleton.md +15 -0
  139. package/docs/components/nqui-slider.md +16 -0
  140. package/docs/components/nqui-snippet.md +28 -0
  141. package/docs/components/nqui-sortable.md +46 -0
  142. package/docs/components/nqui-spinner.md +16 -0
  143. package/docs/components/nqui-switch.md +15 -0
  144. package/docs/components/nqui-table-of-contents.md +37 -0
  145. package/docs/components/nqui-table.md +43 -0
  146. package/docs/components/nqui-tabs.md +35 -0
  147. package/docs/components/nqui-textarea.md +15 -0
  148. package/docs/components/nqui-toaster.md +44 -0
  149. package/docs/components/nqui-toggle-group.md +65 -0
  150. package/docs/components/nqui-toggle.md +38 -0
  151. package/docs/components/nqui-tooltip.md +24 -0
  152. package/docs/components/nqui-tracker.md +38 -0
  153. package/docs/internal-notes/APP_BUILDER_PACKAGE.md +86 -0
  154. package/docs/internal-notes/BUILD_VERIFICATION.md +174 -0
  155. package/docs/internal-notes/DASHBOARD_LAYOUT_DESIGN.md +1429 -0
  156. package/docs/internal-notes/FROSTED_GLASS_FIX.md +50 -0
  157. package/docs/internal-notes/INSTALLATION.md +274 -0
  158. package/docs/internal-notes/PEER_DEPENDENCIES.md +105 -0
  159. package/docs/internal-notes/PUBLISHING.md +411 -0
  160. package/docs/internal-notes/SKILLS-ARCHITECTURE.md +105 -0
  161. package/docs/internal-notes/layoutdesign.md +616 -0
  162. package/docs/internal-notes/progress.md +348 -0
  163. package/docs/internal-notes/stacked-avatar-implementation.md +38 -0
  164. package/package.json +104 -17
  165. package/scripts/cli.js +44 -0
  166. package/scripts/help.js +1 -0
  167. package/scripts/init-css.js +15 -0
  168. package/scripts/init-cursor.js +169 -0
  169. package/scripts/install-peers.js +43 -0
  170. package/scripts/peer-deps.js +27 -0
  171. package/scripts/post-install.js +73 -0
  172. package/scripts/publish-npmjs.js +17 -3
  173. package/scripts/resolve-target-dir.js +99 -0
  174. package/scripts/skill-templates.js +109 -0
  175. package/INSTALLATION.md +0 -221
  176. package/dist/App.d.ts +0 -3
  177. package/dist/App.d.ts.map +0 -1
  178. package/dist/assets/svg/auth-lines.d.ts +0 -4
  179. package/dist/assets/svg/auth-lines.d.ts.map +0 -1
  180. package/dist/assets/svg/logo.d.ts +0 -4
  181. package/dist/assets/svg/logo.d.ts.map +0 -1
  182. package/dist/components/AppLayout.d.ts +0 -5
  183. package/dist/components/AppLayout.d.ts.map +0 -1
  184. package/dist/components/app-builder/AppBuilder.d.ts +0 -15
  185. package/dist/components/app-builder/AppBuilder.d.ts.map +0 -1
  186. package/dist/components/app-builder/context/app-builder-context.d.ts +0 -31
  187. package/dist/components/app-builder/context/app-builder-context.d.ts.map +0 -1
  188. package/dist/components/app-builder/core/AlignmentToolbar.d.ts +0 -5
  189. package/dist/components/app-builder/core/AlignmentToolbar.d.ts.map +0 -1
  190. package/dist/components/app-builder/core/AppCanvas.d.ts +0 -9
  191. package/dist/components/app-builder/core/AppCanvas.d.ts.map +0 -1
  192. package/dist/components/app-builder/core/CanvasToolbar.d.ts +0 -7
  193. package/dist/components/app-builder/core/CanvasToolbar.d.ts.map +0 -1
  194. package/dist/components/app-builder/core/DraggableWidget.d.ts +0 -12
  195. package/dist/components/app-builder/core/DraggableWidget.d.ts.map +0 -1
  196. package/dist/components/app-builder/core/WidgetConfigurator.d.ts +0 -6
  197. package/dist/components/app-builder/core/WidgetConfigurator.d.ts.map +0 -1
  198. package/dist/components/app-builder/core/WidgetPalette.d.ts +0 -6
  199. package/dist/components/app-builder/core/WidgetPalette.d.ts.map +0 -1
  200. package/dist/components/app-builder/core/WidgetRenderer.d.ts +0 -3
  201. package/dist/components/app-builder/core/WidgetRenderer.d.ts.map +0 -1
  202. package/dist/components/app-builder/core/index.d.ts +0 -8
  203. package/dist/components/app-builder/core/index.d.ts.map +0 -1
  204. package/dist/components/app-builder/essentials/button.d.ts +0 -3
  205. package/dist/components/app-builder/essentials/button.d.ts.map +0 -1
  206. package/dist/components/app-builder/essentials/container.d.ts +0 -3
  207. package/dist/components/app-builder/essentials/container.d.ts.map +0 -1
  208. package/dist/components/app-builder/essentials/index.d.ts +0 -3
  209. package/dist/components/app-builder/essentials/index.d.ts.map +0 -1
  210. package/dist/components/app-builder/hooks/index.d.ts +0 -3
  211. package/dist/components/app-builder/hooks/index.d.ts.map +0 -1
  212. package/dist/components/app-builder/hooks/use-app-builder.d.ts +0 -3
  213. package/dist/components/app-builder/hooks/use-app-builder.d.ts.map +0 -1
  214. package/dist/components/app-builder/hooks/use-canvas-state.d.ts +0 -24
  215. package/dist/components/app-builder/hooks/use-canvas-state.d.ts.map +0 -1
  216. package/dist/components/app-builder/index.d.ts +0 -19
  217. package/dist/components/app-builder/index.d.ts.map +0 -1
  218. package/dist/components/app-builder/registry/create-registry.d.ts +0 -10
  219. package/dist/components/app-builder/registry/create-registry.d.ts.map +0 -1
  220. package/dist/components/app-builder/registry/default-registry.d.ts +0 -6
  221. package/dist/components/app-builder/registry/default-registry.d.ts.map +0 -1
  222. package/dist/components/app-builder/registry/index.d.ts +0 -4
  223. package/dist/components/app-builder/registry/index.d.ts.map +0 -1
  224. package/dist/components/app-builder/registry/registry-helpers.d.ts +0 -22
  225. package/dist/components/app-builder/registry/registry-helpers.d.ts.map +0 -1
  226. package/dist/components/app-builder/types.d.ts +0 -64
  227. package/dist/components/app-builder/types.d.ts.map +0 -1
  228. package/dist/components/app-builder/utils/collision-detection.d.ts +0 -26
  229. package/dist/components/app-builder/utils/collision-detection.d.ts.map +0 -1
  230. package/dist/components/app-builder/utils/index.d.ts +0 -2
  231. package/dist/components/app-builder/utils/index.d.ts.map +0 -1
  232. package/dist/components/app-sidebar.d.ts +0 -4
  233. package/dist/components/app-sidebar.d.ts.map +0 -1
  234. package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts +0 -2
  235. package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts.map +0 -1
  236. package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts +0 -2
  237. package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts.map +0 -1
  238. package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts +0 -2
  239. package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts.map +0 -1
  240. package/dist/components/blocks/chart-compositions/index.d.ts +0 -4
  241. package/dist/components/blocks/chart-compositions/index.d.ts.map +0 -1
  242. package/dist/components/blocks/index.d.ts +0 -3
  243. package/dist/components/blocks/index.d.ts.map +0 -1
  244. package/dist/components/blocks/tables/index.d.ts +0 -4
  245. package/dist/components/blocks/tables/index.d.ts.map +0 -1
  246. package/dist/components/blocks/tables/table-01.d.ts +0 -2
  247. package/dist/components/blocks/tables/table-01.d.ts.map +0 -1
  248. package/dist/components/blocks/tables/table-02.d.ts +0 -2
  249. package/dist/components/blocks/tables/table-02.d.ts.map +0 -1
  250. package/dist/components/blocks/tables/table-03.d.ts +0 -2
  251. package/dist/components/blocks/tables/table-03.d.ts.map +0 -1
  252. package/dist/components/chart/area-chart/AreaChart.d.ts +0 -57
  253. package/dist/components/chart/area-chart/AreaChart.d.ts.map +0 -1
  254. package/dist/components/chart/area-chart/index.d.ts +0 -3
  255. package/dist/components/chart/area-chart/index.d.ts.map +0 -1
  256. package/dist/components/chart/bar-chart/BarChart.d.ts +0 -62
  257. package/dist/components/chart/bar-chart/BarChart.d.ts.map +0 -1
  258. package/dist/components/chart/bar-chart/index.d.ts +0 -3
  259. package/dist/components/chart/bar-chart/index.d.ts.map +0 -1
  260. package/dist/components/chart/bar-list/BarList.d.ts +0 -23
  261. package/dist/components/chart/bar-list/BarList.d.ts.map +0 -1
  262. package/dist/components/chart/bar-list/index.d.ts +0 -3
  263. package/dist/components/chart/bar-list/index.d.ts.map +0 -1
  264. package/dist/components/chart/category-bar/CategoryBar.d.ts +0 -15
  265. package/dist/components/chart/category-bar/CategoryBar.d.ts.map +0 -1
  266. package/dist/components/chart/category-bar/index.d.ts +0 -3
  267. package/dist/components/chart/category-bar/index.d.ts.map +0 -1
  268. package/dist/components/chart/combo-chart/ComboChart.d.ts +0 -67
  269. package/dist/components/chart/combo-chart/ComboChart.d.ts.map +0 -1
  270. package/dist/components/chart/combo-chart/index.d.ts +0 -3
  271. package/dist/components/chart/combo-chart/index.d.ts.map +0 -1
  272. package/dist/components/chart/donut-chart/DonutChart.d.ts +0 -37
  273. package/dist/components/chart/donut-chart/DonutChart.d.ts.map +0 -1
  274. package/dist/components/chart/donut-chart/index.d.ts +0 -3
  275. package/dist/components/chart/donut-chart/index.d.ts.map +0 -1
  276. package/dist/components/chart/index.d.ts +0 -19
  277. package/dist/components/chart/index.d.ts.map +0 -1
  278. package/dist/components/chart/line-chart/LineChart.d.ts +0 -55
  279. package/dist/components/chart/line-chart/LineChart.d.ts.map +0 -1
  280. package/dist/components/chart/line-chart/index.d.ts +0 -3
  281. package/dist/components/chart/line-chart/index.d.ts.map +0 -1
  282. package/dist/components/chart/progress-circle/ProgressCircle.d.ts +0 -92
  283. package/dist/components/chart/progress-circle/ProgressCircle.d.ts.map +0 -1
  284. package/dist/components/chart/progress-circle/index.d.ts +0 -3
  285. package/dist/components/chart/progress-circle/index.d.ts.map +0 -1
  286. package/dist/components/chart/spark-chart/SparkChart.d.ts +0 -40
  287. package/dist/components/chart/spark-chart/SparkChart.d.ts.map +0 -1
  288. package/dist/components/chart/spark-chart/index.d.ts +0 -3
  289. package/dist/components/chart/spark-chart/index.d.ts.map +0 -1
  290. package/dist/components/component-example.d.ts +0 -2
  291. package/dist/components/component-example.d.ts.map +0 -1
  292. package/dist/components/custom/enhanced-separator.d.ts +0 -36
  293. package/dist/components/custom/enhanced-separator.d.ts.map +0 -1
  294. package/dist/components/custom/segmented-control.d.ts +0 -48
  295. package/dist/components/custom/segmented-control.d.ts.map +0 -1
  296. package/dist/components/example.d.ts +0 -7
  297. package/dist/components/example.d.ts.map +0 -1
  298. package/dist/components/login-form.d.ts +0 -2
  299. package/dist/components/login-form.d.ts.map +0 -1
  300. package/dist/components/nav-user.d.ts +0 -8
  301. package/dist/components/nav-user.d.ts.map +0 -1
  302. package/dist/components/pm/gantt/contexts.d.ts +0 -13
  303. package/dist/components/pm/gantt/contexts.d.ts.map +0 -1
  304. package/dist/components/pm/gantt/gantt-columns.d.ts +0 -7
  305. package/dist/components/pm/gantt/gantt-columns.d.ts.map +0 -1
  306. package/dist/components/pm/gantt/gantt-demo.d.ts +0 -2
  307. package/dist/components/pm/gantt/gantt-demo.d.ts.map +0 -1
  308. package/dist/components/pm/gantt/gantt-dependencies.d.ts +0 -23
  309. package/dist/components/pm/gantt/gantt-dependencies.d.ts.map +0 -1
  310. package/dist/components/pm/gantt/gantt-features.d.ts +0 -9
  311. package/dist/components/pm/gantt/gantt-features.d.ts.map +0 -1
  312. package/dist/components/pm/gantt/gantt-header.d.ts +0 -5
  313. package/dist/components/pm/gantt/gantt-header.d.ts.map +0 -1
  314. package/dist/components/pm/gantt/gantt-markers.d.ts +0 -11
  315. package/dist/components/pm/gantt/gantt-markers.d.ts.map +0 -1
  316. package/dist/components/pm/gantt/gantt-modals.d.ts +0 -5
  317. package/dist/components/pm/gantt/gantt-modals.d.ts.map +0 -1
  318. package/dist/components/pm/gantt/gantt-provider.d.ts +0 -5
  319. package/dist/components/pm/gantt/gantt-provider.d.ts.map +0 -1
  320. package/dist/components/pm/gantt/gantt-setting-modal.d.ts +0 -4
  321. package/dist/components/pm/gantt/gantt-setting-modal.d.ts.map +0 -1
  322. package/dist/components/pm/gantt/gantt-sidebar.d.ts +0 -7
  323. package/dist/components/pm/gantt/gantt-sidebar.d.ts.map +0 -1
  324. package/dist/components/pm/gantt/gantt-toolbar.d.ts +0 -29
  325. package/dist/components/pm/gantt/gantt-toolbar.d.ts.map +0 -1
  326. package/dist/components/pm/gantt/index.d.ts +0 -16
  327. package/dist/components/pm/gantt/index.d.ts.map +0 -1
  328. package/dist/components/pm/gantt/types.d.ts +0 -299
  329. package/dist/components/pm/gantt/types.d.ts.map +0 -1
  330. package/dist/components/pm/gantt/utils.d.ts +0 -29
  331. package/dist/components/pm/gantt/utils.d.ts.map +0 -1
  332. package/dist/components/pm/index.d.ts +0 -13
  333. package/dist/components/pm/index.d.ts.map +0 -1
  334. package/dist/components/pm/mockdata.d.ts +0 -13
  335. package/dist/components/pm/mockdata.d.ts.map +0 -1
  336. package/dist/components/pm/pm-column-templates.d.ts +0 -30
  337. package/dist/components/pm/pm-column-templates.d.ts.map +0 -1
  338. package/dist/components/pm/pm-data-utils.d.ts +0 -82
  339. package/dist/components/pm/pm-data-utils.d.ts.map +0 -1
  340. package/dist/components/pm/pm-definition.d.ts +0 -75
  341. package/dist/components/pm/pm-definition.d.ts.map +0 -1
  342. package/dist/components/pm/pm-theme-context.d.ts +0 -17
  343. package/dist/components/pm/pm-theme-context.d.ts.map +0 -1
  344. package/dist/components/pm/pm-types.d.ts +0 -81
  345. package/dist/components/pm/pm-types.d.ts.map +0 -1
  346. package/dist/components/pm/project-table-view.d.ts +0 -17
  347. package/dist/components/pm/project-table-view.d.ts.map +0 -1
  348. package/dist/components/pm/table/data-grid-cell-variants.d.ts +0 -14
  349. package/dist/components/pm/table/data-grid-cell-variants.d.ts.map +0 -1
  350. package/dist/components/pm/table/data-grid-cell-wrapper.d.ts +0 -9
  351. package/dist/components/pm/table/data-grid-cell-wrapper.d.ts.map +0 -1
  352. package/dist/components/pm/table/data-grid-cell.d.ts +0 -5
  353. package/dist/components/pm/table/data-grid-cell.d.ts.map +0 -1
  354. package/dist/components/pm/table/data-grid-column-header.d.ts +0 -10
  355. package/dist/components/pm/table/data-grid-column-header.d.ts.map +0 -1
  356. package/dist/components/pm/table/data-grid-context-menu.d.ts +0 -10
  357. package/dist/components/pm/table/data-grid-context-menu.d.ts.map +0 -1
  358. package/dist/components/pm/table/data-grid-filter-menu.d.ts +0 -10
  359. package/dist/components/pm/table/data-grid-filter-menu.d.ts.map +0 -1
  360. package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts +0 -12
  361. package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts.map +0 -1
  362. package/dist/components/pm/table/data-grid-paste-dialog.d.ts +0 -9
  363. package/dist/components/pm/table/data-grid-paste-dialog.d.ts.map +0 -1
  364. package/dist/components/pm/table/data-grid-row-height-menu.d.ts +0 -10
  365. package/dist/components/pm/table/data-grid-row-height-menu.d.ts.map +0 -1
  366. package/dist/components/pm/table/data-grid-row.d.ts +0 -27
  367. package/dist/components/pm/table/data-grid-row.d.ts.map +0 -1
  368. package/dist/components/pm/table/data-grid-search.d.ts +0 -8
  369. package/dist/components/pm/table/data-grid-search.d.ts.map +0 -1
  370. package/dist/components/pm/table/data-grid-select-column.d.ts +0 -11
  371. package/dist/components/pm/table/data-grid-select-column.d.ts.map +0 -1
  372. package/dist/components/pm/table/data-grid-skeleton.d.ts +0 -12
  373. package/dist/components/pm/table/data-grid-skeleton.d.ts.map +0 -1
  374. package/dist/components/pm/table/data-grid-sort-menu.d.ts +0 -10
  375. package/dist/components/pm/table/data-grid-sort-menu.d.ts.map +0 -1
  376. package/dist/components/pm/table/data-grid-view-menu.d.ts +0 -10
  377. package/dist/components/pm/table/data-grid-view-menu.d.ts.map +0 -1
  378. package/dist/components/pm/table/data-grid.d.ts +0 -11
  379. package/dist/components/pm/table/data-grid.d.ts.map +0 -1
  380. package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts +0 -3
  381. package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts.map +0 -1
  382. package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts +0 -3
  383. package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts.map +0 -1
  384. package/dist/components/shadcn-studio/logo.d.ts +0 -5
  385. package/dist/components/shadcn-studio/logo.d.ts.map +0 -1
  386. package/dist/components/showcase/app-builder/app-builder-context.d.ts +0 -16
  387. package/dist/components/showcase/app-builder/app-builder-context.d.ts.map +0 -1
  388. package/dist/components/showcase/app-builder/app-canvas.d.ts +0 -11
  389. package/dist/components/showcase/app-builder/app-canvas.d.ts.map +0 -1
  390. package/dist/components/showcase/app-builder/widget-configurator.d.ts +0 -10
  391. package/dist/components/showcase/app-builder/widget-configurator.d.ts.map +0 -1
  392. package/dist/components/showcase/app-builder/widget-palette.d.ts +0 -6
  393. package/dist/components/showcase/app-builder/widget-palette.d.ts.map +0 -1
  394. package/dist/components/showcase/app-builder/widget-registry.d.ts +0 -29
  395. package/dist/components/showcase/app-builder/widget-registry.d.ts.map +0 -1
  396. package/dist/components/showcase/app-builder/widget-renderer.d.ts +0 -7
  397. package/dist/components/showcase/app-builder/widget-renderer.d.ts.map +0 -1
  398. package/dist/components/table/DataTable.d.ts +0 -71
  399. package/dist/components/table/DataTable.d.ts.map +0 -1
  400. package/dist/components/table/Table.d.ts +0 -12
  401. package/dist/components/table/Table.d.ts.map +0 -1
  402. package/dist/components/table/data-table-helpers.d.ts +0 -49
  403. package/dist/components/table/data-table-helpers.d.ts.map +0 -1
  404. package/dist/components/table/index.d.ts +0 -5
  405. package/dist/components/table/index.d.ts.map +0 -1
  406. package/dist/components/theme-toggle.d.ts +0 -2
  407. package/dist/components/theme-toggle.d.ts.map +0 -1
  408. package/dist/components/ui/chart.d.ts +0 -41
  409. package/dist/components/ui/chart.d.ts.map +0 -1
  410. package/dist/components/ui/shadcn-io/code-block/index.d.ts +0 -67
  411. package/dist/components/ui/shadcn-io/code-block/index.d.ts.map +0 -1
  412. package/dist/components/ui/shadcn-io/code-block/server.d.ts +0 -10
  413. package/dist/components/ui/shadcn-io/code-block/server.d.ts.map +0 -1
  414. package/dist/components/ui/shadcn-io/code-editor/index.d.ts +0 -35
  415. package/dist/components/ui/shadcn-io/code-editor/index.d.ts.map +0 -1
  416. package/dist/components/ui/shadcn-io/sandbox/index.d.ts +0 -38
  417. package/dist/components/ui/shadcn-io/sandbox/index.d.ts.map +0 -1
  418. package/dist/components/ui/shadcn-io/snippet/index.d.ts +0 -21
  419. package/dist/components/ui/shadcn-io/snippet/index.d.ts.map +0 -1
  420. package/dist/hooks/use-chart-highlight.d.ts +0 -43
  421. package/dist/hooks/use-chart-highlight.d.ts.map +0 -1
  422. package/dist/hooks/use-data-grid.d.ts +0 -59
  423. package/dist/hooks/use-data-grid.d.ts.map +0 -1
  424. package/dist/hooks/use-on-window-resize.d.ts +0 -2
  425. package/dist/hooks/use-on-window-resize.d.ts.map +0 -1
  426. package/dist/lib/data-grid-filters.d.ts +0 -29
  427. package/dist/lib/data-grid-filters.d.ts.map +0 -1
  428. package/dist/lib/data-grid.d.ts +0 -47
  429. package/dist/lib/data-grid.d.ts.map +0 -1
  430. package/dist/main.d.ts +0 -3
  431. package/dist/main.d.ts.map +0 -1
  432. package/dist/mockdata/chartData.d.ts +0 -71
  433. package/dist/mockdata/chartData.d.ts.map +0 -1
  434. package/dist/mockdata/toc.d.ts +0 -23
  435. package/dist/mockdata/toc.d.ts.map +0 -1
  436. package/dist/pages/AppBuilder.d.ts +0 -2
  437. package/dist/pages/AppBuilder.d.ts.map +0 -1
  438. package/dist/pages/ChartShowcase.d.ts +0 -2
  439. package/dist/pages/ChartShowcase.d.ts.map +0 -1
  440. package/dist/pages/ComponentShowcase.d.ts +0 -2
  441. package/dist/pages/ComponentShowcase.d.ts.map +0 -1
  442. package/dist/pages/DataTableShowcase.d.ts +0 -2
  443. package/dist/pages/DataTableShowcase.d.ts.map +0 -1
  444. package/dist/pages/Drafts.d.ts +0 -2
  445. package/dist/pages/Drafts.d.ts.map +0 -1
  446. package/dist/pages/GanttShowcase.d.ts +0 -2
  447. package/dist/pages/GanttShowcase.d.ts.map +0 -1
  448. package/dist/pages/Inbox.d.ts +0 -2
  449. package/dist/pages/Inbox.d.ts.map +0 -1
  450. package/dist/pages/Junk.d.ts +0 -2
  451. package/dist/pages/Junk.d.ts.map +0 -1
  452. package/dist/pages/Sent.d.ts +0 -2
  453. package/dist/pages/Sent.d.ts.map +0 -1
  454. package/dist/pages/Settings.d.ts +0 -2
  455. package/dist/pages/Settings.d.ts.map +0 -1
  456. package/dist/pages/Trash.d.ts +0 -2
  457. package/dist/pages/Trash.d.ts.map +0 -1
  458. package/dist/pages/gantt-data.d.ts +0 -16
  459. package/dist/pages/gantt-data.d.ts.map +0 -1
  460. package/dist/stories/mockData.d.ts +0 -157
  461. package/dist/stories/mockData.d.ts.map +0 -1
  462. package/dist/types/data-grid.d.ts +0 -179
  463. package/dist/types/data-grid.d.ts.map +0 -1
  464. package/dist/utils/chart-colors.d.ts +0 -62
  465. package/dist/utils/chart-colors.d.ts.map +0 -1
  466. package/dist/utils/chart-highlight.d.ts +0 -34
  467. package/dist/utils/chart-highlight.d.ts.map +0 -1
  468. package/dist/utils/chart-utils.d.ts +0 -2
  469. package/dist/utils/chart-utils.d.ts.map +0 -1
  470. package/dist/utils/focus-ring.d.ts +0 -2
  471. package/dist/utils/focus-ring.d.ts.map +0 -1
  472. package/dist/utils/get-y-axis-domain.d.ts +0 -2
  473. package/dist/utils/get-y-axis-domain.d.ts.map +0 -1
  474. package/dist/utils/index.d.ts +0 -10
  475. package/dist/utils/index.d.ts.map +0 -1
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Injects nqui Cursor/IDE rules so AI assistants have instructions
5
+ * for building components correctly with @nqlib/nqui.
6
+ *
7
+ * Usage: npx nqui init-cursor
8
+ */
9
+
10
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
11
+ import { resolve, dirname, relative } from 'path';
12
+ import { fileURLToPath } from 'url';
13
+ import { FULL_PEER_LIST } from './peer-deps.js';
14
+ import { buildInstallSkill, buildComponentsSkill } from './skill-templates.js';
15
+ import { resolveTargetDir } from './resolve-target-dir.js';
16
+
17
+ const __dirname = dirname(fileURLToPath(import.meta.url));
18
+ const cwd = process.cwd();
19
+ const cursorDir = resolve(cwd, '.cursor');
20
+ const rulesDir = resolve(cursorDir, 'rules');
21
+ const rulePath = resolve(rulesDir, 'nqui-components.mdc');
22
+
23
+ const fullInstallCmd = `pnpm add @nqlib/nqui ${FULL_PEER_LIST.join(' ')}`;
24
+ const npmInstallCmd = `npm install @nqlib/nqui ${FULL_PEER_LIST.join(' ')}`;
25
+
26
+ export function buildCursorRule() {
27
+ return `---
28
+ description: nqui component implementation guide. Use when building UI with @nqlib/nqui.
29
+ globs: "**/*.{ts,tsx}"
30
+ alwaysApply: false
31
+ ---
32
+
33
+ # nqui Component Guidelines
34
+
35
+ When building UI with @nqlib/nqui, follow these rules so the AI builds components correctly.
36
+
37
+ ## Install (full: nqui + all optional peers)
38
+
39
+ Run this when setting up a new project or when components fail due to missing peers:
40
+
41
+ \`\`\`bash
42
+ ${fullInstallCmd}
43
+ \`\`\`
44
+
45
+ Alternative (npm): \`${npmInstallCmd}\`
46
+
47
+ Or use \`npx @nqlib/nqui install-peers\` to auto-detect package manager.
48
+
49
+ ## Import
50
+
51
+ \`\`\`tsx
52
+ import { Button, ToggleGroup, ToggleGroupItem, Select } from "@nqlib/nqui"
53
+ \`\`\`
54
+
55
+ **CSS:** \`@import "@nqlib/nqui/styles"\` (run \`npx @nqlib/nqui init-css\` first)
56
+
57
+ ## CSS Setup (First-Run Fix)
58
+
59
+ \`init-css\` creates \`nqui/index.css\` and \`nqui/nqui-setup.css\` in the project root. **User must manually add the import** to their main CSS file. If nqui components render without styles or user reports "CSS import issue":
60
+
61
+ 1. **Check** if the main CSS file has the nqui import. Main files: \`app/globals.css\` (Next.js), \`src/index.css\` (Vite), \`app/root.css\` (Remix).
62
+
63
+ 2. **Fix options:**
64
+ - **Option A (recommended):** Add \`@import "@nqlib/nqui/styles";\` near the top of the main CSS file (after \`@import "tailwindcss"\`).
65
+ - **Option B:** If \`nqui/nqui-setup.css\` exists, copy its contents to the very top of the main CSS file.
66
+
67
+ 3. **Next.js only:** Ensure \`@source\` directives exist for Tailwind v4:
68
+ \`\`\`css
69
+ @source "./**/*.{js,ts,jsx,tsx,mdx}";
70
+ @source "../components/**/*.{js,ts,jsx,tsx,mdx}";
71
+ @source "../node_modules/@nqlib/nqui/dist/**/*.js";
72
+ \`\`\`
73
+
74
+ 4. **Vite:** Simpler – just \`@import "tailwindcss";\` + \`@import "tw-animate-css";\` + \`@import "@nqlib/nqui/styles";\`
75
+
76
+ If user hasn't run init-css, suggest: \`npx @nqlib/nqui init-css\` then add the import as above.
77
+
78
+ ## Component Selection Rules
79
+
80
+ ### Inline/Toolbar Selection → ToggleGroup (never RadioGroup)
81
+
82
+ | Context | Use | NOT |
83
+ |---------|-----|-----|
84
+ | View mode (List/Grid), scale (Linear/Log), size (S/M/L) | **ToggleGroup** \`type="single" variant="segmented"\` | RadioGroup |
85
+ | Format toolbar (Bold/Italic/Underline) | **ToggleGroup** \`type="multiple"\` | Multiple Checkboxes |
86
+ | Toolbar actions (Undo/Redo) | **ButtonGroup** | — |
87
+ | Single on/off (Bold, Mute) | **Toggle** | — |
88
+
89
+ **Rule:** Inline/toolbar = ToggleGroup. RadioGroup only for form context (settings modal, stacked list).
90
+
91
+ ### Quick Decision
92
+
93
+ - **ToggleGroup segmented** → 1 of N, 2–4 options, primary fill on selected
94
+ - **ToggleGroup single** → 1 of N, neutral styling
95
+ - **ToggleGroup multiple** → 0+ of N (bold/italic)
96
+ - **Select** → 1 of N, 5+ options or dropdown
97
+ - **ButtonGroup** → Actions (each click = action)
98
+ - **RadioGroup** → Form context only
99
+
100
+ ## Context-First Design
101
+
102
+ **Rule:** Never show Toggle/ToggleGroup/ButtonGroup floating alone. Place in realistic context:
103
+ - Document editor: toolbar above content, \`bg-muted/30\`, \`Separator\` between groups
104
+ - Chart/settings: label + inline controls, \`rounded-lg border bg-muted/30 p-3\`
105
+
106
+ ## Shared Conventions
107
+
108
+ - **Control sizes:** sm=h-6, default=h-7, lg=h-8
109
+ - **Enhanced vs Core:** Default is enhanced. Use \`CoreButton\`, \`CoreBadge\` for plain shadcn.
110
+ - **Z-index:** Use CSS vars only, e.g. \`z-[var(--z-modal)]\`. Never hardcode \`z-10\`, \`z-50\`.
111
+ - **Grouped controls:** ButtonGroup, ToggleGroup share container border; ToggleGroup uses item dividers.
112
+
113
+ ## Skills (load for install or component questions)
114
+
115
+ - **Install/setup:** Load \`.cursor/skills/nqui-install/SKILL.md\` — commands to execute
116
+ - **Components:** Load \`.cursor/skills/nqui-components/SKILL.md\` — points to \`node_modules/@nqlib/nqui/docs/components/\`
117
+
118
+ For any component question, read from \`node_modules/@nqlib/nqui/docs/components/README.md\` (index) then \`nqui-<name>.md\` (specific component).
119
+ `;
120
+ }
121
+
122
+ export function writeCursorRule(targetCwd) {
123
+ const cursorDir = resolve(targetCwd, '.cursor');
124
+ const rulesDir = resolve(cursorDir, 'rules');
125
+ const skillsDir = resolve(cursorDir, 'skills');
126
+
127
+ if (!existsSync(cursorDir)) mkdirSync(cursorDir, { recursive: true });
128
+ if (!existsSync(rulesDir)) mkdirSync(rulesDir, { recursive: true });
129
+
130
+ writeFileSync(resolve(rulesDir, 'nqui-components.mdc'), buildCursorRule(), 'utf8');
131
+
132
+ // Inject skills for install + component docs
133
+ const installSkillDir = resolve(skillsDir, 'nqui-install');
134
+ const componentsSkillDir = resolve(skillsDir, 'nqui-components');
135
+ if (!existsSync(installSkillDir)) mkdirSync(installSkillDir, { recursive: true });
136
+ if (!existsSync(componentsSkillDir)) mkdirSync(componentsSkillDir, { recursive: true });
137
+
138
+ writeFileSync(resolve(installSkillDir, 'SKILL.md'), buildInstallSkill(), 'utf8');
139
+ writeFileSync(resolve(componentsSkillDir, 'SKILL.md'), buildComponentsSkill(), 'utf8');
140
+ }
141
+
142
+ function main() {
143
+ const targetDir = resolveTargetDir(cwd);
144
+ const nquiPath = resolve(targetDir, 'node_modules/@nqlib/nqui');
145
+ const inMonorepo = existsSync(resolve(__dirname, '../docs/components/README.md'));
146
+ if (!existsSync(nquiPath) && !inMonorepo) {
147
+ console.warn('⚠️ @nqlib/nqui not found in node_modules. Rule created; install nqui for full docs path.');
148
+ }
149
+
150
+ const displayPath = targetDir === cwd ? '.' : relative(cwd, targetDir) || '.';
151
+ if (targetDir !== cwd) {
152
+ console.log(`📁 Monorepo: writing to ${displayPath} (open this folder in Cursor)`);
153
+ }
154
+
155
+ writeCursorRule(targetDir);
156
+ console.log(`
157
+ ✅ Cursor rules + skills installed
158
+
159
+ ${displayPath}/.cursor/rules/nqui-components.mdc
160
+ ${displayPath}/.cursor/skills/nqui-install/
161
+ ${displayPath}/.cursor/skills/nqui-components/
162
+
163
+ Open this folder in Cursor for skills to work. Docs: node_modules/@nqlib/nqui/docs/components/
164
+ `);
165
+ }
166
+
167
+ // Only run when executed directly (npx nqui init-cursor), not when imported
168
+ const isMain = process.argv[1]?.includes('init-cursor');
169
+ if (isMain) main();
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Installs @nqlib/nqui + all required and optional peer dependencies.
5
+ * Use when you want full library support (Sortable, Carousel, DataTable, etc.).
6
+ *
7
+ * Usage: npx @nqlib/nqui install-peers
8
+ */
9
+
10
+ import { existsSync } from 'fs';
11
+ import { resolve } from 'path';
12
+ import { execSync } from 'child_process';
13
+ import { FULL_PEER_LIST } from './peer-deps.js';
14
+
15
+ const cwd = process.cwd();
16
+
17
+ function detectPackageManager() {
18
+ if (existsSync(resolve(cwd, 'pnpm-lock.yaml'))) return 'pnpm';
19
+ if (existsSync(resolve(cwd, 'yarn.lock'))) return 'yarn';
20
+ if (existsSync(resolve(cwd, 'bun.lockb'))) return 'bun';
21
+ return 'npm';
22
+ }
23
+
24
+ function getInstallCmd(pkgs) {
25
+ const pm = detectPackageManager();
26
+ const list = pkgs.join(' ');
27
+ switch (pm) {
28
+ case 'pnpm':
29
+ return `pnpm add ${list}`;
30
+ case 'yarn':
31
+ return `yarn add ${list}`;
32
+ case 'bun':
33
+ return `bun add ${list}`;
34
+ default:
35
+ return `npm install ${list}`;
36
+ }
37
+ }
38
+
39
+ const pkgs = ['@nqlib/nqui', ...FULL_PEER_LIST];
40
+ const cmd = getInstallCmd(pkgs);
41
+
42
+ console.log(`\nInstalling nqui + all peer dependencies...\n ${cmd}\n`);
43
+ execSync(cmd, { stdio: 'inherit', cwd });
@@ -0,0 +1,27 @@
1
+ /**
2
+ * nqui peer dependencies. Required + optional (for full library usage).
3
+ * Used by install-peers.js and init-cursor.js.
4
+ */
5
+
6
+ export const REQUIRED_PEERS = [
7
+ '@hugeicons/react',
8
+ '@hugeicons/core-free-icons',
9
+ ];
10
+
11
+ export const OPTIONAL_PEERS = [
12
+ 'cmdk',
13
+ '@dnd-kit/core',
14
+ '@dnd-kit/modifiers',
15
+ '@dnd-kit/sortable',
16
+ '@dnd-kit/utilities',
17
+ 'embla-carousel-react',
18
+ '@tanstack/react-table',
19
+ 'react-day-picker',
20
+ 'date-fns',
21
+ 'sonner',
22
+ 'vaul',
23
+ 'react-resizable-panels',
24
+ '@base-ui/react',
25
+ ];
26
+
27
+ export const FULL_PEER_LIST = [...REQUIRED_PEERS, ...OPTIONAL_PEERS];
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Post-install: print next steps for nqui setup.
5
+ * Runs after npm/pnpm/yarn install. Also invokable via: npx nqui-setup
6
+ *
7
+ * Auto-injects Cursor rules so consumers don't need to remember init-cursor.
8
+ */
9
+
10
+ import { existsSync } from 'fs';
11
+ import { resolve } from 'path';
12
+
13
+ // Skip in CI to reduce noise
14
+ if (process.env.CI === 'true' || process.env.CI === '1') process.exit(0);
15
+
16
+ function detectPackageManager() {
17
+ const cwd = process.cwd();
18
+ if (existsSync(resolve(cwd, 'pnpm-lock.yaml'))) return 'pnpm';
19
+ if (existsSync(resolve(cwd, 'yarn.lock'))) return 'yarn';
20
+ if (existsSync(resolve(cwd, 'bun.lockb'))) return 'bun';
21
+ return 'npm';
22
+ }
23
+
24
+ function getInstallCmd(pkgs) {
25
+ const pm = detectPackageManager();
26
+ const list = pkgs.join(' ');
27
+ switch (pm) {
28
+ case 'pnpm':
29
+ return `pnpm add ${list}`;
30
+ case 'yarn':
31
+ return `yarn add ${list}`;
32
+ case 'bun':
33
+ return `bun add ${list}`;
34
+ default:
35
+ return `npm install ${list}`;
36
+ }
37
+ }
38
+
39
+ import { FULL_PEER_LIST } from './peer-deps.js';
40
+ import { writeCursorRule } from './init-cursor.js';
41
+ import { resolveTargetDir } from './resolve-target-dir.js';
42
+
43
+ const requiredPeers = ['@hugeicons/react', '@hugeicons/core-free-icons'];
44
+ const recommended = ['tw-animate-css', 'next-themes'];
45
+
46
+ const installRequired = getInstallCmd(requiredPeers);
47
+ const installFull = getInstallCmd(['@nqlib/nqui', ...FULL_PEER_LIST]);
48
+ const installRecommended = getInstallCmd(recommended);
49
+
50
+ const msg = `
51
+ ╔══════════════════════════════════════════════════════════════════╗
52
+ ║ nqui – Next steps ║
53
+ ╚══════════════════════════════════════════════════════════════════╝
54
+
55
+ 1. Set up CSS (required)
56
+ npx @nqlib/nqui init-css
57
+
58
+ 2. Install peers: ${installRequired}
59
+ Full: npx @nqlib/nqui install-peers
60
+
61
+ 3. Optional: tw-animate-css, next-themes
62
+
63
+ 4. Cursor skills: auto-injected. Open this folder in Cursor.
64
+ Refresh: npx @nqlib/nqui init-cursor
65
+
66
+ → Run "npx nqui-setup" anytime to see this again.
67
+ `;
68
+ console.log(msg);
69
+
70
+ // Auto-inject Cursor rules (writes to package that has nqui in monorepos)
71
+ const targetDir = resolveTargetDir(process.cwd());
72
+ writeCursorRule(targetDir);
73
+ console.log(` Skills written to: ${targetDir}/.cursor/\n`);
@@ -19,8 +19,19 @@ const npmrcPath = join(rootDir, '.npmrc');
19
19
  // Read package.json
20
20
  const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
21
21
 
22
- // Save original publishConfig
22
+ // Save originals for restore
23
23
  const originalPublishConfig = packageJson.publishConfig;
24
+ const originalDependencies = { ...packageJson.dependencies };
25
+
26
+ // Remove workspace:* deps (npm doesn't support workspace: protocol).
27
+ // nqcode/nqappbuilder are dev/showcase-only and not bundled in the library.
28
+ const workspaceDeps = ['@nqlib/nqcode', '@nqlib/nqappbuilder'];
29
+ for (const name of workspaceDeps) {
30
+ if (packageJson.dependencies?.[name] === 'workspace:*') {
31
+ delete packageJson.dependencies[name];
32
+ console.log(` Removed ${name} (workspace dep)`);
33
+ }
34
+ }
24
35
 
25
36
  // Override publishConfig for npmjs.com
26
37
  packageJson.publishConfig = {
@@ -99,14 +110,17 @@ try {
99
110
  }
100
111
  throw error;
101
112
  } finally {
102
- // Restore original publishConfig
113
+ // Restore original publishConfig and dependencies
103
114
  if (originalPublishConfig) {
104
115
  packageJson.publishConfig = originalPublishConfig;
105
116
  } else {
106
117
  delete packageJson.publishConfig;
107
118
  }
119
+ if (originalDependencies) {
120
+ packageJson.dependencies = originalDependencies;
121
+ }
108
122
  writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
109
- console.log('🔄 Restored publishConfig');
123
+ console.log('🔄 Restored package.json');
110
124
 
111
125
  // Restore .npmrc if it existed
112
126
  if (npmrcExists && originalNpmrc !== null) {
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Resolves the best directory to write .cursor/ into.
3
+ * Prefers a directory where node_modules/@nqlib/nqui exists (so docs path works).
4
+ *
5
+ * Used by init-cursor and post-install for monorepo support.
6
+ */
7
+
8
+ import { existsSync, readFileSync, readdirSync } from 'fs';
9
+ import { resolve, dirname } from 'path';
10
+
11
+ function hasNquiInNodeModules(dir) {
12
+ return existsSync(resolve(dir, 'node_modules/@nqlib/nqui'));
13
+ }
14
+
15
+ function hasNquiInPackageJson(dir) {
16
+ try {
17
+ const pkg = JSON.parse(readFileSync(resolve(dir, 'package.json'), 'utf8'));
18
+ const deps = { ...pkg.dependencies, ...pkg.devDependencies };
19
+ return !!deps['@nqlib/nqui'];
20
+ } catch {
21
+ return false;
22
+ }
23
+ }
24
+
25
+ function findWorkspaceRoot(startDir) {
26
+ let dir = resolve(startDir);
27
+ for (let i = 0; i < 20; i++) {
28
+ if (existsSync(resolve(dir, 'pnpm-workspace.yaml'))) return dir;
29
+ const pkgPath = resolve(dir, 'package.json');
30
+ if (existsSync(pkgPath) && readFileSync(pkgPath, 'utf8').includes('"workspaces"')) {
31
+ return dir;
32
+ }
33
+ const parent = dirname(dir);
34
+ if (parent === dir) break;
35
+ dir = parent;
36
+ }
37
+ return null;
38
+ }
39
+
40
+ function getWorkspacePackageDirs(workspaceRoot) {
41
+ const dirs = [];
42
+ const candidates = ['packages', 'apps', 'packages/*', 'apps/*'];
43
+ for (const base of ['packages', 'apps']) {
44
+ const basePath = resolve(workspaceRoot, base);
45
+ if (!existsSync(basePath)) continue;
46
+ try {
47
+ const entries = readdirSync(basePath, { withFileTypes: true });
48
+ for (const e of entries) {
49
+ if (e.isDirectory()) {
50
+ const pkgDir = resolve(basePath, e.name);
51
+ if (existsSync(resolve(pkgDir, 'package.json'))) {
52
+ dirs.push(pkgDir);
53
+ }
54
+ }
55
+ }
56
+ } catch {}
57
+ }
58
+ return dirs;
59
+ }
60
+
61
+ function isNquiSourceDir(dir) {
62
+ return existsSync(resolve(dir, 'docs/components/README.md')) &&
63
+ existsSync(resolve(dir, 'package.json')) &&
64
+ readFileSync(resolve(dir, 'package.json'), 'utf8').includes('"name": "@nqlib/nqui"');
65
+ }
66
+
67
+ /**
68
+ * Returns the directory where .cursor/ should be written.
69
+ * Prefers a dir with node_modules/@nqlib/nqui so docs path resolves.
70
+ *
71
+ * @param {string} startDir - Usually process.cwd()
72
+ * @returns {string} Absolute path to target directory
73
+ */
74
+ export function resolveTargetDir(startDir) {
75
+ const cwd = resolve(startDir);
76
+
77
+ // 1. Current dir has nqui in node_modules -> use it
78
+ if (hasNquiInNodeModules(cwd)) return cwd;
79
+
80
+ // 2. Current dir is nqui source (developing the library) -> use it
81
+ if (isNquiSourceDir(cwd)) return cwd;
82
+
83
+ // 3. Current dir has nqui in package.json (might be hoisted) -> use it
84
+ if (hasNquiInPackageJson(cwd)) return cwd;
85
+
86
+ // 4. Monorepo: find a workspace package that has nqui
87
+ const workspaceRoot = findWorkspaceRoot(cwd);
88
+ if (workspaceRoot) {
89
+ const pkgDirs = getWorkspacePackageDirs(workspaceRoot);
90
+ for (const dir of pkgDirs) {
91
+ if (hasNquiInNodeModules(dir) || hasNquiInPackageJson(dir)) {
92
+ return dir;
93
+ }
94
+ }
95
+ }
96
+
97
+ // 5. Fallback: use cwd (rule created; docs path may need manual fix)
98
+ return cwd;
99
+ }
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Skill templates injected by init-cursor into consumer projects.
3
+ * Paths use node_modules for consumers (package install location).
4
+ */
5
+
6
+ import { FULL_PEER_LIST } from './peer-deps.js';
7
+
8
+ const fullInstallCmd = `pnpm add @nqlib/nqui ${FULL_PEER_LIST.join(' ')}`;
9
+ const npmInstallCmd = `npm install @nqlib/nqui ${FULL_PEER_LIST.join(' ')}`;
10
+
11
+ const DOCS_PATH = 'node_modules/@nqlib/nqui/docs/components';
12
+
13
+ export function buildInstallSkill() {
14
+ return `---
15
+ name: nqui-install
16
+ description: Install and setup nqui. Use when user wants to install nqui, set up project, fix missing peers, or run setup commands. Execute these commands in the project root.
17
+ ---
18
+
19
+ # nqui Install & Setup
20
+
21
+ **When to load:** User asks to install nqui, set up a new project, fix "module not found" or missing peer deps, or run setup.
22
+
23
+ **Action:** Execute the relevant command(s) below in the project root. Run in sequence when doing full setup.
24
+
25
+ ## 1. Install nqui + peers
26
+
27
+ **Minimal (icons only):**
28
+ \`\`\`bash
29
+ pnpm add @nqlib/nqui @hugeicons/react @hugeicons/core-free-icons
30
+ \`\`\`
31
+ (npm: \`npm install @nqlib/nqui @hugeicons/react @hugeicons/core-free-icons\`)
32
+
33
+ **Full (all optional components):**
34
+ \`\`\`bash
35
+ npx @nqlib/nqui install-peers
36
+ \`\`\`
37
+ Or manually:
38
+ \`\`\`bash
39
+ ${fullInstallCmd}
40
+ \`\`\`
41
+ (npm: \`${npmInstallCmd}\`)
42
+
43
+ ## 2. Setup CSS (required)
44
+
45
+ \`\`\`bash
46
+ npx @nqlib/nqui init-css
47
+ \`\`\`
48
+
49
+ Then add to main CSS (app/globals.css or src/index.css): \`@import "@nqlib/nqui/styles";\`
50
+ Or copy contents of \`nqui/nqui-setup.css\` to top of main CSS.
51
+
52
+ ## 3. Refresh Cursor rules (optional)
53
+
54
+ \`\`\`bash
55
+ npx @nqlib/nqui init-cursor
56
+ \`\`\`
57
+
58
+ ## File locations
59
+
60
+ - Docs: \`${DOCS_PATH}/README.md\` (index) and \`${DOCS_PATH}/nqui-<name>.md\` (per component)
61
+ - Check setup: \`npx nqui-setup\`
62
+ `;
63
+ }
64
+
65
+ export function buildComponentsSkill() {
66
+ return `---
67
+ name: nqui-components
68
+ description: Component implementation for nqui. Use when building UI with @nqlib/nqui, choosing components, or implementing a specific component. Always read from docs path before implementing.
69
+ ---
70
+
71
+ # nqui Components
72
+
73
+ **When to load:** User asks about nqui components, which component to use, how to implement X, or builds UI with nqui.
74
+
75
+ **Action:** Read from the docs path before implementing. Do not guess – the docs have exact import, props, and examples.
76
+
77
+ ## Documentation path (always use this)
78
+
79
+ \`\`\`
80
+ ${DOCS_PATH}/
81
+ \`\`\`
82
+
83
+ ## File resolution
84
+
85
+ | User asks | File to read |
86
+ |-----------|--------------|
87
+ | Component index, use cases, which component for X | \`${DOCS_PATH}/README.md\` |
88
+ | How to use Button | \`${DOCS_PATH}/nqui-button.md\` |
89
+ | How to use ToggleGroup | \`${DOCS_PATH}/nqui-toggle-group.md\` |
90
+ | Any component X | \`${DOCS_PATH}/nqui-<kebab-name>.md\` (e.g. nqui-data-table.md) |
91
+
92
+ **Rule:** For any component question, read the doc first. The docs have import, variants, props, and examples.
93
+
94
+ ## Quick rules (details in README.md)
95
+
96
+ - **Toolbar/inline selection** → ToggleGroup (never RadioGroup)
97
+ - **Form context** → RadioGroup, Checkbox
98
+ - **Actions** → Button, ButtonGroup
99
+ - **Context-first:** Place controls in realistic layout (toolbar, chart settings), not floating alone
100
+
101
+ ## Import
102
+
103
+ \`\`\`tsx
104
+ import { Button, ToggleGroup, ToggleGroupItem } from "@nqlib/nqui"
105
+ \`\`\`
106
+
107
+ CSS: \`@import "@nqlib/nqui/styles"\` in main CSS (run \`npx @nqlib/nqui init-css\` first).
108
+ `;
109
+ }