@ksp-gonogo/sitrep-sdk 0.0.1 → 0.2.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +48 -8
- package/biome.shared.json +26 -0
- package/dist/__generated__/command-map.d.ts +480 -0
- package/dist/__generated__/command-map.d.ts.map +1 -0
- package/dist/__generated__/command-map.js +265 -0
- package/dist/__generated__/command-map.js.map +1 -0
- package/dist/__generated__/contract.d.ts +10266 -454
- package/dist/__generated__/contract.d.ts.map +1 -1
- package/dist/__generated__/contract.js +1163 -11
- package/dist/__generated__/contract.js.map +1 -1
- package/dist/__generated__/control-channels.d.ts +116 -0
- package/dist/__generated__/control-channels.d.ts.map +1 -0
- package/dist/__generated__/control-channels.js +29 -0
- package/dist/__generated__/control-channels.js.map +1 -0
- package/dist/__generated__/delay-roles.d.ts +17 -0
- package/dist/__generated__/delay-roles.d.ts.map +1 -0
- package/dist/__generated__/delay-roles.js +72 -0
- package/dist/__generated__/delay-roles.js.map +1 -0
- package/dist/__generated__/error-codes.d.ts +376 -0
- package/dist/__generated__/error-codes.d.ts.map +1 -0
- package/dist/__generated__/error-codes.js +688 -0
- package/dist/__generated__/error-codes.js.map +1 -0
- package/dist/__generated__/frames.d.ts +83 -0
- package/dist/__generated__/frames.d.ts.map +1 -0
- package/dist/__generated__/frames.js +44 -0
- package/dist/__generated__/frames.js.map +1 -0
- package/dist/__generated__/reckonability.d.ts +381 -0
- package/dist/__generated__/reckonability.d.ts.map +1 -0
- package/dist/__generated__/reckonability.js +49 -0
- package/dist/__generated__/reckonability.js.map +1 -0
- package/dist/__generated__/test-theme.d.ts +52 -0
- package/dist/__generated__/test-theme.d.ts.map +1 -0
- package/dist/__generated__/test-theme.js +70 -0
- package/dist/__generated__/test-theme.js.map +1 -0
- package/dist/__generated__/topic-map.d.ts +44 -12
- package/dist/__generated__/topic-map.d.ts.map +1 -1
- package/dist/__generated__/topic-map.js +84 -11
- package/dist/__generated__/topic-map.js.map +1 -1
- package/dist/__generated__/units.d.ts +97 -0
- package/dist/__generated__/units.d.ts.map +1 -0
- package/dist/__generated__/units.js +3302 -0
- package/dist/__generated__/units.js.map +1 -0
- package/dist/api/action-dispatch.d.ts +36 -0
- package/dist/api/action-dispatch.d.ts.map +1 -0
- package/dist/api/action-dispatch.js +79 -0
- package/dist/api/action-dispatch.js.map +1 -0
- package/dist/api/alarm-request.d.ts +118 -0
- package/dist/api/alarm-request.d.ts.map +1 -0
- package/dist/api/alarm-request.js +50 -0
- package/dist/api/alarm-request.js.map +1 -0
- package/dist/api/bodies.d.ts +68 -0
- package/dist/api/bodies.d.ts.map +1 -0
- package/dist/api/bodies.js +103 -0
- package/dist/api/bodies.js.map +1 -0
- package/dist/api/command-rejection.d.ts +104 -0
- package/dist/api/command-rejection.d.ts.map +1 -0
- package/dist/api/command-rejection.js +128 -0
- package/dist/api/command-rejection.js.map +1 -0
- package/dist/api/contribution-slots.d.ts +594 -0
- package/dist/api/contribution-slots.d.ts.map +1 -0
- package/dist/api/contribution-slots.js +43 -0
- package/dist/api/contribution-slots.js.map +1 -0
- package/dist/api/coverage/CoverageMaskCache.d.ts +52 -0
- package/dist/api/coverage/CoverageMaskCache.d.ts.map +1 -0
- package/dist/api/coverage/CoverageMaskCache.js +89 -0
- package/dist/api/coverage/CoverageMaskCache.js.map +1 -0
- package/dist/api/coverage/CoverageMaskContext.d.ts +35 -0
- package/dist/api/coverage/CoverageMaskContext.d.ts.map +1 -0
- package/dist/api/coverage/CoverageMaskContext.js +53 -0
- package/dist/api/coverage/CoverageMaskContext.js.map +1 -0
- package/dist/api/coverage-source.d.ts +42 -0
- package/dist/api/coverage-source.d.ts.map +1 -0
- package/dist/api/coverage-source.js +118 -0
- package/dist/api/coverage-source.js.map +1 -0
- package/dist/api/error-codes.d.ts +32 -0
- package/dist/api/error-codes.d.ts.map +1 -0
- package/dist/api/error-codes.js +77 -0
- package/dist/api/error-codes.js.map +1 -0
- package/dist/api/event-reveal.d.ts +56 -0
- package/dist/api/event-reveal.d.ts.map +1 -0
- package/dist/api/event-reveal.js +53 -0
- package/dist/api/event-reveal.js.map +1 -0
- package/dist/api/host.d.ts +130 -0
- package/dist/api/host.d.ts.map +1 -0
- package/dist/api/host.js +57 -0
- package/dist/api/host.js.map +1 -0
- package/dist/api/index.d.ts +587 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +661 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/localStorageStore.d.ts +50 -0
- package/dist/api/localStorageStore.d.ts.map +1 -0
- package/dist/api/localStorageStore.js +151 -0
- package/dist/api/localStorageStore.js.map +1 -0
- package/dist/api/logger-contract.d.ts +37 -0
- package/dist/api/logger-contract.d.ts.map +1 -0
- package/dist/api/logger-contract.js +2 -0
- package/dist/api/logger-contract.js.map +1 -0
- package/dist/api/logger.d.ts +9 -0
- package/dist/api/logger.d.ts.map +1 -0
- package/dist/api/logger.js +16 -0
- package/dist/api/logger.js.map +1 -0
- package/dist/api/map-poi.d.ts +28 -0
- package/dist/api/map-poi.d.ts.map +1 -0
- package/dist/api/map-poi.js +82 -0
- package/dist/api/map-poi.js.map +1 -0
- package/dist/api/plot-layers.d.ts +240 -0
- package/dist/api/plot-layers.d.ts.map +1 -0
- package/dist/api/plot-layers.js +35 -0
- package/dist/api/plot-layers.js.map +1 -0
- package/dist/api/plots.d.ts +123 -0
- package/dist/api/plots.d.ts.map +1 -0
- package/dist/api/plots.js +39 -0
- package/dist/api/plots.js.map +1 -0
- package/dist/api/registry.d.ts +105 -0
- package/dist/api/registry.d.ts.map +1 -0
- package/dist/api/registry.js +266 -0
- package/dist/api/registry.js.map +1 -0
- package/dist/api/root-providers.d.ts +63 -0
- package/dist/api/root-providers.d.ts.map +1 -0
- package/dist/api/root-providers.js +76 -0
- package/dist/api/root-providers.js.map +1 -0
- package/dist/api/safe-random-uuid.d.ts +8 -0
- package/dist/api/safe-random-uuid.d.ts.map +1 -0
- package/dist/api/safe-random-uuid.js +19 -0
- package/dist/api/safe-random-uuid.js.map +1 -0
- package/dist/api/settings/SettingsContext.d.ts +32 -0
- package/dist/api/settings/SettingsContext.d.ts.map +1 -0
- package/dist/api/settings/SettingsContext.js +46 -0
- package/dist/api/settings/SettingsContext.js.map +1 -0
- package/dist/api/settings/SettingsService.d.ts +36 -0
- package/dist/api/settings/SettingsService.d.ts.map +1 -0
- package/dist/api/settings/SettingsService.js +139 -0
- package/dist/api/settings/SettingsService.js.map +1 -0
- package/dist/api/settings/store.d.ts +67 -0
- package/dist/api/settings/store.d.ts.map +1 -0
- package/dist/api/settings/store.js +160 -0
- package/dist/api/settings/store.js.map +1 -0
- package/dist/api/slots.d.ts +870 -0
- package/dist/api/slots.d.ts.map +1 -0
- package/dist/api/slots.js +45 -0
- package/dist/api/slots.js.map +1 -0
- package/dist/api/station-brokers.d.ts +48 -0
- package/dist/api/station-brokers.d.ts.map +1 -0
- package/dist/api/station-brokers.js +74 -0
- package/dist/api/station-brokers.js.map +1 -0
- package/dist/api/stock-bodies.d.ts +20 -0
- package/dist/api/stock-bodies.d.ts.map +1 -0
- package/dist/api/stock-bodies.js +263 -0
- package/dist/api/stock-bodies.js.map +1 -0
- package/dist/api/tiny-size.d.ts +13 -0
- package/dist/api/tiny-size.d.ts.map +1 -0
- package/dist/api/tiny-size.js +10 -0
- package/dist/api/tiny-size.js.map +1 -0
- package/dist/api/tone.d.ts +25 -0
- package/dist/api/tone.d.ts.map +1 -0
- package/dist/api/tone.js +15 -0
- package/dist/api/tone.js.map +1 -0
- package/dist/api/transport.d.ts +83 -0
- package/dist/api/transport.d.ts.map +1 -0
- package/dist/api/transport.js +2 -0
- package/dist/api/transport.js.map +1 -0
- package/dist/api/types.d.ts +1602 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +19 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/uplink-handles.d.ts +40 -0
- package/dist/api/uplink-handles.d.ts.map +1 -0
- package/dist/api/uplink-handles.js +59 -0
- package/dist/api/uplink-handles.js.map +1 -0
- package/dist/binary-frame.d.ts +116 -0
- package/dist/binary-frame.d.ts.map +1 -0
- package/dist/binary-frame.js +188 -0
- package/dist/binary-frame.js.map +1 -0
- package/dist/burn-clock.d.ts +61 -0
- package/dist/burn-clock.d.ts.map +1 -0
- package/dist/burn-clock.js +82 -0
- package/dist/burn-clock.js.map +1 -0
- package/dist/client.d.ts +8 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +39 -7
- package/dist/client.js.map +1 -1
- package/dist/combine-readings.d.ts +78 -0
- package/dist/combine-readings.d.ts.map +1 -0
- package/dist/combine-readings.js +191 -0
- package/dist/combine-readings.js.map +1 -0
- package/dist/command-delay.d.ts +211 -0
- package/dist/command-delay.d.ts.map +1 -0
- package/dist/command-delay.js +194 -0
- package/dist/command-delay.js.map +1 -0
- package/dist/command-reply-units.d.ts +14 -0
- package/dist/command-reply-units.d.ts.map +1 -0
- package/dist/command-reply-units.js +46 -0
- package/dist/command-reply-units.js.map +1 -0
- package/dist/commands.d.ts +139 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +113 -0
- package/dist/commands.js.map +1 -0
- package/dist/comms-degrade.d.ts +43 -0
- package/dist/comms-degrade.d.ts.map +1 -0
- package/dist/comms-degrade.js +45 -0
- package/dist/comms-degrade.js.map +1 -0
- package/dist/compat-versions.d.ts +42 -0
- package/dist/compat-versions.d.ts.map +1 -0
- package/dist/compat-versions.js +42 -0
- package/dist/compat-versions.js.map +1 -0
- package/dist/contract-enum-names.d.ts +89 -0
- package/dist/contract-enum-names.d.ts.map +1 -0
- package/dist/contract-enum-names.js +90 -0
- package/dist/contract-enum-names.js.map +1 -0
- package/dist/control-channels.d.ts +46 -0
- package/dist/control-channels.d.ts.map +1 -0
- package/dist/control-channels.js +49 -0
- package/dist/control-channels.js.map +1 -0
- package/dist/crew-standing.d.ts +69 -0
- package/dist/crew-standing.d.ts.map +1 -0
- package/dist/crew-standing.js +105 -0
- package/dist/crew-standing.js.map +1 -0
- package/dist/delay-roles.d.ts +94 -0
- package/dist/delay-roles.d.ts.map +1 -0
- package/dist/delay-roles.js +114 -0
- package/dist/delay-roles.js.map +1 -0
- package/dist/descent.d.ts +89 -0
- package/dist/descent.d.ts.map +1 -0
- package/dist/descent.js +96 -0
- package/dist/descent.js.map +1 -0
- package/dist/enum-names.d.ts +18 -0
- package/dist/enum-names.d.ts.map +1 -0
- package/dist/enum-names.js +35 -0
- package/dist/enum-names.js.map +1 -0
- package/dist/envelope.d.ts +15 -3
- package/dist/envelope.d.ts.map +1 -1
- package/dist/envelope.js +1 -0
- package/dist/envelope.js.map +1 -1
- package/dist/event-timeline.d.ts +112 -0
- package/dist/event-timeline.d.ts.map +1 -0
- package/dist/event-timeline.js +120 -0
- package/dist/event-timeline.js.map +1 -0
- package/dist/extensions.d.ts +28 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +36 -0
- package/dist/extensions.js.map +1 -0
- package/dist/field-frames.d.ts +32 -0
- package/dist/field-frames.d.ts.map +1 -0
- package/dist/field-frames.js +41 -0
- package/dist/field-frames.js.map +1 -0
- package/dist/flight/BufferedDataSource.d.ts +260 -0
- package/dist/flight/BufferedDataSource.d.ts.map +1 -0
- package/dist/flight/BufferedDataSource.js +790 -0
- package/dist/flight/BufferedDataSource.js.map +1 -0
- package/dist/flight/DataSourceWrapper.d.ts +33 -0
- package/dist/flight/DataSourceWrapper.d.ts.map +1 -0
- package/dist/flight/DataSourceWrapper.js +55 -0
- package/dist/flight/DataSourceWrapper.js.map +1 -0
- package/dist/flight/ListenerSet.d.ts +28 -0
- package/dist/flight/ListenerSet.d.ts.map +1 -0
- package/dist/flight/ListenerSet.js +66 -0
- package/dist/flight/ListenerSet.js.map +1 -0
- package/dist/flight/debugFlight.d.ts +8 -0
- package/dist/flight/debugFlight.d.ts.map +1 -0
- package/dist/flight/debugFlight.js +14 -0
- package/dist/flight/debugFlight.js.map +1 -0
- package/dist/flight/derive.d.ts +45 -0
- package/dist/flight/derive.d.ts.map +1 -0
- package/dist/flight/derive.js +26 -0
- package/dist/flight/derive.js.map +1 -0
- package/dist/flight/fixtureIO.d.ts +103 -0
- package/dist/flight/fixtureIO.d.ts.map +1 -0
- package/dist/flight/fixtureIO.js +120 -0
- package/dist/flight/fixtureIO.js.map +1 -0
- package/dist/flight/flightAutoDelete.d.ts +33 -0
- package/dist/flight/flightAutoDelete.d.ts.map +1 -0
- package/dist/flight/flightAutoDelete.js +43 -0
- package/dist/flight/flightAutoDelete.js.map +1 -0
- package/dist/flight/flightDetector.d.ts +73 -0
- package/dist/flight/flightDetector.d.ts.map +1 -0
- package/dist/flight/flightDetector.js +167 -0
- package/dist/flight/flightDetector.js.map +1 -0
- package/dist/flight/storage/LocalStorageStore.d.ts +52 -0
- package/dist/flight/storage/LocalStorageStore.d.ts.map +1 -0
- package/dist/flight/storage/LocalStorageStore.js +127 -0
- package/dist/flight/storage/LocalStorageStore.js.map +1 -0
- package/dist/flight/storage/MemoryStore.d.ts +24 -0
- package/dist/flight/storage/MemoryStore.d.ts.map +1 -0
- package/dist/flight/storage/MemoryStore.js +90 -0
- package/dist/flight/storage/MemoryStore.js.map +1 -0
- package/dist/flight/storage/Store.d.ts +37 -0
- package/dist/flight/storage/Store.d.ts.map +1 -0
- package/dist/flight/storage/Store.js +8 -0
- package/dist/flight/storage/Store.js.map +1 -0
- package/dist/flight/types.d.ts +358 -0
- package/dist/flight/types.d.ts.map +1 -0
- package/dist/flight/types.js +10 -0
- package/dist/flight/types.js.map +1 -0
- package/dist/frame-qualifier.d.ts +61 -0
- package/dist/frame-qualifier.d.ts.map +1 -0
- package/dist/frame-qualifier.js +122 -0
- package/dist/frame-qualifier.js.map +1 -0
- package/dist/frames/index.d.ts +133 -0
- package/dist/frames/index.d.ts.map +1 -0
- package/dist/frames/index.js +128 -0
- package/dist/frames/index.js.map +1 -0
- package/dist/index.d.ts +76 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +191 -5
- package/dist/index.js.map +1 -1
- package/dist/ksp-enum-names.d.ts +127 -0
- package/dist/ksp-enum-names.d.ts.map +1 -0
- package/dist/ksp-enum-names.js +128 -0
- package/dist/ksp-enum-names.js.map +1 -0
- package/dist/locked.d.ts +20 -0
- package/dist/locked.d.ts.map +1 -0
- package/dist/locked.js +25 -0
- package/dist/locked.js.map +1 -0
- package/dist/magnitude.d.ts +37 -0
- package/dist/magnitude.d.ts.map +1 -0
- package/dist/magnitude.js +39 -0
- package/dist/magnitude.js.map +1 -0
- package/dist/maneuver-basis.d.ts +19 -0
- package/dist/maneuver-basis.d.ts.map +1 -0
- package/dist/maneuver-basis.js +37 -0
- package/dist/maneuver-basis.js.map +1 -0
- package/dist/media/capture-clock.d.ts +35 -0
- package/dist/media/capture-clock.d.ts.map +1 -0
- package/dist/media/capture-clock.js +26 -0
- package/dist/media/capture-clock.js.map +1 -0
- package/dist/media/delayed-playout-buffer.d.ts +164 -0
- package/dist/media/delayed-playout-buffer.d.ts.map +1 -0
- package/dist/media/delayed-playout-buffer.js +166 -0
- package/dist/media/delayed-playout-buffer.js.map +1 -0
- package/dist/media/encoded-frame-delay.d.ts +115 -0
- package/dist/media/encoded-frame-delay.d.ts.map +1 -0
- package/dist/media/encoded-frame-delay.js +85 -0
- package/dist/media/encoded-frame-delay.js.map +1 -0
- package/dist/media/frame-delay.d.ts +204 -0
- package/dist/media/frame-delay.d.ts.map +1 -0
- package/dist/media/frame-delay.js +237 -0
- package/dist/media/frame-delay.js.map +1 -0
- package/dist/media/index.d.ts +17 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +21 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/radio-support.d.ts +98 -0
- package/dist/media/radio-support.d.ts.map +1 -0
- package/dist/media/radio-support.js +99 -0
- package/dist/media/radio-support.js.map +1 -0
- package/dist/media/shared-delayed-streams.d.ts +119 -0
- package/dist/media/shared-delayed-streams.d.ts.map +1 -0
- package/dist/media/shared-delayed-streams.js +167 -0
- package/dist/media/shared-delayed-streams.js.map +1 -0
- package/dist/media/worker/delay-worker-client.d.ts +106 -0
- package/dist/media/worker/delay-worker-client.d.ts.map +1 -0
- package/dist/media/worker/delay-worker-client.js +207 -0
- package/dist/media/worker/delay-worker-client.js.map +1 -0
- package/dist/media/worker/delay-worker.d.ts +107 -0
- package/dist/media/worker/delay-worker.d.ts.map +1 -0
- package/dist/media/worker/delay-worker.js +604 -0
- package/dist/media/worker/delay-worker.js.map +7 -0
- package/dist/media/worker/presentation-pacer.d.ts +156 -0
- package/dist/media/worker/presentation-pacer.d.ts.map +1 -0
- package/dist/media/worker/presentation-pacer.js +200 -0
- package/dist/media/worker/presentation-pacer.js.map +1 -0
- package/dist/media/worker/time-base.d.ts +44 -0
- package/dist/media/worker/time-base.d.ts.map +1 -0
- package/dist/media/worker/time-base.js +48 -0
- package/dist/media/worker/time-base.js.map +1 -0
- package/dist/media/worker/worker-delay-clock.d.ts +59 -0
- package/dist/media/worker/worker-delay-clock.d.ts.map +1 -0
- package/dist/media/worker/worker-delay-clock.js +89 -0
- package/dist/media/worker/worker-delay-clock.js.map +1 -0
- package/dist/perf/PerfBudget.d.ts +116 -0
- package/dist/perf/PerfBudget.d.ts.map +1 -0
- package/dist/perf/PerfBudget.js +221 -0
- package/dist/perf/PerfBudget.js.map +1 -0
- package/dist/rail-tags.d.ts +156 -0
- package/dist/rail-tags.d.ts.map +1 -0
- package/dist/rail-tags.js +131 -0
- package/dist/rail-tags.js.map +1 -0
- package/dist/raw-field-split.d.ts +32 -0
- package/dist/raw-field-split.d.ts.map +1 -0
- package/dist/raw-field-split.js +46 -0
- package/dist/raw-field-split.js.map +1 -0
- package/dist/reading.d.ts +958 -0
- package/dist/reading.d.ts.map +1 -0
- package/dist/reading.js +527 -0
- package/dist/reading.js.map +1 -0
- package/dist/reckonability.d.ts +52 -0
- package/dist/reckonability.d.ts.map +1 -0
- package/dist/reckonability.js +79 -0
- package/dist/reckonability.js.map +1 -0
- package/dist/registry/index.d.ts +7 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +26 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/runtime-topic-registry.d.ts +99 -0
- package/dist/runtime-topic-registry.d.ts.map +1 -0
- package/dist/runtime-topic-registry.js +182 -0
- package/dist/runtime-topic-registry.js.map +1 -0
- package/dist/spine/arrival-deadline.d.ts +19 -0
- package/dist/spine/arrival-deadline.d.ts.map +1 -0
- package/dist/spine/arrival-deadline.js +38 -0
- package/dist/spine/arrival-deadline.js.map +1 -0
- package/dist/spine/atmospheric-reckoning.d.ts +161 -0
- package/dist/spine/atmospheric-reckoning.d.ts.map +1 -0
- package/dist/spine/atmospheric-reckoning.js +421 -0
- package/dist/spine/atmospheric-reckoning.js.map +1 -0
- package/dist/spine/body-derivations.d.ts +28 -0
- package/dist/spine/body-derivations.d.ts.map +1 -0
- package/dist/spine/body-derivations.js +73 -0
- package/dist/spine/body-derivations.js.map +1 -0
- package/dist/spine/capability-lock.d.ts +43 -0
- package/dist/spine/capability-lock.d.ts.map +1 -0
- package/dist/spine/capability-lock.js +153 -0
- package/dist/spine/capability-lock.js.map +1 -0
- package/dist/spine/celestial-facts.d.ts +181 -0
- package/dist/spine/celestial-facts.d.ts.map +1 -0
- package/dist/spine/celestial-facts.js +212 -0
- package/dist/spine/celestial-facts.js.map +1 -0
- package/dist/spine/channel-error-warning.d.ts +24 -0
- package/dist/spine/channel-error-warning.d.ts.map +1 -0
- package/dist/spine/channel-error-warning.js +51 -0
- package/dist/spine/channel-error-warning.js.map +1 -0
- package/dist/spine/client-reading.d.ts +70 -0
- package/dist/spine/client-reading.d.ts.map +1 -0
- package/dist/spine/client-reading.js +123 -0
- package/dist/spine/client-reading.js.map +1 -0
- package/dist/spine/client-timeline.d.ts +130 -0
- package/dist/spine/client-timeline.d.ts.map +1 -0
- package/dist/spine/client-timeline.js +174 -0
- package/dist/spine/client-timeline.js.map +1 -0
- package/dist/spine/client.d.ts +454 -0
- package/dist/spine/client.d.ts.map +1 -0
- package/dist/spine/client.js +1138 -0
- package/dist/spine/client.js.map +1 -0
- package/dist/spine/clock.d.ts +48 -0
- package/dist/spine/clock.d.ts.map +1 -0
- package/dist/spine/clock.js +22 -0
- package/dist/spine/clock.js.map +1 -0
- package/dist/spine/command-gate.d.ts +89 -0
- package/dist/spine/command-gate.d.ts.map +1 -0
- package/dist/spine/command-gate.js +56 -0
- package/dist/spine/command-gate.js.map +1 -0
- package/dist/spine/comms-delay-reckoning.d.ts +123 -0
- package/dist/spine/comms-delay-reckoning.d.ts.map +1 -0
- package/dist/spine/comms-delay-reckoning.js +166 -0
- package/dist/spine/comms-delay-reckoning.js.map +1 -0
- package/dist/spine/comms-journey.d.ts +74 -0
- package/dist/spine/comms-journey.d.ts.map +1 -0
- package/dist/spine/comms-journey.js +180 -0
- package/dist/spine/comms-journey.js.map +1 -0
- package/dist/spine/comms-path-geometry.d.ts +128 -0
- package/dist/spine/comms-path-geometry.d.ts.map +1 -0
- package/dist/spine/comms-path-geometry.js +172 -0
- package/dist/spine/comms-path-geometry.js.map +1 -0
- package/dist/spine/comms-route.d.ts +52 -0
- package/dist/spine/comms-route.d.ts.map +1 -0
- package/dist/spine/comms-route.js +109 -0
- package/dist/spine/comms-route.js.map +1 -0
- package/dist/spine/connection-error-warning.d.ts +28 -0
- package/dist/spine/connection-error-warning.d.ts.map +1 -0
- package/dist/spine/connection-error-warning.js +49 -0
- package/dist/spine/connection-error-warning.js.map +1 -0
- package/dist/spine/connectivity-history.d.ts +35 -0
- package/dist/spine/connectivity-history.d.ts.map +1 -0
- package/dist/spine/connectivity-history.js +54 -0
- package/dist/spine/connectivity-history.js.map +1 -0
- package/dist/spine/context.d.ts +485 -0
- package/dist/spine/context.d.ts.map +1 -0
- package/dist/spine/context.js +1017 -0
- package/dist/spine/context.js.map +1 -0
- package/dist/spine/contributed-channels.d.ts +48 -0
- package/dist/spine/contributed-channels.d.ts.map +1 -0
- package/dist/spine/contributed-channels.js +104 -0
- package/dist/spine/contributed-channels.js.map +1 -0
- package/dist/spine/contribution-scope.d.ts +19 -0
- package/dist/spine/contribution-scope.d.ts.map +1 -0
- package/dist/spine/contribution-scope.js +62 -0
- package/dist/spine/contribution-scope.js.map +1 -0
- package/dist/spine/contributions.d.ts +77 -0
- package/dist/spine/contributions.d.ts.map +1 -0
- package/dist/spine/contributions.js +180 -0
- package/dist/spine/contributions.js.map +1 -0
- package/dist/spine/control-frame-to-read-frame.d.ts +43 -0
- package/dist/spine/control-frame-to-read-frame.d.ts.map +1 -0
- package/dist/spine/control-frame-to-read-frame.js +79 -0
- package/dist/spine/control-frame-to-read-frame.js.map +1 -0
- package/dist/spine/core-reckoners.d.ts +2 -0
- package/dist/spine/core-reckoners.d.ts.map +1 -0
- package/dist/spine/core-reckoners.js +894 -0
- package/dist/spine/core-reckoners.js.map +1 -0
- package/dist/spine/dashboard-item.d.ts +12 -0
- package/dist/spine/dashboard-item.d.ts.map +1 -0
- package/dist/spine/dashboard-item.js +16 -0
- package/dist/spine/dashboard-item.js.map +1 -0
- package/dist/spine/delay-authority.d.ts +204 -0
- package/dist/spine/delay-authority.d.ts.map +1 -0
- package/dist/spine/delay-authority.js +306 -0
- package/dist/spine/delay-authority.js.map +1 -0
- package/dist/spine/delta-v-budget.d.ts +121 -0
- package/dist/spine/delta-v-budget.d.ts.map +1 -0
- package/dist/spine/delta-v-budget.js +141 -0
- package/dist/spine/delta-v-budget.js.map +1 -0
- package/dist/spine/departure-reckoning.d.ts +37 -0
- package/dist/spine/departure-reckoning.d.ts.map +1 -0
- package/dist/spine/departure-reckoning.js +44 -0
- package/dist/spine/departure-reckoning.js.map +1 -0
- package/dist/spine/dv-stage-resources.d.ts +29 -0
- package/dist/spine/dv-stage-resources.d.ts.map +1 -0
- package/dist/spine/dv-stage-resources.js +95 -0
- package/dist/spine/dv-stage-resources.js.map +1 -0
- package/dist/spine/heartbeat-tracker.d.ts +116 -0
- package/dist/spine/heartbeat-tracker.d.ts.map +1 -0
- package/dist/spine/heartbeat-tracker.js +175 -0
- package/dist/spine/heartbeat-tracker.js.map +1 -0
- package/dist/spine/held-command-actions.d.ts +33 -0
- package/dist/spine/held-command-actions.d.ts.map +1 -0
- package/dist/spine/held-command-actions.js +75 -0
- package/dist/spine/held-command-actions.js.map +1 -0
- package/dist/spine/impact-point.d.ts +97 -0
- package/dist/spine/impact-point.d.ts.map +1 -0
- package/dist/spine/impact-point.js +299 -0
- package/dist/spine/impact-point.js.map +1 -0
- package/dist/spine/index.d.ts +84 -0
- package/dist/spine/index.d.ts.map +1 -0
- package/dist/spine/index.js +132 -0
- package/dist/spine/index.js.map +1 -0
- package/dist/spine/kepler-reckoning.d.ts +244 -0
- package/dist/spine/kepler-reckoning.d.ts.map +1 -0
- package/dist/spine/kepler-reckoning.js +377 -0
- package/dist/spine/kepler-reckoning.js.map +1 -0
- package/dist/spine/kepler.d.ts +296 -0
- package/dist/spine/kepler.d.ts.map +1 -0
- package/dist/spine/kepler.js +330 -0
- package/dist/spine/kepler.js.map +1 -0
- package/dist/spine/lagrange.d.ts +247 -0
- package/dist/spine/lagrange.d.ts.map +1 -0
- package/dist/spine/lagrange.js +379 -0
- package/dist/spine/lagrange.js.map +1 -0
- package/dist/spine/lifecycle.d.ts +244 -0
- package/dist/spine/lifecycle.d.ts.map +1 -0
- package/dist/spine/lifecycle.js +37 -0
- package/dist/spine/lifecycle.js.map +1 -0
- package/dist/spine/lock-scope.d.ts +23 -0
- package/dist/spine/lock-scope.d.ts.map +1 -0
- package/dist/spine/lock-scope.js +10 -0
- package/dist/spine/lock-scope.js.map +1 -0
- package/dist/spine/map-command.d.ts +29 -0
- package/dist/spine/map-command.d.ts.map +1 -0
- package/dist/spine/map-command.js +32 -0
- package/dist/spine/map-command.js.map +1 -0
- package/dist/spine/map-topic.d.ts +60 -0
- package/dist/spine/map-topic.d.ts.map +1 -0
- package/dist/spine/map-topic.js +151 -0
- package/dist/spine/map-topic.js.map +1 -0
- package/dist/spine/mod-settings.d.ts +22 -0
- package/dist/spine/mod-settings.d.ts.map +1 -0
- package/dist/spine/mod-settings.js +42 -0
- package/dist/spine/mod-settings.js.map +1 -0
- package/dist/spine/never-reckonable.d.ts +79 -0
- package/dist/spine/never-reckonable.d.ts.map +1 -0
- package/dist/spine/never-reckonable.js +168 -0
- package/dist/spine/never-reckonable.js.map +1 -0
- package/dist/spine/orbit-patches.d.ts +81 -0
- package/dist/spine/orbit-patches.d.ts.map +1 -0
- package/dist/spine/orbit-patches.js +111 -0
- package/dist/spine/orbit-patches.js.map +1 -0
- package/dist/spine/orbit-trajectory.d.ts +276 -0
- package/dist/spine/orbit-trajectory.d.ts.map +1 -0
- package/dist/spine/orbit-trajectory.js +382 -0
- package/dist/spine/orbit-trajectory.js.map +1 -0
- package/dist/spine/orbital-solve.d.ts +164 -0
- package/dist/spine/orbital-solve.d.ts.map +1 -0
- package/dist/spine/orbital-solve.js +239 -0
- package/dist/spine/orbital-solve.js.map +1 -0
- package/dist/spine/own-craft-vantage.d.ts +80 -0
- package/dist/spine/own-craft-vantage.d.ts.map +1 -0
- package/dist/spine/own-craft-vantage.js +136 -0
- package/dist/spine/own-craft-vantage.js.map +1 -0
- package/dist/spine/past-track.d.ts +46 -0
- package/dist/spine/past-track.d.ts.map +1 -0
- package/dist/spine/past-track.js +62 -0
- package/dist/spine/past-track.js.map +1 -0
- package/dist/spine/powered-reckoning.d.ts +164 -0
- package/dist/spine/powered-reckoning.d.ts.map +1 -0
- package/dist/spine/powered-reckoning.js +514 -0
- package/dist/spine/powered-reckoning.js.map +1 -0
- package/dist/spine/processorEvaluator.d.ts +110 -0
- package/dist/spine/processorEvaluator.d.ts.map +1 -0
- package/dist/spine/processorEvaluator.js +608 -0
- package/dist/spine/processorEvaluator.js.map +1 -0
- package/dist/spine/processors.d.ts +219 -0
- package/dist/spine/processors.d.ts.map +1 -0
- package/dist/spine/processors.js +86 -0
- package/dist/spine/processors.js.map +1 -0
- package/dist/spine/propagation.d.ts +17 -0
- package/dist/spine/propagation.d.ts.map +1 -0
- package/dist/spine/propagation.js +22 -0
- package/dist/spine/propagation.js.map +1 -0
- package/dist/spine/rail-registry.d.ts +21 -0
- package/dist/spine/rail-registry.d.ts.map +1 -0
- package/dist/spine/rail-registry.js +7 -0
- package/dist/spine/rail-registry.js.map +1 -0
- package/dist/spine/reckoners.d.ts +133 -0
- package/dist/spine/reckoners.d.ts.map +1 -0
- package/dist/spine/reckoners.js +245 -0
- package/dist/spine/reckoners.js.map +1 -0
- package/dist/spine/reference-frame.d.ts +286 -0
- package/dist/spine/reference-frame.d.ts.map +1 -0
- package/dist/spine/reference-frame.js +605 -0
- package/dist/spine/reference-frame.js.map +1 -0
- package/dist/spine/replay-recorder.d.ts +72 -0
- package/dist/spine/replay-recorder.d.ts.map +1 -0
- package/dist/spine/replay-recorder.js +101 -0
- package/dist/spine/replay-recorder.js.map +1 -0
- package/dist/spine/replay-session-controller.d.ts +65 -0
- package/dist/spine/replay-session-controller.d.ts.map +1 -0
- package/dist/spine/replay-session-controller.js +220 -0
- package/dist/spine/replay-session-controller.js.map +1 -0
- package/dist/spine/replay-session.d.ts +20 -0
- package/dist/spine/replay-session.d.ts.map +1 -0
- package/dist/spine/replay-session.js +31 -0
- package/dist/spine/replay-session.js.map +1 -0
- package/dist/spine/replay-transport.d.ts +83 -0
- package/dist/spine/replay-transport.d.ts.map +1 -0
- package/dist/spine/replay-transport.js +95 -0
- package/dist/spine/replay-transport.js.map +1 -0
- package/dist/spine/screen.d.ts +46 -0
- package/dist/spine/screen.d.ts.map +1 -0
- package/dist/spine/screen.js +41 -0
- package/dist/spine/screen.js.map +1 -0
- package/dist/spine/settings-registry.d.ts +222 -0
- package/dist/spine/settings-registry.d.ts.map +1 -0
- package/dist/spine/settings-registry.js +43 -0
- package/dist/spine/settings-registry.js.map +1 -0
- package/dist/spine/settings-tabs.d.ts +39 -0
- package/dist/spine/settings-tabs.d.ts.map +1 -0
- package/dist/spine/settings-tabs.js +18 -0
- package/dist/spine/settings-tabs.js.map +1 -0
- package/dist/spine/share-equal.d.ts +11 -0
- package/dist/spine/share-equal.d.ts.map +1 -0
- package/dist/spine/share-equal.js +57 -0
- package/dist/spine/share-equal.js.map +1 -0
- package/dist/spine/size-delta.d.ts +9 -0
- package/dist/spine/size-delta.d.ts.map +1 -0
- package/dist/spine/size-delta.js +19 -0
- package/dist/spine/size-delta.js.map +1 -0
- package/dist/spine/space-center-state.d.ts +44 -0
- package/dist/spine/space-center-state.d.ts.map +1 -0
- package/dist/spine/space-center-state.js +51 -0
- package/dist/spine/space-center-state.js.map +1 -0
- package/dist/spine/stream-status.d.ts +21 -0
- package/dist/spine/stream-status.d.ts.map +1 -0
- package/dist/spine/stream-status.js +48 -0
- package/dist/spine/stream-status.js.map +1 -0
- package/dist/spine/subscribe-read.d.ts +51 -0
- package/dist/spine/subscribe-read.d.ts.map +1 -0
- package/dist/spine/subscribe-read.js +66 -0
- package/dist/spine/subscribe-read.js.map +1 -0
- package/dist/spine/subscriber-identity.d.ts +12 -0
- package/dist/spine/subscriber-identity.d.ts.map +1 -0
- package/dist/spine/subscriber-identity.js +33 -0
- package/dist/spine/subscriber-identity.js.map +1 -0
- package/dist/spine/system-state.d.ts +29 -0
- package/dist/spine/system-state.d.ts.map +1 -0
- package/dist/spine/system-state.js +25 -0
- package/dist/spine/system-state.js.map +1 -0
- package/dist/spine/target-range-reckoning.d.ts +33 -0
- package/dist/spine/target-range-reckoning.d.ts.map +1 -0
- package/dist/spine/target-range-reckoning.js +78 -0
- package/dist/spine/target-range-reckoning.js.map +1 -0
- package/dist/spine/timeline-store.d.ts +1336 -0
- package/dist/spine/timeline-store.d.ts.map +1 -0
- package/dist/spine/timeline-store.js +2893 -0
- package/dist/spine/timeline-store.js.map +1 -0
- package/dist/spine/topic-ownership.d.ts +138 -0
- package/dist/spine/topic-ownership.d.ts.map +1 -0
- package/dist/spine/topic-ownership.js +194 -0
- package/dist/spine/topic-ownership.js.map +1 -0
- package/dist/spine/unowned-warning.d.ts +25 -0
- package/dist/spine/unowned-warning.d.ts.map +1 -0
- package/dist/spine/unowned-warning.js +55 -0
- package/dist/spine/unowned-warning.js.map +1 -0
- package/dist/spine/uplink-clients.d.ts +135 -0
- package/dist/spine/uplink-clients.d.ts.map +1 -0
- package/dist/spine/uplink-clients.js +79 -0
- package/dist/spine/uplink-clients.js.map +1 -0
- package/dist/spine/uplink-health.d.ts +123 -0
- package/dist/spine/uplink-health.d.ts.map +1 -0
- package/dist/spine/uplink-health.js +75 -0
- package/dist/spine/uplink-health.js.map +1 -0
- package/dist/spine/use-action-input.d.ts +3 -0
- package/dist/spine/use-action-input.d.ts.map +1 -0
- package/dist/spine/use-action-input.js +76 -0
- package/dist/spine/use-action-input.js.map +1 -0
- package/dist/spine/use-body-states.d.ts +34 -0
- package/dist/spine/use-body-states.d.ts.map +1 -0
- package/dist/spine/use-body-states.js +23 -0
- package/dist/spine/use-body-states.js.map +1 -0
- package/dist/spine/use-command.d.ts +259 -0
- package/dist/spine/use-command.d.ts.map +1 -0
- package/dist/spine/use-command.js +626 -0
- package/dist/spine/use-command.js.map +1 -0
- package/dist/spine/use-data-sources.d.ts +7 -0
- package/dist/spine/use-data-sources.d.ts.map +1 -0
- package/dist/spine/use-data-sources.js +27 -0
- package/dist/spine/use-data-sources.js.map +1 -0
- package/dist/spine/use-late-telemetry-subscribe.d.ts +59 -0
- package/dist/spine/use-late-telemetry-subscribe.d.ts.map +1 -0
- package/dist/spine/use-late-telemetry-subscribe.js +81 -0
- package/dist/spine/use-late-telemetry-subscribe.js.map +1 -0
- package/dist/spine/use-orbit-trajectory.d.ts +25 -0
- package/dist/spine/use-orbit-trajectory.d.ts.map +1 -0
- package/dist/spine/use-orbit-trajectory.js +45 -0
- package/dist/spine/use-orbit-trajectory.js.map +1 -0
- package/dist/spine/use-processor.d.ts +30 -0
- package/dist/spine/use-processor.d.ts.map +1 -0
- package/dist/spine/use-processor.js +36 -0
- package/dist/spine/use-processor.js.map +1 -0
- package/dist/spine/use-route-commands.d.ts +28 -0
- package/dist/spine/use-route-commands.d.ts.map +1 -0
- package/dist/spine/use-route-commands.js +32 -0
- package/dist/spine/use-route-commands.js.map +1 -0
- package/dist/spine/use-selected-vantage.d.ts +12 -0
- package/dist/spine/use-selected-vantage.d.ts.map +1 -0
- package/dist/spine/use-selected-vantage.js +19 -0
- package/dist/spine/use-selected-vantage.js.map +1 -0
- package/dist/spine/use-stream-event.d.ts +28 -0
- package/dist/spine/use-stream-event.d.ts.map +1 -0
- package/dist/spine/use-stream-event.js +52 -0
- package/dist/spine/use-stream-event.js.map +1 -0
- package/dist/spine/use-stream.d.ts +79 -0
- package/dist/spine/use-stream.d.ts.map +1 -0
- package/dist/spine/use-stream.js +124 -0
- package/dist/spine/use-stream.js.map +1 -0
- package/dist/spine/use-telemetry.d.ts +79 -0
- package/dist/spine/use-telemetry.d.ts.map +1 -0
- package/dist/spine/use-telemetry.js +39 -0
- package/dist/spine/use-telemetry.js.map +1 -0
- package/dist/spine/use-transmissions.d.ts +36 -0
- package/dist/spine/use-transmissions.d.ts.map +1 -0
- package/dist/spine/use-transmissions.js +63 -0
- package/dist/spine/use-transmissions.js.map +1 -0
- package/dist/spine/vantage.d.ts +16 -0
- package/dist/spine/vantage.d.ts.map +1 -0
- package/dist/spine/vantage.js +16 -0
- package/dist/spine/vantage.js.map +1 -0
- package/dist/spine/view-clock.d.ts +232 -0
- package/dist/spine/view-clock.d.ts.map +1 -0
- package/dist/spine/view-clock.js +348 -0
- package/dist/spine/view-clock.js.map +1 -0
- package/dist/spine/wire-payloads.d.ts +232 -0
- package/dist/spine/wire-payloads.d.ts.map +1 -0
- package/dist/spine/wire-payloads.js +2 -0
- package/dist/spine/wire-payloads.js.map +1 -0
- package/dist/testing/console-logger.d.ts +10 -0
- package/dist/testing/console-logger.d.ts.map +1 -0
- package/dist/testing/console-logger.js +23 -0
- package/dist/testing/console-logger.js.map +1 -0
- package/dist/testing/create-test-telemetry-client.d.ts +13 -0
- package/dist/testing/create-test-telemetry-client.d.ts.map +1 -0
- package/dist/testing/create-test-telemetry-client.js +14 -0
- package/dist/testing/create-test-telemetry-client.js.map +1 -0
- package/dist/testing/fake-wall-clock.d.ts +19 -0
- package/dist/testing/fake-wall-clock.d.ts.map +1 -0
- package/dist/testing/fake-wall-clock.js +17 -0
- package/dist/testing/fake-wall-clock.js.map +1 -0
- package/dist/testing/index.d.ts +30 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +99 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/install-act-gate-stretch.d.ts +24 -0
- package/dist/testing/install-act-gate-stretch.d.ts.map +1 -0
- package/dist/testing/install-act-gate-stretch.js +67 -0
- package/dist/testing/install-act-gate-stretch.js.map +1 -0
- package/dist/testing/install-dom-stubs.d.ts +9 -0
- package/dist/testing/install-dom-stubs.d.ts.map +1 -0
- package/dist/testing/install-dom-stubs.js +121 -0
- package/dist/testing/install-dom-stubs.js.map +1 -0
- package/dist/testing/install-real-test-host.d.ts +30 -0
- package/dist/testing/install-real-test-host.d.ts.map +1 -0
- package/dist/testing/install-real-test-host.js +90 -0
- package/dist/testing/install-real-test-host.js.map +1 -0
- package/dist/testing/install-test-host.d.ts +18 -0
- package/dist/testing/install-test-host.d.ts.map +1 -0
- package/dist/testing/install-test-host.js +23 -0
- package/dist/testing/install-test-host.js.map +1 -0
- package/dist/testing/memory-storage.d.ts +10 -0
- package/dist/testing/memory-storage.d.ts.map +1 -0
- package/dist/testing/memory-storage.js +26 -0
- package/dist/testing/memory-storage.js.map +1 -0
- package/dist/testing/mock-data-source.d.ts +46 -0
- package/dist/testing/mock-data-source.d.ts.map +1 -0
- package/dist/testing/mock-data-source.js +74 -0
- package/dist/testing/mock-data-source.js.map +1 -0
- package/dist/testing/recorded-alarm-requests.d.ts +28 -0
- package/dist/testing/recorded-alarm-requests.d.ts.map +1 -0
- package/dist/testing/recorded-alarm-requests.js +24 -0
- package/dist/testing/recorded-alarm-requests.js.map +1 -0
- package/dist/testing/render.d.ts +29 -0
- package/dist/testing/render.d.ts.map +1 -0
- package/dist/testing/render.js +52 -0
- package/dist/testing/render.js.map +1 -0
- package/dist/testing/stream-fixture.d.ts +71 -0
- package/dist/testing/stream-fixture.d.ts.map +1 -0
- package/dist/testing/stream-fixture.js +61 -0
- package/dist/testing/stream-fixture.js.map +1 -0
- package/dist/testing/stub-transport.d.ts +124 -0
- package/dist/testing/stub-transport.d.ts.map +1 -0
- package/dist/testing/stub-transport.js +229 -0
- package/dist/testing/stub-transport.js.map +1 -0
- package/dist/testing/theme.d.ts +59 -0
- package/dist/testing/theme.d.ts.map +1 -0
- package/dist/testing/theme.js +11 -0
- package/dist/testing/theme.js.map +1 -0
- package/dist/timeline.d.ts +63 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +2 -0
- package/dist/timeline.js.map +1 -0
- package/dist/topic-fields.d.ts +55 -0
- package/dist/topic-fields.d.ts.map +1 -0
- package/dist/topic-fields.js +102 -0
- package/dist/topic-fields.js.map +1 -0
- package/dist/topics.d.ts +335 -30
- package/dist/topics.d.ts.map +1 -1
- package/dist/topics.js +183 -28
- package/dist/topics.js.map +1 -1
- package/dist/unit-system/algebra.d.ts +305 -0
- package/dist/unit-system/algebra.d.ts.map +1 -0
- package/dist/unit-system/algebra.js +2 -0
- package/dist/unit-system/algebra.js.map +1 -0
- package/dist/unit-system/calendar.d.ts +74 -0
- package/dist/unit-system/calendar.d.ts.map +1 -0
- package/dist/unit-system/calendar.js +107 -0
- package/dist/unit-system/calendar.js.map +1 -0
- package/dist/unit-system/declarations.d.ts +87 -0
- package/dist/unit-system/declarations.d.ts.map +1 -0
- package/dist/unit-system/declarations.js +2 -0
- package/dist/unit-system/declarations.js.map +1 -0
- package/dist/unit-system/definitions.d.ts +639 -0
- package/dist/unit-system/definitions.d.ts.map +1 -0
- package/dist/unit-system/definitions.js +326 -0
- package/dist/unit-system/definitions.js.map +1 -0
- package/dist/unit-system/dimension.d.ts +29 -0
- package/dist/unit-system/dimension.d.ts.map +1 -0
- package/dist/unit-system/dimension.js +88 -0
- package/dist/unit-system/dimension.js.map +1 -0
- package/dist/unit-system/guards.d.ts +56 -0
- package/dist/unit-system/guards.d.ts.map +1 -0
- package/dist/unit-system/guards.js +71 -0
- package/dist/unit-system/guards.js.map +1 -0
- package/dist/unit-system/index.d.ts +16 -0
- package/dist/unit-system/index.d.ts.map +1 -0
- package/dist/unit-system/index.js +14 -0
- package/dist/unit-system/index.js.map +1 -0
- package/dist/unit-system/registry.d.ts +160 -0
- package/dist/unit-system/registry.d.ts.map +1 -0
- package/dist/unit-system/registry.js +267 -0
- package/dist/unit-system/registry.js.map +1 -0
- package/dist/unit-system/value.d.ts +435 -0
- package/dist/unit-system/value.d.ts.map +1 -0
- package/dist/unit-system/value.js +387 -0
- package/dist/unit-system/value.js.map +1 -0
- package/dist/units.d.ts +159 -0
- package/dist/units.d.ts.map +1 -0
- package/dist/units.js +385 -0
- package/dist/units.js.map +1 -0
- package/dist/uplink-externals.d.ts +65 -0
- package/dist/uplink-externals.d.ts.map +1 -0
- package/dist/uplink-externals.js +87 -0
- package/dist/uplink-externals.js.map +1 -0
- package/dist/uplink-manifest.d.ts +180 -0
- package/dist/uplink-manifest.d.ts.map +1 -0
- package/dist/uplink-manifest.js +214 -0
- package/dist/uplink-manifest.js.map +1 -0
- package/dist/value.d.ts +13 -0
- package/dist/value.d.ts.map +1 -0
- package/dist/value.js +2 -0
- package/dist/value.js.map +1 -0
- package/dist/version.generated.d.ts +7 -0
- package/dist/version.generated.d.ts.map +1 -0
- package/dist/version.generated.js +11 -0
- package/dist/version.generated.js.map +1 -0
- package/dist/view-clock-formula.d.ts +52 -0
- package/dist/view-clock-formula.d.ts.map +1 -0
- package/dist/view-clock-formula.js +46 -0
- package/dist/view-clock-formula.js.map +1 -0
- package/dist/wrap-units.d.ts +55 -0
- package/dist/wrap-units.d.ts.map +1 -0
- package/dist/wrap-units.js +256 -0
- package/dist/wrap-units.js.map +1 -0
- package/package.json +73 -11
- package/src/__generated__/command-map.ts +465 -0
- package/src/__generated__/contract.ts +10981 -0
- package/src/__generated__/control-channels.ts +41 -0
- package/src/__generated__/delay-roles.ts +82 -0
- package/src/__generated__/error-codes.ts +712 -0
- package/src/__generated__/frames.ts +52 -0
- package/src/__generated__/reckonability.ts +86 -0
- package/src/__generated__/test-theme.ts +70 -0
- package/src/__generated__/topic-map.ts +314 -0
- package/src/__generated__/units.json +2755 -0
- package/src/__generated__/units.ts +3398 -0
- package/src/api/action-dispatch.ts +105 -0
- package/src/api/alarm-request.ts +153 -0
- package/src/api/bodies.ts +116 -0
- package/src/api/command-rejection.ts +194 -0
- package/src/api/contribution-slots.ts +666 -0
- package/src/api/coverage/CoverageMaskCache.ts +112 -0
- package/src/api/coverage/CoverageMaskContext.tsx +79 -0
- package/src/api/coverage-source.ts +137 -0
- package/src/api/error-codes.ts +87 -0
- package/src/api/event-reveal.ts +96 -0
- package/src/api/host.ts +213 -0
- package/src/api/index.ts +1153 -0
- package/src/api/localStorageStore.ts +180 -0
- package/src/api/logger-contract.ts +38 -0
- package/src/api/logger.ts +17 -0
- package/src/api/map-poi.ts +98 -0
- package/src/api/plot-layers.ts +257 -0
- package/src/api/plots.ts +165 -0
- package/src/api/registry.ts +323 -0
- package/src/api/root-providers.tsx +136 -0
- package/src/api/safe-random-uuid.ts +22 -0
- package/src/api/settings/SettingsContext.tsx +79 -0
- package/src/api/settings/SettingsService.ts +142 -0
- package/src/api/settings/store.ts +180 -0
- package/src/api/slots.ts +1041 -0
- package/src/api/station-brokers.ts +94 -0
- package/src/api/stock-bodies.ts +281 -0
- package/src/api/tiny-size.ts +9 -0
- package/src/api/tone.ts +41 -0
- package/src/api/transport.ts +98 -0
- package/src/api/types.ts +1901 -0
- package/src/api/uplink-handles.ts +71 -0
- package/src/binary-frame.ts +250 -0
- package/src/burn-clock.ts +115 -0
- package/src/client.ts +56 -0
- package/src/combine-readings.ts +244 -0
- package/src/command-delay.ts +392 -0
- package/src/command-reply-units.ts +63 -0
- package/src/commands.ts +238 -0
- package/src/comms-degrade.ts +68 -0
- package/src/compat-versions.ts +44 -0
- package/src/contract-enum-names.ts +141 -0
- package/src/control-channels.ts +92 -0
- package/src/crew-standing.ts +131 -0
- package/src/delay-roles.ts +185 -0
- package/src/descent.ts +149 -0
- package/src/enum-names.ts +35 -0
- package/src/envelope.ts +45 -0
- package/src/event-timeline.ts +196 -0
- package/src/extensions.ts +58 -0
- package/src/field-frames.ts +70 -0
- package/src/flight/BufferedDataSource.ts +945 -0
- package/src/flight/DataSourceWrapper.ts +79 -0
- package/src/flight/ListenerSet.ts +73 -0
- package/src/flight/debugFlight.ts +16 -0
- package/src/flight/derive.ts +56 -0
- package/src/flight/fixtureIO.ts +197 -0
- package/src/flight/flightAutoDelete.ts +53 -0
- package/src/flight/flightDetector.ts +213 -0
- package/src/flight/storage/LocalStorageStore.ts +160 -0
- package/src/flight/storage/MemoryStore.ts +113 -0
- package/src/flight/storage/Store.ts +52 -0
- package/src/flight/types.ts +408 -0
- package/src/frame-qualifier.ts +153 -0
- package/src/frames/index.ts +177 -0
- package/src/index.ts +576 -0
- package/src/ksp-enum-names.ts +191 -0
- package/src/locked.ts +29 -0
- package/src/magnitude.ts +52 -0
- package/src/maneuver-basis.ts +49 -0
- package/src/media/capture-clock.ts +43 -0
- package/src/media/delayed-playout-buffer.ts +248 -0
- package/src/media/encoded-frame-delay.ts +153 -0
- package/src/media/frame-delay.ts +402 -0
- package/src/media/index.ts +83 -0
- package/src/media/radio-support.ts +132 -0
- package/src/media/shared-delayed-streams.ts +232 -0
- package/src/media/webcodecs-track-io.d.ts +99 -0
- package/src/media/worker/delay-worker-client.ts +312 -0
- package/src/media/worker/delay-worker.ts +433 -0
- package/src/media/worker/presentation-pacer.ts +249 -0
- package/src/media/worker/time-base.ts +55 -0
- package/src/media/worker/worker-delay-clock.ts +122 -0
- package/src/perf/PerfBudget.ts +267 -0
- package/src/rail-tags.ts +221 -0
- package/src/raw-field-split.ts +72 -0
- package/src/reading.ts +1563 -0
- package/src/reckonability.ts +117 -0
- package/src/registry/index.ts +36 -0
- package/src/runtime-topic-registry.ts +204 -0
- package/src/spine/arrival-deadline.ts +48 -0
- package/src/spine/atmospheric-reckoning.ts +540 -0
- package/src/spine/body-derivations.ts +103 -0
- package/src/spine/capability-lock.ts +210 -0
- package/src/spine/celestial-facts.ts +455 -0
- package/src/spine/channel-error-warning.ts +61 -0
- package/src/spine/client-reading.ts +282 -0
- package/src/spine/client-timeline.ts +234 -0
- package/src/spine/client.ts +1336 -0
- package/src/spine/clock.ts +57 -0
- package/src/spine/command-gate.ts +139 -0
- package/src/spine/comms-delay-reckoning.ts +217 -0
- package/src/spine/comms-journey.ts +256 -0
- package/src/spine/comms-path-geometry.ts +237 -0
- package/src/spine/comms-route.ts +142 -0
- package/src/spine/connection-error-warning.ts +54 -0
- package/src/spine/connectivity-history.ts +68 -0
- package/src/spine/context.tsx +1317 -0
- package/src/spine/contributed-channels.ts +126 -0
- package/src/spine/contribution-scope.ts +87 -0
- package/src/spine/contributions.ts +213 -0
- package/src/spine/control-frame-to-read-frame.ts +91 -0
- package/src/spine/core-reckoners.ts +1112 -0
- package/src/spine/dashboard-item.ts +25 -0
- package/src/spine/delay-authority.ts +337 -0
- package/src/spine/delta-v-budget.ts +311 -0
- package/src/spine/departure-reckoning.ts +69 -0
- package/src/spine/dv-stage-resources.ts +137 -0
- package/src/spine/heartbeat-tracker.ts +208 -0
- package/src/spine/held-command-actions.ts +119 -0
- package/src/spine/impact-point.ts +432 -0
- package/src/spine/index.ts +132 -0
- package/src/spine/kepler-reckoning.ts +572 -0
- package/src/spine/kepler.ts +576 -0
- package/src/spine/lagrange.ts +585 -0
- package/src/spine/lifecycle.ts +251 -0
- package/src/spine/lock-scope.ts +27 -0
- package/src/spine/map-command.ts +33 -0
- package/src/spine/map-topic.ts +163 -0
- package/src/spine/mod-settings.ts +47 -0
- package/src/spine/never-reckonable.ts +183 -0
- package/src/spine/orbit-patches.ts +213 -0
- package/src/spine/orbit-trajectory.ts +636 -0
- package/src/spine/orbital-solve.ts +393 -0
- package/src/spine/own-craft-vantage.tsx +161 -0
- package/src/spine/past-track.ts +93 -0
- package/src/spine/powered-reckoning.ts +866 -0
- package/src/spine/processorEvaluator.ts +688 -0
- package/src/spine/processors.ts +330 -0
- package/src/spine/propagation.ts +25 -0
- package/src/spine/rail-registry.ts +27 -0
- package/src/spine/reckoners.ts +317 -0
- package/src/spine/reference-frame.ts +816 -0
- package/src/spine/replay-recorder.ts +128 -0
- package/src/spine/replay-session-controller.ts +282 -0
- package/src/spine/replay-session.tsx +47 -0
- package/src/spine/replay-transport.ts +167 -0
- package/src/spine/screen.tsx +70 -0
- package/src/spine/settings-registry.ts +286 -0
- package/src/spine/settings-tabs.ts +57 -0
- package/src/spine/share-equal.ts +62 -0
- package/src/spine/size-delta.ts +23 -0
- package/src/spine/space-center-state.ts +101 -0
- package/src/spine/stream-status.ts +62 -0
- package/src/spine/subscribe-read.ts +88 -0
- package/src/spine/subscriber-identity.tsx +44 -0
- package/src/spine/system-state.ts +44 -0
- package/src/spine/target-range-reckoning.ts +127 -0
- package/src/spine/timeline-store.ts +3626 -0
- package/src/spine/topic-ownership.ts +211 -0
- package/src/spine/unowned-warning.ts +63 -0
- package/src/spine/uplink-clients.ts +265 -0
- package/src/spine/uplink-health.ts +256 -0
- package/src/spine/use-action-input.ts +87 -0
- package/src/spine/use-body-states.ts +52 -0
- package/src/spine/use-command.ts +1090 -0
- package/src/spine/use-data-sources.ts +43 -0
- package/src/spine/use-late-telemetry-subscribe.ts +111 -0
- package/src/spine/use-orbit-trajectory.ts +50 -0
- package/src/spine/use-processor.ts +56 -0
- package/src/spine/use-route-commands.ts +57 -0
- package/src/spine/use-selected-vantage.ts +23 -0
- package/src/spine/use-stream-event.ts +54 -0
- package/src/spine/use-stream.ts +137 -0
- package/src/spine/use-telemetry.ts +142 -0
- package/src/spine/use-transmissions.ts +100 -0
- package/src/spine/vantage.ts +15 -0
- package/src/spine/view-clock.ts +404 -0
- package/src/spine/wire-payloads.ts +242 -0
- package/src/testing/console-logger.ts +24 -0
- package/src/testing/create-test-telemetry-client.ts +17 -0
- package/src/testing/fake-wall-clock.ts +27 -0
- package/src/testing/index.ts +141 -0
- package/src/testing/install-act-gate-stretch.ts +83 -0
- package/src/testing/install-dom-stubs.ts +137 -0
- package/src/testing/install-real-test-host.ts +156 -0
- package/src/testing/install-test-host.ts +24 -0
- package/src/testing/memory-storage.ts +25 -0
- package/src/testing/mock-data-source.ts +109 -0
- package/src/testing/recorded-alarm-requests.ts +43 -0
- package/src/testing/render.tsx +78 -0
- package/src/testing/stream-fixture.tsx +130 -0
- package/src/testing/stub-transport.ts +289 -0
- package/src/testing/theme.ts +11 -0
- package/src/timeline.ts +68 -0
- package/src/topic-fields.ts +188 -0
- package/src/topics.ts +553 -0
- package/src/unit-system/algebra.ts +472 -0
- package/src/unit-system/calendar.ts +145 -0
- package/src/unit-system/declarations.ts +96 -0
- package/src/unit-system/definitions.ts +385 -0
- package/src/unit-system/dimension.ts +107 -0
- package/src/unit-system/guards.ts +80 -0
- package/src/unit-system/index.ts +68 -0
- package/src/unit-system/registry.ts +381 -0
- package/src/unit-system/value.ts +957 -0
- package/src/units.ts +462 -0
- package/src/uplink-externals.ts +91 -0
- package/src/uplink-manifest.ts +349 -0
- package/src/value.ts +15 -0
- package/src/version.generated.ts +10 -0
- package/src/view-clock-formula.ts +90 -0
- package/src/wrap-units.ts +361 -0
- package/tsconfig.base.json +16 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
2
|
+
import { getDataSources } from "../api/registry";
|
|
3
|
+
|
|
4
|
+
export interface DataSourceState {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
status: import("../api/types").DataSourceStatus;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function useDataSources(): DataSourceState[] {
|
|
11
|
+
// subscribe tells React which external events should trigger a re-check.
|
|
12
|
+
// getDataSources() is called inside the callback so it always sees the
|
|
13
|
+
// current set of registered sources without needing them as a dependency.
|
|
14
|
+
const subscribe = useCallback((onStoreChange: () => void) => {
|
|
15
|
+
const unsubscribers = getDataSources().map((s) =>
|
|
16
|
+
s.onStatusChange(onStoreChange),
|
|
17
|
+
);
|
|
18
|
+
return () =>
|
|
19
|
+
unsubscribers.forEach((u) => {
|
|
20
|
+
u();
|
|
21
|
+
});
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
// getSnapshot returns a primitive so React can compare by equality.
|
|
25
|
+
const getSnapshot = useCallback(
|
|
26
|
+
() =>
|
|
27
|
+
getDataSources()
|
|
28
|
+
.map((s) => s.status)
|
|
29
|
+
.join(","),
|
|
30
|
+
[],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// useSyncExternalStore re-reads the snapshot on every onStoreChange call,
|
|
34
|
+
// and guarantees the update is processed synchronously, eliminating act() warnings
|
|
35
|
+
// caused by WebSocket/external events updating state outside React's scheduler.
|
|
36
|
+
useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
37
|
+
|
|
38
|
+
return getDataSources().map((s) => ({
|
|
39
|
+
id: s.id,
|
|
40
|
+
name: s.name,
|
|
41
|
+
status: s.status,
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
+
import type { TopicId, TopicPayload } from "../topics";
|
|
3
|
+
import { useTelemetryClientOptional } from "./context";
|
|
4
|
+
|
|
5
|
+
/** Ends one subscription started through `LateTelemetrySubscribe`. Safe to call more than once. */
|
|
6
|
+
export type Unsubscribe = () => void;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The imperative subscribe function `useLateTelemetrySubscribe` returns.
|
|
10
|
+
* Two overloads, mirroring `useTelemetry`'s canonical/fallback split:
|
|
11
|
+
*
|
|
12
|
+
* - a `TopicId` argument infers the payload type from `TopicPayloadMap`,
|
|
13
|
+
* the same canonical typing `useTelemetry(topic)` gives a static topic.
|
|
14
|
+
* - a plain `string` argument (for a runtime-templated topic like
|
|
15
|
+
* `scansat.mask.${body}.${scanType}`, which has no fixed member in the
|
|
16
|
+
* `TopicId` union) falls back to an explicit `Payload` type argument at the
|
|
17
|
+
* call site.
|
|
18
|
+
*/
|
|
19
|
+
export interface LateTelemetrySubscribe {
|
|
20
|
+
<Topic extends TopicId>(
|
|
21
|
+
topic: Topic,
|
|
22
|
+
onValue: (value: TopicPayload<Topic>) => void,
|
|
23
|
+
): Unsubscribe;
|
|
24
|
+
<Payload = unknown>(
|
|
25
|
+
topic: string,
|
|
26
|
+
onValue: (value: Payload) => void,
|
|
27
|
+
): Unsubscribe;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A narrow, lifecycle-managed escape hatch for subscribing to telemetry
|
|
32
|
+
* topics that are only known after some async setup resolves, in a count
|
|
33
|
+
* decided at runtime, rather than a fixed set a component can declare
|
|
34
|
+
* up front. `useTelemetry`/`useStream` are declarative: every call site
|
|
35
|
+
* names its topic(s) unconditionally on every render, which cannot express
|
|
36
|
+
* "subscribe to N topics once an async cache acquire settles for each one".
|
|
37
|
+
* This hook is the deliberately small seam for that case: it hands back one
|
|
38
|
+
* stable `subscribe` function instead of the whole `TelemetryClient`, so an
|
|
39
|
+
* author gets exactly "subscribe a callback to a topic, get an unsubscribe
|
|
40
|
+
* back" and nothing more.
|
|
41
|
+
*
|
|
42
|
+
* `subscribe` reads through the nearest `TelemetryProvider`'s
|
|
43
|
+
* `TelemetryClient` (`TelemetryClient.subscribe`), the same client
|
|
44
|
+
* `useTelemetry`'s canonical read and `useStreamEvent` use: sticky last
|
|
45
|
+
* value replayed synchronously on subscribe, every later arrival delivered
|
|
46
|
+
* as it lands, no delay gating or per-frame coalescing (a `TimelineStore`
|
|
47
|
+
* frame sample would introduce both, which is wrong for state that is not
|
|
48
|
+
* delayed craft telemetry).
|
|
49
|
+
*
|
|
50
|
+
* The returned function:
|
|
51
|
+
* - is stable across renders (safe to put in a `useCallback`/`useEffect`
|
|
52
|
+
* dependency array, or to close over once and call later),
|
|
53
|
+
* - resolves the CURRENT client at CALL time, not the one seen at the
|
|
54
|
+
* render that produced it, so it keeps working when called from inside
|
|
55
|
+
* an async `.then()` well after this hook's own render,
|
|
56
|
+
* - can be called any number of times, including zero,
|
|
57
|
+
* - returns an idempotent `Unsubscribe`: calling it more than once, or
|
|
58
|
+
* after this hook's owner has already unmounted, is a no-op.
|
|
59
|
+
*
|
|
60
|
+
* Every subscription still open when the calling component unmounts is
|
|
61
|
+
* torn down automatically (tracked in a ref, swept in one cleanup effect):
|
|
62
|
+
* a caller only needs to call the returned `Unsubscribe` early, for a
|
|
63
|
+
* subscription it wants to end before unmount, never on unmount itself.
|
|
64
|
+
*
|
|
65
|
+
* Degrades to a no-op subscribe (no throw, no-op returned `Unsubscribe`)
|
|
66
|
+
* when no `TelemetryProvider` is mounted at call time, matching every other
|
|
67
|
+
* `*Optional`-shaped hook in this package.
|
|
68
|
+
*/
|
|
69
|
+
export function useLateTelemetrySubscribe(): LateTelemetrySubscribe {
|
|
70
|
+
const client = useTelemetryClientOptional();
|
|
71
|
+
// Read fresh at call time (see the doc comment above): `subscribe` may be
|
|
72
|
+
// invoked long after the render that captured this hook's return value,
|
|
73
|
+
// by which point `client` here would be stale.
|
|
74
|
+
const clientRef = useRef(client);
|
|
75
|
+
clientRef.current = client;
|
|
76
|
+
|
|
77
|
+
// Every subscription still open, so unmount can sweep them all. A `Set` of
|
|
78
|
+
// the `Unsubscribe` closures themselves (not tokens/ids): each closure
|
|
79
|
+
// removes itself from this set on its own first call, so an early
|
|
80
|
+
// caller-initiated unsubscribe and the unmount sweep can never double-run
|
|
81
|
+
// the same teardown.
|
|
82
|
+
const openRef = useRef<Set<Unsubscribe>>(new Set());
|
|
83
|
+
|
|
84
|
+
const subscribe = useCallback(
|
|
85
|
+
(topic: string, onValue: (value: unknown) => void): Unsubscribe => {
|
|
86
|
+
const currentClient = clientRef.current;
|
|
87
|
+
if (!currentClient) return () => {};
|
|
88
|
+
const unsubscribeFromClient = currentClient.subscribe(topic, onValue);
|
|
89
|
+
let unsubscribed = false;
|
|
90
|
+
const unsubscribe: Unsubscribe = () => {
|
|
91
|
+
if (unsubscribed) return;
|
|
92
|
+
unsubscribed = true;
|
|
93
|
+
unsubscribeFromClient();
|
|
94
|
+
openRef.current.delete(unsubscribe);
|
|
95
|
+
};
|
|
96
|
+
openRef.current.add(unsubscribe);
|
|
97
|
+
return unsubscribe;
|
|
98
|
+
},
|
|
99
|
+
[],
|
|
100
|
+
) as LateTelemetrySubscribe;
|
|
101
|
+
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
const open = openRef.current;
|
|
104
|
+
return () => {
|
|
105
|
+
for (const unsubscribe of open) unsubscribe();
|
|
106
|
+
open.clear();
|
|
107
|
+
};
|
|
108
|
+
}, []);
|
|
109
|
+
|
|
110
|
+
return subscribe;
|
|
111
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useViewClockOptional } from "./context";
|
|
2
|
+
import {
|
|
3
|
+
type OrbitTrajectory,
|
|
4
|
+
type OrbitTrajectoryInput,
|
|
5
|
+
orbitTrajectory,
|
|
6
|
+
} from "./orbit-trajectory";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* How the craft's path may be drawn at the instant on screen, for a
|
|
10
|
+
* `vessel.orbit` value you have already read.
|
|
11
|
+
*
|
|
12
|
+
* Pass the whole payload, horizon included: the horizon says how far ahead the
|
|
13
|
+
* elements hold, and the answer will not reach past it. You decide which
|
|
14
|
+
* reading counts as the craft's orbit (observed only, or a modelled one too),
|
|
15
|
+
* and the hook does not subscribe to anything itself.
|
|
16
|
+
*
|
|
17
|
+
* The view instant is read when your widget renders, not on every frame, so the
|
|
18
|
+
* answer moves with your own telemetry.
|
|
19
|
+
*
|
|
20
|
+
* `null` means the question could not be put: no elements yet, or no clock. It
|
|
21
|
+
* is not a refusal, which arrives as a `withheld` answer carrying its reason, so
|
|
22
|
+
* do not render the two alike.
|
|
23
|
+
*
|
|
24
|
+
* `readFrame` asks for the curve in a frame of your choosing, which changes
|
|
25
|
+
* nothing in the game. Omit it for the frame it was computed in. Either way an
|
|
26
|
+
* arc carries its `frame`, which is what to name beside it.
|
|
27
|
+
*
|
|
28
|
+
* @category Frames of reference
|
|
29
|
+
*/
|
|
30
|
+
export function useOrbitTrajectory(
|
|
31
|
+
orbit: OrbitTrajectoryInput["orbit"] | undefined,
|
|
32
|
+
options?: Pick<OrbitTrajectoryInput, "samples" | "readFrame">,
|
|
33
|
+
): OrbitTrajectory | null {
|
|
34
|
+
/*
|
|
35
|
+
* Read non-reactively: every input moves on the store frame anyway (the
|
|
36
|
+
* elements, the horizon, a scrub), so an onFrame subscription would add a
|
|
37
|
+
* 60 Hz re-render of a sampled path, and state updates outside act, for
|
|
38
|
+
* nothing.
|
|
39
|
+
*/
|
|
40
|
+
const clock = useViewClockOptional();
|
|
41
|
+
const viewUt = clock?.viewUt();
|
|
42
|
+
if (orbit === undefined) return null;
|
|
43
|
+
if (viewUt === undefined || !Number.isFinite(viewUt)) return null;
|
|
44
|
+
return orbitTrajectory({
|
|
45
|
+
orbit,
|
|
46
|
+
viewUt,
|
|
47
|
+
samples: options?.samples,
|
|
48
|
+
readFrame: options?.readFrame,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useCallback, useEffect, useSyncExternalStore } from "react";
|
|
2
|
+
import type { Reading } from "../reading";
|
|
3
|
+
import { useTelemetryStoreOptional } from "./context";
|
|
4
|
+
import { processorRuntimeFor } from "./processorEvaluator";
|
|
5
|
+
import type { ProcessorHandle } from "./processors";
|
|
6
|
+
|
|
7
|
+
/** What a processor answers with: a datable reading, or the bare result. */
|
|
8
|
+
export type ProcessorResult<
|
|
9
|
+
Result,
|
|
10
|
+
Carried extends boolean,
|
|
11
|
+
> = Carried extends true ? Reading<Result> : Result;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Reactively read a Processor's current, frame-memoised value: the augment-side
|
|
15
|
+
* consumption form, a hook wrapper around
|
|
16
|
+
* the same evaluator a Contribution's compute() pulls from directly via a
|
|
17
|
+
* ProcessorHandle dep (Task 3.5). Activates the processor for the life of the
|
|
18
|
+
* calling component (ref-counted, so N widgets reading the same processor
|
|
19
|
+
* share one evaluation) and deactivates on unmount.
|
|
20
|
+
*
|
|
21
|
+
* The value is there from the mount: the processor is evaluated against the
|
|
22
|
+
* nearest provider's store, at its current frame as it activates, then again
|
|
23
|
+
* on every frame boundary. Degrades to undefined with no TelemetryProvider
|
|
24
|
+
* mounted, matching every other useStream-family hook's disconnected contract.
|
|
25
|
+
*
|
|
26
|
+
* ## What comes back says how current it is, where the derivation can know
|
|
27
|
+
*
|
|
28
|
+
* A processor whose own deps include a reading answers a `Reading<Result>`: its
|
|
29
|
+
* inputs carried currency, so its answer is datable and says so. One depending
|
|
30
|
+
* only on raw topic ids answers the bare `Result` it always did, because there is
|
|
31
|
+
* nothing to date it by.
|
|
32
|
+
*
|
|
33
|
+
* Which of the two is decided by the dep list and read off the handle, so a
|
|
34
|
+
* processor that gains or loses a reading dep changes its consumers' TYPES
|
|
35
|
+
* rather than changing what they receive behind their backs.
|
|
36
|
+
*/
|
|
37
|
+
export function useProcessor<Result, Carried extends boolean>(
|
|
38
|
+
handle: ProcessorHandle<Result, string, Carried>,
|
|
39
|
+
): ProcessorResult<Result, Carried> | undefined {
|
|
40
|
+
const store = useTelemetryStoreOptional();
|
|
41
|
+
const runtime = store ? processorRuntimeFor(store) : undefined;
|
|
42
|
+
|
|
43
|
+
useEffect(() => runtime?.activate(handle.id), [runtime, handle.id]);
|
|
44
|
+
|
|
45
|
+
const subscribe = useCallback(
|
|
46
|
+
(onChange: () => void) =>
|
|
47
|
+
runtime ? runtime.subscribe(handle.id, onChange) : () => {},
|
|
48
|
+
[runtime, handle.id],
|
|
49
|
+
);
|
|
50
|
+
const getSnapshot = useCallback(
|
|
51
|
+
() => runtime?.value<ProcessorResult<Result, Carried>>(handle.id),
|
|
52
|
+
[runtime, handle.id],
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return useSyncExternalStore(subscribe, getSnapshot);
|
|
56
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
type CommsDelayLike,
|
|
4
|
+
currentMode,
|
|
5
|
+
type DelayMode,
|
|
6
|
+
deriveInFlight,
|
|
7
|
+
type InFlightCommand,
|
|
8
|
+
latchForward,
|
|
9
|
+
type PendingEntry,
|
|
10
|
+
} from "../command-delay";
|
|
11
|
+
import { useUtNow } from "./context";
|
|
12
|
+
import { useLatestValue } from "./use-stream";
|
|
13
|
+
|
|
14
|
+
/** Structural subset of the `PendingUplinkQueue` wire payload this hook reads. */
|
|
15
|
+
export interface PendingUplinkQueueLike {
|
|
16
|
+
pending: PendingEntry[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UseRouteCommandsResult {
|
|
20
|
+
items: InFlightCommand[];
|
|
21
|
+
mode: DelayMode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Cross-origin route reader: every currently-pending command addressed to
|
|
26
|
+
* `topic` (e.g. `kos/7`), regardless of which command centre dispatched it
|
|
27
|
+
* (`PendingUplink.vantage`): the one thing `useCommand`'s own-dispatch
|
|
28
|
+
* memory can't see. Queue-only, no memory of its own: an entry that ages
|
|
29
|
+
* out of `system.uplink.pending` simply stops appearing here (a caller that
|
|
30
|
+
* needs failure detection after age-out wants `useCommand`'s `inFlight`
|
|
31
|
+
* instead, for its OWN dispatches).
|
|
32
|
+
*
|
|
33
|
+
* Reads `system.uplink.pending` (real-time command-centre bookkeeping) and
|
|
34
|
+
* `comms.delay` (a Delayed readout, read off the wire rather than through the
|
|
35
|
+
* horizon it sizes) via `useLatestValue`, and
|
|
36
|
+
* `nowUt` via `useUtNow`: the same real-time clock reads the kOS terminal's
|
|
37
|
+
* original hand-rolled strip used, for the same reason (see `useLatestValue`'s
|
|
38
|
+
* own doc). `latchForward` guards the returned phases against a transient
|
|
39
|
+
* `nowUt` judder.
|
|
40
|
+
*/
|
|
41
|
+
export function useRouteCommands(topic: string): UseRouteCommandsResult {
|
|
42
|
+
const queue = useLatestValue<PendingUplinkQueueLike>("system.uplink.pending");
|
|
43
|
+
const commsDelay = useLatestValue<CommsDelayLike>("comms.delay");
|
|
44
|
+
const nowUt = useUtNow() ?? 0;
|
|
45
|
+
const latchMemory = useRef<Map<string, InFlightCommand>>(new Map());
|
|
46
|
+
|
|
47
|
+
const entries = (queue?.pending ?? []).filter(
|
|
48
|
+
(entry) => entry.topic === topic,
|
|
49
|
+
);
|
|
50
|
+
const items = latchForward(
|
|
51
|
+
deriveInFlight(entries, nowUt),
|
|
52
|
+
latchMemory.current,
|
|
53
|
+
);
|
|
54
|
+
const mode = currentMode(commsDelay);
|
|
55
|
+
|
|
56
|
+
return { items, mode };
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
2
|
+
import { useTelemetryClientOptional } from "./context";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The selected command-centre vantage (Plan 3), reactively: the component
|
|
6
|
+
* re-renders when `client.setVantage` changes it, so a widget can reflect
|
|
7
|
+
* "viewing from: <centre>" without owning the selection itself.
|
|
8
|
+
*
|
|
9
|
+
* `undefined` until the client chooses a centre, and when no
|
|
10
|
+
* `TelemetryProvider` is mounted. Until then the mod has put the connection at
|
|
11
|
+
* the home command, which only the mod can name: pair this with
|
|
12
|
+
* `useObservedVantage` to learn where that is.
|
|
13
|
+
*/
|
|
14
|
+
export function useSelectedVantage(): string | undefined {
|
|
15
|
+
const client = useTelemetryClientOptional();
|
|
16
|
+
const subscribe = useCallback(
|
|
17
|
+
(onChange: () => void) =>
|
|
18
|
+
client ? client.onSelectedVantageChange(onChange) : () => {},
|
|
19
|
+
[client],
|
|
20
|
+
);
|
|
21
|
+
const getSnapshot = useCallback(() => client?.selectedVantage, [client]);
|
|
22
|
+
return useSyncExternalStore(subscribe, getSnapshot);
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { useTelemetryClientOptional } from "./context";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Fires `handler` for each discrete event delivered on `topic`, the
|
|
6
|
+
* consumption side of a `ReliableOrdered` channel (e.g. `crash.lastCrash`),
|
|
7
|
+
* where every frame the server publishes is delivered in order and none is
|
|
8
|
+
* coalesced away. Where `useStream` reads the sticky latest VALUE of a state
|
|
9
|
+
* topic and re-renders, this hook reacts to each ARRIVAL: the natural shape for
|
|
10
|
+
* a widget that must do something once per event (raise a crash alarm, push a
|
|
11
|
+
* notification, log a mission line) rather than render a current reading.
|
|
12
|
+
*
|
|
13
|
+
* Subscribes straight through the `TelemetryClient` rather than the
|
|
14
|
+
* `TimelineStore`/frame path `useStream` uses: the store coalesces ingests to
|
|
15
|
+
* one `beginFrame()` per animation frame, which would drop the second of two
|
|
16
|
+
* events landing in the same tick: exactly the coalescing the reliable lane
|
|
17
|
+
* exists to prevent. The client's per-topic fan-out delivers every
|
|
18
|
+
* `stream-data` frame individually, so a burst of events each fire the handler.
|
|
19
|
+
*
|
|
20
|
+
* The sticky last value the client replays synchronously on subscribe is NOT
|
|
21
|
+
* treated as an event: it is the already-seen latest, so a widget mounting
|
|
22
|
+
* after a crash does not re-raise the alarm for it (and remounts, StrictMode,
|
|
23
|
+
* a layout change; never re-fire). Only frames arriving after subscription
|
|
24
|
+
* count. A widget that instead wants to RENDER the last event should read it
|
|
25
|
+
* with `useStream(topic)`.
|
|
26
|
+
*
|
|
27
|
+
* `handler` may change identity every render without re-subscribing, the
|
|
28
|
+
* latest one is always called (held in a ref), so callers need not memoize it.
|
|
29
|
+
*/
|
|
30
|
+
export function useStreamEvent<Payload>(
|
|
31
|
+
topic: string,
|
|
32
|
+
handler: (payload: Payload) => void,
|
|
33
|
+
): void {
|
|
34
|
+
// Degrade to a no-op when no `TelemetryProvider` is mounted (disconnected),
|
|
35
|
+
// same `*Optional` contract as `useStream`/`useTelemetry`.
|
|
36
|
+
const client = useTelemetryClientOptional();
|
|
37
|
+
const handlerRef = useRef(handler);
|
|
38
|
+
handlerRef.current = handler;
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!client) return;
|
|
42
|
+
// `client.subscribe` replays the sticky last value synchronously, inside
|
|
43
|
+
// this call: flag that window so the replay is skipped and only genuinely
|
|
44
|
+
// new deliveries (which arrive on a later tick, with `replayingSticky`
|
|
45
|
+
// already cleared) reach the handler.
|
|
46
|
+
let replayingSticky = true;
|
|
47
|
+
const unsubscribe = client.subscribe(topic, (payload) => {
|
|
48
|
+
if (replayingSticky) return;
|
|
49
|
+
handlerRef.current(payload as Payload);
|
|
50
|
+
});
|
|
51
|
+
replayingSticky = false;
|
|
52
|
+
return unsubscribe;
|
|
53
|
+
}, [client, topic]);
|
|
54
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
2
|
+
import { type TopicReading, topicReading } from "../reading";
|
|
3
|
+
import {
|
|
4
|
+
useTelemetryClientOptional,
|
|
5
|
+
useTelemetryStoreOptional,
|
|
6
|
+
} from "./context";
|
|
7
|
+
import { useClaimCapability } from "./lock-scope";
|
|
8
|
+
import { subscribeTopicRead } from "./subscribe-read";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Reactively reads `topic`, raw OR derived, as a {@link TopicReading}: the
|
|
12
|
+
* latest value AND how current it is, from the `TimelineStore` supplied
|
|
13
|
+
* (indirectly, via `TelemetryProvider`'s auto-built default) by the nearest
|
|
14
|
+
* `TelemetryProvider`.
|
|
15
|
+
*
|
|
16
|
+
* A reading rather than the bare payload because the payload outlives the
|
|
17
|
+
* data: the store keeps the last sample after a topic stops arriving, so a bare
|
|
18
|
+
* read goes on handing a widget a confident figure the link has stopped
|
|
19
|
+
* vouching for. The reading makes the caller branch first, exactly as
|
|
20
|
+
* `useTelemetry` does for a typed Topic: `observed` is current, `held` is the
|
|
21
|
+
* last real observation held (with its instant and grade), and `pending`,
|
|
22
|
+
* `unowned` and `absent` carry no value at all. A derived channel computes its
|
|
23
|
+
* own currency from its inputs, so its reading is as honest as a raw one.
|
|
24
|
+
*
|
|
25
|
+
* It goes through `store.sampleReading(topic, store.currentFrame())`, never
|
|
26
|
+
* `client.getValue(topic)`. `getValue` only ever sees raw `stream-data` frames
|
|
27
|
+
* whose `topic` matches literally, so it is permanently `undefined` for a
|
|
28
|
+
* derived topic like `system.state.bodyCount`: no server channel ever sends
|
|
29
|
+
* that literal topic string. The store resolves BOTH kinds transparently.
|
|
30
|
+
*
|
|
31
|
+
* `subscribe` does two things, both required for a DERIVED topic to ever
|
|
32
|
+
* actually receive data:
|
|
33
|
+
* - **Everything the read needs held up** (`subscribeTopicRead`): every RAW
|
|
34
|
+
* input topic `topic` transitively depends on (itself, for an ordinary raw
|
|
35
|
+
* topic) plus the deps its elected reckoner declared, ref-counted through
|
|
36
|
+
* `client.subscribe`, redirected to the topics the server actually
|
|
37
|
+
* understands instead of the derived topic name. That seam is shared with
|
|
38
|
+
* every other read path in the tree; see its doc for why the reckoner half
|
|
39
|
+
* belongs there.
|
|
40
|
+
* - **Frame-driven reactivity** (`store.subscribeFrame`): re-renders on every
|
|
41
|
+
* frame the provider mints, not on a raw per-topic callback, since a derived
|
|
42
|
+
* value can change from an ingest on any of several input topics.
|
|
43
|
+
*
|
|
44
|
+
* `sampleReading` keeps a reading's identity while its point, status and epoch
|
|
45
|
+
* are unchanged, so `useSyncExternalStore` bails out of re-rendering when
|
|
46
|
+
* nothing relevant to `topic` changed.
|
|
47
|
+
*
|
|
48
|
+
* `pending` with no provider mounted (disconnected, or the frame before
|
|
49
|
+
* `SitrepTelemetryProvider`'s client is built), so a stream widget renders an
|
|
50
|
+
* empty state instead of throwing.
|
|
51
|
+
*/
|
|
52
|
+
export function useStream<Payload>(topic: string): TopicReading<Payload> {
|
|
53
|
+
const client = useTelemetryClientOptional();
|
|
54
|
+
const store = useTelemetryStoreOptional();
|
|
55
|
+
useClaimCapability("topic", topic);
|
|
56
|
+
|
|
57
|
+
const subscribe = useCallback(
|
|
58
|
+
(onStoreChange: () => void) => {
|
|
59
|
+
if (!client || !store) return () => {};
|
|
60
|
+
const releaseInputs = subscribeTopicRead(client, store, topic);
|
|
61
|
+
const unsubscribeFrame = store.subscribeFrame(onStoreChange);
|
|
62
|
+
return () => {
|
|
63
|
+
unsubscribeFrame();
|
|
64
|
+
releaseInputs();
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
[client, store, topic],
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const getSnapshot = useCallback((): TopicReading<Payload> => {
|
|
71
|
+
if (!store) return NO_PROVIDER as TopicReading<Payload>;
|
|
72
|
+
return store.sampleReading<Payload>(topic, store.currentFrame());
|
|
73
|
+
}, [store, topic]);
|
|
74
|
+
|
|
75
|
+
return useSyncExternalStore(subscribe, getSnapshot);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* One shared `pending` for the no-provider path: a fresh object per call would
|
|
80
|
+
* fail `useSyncExternalStore`'s reference comparison and loop.
|
|
81
|
+
*/
|
|
82
|
+
const NO_PROVIDER = topicReading<never>({
|
|
83
|
+
state: "pending",
|
|
84
|
+
reckoning: { status: "none" },
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Reactively reads the latest RAW value for `topic` straight off
|
|
89
|
+
* `TelemetryClient`: `client.getValue(topic)`, kept live via
|
|
90
|
+
* `client.subscribe`: bypassing the delayed/certainty-gated `TimelineStore`
|
|
91
|
+
* frame `useStream` samples through.
|
|
92
|
+
*
|
|
93
|
+
* `useStream` is correct for delayed CRAFT telemetry: it deliberately shows
|
|
94
|
+
* only what the view clock's certainty horizon has reached, so a widget
|
|
95
|
+
* counting down against delayed data stays in step with that same delay.
|
|
96
|
+
* But some topics are command-centre REAL-time bookkeeping, not delayed
|
|
97
|
+
* craft telemetry: `system.uplink.pending` (dispatch timestamps stamped
|
|
98
|
+
* the instant a command leaves the ground station) and `system.uplink.gates`
|
|
99
|
+
* are the current examples. Sampling those through the delayed
|
|
100
|
+
* frame makes them appear (and clear) a whole one-way-delay late; this hook
|
|
101
|
+
* is the fix, it reads the client's sticky last value directly, the same
|
|
102
|
+
* "arrived on the wire, available now" semantics `client.subscribe` already
|
|
103
|
+
* gives a non-React caller.
|
|
104
|
+
*
|
|
105
|
+
* `comms.delay` and `comms.path` are read through here too, and no longer
|
|
106
|
+
* because they are real-time: both are Delayed channels now, so the wire has
|
|
107
|
+
* already held them for a light-time and this hook shows each one the moment it
|
|
108
|
+
* lands rather than any earlier. What it still buys them is independence from
|
|
109
|
+
* the certainty horizon, which matters because `comms.delay` is what sizes that
|
|
110
|
+
* horizon: reading it through the gated frame would ask the view clock for a
|
|
111
|
+
* value the view clock is waiting on.
|
|
112
|
+
*
|
|
113
|
+
* No derived-topic support (unlike `useStream`): `client.getValue` only
|
|
114
|
+
* ever sees raw `stream-data` frames whose `topic` matches literally, so
|
|
115
|
+
* this hook is for raw command-centre topics only, never a derived channel.
|
|
116
|
+
*
|
|
117
|
+
* Degrades to `undefined` with no `TelemetryProvider` mounted, or before
|
|
118
|
+
* anything has arrived for `topic`.
|
|
119
|
+
*/
|
|
120
|
+
export function useLatestValue<Payload>(topic: string): Payload | undefined {
|
|
121
|
+
const client = useTelemetryClientOptional();
|
|
122
|
+
|
|
123
|
+
const subscribe = useCallback(
|
|
124
|
+
(onStoreChange: () => void) => {
|
|
125
|
+
if (!client) return () => {};
|
|
126
|
+
return client.subscribe(topic, onStoreChange);
|
|
127
|
+
},
|
|
128
|
+
[client, topic],
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
const getSnapshot = useCallback((): Payload | undefined => {
|
|
132
|
+
if (!client) return undefined;
|
|
133
|
+
return client.getValue(topic) as Payload | undefined;
|
|
134
|
+
}, [client, topic]);
|
|
135
|
+
|
|
136
|
+
return useSyncExternalStore(subscribe, getSnapshot);
|
|
137
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
ReckonableReading,
|
|
4
|
+
TopicReading,
|
|
5
|
+
UnmodelledReading,
|
|
6
|
+
} from "../reading";
|
|
7
|
+
import { topicReading } from "../reading";
|
|
8
|
+
import type { ReckonableFields, ReckonableTopic } from "../reckonability";
|
|
9
|
+
import type { TopicId, TopicPayload } from "../topics";
|
|
10
|
+
import {
|
|
11
|
+
useTelemetryClientOptional,
|
|
12
|
+
useTelemetryStoreOptional,
|
|
13
|
+
} from "./context";
|
|
14
|
+
import { useClaimCapability } from "./lock-scope";
|
|
15
|
+
import type { NeverReckonable } from "./never-reckonable";
|
|
16
|
+
import { subscribeTopicRead } from "./subscribe-read";
|
|
17
|
+
import { useTelemetrySubscriberLabel } from "./subscriber-identity";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* One shared `pending` for the no-provider path. A fresh object per
|
|
21
|
+
* call would fail `useSyncExternalStore`'s reference comparison and loop.
|
|
22
|
+
*/
|
|
23
|
+
const NO_PROVIDER = topicReading<never>({
|
|
24
|
+
state: "pending",
|
|
25
|
+
reckoning: { status: "none" },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Subscribe to a live value. The canonical telemetry read hook of the Uplink
|
|
30
|
+
* architecture, keyed by a typed `TopicId`: it reads that Topic straight off
|
|
31
|
+
* the mounted `TimelineStore` and answers with the Topic's `Reading`.
|
|
32
|
+
*
|
|
33
|
+
* const orbit = useTelemetry("vessel.orbit");
|
|
34
|
+
*
|
|
35
|
+
* A read with no `TelemetryProvider` mounted answers `pending`. A Topic with no
|
|
36
|
+
* `TopicId` member (a per-subject dynamic namespace such as
|
|
37
|
+
* `vessel.partActions.<flightId>`) is read with `useStream` instead.
|
|
38
|
+
*
|
|
39
|
+
* ## Why the reading and not the payload
|
|
40
|
+
*
|
|
41
|
+
* `Reading`'s whole justification is that "reaching a value at all requires
|
|
42
|
+
* branching on how current it is". There is no way to reach a value without
|
|
43
|
+
* confronting its currency, because the only hook that hands one over makes
|
|
44
|
+
* you write the discriminant first.
|
|
45
|
+
*
|
|
46
|
+
* For a topic in `NEVER_RECKONABLE` the return narrows to `UnmodelledReading`,
|
|
47
|
+
* which drops every `reckoning: "available"` member, so a caller cannot write a
|
|
48
|
+
* branch for a case that can never occur. Reckonability is a SECOND
|
|
49
|
+
* discriminant rather than an arm of `state`, so nothing is dropped from
|
|
50
|
+
* `state` itself: `held` remains, and remains the judgement.
|
|
51
|
+
*
|
|
52
|
+
* ## The three-way narrowing, and why the marked arm is not simply `Reading`
|
|
53
|
+
*
|
|
54
|
+
* A topic the CONTRACT declares reckonable answers with `ReckonableReading`,
|
|
55
|
+
* whose `reckoned` is `Pick<payload, the declared fields>` rather than the whole
|
|
56
|
+
* payload. That is the point of declaring per value: `vessel.flight` carries an
|
|
57
|
+
* altitude a conic advances beside a `situation` the game switches, and reading
|
|
58
|
+
* the second off a modelled value is a mistake the projection makes impossible
|
|
59
|
+
* rather than merely documented.
|
|
60
|
+
*
|
|
61
|
+
* It is deliberately NOT assignable to `TopicReading<payload>`, so a call site that
|
|
62
|
+
* hands one to a helper typed for the whole payload stops compiling. The overlay
|
|
63
|
+
* is `{ ...reading.value, ...reading.reckoning.value }`, written where it happens
|
|
64
|
+
* because that spread IS the judgement.
|
|
65
|
+
*
|
|
66
|
+
* The three arms are exclusive by construction: a marked topic in
|
|
67
|
+
* `NEVER_RECKONABLE` is a contradiction, and `never-reckonable.test.ts` fails on
|
|
68
|
+
* it, so the order the conditional tests them in cannot be load-bearing.
|
|
69
|
+
*
|
|
70
|
+
* ## Why there are THREE arms and not the two the design asked for
|
|
71
|
+
*
|
|
72
|
+
* The design said two: `ReckonableReading` where a model exists, plain
|
|
73
|
+
* `Reading` with no `reckoned` member anywhere else. The middle arm is what
|
|
74
|
+
* survives of the second half, and it keeps the whole-payload `reckoned` for the
|
|
75
|
+
* population the CONTRACT cannot speak for.
|
|
76
|
+
*
|
|
77
|
+
* That is an UPLINK-registered model: `registerReckoner` is keyed by topic
|
|
78
|
+
* string, and an Uplink's own contract slice has no reckonability emission of its own yet (see
|
|
79
|
+
* `RtConfig.EmitReckonability`), so a model it registers on a wire topic has
|
|
80
|
+
* nowhere but this arm to land.
|
|
81
|
+
*
|
|
82
|
+
* The cost is honest and worth stating: 35 wire topics fall here today, each
|
|
83
|
+
* typed with a `reckoned` covering the WHOLE payload, and for each of them core
|
|
84
|
+
* registers nothing, so the arm is reachable only if someone registers a model.
|
|
85
|
+
* Narrowing them to `UnmodelledReading` would type away the Uplink seam, which
|
|
86
|
+
* is the one thing the middle arm is holding open.
|
|
87
|
+
*
|
|
88
|
+
* ## The compile break does NOT always happen, and this is the trap
|
|
89
|
+
*
|
|
90
|
+
* Passing this hook's result straight into something that wants the PAYLOAD is
|
|
91
|
+
* meant to be a type error, and usually is. It is not when the payload type has
|
|
92
|
+
* every field optional, which most generated Uplink payloads do: a `Reading` is
|
|
93
|
+
* then structurally assignable to it, so `<Widget weather={useTelemetry(...)} />`
|
|
94
|
+
* typechecks and hands the widget an object carrying none of its fields.
|
|
95
|
+
*
|
|
96
|
+
* That is not hypothetical. An Uplink's radiation-trend test drove a "live
|
|
97
|
+
* trend" off two samples that measured nothing, for exactly this reason, and
|
|
98
|
+
* passed for as long as the widget rendered absence as zero. Unwrap the
|
|
99
|
+
* discriminant, even where the compiler does not force you to.
|
|
100
|
+
*/
|
|
101
|
+
export function useTelemetry<Topic extends TopicId>(
|
|
102
|
+
topic: Topic,
|
|
103
|
+
): Topic extends ReckonableTopic
|
|
104
|
+
? ReckonableReading<
|
|
105
|
+
TopicPayload<Topic>,
|
|
106
|
+
ReckonableFields<Topic> & keyof TopicPayload<Topic>
|
|
107
|
+
>
|
|
108
|
+
: Topic extends NeverReckonable
|
|
109
|
+
? UnmodelledReading<TopicPayload<Topic>>
|
|
110
|
+
: TopicReading<TopicPayload<Topic>>;
|
|
111
|
+
|
|
112
|
+
export function useTelemetry(topic: TopicId): unknown {
|
|
113
|
+
const client = useTelemetryClientOptional();
|
|
114
|
+
const store = useTelemetryStoreOptional();
|
|
115
|
+
useClaimCapability("topic", topic);
|
|
116
|
+
|
|
117
|
+
// Diagnostics only: which widget this read belongs to, so a topic nothing publishes can be reported with the name of the thing that asked for it.
|
|
118
|
+
const subscriberLabel = useTelemetrySubscriberLabel();
|
|
119
|
+
const subscribeStream = useCallback(
|
|
120
|
+
(onStoreChange: () => void) => {
|
|
121
|
+
if (!client || !store) return () => {};
|
|
122
|
+
const releaseInputs = subscribeTopicRead(
|
|
123
|
+
client,
|
|
124
|
+
store,
|
|
125
|
+
topic,
|
|
126
|
+
subscriberLabel,
|
|
127
|
+
);
|
|
128
|
+
const unsubscribeFrame = store.subscribeFrame(onStoreChange);
|
|
129
|
+
return () => {
|
|
130
|
+
unsubscribeFrame();
|
|
131
|
+
releaseInputs();
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
[client, store, topic, subscriberLabel],
|
|
135
|
+
);
|
|
136
|
+
// `sampleReading` memoizes on the store's per-frame cache, and `useSyncExternalStore` compares snapshots by reference, so a fresh object per call would loop.
|
|
137
|
+
const getStreamSnapshot = useCallback(() => {
|
|
138
|
+
if (!client || !store) return NO_PROVIDER;
|
|
139
|
+
return store.sampleReading(topic, store.currentFrame());
|
|
140
|
+
}, [client, store, topic]);
|
|
141
|
+
return useSyncExternalStore(subscribeStream, getStreamSnapshot);
|
|
142
|
+
}
|