@kosdev-code/kos-ui-sdk 0.1.0-next.944 → 0.1.0-next.958
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/.kos.json +2 -1
- package/common/events/async-event-bus.d.ts +2 -11
- package/common/events/async-event-bus.d.ts.map +1 -1
- package/common/events/eventBus.d.ts +1 -18
- package/common/events/eventBus.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +2 -3
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +25 -87
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
- package/core/core/decorators/kos-container-aware.d.ts +191 -420
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
- package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +14 -31
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +21 -74
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +18 -62
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +10 -60
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-model-effect.d.ts +10 -9
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +14 -16
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +80 -238
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +35 -275
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +20 -100
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +28 -89
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/indexing/index.d.ts +2 -4
- package/core/core/indexing/index.d.ts.map +1 -1
- package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
- package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
- package/core/core/indexing/kos-index-aware.d.ts +11 -37
- package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts +11 -32
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts +6 -6
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +7 -4
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +16 -8
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +2 -3
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/constants.d.ts +6 -2
- package/core/core/lifecycle/constants.d.ts.map +1 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
- package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/model-machine.d.ts +6 -0
- package/core/core/lifecycle/model-machine.d.ts.map +1 -1
- package/core/core/model/kos-fsm-manager.d.ts +6 -0
- package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
- package/core/core/model/kos-offline-queue.d.ts +1 -1
- package/core/core/model/service-response-store.d.ts +2 -15
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
- package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
- package/core/core/services/app-startup-service.d.ts +5 -13
- package/core/core/services/app-startup-service.d.ts.map +1 -1
- package/core/core/services/intent-service.d.ts +3 -12
- package/core/core/services/intent-service.d.ts.map +1 -1
- package/core/core/transport/mock/mock-frames.d.ts +3 -3
- package/core/core/transport/transport.d.ts +1 -1
- package/core/core/transport/transport.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +10 -0
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/types/model.d.ts +4 -8
- package/core/types/model.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +3 -11
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +25 -37
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/abortable-when.d.ts +5 -6
- package/core/util/abortable-when.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +14 -20
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +26 -159
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +9 -58
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +1 -8
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +10 -11
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +5 -22
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/promise-utils.d.ts +1 -26
- package/core/util/promise-utils.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +5 -23
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +3 -5
- package/core/util/service-request-error.d.ts.map +1 -1
- package/core/util/service-response.d.ts +12 -67
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/transport-not-ready-error.d.ts +11 -13
- package/core/util/transport-not-ready-error.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +1 -8
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +144 -109
- package/index.cjs.map +1 -1
- package/index.js +173 -138
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +7 -7
- package/models/models/browser-router/browser-router-model.d.ts +10 -39
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/browser-router-registration.d.ts +5 -77
- package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +2 -16
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +23 -66
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +34 -215
- package/models/models/device/device-model.d.ts +20 -199
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +7 -87
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +5 -34
- package/models/models/future/future-aware.d.ts +7 -71
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model-builder.d.ts +2 -2
- package/models/models/future/future-model.d.ts +3 -23
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +28 -145
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
- package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +12 -72
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-registration.d.ts +5 -77
- package/models/models/key-value/key-value-registration.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +13 -72
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +3 -46
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +32 -99
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +13 -156
- package/models/models/kos-time/kos-time-model.d.ts +8 -39
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/kos-time-registration.d.ts +6 -73
- package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +3 -58
- package/models/models/log-block/log-block-container-model.d.ts +2 -118
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-container-registration.d.ts +5 -75
- package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +5 -168
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-registration.d.ts +5 -75
- package/models/models/log-block/log-block-registration.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +14 -81
- package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +8 -29
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +5 -60
- package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
- package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +5 -43
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +2 -16
- package/models/models/ota/ota-model.d.ts +11 -39
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/ota-registration.d.ts +5 -77
- package/models/models/ota/ota-registration.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +2 -141
- package/models/models/region-info/types/index.d.ts +19 -99
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts +2 -14
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +3 -39
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/software-info-registration.d.ts +6 -73
- package/models/models/software-info/software-info-registration.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +6 -20
- package/models/models/state-bean/state-bean-model.d.ts +10 -41
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/state-bean-registration.d.ts +6 -73
- package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +4 -84
- package/models/models/state-prop/state-prop-model.d.ts +6 -40
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/state-prop-registration.d.ts +6 -73
- package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +5 -37
- package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +3 -49
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +13 -82
- package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
- package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +2 -24
- package/models/models/translation/descriptor-merge.d.ts +13 -17
- package/models/models/translation/descriptor-merge.d.ts.map +1 -1
- package/models/models/translation/services/translation-services.d.ts +19 -77
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/test-harness.d.ts +6 -8
- package/models/models/translation/test-harness.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +7 -59
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +6 -73
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +17 -50
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/translation-registration.d.ts +6 -73
- package/models/models/translation/translation-registration.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +51 -276
- package/models/models/trouble/trouble-registration.d.ts +6 -73
- package/models/models/trouble/trouble-registration.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +17 -188
- package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-builders.d.ts +11 -0
- package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
- package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +6 -9
- package/models/types/cancellable-promise.d.ts.map +1 -1
- package/models/utils/await-future-call.d.ts +9 -21
- package/models/utils/await-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-future-call.d.ts +8 -19
- package/models/utils/cancellable-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-service.d.ts +14 -23
- package/models/utils/cancellable-service.d.ts.map +1 -1
- package/models/utils/conversion-utils.d.ts +8 -48
- package/models/utils/conversion-utils.d.ts.map +1 -1
- package/models/utils/persistence-store.d.ts +1 -1
- package/models/utils/service.d.ts +14 -48
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +4 -4
- package/models/utils/services/vfs/daily/service.d.ts +4 -4
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +3 -3
- package/{software-info-registration-CKlTQPet.js → software-info-registration-C8kf-pBB.js} +551 -530
- package/software-info-registration-C8kf-pBB.js.map +1 -0
- package/{software-info-registration-GUbTY4KD.cjs → software-info-registration-Y1iADHWT.cjs} +522 -501
- package/software-info-registration-Y1iADHWT.cjs.map +1 -0
- package/testing/index.d.ts +28 -33
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +1 -1
- package/testing.cjs.map +1 -1
- package/testing.js +1 -1
- package/testing.js.map +1 -1
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
- package/ui/components/connection-dev-button/index.d.ts +36 -0
- package/ui/components/connection-dev-button/index.d.ts.map +1 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
- package/ui/components/index.d.ts +1 -0
- package/ui/components/index.d.ts.map +1 -1
- package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
- package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
- package/ui/hooks/use-function-warmup.d.ts +4 -14
- package/ui/hooks/use-function-warmup.d.ts.map +1 -1
- package/ui/hooks/use-kos-date-formats.d.ts +15 -29
- package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
- package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts +11 -23
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/ui/hooks/use-kos-time-formats.d.ts +16 -31
- package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
- package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
- package/ui/hooks/view-model/use-view-model.d.ts +6 -31
- package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
- package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
- package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
- package/software-info-registration-CKlTQPet.js.map +0 -1
- package/software-info-registration-GUbTY4KD.cjs.map +0 -1
|
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core';
|
|
|
2
2
|
import { StorageDeviceModel } from './storage-device-model';
|
|
3
3
|
import { StorageDeviceOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Registration for {@link StorageDeviceModel}.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* ## type
|
|
10
|
-
* The type property is a string that identifies the model type.
|
|
11
|
-
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
-
* used when declaring dependencies on models.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
*
|
|
17
|
-
* @kosDependency({modelType: StorageDevice.type, id: "storageDeviceId"})
|
|
18
|
-
* private storageDeviceModel: StorageDeviceModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new StorageDeviceModel instances.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
28
|
-
*
|
|
29
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
-
* in this case and the existing model will be returned in its current state.
|
|
7
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
8
|
+
* `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
|
|
31
9
|
*
|
|
32
10
|
* @example
|
|
33
11
|
* ```typescript
|
|
34
|
-
* const model = StorageDevice.
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
12
|
+
* const model = StorageDevice.instance("storageDeviceId").options(options).build();
|
|
37
13
|
* ```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* ## predicate
|
|
42
|
-
*
|
|
43
|
-
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a StorageDeviceModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (StorageDevice.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to StorageDeviceModel
|
|
52
|
-
* // and the compiler will know that the model has the StorageDeviceModel interface
|
|
53
|
-
* model.updateAvailability(false);
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* ## registration
|
|
58
|
-
*
|
|
59
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*
|
|
65
|
-
* In an application registration file you can declare the model registration as follows:
|
|
66
|
-
*
|
|
67
|
-
* **registration.ts**
|
|
68
|
-
* ```typescript
|
|
69
|
-
* import { StorageDevice } from "@kos-ui/project-models";
|
|
70
|
-
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
71
|
-
*
|
|
72
|
-
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
73
|
-
*
|
|
74
|
-
* KosModelRegistry.dispense
|
|
75
|
-
* .models()
|
|
76
|
-
* .model(StorageDevice);
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The storageDevice model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
|
|
82
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
83
|
-
|
|
84
|
-
* */
|
|
14
|
+
*/
|
|
85
15
|
export declare const StorageDevice: KosModelRegistrationFactory<StorageDeviceModel, StorageDeviceOptions>;
|
|
86
16
|
//# sourceMappingURL=storage-device-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-device-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"storage-device-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,uEAMxB,CAAC"}
|
|
@@ -2,28 +2,8 @@ import { KosParentAware } from '../../../../core';
|
|
|
2
2
|
// --------------- StorageDevice ---------------
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* This interface defines the complete configuration structure for individual storage devices,
|
|
8
|
-
* including hardware identification, mount information, and runtime metrics. These options
|
|
9
|
-
* are typically populated from storage device discovery services and WebSocket updates.
|
|
10
|
-
*
|
|
11
|
-
* @example Basic Usage
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const device = StorageDevice.instance('usb-backup')
|
|
14
|
-
* .options({
|
|
15
|
-
* mountDir: '/media/usb-drive',
|
|
16
|
-
* vendor: 'SanDisk',
|
|
17
|
-
* model: 'Ultra USB 3.0',
|
|
18
|
-
* label: 'BACKUP_DRIVE',
|
|
19
|
-
* nodeId: 'primary',
|
|
20
|
-
* local: true,
|
|
21
|
-
* removed: false,
|
|
22
|
-
* runTimeMs: 1800000,
|
|
23
|
-
* syspath: '/sys/devices/usb1'
|
|
24
|
-
* })
|
|
25
|
-
* .build();
|
|
26
|
-
* ```
|
|
5
|
+
* Options for a {@link StorageDeviceModel}, populated from storage device
|
|
6
|
+
* discovery and topic updates.
|
|
27
7
|
*
|
|
28
8
|
* @kosService core.storage
|
|
29
9
|
* @category Model Configuration
|
|
@@ -31,87 +11,41 @@ import { KosParentAware } from '../../../../core';
|
|
|
31
11
|
*/
|
|
32
12
|
export interface StorageDeviceOptions extends KosParentAware {
|
|
33
13
|
/**
|
|
34
|
-
*
|
|
35
|
-
* Empty string indicates the device is not currently mounted.
|
|
36
|
-
*
|
|
37
|
-
* @example "/media/usb-drive"
|
|
38
|
-
* @example "/mnt/backup-storage"
|
|
39
|
-
* @example "" // Not mounted
|
|
14
|
+
* Directory the device is mounted at, such as `/media/usb-drive`; empty when not mounted.
|
|
40
15
|
*/
|
|
41
16
|
mountDir: string;
|
|
42
17
|
|
|
43
18
|
/**
|
|
44
|
-
*
|
|
45
|
-
* When true, the device is no longer accessible and mount operations will fail.
|
|
19
|
+
* Whether the device has been physically removed.
|
|
46
20
|
*
|
|
47
21
|
* @default false
|
|
48
22
|
*/
|
|
49
23
|
removed: boolean;
|
|
50
24
|
|
|
51
|
-
/**
|
|
52
|
-
* Hardware vendor/manufacturer name of the storage device.
|
|
53
|
-
* Used for device identification and display purposes.
|
|
54
|
-
*
|
|
55
|
-
* @example "SanDisk"
|
|
56
|
-
* @example "Western Digital"
|
|
57
|
-
* @example "Samsung"
|
|
58
|
-
*/
|
|
25
|
+
/** Hardware vendor, such as `SanDisk`. */
|
|
59
26
|
vendor: string;
|
|
60
27
|
|
|
61
|
-
/**
|
|
62
|
-
* Total runtime in milliseconds since the device was first connected.
|
|
63
|
-
* Tracks cumulative usage time for analytics and maintenance scheduling.
|
|
64
|
-
*
|
|
65
|
-
* @example 1800000 // 30 minutes
|
|
66
|
-
* @example 3600000 // 1 hour
|
|
67
|
-
*/
|
|
28
|
+
/** Milliseconds since the device was connected. */
|
|
68
29
|
runTimeMs: number;
|
|
69
30
|
|
|
70
|
-
/**
|
|
71
|
-
* Hardware model name/number of the storage device.
|
|
72
|
-
* Combined with vendor for complete device identification.
|
|
73
|
-
*
|
|
74
|
-
* @example "Ultra USB 3.0"
|
|
75
|
-
* @example "My Passport"
|
|
76
|
-
* @example "EVO Select 64GB"
|
|
77
|
-
*/
|
|
31
|
+
/** Hardware model name, such as `Ultra USB 3.0`. */
|
|
78
32
|
model: string;
|
|
79
33
|
|
|
80
|
-
/**
|
|
81
|
-
* KOS node identifier where this storage device is physically connected.
|
|
82
|
-
* Used in multi-node systems to track device distribution.
|
|
83
|
-
*
|
|
84
|
-
* @example "primary"
|
|
85
|
-
* @example "secondary"
|
|
86
|
-
* @example "embedded-node-1"
|
|
87
|
-
*/
|
|
34
|
+
/** Id of the KOS node the device is connected to. */
|
|
88
35
|
nodeId: string;
|
|
89
36
|
|
|
90
37
|
/**
|
|
91
|
-
*
|
|
92
|
-
* Determines accessibility and operation capabilities from current context.
|
|
38
|
+
* Whether the device is connected to the local node.
|
|
93
39
|
*
|
|
94
40
|
* @default true
|
|
95
41
|
*/
|
|
96
42
|
local: boolean;
|
|
97
43
|
|
|
98
|
-
/**
|
|
99
|
-
* File system label/name assigned to the storage device.
|
|
100
|
-
* Used for user-friendly identification and mount point organization.
|
|
101
|
-
*
|
|
102
|
-
* @example "BACKUP_DRIVE"
|
|
103
|
-
* @example "CONFIG_STORAGE"
|
|
104
|
-
* @example "DATA_ARCHIVE"
|
|
105
|
-
*/
|
|
44
|
+
/** File system label, such as `BACKUP_DRIVE`. */
|
|
106
45
|
label: string;
|
|
107
46
|
|
|
108
47
|
/**
|
|
109
|
-
*
|
|
110
|
-
* Low-level hardware identifier for device tracking and diagnostics.
|
|
111
|
-
*
|
|
112
|
-
* @example "/sys/devices/pci0000:00/usb1/1-2"
|
|
113
|
-
* @example "/sys/devices/mmc0/mmc0:0001"
|
|
114
|
-
* @example "/sys/devices/platform/sdhci"
|
|
48
|
+
* Linux sysfs path of the device, such as `/sys/devices/pci0000:00/usb1/1-2`.
|
|
115
49
|
*/
|
|
116
50
|
syspath: string;
|
|
117
51
|
}
|
|
@@ -119,11 +53,8 @@ export interface StorageDeviceOptions extends KosParentAware {
|
|
|
119
53
|
// --------------- StorageDeviceContainer ---------------
|
|
120
54
|
|
|
121
55
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* The container model manages collections of storage devices and handles real-time
|
|
125
|
-
* updates via WebSocket topics. Currently uses an empty configuration object as
|
|
126
|
-
* the container's behavior is primarily driven by discovered storage devices.
|
|
56
|
+
* Options for a {@link StorageDeviceContainerModel}. The container takes none;
|
|
57
|
+
* its contents come from storage device discovery.
|
|
127
58
|
*
|
|
128
59
|
* @kosService core.storage
|
|
129
60
|
* @category Model Configuration
|
|
@@ -4,39 +4,20 @@ import { PublicModelInterface } from '../../../core/types';
|
|
|
4
4
|
import { StudioPropertiesOptions } from './types';
|
|
5
5
|
export declare const MODEL_TYPE = "studio-properties-model";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* connected clients maintain consistent Studio state information.
|
|
13
|
-
*
|
|
14
|
-
* ## Key Features
|
|
15
|
-
* - **Real-time synchronization** - Properties update automatically via `/kos/studio/properties` topic
|
|
16
|
-
* - **Connection-scoped access** - Properties are specific to individual Studio VM connections
|
|
17
|
-
* - **Fallback handling** - Graceful degradation with default values when Studio is unavailable
|
|
18
|
-
* - **Observable properties** - Create reactive computed values for any property key
|
|
19
|
-
* - **Session management** - Automatic WebSocket session lifecycle with proper cleanup
|
|
20
|
-
*
|
|
21
|
-
* ## Topic-Based Reactivity
|
|
22
|
-
* The model listens to this KOS topic for real-time synchronization:
|
|
23
|
-
* - **`/kos/studio/properties`** - Broadcasts Studio property changes with connection-specific routing
|
|
24
|
-
*
|
|
25
|
-
* ## Common Use Cases
|
|
26
|
-
* - **Studio integration status** - Check if legacy tools or specific Studio features are enabled
|
|
27
|
-
* - **Tool configuration** - Access Studio tool settings and preferences for UI adaptation
|
|
28
|
-
* - **Connection management** - Track Studio connection state and properties for diagnostics
|
|
29
|
-
* - **Feature flags** - Access Studio-specific feature toggles and experimental settings
|
|
7
|
+
* Runtime properties of one KOS Studio connection, such as which Studio tools
|
|
8
|
+
* are enabled. `initializePropertiesSession` loads the properties for the
|
|
9
|
+
* connection and subscribes to its `/kos/studio/properties` topic; when the
|
|
10
|
+
* properties cannot be loaded it falls back to defaults.
|
|
11
|
+
* `terminatePropertiesSession` ends the subscription.
|
|
30
12
|
*
|
|
31
13
|
* @interface
|
|
32
|
-
* @example
|
|
14
|
+
* @example
|
|
33
15
|
* ```typescript
|
|
34
|
-
* const studioProps =
|
|
35
|
-
* .options({ connectionId
|
|
16
|
+
* const studioProps = StudioProperties.instance("studio-conn-1")
|
|
17
|
+
* .options({ connectionId })
|
|
36
18
|
* .build();
|
|
37
|
-
*
|
|
38
19
|
* await studioProps.initializePropertiesSession();
|
|
39
|
-
* const
|
|
20
|
+
* const legacyTools = studioProps.get("kos.studio.tool.legacy");
|
|
40
21
|
* ```
|
|
41
22
|
*
|
|
42
23
|
* @group KOS Model
|
|
@@ -70,14 +51,10 @@ export declare class StudioPropertiesModelImpl implements IKosDataModel, IKosIde
|
|
|
70
51
|
* @internal
|
|
71
52
|
*/
|
|
72
53
|
load(): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Terminates the WebSocket session for Studio properties.
|
|
75
|
-
* Cleans up subscriptions to prevent memory leaks.
|
|
76
|
-
*/
|
|
54
|
+
/** Ends the `/kos/studio/properties` subscription. */
|
|
77
55
|
terminatePropertiesSession(): Promise<void>;
|
|
78
56
|
/**
|
|
79
|
-
*
|
|
80
|
-
* Loads initial properties and subscribes to update topics.
|
|
57
|
+
* Loads the connection's properties and subscribes to its `/kos/studio/properties` topic.
|
|
81
58
|
*/
|
|
82
59
|
initializePropertiesSession(): Promise<void>;
|
|
83
60
|
/**
|
|
@@ -87,9 +64,9 @@ export declare class StudioPropertiesModelImpl implements IKosDataModel, IKosIde
|
|
|
87
64
|
*/
|
|
88
65
|
get(key: string): any;
|
|
89
66
|
/**
|
|
90
|
-
*
|
|
67
|
+
* A computed value that tracks one property.
|
|
91
68
|
* @param key Property key to observe
|
|
92
|
-
* @returns
|
|
69
|
+
* @returns Computed value of the property
|
|
93
70
|
*/
|
|
94
71
|
createObservableProperty(key: string): import('mobx').IComputedValue<any>;
|
|
95
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio-properties-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/studio-properties/studio-properties-model.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAIpD
|
|
1
|
+
{"version":3,"file":"studio-properties-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/studio-properties/studio-properties-model.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAMlD;;;GAGG;AACH,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,CAAC,WAAW,CAA6B;IAChD,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAmB;IACjC,kDAAkD;IAClD,OAAO,CAAC,IAAI,CAA+B;gBAEzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,kBAAkB;IAW7B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,sDAAsD;IAChD,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjD;;OAEG;IACG,2BAA2B;IA8BjC;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAIrB;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,MAAM;CAGrC"}
|
|
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core/core/registration';
|
|
|
2
2
|
import { StudioPropertiesOptions } from './types';
|
|
3
3
|
import { StudioPropertiesModel } from './studio-properties-model';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Registration for {@link StudioPropertiesModel}.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* ## type
|
|
10
|
-
* The type property is a string that identifies the model type.
|
|
11
|
-
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
-
* used when declaring dependencies on models.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
*
|
|
17
|
-
* @kosDependency({modelType: StudioProperties.type, id: "studioPropertiesId"})
|
|
18
|
-
* private studioPropertiesModel: StudioPropertiesModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new StudioPropertiesModel instances.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
28
|
-
*
|
|
29
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
-
* in this case and the existing model will be returned in its current state.
|
|
7
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
8
|
+
* `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
|
|
31
9
|
*
|
|
32
10
|
* @example
|
|
33
11
|
* ```typescript
|
|
34
|
-
* const model = StudioProperties.
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
12
|
+
* const model = StudioProperties.instance("studioPropertiesId").options(options).build();
|
|
37
13
|
* ```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* ## predicate
|
|
42
|
-
*
|
|
43
|
-
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a StudioPropertiesModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (StudioProperties.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to StudioPropertiesModel
|
|
52
|
-
* // and the compiler will know that the model has the StudioPropertiesModel interface
|
|
53
|
-
* model.updateAvailability(false);
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* ## registration
|
|
58
|
-
*
|
|
59
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*
|
|
65
|
-
* In an application registration file you can declare the model registration as follows:
|
|
66
|
-
*
|
|
67
|
-
* **registration.ts**
|
|
68
|
-
* ```typescript
|
|
69
|
-
* import { StudioProperties } from "@kos-ui/project-models";
|
|
70
|
-
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
71
|
-
*
|
|
72
|
-
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
73
|
-
*
|
|
74
|
-
* KosModelRegistry.dispense
|
|
75
|
-
* .models()
|
|
76
|
-
* .model(StudioProperties);
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The studioProperties model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
|
|
82
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
83
|
-
|
|
84
|
-
* */
|
|
14
|
+
*/
|
|
85
15
|
export declare const StudioProperties: KosModelRegistrationFactory<StudioPropertiesModel, StudioPropertiesOptions>;
|
|
86
16
|
//# sourceMappingURL=studio-properties-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio-properties-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/studio-properties/studio-properties-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"studio-properties-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/studio-properties/studio-properties-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,6EAM3B,CAAC"}
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* This interface defines the configuration structure for Studio properties models,
|
|
5
|
-
* which manage real-time access to KOS Studio runtime properties and settings.
|
|
6
|
-
* The connection ID serves as the primary routing mechanism for Studio-specific
|
|
7
|
-
* property synchronization.
|
|
8
|
-
*
|
|
9
|
-
* @example Basic Usage
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const studioProps = StudioPropertiesModel.instance('dev-studio')
|
|
12
|
-
* .options({ connectionId: 'vm-development-001' })
|
|
13
|
-
* .build();
|
|
14
|
-
* ```
|
|
2
|
+
* Options for a {@link StudioPropertiesModel}.
|
|
15
3
|
*
|
|
16
4
|
* @category Model Configuration
|
|
17
5
|
* @category System Integration
|
|
18
6
|
*/
|
|
19
7
|
export interface StudioPropertiesOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Studio VM connection identifier for property routing and WebSocket targeting.
|
|
22
|
-
*
|
|
23
|
-
* This ID corresponds to an active Studio connection and determines which Studio
|
|
24
|
-
* instance provides the properties. Each Studio VM connection has unique runtime
|
|
25
|
-
* properties and configuration values.
|
|
26
|
-
*
|
|
27
|
-
* @example "vm-development-local-001"
|
|
28
|
-
* @example "studio-connection-abc123"
|
|
29
|
-
* @example "primary-studio-instance"
|
|
30
|
-
*/
|
|
8
|
+
/** Id of the Studio connection whose properties the model reads. */
|
|
31
9
|
connectionId: string;
|
|
32
10
|
}
|
|
@@ -5,34 +5,30 @@ export interface LocaleOption {
|
|
|
5
5
|
label: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Fold contexts into one descriptor,
|
|
8
|
+
* Fold contexts into one descriptor, earlier entries winning.
|
|
9
9
|
*
|
|
10
|
-
* Precedence is per
|
|
10
|
+
* Precedence is per namespace, not per key or per locale: a namespace declared
|
|
11
11
|
* by two contexts is taken whole from the earlier one, and the later context's
|
|
12
|
-
* locales for that namespace are dropped even where the winner has none.
|
|
13
|
-
*
|
|
14
|
-
* declare — it can never extend or patch one they did.
|
|
12
|
+
* locales for that namespace are dropped even where the winner has none. A later
|
|
13
|
+
* context can add namespaces but cannot extend one an earlier context declared.
|
|
15
14
|
*
|
|
16
15
|
* Each namespace's `basePath` is set to its own context's `path`, so namespaces
|
|
17
16
|
* from different contexts keep resolving against the URL their context is
|
|
18
|
-
* served from.
|
|
19
|
-
*
|
|
20
|
-
* The merged descriptor carries no top-level `path`: with namespaces from
|
|
21
|
-
* several contexts there is no single one, and `basePath` already carries it
|
|
22
|
-
* per namespace, which is what `defaultResolver` reads.
|
|
17
|
+
* served from. The merged descriptor has no top-level `path`, since
|
|
18
|
+
* `defaultResolver` reads `basePath` per namespace.
|
|
23
19
|
*/
|
|
24
20
|
export declare function mergeLocalizationDescriptors(descriptors: Localization[]): Localization;
|
|
25
21
|
/**
|
|
26
22
|
* Every locale any namespace offers, as picker options.
|
|
27
23
|
*
|
|
28
|
-
*
|
|
29
|
-
* enough to offer
|
|
30
|
-
* back at resolve time. Excluded namespaces contribute nothing
|
|
31
|
-
* content-bearing namespace (a brandset)
|
|
32
|
-
*
|
|
24
|
+
* The result is a union across namespaces: one namespace translated into a
|
|
25
|
+
* locale is enough to offer it for the whole app, and namespaces without it fall
|
|
26
|
+
* back at resolve time. Excluded namespaces contribute nothing, which keeps a
|
|
27
|
+
* content-bearing namespace (a brandset) from advertising locales the UI itself
|
|
28
|
+
* cannot render.
|
|
33
29
|
*
|
|
34
|
-
* Labels come from `Intl.DisplayNames
|
|
35
|
-
*
|
|
30
|
+
* Labels come from `Intl.DisplayNames` and are rendered in the locale's own
|
|
31
|
+
* language ("italiano", not "Italian").
|
|
36
32
|
*/
|
|
37
33
|
export declare function collectLocaleOptions(descriptors: Localization[], excludeNamespaces?: string[]): LocaleOption[];
|
|
38
34
|
//# sourceMappingURL=descriptor-merge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-merge.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/translation/descriptor-merge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"descriptor-merge.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/translation/descriptor-merge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,YAAY,EAAE,GAC1B,YAAY,CAad;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EAAE,EAC3B,iBAAiB,GAAE,MAAM,EAAO,GAC/B,YAAY,EAAE,CAsBhB"}
|