@datamoc/mw_games 0.43.0 → 0.45.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/3d/models.d.ts +1 -0
- package/3d/models.js +1 -0
- package/3d.d.ts +1 -0
- package/3d.js +1 -0
- package/README.md +5 -710
- package/actors.d.ts +1 -0
- package/actors.js +1 -0
- package/ai/lua.d.ts +1 -0
- package/ai/lua.js +1 -0
- package/ai.d.ts +1 -0
- package/ai.js +1 -0
- package/assets/binary.d.ts +1 -0
- package/assets/binary.js +1 -0
- package/assets/paths.d.ts +1 -0
- package/assets/paths.js +1 -0
- package/assets.d.ts +1 -0
- package/assets.js +1 -0
- package/audio.d.ts +1 -0
- package/audio.js +1 -0
- package/battle.d.ts +1 -0
- package/battle.js +1 -0
- package/board.d.ts +1 -0
- package/board.js +1 -0
- package/core.d.ts +1 -0
- package/core.js +1 -0
- package/headless.d.ts +1 -0
- package/headless.js +1 -0
- package/i18n.d.ts +1 -0
- package/i18n.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/mwl/presentation.d.ts +1 -0
- package/mwl/presentation.js +1 -0
- package/mwl/pyroeis.d.ts +1 -0
- package/mwl/pyroeis.js +1 -0
- package/mwl.d.ts +1 -0
- package/mwl.js +1 -0
- package/package.json +212 -387
- package/physics/xpbd.d.ts +1 -0
- package/physics/xpbd.js +1 -0
- package/physics.d.ts +1 -0
- package/physics.js +1 -0
- package/roguelike.d.ts +1 -0
- package/roguelike.js +1 -0
- package/rpg.d.ts +1 -0
- package/rpg.js +1 -0
- package/simulation.d.ts +1 -0
- package/simulation.js +1 -0
- package/skeleton.d.ts +1 -0
- package/skeleton.js +1 -0
- package/testing.d.ts +1 -0
- package/testing.js +1 -0
- package/threads.d.ts +1 -0
- package/threads.js +1 -0
- package/tools/asset-report.d.mts +1 -37
- package/tools/asset-report.mjs +1 -157
- package/tools/audio.d.mts +1 -0
- package/tools/audio.mjs +1 -0
- package/tools/audit-adoptions.d.mts +1 -65
- package/tools/audit-adoptions.mjs +1 -252
- package/tools/benchmark-browser.d.mts +1 -33
- package/tools/benchmark-browser.mjs +1 -169
- package/tools/benchmark-history.d.mts +1 -8
- package/tools/benchmark-history.mjs +1 -31
- package/tools/browser-driver.d.mts +1 -122
- package/tools/browser-driver.mjs +1 -861
- package/tools/browser-smoke.d.mts +1 -30
- package/tools/browser-smoke.mjs +1 -184
- package/tools/build-tablebases.d.mts +1 -22
- package/tools/build-tablebases.mjs +1 -557
- package/tools/bundle-size.d.mts +1 -11
- package/tools/bundle-size.mjs +1 -142
- package/tools/classic-html.d.mts +1 -6
- package/tools/classic-html.mjs +1 -69
- package/tools/compile-openings.d.mts +1 -20
- package/tools/compile-openings.mjs +1 -138
- package/tools/compile-resources.d.mts +1 -66
- package/tools/compile-resources.mjs +1 -406
- package/tools/compress-dist.d.mts +1 -42
- package/tools/compress-dist.mjs +1 -193
- package/tools/csp.d.mts +1 -7
- package/tools/csp.mjs +1 -65
- package/tools/emit-page.d.mts +1 -61
- package/tools/emit-page.mjs +1 -273
- package/tools/extract-html.d.mts +1 -18
- package/tools/extract-html.mjs +1 -235
- package/tools/extract-rgssad.d.mts +1 -5
- package/tools/extract-rgssad.mjs +1 -64
- package/tools/find-chrome.d.mts +1 -7
- package/tools/find-chrome.mjs +1 -106
- package/tools/i18n-edit.d.mts +1 -29
- package/tools/i18n-edit.mjs +1 -748
- package/tools/init.d.mts +1 -5
- package/tools/init.mjs +1 -155
- package/tools/make-example-assets.d.mts +1 -2
- package/tools/make-example-assets.mjs +1 -731
- package/tools/multiplayer-server.d.mts +1 -27
- package/tools/multiplayer-server.mjs +1 -199
- package/tools/play-uci.d.mts +1 -26
- package/tools/play-uci.mjs +1 -205
- package/tools/sbom.d.mts +1 -83
- package/tools/sbom.mjs +1 -340
- package/tools/single-file.d.mts +1 -33
- package/tools/single-file.mjs +1 -239
- package/tools/soundfonts.d.mts +1 -79
- package/tools/soundfonts.mjs +1 -301
- package/tools/svg-optimise.d.mts +1 -8
- package/tools/svg-optimise.mjs +1 -45
- package/tools/verify-scenarios.d.mts +1 -15
- package/tools/verify-scenarios.mjs +1 -133
- package/tools/vite.d.mts +1 -17
- package/tools/vite.mjs +1 -102
- package/tools/webp-convert.d.mts +1 -8
- package/tools/webp-convert.mjs +1 -98
- package/two-d/pixi-interop.d.ts +1 -0
- package/two-d/pixi-interop.js +1 -0
- package/two-d/presentation.d.ts +1 -0
- package/two-d/presentation.js +1 -0
- package/two-d/render.d.ts +1 -0
- package/two-d/render.js +1 -0
- package/two-d/stage.d.ts +1 -0
- package/two-d/stage.js +1 -0
- package/two-d/ui.d.ts +1 -0
- package/two-d/ui.js +1 -0
- package/two-d.d.ts +1 -0
- package/two-d.js +1 -0
- package/world.d.ts +1 -0
- package/world.js +1 -0
- package/CHANGELOG.md +0 -3129
- package/LICENSE +0 -373
- package/MWG - Best Practices.md +0 -97
- package/MWG - Deep Code and Architecture Review.md +0 -238
- package/REFERENCE.md +0 -2180
- package/api-surface.json +0 -17102
- package/data/microgm-essential.PROVENANCE.md +0 -13
- package/data/microgm-essential.sf2 +0 -0
- package/data/microgm-opt.PROVENANCE.md +0 -23
- package/data/microgm-opt.sf2 +0 -0
- package/data/soundfont-catalog.json +0 -191
- package/dist/actors/Advancement.d.ts +0 -90
- package/dist/actors/Advancement.d.ts.map +0 -1
- package/dist/actors/Advancement.js +0 -115
- package/dist/actors/Advancement.js.map +0 -1
- package/dist/actors/Affix.d.ts +0 -96
- package/dist/actors/Affix.d.ts.map +0 -1
- package/dist/actors/Affix.js +0 -68
- package/dist/actors/Affix.js.map +0 -1
- package/dist/actors/Appearances.d.ts +0 -48
- package/dist/actors/Appearances.d.ts.map +0 -1
- package/dist/actors/Appearances.js +0 -62
- package/dist/actors/Appearances.js.map +0 -1
- package/dist/actors/Aura.d.ts +0 -45
- package/dist/actors/Aura.d.ts.map +0 -1
- package/dist/actors/Aura.js +0 -85
- package/dist/actors/Aura.js.map +0 -1
- package/dist/actors/Barrier.d.ts +0 -60
- package/dist/actors/Barrier.d.ts.map +0 -1
- package/dist/actors/Barrier.js +0 -70
- package/dist/actors/Barrier.js.map +0 -1
- package/dist/actors/Charges.d.ts +0 -66
- package/dist/actors/Charges.d.ts.map +0 -1
- package/dist/actors/Charges.js +0 -61
- package/dist/actors/Charges.js.map +0 -1
- package/dist/actors/EntityTemplate.d.ts +0 -127
- package/dist/actors/EntityTemplate.d.ts.map +0 -1
- package/dist/actors/EntityTemplate.js +0 -117
- package/dist/actors/EntityTemplate.js.map +0 -1
- package/dist/actors/Equipment.d.ts +0 -88
- package/dist/actors/Equipment.d.ts.map +0 -1
- package/dist/actors/Equipment.js +0 -107
- package/dist/actors/Equipment.js.map +0 -1
- package/dist/actors/Inventory.d.ts +0 -123
- package/dist/actors/Inventory.d.ts.map +0 -1
- package/dist/actors/Inventory.js +0 -165
- package/dist/actors/Inventory.js.map +0 -1
- package/dist/actors/ItemState.d.ts +0 -43
- package/dist/actors/ItemState.d.ts.map +0 -1
- package/dist/actors/ItemState.js +0 -63
- package/dist/actors/ItemState.js.map +0 -1
- package/dist/actors/ItemStatusEffect.d.ts +0 -40
- package/dist/actors/ItemStatusEffect.d.ts.map +0 -1
- package/dist/actors/ItemStatusEffect.js +0 -39
- package/dist/actors/ItemStatusEffect.js.map +0 -1
- package/dist/actors/Loot.d.ts +0 -38
- package/dist/actors/Loot.d.ts.map +0 -1
- package/dist/actors/Loot.js +0 -28
- package/dist/actors/Loot.js.map +0 -1
- package/dist/actors/Progression.d.ts +0 -52
- package/dist/actors/Progression.d.ts.map +0 -1
- package/dist/actors/Progression.js +0 -59
- package/dist/actors/Progression.js.map +0 -1
- package/dist/actors/Resource.d.ts +0 -53
- package/dist/actors/Resource.d.ts.map +0 -1
- package/dist/actors/Resource.js +0 -58
- package/dist/actors/Resource.js.map +0 -1
- package/dist/actors/Scaling.d.ts +0 -30
- package/dist/actors/Scaling.d.ts.map +0 -1
- package/dist/actors/Scaling.js +0 -9
- package/dist/actors/Scaling.js.map +0 -1
- package/dist/actors/Shop.d.ts +0 -40
- package/dist/actors/Shop.d.ts.map +0 -1
- package/dist/actors/Shop.js +0 -36
- package/dist/actors/Shop.js.map +0 -1
- package/dist/actors/SkillPoints.d.ts +0 -72
- package/dist/actors/SkillPoints.d.ts.map +0 -1
- package/dist/actors/SkillPoints.js +0 -87
- package/dist/actors/SkillPoints.js.map +0 -1
- package/dist/actors/StatBlock.d.ts +0 -86
- package/dist/actors/StatBlock.d.ts.map +0 -1
- package/dist/actors/StatBlock.js +0 -110
- package/dist/actors/StatBlock.js.map +0 -1
- package/dist/actors/StatusEffect.d.ts +0 -67
- package/dist/actors/StatusEffect.d.ts.map +0 -1
- package/dist/actors/StatusEffect.js +0 -59
- package/dist/actors/StatusEffect.js.map +0 -1
- package/dist/actors/Support.d.ts +0 -43
- package/dist/actors/Support.d.ts.map +0 -1
- package/dist/actors/Support.js +0 -71
- package/dist/actors/Support.js.map +0 -1
- package/dist/actors/Traits.d.ts +0 -43
- package/dist/actors/Traits.d.ts.map +0 -1
- package/dist/actors/Traits.js +0 -35
- package/dist/actors/Traits.js.map +0 -1
- package/dist/actors/craft.d.ts +0 -63
- package/dist/actors/craft.d.ts.map +0 -1
- package/dist/actors/craft.js +0 -86
- package/dist/actors/craft.js.map +0 -1
- package/dist/actors/index.d.ts +0 -46
- package/dist/actors/index.d.ts.map +0 -1
- package/dist/actors/index.js +0 -24
- package/dist/actors/index.js.map +0 -1
- package/dist/actors/skillCheck.d.ts +0 -21
- package/dist/actors/skillCheck.d.ts.map +0 -1
- package/dist/actors/skillCheck.js +0 -24
- package/dist/actors/skillCheck.js.map +0 -1
- package/dist/ai/Heuristics.d.ts +0 -240
- package/dist/ai/Heuristics.d.ts.map +0 -1
- package/dist/ai/Heuristics.js +0 -298
- package/dist/ai/Heuristics.js.map +0 -1
- package/dist/ai/Neural.d.ts +0 -65
- package/dist/ai/Neural.d.ts.map +0 -1
- package/dist/ai/Neural.js +0 -169
- package/dist/ai/Neural.js.map +0 -1
- package/dist/ai/Suggest.d.ts +0 -54
- package/dist/ai/Suggest.d.ts.map +0 -1
- package/dist/ai/Suggest.js +0 -48
- package/dist/ai/Suggest.js.map +0 -1
- package/dist/ai/index.d.ts +0 -136
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js +0 -207
- package/dist/ai/index.js.map +0 -1
- package/dist/ai/lua.d.ts +0 -74
- package/dist/ai/lua.d.ts.map +0 -1
- package/dist/ai/lua.js +0 -217
- package/dist/ai/lua.js.map +0 -1
- package/dist/ai/score.d.ts +0 -162
- package/dist/ai/score.d.ts.map +0 -1
- package/dist/ai/score.js +0 -147
- package/dist/ai/score.js.map +0 -1
- package/dist/ai/search.d.ts +0 -108
- package/dist/ai/search.d.ts.map +0 -1
- package/dist/ai/search.js +0 -148
- package/dist/ai/search.js.map +0 -1
- package/dist/assets/ByteProgress.d.ts +0 -37
- package/dist/assets/ByteProgress.d.ts.map +0 -1
- package/dist/assets/ByteProgress.js +0 -54
- package/dist/assets/ByteProgress.js.map +0 -1
- package/dist/assets/Streaming.d.ts +0 -56
- package/dist/assets/Streaming.d.ts.map +0 -1
- package/dist/assets/Streaming.js +0 -100
- package/dist/assets/Streaming.js.map +0 -1
- package/dist/assets/SvgParts.d.ts +0 -31
- package/dist/assets/SvgParts.d.ts.map +0 -1
- package/dist/assets/SvgParts.js +0 -54
- package/dist/assets/SvgParts.js.map +0 -1
- package/dist/assets/SvgSource.d.ts +0 -3
- package/dist/assets/SvgSource.d.ts.map +0 -1
- package/dist/assets/SvgSource.js +0 -22
- package/dist/assets/SvgSource.js.map +0 -1
- package/dist/assets/binary.d.ts +0 -52
- package/dist/assets/binary.d.ts.map +0 -1
- package/dist/assets/binary.js +0 -57
- package/dist/assets/binary.js.map +0 -1
- package/dist/assets/index.d.ts +0 -27
- package/dist/assets/index.d.ts.map +0 -1
- package/dist/assets/index.js +0 -20
- package/dist/assets/index.js.map +0 -1
- package/dist/assets/loader.d.ts +0 -70
- package/dist/assets/loader.d.ts.map +0 -1
- package/dist/assets/loader.js +0 -115
- package/dist/assets/loader.js.map +0 -1
- package/dist/assets/paths.d.ts +0 -73
- package/dist/assets/paths.d.ts.map +0 -1
- package/dist/assets/paths.js +0 -91
- package/dist/assets/paths.js.map +0 -1
- package/dist/assets/svg.d.ts +0 -87
- package/dist/assets/svg.d.ts.map +0 -1
- package/dist/assets/svg.js +0 -166
- package/dist/assets/svg.js.map +0 -1
- package/dist/audio/AudioLoader.d.ts +0 -28
- package/dist/audio/AudioLoader.d.ts.map +0 -1
- package/dist/audio/AudioLoader.js +0 -53
- package/dist/audio/AudioLoader.js.map +0 -1
- package/dist/audio/Captions.d.ts +0 -27
- package/dist/audio/Captions.d.ts.map +0 -1
- package/dist/audio/Captions.js +0 -16
- package/dist/audio/Captions.js.map +0 -1
- package/dist/audio/Channels.d.ts +0 -218
- package/dist/audio/Channels.d.ts.map +0 -1
- package/dist/audio/Channels.js +0 -486
- package/dist/audio/Channels.js.map +0 -1
- package/dist/audio/LoopTags.d.ts +0 -37
- package/dist/audio/LoopTags.d.ts.map +0 -1
- package/dist/audio/LoopTags.js +0 -116
- package/dist/audio/LoopTags.js.map +0 -1
- package/dist/audio/Midi.d.ts +0 -184
- package/dist/audio/Midi.d.ts.map +0 -1
- package/dist/audio/Midi.js +0 -339
- package/dist/audio/Midi.js.map +0 -1
- package/dist/audio/MidiRender.d.ts +0 -113
- package/dist/audio/MidiRender.d.ts.map +0 -1
- package/dist/audio/MidiRender.js +0 -371
- package/dist/audio/MidiRender.js.map +0 -1
- package/dist/audio/Music.d.ts +0 -70
- package/dist/audio/Music.d.ts.map +0 -1
- package/dist/audio/Music.js +0 -191
- package/dist/audio/Music.js.map +0 -1
- package/dist/audio/MusicPlayer.d.ts +0 -80
- package/dist/audio/MusicPlayer.d.ts.map +0 -1
- package/dist/audio/MusicPlayer.js +0 -147
- package/dist/audio/MusicPlayer.js.map +0 -1
- package/dist/audio/Orchestrator.d.ts +0 -58
- package/dist/audio/Orchestrator.d.ts.map +0 -1
- package/dist/audio/Orchestrator.js +0 -74
- package/dist/audio/Orchestrator.js.map +0 -1
- package/dist/audio/Playable.d.ts +0 -31
- package/dist/audio/Playable.d.ts.map +0 -1
- package/dist/audio/Playable.js +0 -29
- package/dist/audio/Playable.js.map +0 -1
- package/dist/audio/Positional.d.ts +0 -125
- package/dist/audio/Positional.d.ts.map +0 -1
- package/dist/audio/Positional.js +0 -135
- package/dist/audio/Positional.js.map +0 -1
- package/dist/audio/SampleDecoder.d.ts +0 -55
- package/dist/audio/SampleDecoder.d.ts.map +0 -1
- package/dist/audio/SampleDecoder.js +0 -74
- package/dist/audio/SampleDecoder.js.map +0 -1
- package/dist/audio/Sound.d.ts +0 -57
- package/dist/audio/Sound.d.ts.map +0 -1
- package/dist/audio/Sound.js +0 -79
- package/dist/audio/Sound.js.map +0 -1
- package/dist/audio/SoundFont.d.ts +0 -192
- package/dist/audio/SoundFont.d.ts.map +0 -1
- package/dist/audio/SoundFont.js +0 -862
- package/dist/audio/SoundFont.js.map +0 -1
- package/dist/audio/Synth.d.ts +0 -64
- package/dist/audio/Synth.d.ts.map +0 -1
- package/dist/audio/Synth.js +0 -133
- package/dist/audio/Synth.js.map +0 -1
- package/dist/audio/humanize/Groove.d.ts +0 -80
- package/dist/audio/humanize/Groove.d.ts.map +0 -1
- package/dist/audio/humanize/Groove.js +0 -102
- package/dist/audio/humanize/Groove.js.map +0 -1
- package/dist/audio/humanize/GrooveConverter.d.ts +0 -49
- package/dist/audio/humanize/GrooveConverter.d.ts.map +0 -1
- package/dist/audio/humanize/GrooveConverter.js +0 -344
- package/dist/audio/humanize/GrooveConverter.js.map +0 -1
- package/dist/audio/humanize/GrooveExtractor.d.ts +0 -49
- package/dist/audio/humanize/GrooveExtractor.d.ts.map +0 -1
- package/dist/audio/humanize/GrooveExtractor.js +0 -179
- package/dist/audio/humanize/GrooveExtractor.js.map +0 -1
- package/dist/audio/humanize/GrooveHumanizer.d.ts +0 -34
- package/dist/audio/humanize/GrooveHumanizer.d.ts.map +0 -1
- package/dist/audio/humanize/GrooveHumanizer.js +0 -37
- package/dist/audio/humanize/GrooveHumanizer.js.map +0 -1
- package/dist/audio/humanize/Humanize.d.ts +0 -54
- package/dist/audio/humanize/Humanize.d.ts.map +0 -1
- package/dist/audio/humanize/Humanize.js +0 -239
- package/dist/audio/humanize/Humanize.js.map +0 -1
- package/dist/audio/humanize/HumanizerFactory.d.ts +0 -68
- package/dist/audio/humanize/HumanizerFactory.d.ts.map +0 -1
- package/dist/audio/humanize/HumanizerFactory.js +0 -84
- package/dist/audio/humanize/HumanizerFactory.js.map +0 -1
- package/dist/audio/humanize/LiteHumanizer.d.ts +0 -30
- package/dist/audio/humanize/LiteHumanizer.d.ts.map +0 -1
- package/dist/audio/humanize/LiteHumanizer.js +0 -35
- package/dist/audio/humanize/LiteHumanizer.js.map +0 -1
- package/dist/audio/humanize/Onsets.d.ts +0 -26
- package/dist/audio/humanize/Onsets.d.ts.map +0 -1
- package/dist/audio/humanize/Onsets.js +0 -164
- package/dist/audio/humanize/Onsets.js.map +0 -1
- package/dist/audio/index.d.ts +0 -43
- package/dist/audio/index.d.ts.map +0 -1
- package/dist/audio/index.js +0 -22
- package/dist/audio/index.js.map +0 -1
- package/dist/battle/AttackDialog.d.ts +0 -75
- package/dist/battle/AttackDialog.d.ts.map +0 -1
- package/dist/battle/AttackDialog.js +0 -115
- package/dist/battle/AttackDialog.js.map +0 -1
- package/dist/battle/AttackPreview.d.ts +0 -70
- package/dist/battle/AttackPreview.d.ts.map +0 -1
- package/dist/battle/AttackPreview.js +0 -78
- package/dist/battle/AttackPreview.js.map +0 -1
- package/dist/battle/BattleAI.d.ts +0 -40
- package/dist/battle/BattleAI.d.ts.map +0 -1
- package/dist/battle/BattleAI.js +0 -63
- package/dist/battle/BattleAI.js.map +0 -1
- package/dist/battle/BattleStats.d.ts +0 -45
- package/dist/battle/BattleStats.d.ts.map +0 -1
- package/dist/battle/BattleStats.js +0 -63
- package/dist/battle/BattleStats.js.map +0 -1
- package/dist/battle/Evolution.d.ts +0 -34
- package/dist/battle/Evolution.d.ts.map +0 -1
- package/dist/battle/Evolution.js +0 -37
- package/dist/battle/Evolution.js.map +0 -1
- package/dist/battle/Field.d.ts +0 -36
- package/dist/battle/Field.d.ts.map +0 -1
- package/dist/battle/Field.js +0 -31
- package/dist/battle/Field.js.map +0 -1
- package/dist/battle/Hooks.d.ts +0 -39
- package/dist/battle/Hooks.d.ts.map +0 -1
- package/dist/battle/Hooks.js +0 -38
- package/dist/battle/Hooks.js.map +0 -1
- package/dist/battle/Move.d.ts +0 -45
- package/dist/battle/Move.d.ts.map +0 -1
- package/dist/battle/Move.js +0 -23
- package/dist/battle/Move.js.map +0 -1
- package/dist/battle/Party.d.ts +0 -32
- package/dist/battle/Party.d.ts.map +0 -1
- package/dist/battle/Party.js +0 -62
- package/dist/battle/Party.js.map +0 -1
- package/dist/battle/Species.d.ts +0 -50
- package/dist/battle/Species.d.ts.map +0 -1
- package/dist/battle/Species.js +0 -41
- package/dist/battle/Species.js.map +0 -1
- package/dist/battle/StatStages.d.ts +0 -52
- package/dist/battle/StatStages.d.ts.map +0 -1
- package/dist/battle/StatStages.js +0 -50
- package/dist/battle/StatStages.js.map +0 -1
- package/dist/battle/TypeMatrix.d.ts +0 -25
- package/dist/battle/TypeMatrix.d.ts.map +0 -1
- package/dist/battle/TypeMatrix.js +0 -35
- package/dist/battle/TypeMatrix.js.map +0 -1
- package/dist/battle/UnitSelector.d.ts +0 -72
- package/dist/battle/UnitSelector.d.ts.map +0 -1
- package/dist/battle/UnitSelector.js +0 -117
- package/dist/battle/UnitSelector.js.map +0 -1
- package/dist/battle/Whiteboard.d.ts +0 -50
- package/dist/battle/Whiteboard.d.ts.map +0 -1
- package/dist/battle/Whiteboard.js +0 -94
- package/dist/battle/Whiteboard.js.map +0 -1
- package/dist/battle/index.d.ts +0 -26
- package/dist/battle/index.d.ts.map +0 -1
- package/dist/battle/index.js +0 -15
- package/dist/battle/index.js.map +0 -1
- package/dist/board/Army.d.ts +0 -92
- package/dist/board/Army.d.ts.map +0 -1
- package/dist/board/Army.js +0 -123
- package/dist/board/Army.js.map +0 -1
- package/dist/board/Classics.d.ts +0 -419
- package/dist/board/Classics.d.ts.map +0 -1
- package/dist/board/Classics.js +0 -754
- package/dist/board/Classics.js.map +0 -1
- package/dist/board/Engine.d.ts +0 -93
- package/dist/board/Engine.d.ts.map +0 -1
- package/dist/board/Engine.js +0 -545
- package/dist/board/Engine.js.map +0 -1
- package/dist/board/FogOfWar.d.ts +0 -79
- package/dist/board/FogOfWar.d.ts.map +0 -1
- package/dist/board/FogOfWar.js +0 -150
- package/dist/board/FogOfWar.js.map +0 -1
- package/dist/board/HexSkirmish.d.ts +0 -213
- package/dist/board/HexSkirmish.d.ts.map +0 -1
- package/dist/board/HexSkirmish.js +0 -329
- package/dist/board/HexSkirmish.js.map +0 -1
- package/dist/board/Tactics.d.ts +0 -212
- package/dist/board/Tactics.d.ts.map +0 -1
- package/dist/board/Tactics.js +0 -305
- package/dist/board/Tactics.js.map +0 -1
- package/dist/board/bitboard.d.ts +0 -132
- package/dist/board/bitboard.d.ts.map +0 -1
- package/dist/board/bitboard.js +0 -495
- package/dist/board/bitboard.js.map +0 -1
- package/dist/board/chess.d.ts +0 -167
- package/dist/board/chess.d.ts.map +0 -1
- package/dist/board/chess.js +0 -578
- package/dist/board/chess.js.map +0 -1
- package/dist/board/index.d.ts +0 -23
- package/dist/board/index.d.ts.map +0 -1
- package/dist/board/index.js +0 -12
- package/dist/board/index.js.map +0 -1
- package/dist/board/openings.d.ts +0 -58
- package/dist/board/openings.d.ts.map +0 -1
- package/dist/board/openings.js +0 -45
- package/dist/board/openings.js.map +0 -1
- package/dist/board/tablebase.d.ts +0 -118
- package/dist/board/tablebase.d.ts.map +0 -1
- package/dist/board/tablebase.js +0 -414
- package/dist/board/tablebase.js.map +0 -1
- package/dist/board/tourney.d.ts +0 -97
- package/dist/board/tourney.d.ts.map +0 -1
- package/dist/board/tourney.js +0 -1019
- package/dist/board/tourney.js.map +0 -1
- package/dist/core/Achievements.d.ts +0 -101
- package/dist/core/Achievements.d.ts.map +0 -1
- package/dist/core/Achievements.js +0 -141
- package/dist/core/Achievements.js.map +0 -1
- package/dist/core/ActionJournal.d.ts +0 -43
- package/dist/core/ActionJournal.d.ts.map +0 -1
- package/dist/core/ActionJournal.js +0 -77
- package/dist/core/ActionJournal.js.map +0 -1
- package/dist/core/Blob.d.ts +0 -79
- package/dist/core/Blob.d.ts.map +0 -1
- package/dist/core/Blob.js +0 -140
- package/dist/core/Blob.js.map +0 -1
- package/dist/core/Clone.d.ts +0 -31
- package/dist/core/Clone.d.ts.map +0 -1
- package/dist/core/Clone.js +0 -84
- package/dist/core/Clone.js.map +0 -1
- package/dist/core/Collection.d.ts +0 -59
- package/dist/core/Collection.d.ts.map +0 -1
- package/dist/core/Collection.js +0 -77
- package/dist/core/Collection.js.map +0 -1
- package/dist/core/Csv.d.ts +0 -74
- package/dist/core/Csv.d.ts.map +0 -1
- package/dist/core/Csv.js +0 -201
- package/dist/core/Csv.js.map +0 -1
- package/dist/core/DialogueText.d.ts +0 -72
- package/dist/core/DialogueText.d.ts.map +0 -1
- package/dist/core/DialogueText.js +0 -68
- package/dist/core/DialogueText.js.map +0 -1
- package/dist/core/Entity.d.ts +0 -42
- package/dist/core/Entity.d.ts.map +0 -1
- package/dist/core/Entity.js +0 -61
- package/dist/core/Entity.js.map +0 -1
- package/dist/core/Feedback.d.ts +0 -27
- package/dist/core/Feedback.d.ts.map +0 -1
- package/dist/core/Feedback.js +0 -33
- package/dist/core/Feedback.js.map +0 -1
- package/dist/core/FixedStepper.d.ts +0 -38
- package/dist/core/FixedStepper.d.ts.map +0 -1
- package/dist/core/FixedStepper.js +0 -56
- package/dist/core/FixedStepper.js.map +0 -1
- package/dist/core/Grid.d.ts +0 -179
- package/dist/core/Grid.d.ts.map +0 -1
- package/dist/core/Grid.js +0 -201
- package/dist/core/Grid.js.map +0 -1
- package/dist/core/Handles.d.ts +0 -42
- package/dist/core/Handles.d.ts.map +0 -1
- package/dist/core/Handles.js +0 -38
- package/dist/core/Handles.js.map +0 -1
- package/dist/core/Hex.d.ts +0 -79
- package/dist/core/Hex.d.ts.map +0 -1
- package/dist/core/Hex.js +0 -161
- package/dist/core/Hex.js.map +0 -1
- package/dist/core/Hooks.d.ts +0 -48
- package/dist/core/Hooks.d.ts.map +0 -1
- package/dist/core/Hooks.js +0 -33
- package/dist/core/Hooks.js.map +0 -1
- package/dist/core/HttpTransport.d.ts +0 -53
- package/dist/core/HttpTransport.d.ts.map +0 -1
- package/dist/core/HttpTransport.js +0 -108
- package/dist/core/HttpTransport.js.map +0 -1
- package/dist/core/Input.d.ts +0 -256
- package/dist/core/Input.d.ts.map +0 -1
- package/dist/core/Input.js +0 -557
- package/dist/core/Input.js.map +0 -1
- package/dist/core/JavaRandom.d.ts +0 -55
- package/dist/core/JavaRandom.d.ts.map +0 -1
- package/dist/core/JavaRandom.js +0 -81
- package/dist/core/JavaRandom.js.map +0 -1
- package/dist/core/Loading.d.ts +0 -65
- package/dist/core/Loading.d.ts.map +0 -1
- package/dist/core/Loading.js +0 -119
- package/dist/core/Loading.js.map +0 -1
- package/dist/core/Log.d.ts +0 -48
- package/dist/core/Log.d.ts.map +0 -1
- package/dist/core/Log.js +0 -59
- package/dist/core/Log.js.map +0 -1
- package/dist/core/Math.d.ts +0 -14
- package/dist/core/Math.d.ts.map +0 -1
- package/dist/core/Math.js +0 -16
- package/dist/core/Math.js.map +0 -1
- package/dist/core/Motion.d.ts +0 -47
- package/dist/core/Motion.d.ts.map +0 -1
- package/dist/core/Motion.js +0 -122
- package/dist/core/Motion.js.map +0 -1
- package/dist/core/Multiplayer.d.ts +0 -101
- package/dist/core/Multiplayer.d.ts.map +0 -1
- package/dist/core/Multiplayer.js +0 -156
- package/dist/core/Multiplayer.js.map +0 -1
- package/dist/core/News.d.ts +0 -51
- package/dist/core/News.d.ts.map +0 -1
- package/dist/core/News.js +0 -65
- package/dist/core/News.js.map +0 -1
- package/dist/core/Pathfinding.d.ts +0 -41
- package/dist/core/Pathfinding.d.ts.map +0 -1
- package/dist/core/Pathfinding.js +0 -86
- package/dist/core/Pathfinding.js.map +0 -1
- package/dist/core/PlayerInput.d.ts +0 -57
- package/dist/core/PlayerInput.d.ts.map +0 -1
- package/dist/core/PlayerInput.js +0 -82
- package/dist/core/PlayerInput.js.map +0 -1
- package/dist/core/Presentation.d.ts +0 -56
- package/dist/core/Presentation.d.ts.map +0 -1
- package/dist/core/Presentation.js +0 -78
- package/dist/core/Presentation.js.map +0 -1
- package/dist/core/Random.d.ts +0 -259
- package/dist/core/Random.d.ts.map +0 -1
- package/dist/core/Random.js +0 -408
- package/dist/core/Random.js.map +0 -1
- package/dist/core/Reactions.d.ts +0 -67
- package/dist/core/Reactions.d.ts.map +0 -1
- package/dist/core/Reactions.js +0 -92
- package/dist/core/Reactions.js.map +0 -1
- package/dist/core/Registry.d.ts +0 -31
- package/dist/core/Registry.d.ts.map +0 -1
- package/dist/core/Registry.js +0 -46
- package/dist/core/Registry.js.map +0 -1
- package/dist/core/Replay.d.ts +0 -126
- package/dist/core/Replay.d.ts.map +0 -1
- package/dist/core/Replay.js +0 -162
- package/dist/core/Replay.js.map +0 -1
- package/dist/core/ReplayFile.d.ts +0 -197
- package/dist/core/ReplayFile.d.ts.map +0 -1
- package/dist/core/ReplayFile.js +0 -257
- package/dist/core/ReplayFile.js.map +0 -1
- package/dist/core/RunHistory.d.ts +0 -54
- package/dist/core/RunHistory.d.ts.map +0 -1
- package/dist/core/RunHistory.js +0 -40
- package/dist/core/RunHistory.js.map +0 -1
- package/dist/core/Sanitize.d.ts +0 -101
- package/dist/core/Sanitize.d.ts.map +0 -1
- package/dist/core/Sanitize.js +0 -162
- package/dist/core/Sanitize.js.map +0 -1
- package/dist/core/Save.d.ts +0 -123
- package/dist/core/Save.d.ts.map +0 -1
- package/dist/core/Save.js +0 -216
- package/dist/core/Save.js.map +0 -1
- package/dist/core/SaveSync.d.ts +0 -43
- package/dist/core/SaveSync.d.ts.map +0 -1
- package/dist/core/SaveSync.js +0 -56
- package/dist/core/SaveSync.js.map +0 -1
- package/dist/core/Scene.d.ts +0 -63
- package/dist/core/Scene.d.ts.map +0 -1
- package/dist/core/Scene.js +0 -81
- package/dist/core/Scene.js.map +0 -1
- package/dist/core/SceneComponents.d.ts +0 -67
- package/dist/core/SceneComponents.d.ts.map +0 -1
- package/dist/core/SceneComponents.js +0 -76
- package/dist/core/SceneComponents.js.map +0 -1
- package/dist/core/SceneStack.d.ts +0 -61
- package/dist/core/SceneStack.d.ts.map +0 -1
- package/dist/core/SceneStack.js +0 -91
- package/dist/core/SceneStack.js.map +0 -1
- package/dist/core/Scramble.d.ts +0 -21
- package/dist/core/Scramble.d.ts.map +0 -1
- package/dist/core/Scramble.js +0 -52
- package/dist/core/Scramble.js.map +0 -1
- package/dist/core/Session.d.ts +0 -31
- package/dist/core/Session.d.ts.map +0 -1
- package/dist/core/Session.js +0 -11
- package/dist/core/Session.js.map +0 -1
- package/dist/core/Settings.d.ts +0 -96
- package/dist/core/Settings.d.ts.map +0 -1
- package/dist/core/Settings.js +0 -190
- package/dist/core/Settings.js.map +0 -1
- package/dist/core/Signal.d.ts +0 -35
- package/dist/core/Signal.d.ts.map +0 -1
- package/dist/core/Signal.js +0 -41
- package/dist/core/Signal.js.map +0 -1
- package/dist/core/Spawner.d.ts +0 -65
- package/dist/core/Spawner.d.ts.map +0 -1
- package/dist/core/Spawner.js +0 -82
- package/dist/core/Spawner.js.map +0 -1
- package/dist/core/State.d.ts +0 -97
- package/dist/core/State.d.ts.map +0 -1
- package/dist/core/State.js +0 -177
- package/dist/core/State.js.map +0 -1
- package/dist/core/Stats.d.ts +0 -46
- package/dist/core/Stats.d.ts.map +0 -1
- package/dist/core/Stats.js +0 -47
- package/dist/core/Stats.js.map +0 -1
- package/dist/core/StoredValue.d.ts +0 -30
- package/dist/core/StoredValue.d.ts.map +0 -1
- package/dist/core/StoredValue.js +0 -38
- package/dist/core/StoredValue.js.map +0 -1
- package/dist/core/SyncGuard.d.ts +0 -57
- package/dist/core/SyncGuard.d.ts.map +0 -1
- package/dist/core/SyncGuard.js +0 -116
- package/dist/core/SyncGuard.js.map +0 -1
- package/dist/core/Telemetry.d.ts +0 -63
- package/dist/core/Telemetry.d.ts.map +0 -1
- package/dist/core/Telemetry.js +0 -83
- package/dist/core/Telemetry.js.map +0 -1
- package/dist/core/Twee.d.ts +0 -101
- package/dist/core/Twee.d.ts.map +0 -1
- package/dist/core/Twee.js +0 -174
- package/dist/core/Twee.js.map +0 -1
- package/dist/core/Tween.d.ts +0 -60
- package/dist/core/Tween.d.ts.map +0 -1
- package/dist/core/Tween.js +0 -98
- package/dist/core/Tween.js.map +0 -1
- package/dist/core/UndoHistory.d.ts +0 -52
- package/dist/core/UndoHistory.d.ts.map +0 -1
- package/dist/core/UndoHistory.js +0 -49
- package/dist/core/UndoHistory.js.map +0 -1
- package/dist/core/index.d.ts +0 -94
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -53
- package/dist/core/index.js.map +0 -1
- package/dist/headless/index.d.ts +0 -87
- package/dist/headless/index.d.ts.map +0 -1
- package/dist/headless/index.js +0 -87
- package/dist/headless/index.js.map +0 -1
- package/dist/i18n/Content.d.ts +0 -151
- package/dist/i18n/Content.d.ts.map +0 -1
- package/dist/i18n/Content.js +0 -218
- package/dist/i18n/Content.js.map +0 -1
- package/dist/i18n/EditSession.d.ts +0 -101
- package/dist/i18n/EditSession.d.ts.map +0 -1
- package/dist/i18n/EditSession.js +0 -150
- package/dist/i18n/EditSession.js.map +0 -1
- package/dist/i18n/Fluent.d.ts +0 -7
- package/dist/i18n/Fluent.d.ts.map +0 -1
- package/dist/i18n/Fluent.js +0 -98
- package/dist/i18n/Fluent.js.map +0 -1
- package/dist/i18n/Format.d.ts +0 -25
- package/dist/i18n/Format.d.ts.map +0 -1
- package/dist/i18n/Format.js +0 -32
- package/dist/i18n/Format.js.map +0 -1
- package/dist/i18n/FormatSpec.d.ts +0 -76
- package/dist/i18n/FormatSpec.d.ts.map +0 -1
- package/dist/i18n/FormatSpec.js +0 -306
- package/dist/i18n/FormatSpec.js.map +0 -1
- package/dist/i18n/Po.d.ts +0 -54
- package/dist/i18n/Po.d.ts.map +0 -1
- package/dist/i18n/Po.js +0 -192
- package/dist/i18n/Po.js.map +0 -1
- package/dist/i18n/SemanticMessage.d.ts +0 -84
- package/dist/i18n/SemanticMessage.d.ts.map +0 -1
- package/dist/i18n/SemanticMessage.js +0 -54
- package/dist/i18n/SemanticMessage.js.map +0 -1
- package/dist/i18n/SoundMarkers.d.ts +0 -38
- package/dist/i18n/SoundMarkers.d.ts.map +0 -1
- package/dist/i18n/SoundMarkers.js +0 -48
- package/dist/i18n/SoundMarkers.js.map +0 -1
- package/dist/i18n/Validate.d.ts +0 -82
- package/dist/i18n/Validate.d.ts.map +0 -1
- package/dist/i18n/Validate.js +0 -106
- package/dist/i18n/Validate.js.map +0 -1
- package/dist/i18n/index.d.ts +0 -177
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js +0 -331
- package/dist/i18n/index.js.map +0 -1
- package/dist/index.d.ts +0 -26
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -26
- package/dist/index.js.map +0 -1
- package/dist/mw_games.global.js +0 -1407
- package/dist/mwl/MapFile.d.ts +0 -41
- package/dist/mwl/MapFile.d.ts.map +0 -1
- package/dist/mwl/MapFile.js +0 -53
- package/dist/mwl/MapFile.js.map +0 -1
- package/dist/mwl/actors.d.ts +0 -62
- package/dist/mwl/actors.d.ts.map +0 -1
- package/dist/mwl/actors.js +0 -82
- package/dist/mwl/actors.js.map +0 -1
- package/dist/mwl/campaign.d.ts +0 -51
- package/dist/mwl/campaign.d.ts.map +0 -1
- package/dist/mwl/campaign.js +0 -58
- package/dist/mwl/campaign.js.map +0 -1
- package/dist/mwl/carryover.d.ts +0 -86
- package/dist/mwl/carryover.d.ts.map +0 -1
- package/dist/mwl/carryover.js +0 -70
- package/dist/mwl/carryover.js.map +0 -1
- package/dist/mwl/catalog.d.ts +0 -98
- package/dist/mwl/catalog.d.ts.map +0 -1
- package/dist/mwl/catalog.js +0 -259
- package/dist/mwl/catalog.js.map +0 -1
- package/dist/mwl/compiler.d.ts +0 -135
- package/dist/mwl/compiler.d.ts.map +0 -1
- package/dist/mwl/compiler.js +0 -216
- package/dist/mwl/compiler.js.map +0 -1
- package/dist/mwl/conditions.d.ts +0 -18
- package/dist/mwl/conditions.d.ts.map +0 -1
- package/dist/mwl/conditions.js +0 -171
- package/dist/mwl/conditions.js.map +0 -1
- package/dist/mwl/content.d.ts +0 -140
- package/dist/mwl/content.d.ts.map +0 -1
- package/dist/mwl/content.js +0 -179
- package/dist/mwl/content.js.map +0 -1
- package/dist/mwl/expression.d.ts +0 -42
- package/dist/mwl/expression.d.ts.map +0 -1
- package/dist/mwl/expression.js +0 -164
- package/dist/mwl/expression.js.map +0 -1
- package/dist/mwl/grammar.d.ts +0 -100
- package/dist/mwl/grammar.d.ts.map +0 -1
- package/dist/mwl/grammar.js +0 -588
- package/dist/mwl/grammar.js.map +0 -1
- package/dist/mwl/hooks.d.ts +0 -201
- package/dist/mwl/hooks.d.ts.map +0 -1
- package/dist/mwl/hooks.js +0 -165
- package/dist/mwl/hooks.js.map +0 -1
- package/dist/mwl/index.d.ts +0 -40
- package/dist/mwl/index.d.ts.map +0 -1
- package/dist/mwl/index.js +0 -20
- package/dist/mwl/index.js.map +0 -1
- package/dist/mwl/objects.d.ts +0 -31
- package/dist/mwl/objects.d.ts.map +0 -1
- package/dist/mwl/objects.js +0 -83
- package/dist/mwl/objects.js.map +0 -1
- package/dist/mwl/persistence.d.ts +0 -67
- package/dist/mwl/persistence.d.ts.map +0 -1
- package/dist/mwl/persistence.js +0 -135
- package/dist/mwl/persistence.js.map +0 -1
- package/dist/mwl/presentation.d.ts +0 -86
- package/dist/mwl/presentation.d.ts.map +0 -1
- package/dist/mwl/presentation.js +0 -419
- package/dist/mwl/presentation.js.map +0 -1
- package/dist/mwl/pyroeis-runtime.d.ts +0 -82
- package/dist/mwl/pyroeis-runtime.d.ts.map +0 -1
- package/dist/mwl/pyroeis-runtime.js +0 -535
- package/dist/mwl/pyroeis-runtime.js.map +0 -1
- package/dist/mwl/pyroeis.d.ts +0 -54
- package/dist/mwl/pyroeis.d.ts.map +0 -1
- package/dist/mwl/pyroeis.js +0 -189
- package/dist/mwl/pyroeis.js.map +0 -1
- package/dist/mwl/readers.d.ts +0 -77
- package/dist/mwl/readers.d.ts.map +0 -1
- package/dist/mwl/readers.js +0 -150
- package/dist/mwl/readers.js.map +0 -1
- package/dist/mwl/report.d.ts +0 -44
- package/dist/mwl/report.d.ts.map +0 -1
- package/dist/mwl/report.js +0 -88
- package/dist/mwl/report.js.map +0 -1
- package/dist/mwl/runtime.d.ts +0 -577
- package/dist/mwl/runtime.d.ts.map +0 -1
- package/dist/mwl/runtime.js +0 -1741
- package/dist/mwl/runtime.js.map +0 -1
- package/dist/mwl/schema.d.ts +0 -151
- package/dist/mwl/schema.d.ts.map +0 -1
- package/dist/mwl/schema.js +0 -979
- package/dist/mwl/schema.js.map +0 -1
- package/dist/mwl/scripts.d.ts +0 -26
- package/dist/mwl/scripts.d.ts.map +0 -1
- package/dist/mwl/scripts.js +0 -34
- package/dist/mwl/scripts.js.map +0 -1
- package/dist/mwl/tables.d.ts +0 -95
- package/dist/mwl/tables.d.ts.map +0 -1
- package/dist/mwl/tables.js +0 -100
- package/dist/mwl/tables.js.map +0 -1
- package/dist/mwl/utils.d.ts +0 -10
- package/dist/mwl/utils.d.ts.map +0 -1
- package/dist/mwl/utils.js +0 -40
- package/dist/mwl/utils.js.map +0 -1
- package/dist/physics/PhysicsWorld.d.ts +0 -158
- package/dist/physics/PhysicsWorld.d.ts.map +0 -1
- package/dist/physics/PhysicsWorld.js +0 -375
- package/dist/physics/PhysicsWorld.js.map +0 -1
- package/dist/physics/XpbdWorld.d.ts +0 -213
- package/dist/physics/XpbdWorld.d.ts.map +0 -1
- package/dist/physics/XpbdWorld.js +0 -336
- package/dist/physics/XpbdWorld.js.map +0 -1
- package/dist/physics/cloth/index.d.ts +0 -99
- package/dist/physics/cloth/index.d.ts.map +0 -1
- package/dist/physics/cloth/index.js +0 -226
- package/dist/physics/cloth/index.js.map +0 -1
- package/dist/physics/index.d.ts +0 -7
- package/dist/physics/index.d.ts.map +0 -1
- package/dist/physics/index.js +0 -4
- package/dist/physics/index.js.map +0 -1
- package/dist/physics/spring/index.d.ts +0 -91
- package/dist/physics/spring/index.d.ts.map +0 -1
- package/dist/physics/spring/index.js +0 -120
- package/dist/physics/spring/index.js.map +0 -1
- package/dist/physics/xpbd.d.ts +0 -3
- package/dist/physics/xpbd.d.ts.map +0 -1
- package/dist/physics/xpbd.js +0 -2
- package/dist/physics/xpbd.js.map +0 -1
- package/dist/roguelike/Boss.d.ts +0 -79
- package/dist/roguelike/Boss.d.ts.map +0 -1
- package/dist/roguelike/Boss.js +0 -126
- package/dist/roguelike/Boss.js.map +0 -1
- package/dist/roguelike/Cave.d.ts +0 -124
- package/dist/roguelike/Cave.d.ts.map +0 -1
- package/dist/roguelike/Cave.js +0 -216
- package/dist/roguelike/Cave.js.map +0 -1
- package/dist/roguelike/Combat.d.ts +0 -35
- package/dist/roguelike/Combat.d.ts.map +0 -1
- package/dist/roguelike/Combat.js +0 -33
- package/dist/roguelike/Combat.js.map +0 -1
- package/dist/roguelike/ContentRoll.d.ts +0 -53
- package/dist/roguelike/ContentRoll.d.ts.map +0 -1
- package/dist/roguelike/ContentRoll.js +0 -48
- package/dist/roguelike/ContentRoll.js.map +0 -1
- package/dist/roguelike/Doors.d.ts +0 -73
- package/dist/roguelike/Doors.d.ts.map +0 -1
- package/dist/roguelike/Doors.js +0 -115
- package/dist/roguelike/Doors.js.map +0 -1
- package/dist/roguelike/DungeonParity.d.ts +0 -57
- package/dist/roguelike/DungeonParity.d.ts.map +0 -1
- package/dist/roguelike/DungeonParity.js +0 -87
- package/dist/roguelike/DungeonParity.js.map +0 -1
- package/dist/roguelike/Elevation.d.ts +0 -41
- package/dist/roguelike/Elevation.d.ts.map +0 -1
- package/dist/roguelike/Elevation.js +0 -52
- package/dist/roguelike/Elevation.js.map +0 -1
- package/dist/roguelike/Features.d.ts +0 -59
- package/dist/roguelike/Features.d.ts.map +0 -1
- package/dist/roguelike/Features.js +0 -76
- package/dist/roguelike/Features.js.map +0 -1
- package/dist/roguelike/FieldOfView.d.ts +0 -86
- package/dist/roguelike/FieldOfView.d.ts.map +0 -1
- package/dist/roguelike/FieldOfView.js +0 -148
- package/dist/roguelike/FieldOfView.js.map +0 -1
- package/dist/roguelike/Level.d.ts +0 -139
- package/dist/roguelike/Level.d.ts.map +0 -1
- package/dist/roguelike/Level.js +0 -189
- package/dist/roguelike/Level.js.map +0 -1
- package/dist/roguelike/MonsterAI.d.ts +0 -54
- package/dist/roguelike/MonsterAI.d.ts.map +0 -1
- package/dist/roguelike/MonsterAI.js +0 -83
- package/dist/roguelike/MonsterAI.js.map +0 -1
- package/dist/roguelike/MultiStageAbility.d.ts +0 -59
- package/dist/roguelike/MultiStageAbility.d.ts.map +0 -1
- package/dist/roguelike/MultiStageAbility.js +0 -76
- package/dist/roguelike/MultiStageAbility.js.map +0 -1
- package/dist/roguelike/MultiTurnBeam.d.ts +0 -108
- package/dist/roguelike/MultiTurnBeam.d.ts.map +0 -1
- package/dist/roguelike/MultiTurnBeam.js +0 -164
- package/dist/roguelike/MultiTurnBeam.js.map +0 -1
- package/dist/roguelike/Overworld.d.ts +0 -89
- package/dist/roguelike/Overworld.d.ts.map +0 -1
- package/dist/roguelike/Overworld.js +0 -325
- package/dist/roguelike/Overworld.js.map +0 -1
- package/dist/roguelike/Pathfinder.d.ts +0 -103
- package/dist/roguelike/Pathfinder.d.ts.map +0 -1
- package/dist/roguelike/Pathfinder.js +0 -213
- package/dist/roguelike/Pathfinder.js.map +0 -1
- package/dist/roguelike/Placement.d.ts +0 -62
- package/dist/roguelike/Placement.d.ts.map +0 -1
- package/dist/roguelike/Placement.js +0 -79
- package/dist/roguelike/Placement.js.map +0 -1
- package/dist/roguelike/RoomBuilders.d.ts +0 -60
- package/dist/roguelike/RoomBuilders.d.ts.map +0 -1
- package/dist/roguelike/RoomBuilders.js +0 -57
- package/dist/roguelike/RoomBuilders.js.map +0 -1
- package/dist/roguelike/Scheduler.d.ts +0 -96
- package/dist/roguelike/Scheduler.d.ts.map +0 -1
- package/dist/roguelike/Scheduler.js +0 -154
- package/dist/roguelike/Scheduler.js.map +0 -1
- package/dist/roguelike/Secrets.d.ts +0 -57
- package/dist/roguelike/Secrets.d.ts.map +0 -1
- package/dist/roguelike/Secrets.js +0 -77
- package/dist/roguelike/Secrets.js.map +0 -1
- package/dist/roguelike/Stealth.d.ts +0 -47
- package/dist/roguelike/Stealth.d.ts.map +0 -1
- package/dist/roguelike/Stealth.js +0 -48
- package/dist/roguelike/Stealth.js.map +0 -1
- package/dist/roguelike/Targeting.d.ts +0 -312
- package/dist/roguelike/Targeting.d.ts.map +0 -1
- package/dist/roguelike/Targeting.js +0 -483
- package/dist/roguelike/Targeting.js.map +0 -1
- package/dist/roguelike/TriggerTracker.d.ts +0 -46
- package/dist/roguelike/TriggerTracker.d.ts.map +0 -1
- package/dist/roguelike/TriggerTracker.js +0 -59
- package/dist/roguelike/TriggerTracker.js.map +0 -1
- package/dist/roguelike/generate.d.ts +0 -139
- package/dist/roguelike/generate.d.ts.map +0 -1
- package/dist/roguelike/generate.js +0 -166
- package/dist/roguelike/generate.js.map +0 -1
- package/dist/roguelike/index.d.ts +0 -48
- package/dist/roguelike/index.d.ts.map +0 -1
- package/dist/roguelike/index.js +0 -27
- package/dist/roguelike/index.js.map +0 -1
- package/dist/rpg/Collision.d.ts +0 -61
- package/dist/rpg/Collision.d.ts.map +0 -1
- package/dist/rpg/Collision.js +0 -94
- package/dist/rpg/Collision.js.map +0 -1
- package/dist/rpg/Event.d.ts +0 -50
- package/dist/rpg/Event.d.ts.map +0 -1
- package/dist/rpg/Event.js +0 -36
- package/dist/rpg/Event.js.map +0 -1
- package/dist/rpg/EventRunner.d.ts +0 -139
- package/dist/rpg/EventRunner.d.ts.map +0 -1
- package/dist/rpg/EventRunner.js +0 -125
- package/dist/rpg/EventRunner.js.map +0 -1
- package/dist/rpg/FreeMover.d.ts +0 -59
- package/dist/rpg/FreeMover.d.ts.map +0 -1
- package/dist/rpg/FreeMover.js +0 -79
- package/dist/rpg/FreeMover.js.map +0 -1
- package/dist/rpg/GameState.d.ts +0 -36
- package/dist/rpg/GameState.d.ts.map +0 -1
- package/dist/rpg/GameState.js +0 -49
- package/dist/rpg/GameState.js.map +0 -1
- package/dist/rpg/GridMover.d.ts +0 -71
- package/dist/rpg/GridMover.d.ts.map +0 -1
- package/dist/rpg/GridMover.js +0 -119
- package/dist/rpg/GridMover.js.map +0 -1
- package/dist/rpg/Marshal.d.ts +0 -81
- package/dist/rpg/Marshal.d.ts.map +0 -1
- package/dist/rpg/Marshal.js +0 -422
- package/dist/rpg/Marshal.js.map +0 -1
- package/dist/rpg/MovableSprite.d.ts +0 -31
- package/dist/rpg/MovableSprite.d.ts.map +0 -1
- package/dist/rpg/MovableSprite.js +0 -10
- package/dist/rpg/MovableSprite.js.map +0 -1
- package/dist/rpg/MoveRoute.d.ts +0 -118
- package/dist/rpg/MoveRoute.d.ts.map +0 -1
- package/dist/rpg/MoveRoute.js +0 -139
- package/dist/rpg/MoveRoute.js.map +0 -1
- package/dist/rpg/Quest.d.ts +0 -173
- package/dist/rpg/Quest.d.ts.map +0 -1
- package/dist/rpg/Quest.js +0 -221
- package/dist/rpg/Quest.js.map +0 -1
- package/dist/rpg/automap.d.ts +0 -81
- package/dist/rpg/automap.d.ts.map +0 -1
- package/dist/rpg/automap.js +0 -107
- package/dist/rpg/automap.js.map +0 -1
- package/dist/rpg/dialogue-text.d.ts +0 -81
- package/dist/rpg/dialogue-text.d.ts.map +0 -1
- package/dist/rpg/dialogue-text.js +0 -88
- package/dist/rpg/dialogue-text.js.map +0 -1
- package/dist/rpg/index.d.ts +0 -25
- package/dist/rpg/index.d.ts.map +0 -1
- package/dist/rpg/index.js +0 -14
- package/dist/rpg/index.js.map +0 -1
- package/dist/rpg/twee-events.d.ts +0 -48
- package/dist/rpg/twee-events.d.ts.map +0 -1
- package/dist/rpg/twee-events.js +0 -35
- package/dist/rpg/twee-events.js.map +0 -1
- package/dist/simulation/Campaign.d.ts +0 -60
- package/dist/simulation/Campaign.d.ts.map +0 -1
- package/dist/simulation/Campaign.js +0 -89
- package/dist/simulation/Campaign.js.map +0 -1
- package/dist/simulation/CampaignSave.d.ts +0 -68
- package/dist/simulation/CampaignSave.d.ts.map +0 -1
- package/dist/simulation/CampaignSave.js +0 -54
- package/dist/simulation/CampaignSave.js.map +0 -1
- package/dist/simulation/EventPresentation.d.ts +0 -111
- package/dist/simulation/EventPresentation.d.ts.map +0 -1
- package/dist/simulation/EventPresentation.js +0 -120
- package/dist/simulation/EventPresentation.js.map +0 -1
- package/dist/simulation/Harness.d.ts +0 -26
- package/dist/simulation/Harness.d.ts.map +0 -1
- package/dist/simulation/Harness.js +0 -26
- package/dist/simulation/Harness.js.map +0 -1
- package/dist/simulation/Runtime.d.ts +0 -189
- package/dist/simulation/Runtime.d.ts.map +0 -1
- package/dist/simulation/Runtime.js +0 -244
- package/dist/simulation/Runtime.js.map +0 -1
- package/dist/simulation/Scenario.d.ts +0 -44
- package/dist/simulation/Scenario.d.ts.map +0 -1
- package/dist/simulation/Scenario.js +0 -40
- package/dist/simulation/Scenario.js.map +0 -1
- package/dist/simulation/Training.d.ts +0 -220
- package/dist/simulation/Training.d.ts.map +0 -1
- package/dist/simulation/Training.js +0 -366
- package/dist/simulation/Training.js.map +0 -1
- package/dist/simulation/Turns.d.ts +0 -40
- package/dist/simulation/Turns.d.ts.map +0 -1
- package/dist/simulation/Turns.js +0 -41
- package/dist/simulation/Turns.js.map +0 -1
- package/dist/simulation/index.d.ts +0 -25
- package/dist/simulation/index.d.ts.map +0 -1
- package/dist/simulation/index.js +0 -16
- package/dist/simulation/index.js.map +0 -1
- package/dist/skeleton/index.d.ts +0 -212
- package/dist/skeleton/index.d.ts.map +0 -1
- package/dist/skeleton/index.js +0 -325
- package/dist/skeleton/index.js.map +0 -1
- package/dist/testing/SceneControls.d.ts +0 -35
- package/dist/testing/SceneControls.d.ts.map +0 -1
- package/dist/testing/SceneControls.js +0 -49
- package/dist/testing/SceneControls.js.map +0 -1
- package/dist/testing/index.d.ts +0 -123
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -156
- package/dist/testing/index.js.map +0 -1
- package/dist/threads/index.d.ts +0 -3
- package/dist/threads/index.d.ts.map +0 -1
- package/dist/threads/index.js +0 -2
- package/dist/threads/index.js.map +0 -1
- package/dist/threads/spawn.d.ts +0 -41
- package/dist/threads/spawn.d.ts.map +0 -1
- package/dist/threads/spawn.js +0 -143
- package/dist/threads/spawn.js.map +0 -1
- package/dist/threads/worker.d.ts +0 -51
- package/dist/threads/worker.d.ts.map +0 -1
- package/dist/threads/worker.js +0 -84
- package/dist/threads/worker.js.map +0 -1
- package/dist/three-d/Character3D.d.ts +0 -74
- package/dist/three-d/Character3D.d.ts.map +0 -1
- package/dist/three-d/Character3D.js +0 -122
- package/dist/three-d/Character3D.js.map +0 -1
- package/dist/three-d/Collision3D.d.ts +0 -111
- package/dist/three-d/Collision3D.d.ts.map +0 -1
- package/dist/three-d/Collision3D.js +0 -119
- package/dist/three-d/Collision3D.js.map +0 -1
- package/dist/three-d/Engine3D.d.ts +0 -25
- package/dist/three-d/Engine3D.d.ts.map +0 -1
- package/dist/three-d/Engine3D.js +0 -45
- package/dist/three-d/Engine3D.js.map +0 -1
- package/dist/three-d/Grid.d.ts +0 -30
- package/dist/three-d/Grid.d.ts.map +0 -1
- package/dist/three-d/Grid.js +0 -24
- package/dist/three-d/Grid.js.map +0 -1
- package/dist/three-d/Heightmap.d.ts +0 -38
- package/dist/three-d/Heightmap.d.ts.map +0 -1
- package/dist/three-d/Heightmap.js +0 -29
- package/dist/three-d/Heightmap.js.map +0 -1
- package/dist/three-d/Models.d.ts +0 -49
- package/dist/three-d/Models.d.ts.map +0 -1
- package/dist/three-d/Models.js +0 -77
- package/dist/three-d/Models.js.map +0 -1
- package/dist/three-d/TileGrid3D.d.ts +0 -27
- package/dist/three-d/TileGrid3D.d.ts.map +0 -1
- package/dist/three-d/TileGrid3D.js +0 -66
- package/dist/three-d/TileGrid3D.js.map +0 -1
- package/dist/three-d/Vox.d.ts +0 -43
- package/dist/three-d/Vox.d.ts.map +0 -1
- package/dist/three-d/Vox.js +0 -108
- package/dist/three-d/Vox.js.map +0 -1
- package/dist/three-d/index.d.ts +0 -15
- package/dist/three-d/index.d.ts.map +0 -1
- package/dist/three-d/index.js +0 -8
- package/dist/three-d/index.js.map +0 -1
- package/dist/two-d/Game.d.ts +0 -229
- package/dist/two-d/Game.d.ts.map +0 -1
- package/dist/two-d/Game.js +0 -463
- package/dist/two-d/Game.js.map +0 -1
- package/dist/two-d/QualityScaler.d.ts +0 -63
- package/dist/two-d/QualityScaler.d.ts.map +0 -1
- package/dist/two-d/QualityScaler.js +0 -92
- package/dist/two-d/QualityScaler.js.map +0 -1
- package/dist/two-d/ResolutionFit.d.ts +0 -28
- package/dist/two-d/ResolutionFit.d.ts.map +0 -1
- package/dist/two-d/ResolutionFit.js +0 -39
- package/dist/two-d/ResolutionFit.js.map +0 -1
- package/dist/two-d/Scene2D.d.ts +0 -43
- package/dist/two-d/Scene2D.d.ts.map +0 -1
- package/dist/two-d/Scene2D.js +0 -53
- package/dist/two-d/Scene2D.js.map +0 -1
- package/dist/two-d/index.d.ts +0 -22
- package/dist/two-d/index.d.ts.map +0 -1
- package/dist/two-d/index.js +0 -19
- package/dist/two-d/index.js.map +0 -1
- package/dist/two-d/pixi-interop.d.ts +0 -66
- package/dist/two-d/pixi-interop.d.ts.map +0 -1
- package/dist/two-d/pixi-interop.js +0 -72
- package/dist/two-d/pixi-interop.js.map +0 -1
- package/dist/two-d/presentation/MwlPresentation.d.ts +0 -117
- package/dist/two-d/presentation/MwlPresentation.d.ts.map +0 -1
- package/dist/two-d/presentation/MwlPresentation.js +0 -755
- package/dist/two-d/presentation/MwlPresentation.js.map +0 -1
- package/dist/two-d/presentation/index.d.ts +0 -3
- package/dist/two-d/presentation/index.d.ts.map +0 -1
- package/dist/two-d/presentation/index.js +0 -2
- package/dist/two-d/presentation/index.js.map +0 -1
- package/dist/two-d/render/ActorAnimator.d.ts +0 -92
- package/dist/two-d/render/ActorAnimator.d.ts.map +0 -1
- package/dist/two-d/render/ActorAnimator.js +0 -97
- package/dist/two-d/render/ActorAnimator.js.map +0 -1
- package/dist/two-d/render/AnimatedSprite.d.ts +0 -154
- package/dist/two-d/render/AnimatedSprite.d.ts.map +0 -1
- package/dist/two-d/render/AnimatedSprite.js +0 -197
- package/dist/two-d/render/AnimatedSprite.js.map +0 -1
- package/dist/two-d/render/Autotile.d.ts +0 -74
- package/dist/two-d/render/Autotile.d.ts.map +0 -1
- package/dist/two-d/render/Autotile.js +0 -149
- package/dist/two-d/render/Autotile.js.map +0 -1
- package/dist/two-d/render/Beam.d.ts +0 -136
- package/dist/two-d/render/Beam.d.ts.map +0 -1
- package/dist/two-d/render/Beam.js +0 -203
- package/dist/two-d/render/Beam.js.map +0 -1
- package/dist/two-d/render/Camera.d.ts +0 -255
- package/dist/two-d/render/Camera.d.ts.map +0 -1
- package/dist/two-d/render/Camera.js +0 -376
- package/dist/two-d/render/Camera.js.map +0 -1
- package/dist/two-d/render/Capabilities.d.ts +0 -84
- package/dist/two-d/render/Capabilities.d.ts.map +0 -1
- package/dist/two-d/render/Capabilities.js +0 -129
- package/dist/two-d/render/Capabilities.js.map +0 -1
- package/dist/two-d/render/ClothSprite.d.ts +0 -83
- package/dist/two-d/render/ClothSprite.d.ts.map +0 -1
- package/dist/two-d/render/ClothSprite.js +0 -105
- package/dist/two-d/render/ClothSprite.js.map +0 -1
- package/dist/two-d/render/ColorBlindness.d.ts +0 -39
- package/dist/two-d/render/ColorBlindness.d.ts.map +0 -1
- package/dist/two-d/render/ColorBlindness.js +0 -45
- package/dist/two-d/render/ColorBlindness.js.map +0 -1
- package/dist/two-d/render/ColorTransformBatcher.d.ts +0 -143
- package/dist/two-d/render/ColorTransformBatcher.d.ts.map +0 -1
- package/dist/two-d/render/ColorTransformBatcher.js +0 -395
- package/dist/two-d/render/ColorTransformBatcher.js.map +0 -1
- package/dist/two-d/render/Flights.d.ts +0 -90
- package/dist/two-d/render/Flights.d.ts.map +0 -1
- package/dist/two-d/render/Flights.js +0 -135
- package/dist/two-d/render/Flights.js.map +0 -1
- package/dist/two-d/render/FogLayer.d.ts +0 -68
- package/dist/two-d/render/FogLayer.d.ts.map +0 -1
- package/dist/two-d/render/FogLayer.js +0 -83
- package/dist/two-d/render/FogLayer.js.map +0 -1
- package/dist/two-d/render/Halo.d.ts +0 -58
- package/dist/two-d/render/Halo.d.ts.map +0 -1
- package/dist/two-d/render/Halo.js +0 -48
- package/dist/two-d/render/Halo.js.map +0 -1
- package/dist/two-d/render/HazeLayer.d.ts +0 -112
- package/dist/two-d/render/HazeLayer.d.ts.map +0 -1
- package/dist/two-d/render/HazeLayer.js +0 -185
- package/dist/two-d/render/HazeLayer.js.map +0 -1
- package/dist/two-d/render/ImageModifiers.d.ts +0 -310
- package/dist/two-d/render/ImageModifiers.d.ts.map +0 -1
- package/dist/two-d/render/ImageModifiers.js +0 -723
- package/dist/two-d/render/ImageModifiers.js.map +0 -1
- package/dist/two-d/render/LayeredSprite.d.ts +0 -54
- package/dist/two-d/render/LayeredSprite.d.ts.map +0 -1
- package/dist/two-d/render/LayeredSprite.js +0 -80
- package/dist/two-d/render/LayeredSprite.js.map +0 -1
- package/dist/two-d/render/LightningArc.d.ts +0 -57
- package/dist/two-d/render/LightningArc.d.ts.map +0 -1
- package/dist/two-d/render/LightningArc.js +0 -91
- package/dist/two-d/render/LightningArc.js.map +0 -1
- package/dist/two-d/render/LiquidLayer.d.ts +0 -62
- package/dist/two-d/render/LiquidLayer.d.ts.map +0 -1
- package/dist/two-d/render/LiquidLayer.js +0 -102
- package/dist/two-d/render/LiquidLayer.js.map +0 -1
- package/dist/two-d/render/Minimap.d.ts +0 -100
- package/dist/two-d/render/Minimap.d.ts.map +0 -1
- package/dist/two-d/render/Minimap.js +0 -157
- package/dist/two-d/render/Minimap.js.map +0 -1
- package/dist/two-d/render/NeonGlow.d.ts +0 -100
- package/dist/two-d/render/NeonGlow.d.ts.map +0 -1
- package/dist/two-d/render/NeonGlow.js +0 -183
- package/dist/two-d/render/NeonGlow.js.map +0 -1
- package/dist/two-d/render/PaletteRemap.d.ts +0 -154
- package/dist/two-d/render/PaletteRemap.d.ts.map +0 -1
- package/dist/two-d/render/PaletteRemap.js +0 -217
- package/dist/two-d/render/PaletteRemap.js.map +0 -1
- package/dist/two-d/render/Particles.d.ts +0 -262
- package/dist/two-d/render/Particles.d.ts.map +0 -1
- package/dist/two-d/render/Particles.js +0 -370
- package/dist/two-d/render/Particles.js.map +0 -1
- package/dist/two-d/render/Projectile.d.ts +0 -67
- package/dist/two-d/render/Projectile.d.ts.map +0 -1
- package/dist/two-d/render/Projectile.js +0 -78
- package/dist/two-d/render/Projectile.js.map +0 -1
- package/dist/two-d/render/RpgmAutotile.d.ts +0 -324
- package/dist/two-d/render/RpgmAutotile.d.ts.map +0 -1
- package/dist/two-d/render/RpgmAutotile.js +0 -933
- package/dist/two-d/render/RpgmAutotile.js.map +0 -1
- package/dist/two-d/render/SceneTransition.d.ts +0 -272
- package/dist/two-d/render/SceneTransition.d.ts.map +0 -1
- package/dist/two-d/render/SceneTransition.js +0 -431
- package/dist/two-d/render/SceneTransition.js.map +0 -1
- package/dist/two-d/render/ScreenEffects.d.ts +0 -124
- package/dist/two-d/render/ScreenEffects.d.ts.map +0 -1
- package/dist/two-d/render/ScreenEffects.js +0 -214
- package/dist/two-d/render/ScreenEffects.js.map +0 -1
- package/dist/two-d/render/Shape2D.d.ts +0 -146
- package/dist/two-d/render/Shape2D.d.ts.map +0 -1
- package/dist/two-d/render/Shape2D.js +0 -166
- package/dist/two-d/render/Shape2D.js.map +0 -1
- package/dist/two-d/render/SkeletalSprite.d.ts +0 -121
- package/dist/two-d/render/SkeletalSprite.d.ts.map +0 -1
- package/dist/two-d/render/SkeletalSprite.js +0 -213
- package/dist/two-d/render/SkeletalSprite.js.map +0 -1
- package/dist/two-d/render/SpringSprite.d.ts +0 -40
- package/dist/two-d/render/SpringSprite.d.ts.map +0 -1
- package/dist/two-d/render/SpringSprite.js +0 -39
- package/dist/two-d/render/SpringSprite.js.map +0 -1
- package/dist/two-d/render/SpriteAttachment.d.ts +0 -55
- package/dist/two-d/render/SpriteAttachment.d.ts.map +0 -1
- package/dist/two-d/render/SpriteAttachment.js +0 -60
- package/dist/two-d/render/SpriteAttachment.js.map +0 -1
- package/dist/two-d/render/SpriteDeform.d.ts +0 -156
- package/dist/two-d/render/SpriteDeform.d.ts.map +0 -1
- package/dist/two-d/render/SpriteDeform.js +0 -278
- package/dist/two-d/render/SpriteDeform.js.map +0 -1
- package/dist/two-d/render/SpriteGroup.d.ts +0 -83
- package/dist/two-d/render/SpriteGroup.d.ts.map +0 -1
- package/dist/two-d/render/SpriteGroup.js +0 -107
- package/dist/two-d/render/SpriteGroup.js.map +0 -1
- package/dist/two-d/render/SpriteMotion.d.ts +0 -121
- package/dist/two-d/render/SpriteMotion.d.ts.map +0 -1
- package/dist/two-d/render/SpriteMotion.js +0 -193
- package/dist/two-d/render/SpriteMotion.js.map +0 -1
- package/dist/two-d/render/SpriteSheet.d.ts +0 -62
- package/dist/two-d/render/SpriteSheet.d.ts.map +0 -1
- package/dist/two-d/render/SpriteSheet.js +0 -122
- package/dist/two-d/render/SpriteSheet.js.map +0 -1
- package/dist/two-d/render/StatusVisuals.d.ts +0 -86
- package/dist/two-d/render/StatusVisuals.d.ts.map +0 -1
- package/dist/two-d/render/StatusVisuals.js +0 -111
- package/dist/two-d/render/StatusVisuals.js.map +0 -1
- package/dist/two-d/render/SvgSkeleton.d.ts +0 -54
- package/dist/two-d/render/SvgSkeleton.d.ts.map +0 -1
- package/dist/two-d/render/SvgSkeleton.js +0 -112
- package/dist/two-d/render/SvgSkeleton.js.map +0 -1
- package/dist/two-d/render/TerrainGraphics.d.ts +0 -142
- package/dist/two-d/render/TerrainGraphics.d.ts.map +0 -1
- package/dist/two-d/render/TerrainGraphics.js +0 -161
- package/dist/two-d/render/TerrainGraphics.js.map +0 -1
- package/dist/two-d/render/TerrainGraphicsLayer.d.ts +0 -55
- package/dist/two-d/render/TerrainGraphicsLayer.d.ts.map +0 -1
- package/dist/two-d/render/TerrainGraphicsLayer.js +0 -54
- package/dist/two-d/render/TerrainGraphicsLayer.js.map +0 -1
- package/dist/two-d/render/TileMap.d.ts +0 -395
- package/dist/two-d/render/TileMap.d.ts.map +0 -1
- package/dist/two-d/render/TileMap.js +0 -967
- package/dist/two-d/render/TileMap.js.map +0 -1
- package/dist/two-d/render/TiledMap.d.ts +0 -113
- package/dist/two-d/render/TiledMap.d.ts.map +0 -1
- package/dist/two-d/render/TiledMap.js +0 -129
- package/dist/two-d/render/TiledMap.js.map +0 -1
- package/dist/two-d/render/TintedSprite.d.ts +0 -60
- package/dist/two-d/render/TintedSprite.d.ts.map +0 -1
- package/dist/two-d/render/TintedSprite.js +0 -88
- package/dist/two-d/render/TintedSprite.js.map +0 -1
- package/dist/two-d/render/Types2D.d.ts +0 -56
- package/dist/two-d/render/Types2D.d.ts.map +0 -1
- package/dist/two-d/render/Types2D.js +0 -45
- package/dist/two-d/render/Types2D.js.map +0 -1
- package/dist/two-d/render/Viewport.d.ts +0 -68
- package/dist/two-d/render/Viewport.d.ts.map +0 -1
- package/dist/two-d/render/Viewport.js +0 -74
- package/dist/two-d/render/Viewport.js.map +0 -1
- package/dist/two-d/render/index.d.ts +0 -81
- package/dist/two-d/render/index.d.ts.map +0 -1
- package/dist/two-d/render/index.js +0 -43
- package/dist/two-d/render/index.js.map +0 -1
- package/dist/two-d/stage/DialogueStage.d.ts +0 -90
- package/dist/two-d/stage/DialogueStage.d.ts.map +0 -1
- package/dist/two-d/stage/DialogueStage.js +0 -218
- package/dist/two-d/stage/DialogueStage.js.map +0 -1
- package/dist/two-d/stage/StoryScreen.d.ts +0 -110
- package/dist/two-d/stage/StoryScreen.d.ts.map +0 -1
- package/dist/two-d/stage/StoryScreen.js +0 -178
- package/dist/two-d/stage/StoryScreen.js.map +0 -1
- package/dist/two-d/stage/dialogue-text.d.ts +0 -81
- package/dist/two-d/stage/dialogue-text.d.ts.map +0 -1
- package/dist/two-d/stage/dialogue-text.js +0 -95
- package/dist/two-d/stage/dialogue-text.js.map +0 -1
- package/dist/two-d/stage/index.d.ts +0 -10
- package/dist/two-d/stage/index.d.ts.map +0 -1
- package/dist/two-d/stage/index.js +0 -6
- package/dist/two-d/stage/index.js.map +0 -1
- package/dist/two-d/stage/script.d.ts +0 -160
- package/dist/two-d/stage/script.d.ts.map +0 -1
- package/dist/two-d/stage/script.js +0 -207
- package/dist/two-d/stage/script.js.map +0 -1
- package/dist/two-d/stage/twee.d.ts +0 -35
- package/dist/two-d/stage/twee.d.ts.map +0 -1
- package/dist/two-d/stage/twee.js +0 -28
- package/dist/two-d/stage/twee.js.map +0 -1
- package/dist/two-d/ui/Bar.d.ts +0 -83
- package/dist/two-d/ui/Bar.d.ts.map +0 -1
- package/dist/two-d/ui/Bar.js +0 -112
- package/dist/two-d/ui/Bar.js.map +0 -1
- package/dist/two-d/ui/BitmapLabel.d.ts +0 -58
- package/dist/two-d/ui/BitmapLabel.d.ts.map +0 -1
- package/dist/two-d/ui/BitmapLabel.js +0 -82
- package/dist/two-d/ui/BitmapLabel.js.map +0 -1
- package/dist/two-d/ui/Button.d.ts +0 -133
- package/dist/two-d/ui/Button.d.ts.map +0 -1
- package/dist/two-d/ui/Button.js +0 -254
- package/dist/two-d/ui/Button.js.map +0 -1
- package/dist/two-d/ui/Checkbox.d.ts +0 -44
- package/dist/two-d/ui/Checkbox.d.ts.map +0 -1
- package/dist/two-d/ui/Checkbox.js +0 -89
- package/dist/two-d/ui/Checkbox.js.map +0 -1
- package/dist/two-d/ui/DataTable.d.ts +0 -79
- package/dist/two-d/ui/DataTable.d.ts.map +0 -1
- package/dist/two-d/ui/DataTable.js +0 -164
- package/dist/two-d/ui/DataTable.js.map +0 -1
- package/dist/two-d/ui/Dropdown.d.ts +0 -75
- package/dist/two-d/ui/Dropdown.d.ts.map +0 -1
- package/dist/two-d/ui/Dropdown.js +0 -129
- package/dist/two-d/ui/Dropdown.js.map +0 -1
- package/dist/two-d/ui/DropdownView.d.ts +0 -86
- package/dist/two-d/ui/DropdownView.d.ts.map +0 -1
- package/dist/two-d/ui/DropdownView.js +0 -216
- package/dist/two-d/ui/DropdownView.js.map +0 -1
- package/dist/two-d/ui/EventDialogue.d.ts +0 -23
- package/dist/two-d/ui/EventDialogue.d.ts.map +0 -1
- package/dist/two-d/ui/EventDialogue.js +0 -33
- package/dist/two-d/ui/EventDialogue.js.map +0 -1
- package/dist/two-d/ui/FloatingText.d.ts +0 -123
- package/dist/two-d/ui/FloatingText.d.ts.map +0 -1
- package/dist/two-d/ui/FloatingText.js +0 -152
- package/dist/two-d/ui/FloatingText.js.map +0 -1
- package/dist/two-d/ui/FloatingTextStack.d.ts +0 -150
- package/dist/two-d/ui/FloatingTextStack.d.ts.map +0 -1
- package/dist/two-d/ui/FloatingTextStack.js +0 -170
- package/dist/two-d/ui/FloatingTextStack.js.map +0 -1
- package/dist/two-d/ui/HelpScreen.d.ts +0 -45
- package/dist/two-d/ui/HelpScreen.d.ts.map +0 -1
- package/dist/two-d/ui/HelpScreen.js +0 -59
- package/dist/two-d/ui/HelpScreen.js.map +0 -1
- package/dist/two-d/ui/IconGrid.d.ts +0 -143
- package/dist/two-d/ui/IconGrid.d.ts.map +0 -1
- package/dist/two-d/ui/IconGrid.js +0 -326
- package/dist/two-d/ui/IconGrid.js.map +0 -1
- package/dist/two-d/ui/Label.d.ts +0 -63
- package/dist/two-d/ui/Label.d.ts.map +0 -1
- package/dist/two-d/ui/Label.js +0 -134
- package/dist/two-d/ui/Label.js.map +0 -1
- package/dist/two-d/ui/Layout.d.ts +0 -139
- package/dist/two-d/ui/Layout.d.ts.map +0 -1
- package/dist/two-d/ui/Layout.js +0 -221
- package/dist/two-d/ui/Layout.js.map +0 -1
- package/dist/two-d/ui/ListView.d.ts +0 -130
- package/dist/two-d/ui/ListView.d.ts.map +0 -1
- package/dist/two-d/ui/ListView.js +0 -325
- package/dist/two-d/ui/ListView.js.map +0 -1
- package/dist/two-d/ui/LoadingScreen.d.ts +0 -54
- package/dist/two-d/ui/LoadingScreen.d.ts.map +0 -1
- package/dist/two-d/ui/LoadingScreen.js +0 -87
- package/dist/two-d/ui/LoadingScreen.js.map +0 -1
- package/dist/two-d/ui/MarkupText.d.ts +0 -66
- package/dist/two-d/ui/MarkupText.d.ts.map +0 -1
- package/dist/two-d/ui/MarkupText.js +0 -156
- package/dist/two-d/ui/MarkupText.js.map +0 -1
- package/dist/two-d/ui/MessageBox.d.ts +0 -134
- package/dist/two-d/ui/MessageBox.d.ts.map +0 -1
- package/dist/two-d/ui/MessageBox.js +0 -263
- package/dist/two-d/ui/MessageBox.js.map +0 -1
- package/dist/two-d/ui/MessageLog.d.ts +0 -90
- package/dist/two-d/ui/MessageLog.d.ts.map +0 -1
- package/dist/two-d/ui/MessageLog.js +0 -131
- package/dist/two-d/ui/MessageLog.js.map +0 -1
- package/dist/two-d/ui/Meter.d.ts +0 -76
- package/dist/two-d/ui/Meter.d.ts.map +0 -1
- package/dist/two-d/ui/Meter.js +0 -134
- package/dist/two-d/ui/Meter.js.map +0 -1
- package/dist/two-d/ui/NinePatch.d.ts +0 -49
- package/dist/two-d/ui/NinePatch.d.ts.map +0 -1
- package/dist/two-d/ui/NinePatch.js +0 -59
- package/dist/two-d/ui/NinePatch.js.map +0 -1
- package/dist/two-d/ui/OnScreenKeyboard.d.ts +0 -91
- package/dist/two-d/ui/OnScreenKeyboard.d.ts.map +0 -1
- package/dist/two-d/ui/OnScreenKeyboard.js +0 -109
- package/dist/two-d/ui/OnScreenKeyboard.js.map +0 -1
- package/dist/two-d/ui/RadioGroup.d.ts +0 -68
- package/dist/two-d/ui/RadioGroup.d.ts.map +0 -1
- package/dist/two-d/ui/RadioGroup.js +0 -177
- package/dist/two-d/ui/RadioGroup.js.map +0 -1
- package/dist/two-d/ui/RebindScreen.d.ts +0 -70
- package/dist/two-d/ui/RebindScreen.d.ts.map +0 -1
- package/dist/two-d/ui/RebindScreen.js +0 -129
- package/dist/two-d/ui/RebindScreen.js.map +0 -1
- package/dist/two-d/ui/RichLabel.d.ts +0 -62
- package/dist/two-d/ui/RichLabel.d.ts.map +0 -1
- package/dist/two-d/ui/RichLabel.js +0 -146
- package/dist/two-d/ui/RichLabel.js.map +0 -1
- package/dist/two-d/ui/ScrollBox.d.ts +0 -157
- package/dist/two-d/ui/ScrollBox.d.ts.map +0 -1
- package/dist/two-d/ui/ScrollBox.js +0 -329
- package/dist/two-d/ui/ScrollBox.js.map +0 -1
- package/dist/two-d/ui/ScrollText.d.ts +0 -122
- package/dist/two-d/ui/ScrollText.d.ts.map +0 -1
- package/dist/two-d/ui/ScrollText.js +0 -202
- package/dist/two-d/ui/ScrollText.js.map +0 -1
- package/dist/two-d/ui/SelectionModel.d.ts +0 -50
- package/dist/two-d/ui/SelectionModel.d.ts.map +0 -1
- package/dist/two-d/ui/SelectionModel.js +0 -73
- package/dist/two-d/ui/SelectionModel.js.map +0 -1
- package/dist/two-d/ui/SettingsScreen.d.ts +0 -112
- package/dist/two-d/ui/SettingsScreen.d.ts.map +0 -1
- package/dist/two-d/ui/SettingsScreen.js +0 -338
- package/dist/two-d/ui/SettingsScreen.js.map +0 -1
- package/dist/two-d/ui/Skins.d.ts +0 -59
- package/dist/two-d/ui/Skins.d.ts.map +0 -1
- package/dist/two-d/ui/Skins.js +0 -77
- package/dist/two-d/ui/Skins.js.map +0 -1
- package/dist/two-d/ui/Slider.d.ts +0 -91
- package/dist/two-d/ui/Slider.d.ts.map +0 -1
- package/dist/two-d/ui/Slider.js +0 -170
- package/dist/two-d/ui/Slider.js.map +0 -1
- package/dist/two-d/ui/Spinner.d.ts +0 -67
- package/dist/two-d/ui/Spinner.d.ts.map +0 -1
- package/dist/two-d/ui/Spinner.js +0 -137
- package/dist/two-d/ui/Spinner.js.map +0 -1
- package/dist/two-d/ui/StatsScreen.d.ts +0 -40
- package/dist/two-d/ui/StatsScreen.d.ts.map +0 -1
- package/dist/two-d/ui/StatsScreen.js +0 -42
- package/dist/two-d/ui/StatsScreen.js.map +0 -1
- package/dist/two-d/ui/TabbedList.d.ts +0 -118
- package/dist/two-d/ui/TabbedList.d.ts.map +0 -1
- package/dist/two-d/ui/TabbedList.js +0 -221
- package/dist/two-d/ui/TabbedList.js.map +0 -1
- package/dist/two-d/ui/TextModel.d.ts +0 -90
- package/dist/two-d/ui/TextModel.d.ts.map +0 -1
- package/dist/two-d/ui/TextModel.js +0 -175
- package/dist/two-d/ui/TextModel.js.map +0 -1
- package/dist/two-d/ui/TextPrompt.d.ts +0 -122
- package/dist/two-d/ui/TextPrompt.d.ts.map +0 -1
- package/dist/two-d/ui/TextPrompt.js +0 -236
- package/dist/two-d/ui/TextPrompt.js.map +0 -1
- package/dist/two-d/ui/TextSharpness.d.ts +0 -33
- package/dist/two-d/ui/TextSharpness.d.ts.map +0 -1
- package/dist/two-d/ui/TextSharpness.js +0 -56
- package/dist/two-d/ui/TextSharpness.js.map +0 -1
- package/dist/two-d/ui/Toast.d.ts +0 -57
- package/dist/two-d/ui/Toast.d.ts.map +0 -1
- package/dist/two-d/ui/Toast.js +0 -101
- package/dist/two-d/ui/Toast.js.map +0 -1
- package/dist/two-d/ui/Tooltip.d.ts +0 -177
- package/dist/two-d/ui/Tooltip.d.ts.map +0 -1
- package/dist/two-d/ui/Tooltip.js +0 -275
- package/dist/two-d/ui/Tooltip.js.map +0 -1
- package/dist/two-d/ui/TreeView.d.ts +0 -68
- package/dist/two-d/ui/TreeView.d.ts.map +0 -1
- package/dist/two-d/ui/TreeView.js +0 -133
- package/dist/two-d/ui/TreeView.js.map +0 -1
- package/dist/two-d/ui/VerticalLabel.d.ts +0 -69
- package/dist/two-d/ui/VerticalLabel.d.ts.map +0 -1
- package/dist/two-d/ui/VerticalLabel.js +0 -110
- package/dist/two-d/ui/VerticalLabel.js.map +0 -1
- package/dist/two-d/ui/Window.d.ts +0 -188
- package/dist/two-d/ui/Window.d.ts.map +0 -1
- package/dist/two-d/ui/Window.js +0 -311
- package/dist/two-d/ui/Window.js.map +0 -1
- package/dist/two-d/ui/WindowStack.d.ts +0 -63
- package/dist/two-d/ui/WindowStack.d.ts.map +0 -1
- package/dist/two-d/ui/WindowStack.js +0 -132
- package/dist/two-d/ui/WindowStack.js.map +0 -1
- package/dist/two-d/ui/a11y.d.ts +0 -43
- package/dist/two-d/ui/a11y.d.ts.map +0 -1
- package/dist/two-d/ui/a11y.js +0 -79
- package/dist/two-d/ui/a11y.js.map +0 -1
- package/dist/two-d/ui/contrast.d.ts +0 -30
- package/dist/two-d/ui/contrast.d.ts.map +0 -1
- package/dist/two-d/ui/contrast.js +0 -42
- package/dist/two-d/ui/contrast.js.map +0 -1
- package/dist/two-d/ui/index.d.ts +0 -96
- package/dist/two-d/ui/index.d.ts.map +0 -1
- package/dist/two-d/ui/index.js +0 -49
- package/dist/two-d/ui/index.js.map +0 -1
- package/dist/two-d/ui/markdown.d.ts +0 -55
- package/dist/two-d/ui/markdown.d.ts.map +0 -1
- package/dist/two-d/ui/markdown.js +0 -147
- package/dist/two-d/ui/markdown.js.map +0 -1
- package/dist/two-d/ui/markup.d.ts +0 -189
- package/dist/two-d/ui/markup.d.ts.map +0 -1
- package/dist/two-d/ui/markup.js +0 -387
- package/dist/two-d/ui/markup.js.map +0 -1
- package/dist/two-d/ui/reveal.d.ts +0 -41
- package/dist/two-d/ui/reveal.d.ts.map +0 -1
- package/dist/two-d/ui/reveal.js +0 -22
- package/dist/two-d/ui/reveal.js.map +0 -1
- package/dist/two-d/ui/theme.d.ts +0 -133
- package/dist/two-d/ui/theme.d.ts.map +0 -1
- package/dist/two-d/ui/theme.js +0 -122
- package/dist/two-d/ui/theme.js.map +0 -1
- package/dist/two-d/ui/themedText.d.ts +0 -20
- package/dist/two-d/ui/themedText.d.ts.map +0 -1
- package/dist/two-d/ui/themedText.js +0 -9
- package/dist/two-d/ui/themedText.js.map +0 -1
- package/dist/version.d.ts +0 -13
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -13
- package/dist/version.js.map +0 -1
- package/dist/world/Encounters.d.ts +0 -32
- package/dist/world/Encounters.d.ts.map +0 -1
- package/dist/world/Encounters.js +0 -9
- package/dist/world/Encounters.js.map +0 -1
- package/dist/world/Environment.d.ts +0 -58
- package/dist/world/Environment.d.ts.map +0 -1
- package/dist/world/Environment.js +0 -89
- package/dist/world/Environment.js.map +0 -1
- package/dist/world/Overworld.d.ts +0 -39
- package/dist/world/Overworld.d.ts.map +0 -1
- package/dist/world/Overworld.js +0 -40
- package/dist/world/Overworld.js.map +0 -1
- package/dist/world/SideTurns.d.ts +0 -115
- package/dist/world/SideTurns.d.ts.map +0 -1
- package/dist/world/SideTurns.js +0 -138
- package/dist/world/SideTurns.js.map +0 -1
- package/dist/world/TurnClock.d.ts +0 -41
- package/dist/world/TurnClock.d.ts.map +0 -1
- package/dist/world/TurnClock.js +0 -49
- package/dist/world/TurnClock.js.map +0 -1
- package/dist/world/World.d.ts +0 -64
- package/dist/world/World.d.ts.map +0 -1
- package/dist/world/World.js +0 -91
- package/dist/world/World.js.map +0 -1
- package/dist/world/index.d.ts +0 -12
- package/dist/world/index.d.ts.map +0 -1
- package/dist/world/index.js +0 -7
- package/dist/world/index.js.map +0 -1
- package/sbom.cdx.json +0 -5996
- package/tools/mwl.mjs +0 -324
- package/tools/vendored/rgssad-wasm/LICENSE-MIT +0 -21
- package/tools/vendored/rgssad-wasm/README.md +0 -15
- package/tools/vendored/rgssad-wasm/package.json +0 -17
- package/tools/vendored/rgssad-wasm/rgssad_wasm.d.ts +0 -41
- package/tools/vendored/rgssad-wasm/rgssad_wasm.js +0 -6
- package/tools/vendored/rgssad-wasm/rgssad_wasm_bg.js +0 -399
- package/tools/vendored/rgssad-wasm/rgssad_wasm_bg.wasm +0 -0
- package/tools/vendored/rgssad-wasm/rgssad_wasm_bg.wasm.d.ts +0 -17
- package/tools.md +0 -219
package/tools/sbom.mjs
CHANGED
|
@@ -1,340 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
import { readFileSync, realpathSync } from 'node:fs';
|
|
4
|
-
import { readFile, writeFile } from 'node:fs/promises';
|
|
5
|
-
import { join, relative, resolve, sep } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
|
|
8
|
-
const OUTPUT = 'sbom.cdx.json';
|
|
9
|
-
/** this tool's own package, named in every document's `metadata.tools` whichever project it describes */
|
|
10
|
-
const TOOL = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
11
|
-
const SPEC_VERSION = '1.6';
|
|
12
|
-
|
|
13
|
-
const HASH_ALGORITHMS = { sha512: 'SHA-512', sha384: 'SHA-384', sha256: 'SHA-256', sha1: 'SHA-1' };
|
|
14
|
-
|
|
15
|
-
/** the RFC 4122 DNS namespace, undashed because it is only ever fed to the hash as bytes */
|
|
16
|
-
const DNS_NAMESPACE = '6ba7b8109dad11d180b400c04fd430c8';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Package URL for an npm package, the SBOM's `bom-ref` as well. A scoped name's `@` is
|
|
20
|
-
* percent-encoded but its `/` is not, which is what the purl spec's own npm examples do
|
|
21
|
-
* (`pkg:npm/%40angular/animation@12.3.1`).
|
|
22
|
-
*/
|
|
23
|
-
export function purlFor(name, version) {
|
|
24
|
-
const encoded = name.startsWith('@') ? `%40${name.slice(1)}` : name;
|
|
25
|
-
return `pkg:npm/${encoded}@${version}`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* npm's `integrity` field (`sha512-<base64>`, sometimes several space-separated) as CycloneDX
|
|
30
|
-
* hashes. CycloneDX carries a hash as lowercase hex, so the base64 is decoded and re-encoded.
|
|
31
|
-
*/
|
|
32
|
-
export function hashesFromIntegrity(integrity) {
|
|
33
|
-
if (typeof integrity !== 'string') return [];
|
|
34
|
-
const hashes = [];
|
|
35
|
-
for (const part of integrity.split(/\s+/)) {
|
|
36
|
-
const dash = part.indexOf('-');
|
|
37
|
-
if (dash < 0) continue;
|
|
38
|
-
const alg = HASH_ALGORITHMS[part.slice(0, dash).toLowerCase()];
|
|
39
|
-
if (alg === undefined) continue;
|
|
40
|
-
hashes.push({ alg, content: Buffer.from(part.slice(dash + 1), 'base64').toString('hex') });
|
|
41
|
-
}
|
|
42
|
-
return hashes;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** an SPDX id stays an `id`; anything with spaces or an expression stays a `name` instead */
|
|
46
|
-
function licenseFor(license) {
|
|
47
|
-
if (typeof license !== 'string' || license.trim() === '') return undefined;
|
|
48
|
-
const value = license.trim();
|
|
49
|
-
return /^[A-Za-z0-9.+-]+$/.test(value) ? { license: { id: value } } : { license: { name: value } };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** the package a lockfile location holds: `node_modules/@scope/name` is `@scope/name` */
|
|
53
|
-
function nameFromLocation(location) {
|
|
54
|
-
const marker = 'node_modules/';
|
|
55
|
-
return location.slice(location.lastIndexOf(marker) + marker.length);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** node resolution over a lockfile: the nearest `node_modules/<name>` at or above `location` */
|
|
59
|
-
function resolveDependency(packages, location, name) {
|
|
60
|
-
let dir = location;
|
|
61
|
-
for (;;) {
|
|
62
|
-
const candidate = dir === '' ? `node_modules/${name}` : `${dir}/node_modules/${name}`;
|
|
63
|
-
if (packages[candidate] !== undefined) return candidate;
|
|
64
|
-
if (dir === '') return undefined;
|
|
65
|
-
const marker = dir.lastIndexOf('/node_modules/');
|
|
66
|
-
dir = marker < 0 ? '' : dir.slice(0, marker);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function scopeOf(entry) {
|
|
71
|
-
if (entry.dev === true) return 'excluded';
|
|
72
|
-
if (entry.optional === true) return 'optional';
|
|
73
|
-
return 'required';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** required beats optional beats excluded when one purl is reachable more than one way */
|
|
77
|
-
const SCOPE_RANK = { required: 0, optional: 1, excluded: 2 };
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* A version-5 (RFC 4122 name-based) UUID in the DNS namespace. The same name always hashes to the
|
|
81
|
-
* same UUID, which is what lets `serialNumber` below be derived instead of invented; twelve lines
|
|
82
|
-
* of SHA-1 beats a dependency for the one UUID this tool will ever need.
|
|
83
|
-
*/
|
|
84
|
-
function uuidv5(name) {
|
|
85
|
-
const bytes = createHash('sha1')
|
|
86
|
-
.update(Buffer.from(DNS_NAMESPACE, 'hex'))
|
|
87
|
-
.update(name, 'utf8')
|
|
88
|
-
.digest()
|
|
89
|
-
.subarray(0, 16);
|
|
90
|
-
bytes[6] = (bytes[6] & 0x0f) | 0x50; // version 5
|
|
91
|
-
bytes[8] = (bytes[8] & 0x3f) | 0x80; // RFC 4122 variant
|
|
92
|
-
const hex = bytes.toString('hex');
|
|
93
|
-
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Builds a CycloneDX document from `package.json` and `package-lock.json` alone, so the SBOM is
|
|
98
|
-
* reproducible and needs no network access. Every locked package is a component (dev-only ones
|
|
99
|
-
* marked `excluded`, since they are not part of a published install) and the lockfile's own
|
|
100
|
-
* resolution is turned into the dependency graph. Output is deterministic: components and edges
|
|
101
|
-
* are sorted and `serialNumber` is a UUID derived from the document's own content rather than
|
|
102
|
-
* from the clock, so the committed file can be checked for drift the way `API_REPORT.md` and
|
|
103
|
-
* `PROJECT_STATS.json` already are: two BOMs that share a serial are the same BOM, and any change
|
|
104
|
-
* to a component, a hash or an edge produces a new one.
|
|
105
|
-
*
|
|
106
|
-
* `metadata.timestamp` is deliberately absent. A generation time stamped into a committed file is
|
|
107
|
-
* either a drift-check failure on every run or one stale moment every later read is dated to,
|
|
108
|
-
* while `CHANGELOG.md` already dates each version.
|
|
109
|
-
*
|
|
110
|
-
* `type` is the described component's CycloneDX type: `'library'` for this framework,
|
|
111
|
-
* `'application'` for a game (`mwg-sbom` picks it from whether the project is `private`).
|
|
112
|
-
*/
|
|
113
|
-
export function buildSbom(packageJson, lockfile, { type = 'library' } = {}) {
|
|
114
|
-
const packages = lockfile.packages ?? {};
|
|
115
|
-
const rootPurl = purlFor(packageJson.name, packageJson.version);
|
|
116
|
-
|
|
117
|
-
const byPurl = new Map();
|
|
118
|
-
for (const [location, entry] of Object.entries(packages)) {
|
|
119
|
-
if (location === '' || entry.link === true || typeof entry.version !== 'string') continue;
|
|
120
|
-
const name = typeof entry.name === 'string' ? entry.name : nameFromLocation(location);
|
|
121
|
-
const purl = purlFor(name, entry.version);
|
|
122
|
-
const scope = scopeOf(entry);
|
|
123
|
-
const existing = byPurl.get(purl);
|
|
124
|
-
if (existing !== undefined) {
|
|
125
|
-
if (SCOPE_RANK[scope] < SCOPE_RANK[existing.scope]) existing.scope = scope;
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
const component = { type: 'library', 'bom-ref': purl, name, version: entry.version, purl, scope };
|
|
129
|
-
const hashes = hashesFromIntegrity(entry.integrity);
|
|
130
|
-
if (hashes.length > 0) component.hashes = hashes;
|
|
131
|
-
const licenses = licenseFor(entry.license);
|
|
132
|
-
if (licenses !== undefined) component.licenses = [licenses];
|
|
133
|
-
byPurl.set(purl, component);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const components = [...byPurl.values()].sort((a, b) => (a.purl < b.purl ? -1 : a.purl > b.purl ? 1 : 0));
|
|
137
|
-
|
|
138
|
-
const edges = new Map();
|
|
139
|
-
const addEdge = (from, to) => {
|
|
140
|
-
if (!edges.has(from)) edges.set(from, new Set());
|
|
141
|
-
edges.get(from).add(to);
|
|
142
|
-
};
|
|
143
|
-
for (const [location, entry] of Object.entries(packages)) {
|
|
144
|
-
if (location !== '' && (entry.link === true || typeof entry.version !== 'string')) continue;
|
|
145
|
-
const from =
|
|
146
|
-
location === ''
|
|
147
|
-
? rootPurl
|
|
148
|
-
: purlFor(typeof entry.name === 'string' ? entry.name : nameFromLocation(location), entry.version);
|
|
149
|
-
const declared = {
|
|
150
|
-
...(entry.dependencies ?? {}),
|
|
151
|
-
...(entry.devDependencies ?? {}),
|
|
152
|
-
...(entry.optionalDependencies ?? {}),
|
|
153
|
-
...(entry.peerDependencies ?? {}),
|
|
154
|
-
};
|
|
155
|
-
for (const name of Object.keys(declared)) {
|
|
156
|
-
const target = resolveDependency(packages, location, name);
|
|
157
|
-
const targetEntry = target === undefined ? undefined : packages[target];
|
|
158
|
-
if (targetEntry === undefined || typeof targetEntry.version !== 'string') continue;
|
|
159
|
-
const targetName = typeof targetEntry.name === 'string' ? targetEntry.name : nameFromLocation(target);
|
|
160
|
-
addEdge(from, purlFor(targetName, targetEntry.version));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const refs = [rootPurl, ...components.map((component) => component['bom-ref'])];
|
|
165
|
-
const dependencies = [...new Set(refs)]
|
|
166
|
-
.sort()
|
|
167
|
-
.map((ref) => ({ ref, dependsOn: [...(edges.get(ref) ?? [])].sort() }));
|
|
168
|
-
|
|
169
|
-
return document(packageJson, type, components, dependencies);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/** the envelope both builders share, with the content-derived serial */
|
|
173
|
-
function document(packageJson, type, components, dependencies) {
|
|
174
|
-
const rootPurl = purlFor(packageJson.name, packageJson.version);
|
|
175
|
-
const rootLicenses = licenseFor(packageJson.license);
|
|
176
|
-
const metadata = {
|
|
177
|
-
tools: {
|
|
178
|
-
components: [{ type: 'application', group: 'datamoc', name: 'tools/sbom.mjs', version: TOOL.version }],
|
|
179
|
-
},
|
|
180
|
-
component: {
|
|
181
|
-
type,
|
|
182
|
-
'bom-ref': rootPurl,
|
|
183
|
-
name: packageJson.name,
|
|
184
|
-
version: packageJson.version,
|
|
185
|
-
purl: rootPurl,
|
|
186
|
-
...(typeof packageJson.description === 'string' ? { description: packageJson.description } : {}),
|
|
187
|
-
...(rootLicenses === undefined ? {} : { licenses: [rootLicenses] }),
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
return {
|
|
191
|
-
bomFormat: 'CycloneDX',
|
|
192
|
-
specVersion: SPEC_VERSION,
|
|
193
|
-
serialNumber: `urn:uuid:${uuidv5(JSON.stringify({ metadata, components, dependencies }))}`,
|
|
194
|
-
version: 1,
|
|
195
|
-
metadata,
|
|
196
|
-
components,
|
|
197
|
-
dependencies,
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* The package a bundled module came from: the last `node_modules/<name>` (or `<@scope/name>`) in
|
|
203
|
-
* its path, with the directory holding that package's `package.json`. Null for the game's own
|
|
204
|
-
* source and for bundler-virtual modules.
|
|
205
|
-
*/
|
|
206
|
-
export function packageOfModule(id) {
|
|
207
|
-
const path = id.replace(/^\0/, '').split('?')[0].split(sep).join('/');
|
|
208
|
-
const marker = path.lastIndexOf('/node_modules/');
|
|
209
|
-
if (marker < 0) return null;
|
|
210
|
-
const parts = path.slice(marker + '/node_modules/'.length).split('/');
|
|
211
|
-
const name = parts[0].startsWith('@') ? `${parts[0]}/${parts[1]}` : parts[0];
|
|
212
|
-
if (!name || name.startsWith('.')) return null;
|
|
213
|
-
return { name, dir: `${path.slice(0, marker)}/node_modules/${name}` };
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The SBOM of what a build actually ships, rather than of `node_modules` (item 380): a game is
|
|
218
|
-
* one tree-shaken bundle, so the lockfile lists tooling that never reaches a player and cannot say
|
|
219
|
-
* which packages did. `modules` are the bundle's module ids (vite's module graph, collected by
|
|
220
|
-
* `mwgPage()`), each package they come from becomes a `required` library component with its
|
|
221
|
-
* version and licence read from its own `package.json`, and `files` are the shipped files as
|
|
222
|
-
* `file` components carrying their SHA-256.
|
|
223
|
-
*
|
|
224
|
-
* @param {{ packageJson: object, modules: string[], files: { path: string, sha256: string }[] }} input
|
|
225
|
-
*/
|
|
226
|
-
export function buildArtifactSbom({ packageJson, modules, files }) {
|
|
227
|
-
const packages = new Map();
|
|
228
|
-
for (const id of modules) {
|
|
229
|
-
const found = packageOfModule(id);
|
|
230
|
-
if (!found || packages.has(found.dir)) continue;
|
|
231
|
-
let manifest;
|
|
232
|
-
try {
|
|
233
|
-
manifest = JSON.parse(readFileSync(join(found.dir, 'package.json'), 'utf8'));
|
|
234
|
-
} catch {
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
packages.set(found.dir, {
|
|
238
|
-
name: manifest.name ?? found.name,
|
|
239
|
-
version: manifest.version,
|
|
240
|
-
license: manifest.license,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
const libraries = new Map();
|
|
244
|
-
for (const { name, version, license } of packages.values()) {
|
|
245
|
-
if (typeof version !== 'string') continue;
|
|
246
|
-
const purl = purlFor(name, version);
|
|
247
|
-
const licenses = licenseFor(license);
|
|
248
|
-
libraries.set(purl, {
|
|
249
|
-
type: 'library',
|
|
250
|
-
'bom-ref': purl,
|
|
251
|
-
name,
|
|
252
|
-
version,
|
|
253
|
-
purl,
|
|
254
|
-
scope: 'required',
|
|
255
|
-
...(licenses === undefined ? {} : { licenses: [licenses] }),
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
const fileComponents = [...files]
|
|
259
|
-
.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0))
|
|
260
|
-
.map(({ path, sha256 }) => ({
|
|
261
|
-
type: 'file',
|
|
262
|
-
'bom-ref': `file:${path}`,
|
|
263
|
-
name: path,
|
|
264
|
-
hashes: [{ alg: 'SHA-256', content: sha256 }],
|
|
265
|
-
}));
|
|
266
|
-
const components = [...[...libraries.values()].sort((a, b) => (a.purl < b.purl ? -1 : 1)), ...fileComponents];
|
|
267
|
-
const rootPurl = purlFor(packageJson.name, packageJson.version);
|
|
268
|
-
const dependencies = [{ ref: rootPurl, dependsOn: [...libraries.keys()].sort() }];
|
|
269
|
-
return document(packageJson, 'application', components, dependencies);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** SHA-256 of every file under `dist` a player receives: precompressed siblings and the SBOM itself left out */
|
|
273
|
-
export async function shippedFiles(dist) {
|
|
274
|
-
const { walk } = await import('./compile-resources.mjs');
|
|
275
|
-
const files = [];
|
|
276
|
-
for await (const file of walk(dist)) {
|
|
277
|
-
const path = relative(dist, file).split(sep).join('/');
|
|
278
|
-
if (/\.(gz|br|xz)$/.test(path) || path.endsWith('.cdx.json')) continue;
|
|
279
|
-
files.push({
|
|
280
|
-
path,
|
|
281
|
-
sha256: createHash('sha256')
|
|
282
|
-
.update(await readFile(file))
|
|
283
|
-
.digest('hex'),
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
return files;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/** the exact committed bytes: two-space JSON and a trailing newline */
|
|
290
|
-
export function serialize(bom) {
|
|
291
|
-
return `${JSON.stringify(bom, null, 2)}\n`;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
async function readJson(path) {
|
|
295
|
-
return JSON.parse(await readFile(path, 'utf8'));
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* `mwg-sbom [project folder] [--out=<file>] [--check]`: the lockfile SBOM of any npm project,
|
|
300
|
-
* this framework included (`npm run sbom` here). A `private` project is described as an
|
|
301
|
-
* `application`, anything else as a `library`. `--check` compares instead of writing, for CI.
|
|
302
|
-
*/
|
|
303
|
-
async function main(argv) {
|
|
304
|
-
if (argv.includes('--help') || argv.includes('-h')) {
|
|
305
|
-
console.log('usage: mwg-sbom [project folder] [--out=<file>] [--check]');
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
const root = resolve(argv.find((arg) => !arg.startsWith('--')) ?? '.');
|
|
309
|
-
const out = resolve(root, argv.find((arg) => arg.startsWith('--out='))?.slice(6) ?? OUTPUT);
|
|
310
|
-
const packageJson = await readJson(join(root, 'package.json'));
|
|
311
|
-
const bom = buildSbom(packageJson, await readJson(join(root, 'package-lock.json')), {
|
|
312
|
-
type: packageJson.private === true ? 'application' : 'library',
|
|
313
|
-
});
|
|
314
|
-
const json = serialize(bom);
|
|
315
|
-
const name = relative(root, out) || out;
|
|
316
|
-
const summary = `CycloneDX ${SPEC_VERSION}, ${bom.components.length} components`;
|
|
317
|
-
|
|
318
|
-
if (argv.includes('--check')) {
|
|
319
|
-
const committed = await readFile(out, 'utf8').catch(() => undefined);
|
|
320
|
-
//CRLF is a Windows checkout's doing, not a difference in the BOM itself (and a missing
|
|
321
|
-
//file still reads as out of date: '' never equals the serialized BOM)
|
|
322
|
-
if ((committed ?? '').replace(/\r\n/g, '\n') !== json.replace(/\r\n/g, '\n')) {
|
|
323
|
-
console.error(`${name} is out of date with package-lock.json. Run "npm run sbom" and commit the result.`);
|
|
324
|
-
process.exitCode = 1;
|
|
325
|
-
} else {
|
|
326
|
-
console.log(`${name} matches package-lock.json (${summary}).`);
|
|
327
|
-
}
|
|
328
|
-
} else {
|
|
329
|
-
await writeFile(out, json, 'utf8');
|
|
330
|
-
console.log(`wrote ${name} (${summary})`);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
//realpath, since an npm `bin` shim reaches this file through a symlink
|
|
335
|
-
//no top-level await: a vite config loaded as CommonJS has to be able to require() this module
|
|
336
|
-
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url))
|
|
337
|
-
main(process.argv.slice(2)).catch((error) => {
|
|
338
|
-
console.error(error);
|
|
339
|
-
process.exitCode = 1;
|
|
340
|
-
});
|
|
1
|
+
export * from '@datamoc/mwg/tools/sbom';
|
package/tools/single-file.d.mts
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface SingleFileOptions {
|
|
3
|
-
/** Path to the folder `emit-page.mjs` already wrote. */
|
|
4
|
-
dist: string;
|
|
5
|
-
/** Compress each inlined script before embedding it (default false). */
|
|
6
|
-
compress?: boolean;
|
|
7
|
-
/** Algorithm used when `compress` is set (default 'gzip'). */
|
|
8
|
-
algorithm?: 'gzip' | 'brotli';
|
|
9
|
-
/** gzip level 1-9, or brotli quality 0-11 (default 9 for gzip, 11 for brotli). */
|
|
10
|
-
level?: number;
|
|
11
|
-
/** Show a splash screen while the embedded scripts decode (default true). */
|
|
12
|
-
splash?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Output file *name*, written inside `dist` (default `standalone.html`). A name, not a
|
|
15
|
-
* path: one containing a separator is refused with a thrown error rather than joined
|
|
16
|
-
* onto `dist`. Additive, so `dist/index.html` is left as it was.
|
|
17
|
-
*/
|
|
18
|
-
output?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** What {@link buildSingleFile} wrote. */
|
|
22
|
-
export interface SingleFileResult {
|
|
23
|
-
/** Path of the written file: `dist` joined with `output`. */
|
|
24
|
-
path: string;
|
|
25
|
-
/** How many `<script src>` payloads were inlined. */
|
|
26
|
-
scripts: number;
|
|
27
|
-
/** Total size of that script code before compression. */
|
|
28
|
-
rawBytes: number;
|
|
29
|
-
/** Total length of the base64 payloads actually embedded, so after compression. */
|
|
30
|
-
embeddedBytes: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function buildSingleFile(options: SingleFileOptions): Promise<SingleFileResult>;
|
|
1
|
+
export * from '@datamoc/mwg/tools/single-file';
|
package/tools/single-file.mjs
CHANGED
|
@@ -1,239 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { join, basename, resolve } from 'node:path';
|
|
3
|
-
import { gzipSync, brotliCompressSync, constants } from 'node:zlib';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Turns an `emit-page.mjs` output folder (`index.html` + sibling asset/bundle `.js` files)
|
|
8
|
-
* into one genuinely standalone HTML file with no sibling script at all - roadmap item 349,
|
|
9
|
-
* the "single-file" leg of the build-options matrix `emit-page.mjs --single-file` exposes.
|
|
10
|
-
*
|
|
11
|
-
* The existing multi-file output already opens by double-clicking (that's the whole point of
|
|
12
|
-
* `tools/compile-resources.mjs` and `tools/classic-html.mjs`), but it is still an `index.html`
|
|
13
|
-
* plus N `.js` files that have to travel together. This inlines every `<script src>` the page
|
|
14
|
-
* loads directly into the page, in the same order, so the folder can be reduced to one file
|
|
15
|
-
* before it is shared or archived.
|
|
16
|
-
*
|
|
17
|
-
* Compression (`compress: true`) compresses each script's source before it is
|
|
18
|
-
* base64-embedded, and unpacks it at load with the browser's own `DecompressionStream` - a
|
|
19
|
-
* real Web Streams API, not a shipped decoder. That beats a pure-JS decompressor such as
|
|
20
|
-
* `js-lzma` (the roadmap item's other candidate) on every axis that matters here: it adds
|
|
21
|
-
* zero bytes to the page, needs no license or maintenance, and both algorithms below are
|
|
22
|
-
* exactly what `tools/compress-dist.mjs` already writes for the server-negotiated path, so the
|
|
23
|
-
* project only carries one compression story either way.
|
|
24
|
-
*
|
|
25
|
-
* `algorithm: 'gzip'` (the default) is the safer choice for browser reach: `compress: false`
|
|
26
|
-
* has no requirement beyond base64, which every browser this project targets can decode, and
|
|
27
|
-
* gzip's `DecompressionStream('gzip')` has been available since May 2023. `algorithm:
|
|
28
|
-
* 'brotli'` compresses further for the same reason `compress-dist.mjs` prefers it over gzip
|
|
29
|
-
* when a server can negotiate it, and needs `DecompressionStream('br')` - an option this
|
|
30
|
-
* repo's roadmap (item 350) took up expecting broad support, but a real Chrome (153, tested
|
|
31
|
-
* directly in this repo's own verification pass) still throws
|
|
32
|
-
* `Unsupported compression format: 'br'` for both `'br'` and `'brotli'`, so treat brotli here
|
|
33
|
-
* as an advanced, narrower-reach option rather than a safe default until that is re-verified
|
|
34
|
-
* against current browsers - `algorithm: 'gzip'` stays the one every browser this project
|
|
35
|
-
* targets can actually decode today. Either way, the bootstrap throws a clear, actionable
|
|
36
|
-
* error rather than silently failing when the browser's `DecompressionStream` does not support
|
|
37
|
-
* the chosen format.
|
|
38
|
-
*
|
|
39
|
-
* Decoding is async even when uncompressed (kept uniform, and `atob` on a very large payload
|
|
40
|
-
* still benefits from not blocking the parser), so a splash screen (`splash: true`, the
|
|
41
|
-
* default) covers the page until every script has run. It is deliberately minimal - inline
|
|
42
|
-
* styles and a CSS spinner, no asset of its own - since this is a framework-level fallback a
|
|
43
|
-
* game is free to replace, not a themed loading screen.
|
|
44
|
-
*
|
|
45
|
-
* @param {object} options
|
|
46
|
-
* @param {string} options.dist path to the folder `emit-page.mjs` already wrote
|
|
47
|
-
* @param {boolean} [options.compress] compress each inlined script (default false)
|
|
48
|
-
* @param {'gzip'|'brotli'} [options.algorithm] compression algorithm when `compress` is set
|
|
49
|
-
* (default 'gzip')
|
|
50
|
-
* @param {number} [options.level] gzip level 1-9, or brotli quality 0-11, when `compress` is
|
|
51
|
-
* set (default 9 for gzip, 11 for brotli)
|
|
52
|
-
* @param {boolean} [options.splash] show a splash screen while scripts decode (default true)
|
|
53
|
-
* @param {string} [options.output] output file name, written inside `dist` (default
|
|
54
|
-
* `standalone.html`) - a name, not a path: one containing a separator is refused rather than
|
|
55
|
-
* joined onto `dist`. Additive, so the existing multi-file `index.html` is untouched
|
|
56
|
-
* @returns {Promise<{path: string, scripts: number, rawBytes: number, embeddedBytes: number}>}
|
|
57
|
-
*/
|
|
58
|
-
export async function buildSingleFile({
|
|
59
|
-
dist,
|
|
60
|
-
compress = false,
|
|
61
|
-
algorithm = 'gzip',
|
|
62
|
-
level,
|
|
63
|
-
splash = true,
|
|
64
|
-
output = 'standalone.html',
|
|
65
|
-
} = {}) {
|
|
66
|
-
if (!dist) throw new Error('buildSingleFile needs a `dist` folder');
|
|
67
|
-
if (algorithm !== 'gzip' && algorithm !== 'brotli') {
|
|
68
|
-
throw new Error(`buildSingleFile: algorithm must be 'gzip' or 'brotli', got ${JSON.stringify(algorithm)}`);
|
|
69
|
-
}
|
|
70
|
-
if (/[\\/]/.test(output)) {
|
|
71
|
-
throw new Error(
|
|
72
|
-
'buildSingleFile: `output` is a file name written inside `dist`, not a path, so it cannot ' +
|
|
73
|
-
`contain a separator - got ${JSON.stringify(output)}`,
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const htmlPath = join(dist, 'index.html');
|
|
78
|
-
const html = await readFile(htmlPath, 'utf8');
|
|
79
|
-
|
|
80
|
-
const scriptTag = /[ \t]*<script\b[^>]*\bsrc="([^"]+)"[^>]*><\/script>\n?/g;
|
|
81
|
-
const sources = [];
|
|
82
|
-
let firstMatchIndex = -1;
|
|
83
|
-
let match;
|
|
84
|
-
while ((match = scriptTag.exec(html))) {
|
|
85
|
-
if (firstMatchIndex === -1) firstMatchIndex = match.index;
|
|
86
|
-
sources.push(match[1]);
|
|
87
|
-
}
|
|
88
|
-
if (sources.length === 0) {
|
|
89
|
-
throw new Error(`${htmlPath}: no <script src="..."> tags found - is this an emit-page.mjs output folder?`);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const compressBytes = (buf) =>
|
|
93
|
-
algorithm === 'brotli'
|
|
94
|
-
? brotliCompressSync(buf, { params: { [constants.BROTLI_PARAM_QUALITY]: level ?? 11 } })
|
|
95
|
-
: gzipSync(buf, { level: level ?? 9 });
|
|
96
|
-
|
|
97
|
-
let rawBytes = 0;
|
|
98
|
-
let embeddedBytes = 0;
|
|
99
|
-
const payloads = [];
|
|
100
|
-
for (const src of sources) {
|
|
101
|
-
const filePath = join(dist, src.replace(/^\.\//, ''));
|
|
102
|
-
const code = await readFile(filePath, 'utf8');
|
|
103
|
-
rawBytes += Buffer.byteLength(code, 'utf8');
|
|
104
|
-
const bytes = compress ? compressBytes(Buffer.from(code, 'utf8')) : Buffer.from(code, 'utf8');
|
|
105
|
-
const b64 = bytes.toString('base64');
|
|
106
|
-
embeddedBytes += b64.length;
|
|
107
|
-
payloads.push({ name: basename(src), b64 });
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const withoutScripts = html.replace(scriptTag, '').replace(/\n{3,}/g, '\n\n');
|
|
111
|
-
const bootstrap = renderBootstrap(payloads, compress ? algorithm : 'none');
|
|
112
|
-
const splashCss = splash ? renderSplashStyle() : '';
|
|
113
|
-
const splashHtml = splash ? renderSplashMarkup() : '';
|
|
114
|
-
|
|
115
|
-
let page = withoutScripts;
|
|
116
|
-
page = page.includes('</head>') ? page.replace('</head>', `${splashCss}</head>`) : splashCss + page;
|
|
117
|
-
page = page.replace(/(<body[^>]*>)/, `$1\n${splashHtml}`);
|
|
118
|
-
page = page.replace(/<\/body>/, `\t${bootstrap}\n</body>`);
|
|
119
|
-
|
|
120
|
-
const outPath = join(dist, output);
|
|
121
|
-
await writeFile(outPath, page, 'utf8');
|
|
122
|
-
|
|
123
|
-
return { path: outPath, scripts: payloads.length, rawBytes, embeddedBytes };
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function renderSplashStyle() {
|
|
127
|
-
return (
|
|
128
|
-
'\t<style id="mwg-splash-style">\n' +
|
|
129
|
-
'\t\t#mwg-splash{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;' +
|
|
130
|
-
'flex-direction:column;gap:12px;background:#14161c;color:#eee;font:14px sans-serif;z-index:9999}\n' +
|
|
131
|
-
'\t\t#mwg-splash .mwg-spinner{width:28px;height:28px;border-radius:50%;' +
|
|
132
|
-
'border:3px solid rgba(255,255,255,0.25);border-top-color:#fff;animation:mwg-spin 0.8s linear infinite}\n' +
|
|
133
|
-
'\t\t@keyframes mwg-spin{to{transform:rotate(360deg)}}\n' +
|
|
134
|
-
'\t</style>\n'
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function renderSplashMarkup() {
|
|
139
|
-
return '\t<div id="mwg-splash"><div class="mwg-spinner"></div><div>Loading...</div></div>\n';
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function renderBootstrap(payloads, algorithm) {
|
|
143
|
-
const json = JSON.stringify(payloads);
|
|
144
|
-
// 'none' | 'gzip' | 'brotli' -> the DecompressionStream format string, or '' for uncompressed
|
|
145
|
-
const streamFormat = algorithm === 'brotli' ? 'br' : algorithm === 'gzip' ? 'gzip' : '';
|
|
146
|
-
return (
|
|
147
|
-
'<script>\n' +
|
|
148
|
-
'(function(){\n' +
|
|
149
|
-
// Seeded synchronously, before any decoding starts: several examples' own dev/build
|
|
150
|
-
// detection scripts (see examples/*/index.html) check `window.__MWG_ASSETS__` at
|
|
151
|
-
// DOMContentLoaded to tell a built page from the unbuilt dev template, a check that only
|
|
152
|
-
// works because the multi-file build's asset script is a *deferred* <script src>, which
|
|
153
|
-
// finishes before that event. This bootstrap decodes asynchronously instead, so without
|
|
154
|
-
// this line those checks would fire too early and show a false "not built" notice. The
|
|
155
|
-
// compiled asset script itself creates this object with the same `||` guard once it
|
|
156
|
-
// actually runs (see tools/compile-resources.mjs) - this only moves that existence
|
|
157
|
-
// earlier, not the entries themselves, which are still filled in strictly before the
|
|
158
|
-
// game bundle that reads them executes.
|
|
159
|
-
'\twindow.__MWG_ASSETS__=window.__MWG_ASSETS__||{};\n' +
|
|
160
|
-
`\tvar PAYLOADS=${json};\n` +
|
|
161
|
-
`\tvar FORMAT=${JSON.stringify(streamFormat)};\n` +
|
|
162
|
-
'\tfunction b64ToBytes(b64){var bin=atob(b64);var bytes=new Uint8Array(bin.length);' +
|
|
163
|
-
'for(var i=0;i<bin.length;i++)bytes[i]=bin.charCodeAt(i);return bytes;}\n' +
|
|
164
|
-
'\tfunction decodeText(bytes){\n' +
|
|
165
|
-
'\t\tif(!FORMAT)return Promise.resolve(new TextDecoder().decode(bytes));\n' +
|
|
166
|
-
// `new DecompressionStream(FORMAT)` throws *synchronously* (a TypeError) when the browser
|
|
167
|
-
// does not support the requested format - it does not reject a promise. A brotli build on
|
|
168
|
-
// a browser without DecompressionStream("br") support hits exactly this: without the
|
|
169
|
-
// try/catch here that throw would escape decodeText's caller entirely, skip the
|
|
170
|
-
// .catch(...) below, and leave the splash screen stuck forever instead of failing visibly.
|
|
171
|
-
'\t\ttry{\n' +
|
|
172
|
-
'\t\t\tif(typeof DecompressionStream==="undefined")throw new Error(' +
|
|
173
|
-
'"mwg standalone build: this browser has no DecompressionStream, needed to unpack the compressed bundle. ' +
|
|
174
|
-
'Use the multi-file build instead.");\n' +
|
|
175
|
-
'\t\t\tvar stream=new Blob([bytes]).stream().pipeThrough(new DecompressionStream(FORMAT));\n' +
|
|
176
|
-
'\t\t\treturn new Response(stream).arrayBuffer().then(function(buf){return new TextDecoder().decode(buf);});\n' +
|
|
177
|
-
'\t\t}catch(err){\n' +
|
|
178
|
-
'\t\t\treturn Promise.reject(err);\n' +
|
|
179
|
-
'\t\t}\n' +
|
|
180
|
-
'\t}\n' +
|
|
181
|
-
'\tfunction removeSplash(){var el=document.getElementById("mwg-splash");if(el&&el.parentNode)el.parentNode.removeChild(el);}\n' +
|
|
182
|
-
'\tfunction runNext(i){\n' +
|
|
183
|
-
'\t\tif(i>=PAYLOADS.length){removeSplash();return;}\n' +
|
|
184
|
-
'\t\tvar p=PAYLOADS[i];\n' +
|
|
185
|
-
'\t\tdecodeText(b64ToBytes(p.b64)).then(function(code){\n' +
|
|
186
|
-
'\t\t\tvar s=document.createElement("script");s.text=code;document.body.appendChild(s);\n' +
|
|
187
|
-
'\t\t\trunNext(i+1);\n' +
|
|
188
|
-
'\t\t}).catch(function(err){\n' +
|
|
189
|
-
'\t\t\tremoveSplash();\n' +
|
|
190
|
-
'\t\t\tconsole.error("mwg standalone build failed to load "+p.name, err);\n' +
|
|
191
|
-
'\t\t});\n' +
|
|
192
|
-
'\t}\n' +
|
|
193
|
-
'\trunNext(0);\n' +
|
|
194
|
-
'})();\n' +
|
|
195
|
-
'</script>'
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// ---------------------------------------------------------------- CLI
|
|
200
|
-
|
|
201
|
-
const isMain = process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
202
|
-
|
|
203
|
-
async function runCli() {
|
|
204
|
-
const args = process.argv.slice(2);
|
|
205
|
-
const dist = args[0];
|
|
206
|
-
if (!dist || dist.startsWith('--')) {
|
|
207
|
-
console.error(
|
|
208
|
-
'usage: node tools/single-file.mjs <dist folder> [--compress[=level]] [--brotli[=quality]] ' +
|
|
209
|
-
'[--no-splash] [--output name.html]',
|
|
210
|
-
);
|
|
211
|
-
process.exit(1);
|
|
212
|
-
}
|
|
213
|
-
const brotliFlag = args.find((a) => a === '--brotli' || a.startsWith('--brotli='));
|
|
214
|
-
const compressFlag = args.find((a) => a === '--compress' || a.startsWith('--compress='));
|
|
215
|
-
const compress = Boolean(brotliFlag || compressFlag);
|
|
216
|
-
const algorithm = brotliFlag ? 'brotli' : 'gzip';
|
|
217
|
-
const levelFlag = brotliFlag ?? compressFlag;
|
|
218
|
-
const level = levelFlag && levelFlag.includes('=') ? Number(levelFlag.split('=')[1]) : undefined;
|
|
219
|
-
const splash = !args.includes('--no-splash');
|
|
220
|
-
const outputIndex = args.indexOf('--output');
|
|
221
|
-
const output = outputIndex !== -1 ? args[outputIndex + 1] : 'standalone.html';
|
|
222
|
-
|
|
223
|
-
const result = await buildSingleFile({ dist: resolve(dist), compress, algorithm, level, splash, output });
|
|
224
|
-
const kb = (n) => (n / 1024).toFixed(1) + ' KB';
|
|
225
|
-
console.log(`\n ${result.path}`);
|
|
226
|
-
console.log(
|
|
227
|
-
` ${result.scripts} script(s) inlined, ${kb(result.rawBytes)} raw -> ${kb(result.embeddedBytes)} embedded` +
|
|
228
|
-
(compress ? ` (${algorithm} level ${level ?? (algorithm === 'brotli' ? 11 : 9)})` : ' (uncompressed)'),
|
|
229
|
-
);
|
|
230
|
-
console.log(' one file, no server, no sibling script - open it directly');
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
//no top-level await: a vite config loaded as CommonJS has to be able to require() this module
|
|
234
|
-
if (isMain) {
|
|
235
|
-
runCli().catch((error) => {
|
|
236
|
-
console.error(error);
|
|
237
|
-
process.exitCode = 1;
|
|
238
|
-
});
|
|
239
|
-
}
|
|
1
|
+
export * from '@datamoc/mwg/tools/single-file';
|