playlist-data-engine 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +352 -0
  3. package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
  4. package/dist/constants/DefaultClasses.d.ts +46 -0
  5. package/dist/constants/DefaultClasses.d.ts.map +1 -0
  6. package/dist/constants/DefaultEnchantments.d.ts +337 -0
  7. package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
  8. package/dist/constants/DefaultEnemies.d.ts +83 -0
  9. package/dist/constants/DefaultEnemies.d.ts.map +1 -0
  10. package/dist/constants/DefaultEquipment.d.ts +23 -0
  11. package/dist/constants/DefaultEquipment.d.ts.map +1 -0
  12. package/dist/constants/DefaultFeatures.d.ts +22 -0
  13. package/dist/constants/DefaultFeatures.d.ts.map +1 -0
  14. package/dist/constants/DefaultRaces.d.ts +102 -0
  15. package/dist/constants/DefaultRaces.d.ts.map +1 -0
  16. package/dist/constants/DefaultSkills.d.ts +26 -0
  17. package/dist/constants/DefaultSkills.d.ts.map +1 -0
  18. package/dist/constants/DefaultSpells.d.ts +41 -0
  19. package/dist/constants/DefaultSpells.d.ts.map +1 -0
  20. package/dist/constants/EncounterBalance.d.ts +208 -0
  21. package/dist/constants/EncounterBalance.d.ts.map +1 -0
  22. package/dist/constants/EnemyEquipment.d.ts +71 -0
  23. package/dist/constants/EnemyEquipment.d.ts.map +1 -0
  24. package/dist/constants/EnemyRarity.d.ts +79 -0
  25. package/dist/constants/EnemyRarity.d.ts.map +1 -0
  26. package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
  27. package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
  28. package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
  29. package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
  30. package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
  31. package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
  32. package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
  33. package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
  34. package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
  35. package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
  36. package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
  37. package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
  38. package/dist/constants/ItemTemplates.d.ts +40 -0
  39. package/dist/constants/ItemTemplates.d.ts.map +1 -0
  40. package/dist/constants/MagicItems.d.ts +30 -0
  41. package/dist/constants/MagicItems.d.ts.map +1 -0
  42. package/dist/constants/SpellSlots.d.ts +30 -0
  43. package/dist/constants/SpellSlots.d.ts.map +1 -0
  44. package/dist/constants/StatScaling.d.ts +113 -0
  45. package/dist/constants/StatScaling.d.ts.map +1 -0
  46. package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
  47. package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
  48. package/dist/core/analysis/ColorExtractor.d.ts +64 -0
  49. package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
  50. package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
  51. package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
  52. package/dist/core/analysis/LevelSerializer.d.ts +265 -0
  53. package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
  54. package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
  55. package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
  56. package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
  57. package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
  58. package/dist/core/analysis/MusicClassifier.d.ts +524 -0
  59. package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
  60. package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
  61. package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
  62. package/dist/core/analysis/PitchDetector.d.ts +251 -0
  63. package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
  64. package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
  65. package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
  66. package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
  67. package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
  68. package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
  69. package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
  70. package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
  71. package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
  72. package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
  73. package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
  74. package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
  75. package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
  76. package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
  77. package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
  78. package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
  79. package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
  80. package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
  81. package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
  82. package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
  83. package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
  84. package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
  85. package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
  86. package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
  87. package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
  88. package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
  89. package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
  90. package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
  91. package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
  92. package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
  93. package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
  94. package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
  95. package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
  96. package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
  97. package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
  98. package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
  99. package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
  100. package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
  101. package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
  102. package/dist/core/analysis/beat/index.d.ts +41 -0
  103. package/dist/core/analysis/beat/index.d.ts.map +1 -0
  104. package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
  105. package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
  106. package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
  107. package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
  108. package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
  109. package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
  110. package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
  111. package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
  112. package/dist/core/analysis/index.d.ts +18 -0
  113. package/dist/core/analysis/index.d.ts.map +1 -0
  114. package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
  115. package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
  116. package/dist/core/combat/AI/CombatAI.d.ts +179 -0
  117. package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
  118. package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
  119. package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
  120. package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
  121. package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
  122. package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
  123. package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
  124. package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
  125. package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
  126. package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
  127. package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
  128. package/dist/core/combat/AttackResolver.d.ts +220 -0
  129. package/dist/core/combat/AttackResolver.d.ts.map +1 -0
  130. package/dist/core/combat/CombatEngine.d.ts +388 -0
  131. package/dist/core/combat/CombatEngine.d.ts.map +1 -0
  132. package/dist/core/combat/DiceRoller.d.ts +115 -0
  133. package/dist/core/combat/DiceRoller.d.ts.map +1 -0
  134. package/dist/core/combat/InitiativeRoller.d.ts +62 -0
  135. package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
  136. package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
  137. package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
  138. package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
  139. package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
  140. package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
  141. package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
  142. package/dist/core/combat/SpellCaster.d.ts +113 -0
  143. package/dist/core/combat/SpellCaster.d.ts.map +1 -0
  144. package/dist/core/config/index.d.ts +24 -0
  145. package/dist/core/config/index.d.ts.map +1 -0
  146. package/dist/core/config/progressionConfig.d.ts +73 -0
  147. package/dist/core/config/progressionConfig.d.ts.map +1 -0
  148. package/dist/core/config/sensorConfig.d.ts +134 -0
  149. package/dist/core/config/sensorConfig.d.ts.map +1 -0
  150. package/dist/core/equipment/BoxOpener.d.ts +175 -0
  151. package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
  152. package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
  153. package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
  154. package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
  155. package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
  156. package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
  157. package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
  158. package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
  159. package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
  160. package/dist/core/extensions/ExtensionManager.d.ts +517 -0
  161. package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
  162. package/dist/core/extensions/WeightedSelector.d.ts +156 -0
  163. package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
  164. package/dist/core/extensions/index.d.ts +11 -0
  165. package/dist/core/extensions/index.d.ts.map +1 -0
  166. package/dist/core/extensions/initializeDefaults.d.ts +170 -0
  167. package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
  168. package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
  169. package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
  170. package/dist/core/features/FeatureQuery.d.ts +368 -0
  171. package/dist/core/features/FeatureQuery.d.ts.map +1 -0
  172. package/dist/core/features/FeatureTypes.d.ts +199 -0
  173. package/dist/core/features/FeatureTypes.d.ts.map +1 -0
  174. package/dist/core/features/FeatureValidator.d.ts +149 -0
  175. package/dist/core/features/FeatureValidator.d.ts.map +1 -0
  176. package/dist/core/features/index.d.ts +12 -0
  177. package/dist/core/features/index.d.ts.map +1 -0
  178. package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
  179. package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
  180. package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
  181. package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
  182. package/dist/core/generation/BeatConverter.d.ts +127 -0
  183. package/dist/core/generation/BeatConverter.d.ts.map +1 -0
  184. package/dist/core/generation/ButtonMapper.d.ts +346 -0
  185. package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
  186. package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
  187. package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
  188. package/dist/core/generation/CRLevelConverter.d.ts +242 -0
  189. package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
  190. package/dist/core/generation/CharacterGenerator.d.ts +194 -0
  191. package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
  192. package/dist/core/generation/ClassSuggester.d.ts +184 -0
  193. package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
  194. package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
  195. package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
  196. package/dist/core/generation/EnemyGenerator.d.ts +595 -0
  197. package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
  198. package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
  199. package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
  200. package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
  201. package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
  202. package/dist/core/generation/LevelGenerator.d.ts +390 -0
  203. package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
  204. package/dist/core/generation/NamingEngine.d.ts +136 -0
  205. package/dist/core/generation/NamingEngine.d.ts.map +1 -0
  206. package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
  207. package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
  208. package/dist/core/generation/RaceSelector.d.ts +58 -0
  209. package/dist/core/generation/RaceSelector.d.ts.map +1 -0
  210. package/dist/core/generation/RhythmGenerator.d.ts +597 -0
  211. package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
  212. package/dist/core/generation/SkillAssigner.d.ts +78 -0
  213. package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
  214. package/dist/core/generation/SpellManager.d.ts +132 -0
  215. package/dist/core/generation/SpellManager.d.ts.map +1 -0
  216. package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
  217. package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
  218. package/dist/core/generation/index.d.ts +41 -0
  219. package/dist/core/generation/index.d.ts.map +1 -0
  220. package/dist/core/parser/MetadataExtractor.d.ts +66 -0
  221. package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
  222. package/dist/core/parser/PlaylistParser.d.ts +45 -0
  223. package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
  224. package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
  225. package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
  226. package/dist/core/playback/index.d.ts +5 -0
  227. package/dist/core/playback/index.d.ts.map +1 -0
  228. package/dist/core/progression/CharacterUpdater.d.ts +203 -0
  229. package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
  230. package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
  231. package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
  232. package/dist/core/progression/PrestigeSystem.d.ts +217 -0
  233. package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
  234. package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
  235. package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
  236. package/dist/core/progression/SessionTracker.d.ts +169 -0
  237. package/dist/core/progression/SessionTracker.d.ts.map +1 -0
  238. package/dist/core/progression/XPCalculator.d.ts +128 -0
  239. package/dist/core/progression/XPCalculator.d.ts.map +1 -0
  240. package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
  241. package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
  242. package/dist/core/progression/stat/StatManager.d.ts +179 -0
  243. package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
  244. package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
  245. package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
  246. package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
  247. package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
  248. package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
  249. package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
  250. package/dist/core/sensors/MotionDetector.d.ts +58 -0
  251. package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
  252. package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
  253. package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
  254. package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
  255. package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
  256. package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
  257. package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
  258. package/dist/core/skills/SkillQuery.d.ts +159 -0
  259. package/dist/core/skills/SkillQuery.d.ts.map +1 -0
  260. package/dist/core/skills/SkillTypes.d.ts +233 -0
  261. package/dist/core/skills/SkillTypes.d.ts.map +1 -0
  262. package/dist/core/skills/SkillValidator.d.ts +146 -0
  263. package/dist/core/skills/SkillValidator.d.ts.map +1 -0
  264. package/dist/core/skills/index.d.ts +11 -0
  265. package/dist/core/skills/index.d.ts.map +1 -0
  266. package/dist/core/spells/SpellQuery.d.ts +194 -0
  267. package/dist/core/spells/SpellQuery.d.ts.map +1 -0
  268. package/dist/core/spells/SpellTypes.d.ts +71 -0
  269. package/dist/core/spells/SpellTypes.d.ts.map +1 -0
  270. package/dist/core/spells/SpellValidator.d.ts +129 -0
  271. package/dist/core/spells/SpellValidator.d.ts.map +1 -0
  272. package/dist/core/spells/index.d.ts +11 -0
  273. package/dist/core/spells/index.d.ts.map +1 -0
  274. package/dist/core/types/AudioProfile.d.ts +143 -0
  275. package/dist/core/types/AudioProfile.d.ts.map +1 -0
  276. package/dist/core/types/BeatMap.d.ts +1825 -0
  277. package/dist/core/types/BeatMap.d.ts.map +1 -0
  278. package/dist/core/types/ButtonMapping.d.ts +345 -0
  279. package/dist/core/types/ButtonMapping.d.ts.map +1 -0
  280. package/dist/core/types/Character.d.ts +397 -0
  281. package/dist/core/types/Character.d.ts.map +1 -0
  282. package/dist/core/types/ChartedBeatMap.d.ts +169 -0
  283. package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
  284. package/dist/core/types/Combat.d.ts +268 -0
  285. package/dist/core/types/Combat.d.ts.map +1 -0
  286. package/dist/core/types/CombatAI.d.ts +143 -0
  287. package/dist/core/types/CombatAI.d.ts.map +1 -0
  288. package/dist/core/types/Enemy.d.ts +447 -0
  289. package/dist/core/types/Enemy.d.ts.map +1 -0
  290. package/dist/core/types/Environmental.d.ts +213 -0
  291. package/dist/core/types/Environmental.d.ts.map +1 -0
  292. package/dist/core/types/Equipment.d.ts +309 -0
  293. package/dist/core/types/Equipment.d.ts.map +1 -0
  294. package/dist/core/types/ISessionTracker.d.ts +48 -0
  295. package/dist/core/types/ISessionTracker.d.ts.map +1 -0
  296. package/dist/core/types/LevelExport.d.ts +366 -0
  297. package/dist/core/types/LevelExport.d.ts.map +1 -0
  298. package/dist/core/types/Playlist.d.ts +70 -0
  299. package/dist/core/types/Playlist.d.ts.map +1 -0
  300. package/dist/core/types/Prestige.d.ts +94 -0
  301. package/dist/core/types/Prestige.d.ts.map +1 -0
  302. package/dist/core/types/Progression.d.ts +214 -0
  303. package/dist/core/types/Progression.d.ts.map +1 -0
  304. package/dist/core/types/RhythmXP.d.ts +398 -0
  305. package/dist/core/types/RhythmXP.d.ts.map +1 -0
  306. package/dist/core/utils/AbilityConstants.d.ts +31 -0
  307. package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
  308. package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
  309. package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
  310. package/dist/core/utils/ImageValidator.d.ts +66 -0
  311. package/dist/core/utils/ImageValidator.d.ts.map +1 -0
  312. package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
  313. package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
  314. package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
  315. package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
  316. package/dist/index.d.ts +176 -0
  317. package/dist/index.d.ts.map +1 -0
  318. package/dist/playlist-data-engine.js +124 -0
  319. package/dist/playlist-data-engine.mjs +49251 -0
  320. package/dist/utils/EnchantmentLibrary.d.ts +378 -0
  321. package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
  322. package/dist/utils/arweaveGatewayManager.d.ts +485 -0
  323. package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
  324. package/dist/utils/arweaveUtils.d.ts +118 -0
  325. package/dist/utils/arweaveUtils.d.ts.map +1 -0
  326. package/dist/utils/constants.d.ts +439 -0
  327. package/dist/utils/constants.d.ts.map +1 -0
  328. package/dist/utils/equipmentConstants.d.ts +60 -0
  329. package/dist/utils/equipmentConstants.d.ts.map +1 -0
  330. package/dist/utils/hash.d.ts +33 -0
  331. package/dist/utils/hash.d.ts.map +1 -0
  332. package/dist/utils/logger.d.ts +192 -0
  333. package/dist/utils/logger.d.ts.map +1 -0
  334. package/dist/utils/magicItemExamples.d.ts +46 -0
  335. package/dist/utils/magicItemExamples.d.ts.map +1 -0
  336. package/dist/utils/playlistUtils.d.ts +149 -0
  337. package/dist/utils/playlistUtils.d.ts.map +1 -0
  338. package/dist/utils/random.d.ts +34 -0
  339. package/dist/utils/random.d.ts.map +1 -0
  340. package/dist/utils/sensorDashboard.d.ts +60 -0
  341. package/dist/utils/sensorDashboard.d.ts.map +1 -0
  342. package/dist/utils/validators.d.ts +189 -0
  343. package/dist/utils/validators.d.ts.map +1 -0
  344. package/dist/vite.svg +1 -0
  345. package/package.json +82 -0
@@ -0,0 +1,346 @@
1
+ /**
2
+ * Button Mapper - Maps pitch analysis to button assignments for rhythm games
3
+ *
4
+ * This is the main entry point for button mapping in the Pitch Detection & Button Mapping pipeline.
5
+ * It takes rhythm generation output and optional pitch analysis, then assigns buttons based on:
6
+ *
7
+ * 1. **Pitch Detection**: Uses melody contour (direction, interval) to determine buttons
8
+ * 2. **Pattern Library**: Falls back to predefined patterns when pitch is unavailable
9
+ * 3. **Probability-Based Blending**: Combines pitch and pattern based on pYIN confidence
10
+ *
11
+ * Supports two controller modes:
12
+ * - **DDR**: 4 directional buttons with circular motion philosophy
13
+ * - **Guitar Hero**: 5 fret buttons with fretboard metaphor
14
+ *
15
+ * Part of the Pitch Detection & Button Mapping pipeline - Phase 2.3
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const mapper = new ButtonMapper({
20
+ * controllerMode: 'ddr',
21
+ * difficulty: 'medium',
22
+ * pitchInfluenceWeight: 0.8,
23
+ * });
24
+ *
25
+ * // Map with pitch analysis
26
+ * const result = mapper.map(generatedRhythm, 'medium', pitchAnalysis);
27
+ *
28
+ * // Map without pitch (pattern-only)
29
+ * const resultNoPitch = mapper.map(generatedRhythm, 'medium');
30
+ * ```
31
+ */
32
+ import type { ButtonMappingConfig, DDRButton, GuitarHeroButton, ButtonPattern } from '../types/ButtonMapping.js';
33
+ import type { GeneratedRhythm, RhythmMetadata } from './RhythmGenerator.js';
34
+ import type { DifficultyVariant, PresetDifficultyLevel } from '../analysis/beat/DifficultyVariantGenerator.js';
35
+ import type { PitchAtBeat, IntervalCategory } from './PitchBeatLinker.js';
36
+ /**
37
+ * Result of mapping buttons to a difficulty variant
38
+ */
39
+ export interface MappedLevelResult {
40
+ /** The difficulty variant with keys assigned to beats */
41
+ variant: DifficultyVariant;
42
+ /** Original rhythm metadata preserved */
43
+ rhythmMetadata: RhythmMetadata;
44
+ /** Button mapping metadata */
45
+ buttonMetadata: ButtonMappingMetadata;
46
+ /** Per-beat key assignments (beat index → button key) from the ButtonMapper */
47
+ keyAssignments: Map<number, string>;
48
+ /** Per-beat mapping source (beat index → 'pitch' | 'pattern') */
49
+ mappingSources: Map<number, 'pitch' | 'pattern'>;
50
+ /** Per-beat pattern IDs (beat index → pattern ID, undefined for pitch-sourced beats) */
51
+ mappingPatternIds: Map<number, string | undefined>;
52
+ }
53
+ /**
54
+ * Metadata about the button mapping process
55
+ */
56
+ export interface ButtonMappingMetadata {
57
+ /** Controller mode used for mapping */
58
+ controllerMode: 'ddr' | 'guitar_hero' | 'tap';
59
+ /** All unique keys used in the chart */
60
+ keysUsed: string[];
61
+ /** Number of beats influenced by pitch */
62
+ pitchInfluencedBeats: number;
63
+ /** Number of beats from pattern library */
64
+ patternInfluencedBeats: number;
65
+ /** IDs of patterns used */
66
+ patternsUsed: string[];
67
+ /** Statistics about button distribution */
68
+ buttonDistribution: Map<string, number>;
69
+ /** Direction statistics (if pitch analysis was provided) */
70
+ directionStats?: {
71
+ up: number;
72
+ down: number;
73
+ stable: number;
74
+ none: number;
75
+ };
76
+ /** Interval statistics (if pitch analysis was provided) */
77
+ intervalStats?: {
78
+ unison: number;
79
+ small: number;
80
+ medium: number;
81
+ large: number;
82
+ very_large: number;
83
+ };
84
+ /** Band statistics (if pitch analysis was provided) - which frequency bands pitches came from */
85
+ bandStats?: {
86
+ low: number;
87
+ mid: number;
88
+ high: number;
89
+ };
90
+ /** Pattern placements — groups of consecutive beats sharing the same patternId */
91
+ patternPlacements?: {
92
+ patternId: string;
93
+ startIndex: number;
94
+ length: number;
95
+ }[];
96
+ }
97
+ /**
98
+ * A consecutive run of beats that need pattern filling.
99
+ *
100
+ * Identified by scanning pitch classification results: consecutive beats
101
+ * with no pitch-derived key form a single run. Each run records the
102
+ * surrounding context keys for smooth boundary transitions.
103
+ */
104
+ export interface PatternRun<T extends DDRButton | GuitarHeroButton> {
105
+ /** Start index in the beat array */
106
+ startIndex: number;
107
+ /** End index (exclusive) in the beat array */
108
+ endIndex: number;
109
+ /** Number of beats in this run */
110
+ length: number;
111
+ /** Key from the pitch beat immediately before this run (null if run starts at beat 0) */
112
+ previousKey: T | null;
113
+ /** Key from the pitch beat immediately after this run (null if run ends at last beat) */
114
+ nextKey: T | null;
115
+ }
116
+ /**
117
+ * Result of placing a pattern within a run.
118
+ *
119
+ * Each placement represents a single pattern that was selected and
120
+ * written into a contiguous range of beats within a pattern run.
121
+ */
122
+ export interface PatternPlacement<T extends DDRButton | GuitarHeroButton> {
123
+ /** The pattern that was placed */
124
+ pattern: ButtonPattern<T>;
125
+ /** Beat index where this pattern starts */
126
+ startIndex: number;
127
+ /** Number of beats actually filled by this pattern */
128
+ filledLength: number;
129
+ }
130
+ /**
131
+ * DDR Circular Motion Transition Table
132
+ *
133
+ * Determines next button based on: current position + pitch direction + interval size.
134
+ * Follows the natural clockwise flow: up → right → down → left → up
135
+ */
136
+ declare const DDR_TRANSITIONS: Record<DDRButton, {
137
+ ascending: Record<IntervalCategory, DDRButton>;
138
+ descending: Record<IntervalCategory, DDRButton>;
139
+ stable: DDRButton;
140
+ }>;
141
+ /**
142
+ * Guitar Hero Fret Transition Table (with string wrap)
143
+ *
144
+ * Determines next fret based on: current position + pitch direction + interval size.
145
+ * String wrap: ascending past 5 → wraps to 2-4; descending past 1 → wraps to 4-2
146
+ */
147
+ declare const GUITAR_HERO_TRANSITIONS: Record<GuitarHeroButton, {
148
+ ascending: Record<IntervalCategory, GuitarHeroButton>;
149
+ descending: Record<IntervalCategory, GuitarHeroButton>;
150
+ stable: GuitarHeroButton;
151
+ }>;
152
+ /**
153
+ * Scan pitch classification results and group consecutive null beats into runs.
154
+ *
155
+ * A "run" is a maximal sequence of consecutive beats that all need pattern filling
156
+ * (i.e., their pitchKey is null). Each run records the surrounding context keys
157
+ * so that pattern selection can produce smooth boundary transitions.
158
+ *
159
+ * @param pitchKeys - Array from classifyBeats; null = needs pattern, non-null = has pitch key
160
+ * @returns Array of PatternRun objects (empty if all beats have pitch keys)
161
+ */
162
+ export declare function identifyPatternRuns<T extends DDRButton | GuitarHeroButton>(pitchKeys: (T | null)[]): PatternRun<T>[];
163
+ /**
164
+ * Check if a full multi-beat pattern is compatible for placement within a run.
165
+ *
166
+ * Evaluates boundary transitions at both ends of the pattern:
167
+ * - **Entry**: `pattern.keys[0]` must differ from the previous key (no immediate repeat).
168
+ * - **Exit**: `pattern.keys[last]` must allow a smooth transition to the next key.
169
+ * - DDR: last key must be adjacent to or same as next key (uses `DDR_ADJACENT`).
170
+ * - Guitar Hero: last key must be between previous and next, or moving toward next.
171
+ *
172
+ * The pattern must also fit within the remaining space of the run.
173
+ * Difficulty filtering is handled by the caller in `selectPatternForRun()`.
174
+ *
175
+ * @param pattern - The pattern to check
176
+ * @param run - The run this pattern would be placed in
177
+ * @param positionInRun - Offset from the start of the run (0 = start of run)
178
+ * @param previousKey - Key immediately before this pattern (run previousKey or previous pattern's last key)
179
+ * @param nextKey - Key immediately after this pattern (run nextKey, or null if more patterns follow)
180
+ * @returns True if the pattern is compatible with the run boundaries
181
+ */
182
+ export declare function isPatternRunCompatible<T extends DDRButton | GuitarHeroButton>(pattern: ButtonPattern<T>, run: PatternRun<T>, positionInRun: number, previousKey: T | null, nextKey: T | null): boolean;
183
+ /**
184
+ * Select patterns to fill a pattern run using a greedy largest-first strategy.
185
+ *
186
+ * The algorithm walks through the run left-to-right:
187
+ * 1. Filters patterns by difficulty and sorts by length (largest first).
188
+ * 2. At each position, tries to find a compatible pattern:
189
+ * - **Exact fit**: a pattern whose length equals the remaining space, with
190
+ * the run's `nextKey` used for exit-transition checking.
191
+ * - **Largest fit**: the largest compatible pattern (intermediate placements
192
+ * use `null` for nextKey, so exit transitions are deferred).
193
+ * 3. If no compatible pattern exists at all, the beat is filled via
194
+ * `interpolateButton()` and recorded as a synthetic single-key placement.
195
+ *
196
+ * Variety constraints (applied in order of priority):
197
+ * - Never repeat the same pattern consecutively within a run.
198
+ * - Prefer a different category from the last placed pattern.
199
+ * - Optionally avoid patterns recently used across runs (via `recentlyUsedPatternIds`).
200
+ *
201
+ * @param run - The pattern run to fill
202
+ * @param patternLibrary - All available patterns for the controller mode
203
+ * @param maxDifficulty - Maximum pattern difficulty to consider
204
+ * @param recentlyUsedPatternIds - Optional set of pattern IDs used in recent
205
+ * measures (for cross-run variety). Defaults to no constraint.
206
+ * @returns Array of placements covering every beat in the run
207
+ */
208
+ export declare function selectPatternForRun<T extends DDRButton | GuitarHeroButton>(run: PatternRun<T>, patternLibrary: ButtonPattern<T>[], maxDifficulty: number, recentlyUsedPatternIds?: Set<string>, randomFn?: () => number): PatternPlacement<T>[];
209
+ /**
210
+ * Write pattern keys and IDs into the final arrays, preserving pitch-derived keys.
211
+ *
212
+ * For each run, each placement writes its pattern's keys sequentially into the
213
+ * output arrays. Beats that already have a pitch-derived key (non-null in
214
+ * `pitchKeys`) are left untouched.
215
+ *
216
+ * @param pitchKeys - Array from classifyBeats; non-null entries are pitch-derived
217
+ * @param runs - Pattern runs from identifyPatternRuns()
218
+ * @param placementsByRun - Pattern placements from selectPatternForRun(), one array per run
219
+ * @returns Object with fully populated keys and patternIds arrays
220
+ */
221
+ export declare function placePatterns<T extends DDRButton | GuitarHeroButton>(pitchKeys: (T | null)[], runs: PatternRun<T>[], placementsByRun: PatternPlacement<T>[][]): {
222
+ keys: T[];
223
+ patternIds: (string | undefined)[];
224
+ };
225
+ /**
226
+ * Button Mapper
227
+ *
228
+ * Maps pitch analysis to button assignments for rhythm games.
229
+ * Supports DDR (4 directional buttons) and Guitar Hero (5 fret buttons) modes.
230
+ */
231
+ export declare class ButtonMapper {
232
+ private config;
233
+ /**
234
+ * Create a new ButtonMapper
235
+ *
236
+ * @param config - Configuration options (partial, defaults applied)
237
+ */
238
+ constructor(config?: Partial<ButtonMappingConfig>);
239
+ /**
240
+ * Generate a deterministic random float for a given context.
241
+ * Uses MurmurHash so the same seed + context always produces the same value.
242
+ * Falls back to Math.random() when no seed is configured.
243
+ */
244
+ private seededRandom;
245
+ /**
246
+ * Get the current configuration
247
+ */
248
+ getConfig(): ButtonMappingConfig;
249
+ /**
250
+ * Map buttons for a standalone difficulty variant
251
+ *
252
+ * Takes a difficulty variant directly (e.g., from generateAtDensity()) along with
253
+ * rhythm metadata, then assigns buttons based on pitch direction/interval and
254
+ * pattern library fallback.
255
+ *
256
+ * For 'custom' difficulty variants, pattern selection defaults to 'medium' difficulty.
257
+ *
258
+ * @param variant - The difficulty variant to map (can be preset or 'custom')
259
+ * @param rhythmMetadata - Rhythm metadata from the GeneratedRhythm
260
+ * @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
261
+ * @returns Mapped level result with button assignments
262
+ */
263
+ mapVariant(variant: DifficultyVariant, rhythmMetadata: RhythmMetadata, pitchAnalysis?: PitchAtBeat[]): MappedLevelResult;
264
+ /**
265
+ * Main entry point - map buttons for a difficulty variant
266
+ *
267
+ * Takes a generated rhythm and optional pitch analysis, then assigns buttons
268
+ * based on pitch direction/interval and pattern library fallback.
269
+ *
270
+ * @param generatedRhythm - The generated rhythm from RhythmGenerator
271
+ * @param difficulty - Which difficulty variant to map (preset only, not 'custom')
272
+ * @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
273
+ * @returns Mapped level result with button assignments
274
+ */
275
+ map(generatedRhythm: GeneratedRhythm, difficulty: PresetDifficultyLevel, pitchAnalysis?: PitchAtBeat[]): MappedLevelResult;
276
+ /**
277
+ * Map buttons for all three difficulty variants
278
+ *
279
+ * @param generatedRhythm - The generated rhythm from RhythmGenerator
280
+ * @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
281
+ * @returns Object with mapped results for each difficulty
282
+ */
283
+ mapAll(generatedRhythm: GeneratedRhythm, pitchAnalysis?: PitchAtBeat[]): {
284
+ easy: MappedLevelResult;
285
+ medium: MappedLevelResult;
286
+ hard: MappedLevelResult;
287
+ };
288
+ /**
289
+ * Map buttons for a single difficulty variant using run-based pattern placement.
290
+ *
291
+ * Pipeline:
292
+ * 1. classifyBeats() → pitchKeys, probabilities
293
+ * 2. classifyPitchVsPattern() → boolean classification (pitch vs pattern)
294
+ * 3. Build workingKeys array (null for pattern beats, pitch key for pitch beats)
295
+ * 4. identifyPatternRuns() → runs of consecutive pattern beats
296
+ * 5. selectPatternForRun() per run → pattern placements
297
+ * 6. placePatterns() → final keys + patternIds
298
+ * 7. Build ButtonAssignment[] with proper source/patternId per beat
299
+ * 8. applyConsecutiveLimit() → fix any monotony
300
+ */
301
+ private mapButtons;
302
+ /**
303
+ * Classify each beat as pitch or pattern based on probability and weight.
304
+ *
305
+ * Uses probability-based blending logic:
306
+ * sorts pitch beats by probability (lowest first), replaces the bottom
307
+ * `(1 - weight)` fraction with patterns. Beats with no pitch data always
308
+ * use patterns regardless of weight.
309
+ *
310
+ * @param pitchKeys - Array from classifyBeats; null = no pitch available
311
+ * @param probabilities - Per-beat pitch probabilities
312
+ * @param weight - pitchInfluenceWeight (0.0 = all pattern, 1.0 = all pitch)
313
+ * @returns Boolean array where true = pitch, false = pattern
314
+ */
315
+ private classifyPitchVsPattern;
316
+ /**
317
+ * Get maximum pattern difficulty based on game difficulty
318
+ */
319
+ private getMaxPatternDifficulty;
320
+ /**
321
+ * Apply consecutive same-key limit to prevent monotonous patterns
322
+ */
323
+ private applyConsecutiveLimit;
324
+ /**
325
+ * Build metadata about the button mapping process
326
+ */
327
+ private buildMetadata;
328
+ /**
329
+ * Get the DDR transition table (for debugging/visualization)
330
+ */
331
+ static getDDRTransitions(): typeof DDR_TRANSITIONS;
332
+ /**
333
+ * Get the Guitar Hero transition table (for debugging/visualization)
334
+ */
335
+ static getGuitarHeroTransitions(): typeof GUITAR_HERO_TRANSITIONS;
336
+ /**
337
+ * Get all available buttons for the current controller mode
338
+ */
339
+ getAvailableButtons(): (DDRButton | GuitarHeroButton)[];
340
+ /**
341
+ * Check if a button is valid for the current controller mode
342
+ */
343
+ isValidButton(button: unknown): button is DDRButton | GuitarHeroButton;
344
+ }
345
+ export {};
346
+ //# sourceMappingURL=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AYD;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,UAAU;IAwGlB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,sBAAsB;IAiD9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA+B7B;;OAEG;IACH,OAAO,CAAC,aAAa;IAgGrB;;OAEG;IACH,MAAM,CAAC,iBAAiB,IAAI,OAAO,eAAe;IAIlD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,OAAO,uBAAuB;IAIjE;;OAEG;IACH,mBAAmB,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,EAAE;IAQvD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,GAAG,gBAAgB;CAOzE"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Button Pattern Library
3
+ *
4
+ * Contains predefined button patterns for DDR and Guitar Hero controller modes.
5
+ * These patterns serve as fallback when pitch detection probability is low or
6
+ * when pitchInfluenceWeight is set to use more pattern-driven mapping.
7
+ *
8
+ * @module ButtonPatternLibrary
9
+ */
10
+ import type { DDRButton, GuitarHeroButton, ButtonPattern, ButtonPatternCategory, ButtonPatternLibrary, DDRPatternLibrary, GuitarHeroPatternLibrary } from '../types/ButtonMapping.js';
11
+ /**
12
+ * Complete DDR pattern library.
13
+ * Contains all DDR patterns organized by category and difficulty.
14
+ */
15
+ export declare const DDR_PATTERN_LIBRARY: DDRPatternLibrary;
16
+ /**
17
+ * Complete Guitar Hero pattern library.
18
+ * Contains all Guitar Hero patterns organized by category and difficulty.
19
+ */
20
+ export declare const GUITAR_HERO_PATTERN_LIBRARY: GuitarHeroPatternLibrary;
21
+ /**
22
+ * Get a pattern library by controller mode.
23
+ *
24
+ * @param mode - The controller mode
25
+ * @returns The appropriate pattern library
26
+ */
27
+ export declare function getPatternLibrary(mode: 'ddr'): DDRPatternLibrary;
28
+ export declare function getPatternLibrary(mode: 'guitar_hero'): GuitarHeroPatternLibrary;
29
+ /**
30
+ * Get all patterns of a specific category from a library.
31
+ *
32
+ * @param library - The pattern library
33
+ * @param category - The category to filter by
34
+ * @returns Array of patterns in that category
35
+ */
36
+ export declare function getPatternsByCategory<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, category: ButtonPatternCategory): ButtonPattern<T>[];
37
+ /**
38
+ * Get all patterns within a difficulty range.
39
+ *
40
+ * @param library - The pattern library
41
+ * @param minDifficulty - Minimum difficulty (inclusive)
42
+ * @param maxDifficulty - Maximum difficulty (inclusive)
43
+ * @returns Array of patterns in the difficulty range
44
+ */
45
+ export declare function getPatternsByDifficulty<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, minDifficulty?: number, maxDifficulty?: number): ButtonPattern<T>[];
46
+ /**
47
+ * Get patterns that match all required tags.
48
+ *
49
+ * @param library - The pattern library
50
+ * @param requiredTags - Tags that must all be present
51
+ * @returns Array of patterns matching all tags
52
+ */
53
+ export declare function getPatternsByTags<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, requiredTags: string[]): ButtonPattern<T>[];
54
+ /**
55
+ * Get patterns that have a specific key count.
56
+ *
57
+ * @param library - The pattern library
58
+ * @param keyCount - The number of keys in the pattern
59
+ * @returns Array of patterns with that key count
60
+ */
61
+ export declare function getPatternsByKeyCount<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, keyCount: number): ButtonPattern<T>[];
62
+ /**
63
+ * Get a random pattern from a library.
64
+ *
65
+ * @param library - The pattern library
66
+ * @param filter - Optional filter function
67
+ * @returns A random pattern, or undefined if no patterns match
68
+ */
69
+ export declare function getRandomPattern<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, filter?: (pattern: ButtonPattern<T>) => boolean): ButtonPattern<T> | undefined;
70
+ /**
71
+ * Get pattern by ID.
72
+ *
73
+ * @param library - The pattern library
74
+ * @param id - The pattern ID to find
75
+ * @returns The pattern, or undefined if not found
76
+ */
77
+ export declare function getPatternById<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, id: string): ButtonPattern<T> | undefined;
78
+ /**
79
+ * Get statistics about a pattern library.
80
+ *
81
+ * @param library - The pattern library
82
+ * @returns Statistics object
83
+ */
84
+ export declare function getPatternLibraryStats<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>): {
85
+ totalPatterns: number;
86
+ byCategory: Record<ButtonPatternCategory, number>;
87
+ byDifficulty: Record<number, number>;
88
+ averageKeyCount: number;
89
+ minKeys: number;
90
+ maxKeys: number;
91
+ };
92
+ //# sourceMappingURL=ButtonPatternLibrary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonPatternLibrary.d.ts","sourceRoot":"","sources":["../../../src/core/generation/ButtonPatternLibrary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACR,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EAC3B,MAAM,2BAA2B,CAAC;AAsrCnC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAAgE,CAAC;AAEnG;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,wBAGzC,CAAC;AAMF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,GAAG,iBAAiB,CAAC;AAClE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,wBAAwB,CAAC;AAKjF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,SAAS,GAAG,gBAAgB,EACxE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAChC,QAAQ,EAAE,qBAAqB,GAChC,aAAa,CAAC,CAAC,CAAC,EAAE,CAEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,SAAS,GAAG,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