@ksp-gonogo/sitrep-sdk 1.0.0-rc.21 → 2.0.0-rc.23
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/README.md +6 -0
- package/dist/__generated__/command-map.d.ts +140 -11
- package/dist/__generated__/command-map.d.ts.map +1 -1
- package/dist/__generated__/command-map.js +6 -3
- package/dist/__generated__/command-map.js.map +1 -1
- package/dist/__generated__/contract.d.ts +591 -425
- package/dist/__generated__/contract.d.ts.map +1 -1
- package/dist/__generated__/contract.js +34 -4
- package/dist/__generated__/contract.js.map +1 -1
- package/dist/__generated__/error-codes.d.ts +46 -55
- package/dist/__generated__/error-codes.d.ts.map +1 -1
- package/dist/__generated__/error-codes.js +76 -69
- package/dist/__generated__/error-codes.js.map +1 -1
- package/dist/__generated__/test-theme.d.ts +3 -0
- package/dist/__generated__/test-theme.d.ts.map +1 -1
- package/dist/__generated__/test-theme.js +3 -0
- package/dist/__generated__/test-theme.js.map +1 -1
- package/dist/__generated__/topic-map.d.ts +90 -2
- package/dist/__generated__/topic-map.d.ts.map +1 -1
- package/dist/__generated__/topic-map.js +2 -0
- package/dist/__generated__/topic-map.js.map +1 -1
- package/dist/__generated__/units.d.ts.map +1 -1
- package/dist/__generated__/units.js +89 -47
- package/dist/__generated__/units.js.map +1 -1
- package/dist/api/alarm-request.d.ts +6 -1
- package/dist/api/alarm-request.d.ts.map +1 -1
- package/dist/api/alarm-request.js +7 -1
- package/dist/api/alarm-request.js.map +1 -1
- package/dist/api/contribution-slots.d.ts +87 -17
- package/dist/api/contribution-slots.d.ts.map +1 -1
- package/dist/api/coverage/CoverageMaskCache.d.ts +1 -1
- package/dist/api/coverage/CoverageMaskCache.js +1 -1
- package/dist/api/coverage-source.d.ts +3 -1
- package/dist/api/coverage-source.d.ts.map +1 -1
- package/dist/api/coverage-source.js +3 -1
- package/dist/api/coverage-source.js.map +1 -1
- package/dist/api/framework-reads.d.ts +20 -0
- package/dist/api/framework-reads.d.ts.map +1 -0
- package/dist/api/framework-reads.js +30 -0
- package/dist/api/framework-reads.js.map +1 -0
- package/dist/api/host.d.ts +8 -5
- package/dist/api/host.d.ts.map +1 -1
- package/dist/api/host.js.map +1 -1
- package/dist/api/index.d.ts +96 -17
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +91 -10
- package/dist/api/index.js.map +1 -1
- package/dist/api/logger.d.ts +14 -2
- package/dist/api/logger.d.ts.map +1 -1
- package/dist/api/logger.js +14 -2
- package/dist/api/logger.js.map +1 -1
- package/dist/api/plot-layers.d.ts +81 -6
- package/dist/api/plot-layers.d.ts.map +1 -1
- package/dist/api/plot-layers.js +4 -3
- package/dist/api/plot-layers.js.map +1 -1
- package/dist/api/plots.d.ts +19 -0
- package/dist/api/plots.d.ts.map +1 -1
- package/dist/api/registry.d.ts +11 -0
- package/dist/api/registry.d.ts.map +1 -1
- package/dist/api/registry.js.map +1 -1
- package/dist/api/settings/SettingsContext.d.ts +5 -4
- package/dist/api/settings/SettingsContext.d.ts.map +1 -1
- package/dist/api/settings/SettingsContext.js +13 -4
- package/dist/api/settings/SettingsContext.js.map +1 -1
- package/dist/api/settings/SettingsService.d.ts +3 -0
- package/dist/api/settings/SettingsService.d.ts.map +1 -1
- package/dist/api/settings/SettingsService.js +3 -0
- package/dist/api/settings/SettingsService.js.map +1 -1
- package/dist/api/settings/store.d.ts +3 -1
- package/dist/api/settings/store.d.ts.map +1 -1
- package/dist/api/settings/store.js +3 -1
- package/dist/api/settings/store.js.map +1 -1
- package/dist/api/slots.d.ts +94 -17
- package/dist/api/slots.d.ts.map +1 -1
- package/dist/api/station-brokers.d.ts +2 -1
- package/dist/api/station-brokers.d.ts.map +1 -1
- package/dist/api/station-brokers.js +2 -1
- package/dist/api/station-brokers.js.map +1 -1
- package/dist/api/stock-bodies.d.ts.map +1 -1
- package/dist/api/stock-bodies.js +6 -0
- package/dist/api/stock-bodies.js.map +1 -1
- package/dist/api/tiny-size.d.ts +2 -0
- package/dist/api/tiny-size.d.ts.map +1 -1
- package/dist/api/tiny-size.js +6 -1
- package/dist/api/tiny-size.js.map +1 -1
- package/dist/api/tone.d.ts +7 -4
- package/dist/api/tone.d.ts.map +1 -1
- package/dist/api/tone.js.map +1 -1
- package/dist/api/transport.d.ts +10 -2
- package/dist/api/transport.d.ts.map +1 -1
- package/dist/api/types.d.ts +179 -120
- package/dist/api/types.d.ts.map +1 -1
- package/dist/binary-frame.d.ts +26 -25
- package/dist/binary-frame.d.ts.map +1 -1
- package/dist/binary-frame.js +25 -25
- package/dist/binary-frame.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/combine-readings.d.ts +8 -4
- package/dist/combine-readings.d.ts.map +1 -1
- package/dist/combine-readings.js +6 -4
- package/dist/combine-readings.js.map +1 -1
- package/dist/command-delay.d.ts +6 -0
- package/dist/command-delay.d.ts.map +1 -1
- package/dist/command-delay.js.map +1 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/compat-versions.d.ts +1 -1
- package/dist/compat-versions.d.ts.map +1 -1
- package/dist/compat-versions.js +2 -2
- package/dist/compat-versions.js.map +1 -1
- package/dist/contract-enum-names.d.ts +2 -3
- package/dist/contract-enum-names.d.ts.map +1 -1
- package/dist/contract-enum-names.js +2 -3
- package/dist/contract-enum-names.js.map +1 -1
- package/dist/enum-names.d.ts +5 -3
- package/dist/enum-names.d.ts.map +1 -1
- package/dist/enum-names.js +5 -3
- package/dist/enum-names.js.map +1 -1
- package/dist/envelope.d.ts +3 -3
- package/dist/envelope.d.ts.map +1 -1
- package/dist/flight/BufferedDataSource.d.ts.map +1 -1
- package/dist/flight/BufferedDataSource.js +4 -2
- package/dist/flight/BufferedDataSource.js.map +1 -1
- package/dist/flight/types.d.ts +3 -2
- package/dist/flight/types.d.ts.map +1 -1
- package/dist/frames/index.d.ts +19 -17
- package/dist/frames/index.d.ts.map +1 -1
- package/dist/frames/index.js +13 -12
- package/dist/frames/index.js.map +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/ksp-enum-names.d.ts +23 -8
- package/dist/ksp-enum-names.d.ts.map +1 -1
- package/dist/ksp-enum-names.js +20 -8
- package/dist/ksp-enum-names.js.map +1 -1
- package/dist/media/radio-support.d.ts +12 -3
- package/dist/media/radio-support.d.ts.map +1 -1
- package/dist/media/radio-support.js +12 -3
- package/dist/media/radio-support.js.map +1 -1
- package/dist/perf/PerfBudget.d.ts +7 -5
- package/dist/perf/PerfBudget.d.ts.map +1 -1
- package/dist/perf/PerfBudget.js +8 -6
- package/dist/perf/PerfBudget.js.map +1 -1
- package/dist/reading.d.ts +12 -2
- package/dist/reading.d.ts.map +1 -1
- package/dist/reading.js +7 -2
- package/dist/reading.js.map +1 -1
- package/dist/reads-index.json +3675 -0
- package/dist/spine/body-pose.d.ts +85 -0
- package/dist/spine/body-pose.d.ts.map +1 -0
- package/dist/spine/body-pose.js +166 -0
- package/dist/spine/body-pose.js.map +1 -0
- package/dist/spine/capability-lock.d.ts +6 -2
- package/dist/spine/capability-lock.d.ts.map +1 -1
- package/dist/spine/capability-lock.js +8 -2
- package/dist/spine/capability-lock.js.map +1 -1
- package/dist/spine/catalogue-elements.d.ts +28 -0
- package/dist/spine/catalogue-elements.d.ts.map +1 -0
- package/dist/spine/catalogue-elements.js +63 -0
- package/dist/spine/catalogue-elements.js.map +1 -0
- package/dist/spine/celestial-facts.d.ts +5 -7
- package/dist/spine/celestial-facts.d.ts.map +1 -1
- package/dist/spine/celestial-facts.js +10 -21
- package/dist/spine/celestial-facts.js.map +1 -1
- package/dist/spine/client-timeline.d.ts +10 -12
- package/dist/spine/client-timeline.d.ts.map +1 -1
- package/dist/spine/client-timeline.js.map +1 -1
- package/dist/spine/client.d.ts +31 -0
- package/dist/spine/client.d.ts.map +1 -1
- package/dist/spine/client.js +97 -19
- package/dist/spine/client.js.map +1 -1
- package/dist/spine/command-gate.d.ts +13 -11
- package/dist/spine/command-gate.d.ts.map +1 -1
- package/dist/spine/command-gate.js +2 -2
- package/dist/spine/command-gate.js.map +1 -1
- package/dist/spine/command-group.d.ts +62 -0
- package/dist/spine/command-group.d.ts.map +1 -0
- package/dist/spine/command-group.js +172 -0
- package/dist/spine/command-group.js.map +1 -0
- package/dist/spine/comms-delay-reckoning.js.map +1 -1
- package/dist/spine/comms-journey.d.ts +9 -0
- package/dist/spine/comms-journey.d.ts.map +1 -1
- package/dist/spine/comms-journey.js +27 -0
- package/dist/spine/comms-journey.js.map +1 -1
- package/dist/spine/comms-path-geometry.d.ts +3 -3
- package/dist/spine/comms-path-geometry.d.ts.map +1 -1
- package/dist/spine/comms-path-geometry.js.map +1 -1
- package/dist/spine/connection-error-warning.d.ts +1 -1
- package/dist/spine/connection-error-warning.js +1 -1
- package/dist/spine/context.d.ts.map +1 -1
- package/dist/spine/context.js +4 -0
- package/dist/spine/context.js.map +1 -1
- package/dist/spine/contributions.d.ts +13 -13
- package/dist/spine/contributions.js +13 -13
- package/dist/spine/core-reckoners.d.ts.map +1 -1
- package/dist/spine/core-reckoners.js +2 -2
- package/dist/spine/core-reckoners.js.map +1 -1
- package/dist/spine/held-command-actions.d.ts +3 -0
- package/dist/spine/held-command-actions.d.ts.map +1 -1
- package/dist/spine/held-command-actions.js +12 -7
- package/dist/spine/held-command-actions.js.map +1 -1
- package/dist/spine/impact-point.d.ts.map +1 -1
- package/dist/spine/impact-point.js +6 -29
- package/dist/spine/impact-point.js.map +1 -1
- package/dist/spine/index.d.ts +5 -0
- package/dist/spine/index.d.ts.map +1 -1
- package/dist/spine/index.js +5 -0
- package/dist/spine/index.js.map +1 -1
- package/dist/spine/kepler-reckoning.d.ts +2 -2
- package/dist/spine/kepler-reckoning.d.ts.map +1 -1
- package/dist/spine/kepler-reckoning.js.map +1 -1
- package/dist/spine/kepler.d.ts +8 -6
- package/dist/spine/kepler.d.ts.map +1 -1
- package/dist/spine/kepler.js +3 -1
- package/dist/spine/kepler.js.map +1 -1
- package/dist/spine/lagrange.d.ts +6 -6
- package/dist/spine/lagrange.d.ts.map +1 -1
- package/dist/spine/lagrange.js.map +1 -1
- package/dist/spine/lifecycle.d.ts +14 -0
- package/dist/spine/lifecycle.d.ts.map +1 -1
- package/dist/spine/lifecycle.js.map +1 -1
- package/dist/spine/lock-scope.d.ts +11 -1
- package/dist/spine/lock-scope.d.ts.map +1 -1
- package/dist/spine/lock-scope.js.map +1 -1
- package/dist/spine/map-command.d.ts +3 -11
- package/dist/spine/map-command.d.ts.map +1 -1
- package/dist/spine/map-command.js +3 -11
- package/dist/spine/map-command.js.map +1 -1
- package/dist/spine/mod-settings.d.ts.map +1 -1
- package/dist/spine/mod-settings.js +1 -0
- package/dist/spine/mod-settings.js.map +1 -1
- package/dist/spine/never-reckonable.d.ts.map +1 -1
- package/dist/spine/never-reckonable.js +8 -6
- package/dist/spine/never-reckonable.js.map +1 -1
- package/dist/spine/orbit-patches.d.ts +16 -4
- package/dist/spine/orbit-patches.d.ts.map +1 -1
- package/dist/spine/orbit-patches.js +12 -5
- package/dist/spine/orbit-patches.js.map +1 -1
- package/dist/spine/orbit-trajectory.d.ts +60 -3
- package/dist/spine/orbit-trajectory.d.ts.map +1 -1
- package/dist/spine/orbit-trajectory.js +133 -40
- package/dist/spine/orbit-trajectory.js.map +1 -1
- package/dist/spine/orbital-solve.js +1 -1
- package/dist/spine/own-craft-vantage.d.ts.map +1 -1
- package/dist/spine/own-craft-vantage.js +1 -0
- package/dist/spine/own-craft-vantage.js.map +1 -1
- package/dist/spine/past-track.d.ts +7 -7
- package/dist/spine/past-track.js +7 -7
- package/dist/spine/phase-angle.d.ts +19 -0
- package/dist/spine/phase-angle.d.ts.map +1 -0
- package/dist/spine/phase-angle.js +47 -0
- package/dist/spine/phase-angle.js.map +1 -0
- package/dist/spine/powered-reckoning.js.map +1 -1
- package/dist/spine/processors.d.ts +4 -1
- package/dist/spine/processors.d.ts.map +1 -1
- package/dist/spine/processors.js.map +1 -1
- package/dist/spine/reckoners.d.ts +3 -6
- package/dist/spine/reckoners.d.ts.map +1 -1
- package/dist/spine/reckoners.js +3 -6
- package/dist/spine/reckoners.js.map +1 -1
- package/dist/spine/reference-frame.d.ts +14 -14
- package/dist/spine/reference-frame.d.ts.map +1 -1
- package/dist/spine/reference-frame.js +3 -64
- package/dist/spine/reference-frame.js.map +1 -1
- package/dist/spine/settings-registry.d.ts +17 -9
- package/dist/spine/settings-registry.d.ts.map +1 -1
- package/dist/spine/settings-registry.js.map +1 -1
- package/dist/spine/settings-tabs.d.ts +4 -3
- package/dist/spine/settings-tabs.d.ts.map +1 -1
- package/dist/spine/settings-tabs.js.map +1 -1
- package/dist/spine/target-range-reckoning.d.ts.map +1 -1
- package/dist/spine/target-range-reckoning.js.map +1 -1
- package/dist/spine/timeline-store.d.ts +3 -1
- package/dist/spine/timeline-store.d.ts.map +1 -1
- package/dist/spine/timeline-store.js +2 -2
- package/dist/spine/timeline-store.js.map +1 -1
- package/dist/spine/topic-ownership.d.ts +2 -2
- package/dist/spine/topic-ownership.js +2 -2
- package/dist/spine/uplink-clients.d.ts +4 -4
- package/dist/spine/uplink-clients.d.ts.map +1 -1
- package/dist/spine/uplink-clients.js +1 -0
- package/dist/spine/uplink-clients.js.map +1 -1
- package/dist/spine/use-body-states.d.ts +3 -7
- package/dist/spine/use-body-states.d.ts.map +1 -1
- package/dist/spine/use-body-states.js +3 -7
- package/dist/spine/use-body-states.js.map +1 -1
- package/dist/spine/use-command.d.ts.map +1 -1
- package/dist/spine/use-command.js +151 -109
- package/dist/spine/use-command.js.map +1 -1
- package/dist/spine/use-data-sources.d.ts +2 -5
- package/dist/spine/use-data-sources.d.ts.map +1 -1
- package/dist/spine/use-data-sources.js.map +1 -1
- package/dist/spine/use-late-telemetry-subscribe.d.ts.map +1 -1
- package/dist/spine/use-late-telemetry-subscribe.js +1 -0
- package/dist/spine/use-late-telemetry-subscribe.js.map +1 -1
- package/dist/spine/use-orbit-curve.d.ts +33 -0
- package/dist/spine/use-orbit-curve.d.ts.map +1 -0
- package/dist/spine/use-orbit-curve.js +28 -0
- package/dist/spine/use-orbit-curve.js.map +1 -0
- package/dist/spine/use-orbit-trajectory.d.ts +6 -1
- package/dist/spine/use-orbit-trajectory.d.ts.map +1 -1
- package/dist/spine/use-orbit-trajectory.js +44 -2
- package/dist/spine/use-orbit-trajectory.js.map +1 -1
- package/dist/spine/use-selected-vantage.d.ts.map +1 -1
- package/dist/spine/use-selected-vantage.js +1 -0
- package/dist/spine/use-selected-vantage.js.map +1 -1
- package/dist/spine/use-system-instant.d.ts +16 -0
- package/dist/spine/use-system-instant.d.ts.map +1 -0
- package/dist/spine/use-system-instant.js +20 -0
- package/dist/spine/use-system-instant.js.map +1 -0
- package/dist/spine/use-transmissions.d.ts.map +1 -1
- package/dist/spine/use-transmissions.js +1 -0
- package/dist/spine/use-transmissions.js.map +1 -1
- package/dist/spine/view-clock.d.ts +1 -1
- package/dist/spine/view-clock.d.ts.map +1 -1
- package/dist/spine/view-clock.js +13 -3
- package/dist/spine/view-clock.js.map +1 -1
- package/dist/system-instant.d.ts +16 -0
- package/dist/system-instant.d.ts.map +1 -0
- package/dist/system-instant.js +20 -0
- package/dist/system-instant.js.map +1 -0
- package/dist/testing/console-logger.d.ts +3 -3
- package/dist/testing/console-logger.js +3 -3
- package/dist/testing/fake-wall-clock.d.ts +4 -2
- package/dist/testing/fake-wall-clock.d.ts.map +1 -1
- package/dist/testing/fake-wall-clock.js +4 -2
- package/dist/testing/fake-wall-clock.js.map +1 -1
- package/dist/testing/install-act-gate-stretch.d.ts +9 -0
- package/dist/testing/install-act-gate-stretch.d.ts.map +1 -1
- package/dist/testing/install-act-gate-stretch.js +9 -0
- package/dist/testing/install-act-gate-stretch.js.map +1 -1
- package/dist/testing/install-real-test-host.d.ts +4 -1
- package/dist/testing/install-real-test-host.d.ts.map +1 -1
- package/dist/testing/install-real-test-host.js +2 -0
- package/dist/testing/install-real-test-host.js.map +1 -1
- package/dist/testing/memory-storage.d.ts +2 -3
- package/dist/testing/memory-storage.d.ts.map +1 -1
- package/dist/testing/memory-storage.js +6 -5
- package/dist/testing/memory-storage.js.map +1 -1
- package/dist/testing/mock-data-source.d.ts +2 -2
- package/dist/testing/render.d.ts +4 -2
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/testing/render.js +4 -2
- package/dist/testing/render.js.map +1 -1
- package/dist/testing/stub-transport.d.ts +6 -0
- package/dist/testing/stub-transport.d.ts.map +1 -1
- package/dist/testing/stub-transport.js +64 -52
- package/dist/testing/stub-transport.js.map +1 -1
- package/dist/timeline.d.ts +14 -6
- package/dist/timeline.d.ts.map +1 -1
- package/dist/topic-fields.d.ts +1 -0
- package/dist/topic-fields.d.ts.map +1 -1
- package/dist/topic-fields.js.map +1 -1
- package/dist/topics.d.ts +42 -2
- package/dist/topics.d.ts.map +1 -1
- package/dist/topics.js +33 -24
- package/dist/topics.js.map +1 -1
- package/dist/unit-system/registry.d.ts +11 -0
- package/dist/unit-system/registry.d.ts.map +1 -1
- package/dist/unit-system/registry.js.map +1 -1
- package/dist/unit-system/value.d.ts +3 -0
- package/dist/unit-system/value.d.ts.map +1 -1
- package/dist/unit-system/value.js.map +1 -1
- package/dist/units.js +1 -1
- package/dist/uplink-externals.d.ts +9 -4
- package/dist/uplink-externals.d.ts.map +1 -1
- package/dist/uplink-externals.js +9 -4
- package/dist/uplink-externals.js.map +1 -1
- package/dist/uplink-manifest.d.ts +62 -16
- package/dist/uplink-manifest.d.ts.map +1 -1
- package/dist/uplink-manifest.js.map +1 -1
- package/package.json +4 -3
- package/src/__generated__/command-map.ts +140 -10
- package/src/__generated__/contract.ts +598 -429
- package/src/__generated__/error-codes.ts +76 -69
- package/src/__generated__/test-theme.ts +3 -0
- package/src/__generated__/topic-map.ts +92 -0
- package/src/__generated__/units.json +630 -52
- package/src/__generated__/units.ts +89 -47
- package/src/api/alarm-request.ts +7 -1
- package/src/api/contribution-slots.ts +95 -20
- package/src/api/coverage/CoverageMaskCache.ts +1 -1
- package/src/api/coverage-source.ts +3 -1
- package/src/api/framework-reads.ts +29 -0
- package/src/api/host.ts +13 -4
- package/src/api/index.ts +113 -14
- package/src/api/logger.ts +14 -2
- package/src/api/plot-layers.ts +72 -6
- package/src/api/plots.ts +19 -0
- package/src/api/registry.ts +11 -0
- package/src/api/settings/SettingsContext.tsx +17 -5
- package/src/api/settings/SettingsService.ts +3 -0
- package/src/api/settings/store.ts +3 -1
- package/src/api/slots.ts +97 -28
- package/src/api/station-brokers.ts +2 -1
- package/src/api/stock-bodies.ts +6 -0
- package/src/api/tiny-size.ts +6 -1
- package/src/api/tone.ts +7 -4
- package/src/api/transport.ts +13 -2
- package/src/api/types.ts +214 -154
- package/src/binary-frame.ts +26 -25
- package/src/client.ts +2 -0
- package/src/combine-readings.ts +8 -4
- package/src/command-delay.ts +6 -0
- package/src/compat-versions.ts +2 -2
- package/src/contract-enum-names.ts +2 -3
- package/src/enum-names.ts +5 -3
- package/src/envelope.ts +9 -1
- package/src/flight/BufferedDataSource.ts +4 -2
- package/src/flight/types.ts +3 -2
- package/src/frames/index.ts +29 -16
- package/src/index.ts +32 -0
- package/src/ksp-enum-names.ts +23 -8
- package/src/media/radio-support.ts +12 -3
- package/src/perf/PerfBudget.ts +8 -6
- package/src/reading.ts +20 -4
- package/src/spine/body-pose.ts +251 -0
- package/src/spine/capability-lock.ts +17 -4
- package/src/spine/catalogue-elements.ts +75 -0
- package/src/spine/celestial-facts.ts +10 -35
- package/src/spine/client-timeline.ts +10 -12
- package/src/spine/client.ts +127 -19
- package/src/spine/command-gate.ts +13 -11
- package/src/spine/command-group.ts +278 -0
- package/src/spine/comms-delay-reckoning.ts +2 -2
- package/src/spine/comms-journey.ts +29 -0
- package/src/spine/comms-path-geometry.ts +4 -4
- package/src/spine/connection-error-warning.ts +1 -1
- package/src/spine/context.tsx +4 -0
- package/src/spine/contributions.ts +13 -13
- package/src/spine/core-reckoners.ts +2 -5
- package/src/spine/held-command-actions.ts +18 -6
- package/src/spine/impact-point.ts +8 -35
- package/src/spine/index.ts +5 -0
- package/src/spine/kepler-reckoning.ts +2 -2
- package/src/spine/kepler.ts +9 -7
- package/src/spine/lagrange.ts +6 -6
- package/src/spine/lifecycle.ts +14 -0
- package/src/spine/lock-scope.ts +11 -1
- package/src/spine/map-command.ts +3 -11
- package/src/spine/mod-settings.ts +1 -0
- package/src/spine/never-reckonable.ts +8 -6
- package/src/spine/orbit-patches.ts +33 -6
- package/src/spine/orbit-trajectory.ts +172 -57
- package/src/spine/orbital-solve.ts +1 -1
- package/src/spine/own-craft-vantage.tsx +1 -0
- package/src/spine/past-track.ts +7 -7
- package/src/spine/phase-angle.ts +51 -0
- package/src/spine/powered-reckoning.ts +16 -16
- package/src/spine/processors.ts +4 -1
- package/src/spine/reckoners.ts +3 -6
- package/src/spine/reference-frame.ts +49 -115
- package/src/spine/settings-registry.ts +17 -9
- package/src/spine/settings-tabs.ts +4 -3
- package/src/spine/target-range-reckoning.ts +3 -3
- package/src/spine/timeline-store.ts +6 -1
- package/src/spine/topic-ownership.ts +2 -2
- package/src/spine/uplink-clients.ts +5 -4
- package/src/spine/use-body-states.ts +3 -7
- package/src/spine/use-command.ts +167 -125
- package/src/spine/use-data-sources.ts +2 -5
- package/src/spine/use-late-telemetry-subscribe.ts +1 -0
- package/src/spine/use-orbit-curve.ts +49 -0
- package/src/spine/use-orbit-trajectory.ts +54 -2
- package/src/spine/use-selected-vantage.ts +1 -0
- package/src/spine/use-system-instant.ts +20 -0
- package/src/spine/use-transmissions.ts +1 -0
- package/src/spine/view-clock.ts +20 -3
- package/src/system-instant.ts +20 -0
- package/src/testing/console-logger.ts +3 -3
- package/src/testing/fake-wall-clock.ts +4 -2
- package/src/testing/install-act-gate-stretch.ts +9 -0
- package/src/testing/install-real-test-host.ts +6 -1
- package/src/testing/memory-storage.ts +6 -5
- package/src/testing/mock-data-source.ts +2 -2
- package/src/testing/render.tsx +4 -2
- package/src/testing/stub-transport.ts +66 -52
- package/src/timeline.ts +14 -6
- package/src/topic-fields.ts +1 -0
- package/src/topics.ts +59 -26
- package/src/unit-system/registry.ts +11 -0
- package/src/unit-system/value.ts +3 -0
- package/src/units.ts +1 -1
- package/src/uplink-externals.ts +9 -4
- package/src/uplink-manifest.ts +62 -16
package/dist/api/index.d.ts
CHANGED
|
@@ -3,25 +3,28 @@ import type { ModSettingsModel } from "../__generated__/contract.js";
|
|
|
3
3
|
import type { AnyCommandReply, CommandArgs, CommandId, CommandReply } from "../commands.js";
|
|
4
4
|
import type { Reading, ReckonableReading, TopicReading } from "../reading.js";
|
|
5
5
|
import type { ReckonableFields, ReckonableTopic } from "../reckonability.js";
|
|
6
|
+
import type { CommandGroupHandle } from "../spine/command-group.js";
|
|
6
7
|
import type { TopicId, TopicPayload } from "../topics.js";
|
|
7
8
|
import type { Value } from "../value.js";
|
|
8
9
|
import "./slots.js";
|
|
9
10
|
import "./contribution-slots.js";
|
|
10
11
|
import "./plots.js";
|
|
11
|
-
import type { ActionDefinition, ActionHandlers, AnyContribution, AugmentDefinition, LateTelemetrySubscribe, ModSettingDep, ModSettingsRegistry, PerfBudgetHandle, PerfBudgetOptions, SettingDefinition, SettingDefinitionOf, SettingsTabDefinition, SettingType, SlotProps, TelemetryClient, UplinkClientHandle, UseCommandOptions, UseCommandResult, UseRouteCommandsResult } from "./types.js";
|
|
12
|
+
import type { ActionDefinition, ActionHandlers, AnyContribution, AugmentDefinition, DataSourceState, LateTelemetrySubscribe, ModSettingDep, ModSettingsRegistry, PerfBudgetHandle, PerfBudgetOptions, SettingDefinition, SettingDefinitionOf, SettingsTabDefinition, SettingType, SlotProps, TelemetryClient, UplinkClientHandle, UseCommandOptions, UseCommandResult, UseRouteCommandsResult } from "./types.js";
|
|
13
|
+
export type { CommandGroupHandle, CommandGroupPhase, } from "../spine/command-group.js";
|
|
12
14
|
export type { UplinkAlarmRequest, UplinkAlarmThresholdOp, UplinkAlarmThresholdTrigger, UplinkAlarmTimeTrigger, UplinkAlarmTrigger, UplinkAlarmVantage, } from "./alarm-request.js";
|
|
13
15
|
export { useAlarmRequest } from "./alarm-request.js";
|
|
14
|
-
export type { CommSignalHopRateEntry, CrewRowToneEntry, ExperimentsInstrumentEntry, ShipMapPartMetaEntry, ShipMapPartMeterEntry, SpaceCenterFacilityEntry, StrategiesScreenEntry, SystemEntity, SystemEntityEmphasis, SystemEntityFixedPosition, SystemEntityMeta, SystemEntityOrbitPosition, SystemEntityPosition, SystemEntityShape, SystemEntityStyle, SystemProjectionExtent, SystemViewProjection, SystemViewVesselStatusEntry, } from "./contribution-slots.js";
|
|
16
|
+
export type { CommSignalHopRateEntry, CrewRowToneEntry, ExperimentsInstrumentEntry, ShipMapPartMetaEntry, ShipMapPartMeterEntry, SpaceCenterFacilityEntry, StrategiesScreenEntry, SystemEntity, SystemEntityEmphasis, SystemEntityFixedPosition, SystemEntityMeta, SystemEntityOrbitPosition, SystemEntityPosition, SystemEntityShape, SystemEntityStyle, SystemEntitySubjectPosition, SystemProjectionExtent, SystemViewProjection, SystemViewVesselStatusEntry, } from "./contribution-slots.js";
|
|
17
|
+
export { FRAMEWORK_READS } from "./framework-reads.js";
|
|
15
18
|
export type { GonogoHost } from "./host.js";
|
|
16
19
|
export { GONOGO_HOST_KEY, hasHost } from "./host.js";
|
|
17
20
|
export type { LogContext, Logger, TaggedLogger } from "./logger-contract.js";
|
|
18
|
-
export type { PlotAnnotationLayer, PlotCaptionLayer, PlotEmphasis, PlotFieldLayer, PlotLayer, PlotMarkerLayer, PlotPoint, PlotRegionLayer, PlotReliefLayer, PlotRuleLayer, PlotSeriesLayer, } from "./plot-layers.js";
|
|
21
|
+
export type { PlotAnnotationLayer, PlotCaptionLayer, PlotEmphasis, PlotFieldLayer, PlotLayer, PlotMarkerLayer, PlotPoint, PlotRegionLayer, PlotReliefLayer, PlotRuleLayer, PlotSeriesLayer, PlotWaterLayer, } from "./plot-layers.js";
|
|
19
22
|
export type { PlotEntry, PlotFrame, PlotSubject, PlotSubjectRegistry, } from "./plots.js";
|
|
20
23
|
export type { ActionGroupSlotContext, ActionGroupSlotId, AstronautComplexCrewContext, CrewAvatarContext, CrewBadgeContext, DeployedExperimentContext, DeployedScienceExperiment, ExperimentsInstrument, ExperimentsInstrumentSlotContext, FleetRosterUpdatesContext, LaunchDirectorPadContext, LaunchDirectorSlotContext, MapBaseLayerContext, MapCoverageGate, MapOverlayContext, MapViewScope, ObjectiveSlotItem, ObjectiveSlotSection, ObjectiveSlotState, ObjectiveSourceContext, OrbitOverlayContext, PowerSystemsScope, ScienceDataAboardRowContext, ShipMapBounds, ShipMapOverlayContext, ShipMapPart, ShipMapPartStateModule, ShipMapPartType, StrategiesScreenBodyContext, SystemOverlayContext, TargetingHudContext, } from "./slots.js";
|
|
21
24
|
export { TINY_SIZE } from "./tiny-size.js";
|
|
22
25
|
export { type AlertTone, TONES, type Tone } from "./tone.js";
|
|
23
26
|
export type { LostCommand, Transport, TransportStatus, UndeliveredCommand, } from "./transport.js";
|
|
24
|
-
export type { ActionDefinition, ActionHandlers, ActionInputKind, ActionInputPayload, AnyContribution, AtmosphereModel, AugmentDefinition, AugmentSettingField, BadgeEntry, BodyDefinition, BodyMapConfig, BodyMask, ClientPrefSetting, ClientPrefSettingOf, CommandStatus, ComponentBehavior, ComponentDefinition, ComponentProps, ComponentRequirement, ComponentSlotRegistry, ComponentSlotSegment, ConfigComponentProps, ConfigField, Contributed, ContributionDefinition, ContributionDep, ContributionEntry, ContributionRegistry, ContributionSlotId, CoverageSourceDefinition, DataKey, DataRequirement, DataSource, DataSourceStatus, DelayClockLike, DelayMode, DepTopics, HostIceServers, InFlightCommand, LateTelemetrySubscribe, MapPoi, MapPoiAction, MapPoiProviderContext, MapPoiProviderDefinition, MeterEntry, ModSettingDep, ModSettingsRegistry, NamespacedAugmentSettings, PerfBudgetHandle, PerfBudgetOptions, PredictedPhase, Screen, Seat, SettingDefinition, SettingDefinitionBase, SettingDefinitionOf, SettingsTabDefinition, SettingType, SettingValue, SettingValueByType, SizeDelta, SlotId, SlotProps, SlotRegistry, StatEntry, StationBroker, StationBrokerAttach, StreamBackedSetting, StreamBackedSettingOf, StreamStatusValue, TelemetryClient, ThemeDefinition, TinyControl, TinyEssential, TinyEssentialMark, TinyEssentialTone, TinyGauge, TinyMode, UplinkClientHandle, UplinkClientIdentity, UplinkRelay, UseCommandOptions, UseCommandResult, UseCommandResultFor, UseMapPois, UseRouteCommandsResult, WidgetScope, WidgetScopeRegistry, } from "./types.js";
|
|
27
|
+
export type { ActionDefinition, ActionHandlers, ActionInputKind, ActionInputPayload, AnyContribution, AtmosphereModel, AugmentDefinition, AugmentSettingField, BadgeEntry, BodyDefinition, BodyMapConfig, BodyMask, ClientPrefSetting, ClientPrefSettingOf, CommandFailure, CommandFound, CommandFoundOutcome, CommandGateStatus, CommandLoss, CommandRefusal, CommandRefusalDetail, CommandStatus, CommandUndelivered, ComponentBehavior, ComponentDefinition, ComponentProps, ComponentRequirement, ComponentSlotRegistry, ComponentSlotSegment, ConfigComponentProps, ConfigField, Contributed, ContributionDefinition, ContributionDep, ContributionEntry, ContributionRegistry, ContributionSlotId, CoverageSourceDefinition, DataKey, DataRequirement, DataSource, DataSourceState, DataSourceStatus, DelayClockLike, DelayMode, DepTopics, HostIceServers, InFlightCommand, LateTelemetrySubscribe, MapPoi, MapPoiAction, MapPoiProviderContext, MapPoiProviderDefinition, MeterEntry, ModSettingDep, ModSettingsRegistry, NamespacedAugmentSettings, PerfBudgetHandle, PerfBudgetOptions, PredictedPhase, Screen, Seat, SettingDefinition, SettingDefinitionBase, SettingDefinitionOf, SettingsTabDefinition, SettingType, SettingValue, SettingValueByType, SizeDelta, SlotId, SlotProps, SlotRegistry, StatEntry, StationBroker, StationBrokerAttach, StreamBackedSetting, StreamBackedSettingOf, StreamStatusValue, TelemetryClient, ThemeDefinition, TinyControl, TinyEssential, TinyEssentialMark, TinyEssentialTone, TinyGauge, TinyMode, UplinkClientHandle, UplinkClientIdentity, UplinkRelay, UseCommandOptions, UseCommandResult, UseCommandResultFor, UseMapPois, UseRouteCommandsResult, WidgetScope, WidgetScopeRegistry, } from "./types.js";
|
|
25
28
|
/**
|
|
26
29
|
* The setting that holds the address of the machine running KSP, which every
|
|
27
30
|
* Uplink connects to. Read it with {@link getGameHost}.
|
|
@@ -78,7 +81,9 @@ export { clearUplinkHandles, getUplinkHandle, registerUplinkHandle, unregisterUp
|
|
|
78
81
|
*
|
|
79
82
|
* Pass the handle as `owner` to every `registerComponent` and
|
|
80
83
|
* {@link registerAugment} call the client makes, and register contributions
|
|
81
|
-
* through the handle's own `registerContribution`.
|
|
84
|
+
* through the handle's own `registerContribution`. A widget registered without
|
|
85
|
+
* an `owner` is not tied to its Uplink, so searching the add-widget picker for
|
|
86
|
+
* the Uplink's id does not find it.
|
|
82
87
|
*
|
|
83
88
|
* @category Registering
|
|
84
89
|
*/
|
|
@@ -87,7 +92,7 @@ export declare const defineUplinkClient: (cfg: {
|
|
|
87
92
|
version: string;
|
|
88
93
|
name: string;
|
|
89
94
|
/** What the Uplink does, in one or two sentences. See {@link UplinkClientHandle.description}. */
|
|
90
|
-
description
|
|
95
|
+
description: string;
|
|
91
96
|
}) => UplinkClientHandle;
|
|
92
97
|
/**
|
|
93
98
|
* Adds a custom tab to the app's Settings. Prefer `registerSetting`, which the
|
|
@@ -114,8 +119,8 @@ export declare const registerSettingsTab: (def: SettingsTabDefinition) => void;
|
|
|
114
119
|
*/
|
|
115
120
|
export declare function registerSetting<SettingKind extends SettingType = "boolean", Topic extends TopicId = TopicId>(def: SettingDefinitionOf<SettingKind, Topic>): void;
|
|
116
121
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
122
|
+
* This overload takes a row from a list, for a client that keeps its rows in an
|
|
123
|
+
* array and registers them in a loop. Rows of different types in
|
|
119
124
|
* one array are typed as the plain `SettingDefinition`, which the generic form
|
|
120
125
|
* above does not accept.
|
|
121
126
|
*/
|
|
@@ -280,6 +285,41 @@ export declare function useCommand<Command extends CommandId>(command: Command,
|
|
|
280
285
|
* ```
|
|
281
286
|
*/
|
|
282
287
|
export declare function useCommand<Args = unknown, Reply = AnyCommandReply>(command: string, options?: UseCommandOptions): UseCommandResult<Args, Reply>;
|
|
288
|
+
/**
|
|
289
|
+
* Sends the commands the callback makes as one group. Every `send` on a
|
|
290
|
+
* `useCommand` handle made while the callback runs is held back, and when it
|
|
291
|
+
* returns they go to the game as a single message: one place in the craft's
|
|
292
|
+
* command order, delivered whole or not at all, refused whole if any one of them
|
|
293
|
+
* is, and run in order in one physics tick.
|
|
294
|
+
*
|
|
295
|
+
* Each handle's own promise still settles with its own command's reply, so a
|
|
296
|
+
* widget that already reads a handle needs no change.
|
|
297
|
+
*
|
|
298
|
+
* The callback must be synchronous and cannot nest: an `await` inside it would
|
|
299
|
+
* let a send from somewhere else fall into the group. All the commands must go to
|
|
300
|
+
* the same craft, from the same command centre, and none can be instant.
|
|
301
|
+
* Breaking those rules throws, and nothing is sent.
|
|
302
|
+
*
|
|
303
|
+
* The game cannot take an action back. If a command in a group fails after the
|
|
304
|
+
* ones before it ran, those stay done and the ones after it do not run; the
|
|
305
|
+
* replies say which.
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```ts
|
|
309
|
+
* const ag = useCommand("vessel.control.setActionGroup");
|
|
310
|
+
* const sas = useCommand("vessel.control.setSas");
|
|
311
|
+
*
|
|
312
|
+
* const group = sendTogether(() => {
|
|
313
|
+
* void ag.send({ group: 1, state: true });
|
|
314
|
+
* void ag.send({ group: 2, state: true });
|
|
315
|
+
* void sas.send({ enabled: true });
|
|
316
|
+
* });
|
|
317
|
+
* await group.result;
|
|
318
|
+
* ```
|
|
319
|
+
*
|
|
320
|
+
* @category Commands
|
|
321
|
+
*/
|
|
322
|
+
export declare function sendTogether(build: () => void): CommandGroupHandle;
|
|
283
323
|
/**
|
|
284
324
|
* Calls one of an Uplink's own methods from a widget, on any screen.
|
|
285
325
|
*
|
|
@@ -387,7 +427,21 @@ export declare function useModSettings(uplinkId: string): TopicReading<ModSettin
|
|
|
387
427
|
* A contribution dependency on one setting of an Uplink's host mod. Both names
|
|
388
428
|
* are checked against `ModSettingsRegistry`, so an Uplink or a setting nobody
|
|
389
429
|
* declared does not compile, and `compute` receives the value under
|
|
390
|
-
* `settings.<uplink>.<key>` as the type the registry declares.
|
|
430
|
+
* `settings.<uplink>.<key>` as the type the registry declares. Until an Uplink
|
|
431
|
+
* adds an entry the registry is empty and the first argument accepts no id,
|
|
432
|
+
* which is why the declaration comes first.
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* ```ts
|
|
436
|
+
* // Declare the host mod's settings once, in the Uplink's client:
|
|
437
|
+
* declare module "@ksp-gonogo/sitrep-sdk" {
|
|
438
|
+
* interface ModSettingsRegistry {
|
|
439
|
+
* "my-uplink": { difficulty: number };
|
|
440
|
+
* }
|
|
441
|
+
* }
|
|
442
|
+
*
|
|
443
|
+
* const deps = [modSettingDep("my-uplink", "difficulty")] as const;
|
|
444
|
+
* ```
|
|
391
445
|
*
|
|
392
446
|
* @category Extensions
|
|
393
447
|
*/
|
|
@@ -409,6 +463,9 @@ export declare function modSettingDep<const Uplink extends keyof ModSettingsRegi
|
|
|
409
463
|
* Values computed from Topics once and shared: a processor reads its
|
|
410
464
|
* dependencies and returns a derived value each frame, and any Uplink can read
|
|
411
465
|
* one through a handle without depending on the Uplink that implements it.
|
|
466
|
+
* Also here are the pieces of a derived channel, a Topic the app computes from
|
|
467
|
+
* other Topics ({@link DerivedChannelDefinition}), and {@link TimelinePoint},
|
|
468
|
+
* the dated sample both a derived channel and a reckoner read.
|
|
412
469
|
*/
|
|
413
470
|
export declare function useProcessor<Result, Carried extends boolean>(handle: {
|
|
414
471
|
readonly id: string;
|
|
@@ -436,29 +493,51 @@ export declare function useViewClock(): unknown;
|
|
|
436
493
|
/**
|
|
437
494
|
* Connects a widget's declared actions to handlers, so an input the operator
|
|
438
495
|
* has bound, such as a key or a joystick button, fires them. Keys are the
|
|
439
|
-
* action ids from {@link ComponentDefinition.actions}
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
496
|
+
* action ids from {@link ComponentDefinition.actions}, which the widget must
|
|
497
|
+
* declare when it registers, or no operator can bind them. An operator binds
|
|
498
|
+
* an input to an action on the widget's Inputs tab, in its settings. What a
|
|
499
|
+
* handler returns is sent back to the device that fired it, a serial control
|
|
500
|
+
* panel with a screen for instance, so the screen can follow the widget. The
|
|
501
|
+
* built-in text display, 21 characters by 8 lines, takes a flat object of keys to
|
|
502
|
+
* values, such as `{ ALT: "12.4 km", THR: "80%" }`, and prints one `KEY VALUE`
|
|
503
|
+
* line per entry, sorted by key. Return nothing when the device has no display.
|
|
443
504
|
*
|
|
444
505
|
* Pass a new handler object on every render if you like: the latest handlers
|
|
445
506
|
* are always the ones called, and nothing is registered again.
|
|
446
507
|
*
|
|
447
508
|
* @example
|
|
448
509
|
* ```tsx
|
|
449
|
-
* import {
|
|
510
|
+
* import {
|
|
511
|
+
* type ActionDefinition,
|
|
512
|
+
* registerComponent,
|
|
513
|
+
* useActionInput,
|
|
514
|
+
* } from "@ksp-gonogo/sitrep-sdk";
|
|
450
515
|
* import { Text } from "@ksp-gonogo/ui-kit";
|
|
516
|
+
* import { useState } from "react";
|
|
451
517
|
*
|
|
452
518
|
* const actions = [
|
|
453
519
|
* { id: "toggle", label: "Toggle", accepts: ["button"] },
|
|
454
520
|
* ] as const satisfies readonly ActionDefinition[];
|
|
455
521
|
*
|
|
456
522
|
* function LightSwitch() {
|
|
523
|
+
* const [on, setOn] = useState(false);
|
|
457
524
|
* useActionInput<typeof actions>({
|
|
458
|
-
* toggle: (
|
|
525
|
+
* toggle: () => {
|
|
526
|
+
* setOn(!on);
|
|
527
|
+
* return { LIGHT: on ? "OFF" : "ON" };
|
|
528
|
+
* },
|
|
459
529
|
* });
|
|
460
|
-
* return <Text>Light</Text>;
|
|
530
|
+
* return <Text>{on ? "Light on" : "Light off"}</Text>;
|
|
461
531
|
* }
|
|
532
|
+
*
|
|
533
|
+
* registerComponent({
|
|
534
|
+
* id: "light-switch",
|
|
535
|
+
* name: "Light Switch",
|
|
536
|
+
* description: "A light an operator switches with a bound button.",
|
|
537
|
+
* tags: ["controls"],
|
|
538
|
+
* component: LightSwitch,
|
|
539
|
+
* actions,
|
|
540
|
+
* });
|
|
462
541
|
* ```
|
|
463
542
|
*
|
|
464
543
|
* @category Actions
|
|
@@ -476,7 +555,7 @@ export declare function useActionInput<Actions extends readonly ActionDefinition
|
|
|
476
555
|
*
|
|
477
556
|
* @category Registering
|
|
478
557
|
*/
|
|
479
|
-
export declare function useDataSources():
|
|
558
|
+
export declare function useDataSources(): DataSourceState[];
|
|
480
559
|
/**
|
|
481
560
|
* Returns the latest value received on `topic`, without the signal delay and
|
|
482
561
|
* without a state: `undefined` until something arrives.
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,OAAO,SAAS,CAAC;AAEjB,OAAO,sBAAsB,CAAC;AAK9B,OAAO,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,OAAO,SAAS,CAAC;AAEjB,OAAO,sBAAsB,CAAC;AAK9B,OAAO,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,iBAAiB,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,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import "./contribution-slots.js";
|
|
|
25
25
|
// `PlotEntry`'s contents rather than a slot of its own, so it merges nothing.
|
|
26
26
|
import "./plots.js";
|
|
27
27
|
export { useAlarmRequest } from "./alarm-request.js";
|
|
28
|
+
export { FRAMEWORK_READS } from "./framework-reads.js";
|
|
28
29
|
export { GONOGO_HOST_KEY, hasHost } from "./host.js";
|
|
29
30
|
export { TINY_SIZE } from "./tiny-size.js";
|
|
30
31
|
export { TONES } from "./tone.js";
|
|
@@ -56,7 +57,7 @@ export { clearRegistry, getComponent, getDataSource, getDataSources, registerCom
|
|
|
56
57
|
* `@ksp-gonogo/ui-kit`, and there the declaration is the registry itself rather
|
|
57
58
|
* than a shim onto the host. Both spellings now reach ONE registry: ui-kit
|
|
58
59
|
* holds it in a global slot precisely so that a second loaded copy of that
|
|
59
|
-
* package cannot fork it,
|
|
60
|
+
* package cannot fork it, as a mis-bundled Uplink would otherwise do
|
|
60
61
|
* silently. The pair is worth knowing about anyway, because the two differ with
|
|
61
62
|
* no host installed: these throw a named error naming the fix, ui-kit's carry
|
|
62
63
|
* on.
|
|
@@ -127,7 +128,9 @@ export { clearUplinkHandles, getUplinkHandle, registerUplinkHandle, unregisterUp
|
|
|
127
128
|
*
|
|
128
129
|
* Pass the handle as `owner` to every `registerComponent` and
|
|
129
130
|
* {@link registerAugment} call the client makes, and register contributions
|
|
130
|
-
* through the handle's own `registerContribution`.
|
|
131
|
+
* through the handle's own `registerContribution`. A widget registered without
|
|
132
|
+
* an `owner` is not tied to its Uplink, so searching the add-widget picker for
|
|
133
|
+
* the Uplink's id does not find it.
|
|
131
134
|
*
|
|
132
135
|
* @category Registering
|
|
133
136
|
*/
|
|
@@ -253,6 +256,43 @@ export function useViewUt() {
|
|
|
253
256
|
export function useCommand(command, options) {
|
|
254
257
|
return getHost().useCommand(command, options);
|
|
255
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Sends the commands the callback makes as one group. Every `send` on a
|
|
261
|
+
* `useCommand` handle made while the callback runs is held back, and when it
|
|
262
|
+
* returns they go to the game as a single message: one place in the craft's
|
|
263
|
+
* command order, delivered whole or not at all, refused whole if any one of them
|
|
264
|
+
* is, and run in order in one physics tick.
|
|
265
|
+
*
|
|
266
|
+
* Each handle's own promise still settles with its own command's reply, so a
|
|
267
|
+
* widget that already reads a handle needs no change.
|
|
268
|
+
*
|
|
269
|
+
* The callback must be synchronous and cannot nest: an `await` inside it would
|
|
270
|
+
* let a send from somewhere else fall into the group. All the commands must go to
|
|
271
|
+
* the same craft, from the same command centre, and none can be instant.
|
|
272
|
+
* Breaking those rules throws, and nothing is sent.
|
|
273
|
+
*
|
|
274
|
+
* The game cannot take an action back. If a command in a group fails after the
|
|
275
|
+
* ones before it ran, those stay done and the ones after it do not run; the
|
|
276
|
+
* replies say which.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```ts
|
|
280
|
+
* const ag = useCommand("vessel.control.setActionGroup");
|
|
281
|
+
* const sas = useCommand("vessel.control.setSas");
|
|
282
|
+
*
|
|
283
|
+
* const group = sendTogether(() => {
|
|
284
|
+
* void ag.send({ group: 1, state: true });
|
|
285
|
+
* void ag.send({ group: 2, state: true });
|
|
286
|
+
* void sas.send({ enabled: true });
|
|
287
|
+
* });
|
|
288
|
+
* await group.result;
|
|
289
|
+
* ```
|
|
290
|
+
*
|
|
291
|
+
* @category Commands
|
|
292
|
+
*/
|
|
293
|
+
export function sendTogether(build) {
|
|
294
|
+
return getHost().sendTogether(build);
|
|
295
|
+
}
|
|
256
296
|
/**
|
|
257
297
|
* Calls one of an Uplink's own methods from a widget, on any screen.
|
|
258
298
|
*
|
|
@@ -298,6 +338,7 @@ export function useCommand(command, options) {
|
|
|
298
338
|
* @category Host and runtime
|
|
299
339
|
*/
|
|
300
340
|
export function useUplinkRelay(uplinkId) {
|
|
341
|
+
// gonogo:reads none
|
|
301
342
|
return getHost().useUplinkRelay(uplinkId);
|
|
302
343
|
}
|
|
303
344
|
/**
|
|
@@ -327,6 +368,7 @@ export function useUplinkRelay(uplinkId) {
|
|
|
327
368
|
* @category Host and runtime
|
|
328
369
|
*/
|
|
329
370
|
export function useHostIceServers() {
|
|
371
|
+
// gonogo:reads none
|
|
330
372
|
return getHost().useHostIceServers();
|
|
331
373
|
}
|
|
332
374
|
/**
|
|
@@ -370,7 +412,21 @@ export function useModSettings(uplinkId) {
|
|
|
370
412
|
* A contribution dependency on one setting of an Uplink's host mod. Both names
|
|
371
413
|
* are checked against `ModSettingsRegistry`, so an Uplink or a setting nobody
|
|
372
414
|
* declared does not compile, and `compute` receives the value under
|
|
373
|
-
* `settings.<uplink>.<key>` as the type the registry declares.
|
|
415
|
+
* `settings.<uplink>.<key>` as the type the registry declares. Until an Uplink
|
|
416
|
+
* adds an entry the registry is empty and the first argument accepts no id,
|
|
417
|
+
* which is why the declaration comes first.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```ts
|
|
421
|
+
* // Declare the host mod's settings once, in the Uplink's client:
|
|
422
|
+
* declare module "@ksp-gonogo/sitrep-sdk" {
|
|
423
|
+
* interface ModSettingsRegistry {
|
|
424
|
+
* "my-uplink": { difficulty: number };
|
|
425
|
+
* }
|
|
426
|
+
* }
|
|
427
|
+
*
|
|
428
|
+
* const deps = [modSettingDep("my-uplink", "difficulty")] as const;
|
|
429
|
+
* ```
|
|
374
430
|
*
|
|
375
431
|
* @category Extensions
|
|
376
432
|
*/
|
|
@@ -394,6 +450,9 @@ export function modSettingDep(uplink, key) {
|
|
|
394
450
|
* Values computed from Topics once and shared: a processor reads its
|
|
395
451
|
* dependencies and returns a derived value each frame, and any Uplink can read
|
|
396
452
|
* one through a handle without depending on the Uplink that implements it.
|
|
453
|
+
* Also here are the pieces of a derived channel, a Topic the app computes from
|
|
454
|
+
* other Topics ({@link DerivedChannelDefinition}), and {@link TimelinePoint},
|
|
455
|
+
* the dated sample both a derived channel and a reckoner read.
|
|
397
456
|
*/
|
|
398
457
|
export function useProcessor(handle) {
|
|
399
458
|
return getHost().useProcessor(handle);
|
|
@@ -421,29 +480,51 @@ export function useViewClock() {
|
|
|
421
480
|
/**
|
|
422
481
|
* Connects a widget's declared actions to handlers, so an input the operator
|
|
423
482
|
* has bound, such as a key or a joystick button, fires them. Keys are the
|
|
424
|
-
* action ids from {@link ComponentDefinition.actions}
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
483
|
+
* action ids from {@link ComponentDefinition.actions}, which the widget must
|
|
484
|
+
* declare when it registers, or no operator can bind them. An operator binds
|
|
485
|
+
* an input to an action on the widget's Inputs tab, in its settings. What a
|
|
486
|
+
* handler returns is sent back to the device that fired it, a serial control
|
|
487
|
+
* panel with a screen for instance, so the screen can follow the widget. The
|
|
488
|
+
* built-in text display, 21 characters by 8 lines, takes a flat object of keys to
|
|
489
|
+
* values, such as `{ ALT: "12.4 km", THR: "80%" }`, and prints one `KEY VALUE`
|
|
490
|
+
* line per entry, sorted by key. Return nothing when the device has no display.
|
|
428
491
|
*
|
|
429
492
|
* Pass a new handler object on every render if you like: the latest handlers
|
|
430
493
|
* are always the ones called, and nothing is registered again.
|
|
431
494
|
*
|
|
432
495
|
* @example
|
|
433
496
|
* ```tsx
|
|
434
|
-
* import {
|
|
497
|
+
* import {
|
|
498
|
+
* type ActionDefinition,
|
|
499
|
+
* registerComponent,
|
|
500
|
+
* useActionInput,
|
|
501
|
+
* } from "@ksp-gonogo/sitrep-sdk";
|
|
435
502
|
* import { Text } from "@ksp-gonogo/ui-kit";
|
|
503
|
+
* import { useState } from "react";
|
|
436
504
|
*
|
|
437
505
|
* const actions = [
|
|
438
506
|
* { id: "toggle", label: "Toggle", accepts: ["button"] },
|
|
439
507
|
* ] as const satisfies readonly ActionDefinition[];
|
|
440
508
|
*
|
|
441
509
|
* function LightSwitch() {
|
|
510
|
+
* const [on, setOn] = useState(false);
|
|
442
511
|
* useActionInput<typeof actions>({
|
|
443
|
-
* toggle: (
|
|
512
|
+
* toggle: () => {
|
|
513
|
+
* setOn(!on);
|
|
514
|
+
* return { LIGHT: on ? "OFF" : "ON" };
|
|
515
|
+
* },
|
|
444
516
|
* });
|
|
445
|
-
* return <Text>Light</Text>;
|
|
517
|
+
* return <Text>{on ? "Light on" : "Light off"}</Text>;
|
|
446
518
|
* }
|
|
519
|
+
*
|
|
520
|
+
* registerComponent({
|
|
521
|
+
* id: "light-switch",
|
|
522
|
+
* name: "Light Switch",
|
|
523
|
+
* description: "A light an operator switches with a bound button.",
|
|
524
|
+
* tags: ["controls"],
|
|
525
|
+
* component: LightSwitch,
|
|
526
|
+
* actions,
|
|
527
|
+
* });
|
|
447
528
|
* ```
|
|
448
529
|
*
|
|
449
530
|
* @category Actions
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,uEAAuE;AACvE,sFAAsF;AACtF,6EAA6E;AAC7E,gFAAgF;AAChF,mBAAmB;AACnB,EAAE;AACF,oIAAoI;AACpI,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,uDAAuD;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,uEAAuE;AACvE,sFAAsF;AACtF,6EAA6E;AAC7E,gFAAgF;AAChF,mBAAmB;AACnB,EAAE;AACF,oIAAoI;AACpI,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,uDAAuD;AAGvD,OAAO,EAAE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AAC;IACF,OAAO,aAAa,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,6DAA6D;AAC7D,kFAAkF;AAClF,oFAAoF;AACpF,iFAAiF;AACjF,4CAA4C;AAC5C,kFAAkF;AAClF,kEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAuB;IACtD,OAAO,OAAO,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,OAAO,EACL,YAAY,EAEZ,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,4EAA4E;AAC5E,gFAAgF;AAChF,+EAA+E;AAC/E,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC;;;GAGG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB;;;;;GAKG;AACH;;;;GAIG;AACH,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EAEvB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB;;;;GAIG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAEhB,aAAa,EACb,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/api/logger.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { Logger } from "./logger-contract.js";
|
|
2
2
|
/**
|
|
3
|
-
* The app's logger. Entries go to the browser console, the
|
|
4
|
-
*
|
|
3
|
+
* The app's logger. Entries go to the browser console, to the log buffer the
|
|
4
|
+
* app keeps in the page (what its in-app log viewer and log export read), and
|
|
5
|
+
* to the logs the running app sends to its log service. Throws when used with
|
|
6
|
+
* no app or test host installed.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { logger } from "@ksp-gonogo/sitrep-sdk";
|
|
11
|
+
*
|
|
12
|
+
* function refreshStations() {
|
|
13
|
+
* const log = logger.tag("my-uplink");
|
|
14
|
+
* log.info("Station list refreshed", { count: 3 });
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
5
17
|
*
|
|
6
18
|
* @category Logging and performance
|
|
7
19
|
* @categoryDescription Logging and performance
|
package/dist/api/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/api/logger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/api/logger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM,EAAE,MAOnB,CAAC"}
|
package/dist/api/logger.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { getHost } from "./host.js";
|
|
2
2
|
/**
|
|
3
|
-
* The app's logger. Entries go to the browser console, the
|
|
4
|
-
*
|
|
3
|
+
* The app's logger. Entries go to the browser console, to the log buffer the
|
|
4
|
+
* app keeps in the page (what its in-app log viewer and log export read), and
|
|
5
|
+
* to the logs the running app sends to its log service. Throws when used with
|
|
6
|
+
* no app or test host installed.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { logger } from "@ksp-gonogo/sitrep-sdk";
|
|
11
|
+
*
|
|
12
|
+
* function refreshStations() {
|
|
13
|
+
* const log = logger.tag("my-uplink");
|
|
14
|
+
* log.info("Station list refreshed", { count: 3 });
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
5
17
|
*
|
|
6
18
|
* @category Logging and performance
|
|
7
19
|
* @categoryDescription Logging and performance
|
package/dist/api/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/api/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/api/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAW,IAAI,KAAK,CAAC,EAAY,EAAE;IACpD,GAAG,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC,MAAgB,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtC,wHAAwH;QACxH,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChE,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
* 2. **A layer names a TONE, never a colour.** The same split
|
|
23
23
|
* `SystemEntityStyle` already draws for `system-view.entities`: an author
|
|
24
24
|
* says how alarming a thing is and the renderer resolves the token, so a
|
|
25
|
-
* palette change cannot leave a plot's marks behind. The
|
|
26
|
-
* `PlotFieldLayer.tint
|
|
27
|
-
* a fill colour: a body's own sky is an
|
|
25
|
+
* palette change cannot leave a plot's marks behind. The two exceptions are
|
|
26
|
+
* `PlotFieldLayer.tint` and `PlotWaterLayer.tint`, for the reason ShipMap's
|
|
27
|
+
* resource meters carry a fill colour: a body's own sky or sea is an
|
|
28
|
+
* IDENTITY colour, not a status.
|
|
28
29
|
*
|
|
29
30
|
* Absence is drawn as absence by construction: a layer that is not contributed
|
|
30
31
|
* draws nothing and, because `description` is the only route into the plot's
|
|
@@ -155,7 +156,15 @@ export interface PlotMarkerLayer extends PlotLayerBase {
|
|
|
155
156
|
kind: "marker";
|
|
156
157
|
at: PlotPoint;
|
|
157
158
|
/** Defaults to `"dot"`. */
|
|
158
|
-
shape?: "dot" | "ring" | "cross" | "chevron-up" | "chevron-down";
|
|
159
|
+
shape?: "dot" | "ring" | "cross" | "chevron-up" | "chevron-down" | "vessel";
|
|
160
|
+
/**
|
|
161
|
+
* How the position of a `"vessel"` mark is known, which decides its shape and
|
|
162
|
+
* fill: `"current"` is a reading of now, `"held"` the last observation kept past
|
|
163
|
+
* its time, `"modelled"` where a model carries the craft to now, and `"lost"`
|
|
164
|
+
* the last place of a craft given up on. Defaults to `"current"`; ignored for
|
|
165
|
+
* every other shape.
|
|
166
|
+
*/
|
|
167
|
+
markState?: "current" | "held" | "modelled" | "lost";
|
|
159
168
|
/** Multiplier on the plot's own marker size. Defaults to 1. */
|
|
160
169
|
scale?: number;
|
|
161
170
|
/**
|
|
@@ -222,9 +231,75 @@ export interface PlotReliefLayer extends PlotLayerBase {
|
|
|
222
231
|
/** Discrete elevation bands. Defaults to 6. */
|
|
223
232
|
bands?: number;
|
|
224
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Open water, drawn as a moving sea surface: a handful of waves summed on the
|
|
236
|
+
* body's own gravity and shaded by the slope of the surface, so it reads as
|
|
237
|
+
* liquid at every zoom and never as relief. The renderer animates it in real
|
|
238
|
+
* time and draws a still frame where motion is reduced.
|
|
239
|
+
*
|
|
240
|
+
* The waves are fixed to the body, not to the plot: `origin` says where the
|
|
241
|
+
* plot's own origin stands on it, so as a window follows a craft the sea slides
|
|
242
|
+
* past with the ground. A plan view is shaded one flat cell at a time, on the
|
|
243
|
+
* cells a relief of the same bounds is drawn on, so the sea is as coarse as the
|
|
244
|
+
* land beside it. Which waves show is the renderer's choice, from how many
|
|
245
|
+
* metres each cell spans, so finer waves come in as a window closes and
|
|
246
|
+
* coarser ones go.
|
|
247
|
+
*
|
|
248
|
+
* @category Plots
|
|
249
|
+
*/
|
|
250
|
+
export interface PlotWaterLayer extends PlotLayerBase {
|
|
251
|
+
kind: "water";
|
|
252
|
+
/**
|
|
253
|
+
* How the sea is seen. `"plan"`: from above, the plot's x east and y north
|
|
254
|
+
* of its origin, in metres. `"section"`: from the side, x metres along a
|
|
255
|
+
* track and y height, with the still surface at `y = 0`; the surface rises
|
|
256
|
+
* and falls with the waves and the water fills below it.
|
|
257
|
+
*/
|
|
258
|
+
view: "plan" | "section";
|
|
259
|
+
/** The data-space rectangle the sea covers, corner to corner. */
|
|
260
|
+
bounds: {
|
|
261
|
+
x0: number;
|
|
262
|
+
y0: number;
|
|
263
|
+
x1: number;
|
|
264
|
+
y1: number;
|
|
265
|
+
};
|
|
266
|
+
/** Where the plot's origin stands, metres east and north of the body's own origin. */
|
|
267
|
+
origin: {
|
|
268
|
+
east: number;
|
|
269
|
+
north: number;
|
|
270
|
+
};
|
|
271
|
+
/** In a section, the bearing the track runs on, degrees clockwise from north. */
|
|
272
|
+
bearingDeg?: number;
|
|
273
|
+
/** The body's surface gravity, m/s squared: it sets how fast each wave runs. */
|
|
274
|
+
gravity: number;
|
|
275
|
+
/**
|
|
276
|
+
* The body's own liquid colour (its `liquidColor`), a CSS colour: an
|
|
277
|
+
* identity colour, like a field's `tint`, not a status. The renderer keeps
|
|
278
|
+
* its hue and draws it at the brightness of the theme's water, so the sea
|
|
279
|
+
* stays as quiet as the tone's. Absent, the sea takes `tone`'s colour.
|
|
280
|
+
*/
|
|
281
|
+
tint?: string;
|
|
282
|
+
/**
|
|
283
|
+
* The ground's heights over `bounds`, row-major from the northern row and
|
|
284
|
+
* the western column, metres against the sea's surface: the sea is wherever
|
|
285
|
+
* the ground lies below it. Judged on the same cells a relief of the same
|
|
286
|
+
* bounds is drawn on, so a coast meets the land cell for cell. All of
|
|
287
|
+
* `bounds` is sea when omitted.
|
|
288
|
+
*/
|
|
289
|
+
sea?: {
|
|
290
|
+
size: number;
|
|
291
|
+
heights: readonly number[];
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* In a section, the x positions the surface is sampled at, the same as the
|
|
295
|
+
* ground beside it, so the waterline steps as the ground line does. Evenly
|
|
296
|
+
* spaced when omitted.
|
|
297
|
+
*/
|
|
298
|
+
samples?: readonly number[];
|
|
299
|
+
}
|
|
225
300
|
/**
|
|
226
301
|
* One layer of a plot: a data series, a guide line, a shaded region, a field,
|
|
227
|
-
* markers, labels, a caption or
|
|
302
|
+
* markers, labels, a caption, relief or open water.
|
|
228
303
|
*
|
|
229
304
|
* Every position is in the plot's own data space, in the units of the
|
|
230
305
|
* {@link PlotFrame}'s axes, never in pixels (apart from a marker's
|
|
@@ -235,6 +310,6 @@ export interface PlotReliefLayer extends PlotLayerBase {
|
|
|
235
310
|
*
|
|
236
311
|
* @category Plots
|
|
237
312
|
*/
|
|
238
|
-
export type PlotLayer = PlotSeriesLayer | PlotRuleLayer | PlotRegionLayer | PlotFieldLayer | PlotMarkerLayer | PlotAnnotationLayer | PlotCaptionLayer | PlotReliefLayer;
|
|
313
|
+
export type PlotLayer = PlotSeriesLayer | PlotRuleLayer | PlotRegionLayer | PlotFieldLayer | PlotMarkerLayer | PlotAnnotationLayer | PlotCaptionLayer | PlotReliefLayer | PlotWaterLayer;
|
|
239
314
|
export {};
|
|
240
315
|
//# sourceMappingURL=plot-layers.d.ts.map
|