@ojiepermana/angular 22.1.11 → 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
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sdk = sdk;
4
+ exports.writeResult = writeResult;
5
+ const node_path_1 = require("node:path");
6
+ const loader_1 = require("../../src/config/loader");
7
+ const engine_1 = require("../../src/engine");
8
+ const OUTPUT_MANIFEST = '.ojiepermana-sdk-manifest.json';
9
+ const OUTPUT_MANIFEST_VERSION = 1;
10
+ /**
11
+ * Schematic factory. Reads `sdk.config.json` at the workspace root, runs the
12
+ * pure generator, and writes each emitted file into the Tree. Angular CLI
13
+ * `--dry-run` remains non-mutating; unmanaged file conflicts are never forced.
14
+ */
15
+ function sdk(options = {}) {
16
+ return async (tree, context) => {
17
+ const workspaceRoot = process.cwd();
18
+ const configPath = options.config ?? 'config/sdk.config.json';
19
+ const targets = (0, loader_1.loadConfig)(configPath, workspaceRoot);
20
+ const selected = selectTargets(targets, options.target);
21
+ if (selected.length === 0) {
22
+ throw new Error(`No SDK targets matched "${options.target}"`);
23
+ }
24
+ for (const target of selected) {
25
+ const result = await (0, engine_1.generate)(target, workspaceRoot);
26
+ writeResult(tree, workspaceRoot, result, context);
27
+ }
28
+ };
29
+ }
30
+ function selectTargets(targets, selector) {
31
+ if (!selector)
32
+ return [...targets];
33
+ const idx = Number.parseInt(selector, 10);
34
+ if (!Number.isNaN(idx) && idx > 0 && idx <= targets.length) {
35
+ return [targets[idx - 1]];
36
+ }
37
+ const lc = selector.toLowerCase();
38
+ return targets.filter((t) => t.clientName.toLowerCase() === lc ||
39
+ t.output.toLowerCase().includes(lc) ||
40
+ t.packageName.toLowerCase() === lc);
41
+ }
42
+ function writeResult(tree, workspaceRoot, result, context) {
43
+ const outputRoot = validateOutputDirectory(workspaceRoot, result.outputDir);
44
+ const files = validateGeneratedFiles(result);
45
+ const relOutput = (0, node_path_1.relative)((0, node_path_1.resolve)(workspaceRoot), (0, node_path_1.resolve)(result.outputDir));
46
+ context.logger.info(`[sdk] ${result.target.mode} → ${relOutput} ` +
47
+ `(schemas=${result.stats.schemas}, operations=${result.stats.operations}, ` +
48
+ `tags=${result.stats.tags}, files=${result.stats.files})`);
49
+ const manifestPath = `${outputRoot}/${OUTPUT_MANIFEST}`;
50
+ const previousFiles = readManifest(tree, manifestPath);
51
+ const nextFiles = new Set(files.map((file) => file.path));
52
+ assertWritableFiles(tree, outputRoot, files, previousFiles);
53
+ removeStaleFiles(tree, outputRoot, previousFiles, nextFiles);
54
+ for (const file of files) {
55
+ const treePath = `${outputRoot}/${file.path}`;
56
+ const buffer = Buffer.from(file.content, 'utf8');
57
+ if (tree.exists(treePath)) {
58
+ tree.overwrite(treePath, buffer);
59
+ }
60
+ else {
61
+ tree.create(treePath, buffer);
62
+ }
63
+ }
64
+ const manifest = {
65
+ version: OUTPUT_MANIFEST_VERSION,
66
+ files: [...nextFiles].sort(),
67
+ };
68
+ const manifestBuffer = Buffer.from(`${JSON.stringify(manifest, null, 2)}\n`, 'utf8');
69
+ if (tree.exists(manifestPath)) {
70
+ tree.overwrite(manifestPath, manifestBuffer);
71
+ }
72
+ else {
73
+ tree.create(manifestPath, manifestBuffer);
74
+ }
75
+ }
76
+ function validateOutputDirectory(workspaceRoot, outputDir) {
77
+ const workspace = (0, node_path_1.resolve)(workspaceRoot);
78
+ const output = (0, node_path_1.resolve)(outputDir);
79
+ const rel = (0, node_path_1.relative)(workspace, output);
80
+ if (!rel) {
81
+ throw new Error('SDK output must be a directory below the workspace root, not the workspace root itself.');
82
+ }
83
+ if (rel === '..' ||
84
+ rel.startsWith(`..${process.platform === 'win32' ? '\\' : '/'}`) ||
85
+ (0, node_path_1.isAbsolute)(rel)) {
86
+ throw new Error(`SDK output must stay inside the workspace root: "${outputDir}".`);
87
+ }
88
+ const posix = rel.split(/\\+/).join('/');
89
+ const protectedSegment = posix
90
+ .split('/')
91
+ .find((segment) => segment === '.git' || segment === 'node_modules');
92
+ if (protectedSegment) {
93
+ throw new Error(`SDK output cannot be written inside ${protectedSegment}.`);
94
+ }
95
+ return `/${posix}`;
96
+ }
97
+ function validateGeneratedFiles(result) {
98
+ const seen = new Set();
99
+ return result.files.map((file) => {
100
+ const path = normalizeVirtualPath(file.path);
101
+ if (path === OUTPUT_MANIFEST) {
102
+ throw new Error(`Generated SDK output cannot use the reserved path "${OUTPUT_MANIFEST}".`);
103
+ }
104
+ if (seen.has(path)) {
105
+ throw new Error(`Generated SDK output contains the duplicate path "${path}".`);
106
+ }
107
+ seen.add(path);
108
+ return { ...file, path };
109
+ });
110
+ }
111
+ function normalizeVirtualPath(path) {
112
+ const posix = path.replace(/\\/g, '/');
113
+ const segments = posix.split('/');
114
+ if (!posix ||
115
+ posix.startsWith('/') ||
116
+ /^[a-zA-Z]:/.test(posix) ||
117
+ segments.some((segment) => !segment || segment === '.' || segment === '..')) {
118
+ throw new Error(`Generated SDK file path must be a safe relative path: "${path}".`);
119
+ }
120
+ return posix;
121
+ }
122
+ function readManifest(tree, manifestPath) {
123
+ const content = tree.read(manifestPath);
124
+ if (!content)
125
+ return new Set();
126
+ let manifest;
127
+ try {
128
+ manifest = JSON.parse(content.toString('utf8'));
129
+ }
130
+ catch {
131
+ throw new Error(`SDK output manifest is not valid JSON: "${manifestPath}".`);
132
+ }
133
+ if (!isOutputManifest(manifest)) {
134
+ throw new Error(`SDK output manifest has an unsupported format: "${manifestPath}".`);
135
+ }
136
+ const files = new Set();
137
+ for (const file of manifest.files) {
138
+ const path = normalizeVirtualPath(file);
139
+ if (path === OUTPUT_MANIFEST || files.has(path)) {
140
+ throw new Error(`SDK output manifest contains an invalid or duplicate path: "${file}".`);
141
+ }
142
+ files.add(path);
143
+ }
144
+ return files;
145
+ }
146
+ function isOutputManifest(value) {
147
+ if (!value || typeof value !== 'object')
148
+ return false;
149
+ const candidate = value;
150
+ return (candidate.version === OUTPUT_MANIFEST_VERSION &&
151
+ Array.isArray(candidate.files) &&
152
+ candidate.files.every((file) => typeof file === 'string'));
153
+ }
154
+ function removeStaleFiles(tree, outputRoot, previousFiles, nextFiles) {
155
+ for (const previousFile of previousFiles) {
156
+ if (nextFiles.has(previousFile))
157
+ continue;
158
+ const staleFile = `${outputRoot}/${previousFile}`;
159
+ if (tree.exists(staleFile)) {
160
+ tree.delete(staleFile);
161
+ }
162
+ }
163
+ }
164
+ function assertWritableFiles(tree, outputRoot, files, previousFiles) {
165
+ for (const file of files) {
166
+ const treePath = `${outputRoot}/${file.path}`;
167
+ if (!tree.exists(treePath) || previousFiles.has(file.path))
168
+ continue;
169
+ const nextContent = Buffer.from(file.content, 'utf8');
170
+ if (!tree.read(treePath)?.equals(nextContent)) {
171
+ throw new Error(`Refusing to overwrite unmanaged SDK output "${file.path}". ` +
172
+ `Move the file or add it to ${OUTPUT_MANIFEST} only if the generator owns it.`);
173
+ }
174
+ }
175
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "SdkGeneratorSchema",
4
+ "title": "Generate an Angular SDK from an OpenAPI spec",
5
+ "type": "object",
6
+ "properties": {
7
+ "config": {
8
+ "type": "string",
9
+ "description": "Path to sdk.config.json (defaults to ./config/sdk.config.json at workspace root).",
10
+ "default": "config/sdk.config.json"
11
+ },
12
+ "target": {
13
+ "type": "string",
14
+ "description": "Optional name/index of a specific target in the config to generate."
15
+ }
16
+ },
17
+ "required": [],
18
+ "additionalProperties": false
19
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "./node_modules/@ojiepermana/angular/sdk/schematics/sdk/schema.json",
3
+ "targets": [
4
+ {
5
+ "input": "./openapi.yaml",
6
+ "output": "./sdk",
7
+ "mode": "library",
8
+ "clientName": "Api",
9
+ "packageName": "@my-scope/sdk",
10
+ "packageVersion": "0.0.1",
11
+ "rootUrl": "",
12
+ "splitByDomain": true,
13
+ "splitDepth": "service",
14
+ "features": {
15
+ "models": true,
16
+ "operations": true,
17
+ "services": true,
18
+ "client": true,
19
+ "metadata": true,
20
+ "navigation": true
21
+ }
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadConfig = loadConfig;
4
+ const node_fs_1 = require("node:fs");
5
+ const node_module_1 = require("node:module");
6
+ const node_path_1 = require("node:path");
7
+ const schema_1 = require("./schema");
8
+ /**
9
+ * Loads an SDK generator config from disk. Supports `.json` and `.js`/`.cjs`
10
+ * (require-based). `.ts` is intentionally not supported in the first iteration
11
+ * to avoid pulling an extra compile step — use `.json` or `.js` instead.
12
+ */
13
+ function loadConfig(configPath, workspaceRoot) {
14
+ const absolute = (0, node_path_1.isAbsolute)(configPath) ? configPath : (0, node_path_1.resolve)(workspaceRoot, configPath);
15
+ if (!(0, node_fs_1.existsSync)(absolute)) {
16
+ throw new Error(`SDK config not found at ${absolute}`);
17
+ }
18
+ const ext = (0, node_path_1.extname)(absolute).toLowerCase();
19
+ let raw;
20
+ if (ext === '.json' || ext === '') {
21
+ const text = (0, node_fs_1.readFileSync)(absolute, 'utf8');
22
+ raw = JSON.parse(stripJsonComments(text));
23
+ }
24
+ else if (ext === '.js' || ext === '.cjs') {
25
+ const requireFromWorkspace = (0, node_module_1.createRequire)((0, node_path_1.resolve)(workspaceRoot, 'package.json'));
26
+ const mod = requireFromWorkspace(absolute);
27
+ raw = extractDefaultExport(mod);
28
+ }
29
+ else {
30
+ throw new Error(`Unsupported SDK config extension: ${ext} (use .json or .js)`);
31
+ }
32
+ return (0, schema_1.resolveConfig)(raw);
33
+ }
34
+ function extractDefaultExport(mod) {
35
+ if (mod && typeof mod === 'object' && 'default' in mod) {
36
+ return mod.default;
37
+ }
38
+ return mod;
39
+ }
40
+ function stripJsonComments(text) {
41
+ // Minimal JSONC support: strip // line comments and /* */ block comments.
42
+ return text.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(^|[^:])\/\/.*$/gm, '$1');
43
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * Public config shape for the SDK generator.
4
+ *
5
+ * Users place an `sdk.config.json` at the workspace root describing one or more
6
+ * generation targets. All paths are resolved relative to the workspace root
7
+ * (i.e. the directory containing the config file).
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.resolveTarget = resolveTarget;
11
+ exports.resolveConfig = resolveConfig;
12
+ const template_1 = require("../render/template");
13
+ const DEFAULT_BANNER = '/* eslint-disable */\n/* Auto-generated by @ojiepermana/angular/sdk. DO NOT EDIT. */';
14
+ const DEFAULT_FEATURES = {
15
+ models: true,
16
+ operations: true,
17
+ services: true,
18
+ client: true,
19
+ metadata: true,
20
+ navigation: true,
21
+ resources: false,
22
+ };
23
+ function resolveTarget(raw) {
24
+ if (!raw || typeof raw !== 'object') {
25
+ throw new Error('Invalid target: expected object');
26
+ }
27
+ if (!raw.input)
28
+ throw new Error('Target is missing required "input"');
29
+ if (!raw.output)
30
+ throw new Error('Target is missing required "output"');
31
+ const mode = raw.mode ?? 'standalone';
32
+ if (!['standalone', 'library', 'secondary-entrypoint'].includes(mode)) {
33
+ throw new Error(`Invalid target mode: ${mode}`);
34
+ }
35
+ const splitByDomain = raw.splitByDomain ?? mode === 'library';
36
+ return {
37
+ input: raw.input,
38
+ output: raw.output,
39
+ mode,
40
+ clientName: (0, template_1.safeIdentifier)(raw.clientName ?? 'Api'),
41
+ packageName: raw.packageName ?? '@local/sdk',
42
+ packageVersion: raw.packageVersion ?? '0.0.1',
43
+ rootUrl: raw.rootUrl,
44
+ features: { ...DEFAULT_FEATURES, ...(raw.features ?? {}) },
45
+ splitByDomain,
46
+ splitDepth: raw.splitDepth === 'tag' ? 'tag' : 'service',
47
+ banner: raw.banner ?? DEFAULT_BANNER,
48
+ };
49
+ }
50
+ function resolveConfig(raw) {
51
+ if (!raw || typeof raw !== 'object') {
52
+ throw new Error('Invalid SDK config: root must be an object');
53
+ }
54
+ const cfg = raw;
55
+ if (!Array.isArray(cfg.targets) || cfg.targets.length === 0) {
56
+ throw new Error('Invalid SDK config: "targets" must be a non-empty array');
57
+ }
58
+ return cfg.targets.map(resolveTarget);
59
+ }
@@ -0,0 +1,251 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emitClient = emitClient;
4
+ const template_1 = require("../render/template");
5
+ /**
6
+ * Emit the tiny runtime client primitives:
7
+ * - `api-configuration.ts` — root-url config + provider
8
+ * - `base-service.ts` — per-service rootUrl override
9
+ * - `strict-http-response.ts`— HttpResponse alias
10
+ * - `request-builder.ts` — minimal (path / query / header / body / build)
11
+ * - `api.ts` — `Api` helper with invoke() / invoke$Response()
12
+ *
13
+ * These files are **static** — identical across specs — so we embed them as
14
+ * template literals rather than parsing the IR. The only dynamic bits are the
15
+ * banner comment and the configured default `rootUrl`.
16
+ */
17
+ function emitClient(target) {
18
+ const defaultRootUrl = target.rootUrl ?? '';
19
+ return [
20
+ {
21
+ path: 'api-configuration.ts',
22
+ content: (0, template_1.finalize)(apiConfigurationFile(target, defaultRootUrl)),
23
+ },
24
+ { path: 'base-service.ts', content: (0, template_1.finalize)(baseServiceFile(target)) },
25
+ { path: 'strict-http-response.ts', content: (0, template_1.finalize)(strictResponseFile(target)) },
26
+ { path: 'request-builder.ts', content: (0, template_1.finalize)(requestBuilderFile(target)) },
27
+ { path: 'api.ts', content: (0, template_1.finalize)(apiFile(target)) },
28
+ ];
29
+ }
30
+ function apiConfigurationFile(target, rootUrl) {
31
+ return `${target.banner}
32
+
33
+ import { Service, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';
34
+
35
+ @Service()
36
+ export class ApiConfiguration {
37
+ rootUrl: string = ${JSON.stringify(rootUrl)};
38
+ }
39
+
40
+ export function provideApiConfiguration(rootUrl: string): EnvironmentProviders {
41
+ return makeEnvironmentProviders([
42
+ {
43
+ provide: ApiConfiguration,
44
+ useFactory: () => {
45
+ const c = new ApiConfiguration();
46
+ c.rootUrl = rootUrl;
47
+ return c;
48
+ },
49
+ },
50
+ ]);
51
+ }
52
+ `;
53
+ }
54
+ function baseServiceFile(target) {
55
+ return `${target.banner}
56
+
57
+ import { HttpClient } from '@angular/common/http';
58
+ import { Service, inject } from '@angular/core';
59
+
60
+ import { ApiConfiguration } from './api-configuration';
61
+
62
+ @Service()
63
+ export class BaseService {
64
+ protected readonly config = inject(ApiConfiguration);
65
+ protected readonly http = inject(HttpClient);
66
+
67
+ private _rootUrl?: string;
68
+
69
+ get rootUrl(): string {
70
+ return this._rootUrl ?? this.config.rootUrl;
71
+ }
72
+ set rootUrl(url: string) {
73
+ this._rootUrl = url;
74
+ }
75
+ }
76
+ `;
77
+ }
78
+ function strictResponseFile(target) {
79
+ return `${target.banner}
80
+
81
+ import { HttpResponse } from '@angular/common/http';
82
+
83
+ export type StrictHttpResponse<T> = HttpResponse<T> & { readonly body: T };
84
+ `;
85
+ }
86
+ /**
87
+ * Minimal request builder — intentionally drops the style/explode serializer
88
+ * from ng-openapi-gen's output. Covers the 99% case: path templating, simple
89
+ * query params (with array → repeated key), JSON body, and header params.
90
+ */
91
+ function requestBuilderFile(target) {
92
+ return `${target.banner}
93
+
94
+ import {
95
+ HttpContext,
96
+ HttpHeaders,
97
+ HttpParams,
98
+ HttpRequest,
99
+ } from '@angular/common/http';
100
+
101
+ export interface BuildOptions {
102
+ accept?: string;
103
+ responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
104
+ reportUploadProgress?: boolean;
105
+ reportDownloadProgress?: boolean;
106
+ context?: HttpContext;
107
+ }
108
+
109
+ export class RequestBuilder {
110
+ private readonly _pathParams = new Map<string, unknown>();
111
+ private readonly _queryParams = new Map<string, unknown>();
112
+ private readonly _headerParams = new Map<string, unknown>();
113
+ private _body: unknown = undefined;
114
+ private _bodyContentType: string | undefined;
115
+
116
+ constructor(
117
+ public readonly rootUrl: string,
118
+ public readonly operationPath: string,
119
+ public readonly method: string,
120
+ ) {}
121
+
122
+ path(name: string, value: unknown): void {
123
+ this._pathParams.set(name, value);
124
+ }
125
+
126
+ query(name: string, value: unknown): void {
127
+ this._queryParams.set(name, value);
128
+ }
129
+
130
+ header(name: string, value: unknown): void {
131
+ this._headerParams.set(name, value);
132
+ }
133
+
134
+ body(value: unknown, contentType = 'application/json'): void {
135
+ if (value instanceof Blob) {
136
+ this._bodyContentType = value.type;
137
+ } else if (value instanceof FormData) {
138
+ // FormData sets its own Content-Type (with boundary) — leave it alone.
139
+ this._bodyContentType = undefined;
140
+ } else {
141
+ this._bodyContentType = contentType;
142
+ }
143
+ this._body = value;
144
+ }
145
+
146
+ build<T = unknown>(options: BuildOptions = {}): HttpRequest<T> {
147
+ let path = this.operationPath;
148
+ for (const [name, value] of this._pathParams) {
149
+ path = path.replace(
150
+ '{' + name + '}',
151
+ encodeURIComponent(value == null ? '' : String(value)),
152
+ );
153
+ }
154
+
155
+ let params = new HttpParams();
156
+ for (const [name, value] of this._queryParams) {
157
+ if (value === undefined || value === null) continue;
158
+ if (Array.isArray(value)) {
159
+ for (const v of value) {
160
+ if (v !== undefined && v !== null) params = params.append(name, String(v));
161
+ }
162
+ } else {
163
+ params = params.append(name, String(value));
164
+ }
165
+ }
166
+
167
+ let headers = new HttpHeaders();
168
+ if (options.accept) headers = headers.set('Accept', options.accept);
169
+ for (const [name, value] of this._headerParams) {
170
+ if (value === undefined || value === null) continue;
171
+ if (Array.isArray(value)) {
172
+ for (const v of value) headers = headers.append(name, String(v));
173
+ } else {
174
+ headers = headers.set(name, String(value));
175
+ }
176
+ }
177
+ if (this._bodyContentType) {
178
+ headers = headers.set('Content-Type', this._bodyContentType);
179
+ }
180
+
181
+ return new HttpRequest<T>(
182
+ this.method.toUpperCase(),
183
+ this.rootUrl + path,
184
+ this._body as T,
185
+ {
186
+ params,
187
+ headers,
188
+ responseType: options.responseType,
189
+ reportUploadProgress: options.reportUploadProgress,
190
+ reportDownloadProgress: options.reportDownloadProgress,
191
+ context: options.context,
192
+ },
193
+ );
194
+ }
195
+ }
196
+ `;
197
+ }
198
+ function apiFile(target) {
199
+ return `${target.banner}
200
+
201
+ import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
202
+ import { Service, inject } from '@angular/core';
203
+ import { Observable } from 'rxjs';
204
+ import { filter, map } from 'rxjs/operators';
205
+
206
+ import { ApiConfiguration } from './api-configuration';
207
+ import { StrictHttpResponse } from './strict-http-response';
208
+
209
+ export type ApiFn<P, R> = (
210
+ http: HttpClient,
211
+ rootUrl: string,
212
+ params: P,
213
+ context?: HttpContext,
214
+ ) => Observable<StrictHttpResponse<R>>;
215
+
216
+ /**
217
+ * Helper to invoke any tree-shakeable operation function directly.
218
+ */
219
+ @Service()
220
+ export class ${target.clientName} {
221
+ private readonly config = inject(ApiConfiguration);
222
+ private readonly http = inject(HttpClient);
223
+
224
+ private _rootUrl?: string;
225
+
226
+ get rootUrl(): string {
227
+ return this._rootUrl ?? this.config.rootUrl;
228
+ }
229
+ set rootUrl(url: string) {
230
+ this._rootUrl = url;
231
+ }
232
+
233
+ /** Invoke an operation function and stream the response body. */
234
+ invoke<P, R>(fn: ApiFn<P, R>, params: P, context?: HttpContext): Observable<R> {
235
+ return this.invoke$Response(fn, params, context).pipe(map((r) => r.body));
236
+ }
237
+
238
+ /** Invoke an operation function and stream the full HTTP response. */
239
+ invoke$Response<P, R>(
240
+ fn: ApiFn<P, R>,
241
+ params: P,
242
+ context?: HttpContext,
243
+ ): Observable<StrictHttpResponse<R>> {
244
+ return fn(this.http, this.rootUrl, params, context).pipe(
245
+ filter((r: unknown): r is HttpResponse<unknown> => r instanceof HttpResponse),
246
+ map((r) => r as StrictHttpResponse<R>),
247
+ );
248
+ }
249
+ }
250
+ `;
251
+ }