@kosdev-code/kos-ui-sdk 0.1.0-next.944 → 0.1.0-next.948

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 (281) hide show
  1. package/common/events/async-event-bus.d.ts +2 -11
  2. package/common/events/async-event-bus.d.ts.map +1 -1
  3. package/common/events/eventBus.d.ts +1 -18
  4. package/common/events/eventBus.d.ts.map +1 -1
  5. package/core/core/decorators/kos-child.d.ts +2 -3
  6. package/core/core/decorators/kos-child.d.ts.map +1 -1
  7. package/core/core/decorators/kos-companion.d.ts +25 -87
  8. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  9. package/core/core/decorators/kos-container-aware.d.ts +67 -358
  10. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  11. package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
  12. package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
  13. package/core/core/decorators/kos-execution-context.d.ts +14 -31
  14. package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
  15. package/core/core/decorators/kos-future-aware.d.ts +21 -74
  16. package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
  17. package/core/core/decorators/kos-http-decorators.d.ts +18 -62
  18. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  19. package/core/core/decorators/kos-logger-aware.d.ts +10 -60
  20. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  21. package/core/core/decorators/kos-model-effect.d.ts +10 -9
  22. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  23. package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
  24. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
  25. package/core/core/decorators/kos-reload-aware.d.ts +12 -16
  26. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  27. package/core/core/decorators/kos-service-request.d.ts +80 -238
  28. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  29. package/core/core/decorators/kos-state-machine.d.ts +35 -275
  30. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  31. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  32. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  33. package/core/core/decorators/kos-view-model.d.ts +20 -100
  34. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  35. package/core/core/decorators/kosTopicHandler.d.ts +28 -89
  36. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  37. package/core/core/indexing/index.d.ts +2 -4
  38. package/core/core/indexing/index.d.ts.map +1 -1
  39. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  40. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  41. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  42. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  43. package/core/core/kos-container-model.d.ts +11 -32
  44. package/core/core/kos-container-model.d.ts.map +1 -1
  45. package/core/core/kos-data-container.d.ts +6 -6
  46. package/core/core/kos-data-container.d.ts.map +1 -1
  47. package/core/core/kosCore.d.ts +3 -3
  48. package/core/core/kosModelManager.d.ts +2 -3
  49. package/core/core/kosModelManager.d.ts.map +1 -1
  50. package/core/core/model/kos-offline-queue.d.ts +1 -1
  51. package/core/core/model/service-response-store.d.ts +2 -15
  52. package/core/core/model/service-response-store.d.ts.map +1 -1
  53. package/core/core/services/app-startup-service.d.ts +5 -13
  54. package/core/core/services/app-startup-service.d.ts.map +1 -1
  55. package/core/core/services/intent-service.d.ts +3 -12
  56. package/core/core/services/intent-service.d.ts.map +1 -1
  57. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  58. package/core/types/model.d.ts +4 -8
  59. package/core/types/model.d.ts.map +1 -1
  60. package/core/types/service-response-store.d.ts +3 -11
  61. package/core/types/service-response-store.d.ts.map +1 -1
  62. package/core/types/utils/kos-fetch.d.ts +25 -37
  63. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  64. package/core/util/abortable-when.d.ts +5 -6
  65. package/core/util/abortable-when.d.ts.map +1 -1
  66. package/core/util/ancestor-path-visitor.d.ts +14 -20
  67. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  68. package/core/util/container-utils.d.ts +26 -159
  69. package/core/util/container-utils.d.ts.map +1 -1
  70. package/core/util/date-utils.d.ts +9 -58
  71. package/core/util/date-utils.d.ts.map +1 -1
  72. package/core/util/debounce.d.ts +1 -8
  73. package/core/util/debounce.d.ts.map +1 -1
  74. package/core/util/kos-fetch.d.ts +1 -1
  75. package/core/util/kos-fetch.d.ts.map +1 -1
  76. package/core/util/kos-model-utils.d.ts +10 -11
  77. package/core/util/kos-model-utils.d.ts.map +1 -1
  78. package/core/util/model-attribute-utils.d.ts +5 -22
  79. package/core/util/model-attribute-utils.d.ts.map +1 -1
  80. package/core/util/promise-utils.d.ts +1 -26
  81. package/core/util/promise-utils.d.ts.map +1 -1
  82. package/core/util/service-factory.d.ts +5 -23
  83. package/core/util/service-factory.d.ts.map +1 -1
  84. package/core/util/service-request-error.d.ts +3 -5
  85. package/core/util/service-request-error.d.ts.map +1 -1
  86. package/core/util/service-response.d.ts +12 -67
  87. package/core/util/service-response.d.ts.map +1 -1
  88. package/core/util/transport-not-ready-error.d.ts +11 -13
  89. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  90. package/core/util/when-ready.d.ts +1 -8
  91. package/core/util/when-ready.d.ts.map +1 -1
  92. package/index.cjs +12 -21
  93. package/index.cjs.map +1 -1
  94. package/index.js +13 -22
  95. package/index.js.map +1 -1
  96. package/models/decorators/future-service.d.ts +7 -7
  97. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  98. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  99. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  100. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  101. package/models/models/browser-router/types/index.d.ts +2 -16
  102. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  103. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  104. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  105. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  106. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  107. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  108. package/models/models/config-bean/config-bean-model.d.ts +14 -66
  109. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  110. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  111. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  112. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  113. package/models/models/device/device-model.d.ts +20 -199
  114. package/models/models/device/device-model.d.ts.map +1 -1
  115. package/models/models/device/device-registration.d.ts +7 -87
  116. package/models/models/device/device-registration.d.ts.map +1 -1
  117. package/models/models/device/types/index.d.ts +5 -34
  118. package/models/models/future/future-aware.d.ts +7 -71
  119. package/models/models/future/future-aware.d.ts.map +1 -1
  120. package/models/models/future/future-model-builder.d.ts +2 -2
  121. package/models/models/future/future-model.d.ts +3 -23
  122. package/models/models/future/future-model.d.ts.map +1 -1
  123. package/models/models/future/future-types.d.ts +28 -145
  124. package/models/models/future/future-types.d.ts.map +1 -1
  125. package/models/models/key-value/key-value-model.d.ts +12 -72
  126. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  127. package/models/models/key-value/key-value-registration.d.ts +5 -77
  128. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  129. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  130. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  131. package/models/models/key-value/types/index.d.ts +3 -46
  132. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +32 -99
  133. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  134. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  135. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  136. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  137. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  138. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  139. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  140. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  141. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  142. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  143. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  144. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  145. package/models/models/kos-time/types/index.d.ts +3 -58
  146. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  147. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  148. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  149. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  150. package/models/models/log-block/log-block-model.d.ts +5 -168
  151. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  152. package/models/models/log-block/log-block-registration.d.ts +5 -75
  153. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  154. package/models/models/log-block/types/index.d.ts +14 -81
  155. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  156. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  157. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  158. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  159. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  160. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  161. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  162. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  163. package/models/models/log-stream/types/index.d.ts +5 -60
  164. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  165. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  166. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  167. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  168. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  169. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  170. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  171. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  172. package/models/models/network-interface/types/index.d.ts +2 -16
  173. package/models/models/ota/ota-model.d.ts +11 -39
  174. package/models/models/ota/ota-model.d.ts.map +1 -1
  175. package/models/models/ota/ota-registration.d.ts +5 -77
  176. package/models/models/ota/ota-registration.d.ts.map +1 -1
  177. package/models/models/ota/types/index.d.ts +2 -141
  178. package/models/models/region-info/types/index.d.ts +19 -99
  179. package/models/models/region-info/types/index.d.ts.map +1 -1
  180. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  181. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  182. package/models/models/software-info/software-info-model.d.ts +3 -39
  183. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  184. package/models/models/software-info/software-info-registration.d.ts +6 -73
  185. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  186. package/models/models/software-info/types/index.d.ts +6 -20
  187. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  188. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  189. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  190. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  191. package/models/models/state-bean/types/index.d.ts +4 -84
  192. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  193. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  194. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  195. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  196. package/models/models/state-prop/types/index.d.ts +5 -37
  197. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  198. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  199. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  200. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  201. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  202. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  203. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  204. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  205. package/models/models/storage-device/types/index.d.ts +13 -82
  206. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  207. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  208. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  209. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  210. package/models/models/studio-properties/types/index.d.ts +2 -24
  211. package/models/models/translation/descriptor-merge.d.ts +13 -17
  212. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  213. package/models/models/translation/services/translation-services.d.ts +19 -77
  214. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  215. package/models/models/translation/test-harness.d.ts +6 -8
  216. package/models/models/translation/test-harness.d.ts.map +1 -1
  217. package/models/models/translation/translation-container-model.d.ts +7 -59
  218. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  219. package/models/models/translation/translation-container-registration.d.ts +6 -73
  220. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  221. package/models/models/translation/translation-model.d.ts +17 -50
  222. package/models/models/translation/translation-model.d.ts.map +1 -1
  223. package/models/models/translation/translation-registration.d.ts +6 -73
  224. package/models/models/translation/translation-registration.d.ts.map +1 -1
  225. package/models/models/translation/types/index.d.ts +51 -276
  226. package/models/models/trouble/trouble-registration.d.ts +6 -73
  227. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  228. package/models/models/trouble/types/index.d.ts +17 -188
  229. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  230. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  231. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  232. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  233. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  234. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  235. package/models/types/cancellable-promise.d.ts +6 -9
  236. package/models/types/cancellable-promise.d.ts.map +1 -1
  237. package/models/utils/await-future-call.d.ts +9 -21
  238. package/models/utils/await-future-call.d.ts.map +1 -1
  239. package/models/utils/cancellable-future-call.d.ts +8 -19
  240. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  241. package/models/utils/cancellable-service.d.ts +14 -23
  242. package/models/utils/cancellable-service.d.ts.map +1 -1
  243. package/models/utils/conversion-utils.d.ts +8 -48
  244. package/models/utils/conversion-utils.d.ts.map +1 -1
  245. package/models/utils/persistence-store.d.ts +1 -1
  246. package/models/utils/service.d.ts +14 -48
  247. package/models/utils/service.d.ts.map +1 -1
  248. package/models/utils/services/kos/daily/service.d.ts +4 -4
  249. package/models/utils/services/vfs/daily/service.d.ts +4 -4
  250. package/models/utils/timer-manager.d.ts.map +1 -1
  251. package/package.json +3 -3
  252. package/{software-info-registration-GUbTY4KD.cjs → software-info-registration-CY_E6Rw7.cjs} +85 -368
  253. package/software-info-registration-CY_E6Rw7.cjs.map +1 -0
  254. package/{software-info-registration-CKlTQPet.js → software-info-registration-CuuEsH8v.js} +85 -368
  255. package/software-info-registration-CuuEsH8v.js.map +1 -0
  256. package/testing/index.d.ts +28 -33
  257. package/testing/index.d.ts.map +1 -1
  258. package/testing.cjs +1 -1
  259. package/testing.cjs.map +1 -1
  260. package/testing.js +1 -1
  261. package/testing.js.map +1 -1
  262. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  263. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  264. package/ui/hooks/use-function-warmup.d.ts +4 -14
  265. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  266. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  267. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  268. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  269. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  270. package/ui/hooks/use-kos-regions.d.ts +11 -23
  271. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  272. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  273. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  274. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  275. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  276. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  277. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  278. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  279. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  280. package/software-info-registration-CKlTQPet.js.map +0 -1
  281. package/software-info-registration-GUbTY4KD.cjs.map +0 -1
@@ -11,21 +11,14 @@ export interface KosMultipleFutureAwareOptions {
11
11
  handlerProperty?: string;
12
12
  }
13
13
  /**
14
- * Interface for models using @kosMultipleFutureAware in minimal mode.
15
- * Use TypeScript interface merging to add the futureHandler property and named futures to your model class.
14
+ * Members injected by @kosMultipleFutureAware in minimal mode. Minimal mode also
15
+ * injects an `<alias>Future` getter per @kosFuture alias; declare the ones you read on
16
+ * the merged interface.
16
17
  *
17
18
  * @example
18
- * Add ESLint disable comment at top of file, then:
19
19
  * ```typescript
20
20
  * interface MaintenanceModelImpl extends KosMultipleFutureAwareMinimal {
21
- * // Add your specific named futures manually for strong typing:
22
21
  * calibrationFuture?: IFutureModel;
23
- * cleaningFuture?: IFutureModel;
24
- * }
25
- *
26
- * @kosMultipleFutureAware({ mode: 'minimal' })
27
- * class MaintenanceModelImpl implements IKosDataModel {
28
- * // futureHandler and named futures are now available via interface merging
29
22
  * }
30
23
  * ```
31
24
  *
@@ -34,9 +27,7 @@ export interface KosMultipleFutureAwareOptions {
34
27
  */
35
28
  export interface KosMultipleFutureAwareMinimal {
36
29
  /**
37
- * Core multiple future management container that handles concurrent Future lifecycle operations.
38
- * Provides methods to add, remove, and query multiple Future instances.
39
- * Automatically injected by @kosMultipleFutureAware decorator.
30
+ * Container that tracks the model's concurrent Future operations by alias.
40
31
  */
41
32
  futureHandler: MultipleFutureHandler;
42
33
  }
@@ -66,108 +57,44 @@ type CancelMethods<T extends string> = {
66
57
  */
67
58
  export type MultipleFutureProperties<T extends string> = FutureGetters<T> & ProgressGetters<T> & StatusGetters<T> & IsRunningGetters<T> & IsCancelledGetters<T> & CancelMethods<T>;
68
59
  /**
69
- * Interface for models using @kosMultipleFutureAware in full mode (default).
70
- * Use TypeScript interface merging to add all Future Container properties and named futures to your model class.
71
- *
72
- * @example
73
- * Add ESLint disable comment at top of file, then:
74
- * ```typescript
75
- * interface IceAgitatorModelImpl extends KosMultipleFutureAwareFull<"pour" | "agitate" | "gate"> {}
76
- *
77
- * @kosMultipleFutureAware() // defaults to full mode
78
- * class IceAgitatorModelImpl implements IKosDataModel {
79
- * // Each alias gets its own members, e.g. this.pourFuture, this.pourProgress,
80
- * // this.pourStatus, this.pourIsRunning, this.cancelPour()
81
- *
82
- * onFutureUpdate?(future: IFutureModel, alias?: string): void {
83
- * // Handle updates from any managed Future
84
- * // Use alias to identify which future triggered the update
85
- * if (alias === 'pour') {
86
- * console.log(`Pour operation: ${future.progress}%`);
87
- * }
88
- * }
89
- * }
90
- * ```
60
+ * Members injected by @kosMultipleFutureAware in full mode (the default), where `T` is
61
+ * the union of @kosFuture aliases. Declare an interface with the same name as the
62
+ * class that extends this type (TypeScript interface merging).
91
63
  *
92
64
  * @kosService core.future-aware
93
65
  */
94
66
  export type KosMultipleFutureAwareFull<T extends string = string> = KosMultipleFutureAwareMinimal & MultipleFutureProperties<T>;
95
67
  /**
96
- * Class decorator that automatically adds Multiple Future Container capabilities to a KOS model.
97
- *
98
- * This decorator eliminates the need for manual MultipleFutureHandler setup by:
99
- * - Adding a futureHandler property for managing multiple concurrent Future operations
100
- * - Adding `<alias>Future` for each @kosFuture alias, plus `<alias>Progress`, `<alias>Status`,
101
- * `<alias>IsRunning`, `<alias>IsCancelled` and `cancel<Alias>()` in full mode
102
- *
103
- * **Important**: Use TypeScript interface merging to get proper type information:
104
- *
105
- * ```typescript
106
- * // Add ESLint disable comment at top of file, then:
107
- * interface MyModelImpl extends KosMultipleFutureAwareFull<"operation1" | "operation2"> {}
68
+ * Class decorator that lets a KOS model track several concurrent Futures, one per
69
+ * @kosFuture `alias`. For a single Future, use @kosFutureAware.
108
70
  *
109
- * @kosMultipleFutureAware()
110
- * class MyModelImpl implements IKosDataModel {
111
- * // All Future properties and named futures are now available with full type safety
112
- * }
113
- * ```
114
- *
115
- * Note: This decorator supports multiple concurrent Future operations. For models that only need
116
- * single Future support, use @kosFutureAware instead.
71
+ * The model gets a `futureHandler` container and an `<alias>Future` getter per alias.
72
+ * Full mode also adds `<alias>Progress`, `<alias>Status`, `<alias>IsRunning`,
73
+ * `<alias>IsCancelled` and `cancel<Alias>()`. An optional
74
+ * `onFutureUpdate(future, alias)` method on the model is called as each Future
75
+ * progresses.
117
76
  *
118
77
  * @param options Configuration options for the decorator
119
78
  * @returns A class decorator
120
79
  *
121
80
  * @example
122
81
  * ```typescript
123
- * // Full mode example with multiple futures
124
- * interface IceAgitatorModelImpl extends KosMultipleFutureAwareFull<"pour" | "agitate" | "gate"> {}
82
+ * interface IceAgitatorModelImpl extends KosMultipleFutureAwareFull<"pour" | "agitate"> {}
125
83
  *
84
+ * @kosModel("ice-agitator-model")
126
85
  * @kosMultipleFutureAware()
127
86
  * class IceAgitatorModelImpl implements IKosDataModel {
128
- * get isPouring() {
129
- * return !!(this.pourFuture && !this.pourFuture?.endState);
130
- * }
131
- *
132
- * onFutureUpdate?(future: IFutureModel, alias?: string): void {
133
- * // Handle Future updates from any operation
134
- * // Use alias to discriminate between different future types
135
- * if (alias === 'pour') {
136
- * console.log(`Pouring ice: ${future.progress}%`);
137
- * } else if (alias === 'agitate') {
138
- * console.log(`Agitating: ${future.progress}%`);
139
- * }
140
- * }
141
- *
142
87
  * @kosFuture({ alias: "pour" })
143
- * async pourIce(): Promise<void> {
144
- * // Pour operation
88
+ * async pourIce(): Promise<FutureResponse | undefined> {
89
+ * return startPourService();
145
90
  * }
146
91
  *
147
92
  * @kosFuture({ alias: "agitate" })
148
- * async testAgitate(): Promise<void> {
149
- * // Agitation operation
150
- * }
151
- * }
152
- *
153
- * // Minimal mode example: declare the alias futures you read
154
- * interface BackgroundServiceModelImpl extends KosMultipleFutureAwareMinimal {
155
- * task1Future?: IFutureModel;
156
- * task2Future?: IFutureModel;
157
- * }
158
- *
159
- * @kosMultipleFutureAware({ mode: 'minimal' })
160
- * class BackgroundServiceModelImpl implements IKosDataModel {
161
- * @kosFuture({ alias: "task1" })
162
- * async backgroundTask1() {
163
- * return "done";
164
- * }
165
- *
166
- * @kosFuture({ alias: "task2" })
167
- * async backgroundTask2() {
168
- * return "done";
93
+ * async agitate(): Promise<FutureResponse | undefined> {
94
+ * return startAgitateService();
169
95
  * }
170
96
  * }
97
+ * // this.pourProgress, this.agitateIsRunning, this.cancelPour(), ...
171
98
  * ```
172
99
  *
173
100
  * @category KOS Model Decorator
@@ -1 +1 @@
1
- {"version":3,"file":"kos-multiple-future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-multiple-future-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG/E;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,mGAAmG;IACnG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,aAAa,EAAE,qBAAqB,CAAC;CACtC;AAED;;GAEG;AACH,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY;CACjD,CAAC;AAEF,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IACvC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,GAAG,MAAM;CAC5C,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,QAAQ,GAAG,MAAM;CAC1C,CAAC;AAEF,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI;IACxC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,GAAG,OAAO;CAC9C,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,aAAa,GAAG,OAAO;CAChD,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,IAAI,aAAa,CAAC,CAAC,CAAC,GACvE,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC,CAAC,CAAC,GAChB,gBAAgB,CAAC,CAAC,CAAC,GACnB,kBAAkB,CAAC,CAAC,CAAC,GACrB,aAAa,CAAC,CAAC,CAAC,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAC9D,6BAA6B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,cAAc,CAchB"}
1
+ {"version":3,"file":"kos-multiple-future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-multiple-future-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG/E;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,mGAAmG;IACnG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,aAAa,EAAE,qBAAqB,CAAC;CACtC;AAED;;GAEG;AACH,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY;CACjD,CAAC;AAEF,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IACvC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,GAAG,MAAM;CAC5C,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,QAAQ,GAAG,MAAM;CAC1C,CAAC;AAEF,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI;IACxC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,GAAG,OAAO;CAC9C,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,aAAa,GAAG,OAAO;CAChD,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,IAAI,aAAa,CAAC,CAAC,CAAC,GACvE,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC,CAAC,CAAC,GAChB,gBAAgB,CAAC,CAAC,CAAC,GACnB,kBAAkB,CAAC,CAAC,CAAC,GACrB,aAAa,CAAC,CAAC,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAC9D,6BAA6B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,cAAc,CAchB"}
@@ -1,24 +1,20 @@
1
1
  /**
2
2
  * Symbol marker indicating a model manages its own reload lifecycle.
3
- * Models with this marker are skipped by KosCore's destructive
4
- * unload() + reload() cycle, allowing them to handle reconnection
5
- * and state refresh through their own mechanisms (e.g., model effects,
6
- * topic handlers, or application-specific decorators like @kosStudioStateAware).
3
+ * KosCore's unload() + reload() cycle skips models that carry it.
7
4
  */
8
5
  export declare const SelfManagedReload: unique symbol;
9
6
  /**
10
- * Class decorator that marks a model as self-managing its reload lifecycle.
7
+ * Class decorator that marks a model as managing its own reload.
11
8
  *
12
- * When KOS Core performs a reload (e.g., after reconnection), it calls unload()
13
- * then reload() on every model with a reload() method. unload() unloads the
14
- * model's children with it: their subscriptions, effects and HTTP routes are
15
- * disposed, but the child instances stay in place. Whatever the model's
16
- * reload() then does to its children (for example clearing and re-adding a
17
- * container) shows in the UI as skeleton flashes or lost selection state.
9
+ * When KOS Core reloads (for example after reconnection), it calls unload() then
10
+ * reload() on every model with a reload() method. unload() also unloads the model's
11
+ * children (their subscriptions, effects and HTTP routes are disposed, though the
12
+ * instances stay), and a reload() that clears and refills a container shows in the UI
13
+ * as skeleton flashes and lost selection.
18
14
  *
19
- * Models decorated with @kosReloadAware manage their own reload through
20
- * reactive mechanisms (model effects watching for state changes) and use
21
- * incremental strategies like resolveContainerDeltas to update in place.
15
+ * A model decorated with @kosReloadAware is skipped by that cycle. It refreshes itself,
16
+ * typically from a model effect or topic handler, and updates its children in place
17
+ * (for example with resolveContainerDeltas).
22
18
  *
23
19
  * @example
24
20
  * ```typescript
@@ -26,8 +22,8 @@ export declare const SelfManagedReload: unique symbol;
26
22
  * @kosReloadAware()
27
23
  * class MyContainerModel {
28
24
  * async reload() {
29
- * // Called by the model's own effect/decorator, NOT by KOS Core
30
- * await this.loadItems(); // uses resolveContainerDeltas
25
+ * // Called by the model's own effect, not by KOS Core
26
+ * await this.loadItems();
31
27
  * }
32
28
  * }
33
29
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"kos-reload-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-reload-aware.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,cAAc,IAAI,cAAc,CAI/C"}
1
+ {"version":3,"file":"kos-reload-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-reload-aware.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,IAAI,cAAc,CAI/C"}