@nikkory/vibe-engine 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/PUBLISH-GUIDE.md +250 -0
  2. package/README.md +1267 -0
  3. package/bin/vibe.js +22 -0
  4. package/dist/adapters/index.d.ts +19 -0
  5. package/dist/browser.d.ts +25 -0
  6. package/dist/browser.js +15083 -0
  7. package/dist/browser.mjs +15000 -0
  8. package/dist/cli/batch-command.d.ts +142 -0
  9. package/dist/cli/generate-command.d.ts +119 -0
  10. package/dist/cli/index.d.ts +34 -0
  11. package/dist/constants/ComponentTypes.d.ts +65 -0
  12. package/dist/constants/DesignSystems.d.ts +64 -0
  13. package/dist/constants/Frameworks.d.ts +71 -0
  14. package/dist/constants/Tiers.d.ts +72 -0
  15. package/dist/constants/index.d.ts +10 -0
  16. package/dist/converters/index.d.ts +12 -0
  17. package/dist/converters/section-converter.d.ts +176 -0
  18. package/dist/index.d.ts +58 -0
  19. package/dist/index.js +19819 -0
  20. package/dist/index.mjs +19496 -0
  21. package/dist/resolution/basic/groups-basic.d.ts +80 -0
  22. package/dist/resolution/basic/index.d.ts +21 -0
  23. package/dist/resolution/basic/intents-basic.d.ts +195 -0
  24. package/dist/resolution/basic/presets-basic.d.ts +96 -0
  25. package/dist/resolution/basic/resolver-basic.d.ts +127 -0
  26. package/dist/resolution/basic/shorthands-basic.d.ts +88 -0
  27. package/dist/resolution/core/groups-core.d.ts +160 -0
  28. package/dist/resolution/core/index.d.ts +21 -0
  29. package/dist/resolution/core/intents-core.d.ts +355 -0
  30. package/dist/resolution/core/presets-core.d.ts +160 -0
  31. package/dist/resolution/core/resolver-core.d.ts +207 -0
  32. package/dist/resolution/core/shorthands-core.d.ts +144 -0
  33. package/dist/resolution/core/types-core.d.ts +167 -0
  34. package/dist/resolution/debugger.d.ts +183 -0
  35. package/dist/resolution/demo.d.ts +57 -0
  36. package/dist/resolution/enterprise/index.d.ts +22 -0
  37. package/dist/resolution/enterprise/metrics.d.ts +152 -0
  38. package/dist/resolution/enterprise/resolver-enterprise.d.ts +108 -0
  39. package/dist/resolution/examples.d.ts +486 -0
  40. package/dist/resolution/groups/experience-group.d.ts +197 -0
  41. package/dist/resolution/groups/index.d.ts +196 -0
  42. package/dist/resolution/groups/layout-group.d.ts +192 -0
  43. package/dist/resolution/groups/motion-group.d.ts +127 -0
  44. package/dist/resolution/groups/visual-group.d.ts +146 -0
  45. package/dist/resolution/index.d.ts +41 -0
  46. package/dist/resolution/intents/button-intents.d.ts +231 -0
  47. package/dist/resolution/intents/card-intents.d.ts +177 -0
  48. package/dist/resolution/intents/feedback-intents.d.ts +222 -0
  49. package/dist/resolution/intents/index.d.ts +189 -0
  50. package/dist/resolution/intents/input-intents.d.ts +231 -0
  51. package/dist/resolution/intents/mood-modifiers.d.ts +154 -0
  52. package/dist/resolution/performance.d.ts +264 -0
  53. package/dist/resolution/presets/button-presets.d.ts +243 -0
  54. package/dist/resolution/presets/card-presets.d.ts +216 -0
  55. package/dist/resolution/presets/data-display-presets.d.ts +290 -0
  56. package/dist/resolution/presets/feedback-presets.d.ts +335 -0
  57. package/dist/resolution/presets/form-presets.d.ts +308 -0
  58. package/dist/resolution/presets/index.d.ts +22 -0
  59. package/dist/resolution/presets/input-presets.d.ts +207 -0
  60. package/dist/resolution/presets/nav-presets.d.ts +235 -0
  61. package/dist/resolution/presets/overlay-presets.d.ts +216 -0
  62. package/dist/resolution/presets/preset-registry.d.ts +212 -0
  63. package/dist/resolution/resolveProps.d.ts +235 -0
  64. package/dist/resolution/shorthand/feel-mappings.d.ts +140 -0
  65. package/dist/resolution/shorthand/index.d.ts +172 -0
  66. package/dist/resolution/shorthand/look-mappings.d.ts +107 -0
  67. package/dist/resolution/shorthand/spacing-mappings.d.ts +164 -0
  68. package/dist/resolution/shorthand/surface-mappings.d.ts +139 -0
  69. package/dist/resolution/standard/groups-standard.d.ts +98 -0
  70. package/dist/resolution/standard/index.d.ts +28 -0
  71. package/dist/resolution/standard/intents-standard.d.ts +232 -0
  72. package/dist/resolution/standard/presets-standard.d.ts +123 -0
  73. package/dist/resolution/standard/resolver-standard.d.ts +204 -0
  74. package/dist/resolution/standard/shorthands-standard.d.ts +98 -0
  75. package/dist/resolution/standard/validators.d.ts +141 -0
  76. package/dist/resolution/types.d.ts +461 -0
  77. package/dist/resolution/validators/factor24-validator.d.ts +418 -0
  78. package/dist/resolution/validators/index.d.ts +14 -0
  79. package/dist/scripts/generate-react-library.d.ts +15 -0
  80. package/dist/scripts/write-react-library.d.ts +18 -0
  81. package/dist/storage/cloud-sync.d.ts +182 -0
  82. package/dist/storage/index.d.ts +69 -0
  83. package/dist/storage/local-storage.d.ts +131 -0
  84. package/dist/storage/section-storage.d.ts +191 -0
  85. package/dist/styling/StyleGenerator.d.ts +76 -0
  86. package/dist/styling/TokenStyleResolver.d.ts +163 -0
  87. package/dist/styling/factor-migration.d.ts +192 -0
  88. package/dist/styling/factor-validators.d.ts +327 -0
  89. package/dist/styling/factors-1-6.d.ts +674 -0
  90. package/dist/styling/factors-12-16.d.ts +700 -0
  91. package/dist/styling/factors-17-24.d.ts +668 -0
  92. package/dist/styling/factors-all.d.ts +348 -0
  93. package/dist/styling/factors.d.ts +291 -0
  94. package/dist/styling/index.d.ts +31 -0
  95. package/dist/styling/types.d.ts +400 -0
  96. package/dist/tokens/schema.d.ts +486 -0
  97. package/dist/types/Option.d.ts +178 -0
  98. package/dist/types/Result.d.ts +148 -0
  99. package/dist/types/algorithm-engine.types.d.ts +298 -0
  100. package/dist/types/granularity/base.types.d.ts +268 -0
  101. package/dist/types/granularity/config.types.d.ts +177 -0
  102. package/dist/types/granularity/factors.types.d.ts +194 -0
  103. package/dist/types/granularity/index.d.ts +57 -0
  104. package/dist/types/granularity/slot.types.d.ts +128 -0
  105. package/dist/types/granularity/template.types.d.ts +179 -0
  106. package/dist/types/granularity-levels/atom.config.d.ts +151 -0
  107. package/dist/types/granularity-levels/component.config.d.ts +175 -0
  108. package/dist/types/granularity-levels/index.d.ts +47 -0
  109. package/dist/types/granularity-levels/layout.config.d.ts +278 -0
  110. package/dist/types/granularity-levels/page.config.d.ts +210 -0
  111. package/dist/types/granularity-levels/section.config.d.ts +188 -0
  112. package/dist/types/granularity-levels/template.config.d.ts +340 -0
  113. package/dist/types/index.d.ts +152 -0
  114. package/dist/types/section-slot.types.d.ts +169 -0
  115. package/dist/types/section-storage.types.d.ts +298 -0
  116. package/dist/types/section-template.types.d.ts +170 -0
  117. package/dist/types/section.types.d.ts +326 -0
  118. package/dist/ui-studio/ComponentGenerator.d.ts +219 -0
  119. package/dist/ui-studio/composition/FactorPropagator.d.ts +268 -0
  120. package/dist/ui-studio/composition/PageGenerator.d.ts +176 -0
  121. package/dist/ui-studio/composition/SectionGenerator.d.ts +312 -0
  122. package/dist/ui-studio/composition/SlotResolver.d.ts +295 -0
  123. package/dist/ui-studio/composition/section-orchestrator.d.ts +306 -0
  124. package/dist/ui-studio/granularity/FactorCascade.d.ts +328 -0
  125. package/dist/ui-studio/granularity/GranularityGenerator.d.ts +266 -0
  126. package/dist/ui-studio/granularity/RecursiveGenerator.d.ts +328 -0
  127. package/dist/ui-studio/index.d.ts +94 -0
  128. package/dist/ui-studio/matrix/ClassMapper.d.ts +128 -0
  129. package/dist/ui-studio/matrix/MatrixResolver.d.ts +203 -0
  130. package/dist/ui-studio/matrix/types.d.ts +96 -0
  131. package/dist/ui-studio/presets/IndustryDetector.d.ts +183 -0
  132. package/dist/ui-studio/presets/component-registry.d.ts +213 -0
  133. package/dist/ui-studio/presets/factor-registry.d.ts +364 -0
  134. package/dist/ui-studio/presets/granularity-registry.d.ts +252 -0
  135. package/dist/ui-studio/presets/index.d.ts +32 -0
  136. package/dist/ui-studio/presets/industries.d.ts +143 -0
  137. package/dist/ui-studio/presets/layout-registry.d.ts +21 -0
  138. package/dist/ui-studio/presets/matrix-groups.d.ts +195 -0
  139. package/dist/ui-studio/presets/page-registry.d.ts +24 -0
  140. package/dist/ui-studio/presets/registry.constants.d.ts +69 -0
  141. package/dist/ui-studio/presets/registry.types.d.ts +166 -0
  142. package/dist/ui-studio/presets/section-defaults.d.ts +175 -0
  143. package/dist/ui-studio/presets/section-registry.d.ts +83 -0
  144. package/dist/ui-studio/presets/section-registry.defaults.d.ts +106 -0
  145. package/dist/ui-studio/presets/section-registry.helpers.d.ts +112 -0
  146. package/dist/ui-studio/presets/section-registry.types.d.ts +181 -0
  147. package/dist/ui-studio/presets/template-registry.d.ts +23 -0
  148. package/dist/ui-studio/presets/variants.d.ts +1038 -0
  149. package/dist/ui-studio/registries/components-registry.d.ts +193 -0
  150. package/dist/ui-studio/registries/design-systems-registry.d.ts +153 -0
  151. package/dist/ui-studio/registries/factors-registry.d.ts +145 -0
  152. package/dist/ui-studio/registries/tiers-registry.d.ts +150 -0
  153. package/dist/ui-studio/resolution/FactorResolver.d.ts +201 -0
  154. package/dist/ui-studio/templates/TestGenerator.d.ts +55 -0
  155. package/dist/ui-studio/templates/TierGenerator.d.ts +153 -0
  156. package/dist/ui-studio/templates/TypesGenerator.d.ts +51 -0
  157. package/dist/ui-studio/types/granularity/base.types.d.ts +268 -0
  158. package/dist/ui-studio/types/granularity/config.types.d.ts +177 -0
  159. package/dist/ui-studio/types/granularity/factors.types.d.ts +194 -0
  160. package/dist/ui-studio/types/granularity/index.d.ts +57 -0
  161. package/dist/ui-studio/types/granularity/slot.types.d.ts +128 -0
  162. package/dist/ui-studio/types/granularity/template.types.d.ts +179 -0
  163. package/dist/ui-studio/types/granularity-levels/atom.config.d.ts +151 -0
  164. package/dist/ui-studio/types/granularity-levels/component.config.d.ts +175 -0
  165. package/dist/ui-studio/types/granularity-levels/index.d.ts +47 -0
  166. package/dist/ui-studio/types/granularity-levels/layout.config.d.ts +278 -0
  167. package/dist/ui-studio/types/granularity-levels/page.config.d.ts +210 -0
  168. package/dist/ui-studio/types/granularity-levels/section.config.d.ts +188 -0
  169. package/dist/ui-studio/types/granularity-levels/template.config.d.ts +340 -0
  170. package/dist/ui-studio/types.d.ts +323 -0
  171. package/dist/utils/CodeUtils.d.ts +103 -0
  172. package/dist/utils/GenerateComponentValidator.d.ts +35 -0
  173. package/dist/utils/Logger.d.ts +101 -0
  174. package/dist/utils/StringUtils.d.ts +120 -0
  175. package/dist/utils/ValidationUtils.d.ts +71 -0
  176. package/dist/utils/errors/BaseError.d.ts +23 -0
  177. package/dist/utils/errors/GenerationError.d.ts +14 -0
  178. package/dist/utils/errors/TemplateNotFoundError.d.ts +13 -0
  179. package/dist/utils/errors/ValidationError.d.ts +13 -0
  180. package/dist/utils/errors/index.d.ts +12 -0
  181. package/dist/utils/factor-resolver.d.ts +294 -0
  182. package/dist/utils/granularity-helpers.d.ts +359 -0
  183. package/dist/utils/index.d.ts +20 -0
  184. package/dist/utils/performance.d.ts +26 -0
  185. package/dist/utils/stringify.d.ts +28 -0
  186. package/dist/validators/component-validator.d.ts +86 -0
  187. package/dist/validators/design-system-validator.d.ts +95 -0
  188. package/dist/validators/factor-validator.d.ts +101 -0
  189. package/dist/validators/index.d.ts +263 -0
  190. package/dist/validators/section-validator.d.ts +120 -0
  191. package/dist/validators/slot-validator.d.ts +161 -0
  192. package/dist/validators/tier-validator.d.ts +102 -0
  193. package/package.json +67 -0
  194. package/tests/16-factor-integration.test.d.ts +14 -0
  195. package/tests/16-factor-visual.test.d.ts +14 -0
  196. package/tests/5-level-integration.test.d.ts +14 -0
  197. package/tests/CodeUtils.test.d.ts +7 -0
  198. package/tests/DesignSystems.test.d.ts +7 -0
  199. package/tests/GenerateComponentValidator.test.d.ts +7 -0
  200. package/tests/Logger.test.d.ts +7 -0
  201. package/tests/StringUtils.test.d.ts +7 -0
  202. package/tests/StyleGenerator.test.d.ts +13 -0
  203. package/tests/Tiers.test.d.ts +7 -0
  204. package/tests/TokenRegistry.test.d.ts +14 -0
  205. package/tests/TokenStyleResolver.test.d.ts +13 -0
  206. package/tests/ValidationUtils.test.d.ts +7 -0
  207. package/tests/_pending_fix/Accordion.test.d.ts +13 -0
  208. package/tests/_pending_fix/Alert.test.d.ts +13 -0
  209. package/tests/_pending_fix/AlertDialog.test.d.ts +13 -0
  210. package/tests/_pending_fix/AspectRatio.test.d.ts +13 -0
  211. package/tests/_pending_fix/Autocomplete.test.d.ts +13 -0
  212. package/tests/_pending_fix/Avatar.test.d.ts +13 -0
  213. package/tests/_pending_fix/Badge.test.d.ts +13 -0
  214. package/tests/_pending_fix/Banner.test.d.ts +13 -0
  215. package/tests/_pending_fix/Box.test.d.ts +13 -0
  216. package/tests/_pending_fix/Breadcrumb.test.d.ts +13 -0
  217. package/tests/_pending_fix/Callout.test.d.ts +13 -0
  218. package/tests/_pending_fix/Card.test.d.ts +13 -0
  219. package/tests/_pending_fix/Center.test.d.ts +13 -0
  220. package/tests/_pending_fix/Checkbox.test.d.ts +13 -0
  221. package/tests/_pending_fix/Chip.test.d.ts +13 -0
  222. package/tests/_pending_fix/ColorPicker.test.d.ts +13 -0
  223. package/tests/_pending_fix/Combobox.test.d.ts +13 -0
  224. package/tests/_pending_fix/CommandPalette.test.d.ts +13 -0
  225. package/tests/_pending_fix/ConfirmationModal.test.d.ts +13 -0
  226. package/tests/_pending_fix/Container.test.d.ts +13 -0
  227. package/tests/_pending_fix/DataTable.test.d.ts +13 -0
  228. package/tests/_pending_fix/DatePicker.test.d.ts +13 -0
  229. package/tests/_pending_fix/DateRangePicker.test.d.ts +13 -0
  230. package/tests/_pending_fix/DateTimePicker.test.d.ts +13 -0
  231. package/tests/_pending_fix/Divider.test.d.ts +13 -0
  232. package/tests/_pending_fix/Drawer.test.d.ts +13 -0
  233. package/tests/_pending_fix/Dropdown.test.d.ts +13 -0
  234. package/tests/_pending_fix/EmptyState.test.d.ts +13 -0
  235. package/tests/_pending_fix/ErrorState.test.d.ts +13 -0
  236. package/tests/_pending_fix/FileDropzone.test.d.ts +13 -0
  237. package/tests/_pending_fix/FileUpload.test.d.ts +13 -0
  238. package/tests/_pending_fix/Flex.test.d.ts +13 -0
  239. package/tests/_pending_fix/Grid.test.d.ts +13 -0
  240. package/tests/_pending_fix/GridItem.test.d.ts +13 -0
  241. package/tests/_pending_fix/HStack.test.d.ts +13 -0
  242. package/tests/_pending_fix/Input.test.d.ts +13 -0
  243. package/tests/_pending_fix/InputCurrency.test.d.ts +13 -0
  244. package/tests/_pending_fix/InputGroup.test.d.ts +13 -0
  245. package/tests/_pending_fix/InputOTP.test.d.ts +13 -0
  246. package/tests/_pending_fix/InputPassword.test.d.ts +13 -0
  247. package/tests/_pending_fix/InputPhone.test.d.ts +13 -0
  248. package/tests/_pending_fix/InputSearch.test.d.ts +13 -0
  249. package/tests/_pending_fix/Link.test.d.ts +13 -0
  250. package/tests/_pending_fix/List.test.d.ts +13 -0
  251. package/tests/_pending_fix/LoadingOverlay.test.d.ts +13 -0
  252. package/tests/_pending_fix/Menu.test.d.ts +13 -0
  253. package/tests/_pending_fix/Modal.test.d.ts +13 -0
  254. package/tests/_pending_fix/MultiSelect.test.d.ts +13 -0
  255. package/tests/_pending_fix/NavGroup.test.d.ts +13 -0
  256. package/tests/_pending_fix/NavItem.test.d.ts +13 -0
  257. package/tests/_pending_fix/NavLink.test.d.ts +13 -0
  258. package/tests/_pending_fix/Navbar.test.d.ts +13 -0
  259. package/tests/_pending_fix/Notification.test.d.ts +13 -0
  260. package/tests/_pending_fix/NotificationBadge.test.d.ts +13 -0
  261. package/tests/_pending_fix/NumberInput.test.d.ts +13 -0
  262. package/tests/_pending_fix/Pagination.test.d.ts +13 -0
  263. package/tests/_pending_fix/Popover.test.d.ts +13 -0
  264. package/tests/_pending_fix/Progress.test.d.ts +13 -0
  265. package/tests/_pending_fix/ProgressCircle.test.d.ts +13 -0
  266. package/tests/_pending_fix/ProgressSteps.test.d.ts +13 -0
  267. package/tests/_pending_fix/Radio.test.d.ts +13 -0
  268. package/tests/_pending_fix/RangeSlider.test.d.ts +13 -0
  269. package/tests/_pending_fix/ResizablePanel.test.d.ts +13 -0
  270. package/tests/_pending_fix/ResultState.test.d.ts +13 -0
  271. package/tests/_pending_fix/ScrollArea.test.d.ts +13 -0
  272. package/tests/_pending_fix/Select.test.d.ts +14 -0
  273. package/tests/_pending_fix/Sheet.test.d.ts +13 -0
  274. package/tests/_pending_fix/Sidebar.test.d.ts +13 -0
  275. package/tests/_pending_fix/SimpleGrid.test.d.ts +13 -0
  276. package/tests/_pending_fix/Skeleton.test.d.ts +13 -0
  277. package/tests/_pending_fix/Slider.test.d.ts +13 -0
  278. package/tests/_pending_fix/Spacer.test.d.ts +13 -0
  279. package/tests/_pending_fix/Spinner.test.d.ts +13 -0
  280. package/tests/_pending_fix/Stack.test.d.ts +13 -0
  281. package/tests/_pending_fix/Stat.test.d.ts +13 -0
  282. package/tests/_pending_fix/Stepper.test.d.ts +14 -0
  283. package/tests/_pending_fix/Switch.test.d.ts +13 -0
  284. package/tests/_pending_fix/Table.test.d.ts +13 -0
  285. package/tests/_pending_fix/Tabs.test.d.ts +13 -0
  286. package/tests/_pending_fix/Textarea.test.d.ts +13 -0
  287. package/tests/_pending_fix/Timeline.test.d.ts +13 -0
  288. package/tests/_pending_fix/Toast.test.d.ts +14 -0
  289. package/tests/_pending_fix/Tooltip.test.d.ts +14 -0
  290. package/tests/_pending_fix/VStack.test.d.ts +13 -0
  291. package/tests/alert.test.d.ts +13 -0
  292. package/tests/badge.test.d.ts +13 -0
  293. package/tests/benchmarks/factor-resolution.bench.d.ts +41 -0
  294. package/tests/button.test.d.ts +16 -0
  295. package/tests/card.test.d.ts +19 -0
  296. package/tests/checkbox.test.d.ts +13 -0
  297. package/tests/component-16-factor-types.test.d.ts +13 -0
  298. package/tests/component-5level-integration.test.d.ts +14 -0
  299. package/tests/component-registry-ui.test.d.ts +13 -0
  300. package/tests/e2e/16-factor-visual.test.d.ts +14 -0
  301. package/tests/edge-cases.test.d.ts +14 -0
  302. package/tests/factor-17-24-integration.test.d.ts +14 -0
  303. package/tests/factor-17-24-performance.test.d.ts +14 -0
  304. package/tests/factor-validators.test.d.ts +13 -0
  305. package/tests/factors-1-6.test.d.ts +13 -0
  306. package/tests/factors-12-16.test.d.ts +13 -0
  307. package/tests/factors-17-24.test.d.ts +21 -0
  308. package/tests/factors-all.test.d.ts +13 -0
  309. package/tests/factors-registry.test.d.ts +11 -0
  310. package/tests/factors.test.d.ts +13 -0
  311. package/tests/granularity-types.test.d.ts +18 -0
  312. package/tests/groups.test.d.ts +14 -0
  313. package/tests/input.test.d.ts +16 -0
  314. package/tests/intents.test.d.ts +14 -0
  315. package/tests/memory-leak.test.d.ts +14 -0
  316. package/tests/modal.test.d.ts +19 -0
  317. package/tests/presets.test.d.ts +14 -0
  318. package/tests/radio.test.d.ts +13 -0
  319. package/tests/resolution-intents.test.d.ts +13 -0
  320. package/tests/resolution-presets.test.d.ts +13 -0
  321. package/tests/resolveProps.test.d.ts +14 -0
  322. package/tests/section-integration.test.d.ts +16 -0
  323. package/tests/section-types.test.d.ts +11 -0
  324. package/tests/setup.d.ts +13 -0
  325. package/tests/shorthands.test.d.ts +14 -0
  326. package/tests/switch.test.d.ts +13 -0
  327. package/tests/tabs.test.d.ts +13 -0
  328. package/tests/tiers-registry.test.d.ts +11 -0
  329. package/tests/useComponentStyles.test.d.ts +11 -0
  330. package/tests/useFactors.test.d.ts +13 -0
  331. package/tests/validators-invalid-input.test.d.ts +13 -0
  332. package/tsup.config.d.ts +11 -0
  333. package/vitest.config.d.ts +3 -0
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Components Registry
3
+ * Maps components to their factor applicability (24-Factor system)
4
+ *
5
+ * @packageDocumentation
6
+ * @module registries/components-registry
7
+ * @since 4.0.0
8
+ *
9
+ * Powered by Nikkory
10
+ */
11
+ import type { ComponentType, DesignSystem, Tier } from '../types';
12
+ import type { ComponentRegistryEntry, FactorApplicability, FactorId } from '../../types/algorithm-engine.types';
13
+ /**
14
+ * Component Registry
15
+ * Maps each component type to its factor applicability and metadata
16
+ *
17
+ * @remarks
18
+ * - Each component defines which of the 24 factors apply
19
+ * - null = factor not applicable (skip)
20
+ * - true = factor applicable with design system default
21
+ * - string = factor applicable with specific override value
22
+ */
23
+ export declare const COMPONENT_REGISTRY: Record<ComponentType, ComponentRegistryEntry>;
24
+ /**
25
+ * Get component registry entry
26
+ *
27
+ * @param componentType - Component type to get entry for
28
+ * @returns Component registry entry
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const entry = getComponentEntry('button');
33
+ * // entry.elementType = 'button'
34
+ * // entry.category = 'basic'
35
+ * ```
36
+ */
37
+ export declare function getComponentEntry(componentType: ComponentType): ComponentRegistryEntry;
38
+ /**
39
+ * Get all component types
40
+ *
41
+ * @returns Array of all component type IDs
42
+ */
43
+ export declare function getAllComponentTypes(): ComponentType[];
44
+ /**
45
+ * Get components by category
46
+ *
47
+ * @param category - Category to filter by
48
+ * @returns Array of component entries in the category
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const basicComponents = getComponentsByCategory('basic');
53
+ * // Returns button, input, textarea, checkbox, etc.
54
+ * ```
55
+ */
56
+ export declare function getComponentsByCategory(category: string): ComponentRegistryEntry[];
57
+ /**
58
+ * Get component IDs by category
59
+ *
60
+ * @param category - Category to filter by
61
+ * @returns Array of component type IDs
62
+ */
63
+ export declare function getComponentIdsByCategory(category: string): ComponentType[];
64
+ /**
65
+ * Get all component categories
66
+ *
67
+ * @returns Array of unique category names
68
+ */
69
+ export declare function getAllComponentCategories(): string[];
70
+ /**
71
+ * Get component count by category
72
+ *
73
+ * @returns Map of category to component count
74
+ */
75
+ export declare function getComponentCountByCategory(): Record<string, number>;
76
+ /**
77
+ * Get applicable factors for a component
78
+ * Returns factor IDs where applicability is not null
79
+ *
80
+ * @param componentType - Component type to check
81
+ * @returns Array of applicable factor IDs
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const factors = getApplicableFactors('button');
86
+ * // Returns [1, 2, 3, 4, 6, 7, 8, 9, 10, 13, 14, ...]
87
+ * ```
88
+ */
89
+ export declare function getApplicableFactors(componentType: ComponentType): FactorId[];
90
+ /**
91
+ * Get skipped factors for a component
92
+ * Returns factor IDs where applicability is null
93
+ *
94
+ * @param componentType - Component type to check
95
+ * @returns Array of skipped factor IDs
96
+ */
97
+ export declare function getSkippedFactors(componentType: ComponentType): FactorId[];
98
+ /**
99
+ * Get factor applicability for a component
100
+ *
101
+ * @param componentType - Component type to check
102
+ * @param factorId - Factor ID to check
103
+ * @returns Factor applicability (null, true, or override string)
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * getFactorApplicability('button', 1) // true
108
+ * getFactorApplicability('button', 5) // null
109
+ * getFactorApplicability('avatar', 4) // 'circle'
110
+ * ```
111
+ */
112
+ export declare function getFactorApplicability(componentType: ComponentType, factorId: FactorId): FactorApplicability;
113
+ /**
114
+ * Check if factor is applicable for a component
115
+ *
116
+ * @param componentType - Component type to check
117
+ * @param factorId - Factor ID to check
118
+ * @returns True if factor is applicable (not null)
119
+ */
120
+ export declare function isFactorApplicable(componentType: ComponentType, factorId: FactorId): boolean;
121
+ /**
122
+ * Get factor override value for a component
123
+ * Returns the override string if one exists, undefined otherwise
124
+ *
125
+ * @param componentType - Component type to check
126
+ * @param factorId - Factor ID to check
127
+ * @returns Override value or undefined
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * getFactorOverride('avatar', 4) // 'circle'
132
+ * getFactorOverride('button', 1) // undefined (uses default)
133
+ * ```
134
+ */
135
+ export declare function getFactorOverride(componentType: ComponentType, factorId: FactorId): string | undefined;
136
+ /**
137
+ * Get components that support a specific factor
138
+ *
139
+ * @param factorId - Factor ID to check
140
+ * @returns Array of component types that support the factor
141
+ */
142
+ export declare function getComponentsSupportingFactor(factorId: FactorId): ComponentType[];
143
+ /**
144
+ * Get components that support a design system
145
+ *
146
+ * @param designSystem - Design system to check
147
+ * @returns Array of component entries that support the design system
148
+ */
149
+ export declare function getComponentsForDesignSystem(designSystem: DesignSystem): ComponentRegistryEntry[];
150
+ /**
151
+ * Get components that support a tier
152
+ *
153
+ * @param tier - Tier to check
154
+ * @returns Array of component entries that support the tier
155
+ */
156
+ export declare function getComponentsForTier(tier: Tier): ComponentRegistryEntry[];
157
+ /**
158
+ * Check if a component supports a specific design system
159
+ *
160
+ * @param componentType - Component type to check
161
+ * @param designSystem - Design system to check
162
+ * @returns True if component supports the design system
163
+ */
164
+ export declare function componentSupportsDesignSystem(componentType: ComponentType, designSystem: DesignSystem): boolean;
165
+ /**
166
+ * Check if a component supports a specific tier
167
+ *
168
+ * @param componentType - Component type to check
169
+ * @param tier - Tier to check
170
+ * @returns True if component supports the tier
171
+ */
172
+ export declare function componentSupportsTier(componentType: ComponentType, tier: Tier): boolean;
173
+ /**
174
+ * Search components by name or category
175
+ *
176
+ * @param query - Search query
177
+ * @returns Array of matching component entries
178
+ */
179
+ export declare function searchComponents(query: string): ComponentRegistryEntry[];
180
+ /**
181
+ * Get total component count
182
+ *
183
+ * @returns Total number of registered components
184
+ */
185
+ export declare function getTotalComponentCount(): number;
186
+ /**
187
+ * Get component element type
188
+ *
189
+ * @param componentType - Component type
190
+ * @returns Base HTML element type
191
+ */
192
+ export declare function getComponentElementType(componentType: ComponentType): string;
193
+ //# sourceMappingURL=components-registry.d.ts.map
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Design Systems Registry
3
+ * Maps design systems to their factor values (24-Factor system with Tailwind CSS v4)
4
+ *
5
+ * @packageDocumentation
6
+ * @module registries/design-systems-registry
7
+ * @since 4.0.0
8
+ *
9
+ * Powered by Nikkory
10
+ */
11
+ import type { DesignSystem } from '../types';
12
+ import type { DesignSystemRegistryEntry, FactorValue, FactorId } from '../../types/algorithm-engine.types';
13
+ /**
14
+ * Design System Registry
15
+ * Maps each design system to its factor values and CSS variables
16
+ *
17
+ * @remarks
18
+ * - Each design system defines values for all 24 factors
19
+ * - Values include Tailwind CSS classes for direct styling
20
+ * - CSS variables are provided for Tailwind v4 @theme integration
21
+ */
22
+ export declare const DESIGN_SYSTEM_REGISTRY: Record<DesignSystem, DesignSystemRegistryEntry>;
23
+ /**
24
+ * Get design system registry entry
25
+ *
26
+ * @param designSystem - Design system to get entry for
27
+ * @returns Design system registry entry
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const entry = getDesignSystemEntry('material-design');
32
+ * // entry.name = 'Material Design'
33
+ * // entry.description = 'Google Material Design 3...'
34
+ * ```
35
+ */
36
+ export declare function getDesignSystemEntry(designSystem: DesignSystem): DesignSystemRegistryEntry;
37
+ /**
38
+ * Get all design system IDs
39
+ *
40
+ * @returns Array of all design system IDs
41
+ */
42
+ export declare function getAllDesignSystems(): DesignSystem[];
43
+ /**
44
+ * Get factor value for a design system
45
+ *
46
+ * @param designSystem - Design system to check
47
+ * @param factorId - Factor ID to get value for
48
+ * @returns Factor value or undefined if not defined
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const value = getFactorValue('material-design', 1);
53
+ * // value.tailwindClasses = 'bg-blue-500 text-white hover:bg-blue-600'
54
+ * ```
55
+ */
56
+ export declare function getFactorValue(designSystem: DesignSystem, factorId: FactorId): FactorValue | undefined;
57
+ /**
58
+ * Get all factor values for a design system
59
+ *
60
+ * @param designSystem - Design system to get values for
61
+ * @returns Map of factor ID to factor value
62
+ */
63
+ export declare function getAllFactorValues(designSystem: DesignSystem): Partial<Record<FactorId, FactorValue>>;
64
+ /**
65
+ * Get Tailwind classes for a factor in a design system
66
+ *
67
+ * @param designSystem - Design system to check
68
+ * @param factorId - Factor ID to get classes for
69
+ * @returns Tailwind classes or empty string if not defined
70
+ */
71
+ export declare function getFactorTailwindClasses(designSystem: DesignSystem, factorId: FactorId): string;
72
+ /**
73
+ * Get CSS variables for a factor in a design system
74
+ *
75
+ * @param designSystem - Design system to check
76
+ * @param factorId - Factor ID to get variables for
77
+ * @returns CSS variables object or empty object if not defined
78
+ */
79
+ export declare function getFactorCssVariables(designSystem: DesignSystem, factorId: FactorId): Record<string, string>;
80
+ /**
81
+ * Get all CSS variables for a design system
82
+ *
83
+ * @param designSystem - Design system to get variables for
84
+ * @returns All CSS variables for the design system
85
+ */
86
+ export declare function getDesignSystemCssVariables(designSystem: DesignSystem): Record<string, string>;
87
+ /**
88
+ * Get design system name
89
+ *
90
+ * @param designSystem - Design system ID
91
+ * @returns Human-readable name
92
+ */
93
+ export declare function getDesignSystemName(designSystem: DesignSystem): string;
94
+ /**
95
+ * Get design system description
96
+ *
97
+ * @param designSystem - Design system ID
98
+ * @returns Description of the design system
99
+ */
100
+ export declare function getDesignSystemDescription(designSystem: DesignSystem): string;
101
+ /**
102
+ * Search design systems by name or description
103
+ *
104
+ * @param query - Search query
105
+ * @returns Array of matching design system entries
106
+ */
107
+ export declare function searchDesignSystems(query: string): DesignSystemRegistryEntry[];
108
+ /**
109
+ * Get total design system count
110
+ *
111
+ * @returns Total number of registered design systems
112
+ */
113
+ export declare function getTotalDesignSystemCount(): number;
114
+ /**
115
+ * Check if a design system has a specific factor value
116
+ *
117
+ * @param designSystem - Design system to check
118
+ * @param factorId - Factor ID to check
119
+ * @returns True if factor value is defined
120
+ */
121
+ export declare function hasFactorValue(designSystem: DesignSystem, factorId: FactorId): boolean;
122
+ /**
123
+ * Get design systems that define a specific factor
124
+ *
125
+ * @param factorId - Factor ID to check
126
+ * @returns Array of design system IDs that define the factor
127
+ */
128
+ export declare function getDesignSystemsWithFactor(factorId: FactorId): DesignSystem[];
129
+ /**
130
+ * Generate @theme CSS block for a design system (Tailwind v4)
131
+ *
132
+ * @param designSystem - Design system to generate theme for
133
+ * @returns CSS string with @theme block
134
+ *
135
+ * @example
136
+ * ```typescript
137
+ * const css = generateThemeCss('material-design');
138
+ * // @theme {
139
+ * // --md-color-primary: #2196f3;
140
+ * // ...
141
+ * // }
142
+ * ```
143
+ */
144
+ export declare function generateThemeCss(designSystem: DesignSystem): string;
145
+ /**
146
+ * Merge factor values from design system with overrides
147
+ *
148
+ * @param designSystem - Base design system
149
+ * @param overrides - Factor value overrides
150
+ * @returns Merged factor values map
151
+ */
152
+ export declare function mergeFactorValues(designSystem: DesignSystem, overrides: Partial<Record<FactorId, FactorValue>>): Map<FactorId, FactorValue>;
153
+ //# sourceMappingURL=design-systems-registry.d.ts.map
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Factors Registry
3
+ * Consolidated 24-Factor definitions with metadata
4
+ *
5
+ * @packageDocumentation
6
+ * @module registries/factors-registry
7
+ * @since 4.0.0
8
+ *
9
+ * Powered by Nikkory
10
+ */
11
+ import type { FactorDefinition, FactorId, FactorGroup } from '../../types/algorithm-engine.types';
12
+ /**
13
+ * Complete 24-Factor Registry
14
+ * Defines all factors with their metadata, default values, and possible values
15
+ *
16
+ * @remarks
17
+ * Factors are grouped by tier availability:
18
+ * - Factors 1-6: Basic tier (visual foundations)
19
+ * - Factors 7-14: Standard tier (interaction + layout)
20
+ * - Factors 15-24: Enterprise tier (advanced features)
21
+ */
22
+ export declare const FACTOR_REGISTRY: Record<FactorId, FactorDefinition>;
23
+ /**
24
+ * Get factor definition by ID
25
+ *
26
+ * @param factorId - Factor ID (1-24)
27
+ * @returns Factor definition
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const factor = getFactorDefinition(1);
32
+ * // factor.name = 'Color'
33
+ * // factor.group = 'visual'
34
+ * ```
35
+ */
36
+ export declare function getFactorDefinition(factorId: FactorId): FactorDefinition;
37
+ /**
38
+ * Get all factor definitions
39
+ *
40
+ * @returns Array of all 24 factor definitions
41
+ */
42
+ export declare function getAllFactorDefinitions(): FactorDefinition[];
43
+ /**
44
+ * Get factors by group
45
+ *
46
+ * @param group - Factor group to filter by
47
+ * @returns Array of factor definitions in the group
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * const visualFactors = getFactorsByGroup('visual');
52
+ * // Returns factors 1-4, 9, 16, 18-20
53
+ * ```
54
+ */
55
+ export declare function getFactorsByGroup(group: FactorGroup): FactorDefinition[];
56
+ /**
57
+ * Get factor IDs by group
58
+ *
59
+ * @param group - Factor group to filter by
60
+ * @returns Array of factor IDs in the group
61
+ */
62
+ export declare function getFactorIdsByGroup(group: FactorGroup): FactorId[];
63
+ /**
64
+ * Get factor name by ID
65
+ *
66
+ * @param factorId - Factor ID (1-24)
67
+ * @returns Factor name
68
+ */
69
+ export declare function getFactorName(factorId: FactorId): string;
70
+ /**
71
+ * Get default value for a factor
72
+ *
73
+ * @param factorId - Factor ID (1-24)
74
+ * @returns Default value for the factor
75
+ */
76
+ export declare function getFactorDefaultValue(factorId: FactorId): string;
77
+ /**
78
+ * Get possible values for a factor
79
+ *
80
+ * @param factorId - Factor ID (1-24)
81
+ * @returns Array of possible values
82
+ */
83
+ export declare function getFactorPossibleValues(factorId: FactorId): readonly string[];
84
+ /**
85
+ * Check if a value is valid for a factor
86
+ *
87
+ * @param factorId - Factor ID (1-24)
88
+ * @param value - Value to check
89
+ * @returns True if value is valid
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * isValidFactorValue(1, 'primary') // true
94
+ * isValidFactorValue(1, 'invalid') // false
95
+ * ```
96
+ */
97
+ export declare function isValidFactorValue(factorId: FactorId, value: string): boolean;
98
+ /**
99
+ * Get CSS property for a factor
100
+ *
101
+ * @param factorId - Factor ID (1-24)
102
+ * @returns CSS property or undefined if not applicable
103
+ */
104
+ export declare function getFactorCssProperty(factorId: FactorId): string | undefined;
105
+ /**
106
+ * Get data attribute for a factor
107
+ *
108
+ * @param factorId - Factor ID (1-24)
109
+ * @returns Data attribute name
110
+ */
111
+ export declare function getFactorDataAttribute(factorId: FactorId): string | undefined;
112
+ /**
113
+ * Get all factor groups
114
+ *
115
+ * @returns Array of unique factor groups
116
+ */
117
+ export declare function getAllFactorGroups(): FactorGroup[];
118
+ /**
119
+ * Get factor count by group
120
+ *
121
+ * @returns Map of group to factor count
122
+ */
123
+ export declare function getFactorCountByGroup(): Record<FactorGroup, number>;
124
+ /**
125
+ * Get factors in a range
126
+ *
127
+ * @param start - Starting factor ID
128
+ * @param end - Ending factor ID
129
+ * @returns Array of factor definitions in the range
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * getFactorsInRange(1, 6) // Basic tier factors
134
+ * getFactorsInRange(7, 14) // Standard tier additions
135
+ * ```
136
+ */
137
+ export declare function getFactorsInRange(start: FactorId, end: FactorId): FactorDefinition[];
138
+ /**
139
+ * Search factors by name or description
140
+ *
141
+ * @param query - Search query
142
+ * @returns Array of matching factor definitions
143
+ */
144
+ export declare function searchFactors(query: string): FactorDefinition[];
145
+ //# sourceMappingURL=factors-registry.d.ts.map
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Tier Registry
3
+ * Maps tiers to factor ranges and code features (Option C: Registry-based)
4
+ *
5
+ * @packageDocumentation
6
+ * @module registries/tiers-registry
7
+ * @since 4.0.0
8
+ *
9
+ * Powered by Nikkory
10
+ */
11
+ import type { Tier } from '../types';
12
+ import type { TierRegistryEntry, FactorId } from '../../types/algorithm-engine.types';
13
+ /**
14
+ * Tier Registry
15
+ * Maps each tier to its factor range, code features, and LOC range
16
+ *
17
+ * @remarks
18
+ * - Basic: Factors 1-6, minimal code features, 30-50 LOC
19
+ * - Standard: Factors 1-14, forwardRef + displayName, 50-150 LOC
20
+ * - Enterprise: Factors 1-24, full features, 150-300 LOC
21
+ */
22
+ export declare const TIER_REGISTRY: Record<Tier, TierRegistryEntry>;
23
+ /**
24
+ * Get tier registry entry
25
+ *
26
+ * @param tier - Tier to get entry for
27
+ * @returns Tier registry entry with factor range and code features
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const entry = getTierEntry('enterprise');
32
+ * // entry.factorRange = { start: 1, end: 24 }
33
+ * // entry.codeFeatures.useMemo = true
34
+ * ```
35
+ */
36
+ export declare function getTierEntry(tier: Tier): TierRegistryEntry;
37
+ /**
38
+ * Get factors for a tier
39
+ * Returns array of factor IDs enabled for the specified tier
40
+ *
41
+ * @param tier - Tier to get factors for
42
+ * @returns Array of factor IDs (1-6, 1-14, or 1-24)
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * getFactorsForTier('basic') // [1, 2, 3, 4, 5, 6]
47
+ * getFactorsForTier('standard') // [1, 2, ..., 14]
48
+ * getFactorsForTier('enterprise') // [1, 2, ..., 24]
49
+ * ```
50
+ */
51
+ export declare function getFactorsForTier(tier: Tier): FactorId[];
52
+ /**
53
+ * Get code features for a tier
54
+ *
55
+ * @param tier - Tier to get code features for
56
+ * @returns Code features configuration
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const features = getCodeFeaturesForTier('enterprise');
61
+ * // features.useMemo = true
62
+ * // features.includeAnalytics = true
63
+ * ```
64
+ */
65
+ export declare function getCodeFeaturesForTier(tier: Tier): TierRegistryEntry['codeFeatures'];
66
+ /**
67
+ * Get LOC range for a tier
68
+ *
69
+ * @param tier - Tier to get LOC range for
70
+ * @returns Object with min and max LOC
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const range = getLocRangeForTier('standard');
75
+ * // range = { min: 50, max: 150 }
76
+ * ```
77
+ */
78
+ export declare function getLocRangeForTier(tier: Tier): TierRegistryEntry['locRange'];
79
+ /**
80
+ * Check if a factor is enabled for a tier
81
+ *
82
+ * @param tier - Tier to check
83
+ * @param factorId - Factor ID to check
84
+ * @returns True if factor is enabled for tier
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * isFactorEnabledForTier('basic', 1) // true
89
+ * isFactorEnabledForTier('basic', 10) // false
90
+ * isFactorEnabledForTier('enterprise', 24) // true
91
+ * ```
92
+ */
93
+ export declare function isFactorEnabledForTier(tier: Tier, factorId: FactorId): boolean;
94
+ /**
95
+ * Get the minimum tier required for a factor
96
+ *
97
+ * @param factorId - Factor ID to check
98
+ * @returns Minimum tier that supports this factor
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * getMinimumTierForFactor(5) // 'basic'
103
+ * getMinimumTierForFactor(10) // 'standard'
104
+ * getMinimumTierForFactor(20) // 'enterprise'
105
+ * ```
106
+ */
107
+ export declare function getMinimumTierForFactor(factorId: FactorId): Tier;
108
+ /**
109
+ * Get all tiers that support a factor
110
+ *
111
+ * @param factorId - Factor ID to check
112
+ * @returns Array of tiers that support this factor
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * getTiersSupportingFactor(5) // ['basic', 'standard', 'enterprise']
117
+ * getTiersSupportingFactor(10) // ['standard', 'enterprise']
118
+ * getTiersSupportingFactor(20) // ['enterprise']
119
+ * ```
120
+ */
121
+ export declare function getTiersSupportingFactor(factorId: FactorId): Tier[];
122
+ /**
123
+ * Compare tier levels
124
+ *
125
+ * @param a - First tier
126
+ * @param b - Second tier
127
+ * @returns -1 if a < b, 0 if a === b, 1 if a > b
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * compareTierLevels('basic', 'enterprise') // -1
132
+ * compareTierLevels('standard', 'standard') // 0
133
+ * compareTierLevels('enterprise', 'basic') // 1
134
+ * ```
135
+ */
136
+ export declare function compareTierLevels(a: Tier, b: Tier): -1 | 0 | 1;
137
+ /**
138
+ * Get all tier IDs
139
+ *
140
+ * @returns Array of all tier IDs in order
141
+ */
142
+ export declare function getAllTiers(): Tier[];
143
+ /**
144
+ * Get tier display name
145
+ *
146
+ * @param tier - Tier to get display name for
147
+ * @returns Capitalized tier name
148
+ */
149
+ export declare function getTierDisplayName(tier: Tier): string;
150
+ //# sourceMappingURL=tiers-registry.d.ts.map