@spartan-ng/cli 0.0.1-alpha.508 → 0.0.1-alpha.509

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 (178) hide show
  1. package/package.json +3 -2
  2. package/src/generators/base/generator.js +1 -1
  3. package/src/generators/base/generator.js.map +1 -1
  4. package/src/generators/base/lib/initialize-angular-library.d.ts +1 -1
  5. package/src/generators/base/lib/initialize-angular-library.js +2 -2
  6. package/src/generators/base/lib/initialize-angular-library.js.map +1 -1
  7. package/src/generators/base/schema.d.ts +1 -0
  8. package/src/generators/migrate-helm-libraries/generator.js +10 -4
  9. package/src/generators/migrate-helm-libraries/generator.js.map +1 -1
  10. package/src/generators/migrate-helm-libraries/schema.d.ts +1 -0
  11. package/src/generators/ui/generator.d.ts +1 -0
  12. package/src/generators/ui/generator.js +2 -0
  13. package/src/generators/ui/generator.js.map +1 -1
  14. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.ts.template +1 -1
  15. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.ts.template +2 -2
  16. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.ts.template +1 -1
  17. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.ts.template +1 -1
  18. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.ts.template +1 -1
  19. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-action-button.ts.template +1 -1
  20. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.ts.template +1 -1
  21. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.ts.template +1 -1
  22. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.ts.template +1 -1
  23. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.ts.template +1 -1
  24. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.ts.template +1 -1
  25. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.ts.template +1 -1
  26. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.ts.template +1 -1
  27. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.ts.template +1 -1
  28. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-icon.ts.template +1 -1
  29. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.ts.template +1 -1
  30. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.ts.template +1 -1
  31. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.ts.template +1 -1
  32. package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.ts.template +1 -1
  33. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.ts.template +1 -1
  34. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.ts.template +1 -1
  35. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.ts.template +1 -1
  36. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-ellipsis.ts.template +2 -2
  37. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-item.ts.template +1 -1
  38. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-link.ts.template +1 -1
  39. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-list.ts.template +1 -1
  40. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-page.ts.template +1 -1
  41. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-separator.ts.template +1 -1
  42. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb.ts.template +1 -1
  43. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.ts.template +1 -1
  44. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.ts.template +3 -3
  45. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-range.ts.template +3 -3
  46. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.ts.template +3 -3
  47. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-action.ts.template +1 -1
  48. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.ts.template +1 -1
  49. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.ts.template +1 -1
  50. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.ts.template +1 -1
  51. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.ts.template +1 -1
  52. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.ts.template +1 -1
  53. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.ts.template +1 -1
  54. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.ts.template +1 -1
  55. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.ts.template +1 -1
  56. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.ts.template +3 -3
  57. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.ts.template +3 -3
  58. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.ts.template +1 -1
  59. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.ts.template +1 -1
  60. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.ts.template +2 -2
  61. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.ts.template +3 -3
  62. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.ts.template +1 -1
  63. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.ts.template +1 -1
  64. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group-label.ts.template +1 -1
  65. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.ts.template +1 -1
  66. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-icon.ts.template +2 -2
  67. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.ts.template +1 -1
  68. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.ts.template +1 -1
  69. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search-input.ts.template +1 -1
  70. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search.ts.template +2 -2
  71. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-separator.ts.template +1 -1
  72. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.ts.template +1 -1
  73. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.ts.template +1 -1
  74. package/src/generators/ui/libs/ui-date-picker-helm/files/index.ts.template +1 -0
  75. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.token.ts.template +1 -1
  76. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template +21 -11
  77. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.ts.template +17 -7
  78. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template +21 -11
  79. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.ts.template +1 -1
  80. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.ts.template +2 -2
  81. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.ts.template +1 -1
  82. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.ts.template +1 -1
  83. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.ts.template +1 -1
  84. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.ts.template +1 -1
  85. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.ts.template +1 -1
  86. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-error.ts.template +1 -1
  87. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.ts.template +1 -1
  88. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-hint.ts.template +1 -1
  89. package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.ts.template +1 -1
  90. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.ts.template +1 -1
  91. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.ts.template +1 -1
  92. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-group.ts.template +1 -1
  93. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-separator.ts.template +2 -2
  94. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-slot.ts.template +1 -1
  95. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp.ts.template +1 -1
  96. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.ts.template +1 -1
  97. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.ts.template +1 -1
  98. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.ts.template +1 -1
  99. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.ts.template +2 -2
  100. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.ts.template +1 -1
  101. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.ts.template +2 -2
  102. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio-indicator.ts.template +2 -2
  103. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.ts.template +1 -1
  104. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.ts.template +2 -2
  105. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.ts.template +1 -1
  106. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.ts.template +1 -1
  107. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.ts.template +1 -1
  108. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.ts.template +1 -1
  109. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.ts.template +1 -1
  110. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.ts.template +1 -1
  111. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination-query-params.ts.template +1 -1
  112. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination.ts.template +1 -1
  113. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.ts.template +1 -1
  114. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.ts.template +2 -2
  115. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.ts.template +1 -1
  116. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.ts.template +2 -2
  117. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.ts.template +3 -3
  118. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.ts.template +3 -3
  119. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.ts.template +1 -1
  120. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.ts.template +1 -1
  121. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.ts.template +1 -1
  122. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.ts.template +1 -1
  123. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.ts.template +1 -1
  124. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.ts.template +1 -1
  125. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.ts.template +1 -1
  126. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.ts.template +1 -1
  127. package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.ts.template +1 -1
  128. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.ts.template +1 -1
  129. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.ts.template +1 -1
  130. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.ts.template +1 -1
  131. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.ts.template +2 -2
  132. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.ts.template +2 -2
  133. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.ts.template +2 -2
  134. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.ts.template +2 -2
  135. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.ts.template +1 -1
  136. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.ts.template +1 -1
  137. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.ts.template +1 -1
  138. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.ts.template +1 -1
  139. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.ts.template +2 -2
  140. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.ts.template +1 -1
  141. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.ts.template +1 -1
  142. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.ts.template +1 -1
  143. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.ts.template +1 -1
  144. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.ts.template +1 -1
  145. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.ts.template +1 -1
  146. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.ts.template +1 -1
  147. package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.ts.template +1 -1
  148. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.ts.template +1 -1
  149. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.ts.template +1 -1
  150. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.ts.template +1 -1
  151. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.ts.template +1 -1
  152. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.ts.template +1 -1
  153. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.ts.template +1 -1
  154. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.ts.template +3 -3
  155. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.ts.template +1 -1
  156. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.ts.template +1 -1
  157. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-group.ts.template +1 -1
  158. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-item.ts.template +1 -1
  159. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.ts.template +1 -1
  160. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.ts.template +1 -1
  161. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.ts.template +1 -1
  162. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.ts.template +1 -1
  163. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.ts.template +1 -1
  164. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.ts.template +1 -1
  165. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.ts.template +1 -1
  166. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.ts.template +1 -1
  167. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.ts.template +1 -1
  168. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.ts.template +1 -1
  169. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.ts.template +1 -1
  170. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.ts.template +1 -1
  171. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.ts.template +1 -1
  172. package/src/generators/ui/primitive-deps.js +2 -0
  173. package/src/generators/ui/primitive-deps.js.map +1 -1
  174. package/src/generators/ui/primitives.d.ts +1 -1
  175. package/src/generators/ui/supported-ui-libraries.json +26 -26
  176. package/src/utils/config.d.ts +18 -6
  177. package/src/utils/config.js +49 -3
  178. package/src/utils/config.js.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmBlockquote = 'mt-6 border-border border-l-2 pl-6 italic';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmCode = 'relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmH1 = 'scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmH2 =
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmH3 = 'scroll-m-20 text-2xl font-semibold tracking-tight';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmH4 = 'scroll-m-20 text-xl font-semibold tracking-tight';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmLarge = 'text-lg font-semibold';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmLead = 'text-xl text-muted-foreground';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmMuted = 'text-sm text-muted-foreground';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmP = 'leading-7 [&:not(:first-child)]:mt-6';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmSmall = 'text-sm font-medium leading-none';
@@ -1,5 +1,5 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '@spartan-ng/helm/utils';
2
+ import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
5
  export const hlmUl = 'my-6 ml-6 list-disc [&>li]:mt-2';
@@ -23,6 +23,7 @@ exports.primitiveDependencies = {
23
23
  'hover-card': ['utils'],
24
24
  icon: ['utils'],
25
25
  input: ['utils', 'form-field'],
26
+ 'input-otp': ['utils', 'icon'],
26
27
  label: ['utils'],
27
28
  menu: ['utils', 'icon'],
28
29
  menubar: ['utils'],
@@ -35,6 +36,7 @@ exports.primitiveDependencies = {
35
36
  separator: ['utils'],
36
37
  sheet: ['utils'],
37
38
  skeleton: ['utils'],
39
+ slider: ['utils'],
38
40
  sonner: ['utils', 'icon'],
39
41
  spinner: ['utils'],
40
42
  switch: ['utils'],
@@ -1 +1 @@
1
- {"version":3,"file":"primitive-deps.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/primitive-deps.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAmC;IACpE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;IACnC,cAAc,EAAE,CAAC,OAAO,CAAC;IACzB,MAAM,EAAE,CAAC,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,CAAC,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE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AC,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,MAAM,EAAE,CAAC,OAAO,CAAC;IACjB,cAAc,EAAE,CAAC,OAAO,CAAC;IACzB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE,EAAE;CACT,CAAC;AAEK,MAAM,sBAAsB,GAAG,CAAC,UAAuB,EAAe,EAAE;IAC9E,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAa,CAAC;IAEjD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,6BAAqB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACpD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/B,2FAA2F;gBAC3F,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;AACxC,CAAC,CAAC;AAdW,QAAA,sBAAsB,0BAcjC"}
@@ -1 +1 @@
1
- export type Primitive = 'accordion' | 'alert' | 'alert-dialog' | 'aspect-ratio' | 'avatar' | 'badge' | 'breadcrumb' | 'button' | 'calendar' | 'card' | 'carousel' | 'checkbox' | 'collapsible' | 'command' | 'context-menu' | 'date-picker' | 'dialog' | 'form-field' | 'hover-card' | 'icon' | 'input' | 'label' | 'menu' | 'menubar' | 'pagination' | 'popover' | 'progress' | 'radio-group' | 'scroll-area' | 'select' | 'separator' | 'sheet' | 'skeleton' | 'sonner' | 'spinner' | 'switch' | 'table' | 'tabs' | 'toggle' | 'toggle-group' | 'tooltip' | 'utils';
1
+ export type Primitive = 'accordion' | 'alert' | 'alert-dialog' | 'aspect-ratio' | 'avatar' | 'badge' | 'breadcrumb' | 'button' | 'calendar' | 'card' | 'carousel' | 'checkbox' | 'collapsible' | 'command' | 'context-menu' | 'date-picker' | 'dialog' | 'form-field' | 'hover-card' | 'icon' | 'input' | 'input-otp' | 'label' | 'menu' | 'menubar' | 'pagination' | 'popover' | 'progress' | 'radio-group' | 'scroll-area' | 'select' | 'separator' | 'sheet' | 'skeleton' | 'slider' | 'sonner' | 'spinner' | 'switch' | 'table' | 'tabs' | 'toggle' | 'toggle-group' | 'tooltip' | 'utils';
@@ -3,7 +3,7 @@
3
3
  "internalName": "ui-accordion-helm",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=19.0.0",
6
- "@spartan-ng/brain": "0.0.1-alpha.508",
6
+ "@spartan-ng/brain": "0.0.1-alpha.509",
7
7
  "clsx": "^2.1.1",
8
8
  "@ng-icons/core": ">=29.0.0",
9
9
  "@ng-icons/lucide": ">=29.0.0"
@@ -21,7 +21,7 @@
21
21
  "internalName": "ui-alert-dialog-helm",
22
22
  "peerDependencies": {
23
23
  "@angular/core": ">=19.0.0",
24
- "@spartan-ng/brain": "0.0.1-alpha.508",
24
+ "@spartan-ng/brain": "0.0.1-alpha.509",
25
25
  "clsx": "^2.1.1"
26
26
  }
27
27
  },
@@ -37,7 +37,7 @@
37
37
  "internalName": "ui-avatar-helm",
38
38
  "peerDependencies": {
39
39
  "@angular/core": ">=19.0.0",
40
- "@spartan-ng/brain": "0.0.1-alpha.508",
40
+ "@spartan-ng/brain": "0.0.1-alpha.509",
41
41
  "clsx": "^2.1.1"
42
42
  }
43
43
  },
@@ -63,7 +63,7 @@
63
63
  "internalName": "ui-button-helm",
64
64
  "peerDependencies": {
65
65
  "@angular/core": ">=19.0.0",
66
- "@spartan-ng/brain": "0.0.1-alpha.508",
66
+ "@spartan-ng/brain": "0.0.1-alpha.509",
67
67
  "class-variance-authority": "^0.7.0",
68
68
  "clsx": "^2.1.1"
69
69
  }
@@ -75,7 +75,7 @@
75
75
  "@angular/cdk": ">=19.0.0",
76
76
  "@ng-icons/core": ">=29.0.0",
77
77
  "@ng-icons/lucide": ">=29.0.0",
78
- "@spartan-ng/brain": "0.0.1-alpha.508",
78
+ "@spartan-ng/brain": "0.0.1-alpha.509",
79
79
  "clsx": "^2.1.1"
80
80
  }
81
81
  },
@@ -105,7 +105,7 @@
105
105
  "@angular/forms": ">=19.0.0",
106
106
  "@ng-icons/core": ">=29.0.0",
107
107
  "@ng-icons/lucide": ">=29.0.0",
108
- "@spartan-ng/brain": "0.0.1-alpha.508",
108
+ "@spartan-ng/brain": "0.0.1-alpha.509",
109
109
  "clsx": "^2.1.1"
110
110
  }
111
111
  },
@@ -113,7 +113,7 @@
113
113
  "internalName": "ui-command-helm",
114
114
  "peerDependencies": {
115
115
  "@angular/core": ">=19.0.0",
116
- "@spartan-ng/brain": "0.0.1-alpha.508",
116
+ "@spartan-ng/brain": "0.0.1-alpha.509",
117
117
  "clsx": "^2.1.1",
118
118
  "@angular/cdk": ">=19.0.0"
119
119
  }
@@ -126,7 +126,7 @@
126
126
  "@angular/forms": ">=19.0.0",
127
127
  "@ng-icons/core": ">=29.0.0",
128
128
  "@ng-icons/lucide": ">=29.0.0",
129
- "@spartan-ng/brain": "0.0.1-alpha.508",
129
+ "@spartan-ng/brain": "0.0.1-alpha.509",
130
130
  "clsx": "^2.1.1"
131
131
  }
132
132
  },
@@ -138,7 +138,7 @@
138
138
  "@angular/common": ">=19.0.0",
139
139
  "@ng-icons/core": ">=29.0.0",
140
140
  "@ng-icons/lucide": ">=29.0.0",
141
- "@spartan-ng/brain": "0.0.1-alpha.508",
141
+ "@spartan-ng/brain": "0.0.1-alpha.509",
142
142
  "@angular/cdk": ">=19.0.0"
143
143
  }
144
144
  },
@@ -147,7 +147,7 @@
147
147
  "peerDependencies": {
148
148
  "@angular/core": ">=19.0.0",
149
149
  "@angular/forms": ">=19.0.0",
150
- "@spartan-ng/brain": "0.0.1-alpha.508",
150
+ "@spartan-ng/brain": "0.0.1-alpha.509",
151
151
  "clsx": "^2.1.1"
152
152
  }
153
153
  },
@@ -155,7 +155,7 @@
155
155
  "internalName": "ui-hover-card-helm",
156
156
  "peerDependencies": {
157
157
  "@angular/core": ">=19.0.0",
158
- "@spartan-ng/brain": "0.0.1-alpha.508",
158
+ "@spartan-ng/brain": "0.0.1-alpha.509",
159
159
  "clsx": "^2.1.1"
160
160
  }
161
161
  },
@@ -174,7 +174,7 @@
174
174
  "class-variance-authority": "^0.7.0",
175
175
  "clsx": "^2.1.1",
176
176
  "@angular/forms": ">=19.0.0",
177
- "@spartan-ng/brain": "0.0.1-alpha.508"
177
+ "@spartan-ng/brain": "0.0.1-alpha.509"
178
178
  }
179
179
  },
180
180
  "input-otp": {
@@ -185,14 +185,14 @@
185
185
  "@ng-icons/core": ">=29.0.0",
186
186
  "@ng-icons/lucide": ">=29.0.0",
187
187
  "@angular/cdk": ">=19.0.0",
188
- "@spartan-ng/brain": "0.0.1-alpha.508"
188
+ "@spartan-ng/brain": "0.0.1-alpha.509"
189
189
  }
190
190
  },
191
191
  "label": {
192
192
  "internalName": "ui-label-helm",
193
193
  "peerDependencies": {
194
194
  "@angular/core": ">=19.0.0",
195
- "@spartan-ng/brain": "0.0.1-alpha.508",
195
+ "@spartan-ng/brain": "0.0.1-alpha.509",
196
196
  "clsx": "^2.1.1"
197
197
  }
198
198
  },
@@ -200,7 +200,7 @@
200
200
  "internalName": "ui-menu-helm",
201
201
  "peerDependencies": {
202
202
  "@angular/core": ">=19.0.0",
203
- "@spartan-ng/brain": "0.0.1-alpha.508",
203
+ "@spartan-ng/brain": "0.0.1-alpha.509",
204
204
  "clsx": "^2.1.1",
205
205
  "@ng-icons/core": ">=29.0.0",
206
206
  "@ng-icons/lucide": ">=29.0.0",
@@ -214,7 +214,7 @@
214
214
  "@angular/core": ">=19.0.0",
215
215
  "@angular/cdk": ">=19.0.0",
216
216
  "@angular/forms": ">=19.0.0",
217
- "@spartan-ng/brain": "0.0.1-alpha.508",
217
+ "@spartan-ng/brain": "0.0.1-alpha.509",
218
218
  "class-variance-authority": "^0.7.0",
219
219
  "clsx": "^2.1.1",
220
220
  "@ng-icons/core": ">=29.0.0",
@@ -227,14 +227,14 @@
227
227
  "peerDependencies": {
228
228
  "@angular/core": ">=19.0.0",
229
229
  "clsx": "^2.1.1",
230
- "@spartan-ng/brain": "0.0.1-alpha.508"
230
+ "@spartan-ng/brain": "0.0.1-alpha.509"
231
231
  }
232
232
  },
233
233
  "progress": {
234
234
  "internalName": "ui-progress-helm",
235
235
  "peerDependencies": {
236
236
  "@angular/core": ">=19.0.0",
237
- "@spartan-ng/brain": "0.0.1-alpha.508",
237
+ "@spartan-ng/brain": "0.0.1-alpha.509",
238
238
  "clsx": "^2.1.1"
239
239
  }
240
240
  },
@@ -242,7 +242,7 @@
242
242
  "internalName": "ui-radio-group-helm",
243
243
  "peerDependencies": {
244
244
  "@angular/core": ">=19.0.0",
245
- "@spartan-ng/brain": "0.0.1-alpha.508",
245
+ "@spartan-ng/brain": "0.0.1-alpha.509",
246
246
  "clsx": "^2.1.1",
247
247
  "@angular/common": ">=19.0.0"
248
248
  }
@@ -259,7 +259,7 @@
259
259
  "peerDependencies": {
260
260
  "@angular/core": ">=19.0.0",
261
261
  "@angular/cdk": ">=19.0.0",
262
- "@spartan-ng/brain": "0.0.1-alpha.508",
262
+ "@spartan-ng/brain": "0.0.1-alpha.509",
263
263
  "clsx": "^2.1.1",
264
264
  "@ng-icons/core": ">=29.0.0",
265
265
  "@ng-icons/lucide": ">=29.0.0",
@@ -270,7 +270,7 @@
270
270
  "internalName": "ui-separator-helm",
271
271
  "peerDependencies": {
272
272
  "@angular/core": ">=19.0.0",
273
- "@spartan-ng/brain": "0.0.1-alpha.508",
273
+ "@spartan-ng/brain": "0.0.1-alpha.509",
274
274
  "clsx": "^2.1.1"
275
275
  }
276
276
  },
@@ -281,7 +281,7 @@
281
281
  "clsx": "^2.1.1",
282
282
  "@ng-icons/core": ">=29.0.0",
283
283
  "@ng-icons/lucide": ">=29.0.0",
284
- "@spartan-ng/brain": "0.0.1-alpha.508",
284
+ "@spartan-ng/brain": "0.0.1-alpha.509",
285
285
  "class-variance-authority": "^0.7.0"
286
286
  }
287
287
  },
@@ -296,7 +296,7 @@
296
296
  "internalName": "ui-slider-helm",
297
297
  "peerDependencies": {
298
298
  "@angular/core": ">=19.0.0",
299
- "@spartan-ng/brain": "0.0.1-alpha.508",
299
+ "@spartan-ng/brain": "0.0.1-alpha.509",
300
300
  "clsx": "^2.1.1"
301
301
  }
302
302
  },
@@ -322,7 +322,7 @@
322
322
  "clsx": "^2.1.1",
323
323
  "@angular/cdk": ">=19.0.0",
324
324
  "@angular/forms": ">=19.0.0",
325
- "@spartan-ng/brain": "0.0.1-alpha.508"
325
+ "@spartan-ng/brain": "0.0.1-alpha.509"
326
326
  }
327
327
  },
328
328
  "table": {
@@ -336,7 +336,7 @@
336
336
  "internalName": "ui-tabs-helm",
337
337
  "peerDependencies": {
338
338
  "@angular/core": ">=19.0.0",
339
- "@spartan-ng/brain": "0.0.1-alpha.508",
339
+ "@spartan-ng/brain": "0.0.1-alpha.509",
340
340
  "clsx": "^2.1.1",
341
341
  "class-variance-authority": "^0.7.0",
342
342
  "@angular/cdk": ">=19.0.0",
@@ -365,7 +365,7 @@
365
365
  "internalName": "ui-tooltip-helm",
366
366
  "peerDependencies": {
367
367
  "@angular/core": ">=19.0.0",
368
- "@spartan-ng/brain": "0.0.1-alpha.508"
368
+ "@spartan-ng/brain": "0.0.1-alpha.509"
369
369
  }
370
370
  },
371
371
  "typography": {
@@ -1,8 +1,20 @@
1
1
  import { type Tree } from '@nx/devkit';
2
- import { GenerateAs } from '../generators/base/lib/generate-as';
3
- export type Config = {
4
- componentsPath: string;
5
- buildable: boolean;
6
- generateAs: GenerateAs;
7
- };
2
+ import z from 'zod';
3
+ export declare const ConfigSchema: z.ZodObject<{
4
+ componentsPath: z.ZodString;
5
+ buildable: z.ZodBoolean;
6
+ generateAs: z.ZodEnum<["library", "entrypoint"]>;
7
+ importAlias: z.ZodEffects<z.ZodString, string, string>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ buildable?: boolean;
10
+ importAlias?: string;
11
+ generateAs?: "library" | "entrypoint";
12
+ componentsPath?: string;
13
+ }, {
14
+ buildable?: boolean;
15
+ importAlias?: string;
16
+ generateAs?: "library" | "entrypoint";
17
+ componentsPath?: string;
18
+ }>;
19
+ export type Config = z.infer<typeof ConfigSchema>;
8
20
  export declare function getOrCreateConfig(tree: Tree, defaults?: Partial<Config>): Promise<Config>;
@@ -1,15 +1,54 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigSchema = void 0;
3
4
  exports.getOrCreateConfig = getOrCreateConfig;
5
+ const tslib_1 = require("tslib");
4
6
  const devkit_1 = require("@nx/devkit");
5
7
  const enquirer_1 = require("enquirer");
8
+ const zod_1 = tslib_1.__importStar(require("zod"));
9
+ const generate_as_1 = require("../generators/base/lib/generate-as");
6
10
  const configPath = 'components.json';
11
+ exports.ConfigSchema = zod_1.default.object({
12
+ componentsPath: zod_1.default.string(),
13
+ buildable: zod_1.default.boolean(),
14
+ generateAs: zod_1.default.enum(generate_as_1.generateOptions),
15
+ importAlias: zod_1.default.string().refine((val) => !val.endsWith('/'), { message: 'importAlias should not end with a slash' }),
16
+ });
17
+ const getConfig = async (tree) => {
18
+ const raw = await (0, devkit_1.readJson)(tree, configPath);
19
+ try {
20
+ return exports.ConfigSchema.parse(raw);
21
+ }
22
+ catch (e) {
23
+ if (e instanceof zod_1.ZodError) {
24
+ const rows = e.issues.map((issue) => {
25
+ let expected;
26
+ if ('expected' in issue) {
27
+ expected = String(issue.expected);
28
+ }
29
+ else if ('options' in issue) {
30
+ expected = issue.options.join(' | ');
31
+ }
32
+ return {
33
+ path: issue.path.join('.') || 'root',
34
+ message: issue.message,
35
+ expected: expected ?? '-',
36
+ };
37
+ });
38
+ console.table(rows, ['path', 'expected', 'message']);
39
+ throw new Error('Config validation failed. Please fix the issues above.');
40
+ }
41
+ else {
42
+ throw e;
43
+ }
44
+ }
45
+ };
7
46
  async function getOrCreateConfig(tree, defaults) {
8
47
  if (tree.exists(configPath)) {
9
- return (0, devkit_1.readJson)(tree, configPath); // TODO: Parse with zod and handle errors
48
+ return getConfig(tree);
10
49
  }
11
50
  console.log('Configuration file not found, creating a new one...');
12
- const { componentsPath, buildable, generateAs } = (await (0, enquirer_1.prompt)([
51
+ const { componentsPath, buildable, generateAs, importAlias } = (await (0, enquirer_1.prompt)([
13
52
  {
14
53
  type: 'input',
15
54
  required: true,
@@ -33,8 +72,15 @@ async function getOrCreateConfig(tree, defaults) {
33
72
  initial: 0,
34
73
  skip: typeof defaults?.generateAs === 'string',
35
74
  },
75
+ {
76
+ type: 'input',
77
+ name: 'importAlias',
78
+ message: 'What import alias should be used for the components?',
79
+ initial: defaults?.importAlias ?? '@spartan-ng/helm',
80
+ skip: !!defaults?.importAlias,
81
+ },
36
82
  ]));
37
- const config = { componentsPath, buildable, generateAs };
83
+ const config = { componentsPath, buildable, generateAs, importAlias };
38
84
  tree.write(configPath, JSON.stringify(config, null, 2));
39
85
  return config;
40
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../libs/cli/src/utils/config.ts"],"names":[],"mappings":";;AAYA,8CAsCC;AAlDD,uCAAiD;AACjD,uCAAkC;AAGlC,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAQ9B,KAAK,UAAU,iBAAiB,CAAC,IAAU,EAAE,QAA0B;IAC7E,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAA,iBAAQ,EAAC,IAAI,EAAE,UAAU,CAAoB,CAAC,CAAC,yCAAyC;IAChG,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IAEnE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,IAAA,iBAAM,EAAC;QAC/D;YACC,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAA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