@nqlib/nqui 0.3.3 → 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.
- package/README.md +20 -2
- package/dist/button-CYFTFDKe.cjs +1 -0
- package/dist/button-nJvDl3w8.js +44 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.es.js +6 -0
- package/dist/carousel-DEyyJi49.js +179 -0
- package/dist/carousel-Dhhz8m5V.cjs +1 -0
- package/dist/carousel.cjs.js +1 -0
- package/dist/carousel.es.js +8 -0
- package/dist/command-palette-UHk8zZOg.cjs +45 -0
- package/dist/command-palette-d-TrdBsM.js +1778 -0
- package/dist/command.cjs.js +1 -0
- package/dist/command.es.js +13 -0
- package/dist/components/custom/color-picker.d.ts.map +1 -1
- package/dist/components/custom/command-palette.d.ts.map +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
- package/dist/components/custom/enhanced-combobox.d.ts +1 -1
- package/dist/components/custom/enhanced-combobox.d.ts.map +1 -1
- package/dist/components/custom/enhanced-radio-group.d.ts.map +1 -1
- package/dist/components/custom/enhanced-scroll-area.d.ts +12 -0
- package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
- package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
- package/dist/components/debug/debug-panel.d.ts.map +1 -1
- package/dist/components/debug/magnifier.d.ts.map +1 -1
- package/dist/components/debug/ui-tester.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/separator.d.ts +34 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -2
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/drawer-BcIxWRN8.cjs +1 -0
- package/dist/drawer-CU4lkcz7.js +119 -0
- package/dist/drawer.cjs.js +1 -0
- package/dist/drawer.es.js +13 -0
- package/dist/enhanced-calendar-5PA8CeF7.cjs +61 -0
- package/dist/enhanced-calendar-BENbxw7_.js +375 -0
- package/dist/entries/calendar.d.ts +9 -0
- package/dist/entries/calendar.d.ts.map +1 -0
- package/dist/entries/carousel.d.ts +7 -0
- package/dist/entries/carousel.d.ts.map +1 -0
- package/dist/entries/command.d.ts +9 -0
- package/dist/entries/command.d.ts.map +1 -0
- package/dist/entries/drawer.d.ts +7 -0
- package/dist/entries/drawer.d.ts.map +1 -0
- package/dist/entries/sonner.d.ts +8 -0
- package/dist/entries/sonner.d.ts.map +1 -0
- package/dist/entries/sortable.d.ts +7 -0
- package/dist/entries/sortable.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-as-ref.d.ts +1 -1
- package/dist/hooks/use-as-ref.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.d.ts +13 -0
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
- package/dist/index.d.ts +13 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/keyboard-BapbM2wb.cjs +1 -0
- package/dist/keyboard-pkY42Y3a.js +39 -0
- package/dist/nqui.cjs.js +171 -802
- package/dist/nqui.es.js +15298 -72451
- package/dist/sonner-Co6YpYVs.js +546 -0
- package/dist/sonner-DbQhVp8m.cjs +330 -0
- package/dist/sonner.cjs.js +1 -0
- package/dist/sonner.es.js +6 -0
- package/dist/sortable-Cj3cdxGc.cjs +5 -0
- package/dist/sortable-wG_cXiUk.js +366 -0
- package/dist/sortable.cjs.js +1 -0
- package/dist/sortable.es.js +8 -0
- package/dist/styles.css +21 -9
- package/dist/utils-B6yFEsav.js +8 -0
- package/dist/utils-IjLH3w2e.cjs +1 -0
- package/docs/components/README.md +282 -92
- package/docs/components/nqui-button-group.md +24 -5
- package/docs/components/nqui-checkbox.md +2 -2
- package/docs/components/nqui-code-block.md +6 -4
- package/docs/components/nqui-code-editor.md +1 -1
- package/docs/components/nqui-combobox.md +9 -1
- package/docs/components/nqui-data-table.md +46 -0
- package/docs/components/nqui-input-group.md +14 -6
- package/docs/components/nqui-radio-group.md +9 -1
- package/docs/components/nqui-sandbox.md +1 -1
- package/docs/components/nqui-select.md +13 -10
- package/docs/components/nqui-separator.md +33 -1
- package/docs/components/nqui-snippet.md +1 -1
- package/docs/components/nqui-table.md +43 -0
- package/docs/components/nqui-toggle-group.md +49 -5
- package/docs/components/nqui-toggle.md +25 -2
- package/docs/internal-notes/APP_BUILDER_PACKAGE.md +86 -0
- package/docs/internal-notes/INSTALLATION.md +161 -108
- package/docs/internal-notes/PEER_DEPENDENCIES.md +105 -0
- package/docs/internal-notes/PUBLISHING.md +72 -0
- package/docs/internal-notes/SKILLS-ARCHITECTURE.md +105 -0
- package/package.json +103 -17
- package/scripts/cli.js +44 -0
- package/scripts/help.js +1 -0
- package/scripts/init-css.js +15 -0
- package/scripts/init-cursor.js +169 -0
- package/scripts/install-peers.js +43 -0
- package/scripts/peer-deps.js +27 -0
- package/scripts/post-install.js +73 -0
- package/scripts/publish-npmjs.js +17 -3
- package/scripts/resolve-target-dir.js +99 -0
- package/scripts/skill-templates.js +109 -0
- package/dist/App.d.ts +0 -3
- package/dist/App.d.ts.map +0 -1
- package/dist/assets/svg/auth-lines.d.ts +0 -4
- package/dist/assets/svg/auth-lines.d.ts.map +0 -1
- package/dist/assets/svg/logo.d.ts +0 -4
- package/dist/assets/svg/logo.d.ts.map +0 -1
- package/dist/components/AppLayout.d.ts +0 -5
- package/dist/components/AppLayout.d.ts.map +0 -1
- package/dist/components/app-builder/AppBuilder.d.ts +0 -15
- package/dist/components/app-builder/AppBuilder.d.ts.map +0 -1
- package/dist/components/app-builder/context/app-builder-context.d.ts +0 -31
- package/dist/components/app-builder/context/app-builder-context.d.ts.map +0 -1
- package/dist/components/app-builder/core/AlignmentToolbar.d.ts +0 -5
- package/dist/components/app-builder/core/AlignmentToolbar.d.ts.map +0 -1
- package/dist/components/app-builder/core/AppCanvas.d.ts +0 -9
- package/dist/components/app-builder/core/AppCanvas.d.ts.map +0 -1
- package/dist/components/app-builder/core/CanvasToolbar.d.ts +0 -7
- package/dist/components/app-builder/core/CanvasToolbar.d.ts.map +0 -1
- package/dist/components/app-builder/core/DraggableWidget.d.ts +0 -12
- package/dist/components/app-builder/core/DraggableWidget.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetConfigurator.d.ts +0 -6
- package/dist/components/app-builder/core/WidgetConfigurator.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetPalette.d.ts +0 -6
- package/dist/components/app-builder/core/WidgetPalette.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetRenderer.d.ts +0 -3
- package/dist/components/app-builder/core/WidgetRenderer.d.ts.map +0 -1
- package/dist/components/app-builder/core/index.d.ts +0 -8
- package/dist/components/app-builder/core/index.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/button.d.ts +0 -3
- package/dist/components/app-builder/essentials/button.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/container.d.ts +0 -3
- package/dist/components/app-builder/essentials/container.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/index.d.ts +0 -3
- package/dist/components/app-builder/essentials/index.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/index.d.ts +0 -3
- package/dist/components/app-builder/hooks/index.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/use-app-builder.d.ts +0 -3
- package/dist/components/app-builder/hooks/use-app-builder.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/use-canvas-state.d.ts +0 -24
- package/dist/components/app-builder/hooks/use-canvas-state.d.ts.map +0 -1
- package/dist/components/app-builder/index.d.ts +0 -19
- package/dist/components/app-builder/index.d.ts.map +0 -1
- package/dist/components/app-builder/registry/create-registry.d.ts +0 -10
- package/dist/components/app-builder/registry/create-registry.d.ts.map +0 -1
- package/dist/components/app-builder/registry/default-registry.d.ts +0 -6
- package/dist/components/app-builder/registry/default-registry.d.ts.map +0 -1
- package/dist/components/app-builder/registry/index.d.ts +0 -4
- package/dist/components/app-builder/registry/index.d.ts.map +0 -1
- package/dist/components/app-builder/registry/registry-helpers.d.ts +0 -22
- package/dist/components/app-builder/registry/registry-helpers.d.ts.map +0 -1
- package/dist/components/app-builder/types.d.ts +0 -64
- package/dist/components/app-builder/types.d.ts.map +0 -1
- package/dist/components/app-builder/utils/collision-detection.d.ts +0 -26
- package/dist/components/app-builder/utils/collision-detection.d.ts.map +0 -1
- package/dist/components/app-builder/utils/index.d.ts +0 -2
- package/dist/components/app-builder/utils/index.d.ts.map +0 -1
- package/dist/components/app-sidebar.d.ts +0 -4
- package/dist/components/app-sidebar.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/index.d.ts +0 -4
- package/dist/components/blocks/chart-compositions/index.d.ts.map +0 -1
- package/dist/components/blocks/index.d.ts +0 -3
- package/dist/components/blocks/index.d.ts.map +0 -1
- package/dist/components/blocks/tables/index.d.ts +0 -4
- package/dist/components/blocks/tables/index.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-01.d.ts +0 -2
- package/dist/components/blocks/tables/table-01.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-02.d.ts +0 -2
- package/dist/components/blocks/tables/table-02.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-03.d.ts +0 -2
- package/dist/components/blocks/tables/table-03.d.ts.map +0 -1
- package/dist/components/chart/area-chart/AreaChart.d.ts +0 -57
- package/dist/components/chart/area-chart/AreaChart.d.ts.map +0 -1
- package/dist/components/chart/area-chart/index.d.ts +0 -3
- package/dist/components/chart/area-chart/index.d.ts.map +0 -1
- package/dist/components/chart/bar-chart/BarChart.d.ts +0 -62
- package/dist/components/chart/bar-chart/BarChart.d.ts.map +0 -1
- package/dist/components/chart/bar-chart/index.d.ts +0 -3
- package/dist/components/chart/bar-chart/index.d.ts.map +0 -1
- package/dist/components/chart/bar-list/BarList.d.ts +0 -23
- package/dist/components/chart/bar-list/BarList.d.ts.map +0 -1
- package/dist/components/chart/bar-list/index.d.ts +0 -3
- package/dist/components/chart/bar-list/index.d.ts.map +0 -1
- package/dist/components/chart/category-bar/CategoryBar.d.ts +0 -15
- package/dist/components/chart/category-bar/CategoryBar.d.ts.map +0 -1
- package/dist/components/chart/category-bar/index.d.ts +0 -3
- package/dist/components/chart/category-bar/index.d.ts.map +0 -1
- package/dist/components/chart/combo-chart/ComboChart.d.ts +0 -67
- package/dist/components/chart/combo-chart/ComboChart.d.ts.map +0 -1
- package/dist/components/chart/combo-chart/index.d.ts +0 -3
- package/dist/components/chart/combo-chart/index.d.ts.map +0 -1
- package/dist/components/chart/donut-chart/DonutChart.d.ts +0 -37
- package/dist/components/chart/donut-chart/DonutChart.d.ts.map +0 -1
- package/dist/components/chart/donut-chart/index.d.ts +0 -3
- package/dist/components/chart/donut-chart/index.d.ts.map +0 -1
- package/dist/components/chart/index.d.ts +0 -19
- package/dist/components/chart/index.d.ts.map +0 -1
- package/dist/components/chart/line-chart/LineChart.d.ts +0 -55
- package/dist/components/chart/line-chart/LineChart.d.ts.map +0 -1
- package/dist/components/chart/line-chart/index.d.ts +0 -3
- package/dist/components/chart/line-chart/index.d.ts.map +0 -1
- package/dist/components/chart/progress-circle/ProgressCircle.d.ts +0 -92
- package/dist/components/chart/progress-circle/ProgressCircle.d.ts.map +0 -1
- package/dist/components/chart/progress-circle/index.d.ts +0 -3
- package/dist/components/chart/progress-circle/index.d.ts.map +0 -1
- package/dist/components/chart/spark-chart/SparkChart.d.ts +0 -40
- package/dist/components/chart/spark-chart/SparkChart.d.ts.map +0 -1
- package/dist/components/chart/spark-chart/index.d.ts +0 -3
- package/dist/components/chart/spark-chart/index.d.ts.map +0 -1
- package/dist/components/component-example.d.ts +0 -2
- package/dist/components/component-example.d.ts.map +0 -1
- package/dist/components/custom/enhanced-separator.d.ts +0 -36
- package/dist/components/custom/enhanced-separator.d.ts.map +0 -1
- package/dist/components/custom/segmented-control.d.ts +0 -48
- package/dist/components/custom/segmented-control.d.ts.map +0 -1
- package/dist/components/example.d.ts +0 -7
- package/dist/components/example.d.ts.map +0 -1
- package/dist/components/login-form.d.ts +0 -2
- package/dist/components/login-form.d.ts.map +0 -1
- package/dist/components/nav-user.d.ts +0 -8
- package/dist/components/nav-user.d.ts.map +0 -1
- package/dist/components/pm/gantt/contexts.d.ts +0 -13
- package/dist/components/pm/gantt/contexts.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-columns.d.ts +0 -7
- package/dist/components/pm/gantt/gantt-columns.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-demo.d.ts +0 -2
- package/dist/components/pm/gantt/gantt-demo.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-dependencies.d.ts +0 -23
- package/dist/components/pm/gantt/gantt-dependencies.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-features.d.ts +0 -9
- package/dist/components/pm/gantt/gantt-features.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-header.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-header.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-markers.d.ts +0 -11
- package/dist/components/pm/gantt/gantt-markers.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-modals.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-modals.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-provider.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-provider.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-setting-modal.d.ts +0 -4
- package/dist/components/pm/gantt/gantt-setting-modal.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-sidebar.d.ts +0 -7
- package/dist/components/pm/gantt/gantt-sidebar.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-toolbar.d.ts +0 -29
- package/dist/components/pm/gantt/gantt-toolbar.d.ts.map +0 -1
- package/dist/components/pm/gantt/index.d.ts +0 -16
- package/dist/components/pm/gantt/index.d.ts.map +0 -1
- package/dist/components/pm/gantt/types.d.ts +0 -299
- package/dist/components/pm/gantt/types.d.ts.map +0 -1
- package/dist/components/pm/gantt/utils.d.ts +0 -29
- package/dist/components/pm/gantt/utils.d.ts.map +0 -1
- package/dist/components/pm/index.d.ts +0 -13
- package/dist/components/pm/index.d.ts.map +0 -1
- package/dist/components/pm/mockdata.d.ts +0 -13
- package/dist/components/pm/mockdata.d.ts.map +0 -1
- package/dist/components/pm/pm-column-templates.d.ts +0 -30
- package/dist/components/pm/pm-column-templates.d.ts.map +0 -1
- package/dist/components/pm/pm-data-utils.d.ts +0 -82
- package/dist/components/pm/pm-data-utils.d.ts.map +0 -1
- package/dist/components/pm/pm-definition.d.ts +0 -75
- package/dist/components/pm/pm-definition.d.ts.map +0 -1
- package/dist/components/pm/pm-theme-context.d.ts +0 -17
- package/dist/components/pm/pm-theme-context.d.ts.map +0 -1
- package/dist/components/pm/pm-types.d.ts +0 -81
- package/dist/components/pm/pm-types.d.ts.map +0 -1
- package/dist/components/pm/project-table-view.d.ts +0 -17
- package/dist/components/pm/project-table-view.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell-variants.d.ts +0 -14
- package/dist/components/pm/table/data-grid-cell-variants.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell-wrapper.d.ts +0 -9
- package/dist/components/pm/table/data-grid-cell-wrapper.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell.d.ts +0 -5
- package/dist/components/pm/table/data-grid-cell.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-column-header.d.ts +0 -10
- package/dist/components/pm/table/data-grid-column-header.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-context-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-context-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-filter-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-filter-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts +0 -12
- package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-paste-dialog.d.ts +0 -9
- package/dist/components/pm/table/data-grid-paste-dialog.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-row-height-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-row-height-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-row.d.ts +0 -27
- package/dist/components/pm/table/data-grid-row.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-search.d.ts +0 -8
- package/dist/components/pm/table/data-grid-search.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-select-column.d.ts +0 -11
- package/dist/components/pm/table/data-grid-select-column.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-skeleton.d.ts +0 -12
- package/dist/components/pm/table/data-grid-skeleton.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-sort-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-sort-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-view-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-view-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid.d.ts +0 -11
- package/dist/components/pm/table/data-grid.d.ts.map +0 -1
- package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts +0 -3
- package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts.map +0 -1
- package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts +0 -3
- package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts.map +0 -1
- package/dist/components/shadcn-studio/logo.d.ts +0 -5
- package/dist/components/shadcn-studio/logo.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/app-builder-context.d.ts +0 -16
- package/dist/components/showcase/app-builder/app-builder-context.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/app-canvas.d.ts +0 -11
- package/dist/components/showcase/app-builder/app-canvas.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-configurator.d.ts +0 -10
- package/dist/components/showcase/app-builder/widget-configurator.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-palette.d.ts +0 -6
- package/dist/components/showcase/app-builder/widget-palette.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-registry.d.ts +0 -29
- package/dist/components/showcase/app-builder/widget-registry.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-renderer.d.ts +0 -7
- package/dist/components/showcase/app-builder/widget-renderer.d.ts.map +0 -1
- package/dist/components/table/DataTable.d.ts +0 -71
- package/dist/components/table/DataTable.d.ts.map +0 -1
- package/dist/components/table/Table.d.ts +0 -12
- package/dist/components/table/Table.d.ts.map +0 -1
- package/dist/components/table/data-table-helpers.d.ts +0 -49
- package/dist/components/table/data-table-helpers.d.ts.map +0 -1
- package/dist/components/table/index.d.ts +0 -5
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/theme-toggle.d.ts +0 -2
- package/dist/components/theme-toggle.d.ts.map +0 -1
- package/dist/components/ui/chart.d.ts +0 -41
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-block/index.d.ts +0 -67
- package/dist/components/ui/shadcn-io/code-block/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-block/server.d.ts +0 -10
- package/dist/components/ui/shadcn-io/code-block/server.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-editor/index.d.ts +0 -35
- package/dist/components/ui/shadcn-io/code-editor/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/sandbox/index.d.ts +0 -38
- package/dist/components/ui/shadcn-io/sandbox/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/snippet/index.d.ts +0 -21
- package/dist/components/ui/shadcn-io/snippet/index.d.ts.map +0 -1
- package/dist/hooks/use-chart-highlight.d.ts +0 -43
- package/dist/hooks/use-chart-highlight.d.ts.map +0 -1
- package/dist/hooks/use-data-grid.d.ts +0 -59
- package/dist/hooks/use-data-grid.d.ts.map +0 -1
- package/dist/hooks/use-on-window-resize.d.ts +0 -2
- package/dist/hooks/use-on-window-resize.d.ts.map +0 -1
- package/dist/lib/data-grid-filters.d.ts +0 -29
- package/dist/lib/data-grid-filters.d.ts.map +0 -1
- package/dist/lib/data-grid.d.ts +0 -47
- package/dist/lib/data-grid.d.ts.map +0 -1
- package/dist/main.d.ts +0 -3
- package/dist/main.d.ts.map +0 -1
- package/dist/mockdata/chartData.d.ts +0 -71
- package/dist/mockdata/chartData.d.ts.map +0 -1
- package/dist/mockdata/toc.d.ts +0 -23
- package/dist/mockdata/toc.d.ts.map +0 -1
- package/dist/pages/AppBuilder.d.ts +0 -2
- package/dist/pages/AppBuilder.d.ts.map +0 -1
- package/dist/pages/ChartShowcase.d.ts +0 -2
- package/dist/pages/ChartShowcase.d.ts.map +0 -1
- package/dist/pages/ComponentShowcase.d.ts +0 -2
- package/dist/pages/ComponentShowcase.d.ts.map +0 -1
- package/dist/pages/DataTableShowcase.d.ts +0 -2
- package/dist/pages/DataTableShowcase.d.ts.map +0 -1
- package/dist/pages/Drafts.d.ts +0 -2
- package/dist/pages/Drafts.d.ts.map +0 -1
- package/dist/pages/GanttShowcase.d.ts +0 -2
- package/dist/pages/GanttShowcase.d.ts.map +0 -1
- package/dist/pages/Inbox.d.ts +0 -2
- package/dist/pages/Inbox.d.ts.map +0 -1
- package/dist/pages/Junk.d.ts +0 -2
- package/dist/pages/Junk.d.ts.map +0 -1
- package/dist/pages/Sent.d.ts +0 -2
- package/dist/pages/Sent.d.ts.map +0 -1
- package/dist/pages/Settings.d.ts +0 -2
- package/dist/pages/Settings.d.ts.map +0 -1
- package/dist/pages/Trash.d.ts +0 -2
- package/dist/pages/Trash.d.ts.map +0 -1
- package/dist/pages/gantt-data.d.ts +0 -16
- package/dist/pages/gantt-data.d.ts.map +0 -1
- package/dist/stories/mockData.d.ts +0 -157
- package/dist/stories/mockData.d.ts.map +0 -1
- package/dist/types/data-grid.d.ts +0 -179
- package/dist/types/data-grid.d.ts.map +0 -1
- package/dist/utils/chart-colors.d.ts +0 -62
- package/dist/utils/chart-colors.d.ts.map +0 -1
- package/dist/utils/chart-highlight.d.ts +0 -34
- package/dist/utils/chart-highlight.d.ts.map +0 -1
- package/dist/utils/chart-utils.d.ts +0 -2
- package/dist/utils/chart-utils.d.ts.map +0 -1
- package/dist/utils/focus-ring.d.ts +0 -2
- package/dist/utils/focus-ring.d.ts.map +0 -1
- package/dist/utils/get-y-axis-domain.d.ts +0 -2
- package/dist/utils/get-y-axis-domain.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.d.ts.map +0 -1
- package/docs/components/nqui-segmented-control.md +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nqlib/nqui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A React component library with enhanced UI components and developer tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/nqui.cjs.js",
|
|
@@ -12,6 +12,36 @@
|
|
|
12
12
|
"import": "./dist/nqui.es.js",
|
|
13
13
|
"require": "./dist/nqui.cjs.js"
|
|
14
14
|
},
|
|
15
|
+
"./carousel": {
|
|
16
|
+
"types": "./dist/entries/carousel.d.ts",
|
|
17
|
+
"import": "./dist/carousel.es.js",
|
|
18
|
+
"require": "./dist/carousel.cjs.js"
|
|
19
|
+
},
|
|
20
|
+
"./command": {
|
|
21
|
+
"types": "./dist/entries/command.d.ts",
|
|
22
|
+
"import": "./dist/command.es.js",
|
|
23
|
+
"require": "./dist/command.cjs.js"
|
|
24
|
+
},
|
|
25
|
+
"./sortable": {
|
|
26
|
+
"types": "./dist/entries/sortable.d.ts",
|
|
27
|
+
"import": "./dist/sortable.es.js",
|
|
28
|
+
"require": "./dist/sortable.cjs.js"
|
|
29
|
+
},
|
|
30
|
+
"./calendar": {
|
|
31
|
+
"types": "./dist/entries/calendar.d.ts",
|
|
32
|
+
"import": "./dist/calendar.es.js",
|
|
33
|
+
"require": "./dist/calendar.cjs.js"
|
|
34
|
+
},
|
|
35
|
+
"./sonner": {
|
|
36
|
+
"types": "./dist/entries/sonner.d.ts",
|
|
37
|
+
"import": "./dist/sonner.es.js",
|
|
38
|
+
"require": "./dist/sonner.cjs.js"
|
|
39
|
+
},
|
|
40
|
+
"./drawer": {
|
|
41
|
+
"types": "./dist/entries/drawer.d.ts",
|
|
42
|
+
"import": "./dist/drawer.es.js",
|
|
43
|
+
"require": "./dist/drawer.cjs.js"
|
|
44
|
+
},
|
|
15
45
|
"./styles": {
|
|
16
46
|
"import": "./dist/styles.css",
|
|
17
47
|
"require": "./dist/styles.css",
|
|
@@ -51,6 +81,7 @@
|
|
|
51
81
|
"author": "",
|
|
52
82
|
"license": "MIT",
|
|
53
83
|
"scripts": {
|
|
84
|
+
"postinstall": "node scripts/post-install.js",
|
|
54
85
|
"dev": "vite",
|
|
55
86
|
"build": "npm run build:lib",
|
|
56
87
|
"build:lib": "vite build --mode library && npm run build:types && npm run build:styles && npm run copy:css",
|
|
@@ -75,12 +106,14 @@
|
|
|
75
106
|
"test-storybook:coverage": "test-storybook --coverage"
|
|
76
107
|
},
|
|
77
108
|
"bin": {
|
|
78
|
-
"nqui": "./scripts/
|
|
109
|
+
"nqui": "./scripts/cli.js",
|
|
79
110
|
"nqui-init-css": "./scripts/init-css.js",
|
|
80
|
-
"nqui-init-
|
|
111
|
+
"nqui-init-cursor": "./scripts/init-cursor.js",
|
|
112
|
+
"nqui-install-peers": "./scripts/install-peers.js",
|
|
113
|
+
"nqui-init-debug": "./scripts/init-debug-css.js",
|
|
114
|
+
"nqui-setup": "./scripts/post-install.js"
|
|
81
115
|
},
|
|
82
116
|
"dependencies": {
|
|
83
|
-
"@base-ui/react": "^1.0.0",
|
|
84
117
|
"@codesandbox/sandpack-react": "^2.20.0",
|
|
85
118
|
"@dnd-kit/core": "^6.3.1",
|
|
86
119
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
@@ -89,7 +122,6 @@
|
|
|
89
122
|
"@fontsource-variable/inter": "^5.2.8",
|
|
90
123
|
"@hugeicons/core-free-icons": "^3.1.1",
|
|
91
124
|
"@hugeicons/react": "^1.1.4",
|
|
92
|
-
"@icons-pack/react-simple-icons": "^13.8.0",
|
|
93
125
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
94
126
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
95
127
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
@@ -106,36 +138,28 @@
|
|
|
106
138
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
107
139
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
108
140
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
109
|
-
"@remixicon/react": "^4.8.0",
|
|
110
141
|
"@shikijs/transformers": "^3.21.0",
|
|
111
142
|
"@tailwindcss/vite": "^4.1.17",
|
|
112
143
|
"@tanstack/react-table": "^8.21.3",
|
|
113
|
-
"@tanstack/react-virtual": "^3.13.18",
|
|
114
144
|
"@uidotdev/usehooks": "^2.4.1",
|
|
115
145
|
"class-variance-authority": "^0.7.1",
|
|
116
146
|
"clsx": "^2.1.1",
|
|
117
147
|
"cmdk": "^1.1.1",
|
|
118
148
|
"date-fns": "^4.1.0",
|
|
119
149
|
"embla-carousel-react": "^8.6.0",
|
|
120
|
-
"html2canvas-pro": "^1.6.3",
|
|
121
150
|
"input-otp": "^1.4.2",
|
|
122
|
-
"jotai": "^2.17.0",
|
|
123
151
|
"lodash.throttle": "^4.1.1",
|
|
124
|
-
"lucide-react": "^0.562.0",
|
|
125
152
|
"minimist": "^1.2.8",
|
|
126
|
-
"motion": "^12.24.10",
|
|
127
153
|
"next-themes": "^0.4.6",
|
|
128
154
|
"package": "^1.0.1",
|
|
129
155
|
"postcss": "^8.4.0",
|
|
130
156
|
"postcss-discard-comments": "^7.0.0",
|
|
131
157
|
"postcss-import": "^16.0.0",
|
|
132
158
|
"radix-ui": "^1.4.3",
|
|
133
|
-
"react": "^
|
|
159
|
+
"react": "^19.0.0",
|
|
134
160
|
"react-day-picker": "^9.13.0",
|
|
135
|
-
"react-dom": "^
|
|
136
|
-
"react-resizable-panels": "^4.2.1",
|
|
161
|
+
"react-dom": "^19.0.0",
|
|
137
162
|
"react-router-dom": "^7.11.0",
|
|
138
|
-
"recharts": "^2.15.4",
|
|
139
163
|
"shiki": "^3.21.0",
|
|
140
164
|
"sonner": "^2.0.7",
|
|
141
165
|
"tailwind-merge": "^3.4.0",
|
|
@@ -144,7 +168,68 @@
|
|
|
144
168
|
"tw-animate-css": "^1.4.0",
|
|
145
169
|
"vaul": "^1.1.2"
|
|
146
170
|
},
|
|
171
|
+
"peerDependencies": {
|
|
172
|
+
"@base-ui/react": "^1.0.0",
|
|
173
|
+
"@hugeicons/core-free-icons": "^3.0.0",
|
|
174
|
+
"@hugeicons/react": "^1.0.0",
|
|
175
|
+
"@dnd-kit/core": "^6.0.0",
|
|
176
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
177
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
178
|
+
"@dnd-kit/utilities": "^3.0.0",
|
|
179
|
+
"@tanstack/react-table": "^8.0.0",
|
|
180
|
+
"cmdk": "^1.0.0",
|
|
181
|
+
"date-fns": "^4.0.0",
|
|
182
|
+
"embla-carousel-react": "^8.0.0",
|
|
183
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
184
|
+
"react-day-picker": "^9.0.0",
|
|
185
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
186
|
+
"react-resizable-panels": "^4.0.0",
|
|
187
|
+
"sonner": "^2.0.0",
|
|
188
|
+
"vaul": "^1.0.0"
|
|
189
|
+
},
|
|
190
|
+
"peerDependenciesMeta": {
|
|
191
|
+
"cmdk": {
|
|
192
|
+
"optional": true
|
|
193
|
+
},
|
|
194
|
+
"@dnd-kit/core": {
|
|
195
|
+
"optional": true
|
|
196
|
+
},
|
|
197
|
+
"@dnd-kit/modifiers": {
|
|
198
|
+
"optional": true
|
|
199
|
+
},
|
|
200
|
+
"@dnd-kit/sortable": {
|
|
201
|
+
"optional": true
|
|
202
|
+
},
|
|
203
|
+
"@dnd-kit/utilities": {
|
|
204
|
+
"optional": true
|
|
205
|
+
},
|
|
206
|
+
"embla-carousel-react": {
|
|
207
|
+
"optional": true
|
|
208
|
+
},
|
|
209
|
+
"@tanstack/react-table": {
|
|
210
|
+
"optional": true
|
|
211
|
+
},
|
|
212
|
+
"react-day-picker": {
|
|
213
|
+
"optional": true
|
|
214
|
+
},
|
|
215
|
+
"date-fns": {
|
|
216
|
+
"optional": true
|
|
217
|
+
},
|
|
218
|
+
"sonner": {
|
|
219
|
+
"optional": true
|
|
220
|
+
},
|
|
221
|
+
"vaul": {
|
|
222
|
+
"optional": true
|
|
223
|
+
},
|
|
224
|
+
"react-resizable-panels": {
|
|
225
|
+
"optional": true
|
|
226
|
+
},
|
|
227
|
+
"@base-ui/react": {
|
|
228
|
+
"optional": true
|
|
229
|
+
}
|
|
230
|
+
},
|
|
147
231
|
"devDependencies": {
|
|
232
|
+
"@base-ui/react": "^1.0.0",
|
|
148
233
|
"@eslint/js": "^9.39.1",
|
|
149
234
|
"@storybook/addon-docs": "^10.1.11",
|
|
150
235
|
"@storybook/addon-links": "^10.1.11",
|
|
@@ -155,14 +240,15 @@
|
|
|
155
240
|
"@storybook/testing-library": "^0.2.2",
|
|
156
241
|
"@types/lodash.throttle": "^4.1.9",
|
|
157
242
|
"@types/node": "^24.10.1",
|
|
158
|
-
"@types/react": "^
|
|
159
|
-
"@types/react-dom": "^
|
|
243
|
+
"@types/react": "^19.0.0",
|
|
244
|
+
"@types/react-dom": "^19.0.0",
|
|
160
245
|
"@vitejs/plugin-react": "^5.1.1",
|
|
161
246
|
"eslint": "^9.39.1",
|
|
162
247
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
163
248
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
164
249
|
"eslint-plugin-storybook": "10.1.11",
|
|
165
250
|
"globals": "^16.5.0",
|
|
251
|
+
"react-resizable-panels": "^4.2.1",
|
|
166
252
|
"shadcn": "^3.6.2",
|
|
167
253
|
"storybook": "^10.1.11",
|
|
168
254
|
"typescript": "~5.9.3",
|
package/scripts/cli.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* nqui CLI dispatcher. Routes subcommands to the correct script.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* npx @nqlib/nqui init-css [output.css]
|
|
8
|
+
* npx @nqlib/nqui init-cursor
|
|
9
|
+
* npx @nqlib/nqui install-peers
|
|
10
|
+
* npx @nqlib/nqui init-debug
|
|
11
|
+
* npx @nqlib/nqui setup
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { spawnSync } from 'child_process';
|
|
15
|
+
import { dirname, resolve } from 'path';
|
|
16
|
+
import { fileURLToPath } from 'url';
|
|
17
|
+
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const subcommand = process.argv[2];
|
|
20
|
+
|
|
21
|
+
const routes = {
|
|
22
|
+
'init-cursor': './init-cursor.js',
|
|
23
|
+
'install-peers': './install-peers.js',
|
|
24
|
+
'init-debug': './init-debug-css.js',
|
|
25
|
+
'init-debug-css': './init-debug-css.js',
|
|
26
|
+
setup: './post-install.js',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
if (routes[subcommand]) {
|
|
30
|
+
const script = resolve(__dirname, routes[subcommand]);
|
|
31
|
+
const result = spawnSync(process.execPath, [script, ...process.argv.slice(3)], {
|
|
32
|
+
stdio: 'inherit',
|
|
33
|
+
cwd: process.cwd(),
|
|
34
|
+
});
|
|
35
|
+
process.exit(result.status ?? 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Default: init-css (pass all args through)
|
|
39
|
+
const initCss = resolve(__dirname, 'init-css.js');
|
|
40
|
+
const result = spawnSync(process.execPath, [initCss, ...process.argv.slice(2)], {
|
|
41
|
+
stdio: 'inherit',
|
|
42
|
+
cwd: process.cwd(),
|
|
43
|
+
});
|
|
44
|
+
process.exit(result.status ?? 1);
|
package/scripts/help.js
CHANGED
package/scripts/init-css.js
CHANGED
|
@@ -19,6 +19,21 @@ import { generateSetupContent } from './setup-helper.js';
|
|
|
19
19
|
import { copyNextJsExamples } from './examples.js';
|
|
20
20
|
import { emit } from './pipeline/emit.js';
|
|
21
21
|
|
|
22
|
+
// Guard: if first arg is a subcommand, user has old package (main bin was init-css). Redirect.
|
|
23
|
+
const firstArg = process.argv[2];
|
|
24
|
+
const subcommands = ['init-cursor', 'install-peers', 'init-debug', 'init-debug-css', 'setup'];
|
|
25
|
+
if (subcommands.includes(firstArg)) {
|
|
26
|
+
console.error(`
|
|
27
|
+
❌ Outdated @nqlib/nqui — "npx @nqlib/nqui ${firstArg}" routed to init-css.
|
|
28
|
+
|
|
29
|
+
Fix: npm install @nqlib/nqui@latest
|
|
30
|
+
Then: npx @nqlib/nqui ${firstArg}
|
|
31
|
+
|
|
32
|
+
Or run the binary directly: npm exec nqui-init-cursor
|
|
33
|
+
`);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
22
37
|
// Filter out command names from argv
|
|
23
38
|
const commandNames = ['init-css', 'nqui', 'nqui-init-css'];
|
|
24
39
|
const filteredArgs = process.argv.slice(2).filter(arg => !commandNames.includes(arg));
|
|
@@ -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`);
|
package/scripts/publish-npmjs.js
CHANGED
|
@@ -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
|
|
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
|
|
123
|
+
console.log('🔄 Restored package.json');
|
|
110
124
|
|
|
111
125
|
// Restore .npmrc if it existed
|
|
112
126
|
if (npmrcExists && originalNpmrc !== null) {
|