@ojiepermana/angular 22.1.10 → 22.1.12

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 (340) hide show
  1. package/README.md +32 -26
  2. package/chart/README.md +272 -0
  3. package/component/README.md +89 -0
  4. package/component/accordion/README.md +195 -0
  5. package/component/alert/README.md +184 -0
  6. package/component/alert-dialog/README.md +255 -0
  7. package/component/aspect-ratio/README.md +116 -0
  8. package/component/avatar/README.md +182 -0
  9. package/component/badge/README.md +143 -0
  10. package/component/breadcrumb/README.md +223 -0
  11. package/component/button/README.md +141 -0
  12. package/component/button-group/README.md +214 -0
  13. package/component/calendar/README.md +137 -0
  14. package/component/card/README.md +232 -0
  15. package/component/carousel/README.md +276 -0
  16. package/component/checkbox/README.md +153 -0
  17. package/component/collapsible/README.md +216 -0
  18. package/component/combobox/README.md +202 -0
  19. package/component/command/README.md +287 -0
  20. package/component/composer/README.md +241 -0
  21. package/component/context-menu/README.md +268 -0
  22. package/component/date-picker/README.md +202 -0
  23. package/component/dialog/README.md +276 -0
  24. package/component/drawer/README.md +147 -0
  25. package/component/dropdown-menu/README.md +336 -0
  26. package/component/editor/README.md +152 -0
  27. package/component/empty/README.md +193 -0
  28. package/component/form/README.md +216 -0
  29. package/component/hover-card/README.md +150 -0
  30. package/component/icon/README.md +25 -0
  31. package/component/input/README.md +160 -0
  32. package/component/input-group/README.md +245 -0
  33. package/component/input-otp/README.md +331 -0
  34. package/component/item/README.md +254 -0
  35. package/component/kanban/README.md +81 -0
  36. package/component/kbd/README.md +141 -0
  37. package/component/label/README.md +137 -0
  38. package/component/menubar/README.md +270 -0
  39. package/component/native-select/README.md +176 -0
  40. package/component/navigation-menu/README.md +165 -0
  41. package/component/pagination/README.md +151 -0
  42. package/component/pillbox/README.md +68 -0
  43. package/component/popover/README.md +54 -0
  44. package/component/progress/README.md +160 -0
  45. package/component/radio/README.md +212 -0
  46. package/component/resizable/README.md +178 -0
  47. package/component/scroll-area/README.md +150 -0
  48. package/component/select/README.md +228 -0
  49. package/component/separator/README.md +175 -0
  50. package/component/sheet/README.md +190 -0
  51. package/component/skeleton/README.md +158 -0
  52. package/component/slider/README.md +207 -0
  53. package/component/spinner/README.md +160 -0
  54. package/component/switch/README.md +170 -0
  55. package/component/table/README.md +292 -0
  56. package/component/tabs/README.md +220 -0
  57. package/component/textarea/README.md +169 -0
  58. package/component/timeline/README.md +94 -0
  59. package/component/toast/README.md +173 -0
  60. package/component/toggle/README.md +133 -0
  61. package/component/toggle-group/README.md +234 -0
  62. package/component/tooltip/README.md +230 -0
  63. package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
  64. package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
  65. package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
  66. package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
  67. package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
  68. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
  69. package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
  70. package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
  71. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
  72. package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
  73. package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
  74. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
  75. package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
  76. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
  77. package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
  78. package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
  79. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
  80. package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
  81. package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
  82. package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
  83. package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
  84. package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
  85. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
  86. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
  87. package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
  88. package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
  89. package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
  90. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
  91. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
  92. package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
  93. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
  94. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
  95. package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
  96. package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
  97. package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
  98. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
  99. package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
  100. package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
  101. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
  102. package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
  103. package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
  104. package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
  105. package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
  106. package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
  107. package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
  108. package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
  109. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
  110. package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
  111. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
  112. package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
  113. package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
  114. package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
  115. package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
  116. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
  117. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
  118. package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
  119. package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
  120. package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
  121. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
  122. package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
  123. package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
  124. package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
  125. package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
  126. package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
  127. package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
  128. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
  129. package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
  130. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
  131. package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
  132. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
  133. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
  134. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
  135. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
  136. package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
  137. package/fesm2022/ojiepermana-angular-component.mjs +4 -4
  138. package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
  139. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
  140. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
  141. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
  142. package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
  143. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
  144. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
  145. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
  146. package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
  147. package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
  148. package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
  149. package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
  150. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
  151. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
  152. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
  153. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
  154. package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
  155. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
  156. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
  157. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
  158. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
  159. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
  160. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
  161. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
  162. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
  163. package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
  164. package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
  165. package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
  166. package/fesm2022/ojiepermana-angular.mjs +6 -11
  167. package/navigation/README.md +374 -0
  168. package/package.json +81 -20
  169. package/sdk/README.md +212 -0
  170. package/sdk/schematics/collection.json +20 -0
  171. package/sdk/schematics/init/index.js +83 -0
  172. package/sdk/schematics/init/schema.json +19 -0
  173. package/sdk/schematics/ng-add/index.js +147 -0
  174. package/sdk/schematics/ng-add/schema.json +14 -0
  175. package/sdk/schematics/package.json +3 -0
  176. package/sdk/schematics/sdk/index.js +175 -0
  177. package/sdk/schematics/sdk/schema.json +19 -0
  178. package/sdk/sdk.config.example.json +24 -0
  179. package/sdk/src/config/loader.js +43 -0
  180. package/sdk/src/config/schema.js +59 -0
  181. package/sdk/src/emit/client.js +251 -0
  182. package/sdk/src/emit/metadata.js +310 -0
  183. package/sdk/src/emit/models.js +104 -0
  184. package/sdk/src/emit/navigation.js +56 -0
  185. package/sdk/src/emit/operations.js +118 -0
  186. package/sdk/src/emit/public-api.js +54 -0
  187. package/sdk/src/emit/services.js +110 -0
  188. package/sdk/src/engine.js +67 -0
  189. package/sdk/src/layout/per-domain.js +360 -0
  190. package/sdk/src/package.json +3 -0
  191. package/sdk/src/parser/bundle.js +25 -0
  192. package/sdk/src/parser/ir.js +429 -0
  193. package/sdk/src/parser/types.js +7 -0
  194. package/sdk/src/render/template.js +152 -0
  195. package/sdk/src/writer/index.js +286 -0
  196. package/theme/README.md +126 -0
  197. package/theme/component/settings/README.md +135 -0
  198. package/theme/layout/README.md +539 -0
  199. package/theme/page/README.md +453 -0
  200. package/theme/shell/README.md +340 -0
  201. package/theme/styles/README.md +178 -0
  202. package/theme/styles/css/base/components.css +553 -0
  203. package/theme/styles/css/base/index.css +14 -0
  204. package/theme/styles/css/base/package.css +9 -0
  205. package/theme/styles/css/base/prefers-dark.css +86 -0
  206. package/theme/styles/css/base/print.css +62 -0
  207. package/theme/styles/css/base/status.css +38 -0
  208. package/theme/styles/css/base/tailwind.css +165 -0
  209. package/theme/styles/css/base/theme.css +373 -0
  210. package/theme/styles/css/base/tokens.css +361 -0
  211. package/theme/styles/css/color/amber.css +72 -0
  212. package/theme/styles/css/color/blue.css +72 -0
  213. package/theme/styles/css/color/brand.css +38 -0
  214. package/theme/styles/css/color/cyan.css +72 -0
  215. package/theme/styles/css/color/emerald.css +72 -0
  216. package/theme/styles/css/color/fuchsia.css +72 -0
  217. package/theme/styles/css/color/green.css +72 -0
  218. package/theme/styles/css/color/index.css +19 -0
  219. package/theme/styles/css/color/indigo.css +72 -0
  220. package/theme/styles/css/color/lime.css +72 -0
  221. package/theme/styles/css/color/orange.css +72 -0
  222. package/theme/styles/css/color/pink.css +72 -0
  223. package/theme/styles/css/color/purple.css +72 -0
  224. package/theme/styles/css/color/red.css +72 -0
  225. package/theme/styles/css/color/rose.css +72 -0
  226. package/theme/styles/css/color/sky.css +72 -0
  227. package/theme/styles/css/color/teal.css +72 -0
  228. package/theme/styles/css/color/violet.css +72 -0
  229. package/theme/styles/css/color/yellow.css +72 -0
  230. package/theme/styles/css/index.css +18 -0
  231. package/theme/styles/css/neutral/gray.css +63 -0
  232. package/theme/styles/css/neutral/index.css +11 -0
  233. package/theme/styles/css/neutral/mauve.css +63 -0
  234. package/theme/styles/css/neutral/mist.css +63 -0
  235. package/theme/styles/css/neutral/neutral.css +63 -0
  236. package/theme/styles/css/neutral/olive.css +63 -0
  237. package/theme/styles/css/neutral/slate.css +63 -0
  238. package/theme/styles/css/neutral/stone.css +63 -0
  239. package/theme/styles/css/neutral/taupe.css +63 -0
  240. package/theme/styles/css/neutral/zinc.css +63 -0
  241. package/theme/styles/css/radius/index.css +30 -0
  242. package/theme/styles/css/space/index.css +20 -0
  243. package/types/ojiepermana-angular-chart-area.d.ts +76 -1
  244. package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
  245. package/types/ojiepermana-angular-chart-core.d.ts +811 -1
  246. package/types/ojiepermana-angular-chart-line.d.ts +75 -1
  247. package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
  248. package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
  249. package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
  250. package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
  251. package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
  252. package/types/ojiepermana-angular-chart.d.ts +2 -1
  253. package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
  254. package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
  255. package/types/ojiepermana-angular-component-alert.d.ts +42 -1
  256. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
  257. package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
  258. package/types/ojiepermana-angular-component-badge.d.ts +24 -1
  259. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
  260. package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
  261. package/types/ojiepermana-angular-component-button.d.ts +27 -1
  262. package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
  263. package/types/ojiepermana-angular-component-card.d.ts +69 -1
  264. package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
  265. package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
  266. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
  267. package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
  268. package/types/ojiepermana-angular-component-command.d.ts +130 -1
  269. package/types/ojiepermana-angular-component-composer.d.ts +90 -1
  270. package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
  271. package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
  272. package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
  273. package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
  274. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
  275. package/types/ojiepermana-angular-component-editor.d.ts +135 -1
  276. package/types/ojiepermana-angular-component-empty.d.ts +50 -1
  277. package/types/ojiepermana-angular-component-form.d.ts +159 -1
  278. package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
  279. package/types/ojiepermana-angular-component-icon.d.ts +89 -1
  280. package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
  281. package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
  282. package/types/ojiepermana-angular-component-input.d.ts +21 -1
  283. package/types/ojiepermana-angular-component-item.d.ts +93 -1
  284. package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
  285. package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
  286. package/types/ojiepermana-angular-component-label.d.ts +11 -1
  287. package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
  288. package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
  289. package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
  290. package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
  291. package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
  292. package/types/ojiepermana-angular-component-popover.d.ts +66 -1
  293. package/types/ojiepermana-angular-component-progress.d.ts +17 -1
  294. package/types/ojiepermana-angular-component-radio.d.ts +60 -1
  295. package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
  296. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
  297. package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
  298. package/types/ojiepermana-angular-component-select.d.ts +122 -1
  299. package/types/ojiepermana-angular-component-separator.d.ts +14 -1
  300. package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
  301. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
  302. package/types/ojiepermana-angular-component-slider.d.ts +83 -1
  303. package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
  304. package/types/ojiepermana-angular-component-switch.d.ts +44 -1
  305. package/types/ojiepermana-angular-component-table.d.ts +57 -1
  306. package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
  307. package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
  308. package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
  309. package/types/ojiepermana-angular-component-toast.d.ts +64 -1
  310. package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
  311. package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
  312. package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
  313. package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
  314. package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
  315. package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
  316. package/types/ojiepermana-angular-component-utils.d.ts +2 -1
  317. package/types/ojiepermana-angular-component.d.ts +2 -1
  318. package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
  319. package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
  320. package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
  321. package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
  322. package/types/ojiepermana-angular-navigation.d.ts +507 -1
  323. package/types/ojiepermana-angular-sdk.d.ts +89 -1
  324. package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
  325. package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
  326. package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
  327. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
  328. package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
  329. package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
  330. package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
  331. package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
  332. package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
  333. package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
  334. package/types/ojiepermana-angular-theme-page.d.ts +5 -1
  335. package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
  336. package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
  337. package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
  338. package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
  339. package/types/ojiepermana-angular-theme.d.ts +2 -1
  340. package/types/ojiepermana-angular.d.ts +5 -5
@@ -1 +1,811 @@
1
- export * from '@ojiepermana/angular-chart/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Type, Signal } from '@angular/core';
3
+ import { ScaleBand, ScaleLinear, scalePoint, scaleLinear, ScalePoint, scaleBand } from 'd3-scale';
4
+ import * as _ojiepermana_angular_chart_core from '@ojiepermana/angular/chart/core';
5
+
6
+ /**
7
+ * Theme-aware color definition for a chart series.
8
+ *
9
+ * Either:
10
+ * - a single `color` string (raw CSS color — hex, hsl, oklch, CSS var ref), or
11
+ * - a `theme` map whose keys match the document color scheme (`light` / `dark`).
12
+ *
13
+ * Values are injected verbatim into a scoped `<style>` block as
14
+ * `--color-<key>: <value>;`, so any valid CSS color works.
15
+ *
16
+ * Defaults reference the theme tokens from `@ojiepermana/angular/theme/styles`
17
+ * (e.g. `'hsl(var(--chart-1))'`).
18
+ */
19
+ interface ChartSeriesConfig {
20
+ /** Human-readable label (shown in legend, tooltip). */
21
+ readonly label?: string;
22
+ /** Optional icon component rendered next to the label. */
23
+ readonly icon?: Type<unknown>;
24
+ /** Raw color. Mutually exclusive with `theme`. */
25
+ readonly color?: string;
26
+ /** Theme-aware colors — keyed by color scheme. */
27
+ readonly theme?: Readonly<Record<ChartThemeKey, string>>;
28
+ }
29
+ /** Supported color scheme keys. */
30
+ type ChartThemeKey = 'light' | 'dark';
31
+ /** Map of series-key → config. */
32
+ type ChartConfig = Readonly<Record<string, ChartSeriesConfig>>;
33
+ /** CSS selector under which a chart instance is scoped. */
34
+ declare const CHART_DATA_ATTRIBUTE = "data-chart";
35
+ /** Default color schemes supported by the generated `<style>` block. */
36
+ declare const CHART_THEMES: ReadonlyArray<{
37
+ readonly key: ChartThemeKey;
38
+ readonly selector: string;
39
+ }>;
40
+ /**
41
+ * Whether a value is safe to interpolate into the generated `<style>` block.
42
+ *
43
+ * The check is deliberately layered rather than one clever regular expression:
44
+ *
45
+ * 1. reject anything containing a character that can end a declaration or a
46
+ * rule, which is what actually stops an injection;
47
+ * 2. restrict the remaining characters to those a color can be built from;
48
+ * 3. require balanced parentheses, so a truncated function cannot swallow the
49
+ * rest of the block;
50
+ * 4. require every function called to be a color function.
51
+ *
52
+ * Real values keep working: `#2563eb`, `red`, `var(--chart-2)`,
53
+ * `hsl(var(--chart-1))`, `rgb(0 0 0 / 50%)`, `color-mix(in srgb, red, blue)`.
54
+ */
55
+ declare function isSafeCssColorValue(value: string): boolean;
56
+ /**
57
+ * Generate the CSS rule-set for a chart instance: one `--color-<key>` per
58
+ * series, scoped to the owning `[data-chart]` element, with optional dark
59
+ * variant via `[data-mode="dark"] [data-chart="…"]`.
60
+ *
61
+ * Series without any color are skipped (consumer can fall back to a default), and
62
+ * so is any series whose color fails {@link isSafeCssColorValue}: the value never
63
+ * reaches the stylesheet, and the series falls back to its default exactly as an
64
+ * unset color would. `chartId` is escaped, so it cannot break out of the
65
+ * attribute selector either.
66
+ *
67
+ * @param chartId Unique chart id (used as attribute value).
68
+ * @param config Series configuration map.
69
+ */
70
+ declare function buildChartCss(chartId: string, config: ChartConfig): string;
71
+ /**
72
+ * Escape a string so it is safe to use as a CSS custom-property identifier or as
73
+ * an attribute selector value. The result only ever holds `[A-Za-z0-9_-]`.
74
+ *
75
+ * A string that is ALREADY an identifier passes through untouched, which is
76
+ * every real series key: `sales` stays `--color-sales`.
77
+ *
78
+ * Anything else has its unsafe characters replaced with `_` AND gains a short
79
+ * fingerprint of the ORIGINAL string, because the replacement alone is not
80
+ * injective. `'a b'` and `'a_b'` both collapse to `a_b`, and two series sharing
81
+ * one custom property is silent data loss: {@link buildChartCss} emits both
82
+ * declarations into the same rule so the last one wins, and
83
+ * {@link seriesColorVar} then resolves both series to that one token.
84
+ */
85
+ declare function escapeCssIdent(input: string): string;
86
+ /** Resolve the `var(--color-<key>)` reference for a given series. */
87
+ declare function seriesColorVar(seriesKey: string): string;
88
+ /**
89
+ * Resolve a raw per-datum colour to a paint value for an SVG attribute
90
+ * (`[attr.fill]`, `[attr.stroke]`).
91
+ *
92
+ * `raw` is `unknown` so a caller can hand over `datum[colorKey]` directly
93
+ * without its own `typeof` guard.
94
+ *
95
+ * The rule, which is the union of the two copies this replaces:
96
+ * 1. not a string, or empty -> `fallback`
97
+ * 2. looks like a CSS colour or calls a
98
+ * function (`var(`, `#`, `rgb`,
99
+ * `hsl`, or a `(` anywhere) -> used verbatim
100
+ * 3. anything else is a series key -> `var(--color-<key>)`
101
+ *
102
+ * Deliberately NOT added: no `.trim()`, and no named-colour detector. Either
103
+ * would move an input that today lands on branch 3, so `'red'` stays a series
104
+ * key rather than becoming the colour red. That is the existing behaviour and
105
+ * changing it is a separate decision.
106
+ */
107
+ declare function resolveSeriesColor(raw: unknown, fallback: string): string;
108
+
109
+ /**
110
+ * Resolves the live spacing unit in pixels for SVG chart geometry, and re-emits
111
+ * when the global `theme-space` axis switches.
112
+ *
113
+ * Charts are the one part of the library CSS cannot reach: plot margins are
114
+ * numbers handed to SVG, not properties a token can cascade into. Without a
115
+ * bridge, choosing `compact` tightens every card and control on a dashboard and
116
+ * leaves the charts sitting in exactly as much white space as before -- one
117
+ * island of the old density in the middle of the new one.
118
+ *
119
+ * This is deliberately the same shape as {@link ChartThemeRadius}: an attribute
120
+ * `MutationObserver`, an SSR-safe read, and a fallback constant. Copying a
121
+ * pattern that already works beats inventing a second one, and it means both
122
+ * bridges can be tested the same way.
123
+ *
124
+ * It reads `--spacing-base`, NOT `--spacing`. They hold the same number, but
125
+ * `--spacing` is declared inside Tailwind's `@theme inline` block, which is
126
+ * inlined into utilities at build time and never lands on `<html>` as something
127
+ * `getComputedStyle` can read back. Reading it would have returned an empty
128
+ * string, and this bridge would have quietly served its fallback forever while
129
+ * looking perfectly correct.
130
+ *
131
+ * SSR-safe: with no document it returns the fallback and skips observing.
132
+ */
133
+ declare class ChartThemeSpace {
134
+ private readonly document;
135
+ private readonly unitPx;
136
+ /** Resolved spacing unit (`--spacing-base`) in px; reactive to the theme-space axis. */
137
+ readonly px: _angular_core.Signal<number>;
138
+ constructor();
139
+ /** Scale one margin constant, expressed in spacing units, into pixels. */
140
+ scale(units: number): number;
141
+ private readUnitPx;
142
+ private toPx;
143
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartThemeSpace, never>;
144
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChartThemeSpace>;
145
+ }
146
+
147
+ /** A single row of chart data — one categorical key + N numeric series. */
148
+ type ChartDatum = Readonly<Record<string, unknown>>;
149
+ /** Render-area margins inside the chart's SVG (px). */
150
+ interface ChartMargin {
151
+ readonly top: number;
152
+ readonly right: number;
153
+ readonly bottom: number;
154
+ readonly left: number;
155
+ }
156
+ /**
157
+ * Default margins, one per chart geometry. THREE constants, not one: the
158
+ * families disagree on purpose, and collapsing them would silently relayout
159
+ * pie, radial, and radar.
160
+ *
161
+ * Cartesian charts need a bottom gutter for the axis and a wide left gutter for
162
+ * y tick labels. Polar charts have no axes to make room for. Radar needs
163
+ * symmetric room for its outer labels.
164
+ */
165
+ declare const DEFAULT_CARTESIAN_MARGIN: ChartMargin;
166
+ /** Polar geometry (pie, radial): no axis gutters. */
167
+ declare const DEFAULT_POLAR_MARGIN: ChartMargin;
168
+ /** Radar geometry: symmetric room for the outer axis labels. */
169
+ declare const DEFAULT_RADAR_MARGIN: ChartMargin;
170
+ /**
171
+ * The same three margins expressed in SPACING UNITS rather than pixels.
172
+ *
173
+ * A chart draws its plot area with numbers, so no token can cascade into it.
174
+ * These are what {@link ChartThemeSpace} multiplies by the live spacing unit, so
175
+ * plot gutters tighten along with everything else when the density axis moves.
176
+ *
177
+ * The px constants above stay exactly as they are, and stay exported. They are
178
+ * the published defaults and the SSR fallback, and at the `normal` preset the
179
+ * unit maths reproduces them precisely: 4px per unit gives back 8/8/24/40,
180
+ * 8 all round, and 24 all round.
181
+ */
182
+ declare const DEFAULT_CARTESIAN_MARGIN_UNITS: ChartMargin;
183
+ declare const DEFAULT_POLAR_MARGIN_UNITS: ChartMargin;
184
+ declare const DEFAULT_RADAR_MARGIN_UNITS: ChartMargin;
185
+ /** Axis orientation for cartesian charts. */
186
+ type ChartOrientation = 'vertical' | 'horizontal';
187
+ /** Primary axis scale — band for categorical, linear for numeric. */
188
+ type CategoryScale = ScaleBand<string>;
189
+ type ValueScale = ScaleLinear<number, number>;
190
+ /**
191
+ * Cartesian plotting frame shared between a chart type (Bar, Line, Area…)
192
+ * and its axis / grid primitives.
193
+ *
194
+ * The owning chart component provides an instance and publishes its scales;
195
+ * descendants read them via signals and re-render when dimensions or data
196
+ * change.
197
+ */
198
+ declare class CartesianContext {
199
+ /** Inner width (outer width − margin.left − margin.right). */
200
+ readonly innerWidth: _angular_core.WritableSignal<number>;
201
+ /** Inner height (outer height − margin.top − margin.bottom). */
202
+ readonly innerHeight: _angular_core.WritableSignal<number>;
203
+ /** Margins around the plotting area. */
204
+ readonly margin: _angular_core.WritableSignal<ChartMargin>;
205
+ /** Layout orientation (drives which axis holds the band scale). */
206
+ readonly orientation: _angular_core.WritableSignal<ChartOrientation>;
207
+ /** Band (categorical) scale. */
208
+ readonly categoryScale: _angular_core.WritableSignal<CategoryScale | null>;
209
+ /** Linear (numeric) scale. */
210
+ readonly valueScale: _angular_core.WritableSignal<ValueScale | null>;
211
+ /** Ordered category domain (e.g. x labels for vertical, y labels for horizontal). */
212
+ readonly categories: _angular_core.WritableSignal<readonly string[]>;
213
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CartesianContext, never>;
214
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CartesianContext>;
215
+ }
216
+ /** Resolve the scale that maps to the X axis for a given orientation. */
217
+ declare function xScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
218
+ /** Resolve the scale that maps to the Y axis for a given orientation. */
219
+ declare function yScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
220
+ /**
221
+ * The plot margin actually in effect: the consumer's `margin` input when they
222
+ * set one, otherwise the default scaled by the live spacing unit.
223
+ *
224
+ * An explicit `margin` always wins. A consumer who has already tuned their
225
+ * gutters chose those exact numbers, and quietly rescaling them when the
226
+ * density axis moves would override a decision they made on purpose.
227
+ *
228
+ * This is why the `margin` inputs accept `null` and default to it: a chart has
229
+ * to be able to tell "the caller wants 8px here" apart from "nobody said", and
230
+ * an eagerly-defaulted object cannot express the difference.
231
+ */
232
+ declare function resolveChartMargin(margin: Signal<ChartMargin | null>, units: ChartMargin, space: ChartThemeSpace): Signal<ChartMargin>;
233
+
234
+ /**
235
+ * Emitted when a datum-bearing mark is activated by pointer or keyboard: a
236
+ * line or area dot, a bar, a pie slice, a radial bar, a scatter point.
237
+ *
238
+ * Before this existed, each chart family declared its own interface with the
239
+ * same five fields, so a consumer handling two chart families wrote the same
240
+ * handler twice against two unrelated types. The per-family names are still
241
+ * exported, now as deprecated aliases of this one.
242
+ *
243
+ * The `= ChartDatum` default matters: every legacy alias and every
244
+ * `output<...ClickEvent>()` in the library is written without a type argument.
245
+ * It stays an `interface` so a consumer can still `extends` it.
246
+ */
247
+ interface ChartPointClickEvent<TDatum = ChartDatum> {
248
+ /** Series the mark belongs to. This is the `--color-<key>` key. */
249
+ readonly seriesKey: string;
250
+ /**
251
+ * Index into the chart's own `data()` array. Always absolute: the line and
252
+ * area charts add their viewport offset before emitting, so a zoomed chart
253
+ * still reports the row the user actually clicked.
254
+ */
255
+ readonly datumIndex: number;
256
+ /** Categorical label of the mark. */
257
+ readonly category: string;
258
+ /** Numeric magnitude of the mark. */
259
+ readonly value: number;
260
+ /** The source row at `datumIndex`. */
261
+ readonly datum: TDatum;
262
+ }
263
+
264
+ interface ChartIndexRange {
265
+ readonly startIndex: number;
266
+ readonly endIndex: number;
267
+ }
268
+ type NumericDomain = readonly [number, number];
269
+ declare function normalizeIndexRange(start: number, end: number, maxCount: number): ChartIndexRange | null;
270
+ declare function effectiveIndexRange(range: ChartIndexRange | null, maxCount: number): ChartIndexRange | null;
271
+ declare function indexRangeSize(range: ChartIndexRange | null, maxCount: number): number;
272
+ declare function sliceByIndexRange<T>(data: readonly T[], range: ChartIndexRange | null): readonly T[];
273
+ declare function zoomIndexRange(current: ChartIndexRange | null, maxCount: number, anchorIndex: number, factor: number): ChartIndexRange | null;
274
+ declare function panIndexRange(current: ChartIndexRange | null, maxCount: number, deltaSteps: number): ChartIndexRange | null;
275
+ /**
276
+ * The value domain for a chart drawn against a zero baseline.
277
+ *
278
+ * A bar, a line, or an area is read against the origin, so the domain has to
279
+ * reach it in both directions: negative data below, positive above. Clamping
280
+ * one end at zero is what pushed negative marks outside the plot.
281
+ *
282
+ * A dataset that is entirely zero would collapse the domain onto a point, which
283
+ * d3 maps to the middle of the range for every value, so it is opened by one
284
+ * unit instead.
285
+ */
286
+ declare function zeroBaselineDomain(minValue: number, maxValue: number): NumericDomain;
287
+ declare function normalizeNumericDomain(a: number, b: number): NumericDomain;
288
+ declare function zoomNumericDomain(current: NumericDomain, full: NumericDomain, anchor: number, factor: number): NumericDomain;
289
+ declare function panNumericDomain(current: NumericDomain, full: NumericDomain, delta: number): NumericDomain;
290
+
291
+ declare class CategoricalViewportContext {
292
+ readonly dataCount: _angular_core.WritableSignal<number>;
293
+ readonly brushRange: _angular_core.WritableSignal<ChartIndexRange | null>;
294
+ readonly zoomRange: _angular_core.WritableSignal<ChartIndexRange | null>;
295
+ readonly hasZoom: _angular_core.Signal<boolean>;
296
+ resetZoom(): void;
297
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CategoricalViewportContext, never>;
298
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CategoricalViewportContext>;
299
+ }
300
+
301
+ /**
302
+ * The scaffolding every cartesian chart needs, in one place.
303
+ *
304
+ * Line, area, bar, and scatter each used to hand-roll the same four geometry
305
+ * computeds, the same layout-publishing effect, and the same click plus
306
+ * active-point plus aria-label handlers. That was around 55 duplicated lines per
307
+ * chart, and the copies had already drifted (three different aria-label
308
+ * wordings, two different ways of reaching the same margin default).
309
+ *
310
+ * What stays per chart is what genuinely differs: the layout computation, the
311
+ * event payload, and the aria-label sentence. Those come in as options.
312
+ */
313
+ /**
314
+ * The minimum a rendered mark must expose to take part in the shared click and
315
+ * active-point plumbing. `LinePoint`, `BarRect`, and `ScatterPoint` already
316
+ * satisfy it structurally, so no layout type had to change.
317
+ *
318
+ * `datumIndex` here is the index into the VISIBLE window, not the full dataset.
319
+ * {@link CartesianChartSetup.resolveDatumIndex} converts it.
320
+ */
321
+ interface CartesianMark {
322
+ readonly seriesKey: string;
323
+ readonly datumIndex: number;
324
+ }
325
+ interface CartesianChartOptions<M extends CartesianMark, E> {
326
+ /** The full, unwindowed dataset. A thunk so it is only read inside reactive contexts. */
327
+ readonly data: () => readonly ChartDatum[];
328
+ /** The chart's `margin` input. */
329
+ readonly margin: () => ChartMargin;
330
+ /**
331
+ * Present when the chart provides a `CartesianContext` (line, area, bar). The
332
+ * setup owns orientation, margin, and the inner geometry on it; scales and
333
+ * categories stay with the chart, in {@link publishLayout}. Scatter omits it.
334
+ */
335
+ readonly cartesian?: {
336
+ readonly context: CartesianContext;
337
+ readonly orientation: () => ChartOrientation;
338
+ };
339
+ /**
340
+ * Present when the chart supports index brush or zoom (line, area). It drives
341
+ * `visibleStartIndex` and `visibleData`, and the setup keeps its `dataCount`
342
+ * in step with the data. Bar and scatter omit it, and their `visibleData` is
343
+ * simply `data()`.
344
+ */
345
+ readonly viewport?: CategoricalViewportContext;
346
+ /**
347
+ * The chart-specific half of the layout effect: push this chart's own layout
348
+ * downstream. It runs inside the single effect the setup creates, so every
349
+ * signal it reads is tracked. It receives the inner geometry so it never has
350
+ * to reach back into the object it is being passed to.
351
+ */
352
+ readonly publishLayout?: (inner: {
353
+ readonly width: number;
354
+ readonly height: number;
355
+ }) => void;
356
+ /** The chart's click output. */
357
+ readonly click: {
358
+ /** Must be a bound lambda, not a detached `output.emit` reference. */
359
+ readonly emit: (event: E) => void;
360
+ /** `datumIndex` is absolute (the viewport offset is already applied). */
361
+ readonly payload: (mark: M, datumIndex: number, datum: ChartDatum) => E;
362
+ };
363
+ /**
364
+ * The aria-label for one mark. `seriesLabel` arrives already resolved from the
365
+ * chart config, so each chart only writes its own sentence.
366
+ */
367
+ readonly ariaLabel: (mark: M, seriesLabel: string) => string;
368
+ }
369
+ interface CartesianChartSetup<M extends CartesianMark> {
370
+ /** Plot width, margins removed, never negative. */
371
+ readonly innerWidth: Signal<number>;
372
+ /** Plot height, margins removed, never negative. */
373
+ readonly innerHeight: Signal<number>;
374
+ /** `viewBox` for the outer svg, in RAW dimensions (not the inner geometry). */
375
+ readonly viewBox: Signal<string>;
376
+ /** `transform` that moves the inner group inside the margins. */
377
+ readonly innerTransform: Signal<string>;
378
+ /** First absolute index the current window shows. `0` without a viewport. */
379
+ readonly visibleStartIndex: Signal<number>;
380
+ /** The windowed data, or the whole dataset when there is no viewport. */
381
+ readonly visibleData: Signal<readonly ChartDatum[]>;
382
+ /** Absolute index into the full dataset for a rendered mark. */
383
+ resolveDatumIndex(mark: M): number;
384
+ /** `config[key].label` when the chart config names the series, else the key. */
385
+ seriesLabel(seriesKey: string): string;
386
+ /** The four handlers a chart template binds. */
387
+ pointAriaLabel(mark: M): string;
388
+ emitClick(mark: M): void;
389
+ /**
390
+ * Accepts a pointer gesture as well as keyboard focus: a chart whose marks are
391
+ * the only hover surface (scatter has no `ChartPointerTracker`) has nothing
392
+ * else to publish an active point from.
393
+ */
394
+ setActivePoint(event: PointerEvent | FocusEvent, mark: M): void;
395
+ clearActivePoint(): void;
396
+ }
397
+ /**
398
+ * Build the shared cartesian scaffolding.
399
+ *
400
+ * MUST be called in an injection context, so a field initializer or the
401
+ * constructor: it injects `ChartContext` and creates one `effect`.
402
+ */
403
+ declare function setupCartesianChart<M extends CartesianMark, E>(options: CartesianChartOptions<M, E>): CartesianChartSetup<M>;
404
+
405
+ /**
406
+ * The scaffolding every polar chart needs, in one place.
407
+ *
408
+ * The sibling of {@link setupCartesianChart} for the charts that draw around a
409
+ * centre rather than along two axes. Pie, radar, and radial each hand-rolled the
410
+ * same four geometry computeds and the same active-point handler — around 90
411
+ * duplicated lines — and every copy of the handler re-derived the element
412
+ * rectangle inline even though `elementClientCenter` already existed.
413
+ *
414
+ * What stays per chart is what genuinely differs: the layout computation, the
415
+ * centring transform it produces, and the click payload. A polar chart has no
416
+ * viewport, no orientation, and nothing to publish downstream, so unlike the
417
+ * cartesian setup this one owns no effect.
418
+ */
419
+ /**
420
+ * The minimum a rendered mark must expose to take part in the shared
421
+ * active-point plumbing. `PieSliceRect` and `RadialBarRect` already satisfy it
422
+ * structurally; radar builds one per dot from its axis index.
423
+ *
424
+ * A polar chart draws its whole dataset at once, so there is no visible window
425
+ * and `datumIndex` is always absolute.
426
+ */
427
+ interface PolarMark {
428
+ readonly seriesKey: string;
429
+ readonly datumIndex: number;
430
+ }
431
+ interface PolarChartOptions {
432
+ /** The chart's `margin` input. */
433
+ readonly margin: () => ChartMargin;
434
+ }
435
+ interface PolarChartSetup {
436
+ /** Plot width, margins removed, never negative. */
437
+ readonly innerWidth: Signal<number>;
438
+ /** Plot height, margins removed, never negative. */
439
+ readonly innerHeight: Signal<number>;
440
+ /** `viewBox` for the outer svg, in RAW dimensions (not the inner geometry). */
441
+ readonly viewBox: Signal<string>;
442
+ /** `transform` that moves the inner group inside the margins. */
443
+ readonly innerTransform: Signal<string>;
444
+ /** `config[key].label` when the chart config names the series, else the key. */
445
+ seriesLabel(seriesKey: string): string;
446
+ /** The two handlers a chart template binds. */
447
+ setActivePoint(event: PointerEvent | FocusEvent, mark: PolarMark): void;
448
+ clearActivePoint(): void;
449
+ }
450
+ /**
451
+ * Build the shared polar scaffolding.
452
+ *
453
+ * MUST be called in an injection context, so a field initializer or the
454
+ * constructor: it injects `ChartContext`.
455
+ */
456
+ declare function setupPolarChart(options: PolarChartOptions): PolarChartSetup;
457
+
458
+ /** Pixel dimensions of the chart render area. */
459
+ interface ChartDimensions {
460
+ readonly width: number;
461
+ readonly height: number;
462
+ }
463
+ /** Active data point (for tooltip / crosshair) shared across primitives. */
464
+ interface ChartActivePoint {
465
+ readonly index: number;
466
+ readonly datumIndex?: number;
467
+ readonly seriesKey?: string;
468
+ readonly clientX?: number;
469
+ readonly clientY?: number;
470
+ }
471
+ /**
472
+ * Shared chart state provided by `ChartContainer` to all nested chart
473
+ * components (axes, grid, tooltip, legend, chart types).
474
+ *
475
+ * All state is exposed as signals so consumers can derive computed state
476
+ * (scales, visible series, tooltip position) without manual subscriptions.
477
+ */
478
+ declare class ChartContext {
479
+ /** Stable instance id — used in the `data-chart` attribute and CSS scope. */
480
+ readonly id: _angular_core.WritableSignal<string>;
481
+ /** User-provided series config. */
482
+ readonly config: _angular_core.WritableSignal<Readonly<Record<string, _ojiepermana_angular_chart_core.ChartSeriesConfig>>>;
483
+ /** Measured render-area dimensions (ResizeObserver-driven). */
484
+ readonly dimensions: _angular_core.WritableSignal<ChartDimensions>;
485
+ /** Currently highlighted data point (tooltip / crosshair). */
486
+ readonly activePoint: _angular_core.WritableSignal<ChartActivePoint | null>;
487
+ /** Series keys the user has toggled off via legend. */
488
+ readonly hiddenSeries: _angular_core.WritableSignal<ReadonlySet<string>>;
489
+ /** Ordered list of series keys (from `config`). */
490
+ readonly seriesKeys: Signal<readonly string[]>;
491
+ /** Series keys currently visible (config order minus `hiddenSeries`). */
492
+ readonly visibleSeriesKeys: Signal<readonly string[]>;
493
+ /** Toggle visibility of a series. */
494
+ toggleSeries(key: string): void;
495
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartContext, never>;
496
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChartContext>;
497
+ }
498
+
499
+ /**
500
+ * Emits a scoped `<style>` block mapping every series key in the current
501
+ * `ChartConfig` to a `--color-<key>` CSS custom property, scoped to
502
+ * `[data-chart="<id>"]`. Dark-mode values are scoped under `[data-mode="dark"]`.
503
+ *
504
+ * Implemented as an empty component that injects a real `<style>` element
505
+ * into its host via `Renderer2`. We avoid rendering `<style>` directly in a
506
+ * template — Angular hoists those into component CSS and strips
507
+ * interpolations from them.
508
+ *
509
+ * Consumers never instantiate this directly — `ChartContainer` renders it.
510
+ */
511
+ declare class ChartStyle {
512
+ private readonly ctx;
513
+ private readonly host;
514
+ private readonly renderer;
515
+ private styleEl;
516
+ protected readonly css: _angular_core.Signal<string>;
517
+ constructor();
518
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartStyle, never>;
519
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartStyle, "ChartStyle", never, {}, {}, never, never, true, never>;
520
+ }
521
+
522
+ /**
523
+ * Presentational style of a chart family.
524
+ *
525
+ * Every chart component exposes a `styles` input that defaults to `'base'`
526
+ * (the classic look). Families may widen this union with their own custom
527
+ * styles — e.g. the bar family adds `'dot'` for a dot-matrix rendering.
528
+ *
529
+ * Custom styles are implemented inside each chart family (not in the theme
530
+ * library) but must only use theme CSS variables (`--muted`, `--color-<key>`,
531
+ * …) so they follow the active theme automatically.
532
+ */
533
+ type ChartStyleVariant = 'base';
534
+ /**
535
+ * Resolve the effective chart style from the canonical `styleVariant` input and
536
+ * the deprecated `styles` input.
537
+ *
538
+ * `styleVariant` wins whenever it is bound, which is the only direction that is
539
+ * implementable: `styles` keeps its `'base'` default, so there is no way to tell
540
+ * an explicit `styles="base"` from an unset one. Giving `styleVariant` the
541
+ * `undefined` default leaves the deprecated input's emitted type untouched.
542
+ *
543
+ * The precedence rule lives here alone, so the seven chart families cannot drift
544
+ * from each other. The two `input()` calls themselves have to stay literal in
545
+ * each class body: the compiler discovers signal inputs by looking at the field
546
+ * initializer, and an `input()` hidden behind a helper is never registered.
547
+ */
548
+ declare function resolveChartStyle<T extends string>(styleVariant: () => T | undefined, styles: () => T): Signal<T>;
549
+
550
+ /**
551
+ * Root of every chart. Provides `ChartContext` to descendants, reflects the
552
+ * chart id via `data-chart`, injects the per-instance CSS-variable
553
+ * `<style>` block, and tracks its render-area dimensions via
554
+ * `ResizeObserver`.
555
+ *
556
+ * Usage:
557
+ * ```html
558
+ * <Chart [config]="cfg">
559
+ * <ChartBar [data]="data" />
560
+ * <ChartLegend />
561
+ * </Chart>
562
+ * ```
563
+ *
564
+ * The chart render area is laid out on top; any projected `<ChartLegend>` is
565
+ * rendered as a centered row beneath it. Render-area dimensions are measured on
566
+ * the chart area only, so the legend never shrinks the chart.
567
+ */
568
+ declare class ChartContainer {
569
+ protected readonly ctx: ChartContext;
570
+ private readonly zone;
571
+ private readonly platformId;
572
+ private readonly destroyRef;
573
+ private readonly areaRef;
574
+ /** Series configuration. Required for color / label resolution. */
575
+ readonly config: _angular_core.InputSignal<Readonly<Record<string, _ojiepermana_angular_chart_core.ChartSeriesConfig>>>;
576
+ /**
577
+ * Tailwind aspect-ratio utility for the chart render area. Defaults to
578
+ * `aspect-video` for cartesian charts; override with `aspect-square` for
579
+ * radial / pie layouts, or e.g. `aspect-auto h-80` for a fixed height.
580
+ */
581
+ readonly aspect: _angular_core.InputSignal<string>;
582
+ protected readonly areaClass: _angular_core.Signal<string>;
583
+ /**
584
+ * Optional explicit id override. When omitted, a stable auto-id is
585
+ * generated (`chart-<n>`), unique across the document.
586
+ */
587
+ readonly chartId: _angular_core.InputSignal<string | null>;
588
+ constructor();
589
+ private observeSize;
590
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartContainer, never>;
591
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartContainer, "Chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "aspect": { "alias": "aspect"; "required": false; "isSignal": true; }; "chartId": { "alias": "chartId"; "required": false; "isSignal": true; }; }, {}, never, ["*", "ChartLegend"], true, never>;
592
+ }
593
+
594
+ /** Screen-reader fallback for charts whose visual SVG is not tabular content. */
595
+ declare class ChartDataTable {
596
+ readonly data: _angular_core.InputSignal<readonly Readonly<Record<string, unknown>>[]>;
597
+ readonly columns: _angular_core.InputSignal<readonly string[]>;
598
+ readonly label: _angular_core.InputSignal<string>;
599
+ readonly rowHeaderKey: _angular_core.InputSignal<string | null>;
600
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartDataTable, never>;
601
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartDataTable, "ChartDataTable", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "rowHeaderKey": { "alias": "rowHeaderKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
602
+ }
603
+
604
+ /**
605
+ * Keeps dense SVG charts to one tab stop while preserving arrow-key access to
606
+ * every interactive mark. Marks are discovered by their `role="img"` and
607
+ * `tabindex` attributes so chart implementations do not need a shared base
608
+ * class or additional DOM wrappers.
609
+ */
610
+ declare class ChartRovingFocus {
611
+ private readonly host;
612
+ private readonly destroyRef;
613
+ private activeMark;
614
+ constructor();
615
+ protected onFocusIn(event: FocusEvent): void;
616
+ protected onKeydown(event: KeyboardEvent): void;
617
+ private marks;
618
+ private syncTabStops;
619
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartRovingFocus, never>;
620
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChartRovingFocus, "svg[ChartRovingFocus]", never, {}, {}, never, never, true, never>;
621
+ }
622
+
623
+ /**
624
+ * The focus treatment shared by every interactive chart mark.
625
+ *
626
+ * SVG shapes cannot carry the `ring-*` box-shadow the HTML controls use, so the
627
+ * indicator is painted as a stroke in the theme's dedicated `--ring` token,
628
+ * which is a near-black in light mode and a near-white in dark mode and so
629
+ * separates the focused mark from its own fill on either ground. The class
630
+ * takes precedence over the `stroke` presentation attribute a mark may already
631
+ * carry, which is why the emphasis strokes bound elsewhere do not have to know
632
+ * about focus at all.
633
+ *
634
+ * `outline-none` lives here rather than in the templates so the suppression and
635
+ * its replacement can never drift apart.
636
+ */
637
+ declare class ChartMarkFocus {
638
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartMarkFocus, never>;
639
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChartMarkFocus, "[ChartMarkFocus]", never, {}, {}, never, never, true, never>;
640
+ }
641
+
642
+ declare class ScatterViewportContext {
643
+ readonly innerWidth: _angular_core.WritableSignal<number>;
644
+ readonly innerHeight: _angular_core.WritableSignal<number>;
645
+ readonly fullXDomain: _angular_core.WritableSignal<NumericDomain | null>;
646
+ readonly fullYDomain: _angular_core.WritableSignal<NumericDomain | null>;
647
+ readonly zoomXDomain: _angular_core.WritableSignal<NumericDomain | null>;
648
+ readonly zoomYDomain: _angular_core.WritableSignal<NumericDomain | null>;
649
+ readonly xScale: _angular_core.WritableSignal<ScaleLinear<number, number, never> | null>;
650
+ readonly yScale: _angular_core.WritableSignal<ScaleLinear<number, number, never> | null>;
651
+ readonly hasZoom: _angular_core.Signal<boolean>;
652
+ resetZoom(): void;
653
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScatterViewportContext, never>;
654
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScatterViewportContext>;
655
+ }
656
+
657
+ /** A tick descriptor for rendering axes. */
658
+ interface ChartTick {
659
+ readonly value: string | number;
660
+ /** Offset (px) along the axis. For band scales this is the band center. */
661
+ readonly offset: number;
662
+ /** Display label. */
663
+ readonly label: string;
664
+ }
665
+ /** Produce evenly-spaced ticks for a band (categorical) scale. */
666
+ declare function bandTicks(scale: ScaleBand<string>): ChartTick[];
667
+ /**
668
+ * Produce ticks for a linear scale.
669
+ *
670
+ * @param scale The linear scale.
671
+ * @param count Approximate number of ticks (hint, d3 may return fewer/more).
672
+ * @param formatter Label formatter.
673
+ */
674
+ declare function linearTicks(scale: ScaleLinear<number, number>, count?: number, formatter?: (value: number) => string): ChartTick[];
675
+
676
+ interface ClientPoint {
677
+ readonly clientX: number;
678
+ readonly clientY: number;
679
+ }
680
+ /**
681
+ * Given a pointer event's local (x, y) relative to the chart's inner group,
682
+ * resolve the nearest category index along the categorical axis.
683
+ *
684
+ * @returns index into `ctx.categories()` (or −1 if no scale / no data).
685
+ */
686
+ declare function nearestCategoryIndex(ctx: Pick<CartesianContext, 'categoryScale' | 'categories' | 'orientation'>, localX: number, localY: number): number;
687
+ /** Resolve the client-space center point of a focused or clicked SVG/HTML element. */
688
+ declare function elementClientCenter(target: EventTarget | null): ClientPoint | null;
689
+ /**
690
+ * Where the tooltip should sit for whichever gesture activated a mark.
691
+ *
692
+ * A pointer carries a real cursor position, so the tooltip follows it. Keyboard
693
+ * focus carries none, and falls back to the centre of the mark that took focus.
694
+ */
695
+ declare function activationClientPoint(event: PointerEvent | FocusEvent): ClientPoint | null;
696
+
697
+ /**
698
+ * Read a numeric value from a datum, tolerating strings.
699
+ *
700
+ * Every layout in this library reads its numbers through here. Bar and line
701
+ * each used to carry their own identical copy while the polar and scatter
702
+ * layouts reached for a bare `Number(d[key] ?? 0)`, so the same dataset drew
703
+ * correctly as a bar chart and silently lost marks as a pie: `Number('n/a')`
704
+ * is `NaN`, and a `NaN` flows straight into the path data.
705
+ *
706
+ * Anything that is not a finite number or a parseable numeric string reads as
707
+ * `0`. That is the behaviour bar and line already shipped, so it is the one the
708
+ * rest of the family adopts.
709
+ */
710
+ declare function readNumber(datum: ChartDatum, key: string): number;
711
+
712
+ /** Curve type shared by line & area charts. */
713
+ type LineCurve = 'linear' | 'monotone' | 'step';
714
+ /** A single series ready to render as either a line or an area. */
715
+ interface LineSeriesPath {
716
+ readonly seriesKey: string;
717
+ readonly color: string;
718
+ readonly linePath: string;
719
+ /** Optional area path — only populated when `computeAreaLayout` is used. */
720
+ readonly areaPath?: string;
721
+ /** Raw points for dots / active markers. */
722
+ readonly points: readonly LinePoint[];
723
+ }
724
+ /** One resolved (x, y) point for a series. */
725
+ interface LinePoint {
726
+ readonly seriesKey: string;
727
+ readonly datumIndex: number;
728
+ readonly category: string;
729
+ readonly value: number;
730
+ readonly x: number;
731
+ readonly y: number;
732
+ }
733
+ interface CartesianBase {
734
+ readonly data: readonly ChartDatum[];
735
+ readonly xKey: string;
736
+ readonly seriesKeys: readonly string[];
737
+ readonly orientation: ChartOrientation;
738
+ readonly innerWidth: number;
739
+ readonly innerHeight: number;
740
+ readonly curve: LineCurve;
741
+ }
742
+ interface LineLayoutResult {
743
+ readonly series: readonly LineSeriesPath[];
744
+ readonly points: readonly LinePoint[];
745
+ readonly categoryScale: ReturnType<typeof scalePoint<string>>;
746
+ readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;
747
+ readonly categories: readonly string[];
748
+ }
749
+ interface AreaLayoutResult extends LineLayoutResult {
750
+ readonly stacked: boolean;
751
+ }
752
+ /** Build category + value scales for point-based charts (line / area). */
753
+ declare function buildCartesianScales(input: CartesianBase): {
754
+ categories: readonly string[];
755
+ categoryScale: ReturnType<typeof scalePoint<string>>;
756
+ valueScale: ReturnType<typeof scaleLinear<number, number>>;
757
+ };
758
+ /** Compute line-chart geometry. */
759
+ declare function computeLineLayout(input: CartesianBase): LineLayoutResult;
760
+ interface AreaLayoutInput extends CartesianBase {
761
+ readonly stacked: boolean;
762
+ readonly expanded?: boolean;
763
+ }
764
+ /** Compute area-chart geometry (single or stacked). */
765
+ declare function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult;
766
+
767
+ /**
768
+ * Publish a `scalePoint` from line/area layouts to the `CartesianContext`,
769
+ * which expects a `scaleBand`. Line/area points sit on the range edges (the
770
+ * point scale has zero padding, so the first point touches the y-axis and the
771
+ * last touches the right edge). We extend the band range by half a step on
772
+ * each side so band centers — used to position axis ticks — line up exactly
773
+ * with those edge-touching points.
774
+ *
775
+ * This keeps axes/grid primitives agnostic to whether the underlying chart
776
+ * uses `scaleBand` (bar) or `scalePoint` (line/area).
777
+ */
778
+ declare function pointToBandAdapter(pointScale: ScalePoint<string>, range: [number, number]): ReturnType<typeof scaleBand<string>>;
779
+ /** Recreate a linear scale with the same domain/range (handy for effects). */
780
+ declare function cloneLinear(scale: ReturnType<typeof scaleLinear<number, number>>): ReturnType<typeof scaleLinear<number, number>>;
781
+ declare function provideCartesianFromLineLayout(ctx: CartesianContext, layout: {
782
+ categoryScale: ScalePoint<string>;
783
+ valueScale: ReturnType<typeof scaleLinear<number, number>>;
784
+ categories: readonly string[];
785
+ }, orientation: 'vertical' | 'horizontal', innerWidth: number, innerHeight: number): void;
786
+
787
+ /**
788
+ * Resolves the live theme corner radius (the `--radius` token) in pixels for SVG
789
+ * chart geometry, and re-emits when the global `theme-radius` axis switches.
790
+ *
791
+ * SVG `rx`/`ry` need px numbers, so this reads the computed `--radius` off
792
+ * `<html>` and converts rem→px. A `MutationObserver` on the `<html theme-radius>`
793
+ * attribute keeps the `px` signal in sync with `ThemeRadiusService` at runtime;
794
+ * charts default their corner radius to this value (still overridable per chart).
795
+ *
796
+ * SSR-safe: with no document it returns the `md` fallback and skips observing.
797
+ */
798
+ declare class ChartThemeRadius {
799
+ private readonly document;
800
+ private readonly basePx;
801
+ /** Resolved base radius (`--radius`) in px; reactive to the theme-radius axis. */
802
+ readonly px: _angular_core.Signal<number>;
803
+ constructor();
804
+ private readBasePx;
805
+ private toPx;
806
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartThemeRadius, never>;
807
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChartThemeRadius>;
808
+ }
809
+
810
+ export { CHART_DATA_ATTRIBUTE, CHART_THEMES, CartesianContext, CategoricalViewportContext, ChartContainer, ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartStyle, ChartThemeRadius, ChartThemeSpace, DEFAULT_CARTESIAN_MARGIN, DEFAULT_CARTESIAN_MARGIN_UNITS, DEFAULT_POLAR_MARGIN, DEFAULT_POLAR_MARGIN_UNITS, DEFAULT_RADAR_MARGIN, DEFAULT_RADAR_MARGIN_UNITS, ScatterViewportContext, activationClientPoint, bandTicks, buildCartesianScales, buildChartCss, cloneLinear, computeAreaLayout, computeLineLayout, effectiveIndexRange, elementClientCenter, escapeCssIdent, indexRangeSize, isSafeCssColorValue, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, pointToBandAdapter, provideCartesianFromLineLayout, readNumber, resolveChartMargin, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, setupPolarChart, sliceByIndexRange, xScale, yScale, zeroBaselineDomain, zoomIndexRange, zoomNumericDomain };
811
+ export type { AreaLayoutInput, AreaLayoutResult, CartesianBase, CartesianChartOptions, CartesianChartSetup, CartesianMark, CategoryScale, ChartActivePoint, ChartConfig, ChartDatum, ChartDimensions, ChartIndexRange, ChartMargin, ChartOrientation, ChartPointClickEvent, ChartSeriesConfig, ChartStyleVariant, ChartThemeKey, ChartTick, ClientPoint, LineCurve, LineLayoutResult, LinePoint, LineSeriesPath, NumericDomain, PolarChartOptions, PolarChartSetup, PolarMark, ValueScale };