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.
- package/LICENSE +21 -0
- package/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpellQuery
|
|
3
|
+
*
|
|
4
|
+
* Central query interface for all spells (default D&D 5e and custom).
|
|
5
|
+
* Provides spell lookup and categorization by level, school, and class.
|
|
6
|
+
*
|
|
7
|
+
* **Design:** This is a **query interface** around ExtensionManager.
|
|
8
|
+
* All spells are stored in ExtensionManager; SpellQuery provides:
|
|
9
|
+
* - Query methods with caching for performance
|
|
10
|
+
* - Spell-related helper methods
|
|
11
|
+
*
|
|
12
|
+
* No duplicate storage - all data lives in ExtensionManager.
|
|
13
|
+
*
|
|
14
|
+
* **Registration:** Use ExtensionManager.register('spells', [...]) to register spells.
|
|
15
|
+
*/
|
|
16
|
+
import type { Spell, SpellSchool } from './SpellTypes.js';
|
|
17
|
+
import type { Class, CharacterSheet } from '../types/Character.js';
|
|
18
|
+
import { type SpellValidationResult } from './SpellValidator.js';
|
|
19
|
+
export type { SpellSchool };
|
|
20
|
+
/**
|
|
21
|
+
* Extended Spell interface with optional query fields
|
|
22
|
+
*/
|
|
23
|
+
export interface RegisteredSpell extends Spell {
|
|
24
|
+
/** Unique identifier (uses name as ID if not provided) */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Classes that can learn this spell */
|
|
27
|
+
classes?: Class[];
|
|
28
|
+
/** Source of the spell (default or custom) */
|
|
29
|
+
source?: 'default' | 'custom';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* SpellQuery - Singleton class for querying spells
|
|
33
|
+
*
|
|
34
|
+
* This is a **query interface** around ExtensionManager.
|
|
35
|
+
* All spells are stored in ExtensionManager; SpellQuery provides:
|
|
36
|
+
* - Query methods with caching for performance
|
|
37
|
+
* - Spell-related helper methods
|
|
38
|
+
*
|
|
39
|
+
* Design principle: No duplicate storage. All data lives in ExtensionManager.
|
|
40
|
+
*
|
|
41
|
+
* **Registration:** Use ExtensionManager.register('spells', [...]) to register spells.
|
|
42
|
+
*/
|
|
43
|
+
export declare class SpellQuery {
|
|
44
|
+
private static instance;
|
|
45
|
+
private manager;
|
|
46
|
+
private allSpellsCache;
|
|
47
|
+
private levelCache;
|
|
48
|
+
private schoolCache;
|
|
49
|
+
private constructor();
|
|
50
|
+
/**
|
|
51
|
+
* Get the singleton instance
|
|
52
|
+
*/
|
|
53
|
+
static getInstance(): SpellQuery;
|
|
54
|
+
/**
|
|
55
|
+
* Invalidate all caches
|
|
56
|
+
*
|
|
57
|
+
* This method is primarily for internal use and advanced scenarios.
|
|
58
|
+
*
|
|
59
|
+
* Call this after directly registering spells via ExtensionManager
|
|
60
|
+
* to ensure fresh data in query methods.
|
|
61
|
+
*/
|
|
62
|
+
invalidateCache(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Get a spell by ID
|
|
65
|
+
*
|
|
66
|
+
* @param spellId - Spell ID to look up
|
|
67
|
+
* @returns Spell or undefined if not found
|
|
68
|
+
*/
|
|
69
|
+
getSpell(spellId: string): RegisteredSpell | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Get all registered spells
|
|
72
|
+
*
|
|
73
|
+
* Reads from ExtensionManager with caching.
|
|
74
|
+
*
|
|
75
|
+
* @returns Array of all spells
|
|
76
|
+
*/
|
|
77
|
+
getSpells(): RegisteredSpell[];
|
|
78
|
+
/**
|
|
79
|
+
* Get spells by level
|
|
80
|
+
*
|
|
81
|
+
* Builds index from ExtensionManager data with caching.
|
|
82
|
+
*
|
|
83
|
+
* @param level - Spell level (0-9)
|
|
84
|
+
* @returns Array of spells at this level
|
|
85
|
+
*/
|
|
86
|
+
getSpellsByLevel(level: number): RegisteredSpell[];
|
|
87
|
+
/**
|
|
88
|
+
* Get spells by school
|
|
89
|
+
*
|
|
90
|
+
* Builds index from ExtensionManager data with caching.
|
|
91
|
+
*
|
|
92
|
+
* @param school - Spell school to filter by
|
|
93
|
+
* @returns Array of spells from this school
|
|
94
|
+
*/
|
|
95
|
+
getSpellsBySchool(school: SpellSchool): RegisteredSpell[];
|
|
96
|
+
/**
|
|
97
|
+
* Get spells available to a specific class
|
|
98
|
+
*
|
|
99
|
+
* Filters spells by their classes property.
|
|
100
|
+
*
|
|
101
|
+
* @param characterClass - Class to get spells for
|
|
102
|
+
* @returns Array of spells available to this class
|
|
103
|
+
*/
|
|
104
|
+
getSpellsForClass(characterClass: Class): RegisteredSpell[];
|
|
105
|
+
/**
|
|
106
|
+
* Get spells available to a character (prerequisites met)
|
|
107
|
+
*
|
|
108
|
+
* Filters all spells by character prerequisites.
|
|
109
|
+
*
|
|
110
|
+
* @param character - Character sheet to validate against
|
|
111
|
+
* @returns Array of spells the character can learn
|
|
112
|
+
*/
|
|
113
|
+
getAvailableSpells(character: CharacterSheet): RegisteredSpell[];
|
|
114
|
+
/**
|
|
115
|
+
* Get the spell list for a class (spell IDs)
|
|
116
|
+
*
|
|
117
|
+
* Reads from ExtensionManager.
|
|
118
|
+
*
|
|
119
|
+
* @param characterClass - Class to get spell list for
|
|
120
|
+
* @returns Array of spell IDs for this class
|
|
121
|
+
*/
|
|
122
|
+
getClassSpellList(characterClass: Class): string[];
|
|
123
|
+
/**
|
|
124
|
+
* Get spell slots for a class at a specific level
|
|
125
|
+
*
|
|
126
|
+
* Note: This delegates to the getSpellSlotsForClass helper from constants.ts
|
|
127
|
+
* which handles both default and custom class spell slot progressions.
|
|
128
|
+
*
|
|
129
|
+
* @param characterClass - Class to get spell slots for
|
|
130
|
+
* @param level - Character level (1-20)
|
|
131
|
+
* @returns Number of spell slots at this level, or 0 if not a spellcaster
|
|
132
|
+
*/
|
|
133
|
+
getSpellSlotsForClass(characterClass: Class, level: number): number;
|
|
134
|
+
/**
|
|
135
|
+
* Validate spell prerequisites against a character
|
|
136
|
+
*
|
|
137
|
+
* Checks if a character meets all prerequisite requirements for a spell.
|
|
138
|
+
* This is a convenience method that delegates to SpellValidator.
|
|
139
|
+
*
|
|
140
|
+
* @param spell - The spell whose prerequisites to validate
|
|
141
|
+
* @param character - The character sheet to validate against
|
|
142
|
+
* @returns Validation result with unmet prerequisites if any
|
|
143
|
+
*/
|
|
144
|
+
validatePrerequisites(spell: RegisteredSpell, character: CharacterSheet): SpellValidationResult;
|
|
145
|
+
/**
|
|
146
|
+
* Validate spell data structure
|
|
147
|
+
*
|
|
148
|
+
* @param spell - Spell object to validate
|
|
149
|
+
* @returns Validation result with any errors
|
|
150
|
+
*/
|
|
151
|
+
validateSpell(spell: RegisteredSpell): SpellValidationResult;
|
|
152
|
+
/**
|
|
153
|
+
* Check if a spell exists
|
|
154
|
+
*
|
|
155
|
+
* @param spellId - Spell ID to check
|
|
156
|
+
* @returns True if spell exists
|
|
157
|
+
*/
|
|
158
|
+
hasSpell(spellId: string): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Get total spell count
|
|
161
|
+
*
|
|
162
|
+
* @returns Total number of registered spells
|
|
163
|
+
*/
|
|
164
|
+
getSpellCount(): number;
|
|
165
|
+
/**
|
|
166
|
+
* Get spells by source
|
|
167
|
+
*
|
|
168
|
+
* @param source - 'default' or 'custom'
|
|
169
|
+
* @returns Array of spells from this source
|
|
170
|
+
*/
|
|
171
|
+
getSpellsBySource(source: 'default' | 'custom'): RegisteredSpell[];
|
|
172
|
+
/**
|
|
173
|
+
* Get query statistics
|
|
174
|
+
*
|
|
175
|
+
* @returns Statistics about registered spells
|
|
176
|
+
*/
|
|
177
|
+
getQueryStats(): {
|
|
178
|
+
totalSpells: number;
|
|
179
|
+
defaultSpells: number;
|
|
180
|
+
customSpells: number;
|
|
181
|
+
spellsByLevel: Record<number, number>;
|
|
182
|
+
spellsBySchool: Record<SpellSchool, number>;
|
|
183
|
+
classesWithSpells: number;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get the global SpellQuery instance
|
|
188
|
+
*
|
|
189
|
+
* Convenience function for accessing the singleton.
|
|
190
|
+
*
|
|
191
|
+
* @returns SpellQuery instance
|
|
192
|
+
*/
|
|
193
|
+
export declare function getSpellQuery(): SpellQuery;
|
|
194
|
+
//# sourceMappingURL=SpellQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpellQuery.d.ts","sourceRoot":"","sources":["../../../src/core/spells/SpellQuery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjF,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,KAAK;IAC1C,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IACpC,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,UAAU,CAA+C;IACjE,OA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AAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC5C,iBAAiB,EAAE,MAAM,CAAC;KAC7B;CA0CJ;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spell Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for spell-related structures.
|
|
5
|
+
* Moved from src/utils/constants.ts for better module organization.
|
|
6
|
+
*/
|
|
7
|
+
import type { Class, Race } from '../types/Character.js';
|
|
8
|
+
/**
|
|
9
|
+
* D&D 5e Schools of Magic
|
|
10
|
+
*
|
|
11
|
+
* The eight schools of magic categorize spells by their effects and methods.
|
|
12
|
+
* Used by the Spell interface and validation systems.
|
|
13
|
+
*/
|
|
14
|
+
export type SpellSchool = 'Abjuration' | 'Conjuration' | 'Divination' | 'Enchantment' | 'Evocation' | 'Illusion' | 'Necromancy' | 'Transmutation';
|
|
15
|
+
/**
|
|
16
|
+
* Prerequisites for learning a spell
|
|
17
|
+
*
|
|
18
|
+
* Spells can require:
|
|
19
|
+
* - Level thresholds
|
|
20
|
+
* - Caster level thresholds
|
|
21
|
+
* - Ability score minimums
|
|
22
|
+
* - Specific class
|
|
23
|
+
* - Specific race
|
|
24
|
+
* - Specific features (by feature ID)
|
|
25
|
+
* - Specific spells (must be known first)
|
|
26
|
+
* - Specific skills (by proficiency)
|
|
27
|
+
* - Custom conditions
|
|
28
|
+
*/
|
|
29
|
+
export interface SpellPrerequisite {
|
|
30
|
+
/** Minimum character level */
|
|
31
|
+
level?: number;
|
|
32
|
+
/** Minimum spellcaster level (if different from character level) */
|
|
33
|
+
casterLevel?: number;
|
|
34
|
+
/** Minimum ability scores */
|
|
35
|
+
abilities?: Partial<Record<'STR' | 'DEX' | 'CON' | 'INT' | 'WIS' | 'CHA', number>>;
|
|
36
|
+
/** Specific class required */
|
|
37
|
+
class?: Class;
|
|
38
|
+
/** Specific race required */
|
|
39
|
+
race?: Race;
|
|
40
|
+
/** Features that must be learned first (by feature ID) */
|
|
41
|
+
features?: string[];
|
|
42
|
+
/** Spells that must be known first (by spell name) */
|
|
43
|
+
spells?: string[];
|
|
44
|
+
/** Skills that must be proficient first (by skill ID) */
|
|
45
|
+
skills?: string[];
|
|
46
|
+
/** Custom condition */
|
|
47
|
+
custom?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Spell data structure
|
|
51
|
+
*/
|
|
52
|
+
export interface Spell {
|
|
53
|
+
/** Unique identifier (optional for backward compatibility) */
|
|
54
|
+
id?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
level: number;
|
|
57
|
+
school: SpellSchool;
|
|
58
|
+
casting_time: string;
|
|
59
|
+
range: string;
|
|
60
|
+
components: string[];
|
|
61
|
+
duration: string;
|
|
62
|
+
/** Optional description of what the spell does */
|
|
63
|
+
description?: string;
|
|
64
|
+
/** Optional icon URL for small UI display */
|
|
65
|
+
icon?: string;
|
|
66
|
+
/** Optional image URL for larger display */
|
|
67
|
+
image?: string;
|
|
68
|
+
/** Prerequisites for learning this spell */
|
|
69
|
+
prerequisites?: SpellPrerequisite;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=SpellTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpellTypes.d.ts","sourceRoot":"","sources":["../../../src/core/spells/SpellTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,GAAG,eAAe,CAAC;AAElJ;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAC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+
* Provides comprehensive validation for all spell properties including:
|
|
6
|
+
* - Required fields (name, level, school, casting_time, range, components, duration)
|
|
7
|
+
* - Valid enum values (school)
|
|
8
|
+
* - Level validation (0-9)
|
|
9
|
+
* - Optional fields (id, description, prerequisites)
|
|
10
|
+
* Uses shared AbilityConstants for code deduplication.
|
|
11
|
+
*/
|
|
12
|
+
import type { SpellPrerequisite, Spell } from './SpellTypes.js';
|
|
13
|
+
import type { Ability, CharacterSheet } from '../types/Character.js';
|
|
14
|
+
/**
|
|
15
|
+
* Validation result type
|
|
16
|
+
*/
|
|
17
|
+
export interface SpellValidationResult {
|
|
18
|
+
/** Whether the spell/prerequisite is valid */
|
|
19
|
+
valid: boolean;
|
|
20
|
+
/** Array of error messages (empty if valid) */
|
|
21
|
+
errors: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* SpellValidator - Validates spells and their prerequisites
|
|
25
|
+
*
|
|
26
|
+
* Provides strict validation to ensure spells
|
|
27
|
+
* meet all requirements and can validate prerequisites
|
|
28
|
+
* against a character sheet.
|
|
29
|
+
*/
|
|
30
|
+
export declare class SpellValidator {
|
|
31
|
+
/**
|
|
32
|
+
* Validate a spell
|
|
33
|
+
*
|
|
34
|
+
* Checks all required fields, enum values, and data constraints.
|
|
35
|
+
*
|
|
36
|
+
* @param spell - The spell to validate
|
|
37
|
+
* @returns Validation result with errors if any
|
|
38
|
+
*/
|
|
39
|
+
static validateSpell(spell: unknown): SpellValidationResult;
|
|
40
|
+
/**
|
|
41
|
+
* Validate an array of spells
|
|
42
|
+
*
|
|
43
|
+
* @param spells - Array of spells to validate
|
|
44
|
+
* @returns Validation result with combined errors
|
|
45
|
+
*/
|
|
46
|
+
static validateSpells(spells: unknown[]): SpellValidationResult;
|
|
47
|
+
/**
|
|
48
|
+
* Validate spell prerequisites schema
|
|
49
|
+
*
|
|
50
|
+
* Validates that the prerequisites object has valid structure.
|
|
51
|
+
* Uses the shared PrerequisiteValidator for consistency.
|
|
52
|
+
*
|
|
53
|
+
* @param prerequisites - The prerequisites to validate
|
|
54
|
+
* @returns Validation result with errors if any
|
|
55
|
+
*/
|
|
56
|
+
static validatePrerequisites(prerequisites: unknown): SpellValidationResult;
|
|
57
|
+
/**
|
|
58
|
+
* Validate spell prerequisites against a character
|
|
59
|
+
*
|
|
60
|
+
* Checks if a character meets all prerequisite requirements for a spell.
|
|
61
|
+
* Uses the shared PrerequisiteValidator for consistency across all systems.
|
|
62
|
+
*
|
|
63
|
+
* @param prerequisites - The spell prerequisites to validate
|
|
64
|
+
* @param character - The character sheet to validate against
|
|
65
|
+
* @returns Validation result with unmet prerequisites if any
|
|
66
|
+
*/
|
|
67
|
+
static validateSpellPrerequisites(prerequisites: SpellPrerequisite | undefined, character: CharacterSheet): SpellValidationResult;
|
|
68
|
+
/**
|
|
69
|
+
* Check if a string is a valid ability score
|
|
70
|
+
*
|
|
71
|
+
* Re-exports the shared isValidAbility function for convenience.
|
|
72
|
+
*
|
|
73
|
+
* @param ability - The ability string to check
|
|
74
|
+
* @returns True if it's a valid ability
|
|
75
|
+
*/
|
|
76
|
+
static isValidAbility(ability: string): ability is Ability;
|
|
77
|
+
/**
|
|
78
|
+
* Check if a string is a valid spell school
|
|
79
|
+
*
|
|
80
|
+
* @param school - The school string to check
|
|
81
|
+
* @returns True if it's a valid school
|
|
82
|
+
*/
|
|
83
|
+
static isValidSchool(school: string): school is Spell['school'];
|
|
84
|
+
/**
|
|
85
|
+
* Check if a number is a valid spell level
|
|
86
|
+
*
|
|
87
|
+
* @param level - The level to check
|
|
88
|
+
* @returns True if it's a valid spell level
|
|
89
|
+
*/
|
|
90
|
+
static isValidSpellLevel(level: number): boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Helper function to validate a single spell
|
|
94
|
+
*
|
|
95
|
+
* Convenience function for quick validation.
|
|
96
|
+
*
|
|
97
|
+
* @param spell - The spell to validate
|
|
98
|
+
* @returns Validation result with errors if any
|
|
99
|
+
*/
|
|
100
|
+
export declare function validateSpell(spell: unknown): SpellValidationResult;
|
|
101
|
+
/**
|
|
102
|
+
* Helper function to validate an array of spells
|
|
103
|
+
*
|
|
104
|
+
* Convenience function for batch validation.
|
|
105
|
+
*
|
|
106
|
+
* @param spells - Array of spells to validate
|
|
107
|
+
* @returns Validation result with combined errors
|
|
108
|
+
*/
|
|
109
|
+
export declare function validateSpells(spells: unknown[]): SpellValidationResult;
|
|
110
|
+
/**
|
|
111
|
+
* Helper function to validate spell prerequisites schema
|
|
112
|
+
*
|
|
113
|
+
* Convenience function for quick validation.
|
|
114
|
+
*
|
|
115
|
+
* @param prerequisites - The prerequisites to validate
|
|
116
|
+
* @returns Validation result with errors if any
|
|
117
|
+
*/
|
|
118
|
+
export declare function validateSpellPrerequisitesSchema(prerequisites: unknown): SpellValidationResult;
|
|
119
|
+
/**
|
|
120
|
+
* Helper function to validate spell prerequisites against a character
|
|
121
|
+
*
|
|
122
|
+
* Convenience function for quick validation.
|
|
123
|
+
*
|
|
124
|
+
* @param prerequisites - The spell prerequisites to validate
|
|
125
|
+
* @param character - The character sheet to validate against
|
|
126
|
+
* @returns Validation result with unmet prerequisites if any
|
|
127
|
+
*/
|
|
128
|
+
export declare function validateSpellPrerequisites(prerequisites: SpellPrerequisite | undefined, character: CharacterSheet): SpellValidationResult;
|
|
129
|
+
//# sourceMappingURL=SpellValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpellValidator.d.ts","sourceRoot":"","sources":["../../../src/core/spells/SpellValidator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AA6BrE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,8CAA8C;IAC9C,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;I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query, and prerequisite checking functionality.
|
|
5
|
+
*/
|
|
6
|
+
export { SpellValidator, validateSpell, validateSpells, validateSpellPrerequisitesSchema, validateSpellPrerequisites } from './SpellValidator.js';
|
|
7
|
+
export { SpellQuery, getSpellQuery } from './SpellQuery.js';
|
|
8
|
+
export type { SpellPrerequisite, Spell, SpellSchool } from './SpellTypes.js';
|
|
9
|
+
export type { RegisteredSpell } from './SpellQuery.js';
|
|
10
|
+
export type { SpellValidationResult } from './SpellValidator.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/spells/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAClJ,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG5D,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio analysis type definitions
|
|
3
|
+
*/
|
|
4
|
+
export interface AudioProfile {
|
|
5
|
+
/** Bass dominance (0.0 - 1.0) */
|
|
6
|
+
bass_dominance: number;
|
|
7
|
+
/** Mid-range dominance (0.0 - 1.0) */
|
|
8
|
+
mid_dominance: number;
|
|
9
|
+
/** Treble dominance (0.0 - 1.0) */
|
|
10
|
+
treble_dominance: number;
|
|
11
|
+
/** Average amplitude (0.0 - 1.0) */
|
|
12
|
+
average_amplitude: number;
|
|
13
|
+
/** Advanced metrics (optional) */
|
|
14
|
+
spectral_centroid?: number;
|
|
15
|
+
spectral_rolloff?: number;
|
|
16
|
+
zero_crossing_rate?: number;
|
|
17
|
+
/** Color palette extracted from artwork (optional) */
|
|
18
|
+
color_palette?: ColorPalette;
|
|
19
|
+
/** Analysis metadata */
|
|
20
|
+
analysis_metadata: {
|
|
21
|
+
/** Duration of audio analyzed in seconds */
|
|
22
|
+
duration_analyzed: number;
|
|
23
|
+
/** Whether full buffer was analyzed (true for files < 3s) */
|
|
24
|
+
full_buffer_analyzed: boolean;
|
|
25
|
+
/** Sample positions used (percentages) */
|
|
26
|
+
sample_positions: number[];
|
|
27
|
+
/** Timestamp of analysis */
|
|
28
|
+
analyzed_at: string;
|
|
29
|
+
};
|
|
30
|
+
/** RMS (Root Mean Square) energy (0.0 - 1.0) */
|
|
31
|
+
rms_energy?: number;
|
|
32
|
+
/** Dynamic range (Peak - RMS) (0.0 - 1.0) */
|
|
33
|
+
dynamic_range?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Event in a full timeline analysis
|
|
37
|
+
*/
|
|
38
|
+
export interface AudioTimelineEvent {
|
|
39
|
+
timestamp: number;
|
|
40
|
+
duration: number;
|
|
41
|
+
bass: number;
|
|
42
|
+
mid: number;
|
|
43
|
+
treble: number;
|
|
44
|
+
amplitude: number;
|
|
45
|
+
rms_energy: number;
|
|
46
|
+
peak: number;
|
|
47
|
+
dynamic_range: number;
|
|
48
|
+
spectral_centroid: number;
|
|
49
|
+
spectral_rolloff: number;
|
|
50
|
+
zero_crossing_rate: number;
|
|
51
|
+
}
|
|
52
|
+
export interface ColorPalette {
|
|
53
|
+
/** Dominant colors ranked by frequency (hex format) */
|
|
54
|
+
colors: string[];
|
|
55
|
+
/** Primary color (most dominant) */
|
|
56
|
+
primary_color: string;
|
|
57
|
+
/** Secondary color */
|
|
58
|
+
secondary_color?: string;
|
|
59
|
+
/** Accent color */
|
|
60
|
+
accent_color?: string;
|
|
61
|
+
/** Average brightness (0.0 - 1.0) */
|
|
62
|
+
brightness: number;
|
|
63
|
+
/** Average saturation (0.0 - 1.0) */
|
|
64
|
+
saturation: number;
|
|
65
|
+
/** Is the image monochrome? */
|
|
66
|
+
is_monochrome: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Frequency bands separated from audio analysis
|
|
70
|
+
*
|
|
71
|
+
* Rebalanced v2 ranges prevent treble dominance:
|
|
72
|
+
* - Bass: 20Hz - 400Hz (380 Hz range, 11% of spectrum)
|
|
73
|
+
* - Mid: 400Hz - 4kHz (3,600 Hz range, 52% of spectrum)
|
|
74
|
+
* - Treble: 4kHz - 14kHz (10,000 Hz range, 37% of spectrum)
|
|
75
|
+
*
|
|
76
|
+
* Previous v1 ranges (imbalanced):
|
|
77
|
+
* - Bass: 20Hz - 250Hz (only 3% of spectrum)
|
|
78
|
+
* - Mid: 250Hz - 4kHz (47% of spectrum)
|
|
79
|
+
* - Treble: 4kHz - 20kHz (200% of spectrum!)
|
|
80
|
+
*/
|
|
81
|
+
export interface FrequencyBands {
|
|
82
|
+
/** Bass frequencies (20Hz - 400Hz) */
|
|
83
|
+
bass: number[];
|
|
84
|
+
/** Mid frequencies (400Hz - 4kHz) */
|
|
85
|
+
mid: number[];
|
|
86
|
+
/** Treble frequencies (4kHz - 14kHz) */
|
|
87
|
+
treble: number[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A detected classification tag (genre, mood, etc) with its confidence score
|
|
91
|
+
*/
|
|
92
|
+
export interface ClassificationTag {
|
|
93
|
+
/** The name of the tag (e.g. "rock", "happy", "party") */
|
|
94
|
+
name: string;
|
|
95
|
+
/** Confidence score from the ML model (0.0 to 1.0) */
|
|
96
|
+
confidence: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Vibe and engagement metrics extracted from audio
|
|
100
|
+
*/
|
|
101
|
+
export interface VibeMetrics {
|
|
102
|
+
/** Suitability for dancing (0.0 - 1.0) */
|
|
103
|
+
danceability?: number;
|
|
104
|
+
/** Perceived energy level (0.0 - 1.0) */
|
|
105
|
+
energy?: number;
|
|
106
|
+
/** Emotional positivity/happiness (0.0 - 1.0) */
|
|
107
|
+
valence?: number;
|
|
108
|
+
/** How "catchy" or engaging the track is (0.0 - 1.0) */
|
|
109
|
+
engagement?: number;
|
|
110
|
+
/** Likelihood of being acoustic vs electronic (0.0 - 1.0, >0.5 is more electronic) */
|
|
111
|
+
electronic_probability?: number;
|
|
112
|
+
/** Likelihood of being instrumental vs vocal (0.0 - 1.0, >0.5 is more instrumental) */
|
|
113
|
+
instrumental_probability?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The output profile from the ML-based MusicClassifier
|
|
117
|
+
*/
|
|
118
|
+
export interface MusicClassificationProfile {
|
|
119
|
+
/** Top detected genres */
|
|
120
|
+
genres: ClassificationTag[];
|
|
121
|
+
/** Top detected moods and themes */
|
|
122
|
+
moods: ClassificationTag[];
|
|
123
|
+
/** Highest confidence genre */
|
|
124
|
+
primary_genre: string;
|
|
125
|
+
/** Semantic mood tags (highest confidence) */
|
|
126
|
+
mood_tags: string[];
|
|
127
|
+
/** High-level vibe metrics */
|
|
128
|
+
vibe_metrics?: VibeMetrics;
|
|
129
|
+
/** Analysis metadata */
|
|
130
|
+
analysis_metadata: {
|
|
131
|
+
/** ML models used in analysis */
|
|
132
|
+
models_used: string[];
|
|
133
|
+
/** Legacy: The primary model used (first in models_used) */
|
|
134
|
+
model_used?: string;
|
|
135
|
+
/** Legacy: Number of frames processed (usually 0) */
|
|
136
|
+
frames_analyzed?: number;
|
|
137
|
+
/** Duration of audio analyzed in seconds */
|
|
138
|
+
duration_analyzed: number;
|
|
139
|
+
/** Timestamp of analysis */
|
|
140
|
+
analyzed_at: string;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=AudioProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioProfile.d.ts","sourceRoot":"","sources":["../../../src/core/types/AudioProfile.ts"],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