@verticopolis/components 0.0.0-stage → 0.2.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/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/gen-icon-paths.ts from pixelarticons@2.2.0
|
|
2
|
+
// (MIT, https://github.com/halfmage/pixelarticons). Do not edit by hand; re-run
|
|
3
|
+
// the script to refresh. Custom hand-drawn glyphs live in icons.ts, not here.
|
|
4
|
+
/** Project icon name -> the pixelarticons file its path data came from. */
|
|
5
|
+
const VENDORED_ICON_SOURCES = {
|
|
6
|
+
brand: "building",
|
|
7
|
+
save: "save",
|
|
8
|
+
sound: "volume-2",
|
|
9
|
+
stats: "chart",
|
|
10
|
+
map: "map-pin",
|
|
11
|
+
settings: "settings-2",
|
|
12
|
+
inspect: "search",
|
|
13
|
+
milestone: "flag",
|
|
14
|
+
trophy: "trophy",
|
|
15
|
+
fire: "fire",
|
|
16
|
+
rescue: "truck",
|
|
17
|
+
car: "car",
|
|
18
|
+
money: "money",
|
|
19
|
+
security: "shield",
|
|
20
|
+
housekeeping: "trash",
|
|
21
|
+
cockroach: "bug",
|
|
22
|
+
santa: "gift",
|
|
23
|
+
garbage: "reload",
|
|
24
|
+
undo: "undo",
|
|
25
|
+
redo: "redo",
|
|
26
|
+
menu: "menu",
|
|
27
|
+
update: "reload",
|
|
28
|
+
install: "download",
|
|
29
|
+
back: "chevron-left",
|
|
30
|
+
play: "play",
|
|
31
|
+
folder: "folder",
|
|
32
|
+
plus: "plus",
|
|
33
|
+
heart: "heart",
|
|
34
|
+
};
|
|
35
|
+
/** Each icon's SVG path "d" data (currentColor fill lives on the <svg>). */
|
|
36
|
+
const VENDORED_ICON_PATHS = {
|
|
37
|
+
brand: ["M5 2h14v2H5zm0 18h14v2H5zM3 4h2v16H3zm16 0h2v16h-2zM7 6h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2zm-8 4h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2zm-8 4h2v2H7zm4 0h2v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M4 2h2v20H4z", "M4 4h16v2H4zm12 2h2v2h-2zm-2 2h2v2h-2zm2 2h2v2h-2zM4 12h16v2H4z"],
|
|
45
|
+
trophy: ["M16 17H13V19H15V21H9V19H11V17H8V15H16V17ZM18 5H22V11H20V7H18V11H20V13H18V15H16V5H8V15H6V13H4V11H6V7H4V11H2V5H6V3H18V5Z"],
|
|
46
|
+
fire: ["M9 2h2v4H9zM7 6h2v2H7zM5 8h2v2H5zm8 2h2v2h-2zm2-2h2v2h-2zm2 2h2v2h-2zm2 2h2v6h-2zM3 10h2v8H3zm8-4h2v4h-2zm6 12h2v2h-2zM7 20h10v2H7zm-2-2h2v2H5zm4-2h6v4H9z", "M11 14h2v3h-2z"],
|
|
47
|
+
rescue: ["M2 4h12v2H2zM0 16h4v2H0zm10 0h4v2h-4zm12-4h2v6h-2zm-8-6h2v12h-2zM0 6h2v10H0zm20 4h2v2h-2z", "M14 8h6v2h-6zM4 14h6v2H4zm10 0h6v2h-6zM4 16h2v2H4zm10 0h2v2h-2zM4 18h6v2H4zm10 0h6v2h-6zm-6-2h2v2H8zm10 0h4v2h-4z"],
|
|
48
|
+
car: ["M4 13h6v2H4zm10 0h6v2h-6zM4 17h6v2H4zm10 0h6v2h-6zM2 15h4v2H2zm6 0h8v2H8zm10 0h4v2h-4zm4-4h2v4h-2zm-6-4h2v2h-2zM4 5h12v2H4zm-4 6h2v4H0zm12-2h10v2H12zM2 7h2v4H2zm8 0h2v2h-2z"],
|
|
49
|
+
money: ["M8 8h12v2H8zm0 10h12v2H8zm-2-8h2v8H6zm14 0h2v8h-2zM4 4h12v2H4zm0 10h2v2H4zM2 6h2v8H2zm14 0h2v2h-2zm-4 6h4v4h-4z"],
|
|
50
|
+
security: ["M4 2h16v2H4zM2 4h2v10H2zm18 0h2v10h-2zM4 14h2v2H4zm2 2h2v2H6zm4 4h4v2h-4zm10-6h-2v2h2zm-2 2h-2v2h2zm-2 2h-2v2h2zm-6 0H8v2h2z"],
|
|
51
|
+
housekeeping: ["M18 22H6V20H18V22ZM9 6H15V4H17V6H22V8H20V20H18V8H6V20H4V8H2V6H7V4H9V6ZM15 4H9V2H15V4Z"],
|
|
52
|
+
cockroach: ["M2 5h2v4H2zm20 0h-2v4h2zM4 9h2v2H4zm16 0h-2v2h2zM2 13h4v2H2zm20 0h-4v2h4zM4 17h2v2H4zm16 0h-2v2h2zM2 19h2v2H2zm20 0h-2v2h2zM6 11h12v2H6z", "M6 7h2v12H6zm10 0h2v12h-2zM8 19h8v2H8zM8 5h8v2H8z", "M11 15h2v6h-2zM8 1h2v6H8zm6 0h2v6h-2z"],
|
|
53
|
+
santa: ["M4 6h16v2H4zM2 8h2v4H2zm2 4h16v2H4zm16-4h2v4h-2zM6 4h2v2H6zm2-2h3v2H8zm3 2h2v2h-2zm2-2h3v2h-3zm3 2h2v2h-2zM4 14h2v6H4zm2 6h12v2H6zm12-6h2v6h-2zm-7-6h2v4h-2zm0 6h2v6h-2z"],
|
|
54
|
+
garbage: ["M16 4h2v6h-2zm-2-2h2v2h-2zm0 2h2v8h-2zM4 8H2v5h2z", "M4 6h16v2H4zm4 14H6v-6h2zm2 2H8v-2h2zm0-2H8v-8h2zm10-4h2v-5h-2z", "M20 18H4v-2h16z"],
|
|
55
|
+
undo: ["M18 20h-6v-2h6v2Zm2-2h-2v-8h2v8Zm-10-4H8v-2H6v-2H4V8h2V6h2V4h2v4h8v2h-8v4Z"],
|
|
56
|
+
redo: ["M20 8H6v2h14zM4 10h2v8H4zm2 8h6v2H6z", "M18 6h-2v6h2zm-2-2h-2v8h2zm0 8h-2v2h2z"],
|
|
57
|
+
menu: ["M20 18H4v-2h16v2Zm0-5H4v-2h16v2Zm0-5H4V6h16v2Z"],
|
|
58
|
+
update: ["M16 4h2v6h-2zm-2-2h2v2h-2zm0 2h2v8h-2zM4 8H2v5h2z", "M4 6h16v2H4zm4 14H6v-6h2zm2 2H8v-2h2zm0-2H8v-8h2zm10-4h2v-5h-2z", "M20 18H4v-2h16z"],
|
|
59
|
+
install: ["M21 15v4h-2v-4zm-2 4v2H5v-2zM5 15v4H3v-4zm8-12v14h-2V3z", "M7 11v2h10v-2zm2 2v2h2v-2zm4 0v2h2v-2z", "M15 11v2h2v-2z"],
|
|
60
|
+
back: ["M8 13v-2h2v2H8Zm2-2V9h2v2h-2Zm0 4v-2h2v2h-2Zm2-6V7h2v2h-2Zm0 8v-2h2v2h-2Zm2-10V5h2v2h-2Zm0 12v-2h2v2h-2Z"],
|
|
61
|
+
play: ["M15 11h-2V9h2zm0 4h-2v-2h2zm-2 2h-2v-2h2zm0-8h-2V7h2zm-2-2H9V5h2zM9 21H7V3h2zm6-8h2v-2h-2zm-6 4h2v2H9z"],
|
|
62
|
+
folder: ["M4 4h6v2H4zm0 14h16v2H4zM20 8h2v10h-2zM2 6h2v12H2zm8 0h10v2H10z"],
|
|
63
|
+
plus: ["M13 11h7v2h-7v7h-2v-7H4v-2h7V4h2v7Z"],
|
|
64
|
+
heart: ["M13 22h-2v-2h2v2Zm-2-2H9v-2h2v2Zm4 0h-2v-2h2v2Zm-6-2H7v-2h2v2Zm8 0h-2v-2h2v2ZM7 16H5v-2h2v2Zm12 0h-2v-2h2v2ZM5 14H3v-2h2v2Zm16 0h-2v-2h2v2ZM3 12H1V6h2v6Zm20 0h-2V6h2v6ZM13 8h-2V6h2v2ZM5 6H3V4h2v2Zm6 0H9V4h2v2Zm4 0h-2V4h2v2Zm6 0h-2V4h2v2ZM9 4H5V2h4v2Zm10 0h-4V2h4v2Z"],
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { VENDORED_ICON_PATHS, VENDORED_ICON_SOURCES };
|
|
68
|
+
//# sourceMappingURL=iconPaths.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconPaths.generated.js","sources":["../../src/ui/iconPaths.generated.ts"],"sourcesContent":["// AUTO-GENERATED by scripts/gen-icon-paths.ts from pixelarticons@2.2.0\n// (MIT, https://github.com/halfmage/pixelarticons). Do not edit by hand; re-run\n// the script to refresh. Custom hand-drawn glyphs live in icons.ts, not here.\n\n/** Project icon name -> the pixelarticons file its path data came from. */\nexport const VENDORED_ICON_SOURCES: Record<string, string> = {\n brand: \"building\",\n save: \"save\",\n sound: \"volume-2\",\n stats: \"chart\",\n map: \"map-pin\",\n settings: \"settings-2\",\n inspect: \"search\",\n milestone: \"flag\",\n trophy: \"trophy\",\n fire: \"fire\",\n rescue: \"truck\",\n car: \"car\",\n money: \"money\",\n security: \"shield\",\n housekeeping: \"trash\",\n cockroach: \"bug\",\n santa: \"gift\",\n garbage: \"reload\",\n undo: \"undo\",\n redo: \"redo\",\n menu: \"menu\",\n update: \"reload\",\n install: \"download\",\n back: \"chevron-left\",\n play: \"play\",\n folder: \"folder\",\n plus: \"plus\",\n heart: \"heart\",\n};\n\n/** Each icon's SVG path \"d\" data (currentColor fill lives on the <svg>). */\nexport const VENDORED_ICON_PATHS: Record<string, readonly string[]> = {\n brand: [\"M5 2h14v2H5zm0 18h14v2H5zM3 4h2v16H3zm16 0h2v16h-2zM7 6h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2zm-8 4h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2zm-8 4h2v2H7zm4 0h2v2h-2zm-1 4h4v2h-4zm5-4h2v2h-2z\"],\n save: [\"M20 22H4V20H6V14H8V20H16V14H18V20H20V22ZM4 20H2V4H4V20ZM22 20H20V6H22V20ZM16 14H8V12H16V14ZM12 10H6V6H12V10ZM20 6H18V4H20V6ZM18 4H4V2H18V4Z\"],\n sound: [\"M13 22h-2v-2H9v-2h2V6H9V4h2V2h2v20Zm-4-4H7v-2h2v2Zm10 0h-4v-2h4v2ZM7 10H5v4h2v2H3V8h4v2Zm14 6h-2V8h2v8Zm-4-2h-2v-4h2v4ZM9 8H7V6h2v2Zm10 0h-4V6h4v2Z\"],\n stats: [\"M4 2h16v2H4zm0 18h16v2H4zM2 4h2v16H2zm18 0h2v16h-2zM7 11h2v6H7zm4-4h2v10h-2zm4 6h2v4h-2z\"],\n map: [\"M7 2h10v2H7zM5 4h2v2H5zm14 0h-2v2h2zM7 17h2v2H7zm2 2h2v2H9zm6-2h2v2h-2zm-2 2h2v2h-2zm-2 2h2v2h-2zm-6-7h2v3H5zm12 0h2v3h-2zM3 6h2v8H3zm18 0h-2v8h2zM10 6h4v2h-4zM8 8h2v4H8zm2 4h4v2h-4zm4-4h2v4h-2z\"],\n settings: [\"M4 14h2v6H4zm6 0h2v6h-2zm-4-2h4v2H6zm0 8h4v2H6zm-4-4h2v2H2zm20-8h-4V6h4z\", \"M10 16h12v2H10zm4-8H2V6h12zm6-4v2h-2V4zm0 6V8h-2v2zm-6-8h4v2h-4zm0 10h4v-2h-4zm-2-8h2v2h-2zm0 6h2V8h-2z\"],\n inspect: [\"M22 22h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-6-2H6v-2h8v2Zm4 0h-2v-2h2v2ZM6 16H4v-2h2v2Zm10 0h-2v-2h2v2ZM4 14H2V6h2v8Zm14 0h-2V6h2v8ZM6 6H4V4h2v2Zm10 0h-2V4h2v2Zm-2-2H6V2h8v2Z\"],\n milestone: [\"M4 2h2v20H4z\", \"M4 4h16v2H4zm12 2h2v2h-2zm-2 2h2v2h-2zm2 2h2v2h-2zM4 12h16v2H4z\"],\n trophy: [\"M16 17H13V19H15V21H9V19H11V17H8V15H16V17ZM18 5H22V11H20V7H18V11H20V13H18V15H16V5H8V15H6V13H4V11H6V7H4V11H2V5H6V3H18V5Z\"],\n fire: [\"M9 2h2v4H9zM7 6h2v2H7zM5 8h2v2H5zm8 2h2v2h-2zm2-2h2v2h-2zm2 2h2v2h-2zm2 2h2v6h-2zM3 10h2v8H3zm8-4h2v4h-2zm6 12h2v2h-2zM7 20h10v2H7zm-2-2h2v2H5zm4-2h6v4H9z\", \"M11 14h2v3h-2z\"],\n rescue: [\"M2 4h12v2H2zM0 16h4v2H0zm10 0h4v2h-4zm12-4h2v6h-2zm-8-6h2v12h-2zM0 6h2v10H0zm20 4h2v2h-2z\", \"M14 8h6v2h-6zM4 14h6v2H4zm10 0h6v2h-6zM4 16h2v2H4zm10 0h2v2h-2zM4 18h6v2H4zm10 0h6v2h-6zm-6-2h2v2H8zm10 0h4v2h-4z\"],\n car: [\"M4 13h6v2H4zm10 0h6v2h-6zM4 17h6v2H4zm10 0h6v2h-6zM2 15h4v2H2zm6 0h8v2H8zm10 0h4v2h-4zm4-4h2v4h-2zm-6-4h2v2h-2zM4 5h12v2H4zm-4 6h2v4H0zm12-2h10v2H12zM2 7h2v4H2zm8 0h2v2h-2z\"],\n money: [\"M8 8h12v2H8zm0 10h12v2H8zm-2-8h2v8H6zm14 0h2v8h-2zM4 4h12v2H4zm0 10h2v2H4zM2 6h2v8H2zm14 0h2v2h-2zm-4 6h4v4h-4z\"],\n security: [\"M4 2h16v2H4zM2 4h2v10H2zm18 0h2v10h-2zM4 14h2v2H4zm2 2h2v2H6zm4 4h4v2h-4zm10-6h-2v2h2zm-2 2h-2v2h2zm-2 2h-2v2h2zm-6 0H8v2h2z\"],\n housekeeping: [\"M18 22H6V20H18V22ZM9 6H15V4H17V6H22V8H20V20H18V8H6V20H4V8H2V6H7V4H9V6ZM15 4H9V2H15V4Z\"],\n cockroach: [\"M2 5h2v4H2zm20 0h-2v4h2zM4 9h2v2H4zm16 0h-2v2h2zM2 13h4v2H2zm20 0h-4v2h4zM4 17h2v2H4zm16 0h-2v2h2zM2 19h2v2H2zm20 0h-2v2h2zM6 11h12v2H6z\", \"M6 7h2v12H6zm10 0h2v12h-2zM8 19h8v2H8zM8 5h8v2H8z\", \"M11 15h2v6h-2zM8 1h2v6H8zm6 0h2v6h-2z\"],\n santa: [\"M4 6h16v2H4zM2 8h2v4H2zm2 4h16v2H4zm16-4h2v4h-2zM6 4h2v2H6zm2-2h3v2H8zm3 2h2v2h-2zm2-2h3v2h-3zm3 2h2v2h-2zM4 14h2v6H4zm2 6h12v2H6zm12-6h2v6h-2zm-7-6h2v4h-2zm0 6h2v6h-2z\"],\n garbage: [\"M16 4h2v6h-2zm-2-2h2v2h-2zm0 2h2v8h-2zM4 8H2v5h2z\", \"M4 6h16v2H4zm4 14H6v-6h2zm2 2H8v-2h2zm0-2H8v-8h2zm10-4h2v-5h-2z\", \"M20 18H4v-2h16z\"],\n undo: [\"M18 20h-6v-2h6v2Zm2-2h-2v-8h2v8Zm-10-4H8v-2H6v-2H4V8h2V6h2V4h2v4h8v2h-8v4Z\"],\n redo: [\"M20 8H6v2h14zM4 10h2v8H4zm2 8h6v2H6z\", \"M18 6h-2v6h2zm-2-2h-2v8h2zm0 8h-2v2h2z\"],\n menu: [\"M20 18H4v-2h16v2Zm0-5H4v-2h16v2Zm0-5H4V6h16v2Z\"],\n update: [\"M16 4h2v6h-2zm-2-2h2v2h-2zm0 2h2v8h-2zM4 8H2v5h2z\", \"M4 6h16v2H4zm4 14H6v-6h2zm2 2H8v-2h2zm0-2H8v-8h2zm10-4h2v-5h-2z\", \"M20 18H4v-2h16z\"],\n install: [\"M21 15v4h-2v-4zm-2 4v2H5v-2zM5 15v4H3v-4zm8-12v14h-2V3z\", \"M7 11v2h10v-2zm2 2v2h2v-2zm4 0v2h2v-2z\", \"M15 11v2h2v-2z\"],\n back: [\"M8 13v-2h2v2H8Zm2-2V9h2v2h-2Zm0 4v-2h2v2h-2Zm2-6V7h2v2h-2Zm0 8v-2h2v2h-2Zm2-10V5h2v2h-2Zm0 12v-2h2v2h-2Z\"],\n play: [\"M15 11h-2V9h2zm0 4h-2v-2h2zm-2 2h-2v-2h2zm0-8h-2V7h2zm-2-2H9V5h2zM9 21H7V3h2zm6-8h2v-2h-2zm-6 4h2v2H9z\"],\n folder: [\"M4 4h6v2H4zm0 14h16v2H4zM20 8h2v10h-2zM2 6h2v12H2zm8 0h10v2H10z\"],\n plus: [\"M13 11h7v2h-7v7h-2v-7H4v-2h7V4h2v7Z\"],\n heart: [\"M13 22h-2v-2h2v2Zm-2-2H9v-2h2v2Zm4 0h-2v-2h2v2Zm-6-2H7v-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AAC;IAC3E,IAAI,EAAE,CAAC,qCAAqC,CAAC;IAC7C,KAAK,EAAE,CAAC,2QAA2Q,CAAC;;;"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type SVGTemplateResult } from "lit-html";
|
|
2
|
+
/**
|
|
3
|
+
* Inline pixel icons for the functional UI and the bulletin/event messages
|
|
4
|
+
* (issue #721). Replaces Unicode emoji, which render as tofu on systems with no
|
|
5
|
+
* color-emoji font (bare Linux, containers, WSL) and look materially different
|
|
6
|
+
* across Windows, macOS, and Android. Decorative emoji inside running prose stay
|
|
7
|
+
* as text; the in-game bulletin emoji are swapped at the RENDER layer only, so
|
|
8
|
+
* `src/engine` keeps emitting plain strings and stays DOM/render-free.
|
|
9
|
+
*
|
|
10
|
+
* Icons are single-color pixel shapes on a 24x24 grid, filled with
|
|
11
|
+
* `currentColor` so each takes the color of its context: ink on the gray chrome,
|
|
12
|
+
* and the bulletin log's own severity color (red for bad, green for money)
|
|
13
|
+
* when injected into a colored line.
|
|
14
|
+
*
|
|
15
|
+
* Nearly every icon is single-color; the one exception is the bulldoze wrecking
|
|
16
|
+
* ball, a two-tone red/amber accent glyph (see {@link ACCENT_FILLS}) whose paths
|
|
17
|
+
* carry a fixed fill instead of inheriting `currentColor`.
|
|
18
|
+
*
|
|
19
|
+
* Provenance (MIT): the CUSTOM icons below are original to this project (mute,
|
|
20
|
+
* bomb, the bulldoze wrecking ball, warning, the pause + speed1/2/3 transport
|
|
21
|
+
* glyphs, and the help question mark), drawn on the same 24x24 grid because the
|
|
22
|
+
* free Pixelarticons set has no matching glyph. Every other icon's path data is
|
|
23
|
+
* generated from the pinned `pixelarticons` dev dependency (by Gerrit Halfmann,
|
|
24
|
+
* https://github.com/halfmage/pixelarticons, MIT) into `iconPaths.generated.ts`
|
|
25
|
+
* and inlined at build time, so the offline PWA still fetches nothing at
|
|
26
|
+
* runtime. Re-run `scripts/gen-icon-paths.ts` to refresh it.
|
|
27
|
+
*/
|
|
28
|
+
export type IconName = "brand" | "save" | "sound" | "mute" | "stats" | "map" | "settings" | "inspect" | "bulldoze" | "milestone" | "trophy" | "fire" | "bomb" | "rescue" | "car" | "money" | "security" | "housekeeping" | "cockroach" | "santa" | "garbage" | "warning" | "pause" | "speed1" | "speed2" | "speed3" | "undo" | "redo" | "menu" | "update" | "install" | "back" | "play" | "help" | "folder" | "plus" | "heart";
|
|
29
|
+
/** The only baked fills allowed in the set: the red/amber hazard pair the
|
|
30
|
+
* bulldoze wrecking ball uses. The red matches the tool palette's bulldoze
|
|
31
|
+
* swatch. `iconCoverage.guard.test.ts` pins that no other fill sneaks in and
|
|
32
|
+
* that no bulletin icon bakes one. */
|
|
33
|
+
export declare const ACCENT_FILLS: readonly ["#ff6b6b", "#ffb454"];
|
|
34
|
+
/** Every icon name that resolves to real path data. Exported so the coverage
|
|
35
|
+
* guard can walk the whole set (accent-fill and currentColor checks). */
|
|
36
|
+
export declare const ICON_NAMES: IconName[];
|
|
37
|
+
export interface IconOpts {
|
|
38
|
+
/** Square px size (default 16, the toolbar button glyph size). */
|
|
39
|
+
size?: number;
|
|
40
|
+
/** Extra class on the <svg>. */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A trusted `<svg>` ELEMENT, built with `createElementNS` (never innerHTML), for
|
|
45
|
+
* imperative renderers: the bulletin log, the boot-time toolbar injection, the
|
|
46
|
+
* audio toggle. The icon is `aria-hidden`; its meaning comes from the sibling
|
|
47
|
+
* text or the button's `aria-label`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function iconElement(name: IconName, opts?: IconOpts): SVGSVGElement;
|
|
50
|
+
/**
|
|
51
|
+
* The same icon as a lit `svg` template, for lit-rendered templates (the tool
|
|
52
|
+
* palette, the congrats and stats panels, the event dialog). `d` is bound as an
|
|
53
|
+
* ATTRIBUTE, so lit escapes it: no `unsafeHTML`/`unsafeSVG` (which this codebase
|
|
54
|
+
* avoids) and no injection surface, since the data is a module constant anyway.
|
|
55
|
+
*/
|
|
56
|
+
export declare function iconTemplate(name: IconName, opts?: IconOpts): SVGTemplateResult;
|
|
57
|
+
/**
|
|
58
|
+
* The bulletin/event emoji that get swapped for an icon when a message string is
|
|
59
|
+
* rendered. Keys are the base code points; a trailing U+FE0F variation selector
|
|
60
|
+
* is consumed by {@link appendMessageWithIcons}. Only these are mapped; every
|
|
61
|
+
* other character (including emoji sitting mid-sentence in prose) is left as
|
|
62
|
+
* text.
|
|
63
|
+
*/
|
|
64
|
+
export declare const EMOJI_ICONS: Record<string, IconName>;
|
|
65
|
+
/**
|
|
66
|
+
* Append `message` to `el`. If it starts with a mapped bulletin emoji (leading
|
|
67
|
+
* whitespace allowed, and consumed along with the marker), that leading marker
|
|
68
|
+
* becomes a trusted icon element and the rest stays a TEXT NODE;
|
|
69
|
+
* otherwise the whole message is one text node. The text is never set as
|
|
70
|
+
* innerHTML, so an engine string (or a tower name inside it) can never inject
|
|
71
|
+
* markup, and any mapped emoji NOT at the start survives as text (so an
|
|
72
|
+
* aria-hidden icon never swallows a character mid-sentence). The icon inherits
|
|
73
|
+
* `el`'s color, which the bulletin log sets per severity. Returns whether an
|
|
74
|
+
* icon was inserted.
|
|
75
|
+
*/
|
|
76
|
+
export declare function appendMessageWithIcons(el: HTMLElement, message: string): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* The lit-template form of {@link appendMessageWithIcons}, for a message shown
|
|
79
|
+
* inside a lit template (the event-choice dialog). Returns the message split
|
|
80
|
+
* into text runs and icon templates; lit renders the mix directly. The text runs
|
|
81
|
+
* are plain strings, so lit escapes them like any text binding.
|
|
82
|
+
*/
|
|
83
|
+
export declare function messageWithIcons(message: string): Array<string | SVGTemplateResult>;
|
package/lib/ui/icons.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { svg, nothing } from 'lit-html';
|
|
2
|
+
import { VENDORED_ICON_PATHS } from './iconPaths.generated.js';
|
|
3
|
+
|
|
4
|
+
/** The only baked fills allowed in the set: the red/amber hazard pair the
|
|
5
|
+
* bulldoze wrecking ball uses. The red matches the tool palette's bulldoze
|
|
6
|
+
* swatch. `iconCoverage.guard.test.ts` pins that no other fill sneaks in and
|
|
7
|
+
* that no bulletin icon bakes one. */
|
|
8
|
+
const ACCENT_FILLS = ["#ff6b6b", "#ffb454"];
|
|
9
|
+
/** The custom, hand-drawn glyphs with no pixelarticons equivalent. Everything
|
|
10
|
+
* else comes from {@link VENDORED_ICON_PATHS} (generated from the package).
|
|
11
|
+
* Keyed by `IconName` so a typo'd name is a compile error, not a runtime miss. */
|
|
12
|
+
const CUSTOM = {
|
|
13
|
+
// The muted speaker shares the exact `sound` speaker (pixelarticons volume-2,
|
|
14
|
+
// waves removed) so the toggle only swaps the two waves for an X, and the
|
|
15
|
+
// speaker never shifts under the glyph as it flips.
|
|
16
|
+
mute: [{ d: "M13 22h-2v-2H9v-2h2V6H9V4h2V2h2v20ZM9 18H7v-2h2v2ZM7 10H5v4h2v2H3V8h4v2ZM9 8H7V6h2v2Z" }, { d: "M15 8h2v2h-2zM19 8h2v2h-2zM17 10h2v2h-2zM15 12h2v2h-2zM19 12h2v2h-2z" }],
|
|
17
|
+
bomb: [{ d: "M8 12h8v2H8zM6 14h12v6H6zM8 20h8v2H8zM15 10h2v2h-2zM17 8h2v2h-2zM19 6h2v2h-2zM19 2h2v2h-2zM17 4h2v2h-2zM21 4h2v2h-2z" }],
|
|
18
|
+
// A two-tone wrecking ball for demolish: an amber chain slung from the top
|
|
19
|
+
// corner down to a red iron ball. The red matches the tool palette's bulldoze
|
|
20
|
+
// swatch; unlike the old hammer (which read as build/fix) it clearly tears
|
|
21
|
+
// down. The one accent-colored glyph in the set (see ACCENT_FILLS).
|
|
22
|
+
bulldoze: [
|
|
23
|
+
{ d: "M3 3h5v2H3zM6 5h2v2H6zM8 7h2v2H8zM10 9h2v2h-2z", fill: "#ffb454" },
|
|
24
|
+
{ d: "M8 12h6v6H8zM9 11h4v1H9zM9 18h4v1H9zM7 13h1v4H7zM14 13h1v4h-1z", fill: "#ff6b6b" },
|
|
25
|
+
],
|
|
26
|
+
warning: [{ d: "M11 2h2v2h-2zM10 4h4v2h-4zM9 6h6v2H9zM8 8h8v2H8zM7 10h10v2H7zM6 12h12v2H6zM5 14h14v2H5zM4 16h16v2H4zM3 18h18v2H3zM11 8h2v6h-2zM11 15h2v2h-2z", evenodd: true }],
|
|
27
|
+
// The transport row: a pause bar, then one/two/three matching right triangles
|
|
28
|
+
// for slow/medium/fast, mirroring the old ⏸ ▶ ▶▶ ▶▶▶ escalation. Narrower than
|
|
29
|
+
// the standalone `play` (vendored) so the three-triangle glyph still fits.
|
|
30
|
+
pause: [{ d: "M7 4h4v16h-4zM13 4h4v16h-4z" }],
|
|
31
|
+
speed1: [{ d: "M8 4h2v16h-2zM10 6h2v12h-2zM12 9h2v6h-2zM14 11h2v2h-2z" }],
|
|
32
|
+
speed2: [{ d: "M4 4h2v16h-2zM6 6h2v12h-2zM8 9h2v6h-2zM10 11h2v2h-2zM12 4h2v16h-2zM14 6h2v12h-2zM16 9h2v6h-2zM18 11h2v2h-2z" }],
|
|
33
|
+
speed3: [{ d: "M0 4h2v16h-2zM2 6h2v12h-2zM4 9h2v6h-2zM6 11h2v2h-2zM8 4h2v16h-2zM10 6h2v12h-2zM12 9h2v6h-2zM14 11h2v2h-2zM16 4h2v16h-2zM18 6h2v12h-2zM20 9h2v6h-2zM22 11h2v2h-2z" }],
|
|
34
|
+
// A question mark for How to Play (the pixelarticons set has no help glyph).
|
|
35
|
+
help: [{ d: "M8 4h8v2H8zM6 6h2v3H6zM16 6h2v5h-2zM12 11h4v2h-4zM11 13h2v3h-2zM11 18h2v2h-2z" }],
|
|
36
|
+
};
|
|
37
|
+
/** All icon path data: the generated pixelarticons subset, plus the hand-drawn
|
|
38
|
+
* CUSTOM glyphs (which win on any name collision). Assembled once at load. */
|
|
39
|
+
const ICONS = {
|
|
40
|
+
...Object.fromEntries(Object.entries(VENDORED_ICON_PATHS).map(([name, ds]) => [name, ds.map((d) => ({ d }))])),
|
|
41
|
+
...CUSTOM,
|
|
42
|
+
};
|
|
43
|
+
/** Every icon name that resolves to real path data. Exported so the coverage
|
|
44
|
+
* guard can walk the whole set (accent-fill and currentColor checks). */
|
|
45
|
+
const ICON_NAMES = Object.keys(ICONS);
|
|
46
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
47
|
+
/**
|
|
48
|
+
* A trusted `<svg>` ELEMENT, built with `createElementNS` (never innerHTML), for
|
|
49
|
+
* imperative renderers: the bulletin log, the boot-time toolbar injection, the
|
|
50
|
+
* audio toggle. The icon is `aria-hidden`; its meaning comes from the sibling
|
|
51
|
+
* text or the button's `aria-label`.
|
|
52
|
+
*/
|
|
53
|
+
function iconElement(name, opts = {}) {
|
|
54
|
+
const el = document.createElementNS(SVG_NS, "svg");
|
|
55
|
+
const size = String(opts.size ?? 16);
|
|
56
|
+
el.setAttribute("viewBox", "0 0 24 24");
|
|
57
|
+
el.setAttribute("width", size);
|
|
58
|
+
el.setAttribute("height", size);
|
|
59
|
+
el.setAttribute("fill", "currentColor");
|
|
60
|
+
el.setAttribute("aria-hidden", "true");
|
|
61
|
+
el.setAttribute("focusable", "false");
|
|
62
|
+
el.setAttribute("data-icon", name);
|
|
63
|
+
el.setAttribute("class", opts.className ? `vc-icon ${opts.className}` : "vc-icon");
|
|
64
|
+
for (const p of ICONS[name]) {
|
|
65
|
+
const path = document.createElementNS(SVG_NS, "path");
|
|
66
|
+
path.setAttribute("d", p.d);
|
|
67
|
+
if (p.evenodd)
|
|
68
|
+
path.setAttribute("fill-rule", "evenodd");
|
|
69
|
+
if (p.fill)
|
|
70
|
+
path.setAttribute("fill", p.fill); // accent path opts out of currentColor
|
|
71
|
+
el.appendChild(path);
|
|
72
|
+
}
|
|
73
|
+
return el;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The same icon as a lit `svg` template, for lit-rendered templates (the tool
|
|
77
|
+
* palette, the congrats and stats panels, the event dialog). `d` is bound as an
|
|
78
|
+
* ATTRIBUTE, so lit escapes it: no `unsafeHTML`/`unsafeSVG` (which this codebase
|
|
79
|
+
* avoids) and no injection surface, since the data is a module constant anyway.
|
|
80
|
+
*/
|
|
81
|
+
function iconTemplate(name, opts = {}) {
|
|
82
|
+
const size = opts.size ?? 16;
|
|
83
|
+
return svg `<svg viewBox="0 0 24 24" width=${size} height=${size} fill="currentColor" aria-hidden="true" focusable="false" data-icon=${name} class=${opts.className ? `vc-icon ${opts.className}` : "vc-icon"}>${ICONS[name].map((p) => svg `<path d=${p.d} fill=${p.fill ?? nothing} fill-rule=${p.evenodd ? "evenodd" : nothing}></path>`)}</svg>`;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The bulletin/event emoji that get swapped for an icon when a message string is
|
|
87
|
+
* rendered. Keys are the base code points; a trailing U+FE0F variation selector
|
|
88
|
+
* is consumed by {@link appendMessageWithIcons}. Only these are mapped; every
|
|
89
|
+
* other character (including emoji sitting mid-sentence in prose) is left as
|
|
90
|
+
* text.
|
|
91
|
+
*/
|
|
92
|
+
const EMOJI_ICONS = {
|
|
93
|
+
"🔥": "fire",
|
|
94
|
+
"💣": "bomb",
|
|
95
|
+
"🚒": "rescue",
|
|
96
|
+
"🚗": "car",
|
|
97
|
+
"💰": "money",
|
|
98
|
+
"🕵": "security",
|
|
99
|
+
"🧹": "housekeeping",
|
|
100
|
+
"🪳": "cockroach",
|
|
101
|
+
"🎅": "santa",
|
|
102
|
+
"🏅": "milestone",
|
|
103
|
+
"♻": "garbage",
|
|
104
|
+
"⚠": "warning",
|
|
105
|
+
};
|
|
106
|
+
const EMOJI_KEYS = Object.keys(EMOJI_ICONS);
|
|
107
|
+
/** Matches ONLY a mapped bulletin emoji at the head of a message (the leading
|
|
108
|
+
* severity marker the engine emits), plus a trailing VS16. Leading whitespace
|
|
109
|
+
* is tolerated and consumed with the marker (issue #743), so a stray space
|
|
110
|
+
* before the emoji cannot silently turn the icon back into tofu text. Still
|
|
111
|
+
* anchored past that: a mapped emoji after any non-whitespace prefix (a tower
|
|
112
|
+
* name, a "Day 5:" label, a quote) is left as text, per the contract above.
|
|
113
|
+
* The emitter side of the invariant is pinned by
|
|
114
|
+
* `iconCoverage.guard.test.ts`, which fails CI if a message layer ever writes
|
|
115
|
+
* a mapped emoji that is not message-leading. */
|
|
116
|
+
const LEADING_EMOJI_RE = new RegExp("^\\s*(" + EMOJI_KEYS.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|") + ")\\uFE0F?", "u");
|
|
117
|
+
/**
|
|
118
|
+
* Append `message` to `el`. If it starts with a mapped bulletin emoji (leading
|
|
119
|
+
* whitespace allowed, and consumed along with the marker), that leading marker
|
|
120
|
+
* becomes a trusted icon element and the rest stays a TEXT NODE;
|
|
121
|
+
* otherwise the whole message is one text node. The text is never set as
|
|
122
|
+
* innerHTML, so an engine string (or a tower name inside it) can never inject
|
|
123
|
+
* markup, and any mapped emoji NOT at the start survives as text (so an
|
|
124
|
+
* aria-hidden icon never swallows a character mid-sentence). The icon inherits
|
|
125
|
+
* `el`'s color, which the bulletin log sets per severity. Returns whether an
|
|
126
|
+
* icon was inserted.
|
|
127
|
+
*/
|
|
128
|
+
function appendMessageWithIcons(el, message) {
|
|
129
|
+
const m = LEADING_EMOJI_RE.exec(message);
|
|
130
|
+
if (!m) {
|
|
131
|
+
el.appendChild(document.createTextNode(message));
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
el.appendChild(iconElement(EMOJI_ICONS[m[1]], { size: 14, className: "vc-icon-inline" }));
|
|
135
|
+
const rest = message.slice(m[0].length);
|
|
136
|
+
if (rest)
|
|
137
|
+
el.appendChild(document.createTextNode(rest));
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The lit-template form of {@link appendMessageWithIcons}, for a message shown
|
|
142
|
+
* inside a lit template (the event-choice dialog). Returns the message split
|
|
143
|
+
* into text runs and icon templates; lit renders the mix directly. The text runs
|
|
144
|
+
* are plain strings, so lit escapes them like any text binding.
|
|
145
|
+
*/
|
|
146
|
+
function messageWithIcons(message) {
|
|
147
|
+
const m = LEADING_EMOJI_RE.exec(message);
|
|
148
|
+
if (!m)
|
|
149
|
+
return [message];
|
|
150
|
+
const icon = iconTemplate(EMOJI_ICONS[m[1]], { size: 14, className: "vc-icon-inline" });
|
|
151
|
+
const rest = message.slice(m[0].length);
|
|
152
|
+
return rest ? [icon, rest] : [icon];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { ACCENT_FILLS, EMOJI_ICONS, ICON_NAMES, appendMessageWithIcons, iconElement, iconTemplate, messageWithIcons };
|
|
156
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sources":["../../src/ui/icons.ts"],"sourcesContent":["import { svg, nothing, type SVGTemplateResult } from \"lit-html\";\nimport { VENDORED_ICON_PATHS } from \"./iconPaths.generated\";\n\n/**\n * Inline pixel icons for the functional UI and the bulletin/event messages\n * (issue #721). Replaces Unicode emoji, which render as tofu on systems with no\n * color-emoji font (bare Linux, containers, WSL) and look materially different\n * across Windows, macOS, and Android. Decorative emoji inside running prose stay\n * as text; the in-game bulletin emoji are swapped at the RENDER layer only, so\n * `src/engine` keeps emitting plain strings and stays DOM/render-free.\n *\n * Icons are single-color pixel shapes on a 24x24 grid, filled with\n * `currentColor` so each takes the color of its context: ink on the gray chrome,\n * and the bulletin log's own severity color (red for bad, green for money)\n * when injected into a colored line.\n *\n * Nearly every icon is single-color; the one exception is the bulldoze wrecking\n * ball, a two-tone red/amber accent glyph (see {@link ACCENT_FILLS}) whose paths\n * carry a fixed fill instead of inheriting `currentColor`.\n *\n * Provenance (MIT): the CUSTOM icons below are original to this project (mute,\n * bomb, the bulldoze wrecking ball, warning, the pause + speed1/2/3 transport\n * glyphs, and the help question mark), drawn on the same 24x24 grid because the\n * free Pixelarticons set has no matching glyph. Every other icon's path data is\n * generated from the pinned `pixelarticons` dev dependency (by Gerrit Halfmann,\n * https://github.com/halfmage/pixelarticons, MIT) into `iconPaths.generated.ts`\n * and inlined at build time, so the offline PWA still fetches nothing at\n * runtime. Re-run `scripts/gen-icon-paths.ts` to refresh it.\n */\n\nexport type IconName =\n | \"brand\" | \"save\" | \"sound\" | \"mute\" | \"stats\" | \"map\" | \"settings\" | \"inspect\" | \"bulldoze\" | \"milestone\" | \"trophy\" | \"fire\" | \"bomb\" | \"rescue\" | \"car\" | \"money\" | \"security\" | \"housekeeping\" | \"cockroach\" | \"santa\" | \"garbage\" | \"warning\"\n | \"pause\" | \"speed1\" | \"speed2\" | \"speed3\" | \"undo\" | \"redo\" | \"menu\" | \"update\" | \"install\" | \"back\"\n | \"play\" | \"help\" | \"folder\" | \"plus\" | \"heart\";\n\ninterface IconPath {\n d: string;\n /** `fill-rule=\"evenodd\"` so an inner shape (the warning \"!\") knocks out. */\n evenodd?: boolean;\n /** A fixed accent fill instead of the inherited `currentColor`, for the one\n * two-tone tool glyph (the bulldoze wrecking ball). Must be an\n * {@link ACCENT_FILLS} value; a bulletin icon never sets it (it has to keep\n * inheriting the log line's severity color). */\n fill?: string;\n}\n\n/** The only baked fills allowed in the set: the red/amber hazard pair the\n * bulldoze wrecking ball uses. The red matches the tool palette's bulldoze\n * swatch. `iconCoverage.guard.test.ts` pins that no other fill sneaks in and\n * that no bulletin icon bakes one. */\nexport const ACCENT_FILLS = [\"#ff6b6b\", \"#ffb454\"] as const;\n\n/** The custom, hand-drawn glyphs with no pixelarticons equivalent. Everything\n * else comes from {@link VENDORED_ICON_PATHS} (generated from the package).\n * Keyed by `IconName` so a typo'd name is a compile error, not a runtime miss. */\nconst CUSTOM: Partial<Record<IconName, IconPath[]>> = {\n // The muted speaker shares the exact `sound` speaker (pixelarticons volume-2,\n // waves removed) so the toggle only swaps the two waves for an X, and the\n // speaker never shifts under the glyph as it flips.\n mute: [{ d: \"M13 22h-2v-2H9v-2h2V6H9V4h2V2h2v20ZM9 18H7v-2h2v2ZM7 10H5v4h2v2H3V8h4v2ZM9 8H7V6h2v2Z\" }, { d: \"M15 8h2v2h-2zM19 8h2v2h-2zM17 10h2v2h-2zM15 12h2v2h-2zM19 12h2v2h-2z\" }],\n bomb: [{ d: \"M8 12h8v2H8zM6 14h12v6H6zM8 20h8v2H8zM15 10h2v2h-2zM17 8h2v2h-2zM19 6h2v2h-2zM19 2h2v2h-2zM17 4h2v2h-2zM21 4h2v2h-2z\" }],\n // A two-tone wrecking ball for demolish: an amber chain slung from the top\n // corner down to a red iron ball. The red matches the tool palette's bulldoze\n // swatch; unlike the old hammer (which read as build/fix) it clearly tears\n // down. The one accent-colored glyph in the set (see ACCENT_FILLS).\n bulldoze: [\n { d: \"M3 3h5v2H3zM6 5h2v2H6zM8 7h2v2H8zM10 9h2v2h-2z\", fill: \"#ffb454\" },\n { d: \"M8 12h6v6H8zM9 11h4v1H9zM9 18h4v1H9zM7 13h1v4H7zM14 13h1v4h-1z\", fill: \"#ff6b6b\" },\n ],\n warning: [{ d: \"M11 2h2v2h-2zM10 4h4v2h-4zM9 6h6v2H9zM8 8h8v2H8zM7 10h10v2H7zM6 12h12v2H6zM5 14h14v2H5zM4 16h16v2H4zM3 18h18v2H3zM11 8h2v6h-2zM11 15h2v2h-2z\", evenodd: true }],\n // The transport row: a pause bar, then one/two/three matching right triangles\n // for slow/medium/fast, mirroring the old ⏸ ▶ ▶▶ ▶▶▶ escalation. Narrower than\n // the standalone `play` (vendored) so the three-triangle glyph still fits.\n pause: [{ d: \"M7 4h4v16h-4zM13 4h4v16h-4z\" }],\n speed1: [{ d: \"M8 4h2v16h-2zM10 6h2v12h-2zM12 9h2v6h-2zM14 11h2v2h-2z\" }],\n speed2: [{ d: \"M4 4h2v16h-2zM6 6h2v12h-2zM8 9h2v6h-2zM10 11h2v2h-2zM12 4h2v16h-2zM14 6h2v12h-2zM16 9h2v6h-2zM18 11h2v2h-2z\" }],\n speed3: [{ d: \"M0 4h2v16h-2zM2 6h2v12h-2zM4 9h2v6h-2zM6 11h2v2h-2zM8 4h2v16h-2zM10 6h2v12h-2zM12 9h2v6h-2zM14 11h2v2h-2zM16 4h2v16h-2zM18 6h2v12h-2zM20 9h2v6h-2zM22 11h2v2h-2z\" }],\n // A question mark for How to Play (the pixelarticons set has no help glyph).\n help: [{ d: \"M8 4h8v2H8zM6 6h2v3H6zM16 6h2v5h-2zM12 11h4v2h-4zM11 13h2v3h-2zM11 18h2v2h-2z\" }],\n};\n\n/** All icon path data: the generated pixelarticons subset, plus the hand-drawn\n * CUSTOM glyphs (which win on any name collision). Assembled once at load. */\nconst ICONS: Record<IconName, IconPath[]> = {\n ...Object.fromEntries(Object.entries(VENDORED_ICON_PATHS).map(([name, ds]) => [name, ds.map((d) => ({ d }))])),\n ...CUSTOM,\n} as Record<IconName, IconPath[]>;\n\n/** Every icon name that resolves to real path data. Exported so the coverage\n * guard can walk the whole set (accent-fill and currentColor checks). */\nexport const ICON_NAMES = Object.keys(ICONS) as IconName[];\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nexport interface IconOpts {\n /** Square px size (default 16, the toolbar button glyph size). */\n size?: number;\n /** Extra class on the <svg>. */\n className?: string;\n}\n\n/**\n * A trusted `<svg>` ELEMENT, built with `createElementNS` (never innerHTML), for\n * imperative renderers: the bulletin log, the boot-time toolbar injection, the\n * audio toggle. The icon is `aria-hidden`; its meaning comes from the sibling\n * text or the button's `aria-label`.\n */\nexport function iconElement(name: IconName, opts: IconOpts = {}): SVGSVGElement {\n const el = document.createElementNS(SVG_NS, \"svg\");\n const size = String(opts.size ?? 16);\n el.setAttribute(\"viewBox\", \"0 0 24 24\");\n el.setAttribute(\"width\", size);\n el.setAttribute(\"height\", size);\n el.setAttribute(\"fill\", \"currentColor\");\n el.setAttribute(\"aria-hidden\", \"true\");\n el.setAttribute(\"focusable\", \"false\");\n el.setAttribute(\"data-icon\", name);\n el.setAttribute(\"class\", opts.className ? `vc-icon ${opts.className}` : \"vc-icon\");\n for (const p of ICONS[name]) {\n const path = document.createElementNS(SVG_NS, \"path\");\n path.setAttribute(\"d\", p.d);\n if (p.evenodd) path.setAttribute(\"fill-rule\", \"evenodd\");\n if (p.fill) path.setAttribute(\"fill\", p.fill); // accent path opts out of currentColor\n el.appendChild(path);\n }\n return el;\n}\n\n/**\n * The same icon as a lit `svg` template, for lit-rendered templates (the tool\n * palette, the congrats and stats panels, the event dialog). `d` is bound as an\n * ATTRIBUTE, so lit escapes it: no `unsafeHTML`/`unsafeSVG` (which this codebase\n * avoids) and no injection surface, since the data is a module constant anyway.\n */\nexport function iconTemplate(name: IconName, opts: IconOpts = {}): SVGTemplateResult {\n const size = opts.size ?? 16;\n return svg`<svg viewBox=\"0 0 24 24\" width=${size} height=${size} fill=\"currentColor\" aria-hidden=\"true\" focusable=\"false\" data-icon=${name} class=${opts.className ? `vc-icon ${opts.className}` : \"vc-icon\"}>${ICONS[\n name\n ].map((p) => svg`<path d=${p.d} fill=${p.fill ?? nothing} fill-rule=${p.evenodd ? \"evenodd\" : nothing}></path>`)}</svg>`;\n}\n\n/**\n * The bulletin/event emoji that get swapped for an icon when a message string is\n * rendered. Keys are the base code points; a trailing U+FE0F variation selector\n * is consumed by {@link appendMessageWithIcons}. Only these are mapped; every\n * other character (including emoji sitting mid-sentence in prose) is left as\n * text.\n */\nexport const EMOJI_ICONS: Record<string, IconName> = {\n \"🔥\": \"fire\",\n \"💣\": \"bomb\",\n \"🚒\": \"rescue\",\n \"🚗\": \"car\",\n \"💰\": \"money\",\n \"🕵\": \"security\",\n \"🧹\": \"housekeeping\",\n \"🪳\": \"cockroach\",\n \"🎅\": \"santa\",\n \"🏅\": \"milestone\",\n \"♻\": \"garbage\",\n \"⚠\": \"warning\",\n};\n\nconst EMOJI_KEYS = Object.keys(EMOJI_ICONS);\n/** Matches ONLY a mapped bulletin emoji at the head of a message (the leading\n * severity marker the engine emits), plus a trailing VS16. Leading whitespace\n * is tolerated and consumed with the marker (issue #743), so a stray space\n * before the emoji cannot silently turn the icon back into tofu text. Still\n * anchored past that: a mapped emoji after any non-whitespace prefix (a tower\n * name, a \"Day 5:\" label, a quote) is left as text, per the contract above.\n * The emitter side of the invariant is pinned by\n * `iconCoverage.guard.test.ts`, which fails CI if a message layer ever writes\n * a mapped emoji that is not message-leading. */\nconst LEADING_EMOJI_RE = new RegExp(\n \"^\\\\s*(\" + EMOJI_KEYS.map((e) => e.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\") + \")\\\\uFE0F?\",\n \"u\",\n);\n\n/**\n * Append `message` to `el`. If it starts with a mapped bulletin emoji (leading\n * whitespace allowed, and consumed along with the marker), that leading marker\n * becomes a trusted icon element and the rest stays a TEXT NODE;\n * otherwise the whole message is one text node. The text is never set as\n * innerHTML, so an engine string (or a tower name inside it) can never inject\n * markup, and any mapped emoji NOT at the start survives as text (so an\n * aria-hidden icon never swallows a character mid-sentence). The icon inherits\n * `el`'s color, which the bulletin log sets per severity. Returns whether an\n * icon was inserted.\n */\nexport function appendMessageWithIcons(el: HTMLElement, message: string): boolean {\n const m = LEADING_EMOJI_RE.exec(message);\n if (!m) {\n el.appendChild(document.createTextNode(message));\n return false;\n }\n el.appendChild(iconElement(EMOJI_ICONS[m[1]], { size: 14, className: \"vc-icon-inline\" }));\n const rest = message.slice(m[0].length);\n if (rest) el.appendChild(document.createTextNode(rest));\n return true;\n}\n\n/**\n * The lit-template form of {@link appendMessageWithIcons}, for a message shown\n * inside a lit template (the event-choice dialog). Returns the message split\n * into text runs and icon templates; lit renders the mix directly. The text runs\n * are plain strings, so lit escapes them like any text binding.\n */\nexport function messageWithIcons(message: string): Array<string | SVGTemplateResult> {\n const m = LEADING_EMOJI_RE.exec(message);\n if (!m) return [message];\n const icon = iconTemplate(EMOJI_ICONS[m[1]], { size: 14, className: \"vc-icon-inline\" });\n const rest = message.slice(m[0].length);\n return rest ? [icon, rest] : [icon];\n}\n"],"names":[],"mappings":";;;AA8CA;;;AAGuC;MAC1B,YAAY,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AAA,OAAO,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;AACrC;;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Win95 menu bar's behavior (index.html `#menubar`): a title opens its
|
|
3
|
+
* menu, and while one is open, pointing at another title switches to it, the
|
|
4
|
+
* way a 1995 desktop menu bar works. The keyboard follows the WAI-ARIA
|
|
5
|
+
* menubar keys (the markup is a row of menu buttons, each with its menu):
|
|
6
|
+
* Left and Right move between titles, Down (or Enter or Space) on a title
|
|
7
|
+
* opens it, Up and Down move inside a menu, Home and End jump to its ends,
|
|
8
|
+
* Escape closes it and gives the focus back to its title, and Tab closes it.
|
|
9
|
+
* Alt with a title's underlined letter opens that menu.
|
|
10
|
+
*
|
|
11
|
+
* An item can open a submenu (`.mb-sub-title`, File > Open Recent): a click,
|
|
12
|
+
* Enter, Space or Right on it opens the submenu beside it (under it on a
|
|
13
|
+
* phone), a mouse opens it by pointing, Left or Escape inside it goes back to
|
|
14
|
+
* its title, and pointing at another item closes it. A submenu's title is
|
|
15
|
+
* never a pick; the items inside it are. A grayed title opens nothing.
|
|
16
|
+
*
|
|
17
|
+
* An item with an underlined character (Open Recent's numbers) is picked by
|
|
18
|
+
* pressing that key while its menu has the focus, as in a 1995 menu.
|
|
19
|
+
*
|
|
20
|
+
* What an item does is not this module's business: each item is a real
|
|
21
|
+
* button whose click the game wires (`game/menuWiring.ts`). A click on an
|
|
22
|
+
* item that is not grayed out closes the menu after its own handlers run.
|
|
23
|
+
*
|
|
24
|
+
* Cost: nothing runs per frame. Opening a menu calls `onOpen` once, so the
|
|
25
|
+
* wiring can refresh check marks and grayed items only when someone looks.
|
|
26
|
+
*
|
|
27
|
+
* A trip is the time from a menu opening with none open to the menus
|
|
28
|
+
* closing. `onTrip` hears it begin and `onDismiss` hears it end with no pick
|
|
29
|
+
* (the analytics in `game/menuWiring.ts`); pointing from menu to menu inside
|
|
30
|
+
* a trip is neither.
|
|
31
|
+
*/
|
|
32
|
+
/** How a trip into the menus began: a click on a title, the keyboard on a
|
|
33
|
+
* focused title, or Alt with a title's underlined letter. */
|
|
34
|
+
export type MenuOpenVia = "click" | "keys" | "alt";
|
|
35
|
+
/** How a trip ended without a pick: a press outside the menus, Escape, Tab,
|
|
36
|
+
* a click on the open menu's own title, or the window losing focus. */
|
|
37
|
+
export type MenuDismissHow = "outside" | "escape" | "tab" | "title" | "blur";
|
|
38
|
+
/** How the menus closed: an item was picked, or one of the dismissals. */
|
|
39
|
+
export type MenuCloseHow = "pick" | MenuDismissHow;
|
|
40
|
+
export interface MenuBarOptions {
|
|
41
|
+
/** Runs as a menu opens, before it shows, with the menu's popup. */
|
|
42
|
+
readonly onOpen?: (menu: HTMLElement) => void;
|
|
43
|
+
/** A trip begins: `title`'s menu opened with none open before it. */
|
|
44
|
+
readonly onTrip?: (title: HTMLButtonElement, via: MenuOpenVia) => void;
|
|
45
|
+
/** A trip ended with no pick; `title` is the menu that was open. */
|
|
46
|
+
readonly onDismiss?: (title: HTMLButtonElement, how: MenuDismissHow, browsed: number) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare class MenuBar {
|
|
49
|
+
private readonly root;
|
|
50
|
+
private readonly opts;
|
|
51
|
+
private readonly titles;
|
|
52
|
+
private openTitle;
|
|
53
|
+
/** The sub title whose submenu is open, or null. */
|
|
54
|
+
private openSubTitle;
|
|
55
|
+
/** Whether the last press in a menu was a mouse's (a tap toggles a submenu's title). */
|
|
56
|
+
private mouseDown;
|
|
57
|
+
/** Until when a press that closed a menu still swallows its pointerup and click. */
|
|
58
|
+
private swallowUntil;
|
|
59
|
+
/** The menus this trip has shown. */
|
|
60
|
+
private readonly tripMenus;
|
|
61
|
+
constructor(root: HTMLElement, opts?: MenuBarOptions);
|
|
62
|
+
/** The title whose menu is open, or null. */
|
|
63
|
+
current(): HTMLButtonElement | null;
|
|
64
|
+
/** How many menus this trip has shown (0 with none open). */
|
|
65
|
+
browsed(): number;
|
|
66
|
+
/** Open `title`'s menu, closing any other; `focusItem` focuses its first
|
|
67
|
+
* item. `via` says how a trip that this open begins was started. */
|
|
68
|
+
open(title: HTMLButtonElement, focusItem: boolean, via?: MenuOpenVia): void;
|
|
69
|
+
/** Close the open menu, ending the trip. `refocus` gives the focus back to
|
|
70
|
+
* its title when the focus was inside the menu, so the keyboard is not
|
|
71
|
+
* dropped. `how` is `pick` when an item closed it. */
|
|
72
|
+
close(refocus?: boolean, how?: MenuCloseHow): void;
|
|
73
|
+
/** Hide the open menu without ending the trip. */
|
|
74
|
+
private hide;
|
|
75
|
+
private menuOf;
|
|
76
|
+
/** The pickable items of `menu`, leaving out those of a submenu inside it. */
|
|
77
|
+
private items;
|
|
78
|
+
/** The submenu a sub title opens. */
|
|
79
|
+
private subOf;
|
|
80
|
+
/** Open `title`'s submenu; `focusItem` focuses its first item. */
|
|
81
|
+
private openSub;
|
|
82
|
+
/** Close the open submenu; `refocus` puts the focus back on its title. */
|
|
83
|
+
private closeSub;
|
|
84
|
+
private toggleSub;
|
|
85
|
+
private neighbor;
|
|
86
|
+
private titleKey;
|
|
87
|
+
private menuKey;
|
|
88
|
+
/** Pick the item of `items` whose underlined character is the key pressed
|
|
89
|
+
* (no Ctrl, Alt or Cmd). A keyboard pick, so its click has no pointer. */
|
|
90
|
+
private pickByKey;
|
|
91
|
+
/** Alt with a title's underlined letter opens that menu, unless a dialog is
|
|
92
|
+
* open: the menus act on the tower, and a dialog holds the screen. */
|
|
93
|
+
private accelerator;
|
|
94
|
+
}
|