@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
@@ -19,8 +19,8 @@ export interface KosViewModelOptions {
19
19
  devToolsEnabled?: boolean;
20
20
  }
21
21
  /**
22
- * Interface for ViewModels that support cleanup.
23
- * Implement this to have automatic disposal when using useViewModel.
22
+ * Interface for ViewModels that support cleanup. `useViewModel` calls `dispose()` when
23
+ * the ViewModel is replaced or the component unmounts.
24
24
  *
25
25
  * @kosService core.view-model
26
26
  * @kosApiLevel 20
@@ -29,32 +29,9 @@ export interface IKosViewModelDisposable {
29
29
  dispose(): void | Promise<void>;
30
30
  }
31
31
  /**
32
- * Interface for ViewModels that require async initialization.
33
- * Implement this to await model readiness or perform async setup.
34
- *
35
- * When a ViewModel implements this interface, the useViewModel hook will:
36
- * - Call ready() after construction
37
- * - Track ready state and any errors
38
- * - Return { viewModel, ready, error } instead of just the viewModel
39
- *
40
- * @example
41
- * ```typescript
42
- * @kosViewModel({ typeId: 'order-summary' })
43
- * class OrderSummaryViewModel implements IKosViewModelReady {
44
- * constructor(
45
- * private order: IOrderModel,
46
- * private inventory: IInventoryModel
47
- * ) {}
48
- *
49
- * async ready(): Promise<void> {
50
- * // Await model readiness before ViewModel is considered ready
51
- * await Promise.all([
52
- * this.order.whenReady?.(),
53
- * this.inventory.whenReady?.()
54
- * ]);
55
- * }
56
- * }
57
- * ```
32
+ * Interface for ViewModels that require async initialization, such as waiting for the
33
+ * models they wrap to be ready. `useViewModel` calls `ready()` after construction and
34
+ * reports its progress through the `ready` and `error` fields of its result.
58
35
  *
59
36
  * @kosService core.view-model
60
37
  * @kosApiLevel 20
@@ -67,23 +44,8 @@ export interface IKosViewModelReady {
67
44
  */
68
45
  export declare function hasReadyHook(obj: unknown): obj is IKosViewModelReady;
69
46
  /**
70
- * Interface for models using @kosLoggerAware decorator with @kosViewModel.
71
- * Use TypeScript interface merging to add the logger property to your ViewModel class.
72
- *
73
- * @example
74
- * ```typescript
75
- * interface MyViewModel extends KosLoggerAware {}
76
- *
77
- * @kosViewModel({ typeId: 'my-view-model' })
78
- * @kosLoggerAware()
79
- * export class MyViewModel {
80
- * constructor(private readonly model: IMyModel) {}
81
- *
82
- * doSomething() {
83
- * this.logger.info('Doing something');
84
- * }
85
- * }
86
- * ```
47
+ * Members injected by @kosLoggerAware into a ViewModel. Declare an interface with the
48
+ * same name as the class that extends this type (TypeScript interface merging).
87
49
  *
88
50
  * @kosService core.view-model
89
51
  * @kosApiLevel 20
@@ -96,75 +58,33 @@ export interface KosViewModelLoggerAware {
96
58
  */
97
59
  export declare function isDisposable(obj: unknown): obj is IKosViewModelDisposable;
98
60
  /**
99
- * Lightweight model decorator that provides observability without
100
- * the full KOS model lifecycle machinery.
61
+ * Class decorator for a ViewModel: a plain class made into a reactive model without the
62
+ * KOS model lifecycle.
101
63
  *
102
- * Use @kosViewModel when:
103
- * - You need observable state for React components
104
- * - Dependencies are passed directly via constructor (no @kosDependency resolution)
105
- * - You don't need lifecycle methods (init, load, ready, activate)
106
- * - You want to instantiate with `new` rather than through factories
64
+ * Use it for state derived from one or more KOS models for a component. Dependencies
65
+ * are passed to the constructor, instances are created with `new` (usually inside
66
+ * `useViewModel`), and there are no lifecycle phases or dependency resolution. A
67
+ * ViewModel may also use @kosLoggerAware, @kosModelEffect and @kosStateMachine; its
68
+ * state machine initializes at construction.
107
69
  *
108
70
  * @param options Configuration options for the ViewModel
109
71
  * @returns A class decorator
110
72
  *
111
73
  * @example
112
74
  * ```typescript
113
- * // Basic usage
114
- * @kosViewModel({ typeId: 'counter' })
115
- * export class CounterViewModel {
116
- * count = 0;
117
- *
118
- * increment() {
119
- * this.count++;
120
- * }
121
- * }
122
- *
123
- * // With logger support
124
- * interface OrderSummaryViewModel extends KosViewModelLoggerAware {}
125
- *
126
75
  * @kosViewModel({ typeId: 'order-summary' })
127
- * @kosLoggerAware()
128
- * export class OrderSummaryViewModel implements IKosViewModelDisposable {
129
- * constructor(
130
- * private readonly order: IOrderModel,
131
- * private readonly inventory: IInventoryModel
132
- * ) {
133
- * this.logger.info('ViewModel created');
134
- * }
76
+ * export class OrderSummaryViewModel {
77
+ * constructor(private readonly order: IOrderModel) {}
135
78
  *
136
79
  * get total(): number {
137
80
  * return this.order.items.reduce((sum, i) => sum + i.price, 0);
138
81
  * }
139
- *
140
- * get hasStockIssues(): boolean {
141
- * return this.order.items.some(item =>
142
- * this.inventory.getStock(item.productId) < item.quantity
143
- * );
144
- * }
145
- *
146
- * dispose(): void {
147
- * this.logger.info('ViewModel disposed');
148
- * }
149
82
  * }
150
83
  *
151
- * // Usage in React component
152
- * function OrderSummary({ orderId }: Props) {
153
- * const { model: order } = useKosModel<IOrderModel>({ modelId: orderId });
154
- * const { model: inventory } = useKosModel<IInventoryModel>({ modelId: 'inventory' });
155
- *
156
- * const vm = useViewModel(
157
- * () => new OrderSummaryViewModel(order!, inventory!),
158
- * [order, inventory]
159
- * );
160
- *
161
- * return (
162
- * <div>
163
- * <p>Total: ${vm.total}</p>
164
- * {vm.hasStockIssues && <Warning>Some items may be unavailable</Warning>}
165
- * </div>
166
- * );
167
- * }
84
+ * const OrderSummary = kosComponent(({ order }: Props) => {
85
+ * const { viewModel } = useViewModel(() => new OrderSummaryViewModel(order), [order]);
86
+ * return <p>Total: {viewModel.total}</p>;
87
+ * });
168
88
  * ```
169
89
  *
170
90
  * @category KOS ViewModel Decorator
@@ -1 +1 @@
1
- {"version":3,"file":"kos-view-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-view-model.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAYpD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAOpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,uBAAuB,CAOzE;AAuMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAgB1E"}
1
+ {"version":3,"file":"kos-view-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-view-model.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAYpD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAOpE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,uBAAuB,CAOzE;AAuMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAgB1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"kosModel.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kosModel.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA6mB5C,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CA0DjD"}
1
+ {"version":3,"file":"kosModel.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kosModel.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0pB5C,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CA0DjD"}
@@ -89,9 +89,9 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
89
89
  */
90
90
  explicitDestination?: boolean;
91
91
  /**
92
- * Debounce events - only emit after a period of inactivity
93
- * @example debounce: 1000 // Wait 1 second after last event
94
- * @example debounce: { delay: 1000, discardIntermediate: true } // Only keep last value
92
+ * Delivers events only after a period of inactivity. By default the handler receives
93
+ * an array of every payload received during the delay; with `discardIntermediate`
94
+ * it receives only the last payload.
95
95
  * @kosApiLevel 11
96
96
  */
97
97
  debounce?: number | {
@@ -100,9 +100,9 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
100
100
  discardIntermediate?: boolean;
101
101
  };
102
102
  /**
103
- * Throttle events - limit emissions to once per interval
104
- * @example throttle: 500 // At most once every 500ms
105
- * @example throttle: { interval: 500, discardIntermediate: true } // Only keep first value in window
103
+ * Limits delivery to once per interval. By default the handler receives an array of
104
+ * every payload received in the interval; with `discardIntermediate` it receives only
105
+ * the first payload in each window.
106
106
  * @kosApiLevel 11
107
107
  */
108
108
  throttle?: number | {
@@ -111,7 +111,8 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
111
111
  discardIntermediate?: boolean;
112
112
  };
113
113
  /**
114
- * Buffer events and emit them as an array after time window or max size
114
+ * Holds events until the time window elapses or `maxSize` is reached, then calls the
115
+ * handler once per buffered event.
115
116
  * @kosApiLevel 11
116
117
  */
117
118
  buffer?: {
@@ -132,9 +133,8 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
132
133
  */
133
134
  once?: boolean;
134
135
  /**
135
- * Named wildcard capture for trailing /* patterns.
136
- * When enabled, the portion after the /* is parsed and passed to the handler.
137
- * You can optionally specify a name for the captured segment.
136
+ * Name for the segment captured by a trailing `/*` in the topic (default `"path"`).
137
+ * The handler's second argument carries it as `wildcardCapture[wildcardName]`.
138
138
  *
139
139
  * @example
140
140
  * ```typescript
@@ -144,58 +144,35 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
144
144
  * wildcardName: "configPath"
145
145
  * })
146
146
  * handleConfigUpdate(payload: ConfigData, raw: ApiCallbackWithWildcard<any>) {
147
- * // raw.wildcardCapture.configPath contains everything after "/config/system/"
147
+ * // raw.wildcardCapture?.configPath is everything after "/config/system/"
148
148
  * }
149
149
  * ```
150
150
  * @kosApiLevel 12
151
151
  */
152
152
  wildcardName?: string;
153
153
  /**
154
- * Advanced flow control options using async iterators internally.
155
- * Enables event processing patterns like batching, on-the-fly transforms,
156
- * filtering and rate limiting.
154
+ * Flow control applied to the event stream before the handler runs: batching,
155
+ * transforms, stateful filtering, rate limiting and retry.
157
156
  *
158
- * @example
159
- * ```typescript
160
- * @kosTopicHandler({
161
- * topic: 'sensor.data',
162
- * websocket: true,
163
- * flow: {
164
- * batch: { size: 50, window: 1000 },
165
- * transform: (events) => aggregateEvents(events),
166
- * }
167
- * })
168
- * handleProcessedEvents(aggregatedData) {
169
- * // Receives transformed, batched data
170
- * }
171
- * ```
172
157
  * @kosApiLevel 12
173
158
  */
174
159
  flow?: FlowControlOptions<Response, TransformedResponse>;
175
160
  /**
176
- * Baseline dependency configuration for baseline-delta race condition handling.
177
- * When specified, this handler will wait for the baseline service request to complete
178
- * before processing events, and will intelligently replay queued events based on
179
- * temporal comparison with the baseline request/response timing.
161
+ * Makes the handler wait for a baseline service request to complete before it
162
+ * processes events. Events received earlier are queued and replayed according to
163
+ * `replayStrategy`, which compares them with the baseline request timing.
180
164
  *
181
165
  * @example
182
166
  * ```typescript
183
167
  * @kosTopicHandler({
184
168
  * topic: TOPIC_INGREDIENT_UPDATE,
185
169
  * websocket: true,
186
- * lifecycle: DependencyLifecycle.READY,
187
170
  * requiresBaseline: {
188
171
  * path: PATH_INGREDIENTS,
189
- * method: 'get',
190
- * replayStrategy: 'after-request'
172
+ * replayStrategy: ReplayStrategy.AFTER_REQUEST
191
173
  * }
192
174
  * })
193
- * handleIngredientUpdate(payload: IngredientUpdatePayload) {
194
- * // Framework guarantees:
195
- * // 1. Baseline loaded before this handler executes
196
- * // 2. Queued events replayed with temporal filtering
197
- * // 3. Only events newer than baseline are processed
198
- * }
175
+ * handleIngredientUpdate(payload: IngredientUpdatePayload) {}
199
176
  * ```
200
177
  * @kosApiLevel 15
201
178
  */
@@ -204,61 +181,23 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
204
181
  /**
205
182
  * Decorator for defining a Kos topic handler function within a Kos Data Model class.
206
183
  *
184
+ * The handler is called with the (transformed) payload and the raw message. Topics may
185
+ * include property keys from `createPropKey` to resolve per model instance, and a
186
+ * trailing `/*` to match a subtree (see `wildcardName`). When more than one of
187
+ * `debounce`, `throttle`, `buffer` and `once` is set, only the first in that order
188
+ * applies.
189
+ *
207
190
  * @param params - An object containing configuration parameters for the topic handler.
208
191
  * @returns A decorator function.
209
192
  *
210
- * @example Basic usage:
193
+ * @example
211
194
  * ```typescript
212
195
  * @kosTopicHandler({
213
- * topic: 'temperature/update',
214
- * websocket: true
215
- * })
216
- * handleTemperature(payload: TemperatureData) { }
217
- * ```
218
- *
219
- * @example Debounced handling:
220
- * ```typescript
221
- * @kosTopicHandler({
222
- * topic: 'rapid/updates',
223
- * websocket: true,
224
- * debounce: 1000 // Wait 1 second after last event
225
- * })
226
- * handleRapidUpdates(payload: UpdateData) { }
227
- * ```
228
- *
229
- * @example Buffered batch processing:
230
- * ```typescript
231
- * @kosTopicHandler({
232
- * topic: 'log/entry',
233
- * websocket: true,
234
- * buffer: { time: 5000, maxSize: 100 }
235
- * })
236
- * handleLogBatch(entries: LogEntry[]) { }
237
- * ```
238
- *
239
- * @example Trailing wildcard with custom name:
240
- * ```typescript
241
- * @kosTopicHandler({
242
- * topic: '/config/system/*',
243
- * websocket: true,
244
- * wildcardName: 'configPath'
245
- * })
246
- * handleConfigUpdate(payload: ConfigData, raw: ApiCallbackWithWildcard<any>) {
247
- * // raw.wildcardCapture.configPath = "network/timeout" (everything after "/config/system/")
248
- * }
249
- * ```
250
- *
251
- * @example Trailing wildcard with PropKeys:
252
- * ```typescript
253
- * const DEVICE_ID = createPropKey<DeviceModel>('deviceId');
254
- *
255
- * @kosTopicHandler({
256
- * topic: `/devices/${DEVICE_ID}/sensors/*`,
196
+ * topic: `/devices/${createPropKey<DeviceModel>("deviceId")}/temperature`,
257
197
  * websocket: true,
258
- * wildcardName: 'sensorPath'
259
198
  * })
260
- * handleSensorEvent(payload: SensorData, raw: ApiCallbackWithWildcard<any>) {
261
- * // raw.wildcardCapture.sensorPath = "temperature/reading" (everything after device-specific prefix)
199
+ * handleTemperature(payload: TemperatureData) {
200
+ * this.temperature = payload.value;
262
201
  * }
263
202
  * ```
264
203
  * @category KOS Model Decorator
@@ -1 +1 @@
1
- {"version":3,"file":"kosTopicHandler.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kosTopicHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,WAAW,uB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AAC;IACxE,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GACA,YAAY,CAAC,CAAC,CAAC,CA4CjB"}
@@ -25,4 +25,5 @@ export declare const OptionsRequired: unique symbol;
25
25
  export declare const KosViewModelSymbol: unique symbol;
26
26
  export declare const ViewModelConfig: unique symbol;
27
27
  export declare const ReloadAwareSetup: unique symbol;
28
+ export declare const MixinModels: unique symbol;
28
29
  //# sourceMappingURL=propKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,gBAAgB,eAA6B,CAAC"}
1
+ {"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,WAAW,eAAwB,CAAC"}
@@ -6,10 +6,8 @@
6
6
  * - Decorators: `kosIndexAware` (item-level), `kosContainerIndexAware`
7
7
  * (container-level).
8
8
  *
9
- * Container-side membership publishing (ADDED, REMOVED) lives in
10
- * `KosModelContainer` itself; consumers don't need to import
11
- * anything to get it — adding an `@kosIndexAware` item to any
12
- * container is enough.
9
+ * `KosModelContainer` publishes ADDED and REMOVED for any `@kosIndexAware`
10
+ * item it holds.
13
11
  */
14
12
  export { KosContainerIndexEvents } from './topics';
15
13
  export { INDEX_COLLECTION_KEY, INDEX_RECORD_SYMBOL, isIndexableItem, type IndexableItem, type IndexAddedEvent, type IndexChangedEvent, type IndexPurgeEvent, type IndexRecord, type IndexRecordContribution, type IndexRemovedEvent, type IndexRequestSeedEvent, type IndexSeedEvent, } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC"}
@@ -1,35 +1,17 @@
1
1
  /**
2
- * Container-level decorator that wires up the kos-ui-sdk container
3
- * indexing system. Composes with the upstream `@kosContainerAware`
4
- * (or with legacy `@kosChild`-based containers) — it only needs an
5
- * `itemsProperty` pointing at the array of items the container
6
- * exposes.
2
+ * Container-level decorator for the kos-ui-sdk container indexing system.
3
+ * Works with `@kosContainerAware` or `@kosChild`-based containers; it needs
4
+ * only an `itemsProperty` naming the array of items the container exposes.
7
5
  *
8
- * Three responsibilities:
6
+ * - On `init`, writes the declared collection onto the container's
7
+ * `KosContext`, where items resolve it by walking up the parent chain.
8
+ * - On `KosContainerIndexEvents.REQUEST_SEED`, publishes one SEED event with
9
+ * the records of the current items, so consumers can subscribe at any time.
10
+ * - On `unload`, publishes one PURGE per distinct collection in the current
11
+ * items so consumers can drop those records.
9
12
  *
10
- * 1. Wraps `init` so the decorator-declared collection is written
11
- * onto the container's own `KosContext`. Items resolve the
12
- * value via `KosContext.get(INDEX_COLLECTION_KEY)`, which
13
- * auto-walks the parent chain.
14
- *
15
- * 2. Registers a `SubscriptionHandlers` entry for
16
- * `KosContainerIndexEvents.REQUEST_SEED`. When a consumer
17
- * publishes that topic, the container reads its current items,
18
- * maps them via `INDEX_RECORD_SYMBOL`, and emits one SEED
19
- * event. Lets subscribe order stop mattering.
20
- *
21
- * 3. Wraps `unload` to emit one PURGE per distinct collection in
22
- * the current items, so consumers can drop the collection's
23
- * records at container teardown.
24
- *
25
- * Membership detection (ADDED, REMOVED) is owned by
26
- * `KosModelContainer` itself, not this decorator — the events fire
27
- * at the moment of mutation, with no diffing or property-watching
28
- * involved.
29
- *
30
- * Modeled on `kos-studio-state-aware`: class decorator, options
31
- * object, `target.prototype[ModelEffects]` / `[SubscriptionHandlers]`
32
- * registration pattern.
13
+ * ADDED and REMOVED events come from `KosModelContainer` itself at the moment
14
+ * of mutation.
33
15
  *
34
16
  * @kosService core.indexing
35
17
  * @kosApiLevel 22
@@ -37,21 +19,15 @@
37
19
  export interface KosContainerIndexAwareOptions {
38
20
  /**
39
21
  * Name of the property on the container that exposes its items
40
- * as an array. May be a `@kosContainerAware`-injected `data` /
41
- * `models` getter, or a legacy custom getter (e.g.
42
- * `virtualMachines` on a container with a `@kosChild`-managed
43
- * collection).
44
- *
45
- * Used for SEED re-emission and PURGE. Membership add/remove
46
- * events come from `KosModelContainer` directly and do not
47
- * depend on this property.
22
+ * as an array, such as the `data` getter from `@kosContainerAware` or a
23
+ * custom getter on a `@kosChild`-managed collection. Used for SEED and
24
+ * PURGE; ADDED and REMOVED do not depend on it.
48
25
  */
49
26
  itemsProperty: string;
50
27
  /**
51
28
  * Collection tag written onto the container's own `KosContext`
52
- * so child items can resolve it via auto-walk. Optional when
53
- * items declare their own `collection` via `@kosIndexAware`
54
- * (heterogeneous containers).
29
+ * so child items inherit it. Optional when items declare their own
30
+ * `collection` through `@kosIndexAware`.
55
31
  */
56
32
  collection?: string;
57
33
  }
@@ -59,7 +35,7 @@ export interface KosContainerIndexAwareOptions {
59
35
  * Class decorator that wires a container model into the kos-ui-sdk
60
36
  * indexing system.
61
37
  *
62
- * @example Homogeneous container — single collection
38
+ * @example
63
39
  * ```ts
64
40
  * @kosModel("image-container-model")
65
41
  * @kosContainerAware<IImageModel>()
@@ -67,13 +43,6 @@ export interface KosContainerIndexAwareOptions {
67
43
  * class ImageContainerModelImpl implements IKosDataModel { ... }
68
44
  * ```
69
45
  *
70
- * @example Heterogeneous container — items declare their own collection
71
- * ```ts
72
- * @kosModel("virtual-machine-container-model")
73
- * @kosContainerIndexAware({ itemsProperty: "virtualMachines" })
74
- * class VirtualMachineContainerModelImpl implements IKosDataModel { ... }
75
- * ```
76
- *
77
46
  * @category KOS Model Decorator
78
47
  * @kosService core.indexing
79
48
  * @kosApiLevel 22
@@ -1 +1 @@
1
- {"version":3,"file":"kos-container-index-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/kos-container-index-aware.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAqBH,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;OAUG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAWhB"}
1
+ {"version":3,"file":"kos-container-index-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/kos-container-index-aware.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AAqBH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAWhB"}
@@ -7,12 +7,10 @@ export interface KosIndexAwareOptions {
7
7
  * - A function called with the instance, returning the tag
8
8
  * (heterogeneous case where one container holds items belonging
9
9
  * to multiple collections, distinguished by some item property).
10
- * - Undefined — the item resolves its collection from its
11
- * `KosContext` (auto-walks the parent chain). When the item
12
- * lives under a `@kosContainerIndexAware`-decorated container,
13
- * that container has already written its declared collection
14
- * onto its own context, so this resolves transparently with no
15
- * per-item declaration needed.
10
+ * - Undefined: the item resolves its collection from its
11
+ * `KosContext`, walking up the parent chain. Under a
12
+ * `@kosContainerIndexAware` container that declares a collection,
13
+ * this picks up the container's value.
16
14
  */
17
15
  collection?: string | ((self: any) => string | undefined);
18
16
  /**
@@ -23,18 +21,9 @@ export interface KosIndexAwareOptions {
23
21
  fields?: string[];
24
22
  }
25
23
  /**
26
- * Use TypeScript interface merging to attach the indexable contract
27
- * to your model class:
28
- *
29
- * ```ts
30
- * interface MyItemModelImpl extends KosIndexAware {}
31
- *
32
- * @kosModel("my-item-model")
33
- * @kosIndexAware({ collection: "items", fields: ["name"] })
34
- * class MyItemModelImpl implements IKosDataModel { ... }
35
- * ```
36
- *
37
- * Mirrors the `KosLoggerAware` / `KosContainerAware` pattern.
24
+ * Merge this interface into a `@kosIndexAware` model class
25
+ * (`interface MyItemModelImpl extends KosIndexAware {}`) to type the
26
+ * index record accessor.
38
27
  */
39
28
  export interface KosIndexAware {
40
29
  readonly [INDEX_RECORD_SYMBOL]: IndexRecordContribution;
@@ -43,33 +32,18 @@ export interface KosIndexAware {
43
32
  * Class decorator that registers a model as a publisher of index
44
33
  * records.
45
34
  *
46
- * Reads `id` and `modelTypeId` off the instance at record-construction
47
- * time. Both are part of the standard kos-model surface — `id` from
48
- * `IKosIdentifiable`, `modelTypeId` from `@kosModel`. No author
49
- * duplication needed.
35
+ * The record always carries the instance's `id` and `modelTypeId`, plus the
36
+ * resolved collection and the declared `fields`.
50
37
  *
51
- * @example Heterogeneous container — collection resolved per item
38
+ * @example
52
39
  * ```ts
53
40
  * interface VirtualMachineModelImpl extends KosIndexAware {}
54
41
  *
55
42
  * @kosModel("virtual-machine-model")
56
- * @kosIndexAware({
57
- * collection: (self) => self.type,
58
- * fields: ["name", "desc"],
59
- * })
43
+ * @kosIndexAware({ collection: (self) => self.type, fields: ["name"] })
60
44
  * class VirtualMachineModelImpl implements IKosDataModel { ... }
61
45
  * ```
62
46
  *
63
- * @example Homogeneous — collection declared on the container instead
64
- * ```ts
65
- * @kosModel("image-model")
66
- * @kosIndexAware({ fields: ["name"] })
67
- * class ImageModelImpl implements IKosDataModel { ... }
68
- *
69
- * @kosContainerIndexAware({ itemsProperty: "images", collection: "images" })
70
- * class ImageContainerModelImpl ...
71
- * ```
72
- *
73
47
  * @category KOS Model Decorator
74
48
  * @kosService core.indexing
75
49
  * @kosApiLevel 22
@@ -1 +1 @@
1
- {"version":3,"file":"kos-index-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/kos-index-aware.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,OAAO,EAEL,mBAAmB,EAEnB,KAAK,uBAAuB,EAC7B,MAAM,SAAS,CAAC;AAMjB,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;IAE1D;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;CACzD;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,cAAc,CAY5E"}
1
+ {"version":3,"file":"kos-index-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/indexing/kos-index-aware.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AAOH,OAAO,EAEL,mBAAmB,EAEnB,KAAK,uBAAuB,EAC7B,MAAM,SAAS,CAAC;AAMjB,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;IAE1D;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;CACzD;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,cAAc,CAY5E"}
@@ -19,12 +19,23 @@ export declare class KosContainerIndex<T extends IKosIdentifiable> implements IK
19
19
  private _container;
20
20
  private _map;
21
21
  private _key;
22
+ private _generation;
22
23
  data: KosData<Record<string, T[]>>;
23
24
  constructor({ container, key }: KosContainerIndexOptions<T>);
24
25
  refresh(): void;
25
26
  private addItemToIndex;
26
27
  private resolveIndex;
28
+ /**
29
+ * Rebuild the index from the container's current contents.
30
+ *
31
+ * Applied in the same action when every key resolves synchronously, so a
32
+ * property key or a synchronous mapper updates the index before the
33
+ * container mutation returns. When a mapper returns a promise, the rebuild
34
+ * applies once they all settle, and only if no later rebuild has started:
35
+ * the latest container contents always win.
36
+ */
27
37
  private generateIndex;
38
+ private applyIndex;
28
39
  get keys(): string[];
29
40
  get index(): Map<string, Set<T>>;
30
41
  getByKey(key: string): T[];
@@ -1 +1 @@
1
- {"version":3,"file":"kos-container-index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/core/kos-container-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AACvD,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AO,CAAC,aAAa;IA0BrB,IAAI,IAAI,aAEP;IACD,IAAI,KAAK,wBAER;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM;CAOrB"}
1
+ {"version":3,"file":"kos-container-index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/core/kos-container-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,UAAU,wBAAwB,CAAC,CAAC,SAAS,gBAAgB;IAC3D,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,gBAAgB;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,gBAAgB;IACrD,CAAC,KAAK,EAAE,CAAC,GACL,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACtC,MAAM,GACN,MAAM,EAAE,GACR,SAAS,CAAC;CACf;AAkBD,qBAAa,iBAAiB,CAAC,CAAC,SAAS,gBAAgB,CACvD,YAAW,kBAAkB,CAAC,CAAC,CAAC;IAEhC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CA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