@kosdev-code/kos-ui-sdk 3.0.26 → 3.0.28

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.
Files changed (339) hide show
  1. package/.kos.json +2 -1
  2. package/common/events/async-event-bus.d.ts +8 -11
  3. package/common/events/async-event-bus.d.ts.map +1 -1
  4. package/common/events/eventBus.d.ts +1 -18
  5. package/common/events/eventBus.d.ts.map +1 -1
  6. package/core/core/companion-instantiator.d.ts +5 -0
  7. package/core/core/companion-instantiator.d.ts.map +1 -1
  8. package/core/core/decorators/index.d.ts +1 -0
  9. package/core/core/decorators/index.d.ts.map +1 -1
  10. package/core/core/decorators/kos-child.d.ts +2 -3
  11. package/core/core/decorators/kos-child.d.ts.map +1 -1
  12. package/core/core/decorators/kos-companion.d.ts +26 -88
  13. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  14. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
  15. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
  16. package/core/core/decorators/kos-container-aware.d.ts +191 -420
  17. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  18. package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
  19. package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
  20. package/core/core/decorators/kos-execution-context.d.ts +14 -31
  21. package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
  22. package/core/core/decorators/kos-future-aware.d.ts +21 -74
  23. package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
  24. package/core/core/decorators/kos-http-decorators.d.ts +18 -62
  25. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  26. package/core/core/decorators/kos-logger-aware.d.ts +10 -60
  27. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  28. package/core/core/decorators/kos-mixin.d.ts +69 -0
  29. package/core/core/decorators/kos-mixin.d.ts.map +1 -0
  30. package/core/core/decorators/kos-model-effect.d.ts +10 -9
  31. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  32. package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
  33. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
  34. package/core/core/decorators/kos-reload-aware.d.ts +14 -16
  35. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  36. package/core/core/decorators/kos-service-request.d.ts +80 -238
  37. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  38. package/core/core/decorators/kos-state-machine.d.ts +35 -275
  39. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  40. package/core/core/decorators/kos-topic-handler-flow-control.d.ts +11 -3
  41. package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
  42. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  43. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  44. package/core/core/decorators/kos-view-model.d.ts +20 -100
  45. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  46. package/core/core/decorators/kosModel.d.ts.map +1 -1
  47. package/core/core/decorators/kosTopicHandler.d.ts +28 -89
  48. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  49. package/core/core/decorators/propKeys.d.ts +1 -0
  50. package/core/core/decorators/propKeys.d.ts.map +1 -1
  51. package/core/core/indexing/index.d.ts +2 -4
  52. package/core/core/indexing/index.d.ts.map +1 -1
  53. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  54. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  55. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  56. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  57. package/core/core/kos-container-index.d.ts +11 -0
  58. package/core/core/kos-container-index.d.ts.map +1 -1
  59. package/core/core/kos-container-model.d.ts +11 -32
  60. package/core/core/kos-container-model.d.ts.map +1 -1
  61. package/core/core/kos-data-container.d.ts +6 -6
  62. package/core/core/kos-data-container.d.ts.map +1 -1
  63. package/core/core/kosCore.d.ts +7 -4
  64. package/core/core/kosCore.d.ts.map +1 -1
  65. package/core/core/kosModel.d.ts +16 -8
  66. package/core/core/kosModel.d.ts.map +1 -1
  67. package/core/core/kosModelManager.d.ts +2 -3
  68. package/core/core/kosModelManager.d.ts.map +1 -1
  69. package/core/core/lifecycle/constants.d.ts +6 -2
  70. package/core/core/lifecycle/constants.d.ts.map +1 -1
  71. package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
  72. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  73. package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
  74. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  75. package/core/core/lifecycle/model-machine.d.ts +6 -0
  76. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  77. package/core/core/model/kos-fsm-manager.d.ts +6 -0
  78. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  79. package/core/core/model/kos-offline-queue.d.ts +1 -1
  80. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  81. package/core/core/model/service-response-store.d.ts +2 -15
  82. package/core/core/model/service-response-store.d.ts.map +1 -1
  83. package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
  84. package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
  85. package/core/core/registration/model-registration.d.ts.map +1 -1
  86. package/core/core/services/app-startup-service.d.ts +5 -13
  87. package/core/core/services/app-startup-service.d.ts.map +1 -1
  88. package/core/core/services/intent-service.d.ts +3 -12
  89. package/core/core/services/intent-service.d.ts.map +1 -1
  90. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  91. package/core/core/transport/transport.d.ts +1 -1
  92. package/core/core/transport/transport.d.ts.map +1 -1
  93. package/core/core/transport/webSocketTransport.d.ts +10 -0
  94. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  95. package/core/types/model.d.ts +4 -8
  96. package/core/types/model.d.ts.map +1 -1
  97. package/core/types/service-response-store.d.ts +3 -11
  98. package/core/types/service-response-store.d.ts.map +1 -1
  99. package/core/types/utils/kos-fetch.d.ts +25 -37
  100. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  101. package/core/util/abortable-when.d.ts +5 -6
  102. package/core/util/abortable-when.d.ts.map +1 -1
  103. package/core/util/ancestor-path-visitor.d.ts +14 -20
  104. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  105. package/core/util/container-utils.d.ts +26 -159
  106. package/core/util/container-utils.d.ts.map +1 -1
  107. package/core/util/date-utils.d.ts +9 -58
  108. package/core/util/date-utils.d.ts.map +1 -1
  109. package/core/util/debounce.d.ts +1 -8
  110. package/core/util/debounce.d.ts.map +1 -1
  111. package/core/util/kos-fetch.d.ts +1 -1
  112. package/core/util/kos-fetch.d.ts.map +1 -1
  113. package/core/util/kos-model-utils.d.ts +10 -11
  114. package/core/util/kos-model-utils.d.ts.map +1 -1
  115. package/core/util/model-attribute-utils.d.ts +5 -22
  116. package/core/util/model-attribute-utils.d.ts.map +1 -1
  117. package/core/util/model-type-guards.d.ts.map +1 -1
  118. package/core/util/promise-utils.d.ts +1 -26
  119. package/core/util/promise-utils.d.ts.map +1 -1
  120. package/core/util/service-factory.d.ts +5 -23
  121. package/core/util/service-factory.d.ts.map +1 -1
  122. package/core/util/service-request-error.d.ts +3 -5
  123. package/core/util/service-request-error.d.ts.map +1 -1
  124. package/core/util/service-response.d.ts +12 -67
  125. package/core/util/service-response.d.ts.map +1 -1
  126. package/core/util/transport-not-ready-error.d.ts +11 -13
  127. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  128. package/core/util/when-ready.d.ts +1 -8
  129. package/core/util/when-ready.d.ts.map +1 -1
  130. package/index.cjs +692 -11760
  131. package/index.cjs.map +1 -1
  132. package/index.js +774 -11846
  133. package/index.js.map +1 -1
  134. package/models/decorators/future-service.d.ts +7 -7
  135. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  136. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  137. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  138. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  139. package/models/models/browser-router/types/index.d.ts +2 -16
  140. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  141. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  142. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  143. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  144. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  145. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  146. package/models/models/config-bean/config-bean-model.d.ts +23 -66
  147. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  148. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  149. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  150. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  151. package/models/models/device/device-model.d.ts +20 -199
  152. package/models/models/device/device-model.d.ts.map +1 -1
  153. package/models/models/device/device-registration.d.ts +7 -87
  154. package/models/models/device/device-registration.d.ts.map +1 -1
  155. package/models/models/device/types/index.d.ts +5 -34
  156. package/models/models/future/future-aware.d.ts +7 -71
  157. package/models/models/future/future-aware.d.ts.map +1 -1
  158. package/models/models/future/future-model-builder.d.ts +2 -2
  159. package/models/models/future/future-model.d.ts +3 -23
  160. package/models/models/future/future-model.d.ts.map +1 -1
  161. package/models/models/future/future-types.d.ts +28 -145
  162. package/models/models/future/future-types.d.ts.map +1 -1
  163. package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
  164. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
  165. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
  166. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  167. package/models/models/key-value/key-value-model.d.ts +12 -72
  168. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  169. package/models/models/key-value/key-value-registration.d.ts +5 -77
  170. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  171. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  172. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  173. package/models/models/key-value/types/index.d.ts +3 -46
  174. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
  175. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
  176. package/models/models/kos-expression-evaluator/index.d.ts +1 -0
  177. package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
  178. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
  179. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  180. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  181. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  182. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  183. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  184. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  185. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  186. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  187. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  188. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  189. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  190. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  191. package/models/models/kos-time/types/index.d.ts +3 -58
  192. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  193. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  194. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  195. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  196. package/models/models/log-block/log-block-model.d.ts +5 -168
  197. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  198. package/models/models/log-block/log-block-registration.d.ts +5 -75
  199. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  200. package/models/models/log-block/types/index.d.ts +14 -81
  201. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  202. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  203. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  204. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  205. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  206. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  207. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  208. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  209. package/models/models/log-stream/types/index.d.ts +5 -60
  210. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  211. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  212. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  213. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  214. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  215. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  216. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  217. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  218. package/models/models/network-interface/types/index.d.ts +2 -16
  219. package/models/models/ota/ota-model.d.ts +11 -39
  220. package/models/models/ota/ota-model.d.ts.map +1 -1
  221. package/models/models/ota/ota-registration.d.ts +5 -77
  222. package/models/models/ota/ota-registration.d.ts.map +1 -1
  223. package/models/models/ota/types/index.d.ts +2 -141
  224. package/models/models/region-info/types/index.d.ts +19 -99
  225. package/models/models/region-info/types/index.d.ts.map +1 -1
  226. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  227. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  228. package/models/models/software-info/software-info-model.d.ts +3 -39
  229. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  230. package/models/models/software-info/software-info-registration.d.ts +6 -73
  231. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  232. package/models/models/software-info/types/index.d.ts +6 -20
  233. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  234. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  235. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  236. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  237. package/models/models/state-bean/types/index.d.ts +4 -84
  238. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  239. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  240. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  241. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  242. package/models/models/state-prop/types/index.d.ts +5 -37
  243. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  244. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  245. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  246. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  247. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  248. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  249. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  250. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  251. package/models/models/storage-device/types/index.d.ts +13 -82
  252. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  253. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  254. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  255. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  256. package/models/models/studio-properties/types/index.d.ts +2 -24
  257. package/models/models/translation/descriptor-merge.d.ts +13 -17
  258. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  259. package/models/models/translation/services/translation-services.d.ts +19 -77
  260. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  261. package/models/models/translation/test-harness.d.ts +6 -8
  262. package/models/models/translation/test-harness.d.ts.map +1 -1
  263. package/models/models/translation/translation-container-model.d.ts +7 -59
  264. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  265. package/models/models/translation/translation-container-registration.d.ts +6 -73
  266. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  267. package/models/models/translation/translation-model.d.ts +17 -50
  268. package/models/models/translation/translation-model.d.ts.map +1 -1
  269. package/models/models/translation/translation-registration.d.ts +6 -73
  270. package/models/models/translation/translation-registration.d.ts.map +1 -1
  271. package/models/models/translation/types/index.d.ts +51 -276
  272. package/models/models/trouble/trouble-registration.d.ts +6 -73
  273. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  274. package/models/models/trouble/types/index.d.ts +17 -188
  275. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  276. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  277. package/models/models/trouble-container/trouble-builders.d.ts +11 -0
  278. package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
  279. package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
  280. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  281. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  282. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  283. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  284. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  285. package/models/types/cancellable-promise.d.ts +6 -9
  286. package/models/types/cancellable-promise.d.ts.map +1 -1
  287. package/models/utils/await-future-call.d.ts +9 -21
  288. package/models/utils/await-future-call.d.ts.map +1 -1
  289. package/models/utils/cancellable-future-call.d.ts +8 -19
  290. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  291. package/models/utils/cancellable-service.d.ts +14 -23
  292. package/models/utils/cancellable-service.d.ts.map +1 -1
  293. package/models/utils/conversion-utils.d.ts +8 -48
  294. package/models/utils/conversion-utils.d.ts.map +1 -1
  295. package/models/utils/persistence-store.d.ts +1 -1
  296. package/models/utils/service.d.ts +14 -48
  297. package/models/utils/service.d.ts.map +1 -1
  298. package/models/utils/services/kos/daily/service.d.ts +4 -4
  299. package/models/utils/services/vfs/daily/service.d.ts +4 -4
  300. package/models/utils/timer-manager.d.ts.map +1 -1
  301. package/package.json +2 -2
  302. package/{index-D52vEGXT.cjs → software-info-registration-Le3V0a6v.cjs} +11906 -416
  303. package/software-info-registration-Le3V0a6v.cjs.map +1 -0
  304. package/{index-Csq0zQtb.js → software-info-registration-kSGacOka.js} +12116 -625
  305. package/software-info-registration-kSGacOka.js.map +1 -0
  306. package/testing/index.d.ts +32 -34
  307. package/testing/index.d.ts.map +1 -1
  308. package/testing.cjs +2 -1
  309. package/testing.cjs.map +1 -1
  310. package/testing.js +2 -1
  311. package/testing.js.map +1 -1
  312. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
  313. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
  314. package/ui/components/connection-dev-button/index.d.ts +36 -0
  315. package/ui/components/connection-dev-button/index.d.ts.map +1 -0
  316. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
  317. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
  318. package/ui/components/index.d.ts +1 -0
  319. package/ui/components/index.d.ts.map +1 -1
  320. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  321. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  322. package/ui/hooks/use-function-warmup.d.ts +4 -14
  323. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  324. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  325. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  326. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  327. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  328. package/ui/hooks/use-kos-regions.d.ts +11 -23
  329. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  330. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  331. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  332. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  333. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  334. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  335. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  336. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  337. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  338. package/index-Csq0zQtb.js.map +0 -1
  339. package/index-D52vEGXT.cjs.map +0 -1
@@ -1,83 +1,16 @@
1
1
  import { KosModelRegistrationBean } from '../../../core';
2
2
  import { KosStateProp, StatePropOptions } from './types';
3
3
  /**
4
- * # StateProp
4
+ * Registration for {@link KosStateProp}.
5
5
  *
6
- * The registration bean includes convenience methods for creating and working with StatePropModel instances.
7
- *
8
- * ## type
9
- * The type property is a string that identifies the model type.
10
- * 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
11
- * used when declaring dependencies on models.
6
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
7
+ * `factory(id)(options)` creates the model, or returns the existing one when the id is already in use. `predicate` narrows a model to `KosStateProp`.
8
+ * Spread `registration` into an application's model registry.
12
9
  *
13
10
  * @example
14
11
  * ```typescript
15
- *
16
- * @kosDependency({modelType: StateProp.type, id: "statePropId"})
17
- * private statePropModel: StatePropModel;
12
+ * const model = StateProp.factory("statePropId")(options);
18
13
  * ```
19
- *
20
- *
21
- * ## factory
22
- *
23
- * The factory method creates a factory function that can be used to create new StatePropModel instances.
24
- *
25
-
26
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
27
- *
28
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
29
- * in this case and the existing model will be returned in its current state.
30
- *
31
- * @example
32
- * ```typescript
33
- * const model = StateProp.factory("statePropId")({
34
- * // Add option data
35
- * });
36
- * ```
37
-
38
-
39
- *
40
- * ## predicate
41
- *
42
- * [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 StatePropModel.
43
- *
44
- * @example
45
- * ```typescript
46
- *
47
- * const model: IKosDataModel = ...; // some model
48
- *
49
- * if (StateProp.predicate(model)) {
50
- * // if the function evaluates to true, the model is narrowed down to StatePropModel
51
- * // and the compiler will know that the model has the StatePropModel interface
52
- * model.updateAvailability(false);
53
- * }
54
- * ```
55
- *
56
- * ## registration
57
- *
58
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
59
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
60
- *
61
- *
62
- * @example
63
- *
64
- * In an application registration file you can declare the model registration as follows:
65
- *
66
- * **registration.ts**
67
- * ```typescript
68
- * import { StateProp } from "@kosdev-code/kos-dispense-sdk";
69
- * ...
70
- * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
71
- * export const kosModels: IKosRegistry["models"] = {
72
- * ...StateProp.registration,
73
- * };
74
- * ```
75
- *
76
- * ## registration.singleton
77
-
78
- * The stateProp 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.
79
- * If the factory function is called with an ID that already exists, the existing model will be returned.
80
-
81
- * */
14
+ */
82
15
  export declare const StateProp: Readonly<KosModelRegistrationBean<KosStateProp, StatePropOptions>>;
83
16
  //# sourceMappingURL=state-prop-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state-prop-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-prop/state-prop-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EK;AACL,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC9B,wBAAwB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAWzD,CAAC"}
1
+ {"version":3,"file":"state-prop-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-prop/state-prop-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC9B,wBAAwB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAWzD,CAAC"}
@@ -1,54 +1,22 @@
1
1
  import { StatePropertyTypes } from '../../types';
2
2
  /**
3
- * Configuration options for StateProp model instances.
4
- *
5
- * This interface defines the configuration options for the StateProp model,
6
- * specifying which state path and attribute the model should monitor for
7
- * focused property access.
8
- *
9
- * @example Basic Usage
10
- * ```typescript
11
- * const deviceOnline = StateProp.instance('device-online')
12
- * .options({
13
- * path: 'device.operational.status',
14
- * attribute: 'online'
15
- * })
16
- * .build();
17
- * ```
3
+ * Options for a {@link StateProp}: the state path and the attribute within it.
4
+ * These are the parameters of `@kosStateProp`.
18
5
  *
19
6
  * @kosService core.state-prop
20
7
  * @category Model Configuration
21
8
  * @category State Management
22
9
  */
23
10
  export interface StatePropOptions {
24
- /**
25
- * State path to monitor, matching the StateBean path structure.
26
- * Uses dot notation hierarchy corresponding to `/kos/state/{path}` WebSocket topic.
27
- *
28
- * @example "device.operational.status"
29
- * @example "assembly.pumps.pump1"
30
- * @example "system.health.metrics"
31
- */
11
+ /** State path of the bean that holds the attribute. */
32
12
  path: string;
33
13
 
34
- /**
35
- * Specific attribute name within the state path to access.
36
- * This corresponds to a property key within the StateBean's properties Map.
37
- *
38
- * @example "online"
39
- * @example "temperature"
40
- * @example "flowRate"
41
- * @example "active"
42
- */
14
+ /** Name of the property within the state bean. */
43
15
  attribute: string;
44
16
  }
45
17
 
46
18
  /**
47
- * State Property Model interface - manages access to a single state property.
48
- *
49
- * This interface represents the public API for StateProp models, providing focused
50
- * access to individual properties within a StateBean through automatic dependency
51
- * management and reactive value updates.
19
+ * Public API of a {@link StateProp}.
52
20
  *
53
21
  * @kosService core.state-prop
54
22
  * @group KOS Model
@@ -7,281 +7,15 @@ import { StorageDeviceContainerOptions } from './types';
7
7
  export declare const MODEL_TYPE = "storage-device-container-model";
8
8
  export declare const TOPIC_STORAGE_AVAILABILITY = "/kos/storage";
9
9
  /**
10
- * StorageDeviceContainer - Manages collections of storage devices with real-time discovery.
10
+ * Holds a {@link StorageDeviceModel} for each storage device (partition) the
11
+ * device reports. The container loads the devices on load and reconciles them
12
+ * on each `/kos/storage` topic: models for devices missing from the payload are
13
+ * removed, existing ones are updated in place and new ones are added.
11
14
  *
12
- * The StorageDeviceContainer model provides centralized management of multiple storage devices
13
- * connected to KOS systems. It automatically discovers devices through REST API calls and
14
- * maintains real-time synchronization via WebSocket topics, handling device insertion,
15
- * removal, and state updates across the entire storage ecosystem.
16
- *
17
- * ## Key Features
18
- * - **Automatic Device Discovery** - Scans and loads all available storage devices
19
- * - **Real-time Synchronization** - WebSocket updates for insertion/removal events
20
- * - **Collection Management** - Add, remove, and query storage device collections
21
- * - **Availability Monitoring** - Track overall storage availability status
22
- * - **Volume Access** - Direct access to managed storage device instances
23
- * - **Parent-Child Architecture** - Proper lifecycle management for contained devices
24
- *
25
- * ## Topic-Based Reactivity
26
- * The model listens to these KOS topics for real-time synchronization:
27
- * - **`/kos/storage`** - Storage device availability changes (insertion/removal events)
28
- * - Payload: `StorageDeviceResponse[]` - Array of current storage device states
29
- * - Triggers automatic model updates, additions, and removals
30
- * - Handles both physical device changes and mount/unmount operations
31
- *
32
- * ## Storage Management Operations
33
- * The container provides comprehensive storage device management:
34
- * - **Device Lifecycle**: Automatic creation and cleanup of StorageDevice models
35
- * - **State Synchronization**: Real-time updates from system storage changes
36
- * - **Collection Queries**: Access devices by ID, status, or availability
37
- * - **Volume Tracking**: Monitor mounted and available storage volumes
38
- *
39
- * ## Common Use Cases
40
- * - **Storage Management Dashboard** - Display all connected storage devices
41
- * - **File Transfer Interface** - Select available storage for operations
42
- * - **System Monitoring** - Track storage availability and health
43
- * - **Backup Management** - Identify backup destination devices
44
- * - **Multi-node Storage** - Manage distributed storage across KOS nodes
45
- * - **Device Diagnostics** - Monitor storage device runtime and status
46
- *
47
- * @example Basic Storage Container Usage
48
- * ```typescript
49
- * // Create storage device container for system management
50
- * const storageContainer = StorageDeviceContainer.instance('main-storage')
51
- * .options({}) // Empty configuration - behavior driven by discovery
52
- * .build();
53
- *
54
- * // Check overall storage availability
55
- * console.log(`Storage available: ${storageContainer.isStorageInserted}`);
56
- * console.log(`Total volumes: ${storageContainer.volumes.length}`);
57
- *
58
- * // Access individual storage devices
59
- * const usbDevice = storageContainer.getModel('usb-drive-1');
60
- * if (usbDevice && !usbDevice.removed) {
61
- * console.log(`USB device mounted at: ${usbDevice.mountDir}`);
62
- * }
63
- * ```
64
- *
65
- * @example Storage Device Discovery and Management
66
- * ```typescript
67
- * // Container automatically handles device discovery
68
- * const storageManager = StorageDeviceContainer.instance('storage-mgr')
69
- * .options({})
70
- * .build();
71
- *
72
- * // Monitor storage changes with reactive patterns
73
- * const monitorStorageChanges = () => {
74
- * // Container automatically updates via /kos/storage topic
75
- * const availableDevices = storageManager.data.filter(device =>
76
- * !device.removed && device.mountDir
77
- * );
78
- *
79
- * const localDevices = availableDevices.filter(device => device.local);
80
- * const remoteDevices = availableDevices.filter(device => !device.local);
81
- *
82
- * console.log(`Available storage: ${availableDevices.length} devices`);
83
- * console.log(`Local: ${localDevices.length}, Remote: ${remoteDevices.length}`);
84
- *
85
- * return {
86
- * total: availableDevices.length,
87
- * local: localDevices.length,
88
- * remote: remoteDevices.length,
89
- * devices: availableDevices
90
- * };
91
- * };
92
- * ```
93
- *
94
- * @example React Storage Management Interface
95
- * ```typescript
96
- * const StorageManagerComponent: React.FC = kosComponent(() => {
97
- * const storageContainer = useModel(StorageDeviceContainer, 'storage-manager');
98
- *
99
- * // Reactive data automatically updates via WebSocket
100
- * const availableDevices = storageContainer.volumes.filter(device =>
101
- * !device.removed && device.mountDir
102
- * );
103
- *
104
- * const removedDevices = storageContainer.volumes.filter(device =>
105
- * device.removed
106
- * );
107
- *
108
- * return (
109
- * <div className="storage-manager">
110
- * <div className="storage-status">
111
- * <h2>Storage Overview</h2>
112
- * <div className="status-indicator">
113
- * <span className={storageContainer.isStorageInserted ? 'online' : 'offline'}>
114
- * {storageContainer.isStorageInserted ? 'Storage Available' : 'No Storage'}
115
- * </span>
116
- * </div>
117
- * <div className="device-count">
118
- * Total Devices: {storageContainer.volumes.length}
119
- * </div>
120
- * </div>
121
- *
122
- * <div className="device-sections">
123
- * <section className="available-devices">
124
- * <h3>Available Storage ({availableDevices.length})</h3>
125
- * {availableDevices.map(device => (
126
- * <StorageDeviceCard key={device.id} device={device} />
127
- * ))}
128
- * </section>
129
- *
130
- * {removedDevices.length > 0 && (
131
- * <section className="removed-devices">
132
- * <h3>Recently Removed ({removedDevices.length})</h3>
133
- * {removedDevices.map(device => (
134
- * <StorageDeviceCard key={device.id} device={device} />
135
- * ))}
136
- * </section>
137
- * )}
138
- * </div>
139
- * </div>
140
- * );
141
- * });
142
- * ```
143
- *
144
- * @example Storage Device Filtering and Queries
145
- * ```typescript
146
- * // Create storage container for advanced device management
147
- * const storageController = StorageDeviceContainer.instance('storage-ctrl')
148
- * .options({})
149
- * .build();
150
- *
151
- * // Helper functions for device filtering
152
- * const getStorageQueries = (container: StorageDeviceContainer) => ({
153
- * // Get all available (mounted and not removed) devices
154
- * getAvailableDevices: () =>
155
- * container.data.filter(device => !device.removed && device.mountDir),
156
- *
157
- * // Get devices by specific node
158
- * getDevicesByNode: (nodeId: string) =>
159
- * container.data.filter(device => device.nodeId === nodeId),
160
- *
161
- * // Get local vs remote devices
162
- * getLocalDevices: () =>
163
- * container.data.filter(device => device.local),
164
- *
165
- * // Get devices by vendor
166
- * getDevicesByVendor: (vendor: string) =>
167
- * container.data.filter(device =>
168
- * device.vendor.toLowerCase().includes(vendor.toLowerCase())
169
- * ),
170
- *
171
- * // Get backup-suitable devices (available with sufficient runtime)
172
- * getBackupDevices: () =>
173
- * container.data.filter(device =>
174
- * !device.removed &&
175
- * device.mountDir &&
176
- * device.runTimeMs > 300000 // More than 5 minutes runtime
177
- * ),
178
- *
179
- * // Get device statistics
180
- * getStorageStats: () => {
181
- * const devices = container.data;
182
- * return {
183
- * total: devices.length,
184
- * available: devices.filter(d => !d.removed && d.mountDir).length,
185
- * removed: devices.filter(d => d.removed).length,
186
- * local: devices.filter(d => d.local).length,
187
- * remote: devices.filter(d => !d.local).length,
188
- * averageRuntime: devices.reduce((sum, d) => sum + d.runTimeMs, 0) / devices.length
189
- * };
190
- * }
191
- * });
192
- *
193
- * // Usage examples
194
- * const queries = getStorageQueries(storageController);
195
- *
196
- * console.log('Storage Statistics:', queries.getStorageStats());
197
- * console.log('Available Devices:', queries.getAvailableDevices().length);
198
- * console.log('Backup-Ready Devices:', queries.getBackupDevices().length);
199
- * ```
200
- *
201
- * @example WebSocket Topic Synchronization
15
+ * @example
202
16
  * ```typescript
203
- * // The container automatically handles /kos/storage topic updates
204
- * const storageSync = StorageDeviceContainer.instance('sync-demo')
205
- * .options({})
206
- * .build();
207
- *
208
- * // Topic payload structure: StorageDeviceResponse[]
209
- * // Example payload when device is inserted:
210
- * // [
211
- * // {
212
- * // id: "usb-drive-new",
213
- * // mountDir: "/media/usb-new",
214
- * // vendor: "Kingston",
215
- * // model: "DataTraveler",
216
- * // label: "KINGSTON_32GB",
217
- * // nodeId: "primary",
218
- * // local: true,
219
- * // removed: false,
220
- * // runTimeMs: 0,
221
- * // syspath: "/sys/devices/usb/new"
222
- * // }
223
- * // ]
224
- *
225
- * // Container automatically:
226
- * // 1. Compares payload with existing models
227
- * // 2. Removes models not in payload (device unplugged)
228
- * // 3. Updates existing models with new state
229
- * // 4. Creates new models for discovered devices
230
- * // 5. Maintains parent-child relationships
231
- *
232
- * // Monitor changes reactively
233
- * const logStorageChanges = () => {
234
- * const currentDevices = storageSync.data.map(device => ({
235
- * id: device.id,
236
- * vendor: device.vendor,
237
- * mounted: !!device.mountDir,
238
- * removed: device.removed
239
- * }));
240
- *
241
- * console.log('Current Storage State:', currentDevices);
242
- * };
243
- * ```
244
- *
245
- * @example Multi-Node Storage Architecture
246
- * ```typescript
247
- * // Container manages storage across distributed KOS nodes
248
- * const distributedStorage = StorageDeviceContainer.instance('distributed')
249
- * .options({})
250
- * .build();
251
- *
252
- * // Analyze storage distribution across nodes
253
- * const analyzeStorageDistribution = () => {
254
- * const nodeGroups = distributedStorage.data.reduce((groups, device) => {
255
- * const nodeId = device.nodeId;
256
- * if (!groups[nodeId]) {
257
- * groups[nodeId] = {
258
- * nodeId,
259
- * devices: [],
260
- * available: 0,
261
- * totalRuntime: 0
262
- * };
263
- * }
264
- *
265
- * groups[nodeId].devices.push(device);
266
- * if (!device.removed && device.mountDir) {
267
- * groups[nodeId].available++;
268
- * }
269
- * groups[nodeId].totalRuntime += device.runTimeMs;
270
- *
271
- * return groups;
272
- * }, {} as Record<string, any>);
273
- *
274
- * // Display node distribution
275
- * Object.values(nodeGroups).forEach((node: any) => {
276
- * const avgRuntime = node.totalRuntime / node.devices.length;
277
- * console.log(`Node ${node.nodeId}:`);
278
- * console.log(` Devices: ${node.devices.length}`);
279
- * console.log(` Available: ${node.available}`);
280
- * console.log(` Avg Runtime: ${Math.round(avgRuntime / 60000)}min`);
281
- * });
282
- *
283
- * return nodeGroups;
284
- * };
17
+ * const storage = StorageDeviceContainer.instance().options({}).build();
18
+ * const mounted = storage.volumes.filter((d) => !d.removed && d.mountDir);
285
19
  * ```
286
20
  *
287
21
  * @group KOS Model
@@ -1 +1 @@
1
- {"version":3,"file":"storage-device-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAIpB,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAE3D,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6RG;AACH,MAAM,MAAM,sBAAsB,GAChC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAExD,MAAM,MAAM,2BAA2B,GACrC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAExD;;;GAGG;AACH,qBACa,+BACX,YACE,gBAAgB,EAChB,eAAe,CAAC,kBAAkB,CAAC,EACnC,aAAa;IAEf,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACvB,OAAO,CAAC,OAAO,CAAyC;gBAEhE,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,6BAA6B,EACtC,OAAO,EAAE,kBAAkB;IAY7B,QAAQ,CAAC,EAAE,EAAE,MAAM;IAGnB,IAAI,MAAM,2CAET;IACD,IAAI,IAAI,yBAEP;IAED,QAAQ,CAAC,KAAK,EAAE,kBAAkB;IAIlC,WAAW,CAAC,EAAE,EAAE,MAAM;IAKhB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,iBAAiB,YAEpB;IAED,IAAI,OAAO,yBAEV;IAMD,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,EAAE;IA6BpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB5B"}
1
+ {"version":3,"file":"storage-device-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAIpB,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAE3D,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,sBAAsB,GAChC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAExD,MAAM,MAAM,2BAA2B,GACrC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAExD;;;GAGG;AACH,qBACa,+BACX,YACE,gBAAgB,EAChB,eAAe,CAAC,kBAAkB,CAAC,EACnC,aAAa;IAEf,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACvB,OAAO,CAAC,OAAO,CAAyC;gBAEhE,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,6BAA6B,EACtC,OAAO,EAAE,kBAAkB;IAY7B,QAAQ,CAAC,EAAE,EAAE,MAAM;IAGnB,IAAI,MAAM,2CAET;IACD,IAAI,IAAI,yBAEP;IAED,QAAQ,CAAC,KAAK,EAAE,kBAAkB;IAIlC,WAAW,CAAC,EAAE,EAAE,MAAM;IAKhB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,iBAAiB,YAEpB;IAED,IAAI,OAAO,yBAEV;IAMD,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,EAAE;IA6BpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB5B"}
@@ -1,85 +1,15 @@
1
1
  import { SingletonKosModelRegistrationFactory } from '../../../core';
2
2
  import { StorageDeviceContainerModel } from './storage-device-container-model';
3
3
  /**
4
- * # StorageDeviceContainer
4
+ * Registration for {@link StorageDeviceContainerModel}, a singleton model.
5
5
  *
6
- * The registration bean includes convenience methods for creating and working with StorageDeviceContainerModel instances.
7
- *
8
- * ## type
9
- * The type property is a string that identifies the model type.
10
- * 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
11
- * used when declaring dependencies on models.
12
- *
13
- * @example
14
- * ```typescript
15
- *
16
- * @kosDependency({modelType: StorageDeviceContainer.type, id: "storageDeviceContainerId"})
17
- * private storageDeviceContainerModel: StorageDeviceContainerModel;
18
- * ```
19
- *
20
- *
21
- * ## factory
22
- *
23
- * The factory method creates a factory function that can be used to create new StorageDeviceContainerModel instances.
24
- *
25
-
26
- * As this is a singleton model, the factory function accepts the model options as its argument.
27
- *
28
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
29
- * in this case and the existing model will be returned in its current state.
30
- *
31
- * @example
32
- * ```typescript
33
- * const model = StorageDeviceContainer.factory({
34
- * // Add option data
35
- * });
36
- * ```
37
-
38
-
39
- *
40
- * ## predicate
41
- *
42
- * [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 StorageDeviceContainerModel.
6
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
7
+ * `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
43
8
  *
44
9
  * @example
45
10
  * ```typescript
46
- *
47
- * const model: IKosDataModel = ...; // some model
48
- *
49
- * if (StorageDeviceContainer.predicate(model)) {
50
- * // if the function evaluates to true, the model is narrowed down to StorageDeviceContainerModel
51
- * // and the compiler will know that the model has the StorageDeviceContainerModel interface
52
- * model.updateAvailability(false);
53
- * }
11
+ * const model = StorageDeviceContainer.instance().options(options).build();
54
12
  * ```
55
- *
56
- * ## registration
57
- *
58
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
59
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
60
- *
61
- *
62
- * @example
63
- *
64
- * In an application registration file you can declare the model registration as follows:
65
- *
66
- * **registration.ts**
67
- * ```typescript
68
- * import { StorageDeviceContainer } from "@kosdev-code/kos-dispense-sdk";
69
- * ...
70
- * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
71
- * export const kosModels: IKosRegistry["models"] = {
72
- * ...StorageDeviceContainer.registration,
73
- * };
74
- * ```
75
- *
76
- * ## registration.singleton
77
-
78
- * The storageDeviceContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
79
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
80
- *
81
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
82
-
83
- * */
13
+ */
84
14
  export declare const StorageDeviceContainer: SingletonKosModelRegistrationFactory<StorageDeviceContainerModel, object>;
85
15
  //# sourceMappingURL=storage-device-container-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-device-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAQpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,sBAAsB,2EAMjC,CAAC"}
1
+ {"version":3,"file":"storage-device-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAQpF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,2EAMjC,CAAC"}
@@ -2,57 +2,11 @@ import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterfa
2
2
  import { StorageDeviceOptions } from './types';
3
3
  export declare const MODEL_TYPE = "storage-device-model";
4
4
  /**
5
- * StorageDevice - Manages individual USB/external storage device information and state.
6
- *
7
- * The StorageDevice model represents individual storage devices (USB drives, SD cards,
8
- * external drives) connected to the KOS system. It tracks device hardware information,
9
- * mount status, and provides access to device metadata including vendor, model, runtime
10
- * statistics, and file system details.
11
- *
12
- * ## Key Features
13
- * - **Hardware Information** - Vendor, model, and system path details
14
- * - **Mount Management** - Track mount directory and removal status
15
- * - **Runtime Statistics** - Device runtime and usage metrics
16
- * - **Node Awareness** - Multi-node device distribution tracking
17
- * - **File System Integration** - Label and mount point management
18
- * - **Parent-Aware Architecture** - Designed for container model management
19
- *
20
- * ## Device Properties
21
- * Storage devices expose comprehensive hardware and state information:
22
- * - **Physical Details**: vendor, model, syspath for hardware identification
23
- * - **Mount Information**: mountDir, label for file system access
24
- * - **Status Tracking**: removed flag, local/remote node distribution
25
- * - **Runtime Metrics**: runTimeMs for usage analytics
26
- *
27
- * ## Common Use Cases
28
- * - **Storage Management UI** - Display available storage devices and capacity
29
- * - **File Transfer Operations** - Access mount points for file operations
30
- * - **System Monitoring** - Track device insertion/removal events
31
- * - **Backup Management** - Identify backup destination devices
32
- * - **Multi-node Systems** - Manage storage across distributed KOS nodes
33
- * - **Device Diagnostics** - Runtime statistics and health monitoring
5
+ * A USB drive, SD card or other removable storage device: its hardware
6
+ * details, mount directory and removal state. Instances are created and updated
7
+ * by {@link StorageDeviceContainerModel}.
34
8
  *
35
9
  * @interface
36
- * @example Basic Usage
37
- * ```typescript
38
- * const usbDrive = StorageDevice.instance('usb-drive-1')
39
- * .options({
40
- * mountDir: '/media/usb1',
41
- * vendor: 'SanDisk',
42
- * model: 'Ultra USB 3.0',
43
- * label: 'BACKUP_DRIVE',
44
- * nodeId: 'primary',
45
- * local: true,
46
- * removed: false,
47
- * runTimeMs: 1800000,
48
- * syspath: '/sys/devices/usb1'
49
- * })
50
- * .build();
51
- *
52
- * // Access device properties
53
- * console.log(`${usbDrive.vendor} ${usbDrive.model} at ${usbDrive.mountDir}`);
54
- * ```
55
- *
56
10
  * @group KOS Model
57
11
  * @category Device Management
58
12
  * @useDeclaredType
@@ -1 +1 @@
1
- {"version":3,"file":"storage-device-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E;;;GAGG;AACH,qBAEa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IAe7B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAchD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
1
+ {"version":3,"file":"storage-device-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/storage-device/storage-device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E;;;GAGG;AACH,qBAEa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IAe7B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAchD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}