@egose/shadcn-theme-ng 0.0.27 → 0.1.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 (316) hide show
  1. package/README.md +130 -13
  2. package/accordion/README.md +3 -0
  3. package/accordion/fesm2022/accordion.mjs +148 -0
  4. package/accordion/package.json +25 -0
  5. package/accordion/types/accordion.d.ts +49 -0
  6. package/alert/README.md +2 -63
  7. package/alert/fesm2022/alert.mjs +58 -53
  8. package/alert/package.json +25 -0
  9. package/alert-dialog/README.md +11 -0
  10. package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
  11. package/alert-dialog/package.json +25 -0
  12. package/alert-dialog/types/alert-dialog.d.ts +90 -0
  13. package/aspect-ratio/README.md +11 -0
  14. package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
  15. package/aspect-ratio/package.json +25 -0
  16. package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
  17. package/autocomplete/README.md +3 -0
  18. package/autocomplete/fesm2022/autocomplete.mjs +391 -0
  19. package/autocomplete/package.json +24 -0
  20. package/autocomplete/types/autocomplete.d.ts +96 -0
  21. package/avatar/README.md +11 -0
  22. package/avatar/fesm2022/avatar.mjs +178 -0
  23. package/avatar/package.json +25 -0
  24. package/avatar/types/avatar.d.ts +50 -0
  25. package/badge/README.md +2 -63
  26. package/badge/fesm2022/badge.mjs +69 -63
  27. package/badge/package.json +25 -0
  28. package/basic-alert/README.md +2 -63
  29. package/basic-alert/fesm2022/basic-alert.mjs +14 -22
  30. package/basic-alert/package.json +24 -0
  31. package/breadcrumb/README.md +11 -0
  32. package/breadcrumb/fesm2022/breadcrumb.mjs +218 -0
  33. package/breadcrumb/package.json +25 -0
  34. package/breadcrumb/types/breadcrumb.d.ts +57 -0
  35. package/button/README.md +2 -63
  36. package/button/fesm2022/button.mjs +201 -177
  37. package/button/package.json +25 -0
  38. package/button/{index.d.ts → types/button.d.ts} +31 -10
  39. package/button-group/README.md +11 -0
  40. package/button-group/fesm2022/button-group.mjs +102 -0
  41. package/button-group/package.json +25 -0
  42. package/button-group/types/button-group.d.ts +30 -0
  43. package/calendar/README.md +2 -63
  44. package/calendar/fesm2022/calendar.mjs +178 -570
  45. package/calendar/package.json +24 -0
  46. package/calendar/types/calendar.d.ts +94 -0
  47. package/card/README.md +11 -0
  48. package/card/fesm2022/card.mjs +169 -0
  49. package/card/package.json +25 -0
  50. package/card/types/card.d.ts +54 -0
  51. package/carousel/README.md +11 -0
  52. package/carousel/fesm2022/carousel.mjs +267 -0
  53. package/carousel/package.json +25 -0
  54. package/carousel/types/carousel.d.ts +84 -0
  55. package/checkbox/README.md +3 -0
  56. package/checkbox/fesm2022/checkbox.mjs +113 -0
  57. package/checkbox/package.json +24 -0
  58. package/checkbox/types/checkbox.d.ts +56 -0
  59. package/collapsible/README.md +11 -0
  60. package/collapsible/fesm2022/collapsible.mjs +77 -0
  61. package/collapsible/package.json +25 -0
  62. package/collapsible/types/collapsible.d.ts +27 -0
  63. package/combobox/README.md +11 -0
  64. package/combobox/fesm2022/combobox.mjs +547 -0
  65. package/combobox/package.json +25 -0
  66. package/combobox/types/combobox.d.ts +151 -0
  67. package/command/README.md +11 -0
  68. package/command/fesm2022/command.mjs +301 -0
  69. package/command/package.json +25 -0
  70. package/command/types/command.d.ts +89 -0
  71. package/confirmation-dialog/README.md +3 -0
  72. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +79 -0
  73. package/confirmation-dialog/package.json +24 -0
  74. package/confirmation-dialog/types/confirmation-dialog.d.ts +28 -0
  75. package/context-menu/README.md +11 -0
  76. package/context-menu/fesm2022/context-menu.mjs +89 -0
  77. package/context-menu/package.json +25 -0
  78. package/context-menu/types/context-menu.d.ts +34 -0
  79. package/date-picker/README.md +2 -63
  80. package/date-picker/fesm2022/date-picker.mjs +1104 -352
  81. package/date-picker/package.json +24 -0
  82. package/date-picker/types/date-picker.d.ts +555 -0
  83. package/dialog/README.md +3 -0
  84. package/dialog/fesm2022/dialog.mjs +281 -0
  85. package/dialog/package.json +24 -0
  86. package/dialog/types/dialog.d.ts +95 -0
  87. package/drawer/README.md +11 -0
  88. package/drawer/fesm2022/drawer.mjs +261 -0
  89. package/drawer/package.json +25 -0
  90. package/drawer/types/drawer.d.ts +76 -0
  91. package/dropdown-menu/README.md +11 -0
  92. package/dropdown-menu/fesm2022/dropdown-menu.mjs +554 -0
  93. package/dropdown-menu/package.json +25 -0
  94. package/dropdown-menu/types/dropdown-menu.d.ts +180 -0
  95. package/empty/README.md +11 -0
  96. package/empty/fesm2022/empty.mjs +151 -0
  97. package/empty/package.json +25 -0
  98. package/empty/types/empty.d.ts +54 -0
  99. package/field/README.md +11 -0
  100. package/field/fesm2022/field.mjs +351 -0
  101. package/field/package.json +25 -0
  102. package/field/types/field.d.ts +107 -0
  103. package/form-checkbox/README.md +3 -0
  104. package/form-checkbox/fesm2022/form-checkbox.mjs +94 -0
  105. package/form-checkbox/package.json +24 -0
  106. package/form-checkbox/types/form-checkbox.d.ts +33 -0
  107. package/form-date-picker/README.md +2 -63
  108. package/form-date-picker/fesm2022/form-date-picker.mjs +74 -120
  109. package/form-date-picker/package.json +24 -0
  110. package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +7 -1
  111. package/form-field/README.md +2 -63
  112. package/form-field/fesm2022/form-field.mjs +54 -28
  113. package/form-field/package.json +25 -0
  114. package/form-field/types/form-field.d.ts +46 -0
  115. package/form-field-simple/README.md +2 -63
  116. package/form-field-simple/fesm2022/form-field-simple.mjs +15 -10
  117. package/form-field-simple/package.json +24 -0
  118. package/form-searchable-multiselect/README.md +3 -0
  119. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +98 -0
  120. package/form-searchable-multiselect/package.json +24 -0
  121. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +36 -0
  122. package/form-select/README.md +2 -63
  123. package/form-select/fesm2022/form-select.mjs +85 -141
  124. package/form-select/package.json +24 -0
  125. package/form-select/{index.d.ts → types/form-select.d.ts} +7 -1
  126. package/form-text-input/README.md +2 -63
  127. package/form-text-input/fesm2022/form-text-input.mjs +86 -171
  128. package/form-text-input/package.json +24 -0
  129. package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +9 -12
  130. package/form-textarea/README.md +2 -63
  131. package/form-textarea/fesm2022/form-textarea.mjs +77 -128
  132. package/form-textarea/package.json +24 -0
  133. package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +8 -1
  134. package/hover-card/README.md +11 -0
  135. package/hover-card/fesm2022/hover-card.mjs +123 -0
  136. package/hover-card/package.json +25 -0
  137. package/hover-card/types/hover-card.d.ts +36 -0
  138. package/icon/README.md +2 -63
  139. package/icon/fesm2022/icon.mjs +12 -10
  140. package/icon/package.json +25 -0
  141. package/input/README.md +2 -63
  142. package/input/fesm2022/input.mjs +25 -70
  143. package/input/package.json +25 -0
  144. package/input/types/input.d.ts +19 -0
  145. package/input-group/README.md +11 -0
  146. package/input-group/fesm2022/input-group.mjs +199 -0
  147. package/input-group/package.json +25 -0
  148. package/input-group/types/input-group.d.ts +52 -0
  149. package/input-otp/README.md +11 -0
  150. package/input-otp/fesm2022/input-otp.mjs +141 -0
  151. package/input-otp/package.json +25 -0
  152. package/input-otp/types/input-otp.d.ts +43 -0
  153. package/item/README.md +11 -0
  154. package/item/fesm2022/item.mjs +278 -0
  155. package/item/package.json +25 -0
  156. package/item/types/item.d.ts +101 -0
  157. package/kbd/README.md +11 -0
  158. package/kbd/fesm2022/kbd.mjs +61 -0
  159. package/kbd/package.json +25 -0
  160. package/kbd/types/kbd.d.ts +22 -0
  161. package/label/README.md +2 -63
  162. package/label/fesm2022/label.mjs +12 -11
  163. package/label/package.json +25 -0
  164. package/label/{index.d.ts → types/label.d.ts} +1 -1
  165. package/layout-simple/README.md +3 -0
  166. package/layout-simple/fesm2022/layout-simple.mjs +388 -0
  167. package/layout-simple/package.json +24 -0
  168. package/layout-simple/types/layout-simple.d.ts +167 -0
  169. package/menu/README.md +3 -0
  170. package/menu/fesm2022/menu.mjs +455 -0
  171. package/menu/package.json +24 -0
  172. package/menu/types/menu.d.ts +137 -0
  173. package/menubar/README.md +11 -0
  174. package/menubar/fesm2022/menubar.mjs +108 -0
  175. package/menubar/package.json +25 -0
  176. package/menubar/types/menubar.d.ts +40 -0
  177. package/native-select/README.md +11 -0
  178. package/native-select/fesm2022/native-select.mjs +207 -0
  179. package/native-select/package.json +25 -0
  180. package/native-select/types/native-select.d.ts +70 -0
  181. package/navigation-menu/README.md +11 -0
  182. package/navigation-menu/fesm2022/navigation-menu.mjs +194 -0
  183. package/navigation-menu/package.json +25 -0
  184. package/navigation-menu/types/navigation-menu.d.ts +54 -0
  185. package/package.json +284 -63
  186. package/pagination/README.md +11 -0
  187. package/pagination/fesm2022/pagination.mjs +522 -0
  188. package/pagination/package.json +25 -0
  189. package/pagination/types/pagination.d.ts +192 -0
  190. package/popover/README.md +2 -63
  191. package/popover/fesm2022/popover.mjs +124 -30
  192. package/popover/package.json +24 -0
  193. package/popover/types/popover.d.ts +54 -0
  194. package/progress/README.md +11 -0
  195. package/progress/fesm2022/progress.mjs +77 -0
  196. package/progress/package.json +25 -0
  197. package/progress/types/progress.d.ts +27 -0
  198. package/radio-group/README.md +3 -0
  199. package/radio-group/fesm2022/radio-group.mjs +207 -0
  200. package/radio-group/package.json +25 -0
  201. package/radio-group/types/radio-group.d.ts +71 -0
  202. package/resizable/README.md +11 -0
  203. package/resizable/fesm2022/resizable.mjs +103 -0
  204. package/resizable/package.json +25 -0
  205. package/resizable/types/resizable.d.ts +32 -0
  206. package/scroll-area/README.md +11 -0
  207. package/scroll-area/fesm2022/scroll-area.mjs +51 -0
  208. package/scroll-area/package.json +25 -0
  209. package/scroll-area/types/scroll-area.d.ts +16 -0
  210. package/searchable-multiselect/README.md +3 -0
  211. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +136 -0
  212. package/searchable-multiselect/package.json +24 -0
  213. package/searchable-multiselect/types/searchable-multiselect.d.ts +45 -0
  214. package/select/README.md +2 -63
  215. package/select/fesm2022/select.mjs +340 -198
  216. package/select/package.json +25 -0
  217. package/select/types/select.d.ts +121 -0
  218. package/separator/README.md +2 -63
  219. package/separator/fesm2022/separator.mjs +17 -15
  220. package/separator/package.json +24 -0
  221. package/separator/{index.d.ts → types/separator.d.ts} +4 -5
  222. package/sheet/README.md +2 -63
  223. package/sheet/fesm2022/sheet.mjs +56 -61
  224. package/sheet/package.json +24 -0
  225. package/sidebar/README.md +11 -0
  226. package/sidebar/fesm2022/sidebar.mjs +846 -0
  227. package/sidebar/package.json +25 -0
  228. package/sidebar/types/sidebar.d.ts +237 -0
  229. package/skeleton/README.md +11 -0
  230. package/skeleton/fesm2022/skeleton.mjs +44 -0
  231. package/skeleton/package.json +25 -0
  232. package/skeleton/types/skeleton.d.ts +16 -0
  233. package/slider/README.md +11 -0
  234. package/slider/fesm2022/slider.mjs +74 -0
  235. package/slider/package.json +25 -0
  236. package/slider/types/slider.d.ts +19 -0
  237. package/sonner/README.md +2 -63
  238. package/sonner/fesm2022/sonner.mjs +34 -39
  239. package/sonner/package.json +25 -0
  240. package/spinner/README.md +2 -63
  241. package/spinner/fesm2022/spinner.mjs +20 -16
  242. package/spinner/package.json +25 -0
  243. package/switch/README.md +2 -63
  244. package/switch/fesm2022/switch.mjs +28 -27
  245. package/switch/package.json +25 -0
  246. package/table/README.md +11 -0
  247. package/table/fesm2022/table.mjs +211 -0
  248. package/table/package.json +25 -0
  249. package/table/types/table.d.ts +87 -0
  250. package/tabs/README.md +3 -0
  251. package/tabs/fesm2022/tabs.mjs +210 -0
  252. package/tabs/package.json +25 -0
  253. package/tabs/types/tabs.d.ts +71 -0
  254. package/textarea/README.md +11 -0
  255. package/textarea/fesm2022/textarea.mjs +47 -0
  256. package/textarea/package.json +25 -0
  257. package/textarea/types/textarea.d.ts +18 -0
  258. package/toggle/README.md +11 -0
  259. package/toggle/fesm2022/toggle.mjs +78 -0
  260. package/toggle/package.json +25 -0
  261. package/toggle/types/toggle.d.ts +27 -0
  262. package/toggle-group/README.md +11 -0
  263. package/toggle-group/fesm2022/toggle-group.mjs +117 -0
  264. package/toggle-group/package.json +25 -0
  265. package/toggle-group/types/toggle-group.d.ts +45 -0
  266. package/tooltip/README.md +3 -0
  267. package/tooltip/fesm2022/tooltip.mjs +72 -0
  268. package/tooltip/package.json +25 -0
  269. package/tooltip/types/tooltip.d.ts +22 -0
  270. package/typography/README.md +11 -0
  271. package/typography/fesm2022/typography.mjs +242 -0
  272. package/typography/package.json +25 -0
  273. package/typography/types/typography.d.ts +94 -0
  274. package/utils/README.md +2 -63
  275. package/utils/fesm2022/utils.mjs +209 -2
  276. package/utils/package.json +25 -0
  277. package/utils/types/utils.d.ts +13 -0
  278. package/alert/fesm2022/alert.mjs.map +0 -1
  279. package/badge/fesm2022/badge.mjs.map +0 -1
  280. package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
  281. package/button/fesm2022/button.mjs.map +0 -1
  282. package/calendar/fesm2022/calendar.mjs.map +0 -1
  283. package/calendar/index.d.ts +0 -111
  284. package/date-picker/fesm2022/date-picker.mjs.map +0 -1
  285. package/date-picker/index.d.ts +0 -227
  286. package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
  287. package/form-field/fesm2022/form-field.mjs.map +0 -1
  288. package/form-field/index.d.ts +0 -37
  289. package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
  290. package/form-select/fesm2022/form-select.mjs.map +0 -1
  291. package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
  292. package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
  293. package/icon/fesm2022/icon.mjs.map +0 -1
  294. package/input/fesm2022/input.mjs.map +0 -1
  295. package/input/index.d.ts +0 -41
  296. package/label/fesm2022/label.mjs.map +0 -1
  297. package/popover/fesm2022/popover.mjs.map +0 -1
  298. package/popover/index.d.ts +0 -30
  299. package/select/fesm2022/select.mjs.map +0 -1
  300. package/select/index.d.ts +0 -92
  301. package/separator/fesm2022/separator.mjs.map +0 -1
  302. package/sheet/fesm2022/sheet.mjs.map +0 -1
  303. package/sonner/fesm2022/sonner.mjs.map +0 -1
  304. package/spinner/fesm2022/spinner.mjs.map +0 -1
  305. package/switch/fesm2022/switch.mjs.map +0 -1
  306. package/utils/fesm2022/utils.mjs.map +0 -1
  307. package/utils/index.d.ts +0 -5
  308. /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
  309. /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
  310. /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
  311. /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
  312. /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
  313. /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
  314. /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
  315. /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
  316. /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
@@ -0,0 +1,242 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, NgModule } from '@angular/core';
3
+ import { classes } from '@egose/shadcn-theme-ng/utils';
4
+
5
+ const hlmBlockquote = "mt-6 border-border border-l-2 pl-6 italic";
6
+ class HlmBlockquote {
7
+ constructor() {
8
+ classes(() => hlmBlockquote);
9
+ }
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmBlockquote, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmBlockquote, isStandalone: true, selector: "[hlmBlockquote]", ngImport: i0 });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmBlockquote, decorators: [{
14
+ type: Directive,
15
+ args: [{
16
+ selector: '[hlmBlockquote]',
17
+ }]
18
+ }], ctorParameters: () => [] });
19
+
20
+ const hlmCode = "relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold";
21
+ class HlmCode {
22
+ constructor() {
23
+ classes(() => hlmCode);
24
+ }
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCode, deps: [], target: i0.ɵɵFactoryTarget.Directive });
26
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmCode, isStandalone: true, selector: "[hlmCode]", ngImport: i0 });
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCode, decorators: [{
29
+ type: Directive,
30
+ args: [{
31
+ selector: '[hlmCode]',
32
+ }]
33
+ }], ctorParameters: () => [] });
34
+
35
+ const hlmH1 = "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl";
36
+ class HlmH1 {
37
+ constructor() {
38
+ classes(() => hlmH1);
39
+ }
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH1, deps: [], target: i0.ɵɵFactoryTarget.Directive });
41
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmH1, isStandalone: true, selector: "[hlmH1]", ngImport: i0 });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH1, decorators: [{
44
+ type: Directive,
45
+ args: [{
46
+ selector: '[hlmH1]',
47
+ }]
48
+ }], ctorParameters: () => [] });
49
+
50
+ const hlmH2 = "scroll-m-20 border-border border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0";
51
+ class HlmH2 {
52
+ constructor() {
53
+ classes(() => hlmH2);
54
+ }
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH2, deps: [], target: i0.ɵɵFactoryTarget.Directive });
56
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmH2, isStandalone: true, selector: "[hlmH2]", ngImport: i0 });
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH2, decorators: [{
59
+ type: Directive,
60
+ args: [{
61
+ selector: '[hlmH2]',
62
+ }]
63
+ }], ctorParameters: () => [] });
64
+
65
+ const hlmH3 = "scroll-m-20 text-2xl font-semibold tracking-tight";
66
+ class HlmH3 {
67
+ constructor() {
68
+ classes(() => hlmH3);
69
+ }
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH3, deps: [], target: i0.ɵɵFactoryTarget.Directive });
71
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmH3, isStandalone: true, selector: "[hlmH3]", ngImport: i0 });
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH3, decorators: [{
74
+ type: Directive,
75
+ args: [{
76
+ selector: '[hlmH3]',
77
+ }]
78
+ }], ctorParameters: () => [] });
79
+
80
+ const hlmH4 = "scroll-m-20 text-xl font-semibold tracking-tight";
81
+ class HlmH4 {
82
+ constructor() {
83
+ classes(() => hlmH4);
84
+ }
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH4, deps: [], target: i0.ɵɵFactoryTarget.Directive });
86
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmH4, isStandalone: true, selector: "[hlmH4]", ngImport: i0 });
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmH4, decorators: [{
89
+ type: Directive,
90
+ args: [{
91
+ selector: '[hlmH4]',
92
+ }]
93
+ }], ctorParameters: () => [] });
94
+
95
+ const hlmLarge = "text-lg font-semibold";
96
+ class HlmLarge {
97
+ constructor() {
98
+ classes(() => hlmLarge);
99
+ }
100
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmLarge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
101
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmLarge, isStandalone: true, selector: "[hlmLarge]", ngImport: i0 });
102
+ }
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmLarge, decorators: [{
104
+ type: Directive,
105
+ args: [{
106
+ selector: '[hlmLarge]',
107
+ }]
108
+ }], ctorParameters: () => [] });
109
+
110
+ const hlmLead = "text-xl text-muted-foreground";
111
+ class HlmLead {
112
+ constructor() {
113
+ classes(() => hlmLead);
114
+ }
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmLead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
116
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmLead, isStandalone: true, selector: "[hlmLead]", ngImport: i0 });
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmLead, decorators: [{
119
+ type: Directive,
120
+ args: [{
121
+ selector: '[hlmLead]',
122
+ }]
123
+ }], ctorParameters: () => [] });
124
+
125
+ const hlmMuted = "text-sm text-muted-foreground";
126
+ class HlmMuted {
127
+ constructor() {
128
+ classes(() => hlmMuted);
129
+ }
130
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMuted, deps: [], target: i0.ɵɵFactoryTarget.Directive });
131
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmMuted, isStandalone: true, selector: "[hlmMuted]", ngImport: i0 });
132
+ }
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMuted, decorators: [{
134
+ type: Directive,
135
+ args: [{
136
+ selector: '[hlmMuted]',
137
+ }]
138
+ }], ctorParameters: () => [] });
139
+
140
+ const hlmP = "leading-7 [&:not(:first-child)]:mt-6";
141
+ class HlmP {
142
+ constructor() {
143
+ classes(() => hlmP);
144
+ }
145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmP, deps: [], target: i0.ɵɵFactoryTarget.Directive });
146
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmP, isStandalone: true, selector: "[hlmP]", ngImport: i0 });
147
+ }
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmP, decorators: [{
149
+ type: Directive,
150
+ args: [{
151
+ selector: '[hlmP]',
152
+ }]
153
+ }], ctorParameters: () => [] });
154
+
155
+ const hlmSmall = "text-sm font-medium leading-none";
156
+ class HlmSmall {
157
+ constructor() {
158
+ classes(() => hlmSmall);
159
+ }
160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSmall, deps: [], target: i0.ɵɵFactoryTarget.Directive });
161
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmSmall, isStandalone: true, selector: "[hlmSmall]", ngImport: i0 });
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSmall, decorators: [{
164
+ type: Directive,
165
+ args: [{
166
+ selector: '[hlmSmall]',
167
+ }]
168
+ }], ctorParameters: () => [] });
169
+
170
+ const hlmUl = "my-6 ml-6 list-disc [&>li]:mt-2";
171
+ class HlmUl {
172
+ constructor() {
173
+ classes(() => hlmUl);
174
+ }
175
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmUl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
176
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmUl, isStandalone: true, selector: "[hlmUl]", ngImport: i0 });
177
+ }
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmUl, decorators: [{
179
+ type: Directive,
180
+ args: [{
181
+ selector: '[hlmUl]',
182
+ }]
183
+ }], ctorParameters: () => [] });
184
+
185
+ /*
186
+ * Public API Surface of typography
187
+ */
188
+ const HlmTypographyImports = [
189
+ HlmBlockquote,
190
+ HlmCode,
191
+ HlmH1,
192
+ HlmH2,
193
+ HlmH3,
194
+ HlmH4,
195
+ HlmLarge,
196
+ HlmLead,
197
+ HlmMuted,
198
+ HlmP,
199
+ HlmSmall,
200
+ HlmUl,
201
+ ];
202
+ class HlmTypographyModule {
203
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
204
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmTypographyModule, imports: [HlmBlockquote,
205
+ HlmCode,
206
+ HlmH1,
207
+ HlmH2,
208
+ HlmH3,
209
+ HlmH4,
210
+ HlmLarge,
211
+ HlmLead,
212
+ HlmMuted,
213
+ HlmP,
214
+ HlmSmall,
215
+ HlmUl], exports: [HlmBlockquote,
216
+ HlmCode,
217
+ HlmH1,
218
+ HlmH2,
219
+ HlmH3,
220
+ HlmH4,
221
+ HlmLarge,
222
+ HlmLead,
223
+ HlmMuted,
224
+ HlmP,
225
+ HlmSmall,
226
+ HlmUl] });
227
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTypographyModule });
228
+ }
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTypographyModule, decorators: [{
230
+ type: NgModule,
231
+ args: [{
232
+ imports: [...HlmTypographyImports],
233
+ exports: [...HlmTypographyImports],
234
+ }]
235
+ }] });
236
+
237
+ /**
238
+ * Generated bundle index. Do not edit.
239
+ */
240
+
241
+ export { HlmBlockquote, HlmCode, HlmH1, HlmH2, HlmH3, HlmH4, HlmLarge, HlmLead, HlmMuted, HlmP, HlmSmall, HlmTypographyImports, HlmTypographyModule, HlmUl, hlmBlockquote, hlmCode, hlmH1, hlmH2, hlmH3, hlmH4, hlmLarge, hlmLead, hlmMuted, hlmP, hlmSmall, hlmUl };
242
+
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "typography",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^22.0.0",
6
+ "@angular/core": "^22.0.0",
7
+ "@spartan-ng/brain": "^1.1.1"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/typography.mjs",
14
+ "typings": "types/typography.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/typography.d.ts",
21
+ "default": "./fesm2022/typography.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,94 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare const hlmBlockquote = "tw:mt-6 tw:border-border tw:border-l-2 tw:pl-6 tw:italic";
4
+ declare class HlmBlockquote {
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmBlockquote, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmBlockquote, "[hlmBlockquote]", never, {}, {}, never, never, true, never>;
8
+ }
9
+
10
+ declare const hlmCode = "tw:relative tw:rounded tw:bg-muted tw:px-[0.3rem] tw:py-[0.2rem] tw:font-mono tw:text-sm tw:font-semibold";
11
+ declare class HlmCode {
12
+ constructor();
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmCode, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCode, "[hlmCode]", never, {}, {}, never, never, true, never>;
15
+ }
16
+
17
+ declare const hlmH1 = "tw:scroll-m-20 tw:text-4xl tw:font-extrabold tw:tracking-tight tw:lg:text-5xl";
18
+ declare class HlmH1 {
19
+ constructor();
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmH1, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmH1, "[hlmH1]", never, {}, {}, never, never, true, never>;
22
+ }
23
+
24
+ declare const hlmH2 = "tw:scroll-m-20 tw:border-border tw:border-b tw:pb-2 tw:text-3xl tw:font-semibold tw:tracking-tight tw:transition-colors tw:first:mt-0";
25
+ declare class HlmH2 {
26
+ constructor();
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmH2, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmH2, "[hlmH2]", never, {}, {}, never, never, true, never>;
29
+ }
30
+
31
+ declare const hlmH3 = "tw:scroll-m-20 tw:text-2xl tw:font-semibold tw:tracking-tight";
32
+ declare class HlmH3 {
33
+ constructor();
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmH3, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmH3, "[hlmH3]", never, {}, {}, never, never, true, never>;
36
+ }
37
+
38
+ declare const hlmH4 = "tw:scroll-m-20 tw:text-xl tw:font-semibold tw:tracking-tight";
39
+ declare class HlmH4 {
40
+ constructor();
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmH4, never>;
42
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmH4, "[hlmH4]", never, {}, {}, never, never, true, never>;
43
+ }
44
+
45
+ declare const hlmLarge = "tw:text-lg tw:font-semibold";
46
+ declare class HlmLarge {
47
+ constructor();
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmLarge, never>;
49
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmLarge, "[hlmLarge]", never, {}, {}, never, never, true, never>;
50
+ }
51
+
52
+ declare const hlmLead = "tw:text-xl tw:text-muted-foreground";
53
+ declare class HlmLead {
54
+ constructor();
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmLead, never>;
56
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmLead, "[hlmLead]", never, {}, {}, never, never, true, never>;
57
+ }
58
+
59
+ declare const hlmMuted = "tw:text-sm tw:text-muted-foreground";
60
+ declare class HlmMuted {
61
+ constructor();
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmMuted, never>;
63
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmMuted, "[hlmMuted]", never, {}, {}, never, never, true, never>;
64
+ }
65
+
66
+ declare const hlmP = "tw:leading-7 tw:[&:not(:first-child)]:mt-6";
67
+ declare class HlmP {
68
+ constructor();
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmP, never>;
70
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmP, "[hlmP]", never, {}, {}, never, never, true, never>;
71
+ }
72
+
73
+ declare const hlmSmall = "tw:text-sm tw:font-medium tw:leading-none";
74
+ declare class HlmSmall {
75
+ constructor();
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmSmall, never>;
77
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSmall, "[hlmSmall]", never, {}, {}, never, never, true, never>;
78
+ }
79
+
80
+ declare const hlmUl = "tw:my-6 tw:ml-6 tw:list-disc tw:[&>li]:mt-2";
81
+ declare class HlmUl {
82
+ constructor();
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmUl, never>;
84
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmUl, "[hlmUl]", never, {}, {}, never, never, true, never>;
85
+ }
86
+
87
+ declare const HlmTypographyImports: (typeof HlmBlockquote)[];
88
+ declare class HlmTypographyModule {
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTypographyModule, never>;
90
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmTypographyModule, never, [typeof HlmBlockquote, typeof HlmCode, typeof HlmH1, typeof HlmH2, typeof HlmH3, typeof HlmH4, typeof HlmLarge, typeof HlmLead, typeof HlmMuted, typeof HlmP, typeof HlmSmall, typeof HlmUl], [typeof HlmBlockquote, typeof HlmCode, typeof HlmH1, typeof HlmH2, typeof HlmH3, typeof HlmH4, typeof HlmLarge, typeof HlmLead, typeof HlmMuted, typeof HlmP, typeof HlmSmall, typeof HlmUl]>;
91
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmTypographyModule>;
92
+ }
93
+
94
+ export { HlmBlockquote, HlmCode, HlmH1, HlmH2, HlmH3, HlmH4, HlmLarge, HlmLead, HlmMuted, HlmP, HlmSmall, HlmTypographyImports, HlmTypographyModule, HlmUl, hlmBlockquote, hlmCode, hlmH1, hlmH2, hlmH3, hlmH4, hlmLarge, hlmLead, hlmMuted, hlmP, hlmSmall, hlmUl };
package/utils/README.md CHANGED
@@ -1,64 +1,3 @@
1
- # Utils
1
+ # Utils Subpath
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
-
9
- ```bash
10
- ng generate component component-name
11
- ```
12
-
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
-
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
20
-
21
- To build the library, run:
22
-
23
- ```bash
24
- ng build utils
25
- ```
26
-
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
-
29
- ### Publishing the Library
30
-
31
- Once the project is built, you can publish your library by following these steps:
32
-
33
- 1. Navigate to the `dist` directory:
34
-
35
- ```bash
36
- cd dist/utils
37
- ```
38
-
39
- 2. Run the `npm publish` command to publish your library to the npm registry:
40
- ```bash
41
- npm publish
42
- ```
43
-
44
- ## Running unit tests
45
-
46
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
-
48
- ```bash
49
- ng test
50
- ```
51
-
52
- ## Running end-to-end tests
53
-
54
- For end-to-end (e2e) testing, run:
55
-
56
- ```bash
57
- ng e2e
58
- ```
59
-
60
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
-
62
- ## Additional Resources
63
-
64
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
3
+ This project ships only as `@egose/shadcn-theme-ng/utils` or `@egose/shadcn-theme-ng-tw/utils`. See the [package README](../../README.md) for installation, compatibility, Tailwind variant, test, and release guidance. Do not publish this project directory independently.
@@ -1,9 +1,216 @@
1
+ import { DOCUMENT, isPlatformBrowser } from '@angular/common';
2
+ import { runInInjectionContext, inject, Injector, ElementRef, PLATFORM_ID, DestroyRef, HostAttributeToken, effect, makeEnvironmentProviders } from '@angular/core';
1
3
  import { clsx } from 'clsx';
2
4
  import { twMerge } from 'tailwind-merge';
5
+ import { OVERLAY_DEFAULT_CONFIG } from '@angular/cdk/overlay';
3
6
 
4
7
  function hlm(...inputs) {
5
8
  return twMerge(clsx(inputs));
6
9
  }
10
+ const documentClassStates = new WeakMap();
11
+ let sourceCounter = 0;
12
+ function classes(computed, options = {}) {
13
+ runInInjectionContext(options.injector ?? inject(Injector), () => {
14
+ const elementRef = options.elementRef ?? inject(ElementRef);
15
+ const platformId = inject(PLATFORM_ID);
16
+ const document = inject(DOCUMENT);
17
+ const destroyRef = inject(DestroyRef);
18
+ const baseClasses = inject(new HostAttributeToken('class'), { optional: true });
19
+ const element = elementRef.nativeElement;
20
+ const sourceId = sourceCounter++;
21
+ const state = getDocumentState(document);
22
+ let manager = state.managers.get(element);
23
+ if (!manager) {
24
+ const initialBaseClasses = new Set();
25
+ if (baseClasses) {
26
+ toClassList(baseClasses).forEach((cls) => initialBaseClasses.add(cls));
27
+ }
28
+ manager = {
29
+ element,
30
+ sources: new Map(),
31
+ baseClasses: initialBaseClasses,
32
+ isUpdating: false,
33
+ nextOrder: 0,
34
+ hasInitialized: false,
35
+ restoreRafId: null,
36
+ transitionsSuppressed: false,
37
+ previousTransition: '',
38
+ previousTransitionPriority: '',
39
+ state,
40
+ view: document.defaultView,
41
+ };
42
+ state.managers.set(element, manager);
43
+ observeManagedElement(state, element, platformId, document);
44
+ if (isPlatformBrowser(platformId) && manager.view) {
45
+ manager.previousTransition = element.style.getPropertyValue('transition');
46
+ manager.previousTransitionPriority = element.style.getPropertyPriority('transition');
47
+ element.style.setProperty('transition', 'none', 'important');
48
+ manager.transitionsSuppressed = true;
49
+ }
50
+ }
51
+ const sourceOrder = manager.nextOrder++;
52
+ function updateClasses() {
53
+ const newClasses = toClassList(computed());
54
+ manager.sources.set(sourceId, {
55
+ classes: new Set(newClasses),
56
+ order: sourceOrder,
57
+ });
58
+ updateElement(manager);
59
+ if (manager.transitionsSuppressed) {
60
+ manager.transitionsSuppressed = false;
61
+ manager.restoreRafId = manager.view.requestAnimationFrame(() => {
62
+ manager.restoreRafId = null;
63
+ restoreTransitionSuppression(manager);
64
+ });
65
+ }
66
+ }
67
+ destroyRef.onDestroy(() => {
68
+ if (manager.restoreRafId !== null) {
69
+ manager.view?.cancelAnimationFrame(manager.restoreRafId);
70
+ manager.restoreRafId = null;
71
+ }
72
+ if (manager.transitionsSuppressed) {
73
+ manager.transitionsSuppressed = false;
74
+ restoreTransitionSuppression(manager);
75
+ }
76
+ manager.sources.delete(sourceId);
77
+ if (manager.sources.size === 0) {
78
+ cleanupManager(manager);
79
+ }
80
+ else {
81
+ updateElement(manager);
82
+ }
83
+ });
84
+ effect(updateClasses);
85
+ });
86
+ }
87
+ function restoreTransitionSuppression(manager) {
88
+ const prev = manager.previousTransition;
89
+ if (prev) {
90
+ manager.element.style.setProperty('transition', prev, manager.previousTransitionPriority || undefined);
91
+ }
92
+ else {
93
+ manager.element.style.removeProperty('transition');
94
+ }
95
+ }
96
+ function getDocumentState(document) {
97
+ let state = documentClassStates.get(document);
98
+ if (!state) {
99
+ state = { document, managers: new Map(), observer: null };
100
+ documentClassStates.set(document, state);
101
+ }
102
+ return state;
103
+ }
104
+ function observeManagedElement(state, element, platformId, document) {
105
+ const MutationObserver = document.defaultView?.MutationObserver;
106
+ if (isPlatformBrowser(platformId) && MutationObserver) {
107
+ if (!state.observer) {
108
+ state.observer = new MutationObserver((mutations) => {
109
+ for (const mutation of mutations) {
110
+ if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
111
+ const element = mutation.target;
112
+ const manager = state.managers.get(element);
113
+ if (manager) {
114
+ if (manager.isUpdating)
115
+ continue;
116
+ const currentClasses = toClassList(element.className);
117
+ const allSourceClasses = new Set();
118
+ for (const source of manager.sources.values()) {
119
+ for (const className of source.classes) {
120
+ allSourceClasses.add(className);
121
+ }
122
+ }
123
+ manager.baseClasses.clear();
124
+ for (const className of currentClasses) {
125
+ if (!allSourceClasses.has(className)) {
126
+ manager.baseClasses.add(className);
127
+ }
128
+ }
129
+ updateElement(manager);
130
+ }
131
+ }
132
+ }
133
+ });
134
+ }
135
+ state.observer.observe(element, {
136
+ attributes: true,
137
+ attributeFilter: ['class'],
138
+ });
139
+ }
140
+ }
141
+ function updateElement(manager) {
142
+ if (manager.isUpdating)
143
+ return;
144
+ manager.isUpdating = true;
145
+ if (!manager.hasInitialized && manager.sources.size > 0) {
146
+ const currentClasses = toClassList(manager.element.className);
147
+ const allSourceClasses = new Set();
148
+ for (const source of manager.sources.values()) {
149
+ source.classes.forEach((className) => allSourceClasses.add(className));
150
+ }
151
+ currentClasses.forEach((className) => {
152
+ if (!allSourceClasses.has(className)) {
153
+ manager.baseClasses.add(className);
154
+ }
155
+ });
156
+ manager.hasInitialized = true;
157
+ }
158
+ const sortedSources = Array.from(manager.sources.entries()).sort(([, a], [, b]) => a.order - b.order);
159
+ const allSourceClasses = [];
160
+ for (const [, source] of sortedSources) {
161
+ allSourceClasses.push(...source.classes);
162
+ }
163
+ const classesToApply = allSourceClasses.length > 0 || manager.baseClasses.size > 0
164
+ ? hlm([...allSourceClasses, ...manager.baseClasses])
165
+ : '';
166
+ if (manager.element.className !== classesToApply) {
167
+ manager.element.className = classesToApply;
168
+ }
169
+ manager.isUpdating = false;
170
+ }
171
+ function cleanupManager(manager) {
172
+ const { element, state } = manager;
173
+ state.managers.delete(element);
174
+ if (state.observer) {
175
+ state.observer.disconnect();
176
+ if (state.managers.size === 0) {
177
+ state.observer = null;
178
+ }
179
+ else {
180
+ for (const managedElement of state.managers.keys()) {
181
+ state.observer.observe(managedElement, {
182
+ attributes: true,
183
+ attributeFilter: ['class'],
184
+ });
185
+ }
186
+ }
187
+ }
188
+ if (state.managers.size === 0) {
189
+ documentClassStates.delete(state.document);
190
+ }
191
+ }
192
+ const classListCache = new Map();
193
+ function toClassList(className) {
194
+ if (typeof className === 'string' && classListCache.has(className)) {
195
+ return classListCache.get(className);
196
+ }
197
+ const result = clsx(className)
198
+ .split(' ')
199
+ .filter((cls) => cls.length > 0);
200
+ if (typeof className === 'string' && classListCache.size < 1000) {
201
+ classListCache.set(className, result);
202
+ }
203
+ return result;
204
+ }
205
+
206
+ function provideSpartanHlm() {
207
+ return makeEnvironmentProviders([
208
+ {
209
+ provide: OVERLAY_DEFAULT_CONFIG,
210
+ useValue: { usePopover: false },
211
+ },
212
+ ]);
213
+ }
7
214
 
8
215
  /*
9
216
  * Public API Surface of utils
@@ -13,5 +220,5 @@ function hlm(...inputs) {
13
220
  * Generated bundle index. Do not edit.
14
221
  */
15
222
 
16
- export { hlm };
17
- //# sourceMappingURL=utils.mjs.map
223
+ export { classes, hlm, provideSpartanHlm };
224
+
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "utils",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.2.0 || ^22.0.0",
6
+ "@angular/core": "^20.2.0 || ^22.0.0",
7
+ "@spartan-ng/brain": "^0.0.1-alpha.512"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/utils.mjs",
14
+ "typings": "types/utils.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/utils.d.ts",
21
+ "default": "./fesm2022/utils.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }