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

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 (182) hide show
  1. package/common/events/async-event-bus.d.ts.map +1 -1
  2. package/common/events/eventBus.d.ts.map +1 -1
  3. package/core/core/companion-instantiator.d.ts.map +1 -1
  4. package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -1
  5. package/core/core/decorators/index.d.ts +0 -1
  6. package/core/core/decorators/index.d.ts.map +1 -1
  7. package/core/core/decorators/kos-container-aware.d.ts +104 -3
  8. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  9. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  10. package/core/core/decorators/kos-reload-aware.d.ts +4 -0
  11. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  12. package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
  13. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  14. package/core/core/decorators/kosModel.d.ts.map +1 -1
  15. package/core/core/decorators/propKeys.d.ts +1 -1
  16. package/core/core/decorators/propKeys.d.ts.map +1 -1
  17. package/core/core/decorators/resolve-parameters.d.ts.map +1 -1
  18. package/core/core/dependency-manager.d.ts.map +1 -1
  19. package/core/core/extension/extension-manager.d.ts.map +1 -1
  20. package/core/core/indexing/kos-container-index-aware.d.ts +4 -0
  21. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  22. package/core/core/indexing/kos-index-aware.d.ts +6 -0
  23. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  24. package/core/core/indexing/types.d.ts +30 -3
  25. package/core/core/indexing/types.d.ts.map +1 -1
  26. package/core/core/kos-container-index.d.ts.map +1 -1
  27. package/core/core/kos-container-model.d.ts.map +1 -1
  28. package/core/core/kos-data-container.d.ts.map +1 -1
  29. package/core/core/kos-model-factory.d.ts.map +1 -1
  30. package/core/core/kos-registration.d.ts.map +1 -1
  31. package/core/core/kosModel.d.ts.map +1 -1
  32. package/core/core/kosModelManager.d.ts.map +1 -1
  33. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  34. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  35. package/core/core/lifecycle/model-active-machine.d.ts.map +1 -1
  36. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  37. package/core/core/lifecycle/model-online-machine.d.ts.map +1 -1
  38. package/core/core/log/index.d.ts +1 -0
  39. package/core/core/log/index.d.ts.map +1 -1
  40. package/core/core/log/log-groups.d.ts +27 -0
  41. package/core/core/log/log-groups.d.ts.map +1 -0
  42. package/core/core/log/log-override-match.d.ts +24 -0
  43. package/core/core/log/log-override-match.d.ts.map +1 -0
  44. package/core/core/log/log.d.ts +15 -9
  45. package/core/core/log/log.d.ts.map +1 -1
  46. package/core/core/model/kos-logger-factory.d.ts +6 -4
  47. package/core/core/model/kos-logger-factory.d.ts.map +1 -1
  48. package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
  49. package/core/core/model/model-hook-cache.d.ts +6 -1
  50. package/core/core/model/model-hook-cache.d.ts.map +1 -1
  51. package/core/core/model-cache.d.ts.map +1 -1
  52. package/core/core/model-instantiator.d.ts.map +1 -1
  53. package/core/core/registration/model-registration.d.ts +2 -0
  54. package/core/core/registration/model-registration.d.ts.map +1 -1
  55. package/core/core/registration/registration-manager.d.ts.map +1 -1
  56. package/core/core/services/app-startup-service.d.ts.map +1 -1
  57. package/core/core/services/intent-service.d.ts.map +1 -1
  58. package/core/core/transport/base-message-transport.d.ts.map +1 -1
  59. package/core/core/transport/bridge-transport.d.ts.map +1 -1
  60. package/core/core/transport/mock/future-simulator.d.ts.map +1 -1
  61. package/core/core/transport/mock/index.d.ts +2 -0
  62. package/core/core/transport/mock/index.d.ts.map +1 -1
  63. package/core/core/transport/mock/mock-boot.d.ts +39 -0
  64. package/core/core/transport/mock/mock-boot.d.ts.map +1 -0
  65. package/core/core/transport/mock/mock-config.d.ts.map +1 -1
  66. package/core/core/transport/mock/mock-fixtures.d.ts.map +1 -1
  67. package/core/core/transport/mock/mock-playback.d.ts.map +1 -1
  68. package/core/core/transport/mock/mock-recorder.d.ts.map +1 -1
  69. package/core/core/transport/mock/mock-registry.d.ts.map +1 -1
  70. package/core/core/transport/mock/mock-setups.d.ts.map +1 -1
  71. package/core/core/transport/mock/standalone-mock-socket.d.ts.map +1 -1
  72. package/core/core/transport/transport-factory.d.ts.map +1 -1
  73. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  74. package/core/types/global.d.ts +0 -6
  75. package/core/util/feature-flags.d.ts.map +1 -1
  76. package/core/util/kos-core-utils.d.ts.map +1 -1
  77. package/core/util/kos-fetch.d.ts.map +1 -1
  78. package/core/util/kos-message-utils.d.ts.map +1 -1
  79. package/core/util/kos-model-utils.d.ts +2 -0
  80. package/core/util/kos-model-utils.d.ts.map +1 -1
  81. package/core/util/kos-service-request.d.ts +11 -2
  82. package/core/util/kos-service-request.d.ts.map +1 -1
  83. package/core/util/log-utils.d.ts +0 -10
  84. package/core/util/log-utils.d.ts.map +1 -1
  85. package/core/util/model-error-utils.d.ts.map +1 -1
  86. package/core/util/model-utils.d.ts.map +1 -1
  87. package/core/util/promise-utils.d.ts.map +1 -1
  88. package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
  89. package/core/util/service-factory.d.ts.map +1 -1
  90. package/core/util/wait-for-request.d.ts.map +1 -1
  91. package/index.cjs +109 -323
  92. package/index.cjs.map +1 -1
  93. package/index.js +363 -577
  94. package/index.js.map +1 -1
  95. package/models/decorators/future-service.d.ts.map +1 -1
  96. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  97. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  98. package/models/models/device/services/device-services.d.ts.map +1 -1
  99. package/models/models/future/future-aware.d.ts.map +1 -1
  100. package/models/models/future/future-model-builder.d.ts.map +1 -1
  101. package/models/models/future/future-model.d.ts.map +1 -1
  102. package/models/models/future-container/future-container-model.d.ts.map +1 -1
  103. package/models/models/gpio-chip/gpio-chip-builders.d.ts +0 -3
  104. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -1
  105. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  106. package/models/models/gpio-chip/services/gpio-chip-services.d.ts +1 -1
  107. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  108. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +2 -0
  109. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -1
  110. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +43 -24
  111. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  112. package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts +20 -1
  113. package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts.map +1 -1
  114. package/models/models/kos-log-manager/types/index.d.ts +75 -6
  115. package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
  116. package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
  117. package/models/models/ota/services/ota-services.d.ts.map +1 -1
  118. package/models/models/region-info/region-info-model.d.ts.map +1 -1
  119. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  120. package/models/models/state-bean/services/state-bean-services.d.ts.map +1 -1
  121. package/models/models/state-prop/services/state-prop-services.d.ts.map +1 -1
  122. package/models/models/storage-device/services/storage-device-services.d.ts.map +1 -1
  123. package/models/models/studio-properties/services/studio-properties-services.d.ts.map +1 -1
  124. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  125. package/models/models/translation/descriptor-merge.d.ts +9 -1
  126. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  127. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  128. package/models/models/translation/translation-model.d.ts +4 -2
  129. package/models/models/translation/translation-model.d.ts.map +1 -1
  130. package/models/models/translation/types/index.d.ts +24 -6
  131. package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
  132. package/models/models/trouble/utils/trouble-data-extension.d.ts.map +1 -1
  133. package/models/models/trouble/utils/trouble-extension.d.ts.map +1 -1
  134. package/models/models/usb-update/services/usb-update-services.d.ts.map +1 -1
  135. package/models/models/ws-event/ws-event-model.d.ts.map +1 -1
  136. package/models/services/future/index.d.ts.map +1 -1
  137. package/models/services/login/index.d.ts.map +1 -1
  138. package/models/services/trouble/index.d.ts.map +1 -1
  139. package/models/types/cancellable-promise.d.ts +2 -0
  140. package/models/types/cancellable-promise.d.ts.map +1 -1
  141. package/models/utils/await-future-call.d.ts +8 -0
  142. package/models/utils/await-future-call.d.ts.map +1 -1
  143. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  144. package/models/utils/client.d.ts +1 -1
  145. package/models/utils/core-registration-manager.d.ts +15 -2
  146. package/models/utils/core-registration-manager.d.ts.map +1 -1
  147. package/models/utils/get-kos-connection-id.d.ts.map +1 -1
  148. package/models/utils/service-accessor.d.ts +1 -1
  149. package/models/utils/service.d.ts +1 -1
  150. package/models/utils/services/kos/1.6.5/service.d.ts +1 -1
  151. package/models/utils/services/kos/1.8.1/service.d.ts +1 -1
  152. package/models/utils/services/kos/1.9.x/service.d.ts +1 -1
  153. package/models/utils/services/kos/daily/service.d.ts +1 -1
  154. package/models/utils/services/vfs/1.6.5/service.d.ts +1 -1
  155. package/models/utils/services/vfs/1.8.1/service.d.ts +1 -1
  156. package/models/utils/services/vfs/1.9.x/service.d.ts +1 -1
  157. package/models/utils/services/vfs/daily/service.d.ts +1 -1
  158. package/models/utils/timer-manager.d.ts.map +1 -1
  159. package/package.json +2 -2
  160. package/{software-info-registration-Le3V0a6v.cjs → software-info-registration-BPN4QLfN.cjs} +1299 -711
  161. package/software-info-registration-BPN4QLfN.cjs.map +1 -0
  162. package/{software-info-registration-kSGacOka.js → software-info-registration-BTHhITrs.js} +1610 -1022
  163. package/software-info-registration-BTHhITrs.js.map +1 -0
  164. package/testing.cjs +1 -2
  165. package/testing.cjs.map +1 -1
  166. package/testing.js +1 -2
  167. package/testing.js.map +1 -1
  168. package/ui/components/kos-model-loader/contexts/kos-model-hierarchy-context.d.ts.map +1 -1
  169. package/ui/components/kos-model-loader/kos-model-loader.d.ts.map +1 -1
  170. package/ui/contexts/kos-model-context.d.ts.map +1 -1
  171. package/ui/contexts/translation-container/kos-translations-provider.d.ts +8 -1
  172. package/ui/contexts/translation-container/kos-translations-provider.d.ts.map +1 -1
  173. package/ui/features/canvas/components/canvas-streamer/canvas-streamer.d.ts.map +1 -1
  174. package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
  175. package/ui/hooks/use-kos-model.d.ts +1 -0
  176. package/ui/hooks/use-kos-model.d.ts.map +1 -1
  177. package/ui/hooks/use-mutation-observer.d.ts.map +1 -1
  178. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  179. package/core/core/decorators/kos-log.d.ts +0 -14
  180. package/core/core/decorators/kos-log.d.ts.map +0 -1
  181. package/software-info-registration-Le3V0a6v.cjs.map +0 -1
  182. package/software-info-registration-kSGacOka.js.map +0 -1
package/testing.cjs CHANGED
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("mobx");
4
- const service = require("./software-info-registration-Le3V0a6v.cjs");
5
- require("loglevel");
4
+ const service = require("./software-info-registration-BPN4QLfN.cjs");
6
5
  let booted;
7
6
  let prepared = false;
8
7
  function prepareTransport(alias) {
package/testing.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"testing.cjs","sources":["../../../packages/kos-ui-sdk/src/testing/index.ts"],"sourcesContent":["/**\n * Test support for KOS models: boots the framework in a unit test without a\n * device, WebSocket server or browser.\n *\n * KOS models need a live KosCore, and KosCore opens a WebSocket as soon as it\n * is created. `bootKosCore` boots it on KosMock's standalone loopback\n * transport instead, which authorizes itself so `whenReady()` resolves without\n * a device or the `KOS_ALLOW_ANONYMOUS` build flag.\n *\n * `bootKosCore()` returns the same registration chain an app's\n * `KosModelRegistry` gives (`.model()`, `.preload()`, `.companion()`,\n * `.legacy()`), so a test passes the model's registration bean directly.\n * `boot()` also registers the SDK's core models, so a model with a\n * `@kosConfigProperty` or a dependency on a core model builds with only the\n * model under test on the chain.\n *\n * Backend traffic is mocked as an app would mock it (`KosMock.get`,\n * `KosMock.post`, fixtures, config injection), so a test exercises the real\n * request path. `.setup()` and `.fixture()` install the project's setup modules\n * and recorded fixtures before boot.\n *\n * ```ts\n * import { bootKosCore } from \"@kosdev-code/kos-ui-sdk/testing\";\n * import { KosMock, whenReady } from \"@kosdev-code/kos-ui-sdk\";\n * import { Board } from \"./models/board\";\n *\n * beforeAll(async () => {\n * KosMock.get(\"/api/board/:id\", { data: { id: \"b1\", state: \"READY\" } });\n * await bootKosCore().model(Board).boot();\n * });\n *\n * it(\"loads the board\", async () => {\n * const board = Board.instance(\"b1\").options({}).build();\n * await whenReady(board);\n * expect(board.state).toBe(\"READY\");\n * });\n * ```\n *\n * Singleton models take one configuration per test file: a second\n * `options(...)` call returns the first instance and silently discards the new\n * options. Put a case that needs different options in its own file.\n *\n * The standalone socket authorizes by publishing Studio's\n * `/studioServer/auth/LOGGED_IN` on every open, which a device never sends, so\n * disconnect and reconnect tests here follow Studio's sequence rather than a\n * device's.\n */\nimport type {\n BaseKosModelRegistrationBean,\n IKosCoreManager,\n IKosModelRegistration,\n IKosRegistry,\n KosCompanionModelType,\n KosMockFixture,\n KosMockPlaybackOptions,\n KosMockSetupModule,\n KosModelRegistrationType,\n Preloaded,\n} from \"../core\";\nimport { KosCore, KosMock, RegistrationManager } from \"../core\";\nimport { KosModelRegistry } from \"../models/utils/core-registration-manager\";\n\nlet booted: Promise<IKosCoreManager> | undefined;\nlet prepared = false;\n\nexport interface BootKosCoreOptions {\n /** Connection alias, when the model under test cares about one. */\n alias?: string;\n}\n\n/**\n * A model's registration bean: the value `@kosModel` generates beside the\n * model, which an application passes to `KosModelRegistry...model()`.\n *\n * Pass the bean itself rather than its `registration` property; the property\n * registers nothing, and the model then fails on its first build.\n */\nexport type KosTestRegistration =\n | BaseKosModelRegistrationBean<any, any>\n | KosModelRegistrationType<any, any>;\n\n/**\n * The registration chain an application uses, terminated by `boot()`.\n *\n * Every call is deferred until `boot()`, so ordering within the chain does not\n * matter and `alias()` may come after the models it applies to. `boot()`\n * registers the SDK's core models before the chain's own registrations, the\n * same set `KosModelRegistry.core.models()` registers in an app.\n */\nexport interface KosCoreBootBuilder {\n /** Register a model under test, optionally preloading it. */\n model: (\n registration: KosTestRegistration,\n preload?: boolean\n ) => KosCoreBootBuilder;\n /** Preload a model type, or a specific instance of one, at boot. */\n preload: (model: Preloaded) => KosCoreBootBuilder;\n /** Attach a companion model type to a parent type. */\n companion: (\n parentType: string,\n companion: KosCompanionModelType<any>\n ) => KosCoreBootBuilder;\n /** Register a hand-written registration record against a type. */\n legacy: (\n type: string,\n registration: IKosModelRegistration\n ) => KosCoreBootBuilder;\n /** Connection alias, when the model under test cares about one. */\n alias: (alias: string) => KosCoreBootBuilder;\n /**\n * Install a KosMock setup module before boot: the default export the\n * fixture server serves from `fixtures/setups/*.mjs`, imported directly. It\n * runs before the transport exists, so it can register routes, transformers,\n * config injections and observers; pushes belong after boot.\n */\n setup: (module: KosMockSetupModule) => KosCoreBootBuilder;\n /**\n * Load a recorded fixture before boot: the JSON the fixture server serves,\n * imported directly. Test defaults are `ignoreLatency: true` (full speed) and\n * `pushes: \"manual\"` (the capture's topic and future timeline stays inert, and\n * the test pushes what it asserts on). Pass options to override either.\n */\n fixture: (\n fixture: KosMockFixture,\n options?: KosMockPlaybackOptions\n ) => KosCoreBootBuilder;\n /** Boot KosCore with the core models and everything on this chain. */\n boot: () => Promise<IKosCoreManager>;\n}\n\n/**\n * Put the mock transport and the connection alias in place before anything\n * constructs KosCore.\n *\n * KosCore picks its transport and reads its alias in the constructor, and\n * registering a model calls `KosCore.getInstance()`, so registration cannot\n * come first.\n */\nfunction prepareTransport(alias?: string): void {\n if (prepared) {\n return;\n }\n prepared = true;\n KosMock.configure({ standalone: true });\n KosCore.getInstance({ connectionAlias: alias });\n}\n\nfunction bootCore(\n registration: IKosRegistry,\n options: BootKosCoreOptions\n): Promise<IKosCoreManager> {\n if (!booted) {\n prepareTransport(options.alias);\n const core = KosCore.create(registration, false, options.alias);\n booted = core.whenReady().then(() => core);\n }\n return booted;\n}\n\nconst FIXTURE_TEST_DEFAULTS: KosMockPlaybackOptions = {\n ignoreLatency: true,\n pushes: \"manual\",\n};\n\nfunction buildBootBuilder(): KosCoreBootBuilder {\n const registrations: (() => void)[] = [];\n const mockInstalls: (() => Promise<void> | void)[] = [];\n const preloadModels: Preloaded[] = [];\n let alias: string | undefined;\n\n const builder: KosCoreBootBuilder = {\n model: (registration, preload) => {\n registrations.push(() =>\n RegistrationManager.model.register(builder)(registration, preload)\n );\n return builder;\n },\n preload: (model) => {\n preloadModels.push(model);\n return builder;\n },\n companion: (parentType, companion) => {\n registrations.push(() =>\n RegistrationManager.companion.register(builder)(parentType, companion)\n );\n return builder;\n },\n legacy: (type, registration) => {\n registrations.push(() =>\n RegistrationManager.model.registerLegacyModel(builder)(\n type,\n registration\n )\n );\n return builder;\n },\n alias: (value) => {\n alias = value;\n return builder;\n },\n setup: (module) => {\n mockInstalls.push(async () => {\n await module(KosMock);\n });\n return builder;\n },\n fixture: (fixture, options) => {\n mockInstalls.push(() => {\n KosMock.loadFixture(fixture, { ...FIXTURE_TEST_DEFAULTS, ...options });\n });\n return builder;\n },\n boot: async () => {\n // Mocks first, in call order, before the transport exists.\n for (const install of mockInstalls.splice(0)) {\n await install();\n }\n prepareTransport(alias);\n KosModelRegistry.core.models();\n registrations.splice(0).forEach((register) => register());\n return bootCore({ models: {}, preloadModels }, { alias });\n },\n };\n\n return builder;\n}\n\n/**\n * Open a registration chain, then `boot()` it.\n *\n * Idempotent per module instance: the first `boot()` boots and later calls\n * return the same core. KosCore and the model manager are process-global, so\n * a test file gets one core and one set of singletons.\n *\n * Register the routes the models need before calling `boot()` so nothing races\n * the boot requests, either with `KosMock.get(...)` above the chain or with\n * `.setup()` / `.fixture()` on it.\n *\n * @example\n * ```ts\n * await bootKosCore()\n * .setup(boardBaseline) // fixtures/setups/board-baseline.mjs\n * .fixture(pourOk) // fixtures/pour-ok.json\n * .model(Board)\n * .boot();\n * ```\n */\nexport function bootKosCore(): KosCoreBootBuilder;\n/**\n * Boot KosCore from an assembled registry.\n *\n * For callers that already hold an `IKosRegistry`; it boots exactly the\n * registry it is given. A test registering its own models should use the\n * no-argument chain, which takes registration beans directly and registers the\n * SDK's core models.\n *\n * @param registration Models under test, e.g. `{ models: {...}, preloadModels: [] }`.\n */\nexport function bootKosCore(\n registration: IKosRegistry,\n options?: BootKosCoreOptions\n): Promise<IKosCoreManager>;\nexport function bootKosCore(\n registration?: IKosRegistry,\n options: BootKosCoreOptions = {}\n): KosCoreBootBuilder | Promise<IKosCoreManager> {\n return registration ? bootCore(registration, options) : buildBootBuilder();\n}\n\n/**\n * Resolves once `predicate` holds, or rejects with a message naming `label`\n * after the timeout.\n *\n * Model reactions are asynchronous, so a test that changes an input and asserts\n * at once reads the old value. Polling for the outcome is faster than sleeping\n * for a fixed interval and fails with a clear message when the reaction never\n * fires.\n *\n * @param label What is being waited for, quoted back in the timeout message.\n */\nexport async function until(\n predicate: () => boolean,\n label: string,\n timeoutMs = 2000\n): Promise<void> {\n const deadline = Date.now() + timeoutMs;\n while (!predicate()) {\n if (Date.now() > deadline) {\n throw new Error(`timed out waiting for ${label}`);\n }\n await new Promise((resolve) => setTimeout(resolve, 5));\n }\n}\n"],"names":["KosMock","KosCore","RegistrationManager","module","KosModelRegistry"],"mappings":";;;;;AA8DA,IAAI;AACJ,IAAI,WAAW;AA2Ef,SAAS,iBAAiB,OAAsB;AAC9C,MAAI,UAAU;AACZ;AAAA,EACF;AACA,aAAW;AACXA,UAAAA,QAAQ,UAAU,EAAE,YAAY,KAAA,CAAM;AACtCC,UAAAA,QAAQ,YAAY,EAAE,iBAAiB,MAAA,CAAO;AAChD;AAEA,SAAS,SACP,cACA,SAC0B;AAC1B,MAAI,CAAC,QAAQ;AACX,qBAAiB,QAAQ,KAAK;AAC9B,UAAM,OAAOA,QAAAA,QAAQ,OAAO,cAAc,OAAO,QAAQ,KAAK;AAC9D,aAAS,KAAK,UAAA,EAAY,KAAK,MAAM,IAAI;AAAA,EAC3C;AACA,SAAO;AACT;AAEA,MAAM,wBAAgD;AAAA,EACpD,eAAe;AAAA,EACf,QAAQ;AACV;AAEA,SAAS,mBAAuC;AAC9C,QAAM,gBAAgC,CAAA;AACtC,QAAM,eAA+C,CAAA;AACrD,QAAM,gBAA6B,CAAA;AACnC,MAAI;AAEJ,QAAM,UAA8B;AAAA,IAClC,OAAO,CAAC,cAAc,YAAY;AAChC,oBAAc;AAAA,QAAK,MACjBC,QAAAA,oBAAoB,MAAM,SAAS,OAAO,EAAE,cAAc,OAAO;AAAA,MAAA;AAEnE,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,UAAU;AAClB,oBAAc,KAAK,KAAK;AACxB,aAAO;AAAA,IACT;AAAA,IACA,WAAW,CAAC,YAAY,cAAc;AACpC,oBAAc;AAAA,QAAK,MACjBA,QAAAA,oBAAoB,UAAU,SAAS,OAAO,EAAE,YAAY,SAAS;AAAA,MAAA;AAEvE,aAAO;AAAA,IACT;AAAA,IACA,QAAQ,CAAC,MAAM,iBAAiB;AAC9B,oBAAc;AAAA,QAAK,MACjBA,4BAAoB,MAAM,oBAAoB,OAAO;AAAA,UACnD;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAEF,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,UAAU;AAChB,cAAQ;AACR,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAACC,YAAW;AACjB,mBAAa,KAAK,YAAY;AAC5B,cAAMA,QAAOH,QAAAA,OAAO;AAAA,MACtB,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,SAAS,YAAY;AAC7B,mBAAa,KAAK,MAAM;AACtBA,gBAAAA,QAAQ,YAAY,SAAS,EAAE,GAAG,uBAAuB,GAAG,SAAS;AAAA,MACvE,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,MAAM,YAAY;AAEhB,iBAAW,WAAW,aAAa,OAAO,CAAC,GAAG;AAC5C,cAAM,QAAA;AAAA,MACR;AACA,uBAAiB,KAAK;AACtBI,cAAAA,iBAAiB,KAAK,OAAA;AACtB,oBAAc,OAAO,CAAC,EAAE,QAAQ,CAAC,aAAa,UAAU;AACxD,aAAO,SAAS,EAAE,QAAQ,CAAA,GAAI,cAAA,GAAiB,EAAE,OAAO;AAAA,IAC1D;AAAA,EAAA;AAGF,SAAO;AACT;AAqCO,SAAS,YACd,cACA,UAA8B,IACiB;AAC/C,SAAO,eAAe,SAAS,cAAc,OAAO,IAAI,iBAAA;AAC1D;AAaA,eAAsB,MACpB,WACA,OACA,YAAY,KACG;AACf,QAAM,WAAW,KAAK,IAAA,IAAQ;AAC9B,SAAO,CAAC,aAAa;AACnB,QAAI,KAAK,IAAA,IAAQ,UAAU;AACzB,YAAM,IAAI,MAAM,yBAAyB,KAAK,EAAE;AAAA,IAClD;AACA,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,CAAC,CAAC;AAAA,EACvD;AACF;;;"}
1
+ {"version":3,"file":"testing.cjs","sources":["../../../packages/kos-ui-sdk/src/testing/index.ts"],"sourcesContent":["/**\n * Test support for KOS models: boots the framework in a unit test without a\n * device, WebSocket server or browser.\n *\n * KOS models need a live KosCore, and KosCore opens a WebSocket as soon as it\n * is created. `bootKosCore` boots it on KosMock's standalone loopback\n * transport instead, which authorizes itself so `whenReady()` resolves without\n * a device or the `KOS_ALLOW_ANONYMOUS` build flag.\n *\n * `bootKosCore()` returns the same registration chain an app's\n * `KosModelRegistry` gives (`.model()`, `.preload()`, `.companion()`,\n * `.legacy()`), so a test passes the model's registration bean directly.\n * `boot()` also registers the SDK's core models, so a model with a\n * `@kosConfigProperty` or a dependency on a core model builds with only the\n * model under test on the chain.\n *\n * Backend traffic is mocked as an app would mock it (`KosMock.get`,\n * `KosMock.post`, fixtures, config injection), so a test exercises the real\n * request path. `.setup()` and `.fixture()` install the project's setup modules\n * and recorded fixtures before boot.\n *\n * ```ts\n * import { bootKosCore } from \"@kosdev-code/kos-ui-sdk/testing\";\n * import { KosMock, whenReady } from \"@kosdev-code/kos-ui-sdk\";\n * import { Board } from \"./models/board\";\n *\n * beforeAll(async () => {\n * KosMock.get(\"/api/board/:id\", { data: { id: \"b1\", state: \"READY\" } });\n * await bootKosCore().model(Board).boot();\n * });\n *\n * it(\"loads the board\", async () => {\n * const board = Board.instance(\"b1\").options({}).build();\n * await whenReady(board);\n * expect(board.state).toBe(\"READY\");\n * });\n * ```\n *\n * Singleton models take one configuration per test file: a second\n * `options(...)` call returns the first instance and silently discards the new\n * options. Put a case that needs different options in its own file.\n *\n * The standalone socket authorizes by publishing Studio's\n * `/studioServer/auth/LOGGED_IN` on every open, which a device never sends, so\n * disconnect and reconnect tests here follow Studio's sequence rather than a\n * device's.\n */\nimport type {\n BaseKosModelRegistrationBean,\n IKosCoreManager,\n IKosModelRegistration,\n IKosRegistry,\n KosCompanionModelType,\n KosMockFixture,\n KosMockPlaybackOptions,\n KosMockSetupModule,\n KosModelRegistrationType,\n Preloaded,\n} from \"../core\";\nimport { KosCore, KosMock, RegistrationManager } from \"../core\";\nimport { KosModelRegistry } from \"../models/utils/core-registration-manager\";\n\nlet booted: Promise<IKosCoreManager> | undefined;\nlet prepared = false;\n\nexport interface BootKosCoreOptions {\n /** Connection alias, when the model under test cares about one. */\n alias?: string;\n}\n\n/**\n * A model's registration bean: the value `@kosModel` generates beside the\n * model, which an application passes to `KosModelRegistry...model()`.\n *\n * Pass the bean itself rather than its `registration` property; the property\n * registers nothing, and the model then fails on its first build.\n */\nexport type KosTestRegistration =\n | BaseKosModelRegistrationBean<any, any>\n | KosModelRegistrationType<any, any>;\n\n/**\n * The registration chain an application uses, terminated by `boot()`.\n *\n * Every call is deferred until `boot()`, so ordering within the chain does not\n * matter and `alias()` may come after the models it applies to. `boot()`\n * registers the SDK's core models before the chain's own registrations, the\n * same set `KosModelRegistry.core.models()` registers in an app.\n */\nexport interface KosCoreBootBuilder {\n /** Register a model under test, optionally preloading it. */\n model: (\n registration: KosTestRegistration,\n preload?: boolean\n ) => KosCoreBootBuilder;\n /** Preload a model type, or a specific instance of one, at boot. */\n preload: (model: Preloaded) => KosCoreBootBuilder;\n /** Attach a companion model type to a parent type. */\n companion: (\n parentType: string,\n companion: KosCompanionModelType<any>\n ) => KosCoreBootBuilder;\n /** Register a hand-written registration record against a type. */\n legacy: (\n type: string,\n registration: IKosModelRegistration\n ) => KosCoreBootBuilder;\n /** Connection alias, when the model under test cares about one. */\n alias: (alias: string) => KosCoreBootBuilder;\n /**\n * Install a KosMock setup module before boot: the default export the\n * fixture server serves from `fixtures/setups/*.mjs`, imported directly. It\n * runs before the transport exists, so it can register routes, transformers,\n * config injections and observers; pushes belong after boot.\n */\n setup: (module: KosMockSetupModule) => KosCoreBootBuilder;\n /**\n * Load a recorded fixture before boot: the JSON the fixture server serves,\n * imported directly. Test defaults are `ignoreLatency: true` (full speed) and\n * `pushes: \"manual\"` (the capture's topic and future timeline stays inert, and\n * the test pushes what it asserts on). Pass options to override either.\n */\n fixture: (\n fixture: KosMockFixture,\n options?: KosMockPlaybackOptions\n ) => KosCoreBootBuilder;\n /** Boot KosCore with the core models and everything on this chain. */\n boot: () => Promise<IKosCoreManager>;\n}\n\n/**\n * Put the mock transport and the connection alias in place before anything\n * constructs KosCore.\n *\n * KosCore picks its transport and reads its alias in the constructor, and\n * registering a model calls `KosCore.getInstance()`, so registration cannot\n * come first.\n */\nfunction prepareTransport(alias?: string): void {\n if (prepared) {\n return;\n }\n prepared = true;\n KosMock.configure({ standalone: true });\n KosCore.getInstance({ connectionAlias: alias });\n}\n\nfunction bootCore(\n registration: IKosRegistry,\n options: BootKosCoreOptions\n): Promise<IKosCoreManager> {\n if (!booted) {\n prepareTransport(options.alias);\n const core = KosCore.create(registration, false, options.alias);\n booted = core.whenReady().then(() => core);\n }\n return booted;\n}\n\nconst FIXTURE_TEST_DEFAULTS: KosMockPlaybackOptions = {\n ignoreLatency: true,\n pushes: \"manual\",\n};\n\nfunction buildBootBuilder(): KosCoreBootBuilder {\n const registrations: (() => void)[] = [];\n const mockInstalls: (() => Promise<void> | void)[] = [];\n const preloadModels: Preloaded[] = [];\n let alias: string | undefined;\n\n const builder: KosCoreBootBuilder = {\n model: (registration, preload) => {\n registrations.push(() =>\n RegistrationManager.model.register(builder)(registration, preload)\n );\n return builder;\n },\n preload: (model) => {\n preloadModels.push(model);\n return builder;\n },\n companion: (parentType, companion) => {\n registrations.push(() =>\n RegistrationManager.companion.register(builder)(parentType, companion)\n );\n return builder;\n },\n legacy: (type, registration) => {\n registrations.push(() =>\n RegistrationManager.model.registerLegacyModel(builder)(\n type,\n registration\n )\n );\n return builder;\n },\n alias: (value) => {\n alias = value;\n return builder;\n },\n setup: (module) => {\n mockInstalls.push(async () => {\n await module(KosMock);\n });\n return builder;\n },\n fixture: (fixture, options) => {\n mockInstalls.push(() => {\n KosMock.loadFixture(fixture, { ...FIXTURE_TEST_DEFAULTS, ...options });\n });\n return builder;\n },\n boot: async () => {\n // Mocks first, in call order, before the transport exists.\n for (const install of mockInstalls.splice(0)) {\n await install();\n }\n prepareTransport(alias);\n KosModelRegistry.core.models();\n registrations.splice(0).forEach((register) => register());\n return bootCore({ models: {}, preloadModels }, { alias });\n },\n };\n\n return builder;\n}\n\n/**\n * Open a registration chain, then `boot()` it.\n *\n * Idempotent per module instance: the first `boot()` boots and later calls\n * return the same core. KosCore and the model manager are process-global, so\n * a test file gets one core and one set of singletons.\n *\n * Register the routes the models need before calling `boot()` so nothing races\n * the boot requests, either with `KosMock.get(...)` above the chain or with\n * `.setup()` / `.fixture()` on it.\n *\n * @example\n * ```ts\n * await bootKosCore()\n * .setup(boardBaseline) // fixtures/setups/board-baseline.mjs\n * .fixture(pourOk) // fixtures/pour-ok.json\n * .model(Board)\n * .boot();\n * ```\n */\nexport function bootKosCore(): KosCoreBootBuilder;\n/**\n * Boot KosCore from an assembled registry.\n *\n * For callers that already hold an `IKosRegistry`; it boots exactly the\n * registry it is given. A test registering its own models should use the\n * no-argument chain, which takes registration beans directly and registers the\n * SDK's core models.\n *\n * @param registration Models under test, e.g. `{ models: {...}, preloadModels: [] }`.\n */\nexport function bootKosCore(\n registration: IKosRegistry,\n options?: BootKosCoreOptions\n): Promise<IKosCoreManager>;\nexport function bootKosCore(\n registration?: IKosRegistry,\n options: BootKosCoreOptions = {}\n): KosCoreBootBuilder | Promise<IKosCoreManager> {\n return registration ? bootCore(registration, options) : buildBootBuilder();\n}\n\n/**\n * Resolves once `predicate` holds, or rejects with a message naming `label`\n * after the timeout.\n *\n * Model reactions are asynchronous, so a test that changes an input and asserts\n * at once reads the old value. Polling for the outcome is faster than sleeping\n * for a fixed interval and fails with a clear message when the reaction never\n * fires.\n *\n * @param label What is being waited for, quoted back in the timeout message.\n */\nexport async function until(\n predicate: () => boolean,\n label: string,\n timeoutMs = 2000\n): Promise<void> {\n const deadline = Date.now() + timeoutMs;\n while (!predicate()) {\n if (Date.now() > deadline) {\n throw new Error(`timed out waiting for ${label}`);\n }\n await new Promise((resolve) => setTimeout(resolve, 5));\n }\n}\n"],"names":["KosMock","KosCore","RegistrationManager","module","KosModelRegistry"],"mappings":";;;;AA8DA,IAAI;AACJ,IAAI,WAAW;AA2Ef,SAAS,iBAAiB,OAAsB;AAC9C,MAAI,UAAU;AACZ;AAAA,EACF;AACA,aAAW;AACXA,UAAAA,QAAQ,UAAU,EAAE,YAAY,KAAA,CAAM;AACtCC,UAAAA,QAAQ,YAAY,EAAE,iBAAiB,MAAA,CAAO;AAChD;AAEA,SAAS,SACP,cACA,SAC0B;AAC1B,MAAI,CAAC,QAAQ;AACX,qBAAiB,QAAQ,KAAK;AAC9B,UAAM,OAAOA,QAAAA,QAAQ,OAAO,cAAc,OAAO,QAAQ,KAAK;AAC9D,aAAS,KAAK,UAAA,EAAY,KAAK,MAAM,IAAI;AAAA,EAC3C;AACA,SAAO;AACT;AAEA,MAAM,wBAAgD;AAAA,EACpD,eAAe;AAAA,EACf,QAAQ;AACV;AAEA,SAAS,mBAAuC;AAC9C,QAAM,gBAAgC,CAAA;AACtC,QAAM,eAA+C,CAAA;AACrD,QAAM,gBAA6B,CAAA;AACnC,MAAI;AAEJ,QAAM,UAA8B;AAAA,IAClC,OAAO,CAAC,cAAc,YAAY;AAChC,oBAAc;AAAA,QAAK,MACjBC,QAAAA,oBAAoB,MAAM,SAAS,OAAO,EAAE,cAAc,OAAO;AAAA,MAAA;AAEnE,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,UAAU;AAClB,oBAAc,KAAK,KAAK;AACxB,aAAO;AAAA,IACT;AAAA,IACA,WAAW,CAAC,YAAY,cAAc;AACpC,oBAAc;AAAA,QAAK,MACjBA,QAAAA,oBAAoB,UAAU,SAAS,OAAO,EAAE,YAAY,SAAS;AAAA,MAAA;AAEvE,aAAO;AAAA,IACT;AAAA,IACA,QAAQ,CAAC,MAAM,iBAAiB;AAC9B,oBAAc;AAAA,QAAK,MACjBA,4BAAoB,MAAM,oBAAoB,OAAO;AAAA,UACnD;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAEF,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,UAAU;AAChB,cAAQ;AACR,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAACC,YAAW;AACjB,mBAAa,KAAK,YAAY;AAC5B,cAAMA,QAAOH,QAAAA,OAAO;AAAA,MACtB,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,SAAS,YAAY;AAC7B,mBAAa,KAAK,MAAM;AACtBA,gBAAAA,QAAQ,YAAY,SAAS,EAAE,GAAG,uBAAuB,GAAG,SAAS;AAAA,MACvE,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,MAAM,YAAY;AAEhB,iBAAW,WAAW,aAAa,OAAO,CAAC,GAAG;AAC5C,cAAM,QAAA;AAAA,MACR;AACA,uBAAiB,KAAK;AACtBI,cAAAA,iBAAiB,KAAK,OAAA;AACtB,oBAAc,OAAO,CAAC,EAAE,QAAQ,CAAC,aAAa,UAAU;AACxD,aAAO,SAAS,EAAE,QAAQ,CAAA,GAAI,cAAA,GAAiB,EAAE,OAAO;AAAA,IAC1D;AAAA,EAAA;AAGF,SAAO;AACT;AAqCO,SAAS,YACd,cACA,UAA8B,IACiB;AAC/C,SAAO,eAAe,SAAS,cAAc,OAAO,IAAI,iBAAA;AAC1D;AAaA,eAAsB,MACpB,WACA,OACA,YAAY,KACG;AACf,QAAM,WAAW,KAAK,IAAA,IAAQ;AAC9B,SAAO,CAAC,aAAa;AACnB,QAAI,KAAK,IAAA,IAAQ,UAAU;AACzB,YAAM,IAAI,MAAM,yBAAyB,KAAK,EAAE;AAAA,IAClD;AACA,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,CAAC,CAAC;AAAA,EACvD;AACF;;;"}
package/testing.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import "mobx";
2
- import { h as KosCore, bU as KosMock, bZ as KosModelRegistry, cn as RegistrationManager } from "./software-info-registration-kSGacOka.js";
3
- import "loglevel";
2
+ import { h as KosCore, bX as KosMock, c0 as KosModelRegistry, cr as RegistrationManager } from "./software-info-registration-BTHhITrs.js";
4
3
  let booted;
5
4
  let prepared = false;
6
5
  function prepareTransport(alias) {
package/testing.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sources":["../../../packages/kos-ui-sdk/src/testing/index.ts"],"sourcesContent":["/**\n * Test support for KOS models: boots the framework in a unit test without a\n * device, WebSocket server or browser.\n *\n * KOS models need a live KosCore, and KosCore opens a WebSocket as soon as it\n * is created. `bootKosCore` boots it on KosMock's standalone loopback\n * transport instead, which authorizes itself so `whenReady()` resolves without\n * a device or the `KOS_ALLOW_ANONYMOUS` build flag.\n *\n * `bootKosCore()` returns the same registration chain an app's\n * `KosModelRegistry` gives (`.model()`, `.preload()`, `.companion()`,\n * `.legacy()`), so a test passes the model's registration bean directly.\n * `boot()` also registers the SDK's core models, so a model with a\n * `@kosConfigProperty` or a dependency on a core model builds with only the\n * model under test on the chain.\n *\n * Backend traffic is mocked as an app would mock it (`KosMock.get`,\n * `KosMock.post`, fixtures, config injection), so a test exercises the real\n * request path. `.setup()` and `.fixture()` install the project's setup modules\n * and recorded fixtures before boot.\n *\n * ```ts\n * import { bootKosCore } from \"@kosdev-code/kos-ui-sdk/testing\";\n * import { KosMock, whenReady } from \"@kosdev-code/kos-ui-sdk\";\n * import { Board } from \"./models/board\";\n *\n * beforeAll(async () => {\n * KosMock.get(\"/api/board/:id\", { data: { id: \"b1\", state: \"READY\" } });\n * await bootKosCore().model(Board).boot();\n * });\n *\n * it(\"loads the board\", async () => {\n * const board = Board.instance(\"b1\").options({}).build();\n * await whenReady(board);\n * expect(board.state).toBe(\"READY\");\n * });\n * ```\n *\n * Singleton models take one configuration per test file: a second\n * `options(...)` call returns the first instance and silently discards the new\n * options. Put a case that needs different options in its own file.\n *\n * The standalone socket authorizes by publishing Studio's\n * `/studioServer/auth/LOGGED_IN` on every open, which a device never sends, so\n * disconnect and reconnect tests here follow Studio's sequence rather than a\n * device's.\n */\nimport type {\n BaseKosModelRegistrationBean,\n IKosCoreManager,\n IKosModelRegistration,\n IKosRegistry,\n KosCompanionModelType,\n KosMockFixture,\n KosMockPlaybackOptions,\n KosMockSetupModule,\n KosModelRegistrationType,\n Preloaded,\n} from \"../core\";\nimport { KosCore, KosMock, RegistrationManager } from \"../core\";\nimport { KosModelRegistry } from \"../models/utils/core-registration-manager\";\n\nlet booted: Promise<IKosCoreManager> | undefined;\nlet prepared = false;\n\nexport interface BootKosCoreOptions {\n /** Connection alias, when the model under test cares about one. */\n alias?: string;\n}\n\n/**\n * A model's registration bean: the value `@kosModel` generates beside the\n * model, which an application passes to `KosModelRegistry...model()`.\n *\n * Pass the bean itself rather than its `registration` property; the property\n * registers nothing, and the model then fails on its first build.\n */\nexport type KosTestRegistration =\n | BaseKosModelRegistrationBean<any, any>\n | KosModelRegistrationType<any, any>;\n\n/**\n * The registration chain an application uses, terminated by `boot()`.\n *\n * Every call is deferred until `boot()`, so ordering within the chain does not\n * matter and `alias()` may come after the models it applies to. `boot()`\n * registers the SDK's core models before the chain's own registrations, the\n * same set `KosModelRegistry.core.models()` registers in an app.\n */\nexport interface KosCoreBootBuilder {\n /** Register a model under test, optionally preloading it. */\n model: (\n registration: KosTestRegistration,\n preload?: boolean\n ) => KosCoreBootBuilder;\n /** Preload a model type, or a specific instance of one, at boot. */\n preload: (model: Preloaded) => KosCoreBootBuilder;\n /** Attach a companion model type to a parent type. */\n companion: (\n parentType: string,\n companion: KosCompanionModelType<any>\n ) => KosCoreBootBuilder;\n /** Register a hand-written registration record against a type. */\n legacy: (\n type: string,\n registration: IKosModelRegistration\n ) => KosCoreBootBuilder;\n /** Connection alias, when the model under test cares about one. */\n alias: (alias: string) => KosCoreBootBuilder;\n /**\n * Install a KosMock setup module before boot: the default export the\n * fixture server serves from `fixtures/setups/*.mjs`, imported directly. It\n * runs before the transport exists, so it can register routes, transformers,\n * config injections and observers; pushes belong after boot.\n */\n setup: (module: KosMockSetupModule) => KosCoreBootBuilder;\n /**\n * Load a recorded fixture before boot: the JSON the fixture server serves,\n * imported directly. Test defaults are `ignoreLatency: true` (full speed) and\n * `pushes: \"manual\"` (the capture's topic and future timeline stays inert, and\n * the test pushes what it asserts on). Pass options to override either.\n */\n fixture: (\n fixture: KosMockFixture,\n options?: KosMockPlaybackOptions\n ) => KosCoreBootBuilder;\n /** Boot KosCore with the core models and everything on this chain. */\n boot: () => Promise<IKosCoreManager>;\n}\n\n/**\n * Put the mock transport and the connection alias in place before anything\n * constructs KosCore.\n *\n * KosCore picks its transport and reads its alias in the constructor, and\n * registering a model calls `KosCore.getInstance()`, so registration cannot\n * come first.\n */\nfunction prepareTransport(alias?: string): void {\n if (prepared) {\n return;\n }\n prepared = true;\n KosMock.configure({ standalone: true });\n KosCore.getInstance({ connectionAlias: alias });\n}\n\nfunction bootCore(\n registration: IKosRegistry,\n options: BootKosCoreOptions\n): Promise<IKosCoreManager> {\n if (!booted) {\n prepareTransport(options.alias);\n const core = KosCore.create(registration, false, options.alias);\n booted = core.whenReady().then(() => core);\n }\n return booted;\n}\n\nconst FIXTURE_TEST_DEFAULTS: KosMockPlaybackOptions = {\n ignoreLatency: true,\n pushes: \"manual\",\n};\n\nfunction buildBootBuilder(): KosCoreBootBuilder {\n const registrations: (() => void)[] = [];\n const mockInstalls: (() => Promise<void> | void)[] = [];\n const preloadModels: Preloaded[] = [];\n let alias: string | undefined;\n\n const builder: KosCoreBootBuilder = {\n model: (registration, preload) => {\n registrations.push(() =>\n RegistrationManager.model.register(builder)(registration, preload)\n );\n return builder;\n },\n preload: (model) => {\n preloadModels.push(model);\n return builder;\n },\n companion: (parentType, companion) => {\n registrations.push(() =>\n RegistrationManager.companion.register(builder)(parentType, companion)\n );\n return builder;\n },\n legacy: (type, registration) => {\n registrations.push(() =>\n RegistrationManager.model.registerLegacyModel(builder)(\n type,\n registration\n )\n );\n return builder;\n },\n alias: (value) => {\n alias = value;\n return builder;\n },\n setup: (module) => {\n mockInstalls.push(async () => {\n await module(KosMock);\n });\n return builder;\n },\n fixture: (fixture, options) => {\n mockInstalls.push(() => {\n KosMock.loadFixture(fixture, { ...FIXTURE_TEST_DEFAULTS, ...options });\n });\n return builder;\n },\n boot: async () => {\n // Mocks first, in call order, before the transport exists.\n for (const install of mockInstalls.splice(0)) {\n await install();\n }\n prepareTransport(alias);\n KosModelRegistry.core.models();\n registrations.splice(0).forEach((register) => register());\n return bootCore({ models: {}, preloadModels }, { alias });\n },\n };\n\n return builder;\n}\n\n/**\n * Open a registration chain, then `boot()` it.\n *\n * Idempotent per module instance: the first `boot()` boots and later calls\n * return the same core. KosCore and the model manager are process-global, so\n * a test file gets one core and one set of singletons.\n *\n * Register the routes the models need before calling `boot()` so nothing races\n * the boot requests, either with `KosMock.get(...)` above the chain or with\n * `.setup()` / `.fixture()` on it.\n *\n * @example\n * ```ts\n * await bootKosCore()\n * .setup(boardBaseline) // fixtures/setups/board-baseline.mjs\n * .fixture(pourOk) // fixtures/pour-ok.json\n * .model(Board)\n * .boot();\n * ```\n */\nexport function bootKosCore(): KosCoreBootBuilder;\n/**\n * Boot KosCore from an assembled registry.\n *\n * For callers that already hold an `IKosRegistry`; it boots exactly the\n * registry it is given. A test registering its own models should use the\n * no-argument chain, which takes registration beans directly and registers the\n * SDK's core models.\n *\n * @param registration Models under test, e.g. `{ models: {...}, preloadModels: [] }`.\n */\nexport function bootKosCore(\n registration: IKosRegistry,\n options?: BootKosCoreOptions\n): Promise<IKosCoreManager>;\nexport function bootKosCore(\n registration?: IKosRegistry,\n options: BootKosCoreOptions = {}\n): KosCoreBootBuilder | Promise<IKosCoreManager> {\n return registration ? bootCore(registration, options) : buildBootBuilder();\n}\n\n/**\n * Resolves once `predicate` holds, or rejects with a message naming `label`\n * after the timeout.\n *\n * Model reactions are asynchronous, so a test that changes an input and asserts\n * at once reads the old value. Polling for the outcome is faster than sleeping\n * for a fixed interval and fails with a clear message when the reaction never\n * fires.\n *\n * @param label What is being waited for, quoted back in the timeout message.\n */\nexport async function until(\n predicate: () => boolean,\n label: string,\n timeoutMs = 2000\n): Promise<void> {\n const deadline = Date.now() + timeoutMs;\n while (!predicate()) {\n if (Date.now() > deadline) {\n throw new Error(`timed out waiting for ${label}`);\n }\n await new Promise((resolve) => setTimeout(resolve, 5));\n }\n}\n"],"names":[],"mappings":";;;AA8DA,IAAI;AACJ,IAAI,WAAW;AA2Ef,SAAS,iBAAiB,OAAsB;AAC9C,MAAI,UAAU;AACZ;AAAA,EACF;AACA,aAAW;AACX,UAAQ,UAAU,EAAE,YAAY,KAAA,CAAM;AACtC,UAAQ,YAAY,EAAE,iBAAiB,MAAA,CAAO;AAChD;AAEA,SAAS,SACP,cACA,SAC0B;AAC1B,MAAI,CAAC,QAAQ;AACX,qBAAiB,QAAQ,KAAK;AAC9B,UAAM,OAAO,QAAQ,OAAO,cAAc,OAAO,QAAQ,KAAK;AAC9D,aAAS,KAAK,UAAA,EAAY,KAAK,MAAM,IAAI;AAAA,EAC3C;AACA,SAAO;AACT;AAEA,MAAM,wBAAgD;AAAA,EACpD,eAAe;AAAA,EACf,QAAQ;AACV;AAEA,SAAS,mBAAuC;AAC9C,QAAM,gBAAgC,CAAA;AACtC,QAAM,eAA+C,CAAA;AACrD,QAAM,gBAA6B,CAAA;AACnC,MAAI;AAEJ,QAAM,UAA8B;AAAA,IAClC,OAAO,CAAC,cAAc,YAAY;AAChC,oBAAc;AAAA,QAAK,MACjB,oBAAoB,MAAM,SAAS,OAAO,EAAE,cAAc,OAAO;AAAA,MAAA;AAEnE,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,UAAU;AAClB,oBAAc,KAAK,KAAK;AACxB,aAAO;AAAA,IACT;AAAA,IACA,WAAW,CAAC,YAAY,cAAc;AACpC,oBAAc;AAAA,QAAK,MACjB,oBAAoB,UAAU,SAAS,OAAO,EAAE,YAAY,SAAS;AAAA,MAAA;AAEvE,aAAO;AAAA,IACT;AAAA,IACA,QAAQ,CAAC,MAAM,iBAAiB;AAC9B,oBAAc;AAAA,QAAK,MACjB,oBAAoB,MAAM,oBAAoB,OAAO;AAAA,UACnD;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAEF,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,UAAU;AAChB,cAAQ;AACR,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,WAAW;AACjB,mBAAa,KAAK,YAAY;AAC5B,cAAM,OAAO,OAAO;AAAA,MACtB,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,SAAS,YAAY;AAC7B,mBAAa,KAAK,MAAM;AACtB,gBAAQ,YAAY,SAAS,EAAE,GAAG,uBAAuB,GAAG,SAAS;AAAA,MACvE,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,MAAM,YAAY;AAEhB,iBAAW,WAAW,aAAa,OAAO,CAAC,GAAG;AAC5C,cAAM,QAAA;AAAA,MACR;AACA,uBAAiB,KAAK;AACtB,uBAAiB,KAAK,OAAA;AACtB,oBAAc,OAAO,CAAC,EAAE,QAAQ,CAAC,aAAa,UAAU;AACxD,aAAO,SAAS,EAAE,QAAQ,CAAA,GAAI,cAAA,GAAiB,EAAE,OAAO;AAAA,IAC1D;AAAA,EAAA;AAGF,SAAO;AACT;AAqCO,SAAS,YACd,cACA,UAA8B,IACiB;AAC/C,SAAO,eAAe,SAAS,cAAc,OAAO,IAAI,iBAAA;AAC1D;AAaA,eAAsB,MACpB,WACA,OACA,YAAY,KACG;AACf,QAAM,WAAW,KAAK,IAAA,IAAQ;AAC9B,SAAO,CAAC,aAAa;AACnB,QAAI,KAAK,IAAA,IAAQ,UAAU;AACzB,YAAM,IAAI,MAAM,yBAAyB,KAAK,EAAE;AAAA,IAClD;AACA,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,CAAC,CAAC;AAAA,EACvD;AACF;"}
1
+ {"version":3,"file":"testing.js","sources":["../../../packages/kos-ui-sdk/src/testing/index.ts"],"sourcesContent":["/**\n * Test support for KOS models: boots the framework in a unit test without a\n * device, WebSocket server or browser.\n *\n * KOS models need a live KosCore, and KosCore opens a WebSocket as soon as it\n * is created. `bootKosCore` boots it on KosMock's standalone loopback\n * transport instead, which authorizes itself so `whenReady()` resolves without\n * a device or the `KOS_ALLOW_ANONYMOUS` build flag.\n *\n * `bootKosCore()` returns the same registration chain an app's\n * `KosModelRegistry` gives (`.model()`, `.preload()`, `.companion()`,\n * `.legacy()`), so a test passes the model's registration bean directly.\n * `boot()` also registers the SDK's core models, so a model with a\n * `@kosConfigProperty` or a dependency on a core model builds with only the\n * model under test on the chain.\n *\n * Backend traffic is mocked as an app would mock it (`KosMock.get`,\n * `KosMock.post`, fixtures, config injection), so a test exercises the real\n * request path. `.setup()` and `.fixture()` install the project's setup modules\n * and recorded fixtures before boot.\n *\n * ```ts\n * import { bootKosCore } from \"@kosdev-code/kos-ui-sdk/testing\";\n * import { KosMock, whenReady } from \"@kosdev-code/kos-ui-sdk\";\n * import { Board } from \"./models/board\";\n *\n * beforeAll(async () => {\n * KosMock.get(\"/api/board/:id\", { data: { id: \"b1\", state: \"READY\" } });\n * await bootKosCore().model(Board).boot();\n * });\n *\n * it(\"loads the board\", async () => {\n * const board = Board.instance(\"b1\").options({}).build();\n * await whenReady(board);\n * expect(board.state).toBe(\"READY\");\n * });\n * ```\n *\n * Singleton models take one configuration per test file: a second\n * `options(...)` call returns the first instance and silently discards the new\n * options. Put a case that needs different options in its own file.\n *\n * The standalone socket authorizes by publishing Studio's\n * `/studioServer/auth/LOGGED_IN` on every open, which a device never sends, so\n * disconnect and reconnect tests here follow Studio's sequence rather than a\n * device's.\n */\nimport type {\n BaseKosModelRegistrationBean,\n IKosCoreManager,\n IKosModelRegistration,\n IKosRegistry,\n KosCompanionModelType,\n KosMockFixture,\n KosMockPlaybackOptions,\n KosMockSetupModule,\n KosModelRegistrationType,\n Preloaded,\n} from \"../core\";\nimport { KosCore, KosMock, RegistrationManager } from \"../core\";\nimport { KosModelRegistry } from \"../models/utils/core-registration-manager\";\n\nlet booted: Promise<IKosCoreManager> | undefined;\nlet prepared = false;\n\nexport interface BootKosCoreOptions {\n /** Connection alias, when the model under test cares about one. */\n alias?: string;\n}\n\n/**\n * A model's registration bean: the value `@kosModel` generates beside the\n * model, which an application passes to `KosModelRegistry...model()`.\n *\n * Pass the bean itself rather than its `registration` property; the property\n * registers nothing, and the model then fails on its first build.\n */\nexport type KosTestRegistration =\n | BaseKosModelRegistrationBean<any, any>\n | KosModelRegistrationType<any, any>;\n\n/**\n * The registration chain an application uses, terminated by `boot()`.\n *\n * Every call is deferred until `boot()`, so ordering within the chain does not\n * matter and `alias()` may come after the models it applies to. `boot()`\n * registers the SDK's core models before the chain's own registrations, the\n * same set `KosModelRegistry.core.models()` registers in an app.\n */\nexport interface KosCoreBootBuilder {\n /** Register a model under test, optionally preloading it. */\n model: (\n registration: KosTestRegistration,\n preload?: boolean\n ) => KosCoreBootBuilder;\n /** Preload a model type, or a specific instance of one, at boot. */\n preload: (model: Preloaded) => KosCoreBootBuilder;\n /** Attach a companion model type to a parent type. */\n companion: (\n parentType: string,\n companion: KosCompanionModelType<any>\n ) => KosCoreBootBuilder;\n /** Register a hand-written registration record against a type. */\n legacy: (\n type: string,\n registration: IKosModelRegistration\n ) => KosCoreBootBuilder;\n /** Connection alias, when the model under test cares about one. */\n alias: (alias: string) => KosCoreBootBuilder;\n /**\n * Install a KosMock setup module before boot: the default export the\n * fixture server serves from `fixtures/setups/*.mjs`, imported directly. It\n * runs before the transport exists, so it can register routes, transformers,\n * config injections and observers; pushes belong after boot.\n */\n setup: (module: KosMockSetupModule) => KosCoreBootBuilder;\n /**\n * Load a recorded fixture before boot: the JSON the fixture server serves,\n * imported directly. Test defaults are `ignoreLatency: true` (full speed) and\n * `pushes: \"manual\"` (the capture's topic and future timeline stays inert, and\n * the test pushes what it asserts on). Pass options to override either.\n */\n fixture: (\n fixture: KosMockFixture,\n options?: KosMockPlaybackOptions\n ) => KosCoreBootBuilder;\n /** Boot KosCore with the core models and everything on this chain. */\n boot: () => Promise<IKosCoreManager>;\n}\n\n/**\n * Put the mock transport and the connection alias in place before anything\n * constructs KosCore.\n *\n * KosCore picks its transport and reads its alias in the constructor, and\n * registering a model calls `KosCore.getInstance()`, so registration cannot\n * come first.\n */\nfunction prepareTransport(alias?: string): void {\n if (prepared) {\n return;\n }\n prepared = true;\n KosMock.configure({ standalone: true });\n KosCore.getInstance({ connectionAlias: alias });\n}\n\nfunction bootCore(\n registration: IKosRegistry,\n options: BootKosCoreOptions\n): Promise<IKosCoreManager> {\n if (!booted) {\n prepareTransport(options.alias);\n const core = KosCore.create(registration, false, options.alias);\n booted = core.whenReady().then(() => core);\n }\n return booted;\n}\n\nconst FIXTURE_TEST_DEFAULTS: KosMockPlaybackOptions = {\n ignoreLatency: true,\n pushes: \"manual\",\n};\n\nfunction buildBootBuilder(): KosCoreBootBuilder {\n const registrations: (() => void)[] = [];\n const mockInstalls: (() => Promise<void> | void)[] = [];\n const preloadModels: Preloaded[] = [];\n let alias: string | undefined;\n\n const builder: KosCoreBootBuilder = {\n model: (registration, preload) => {\n registrations.push(() =>\n RegistrationManager.model.register(builder)(registration, preload)\n );\n return builder;\n },\n preload: (model) => {\n preloadModels.push(model);\n return builder;\n },\n companion: (parentType, companion) => {\n registrations.push(() =>\n RegistrationManager.companion.register(builder)(parentType, companion)\n );\n return builder;\n },\n legacy: (type, registration) => {\n registrations.push(() =>\n RegistrationManager.model.registerLegacyModel(builder)(\n type,\n registration\n )\n );\n return builder;\n },\n alias: (value) => {\n alias = value;\n return builder;\n },\n setup: (module) => {\n mockInstalls.push(async () => {\n await module(KosMock);\n });\n return builder;\n },\n fixture: (fixture, options) => {\n mockInstalls.push(() => {\n KosMock.loadFixture(fixture, { ...FIXTURE_TEST_DEFAULTS, ...options });\n });\n return builder;\n },\n boot: async () => {\n // Mocks first, in call order, before the transport exists.\n for (const install of mockInstalls.splice(0)) {\n await install();\n }\n prepareTransport(alias);\n KosModelRegistry.core.models();\n registrations.splice(0).forEach((register) => register());\n return bootCore({ models: {}, preloadModels }, { alias });\n },\n };\n\n return builder;\n}\n\n/**\n * Open a registration chain, then `boot()` it.\n *\n * Idempotent per module instance: the first `boot()` boots and later calls\n * return the same core. KosCore and the model manager are process-global, so\n * a test file gets one core and one set of singletons.\n *\n * Register the routes the models need before calling `boot()` so nothing races\n * the boot requests, either with `KosMock.get(...)` above the chain or with\n * `.setup()` / `.fixture()` on it.\n *\n * @example\n * ```ts\n * await bootKosCore()\n * .setup(boardBaseline) // fixtures/setups/board-baseline.mjs\n * .fixture(pourOk) // fixtures/pour-ok.json\n * .model(Board)\n * .boot();\n * ```\n */\nexport function bootKosCore(): KosCoreBootBuilder;\n/**\n * Boot KosCore from an assembled registry.\n *\n * For callers that already hold an `IKosRegistry`; it boots exactly the\n * registry it is given. A test registering its own models should use the\n * no-argument chain, which takes registration beans directly and registers the\n * SDK's core models.\n *\n * @param registration Models under test, e.g. `{ models: {...}, preloadModels: [] }`.\n */\nexport function bootKosCore(\n registration: IKosRegistry,\n options?: BootKosCoreOptions\n): Promise<IKosCoreManager>;\nexport function bootKosCore(\n registration?: IKosRegistry,\n options: BootKosCoreOptions = {}\n): KosCoreBootBuilder | Promise<IKosCoreManager> {\n return registration ? bootCore(registration, options) : buildBootBuilder();\n}\n\n/**\n * Resolves once `predicate` holds, or rejects with a message naming `label`\n * after the timeout.\n *\n * Model reactions are asynchronous, so a test that changes an input and asserts\n * at once reads the old value. Polling for the outcome is faster than sleeping\n * for a fixed interval and fails with a clear message when the reaction never\n * fires.\n *\n * @param label What is being waited for, quoted back in the timeout message.\n */\nexport async function until(\n predicate: () => boolean,\n label: string,\n timeoutMs = 2000\n): Promise<void> {\n const deadline = Date.now() + timeoutMs;\n while (!predicate()) {\n if (Date.now() > deadline) {\n throw new Error(`timed out waiting for ${label}`);\n }\n await new Promise((resolve) => setTimeout(resolve, 5));\n }\n}\n"],"names":[],"mappings":";;AA8DA,IAAI;AACJ,IAAI,WAAW;AA2Ef,SAAS,iBAAiB,OAAsB;AAC9C,MAAI,UAAU;AACZ;AAAA,EACF;AACA,aAAW;AACX,UAAQ,UAAU,EAAE,YAAY,KAAA,CAAM;AACtC,UAAQ,YAAY,EAAE,iBAAiB,MAAA,CAAO;AAChD;AAEA,SAAS,SACP,cACA,SAC0B;AAC1B,MAAI,CAAC,QAAQ;AACX,qBAAiB,QAAQ,KAAK;AAC9B,UAAM,OAAO,QAAQ,OAAO,cAAc,OAAO,QAAQ,KAAK;AAC9D,aAAS,KAAK,UAAA,EAAY,KAAK,MAAM,IAAI;AAAA,EAC3C;AACA,SAAO;AACT;AAEA,MAAM,wBAAgD;AAAA,EACpD,eAAe;AAAA,EACf,QAAQ;AACV;AAEA,SAAS,mBAAuC;AAC9C,QAAM,gBAAgC,CAAA;AACtC,QAAM,eAA+C,CAAA;AACrD,QAAM,gBAA6B,CAAA;AACnC,MAAI;AAEJ,QAAM,UAA8B;AAAA,IAClC,OAAO,CAAC,cAAc,YAAY;AAChC,oBAAc;AAAA,QAAK,MACjB,oBAAoB,MAAM,SAAS,OAAO,EAAE,cAAc,OAAO;AAAA,MAAA;AAEnE,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,UAAU;AAClB,oBAAc,KAAK,KAAK;AACxB,aAAO;AAAA,IACT;AAAA,IACA,WAAW,CAAC,YAAY,cAAc;AACpC,oBAAc;AAAA,QAAK,MACjB,oBAAoB,UAAU,SAAS,OAAO,EAAE,YAAY,SAAS;AAAA,MAAA;AAEvE,aAAO;AAAA,IACT;AAAA,IACA,QAAQ,CAAC,MAAM,iBAAiB;AAC9B,oBAAc;AAAA,QAAK,MACjB,oBAAoB,MAAM,oBAAoB,OAAO;AAAA,UACnD;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAEF,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,UAAU;AAChB,cAAQ;AACR,aAAO;AAAA,IACT;AAAA,IACA,OAAO,CAAC,WAAW;AACjB,mBAAa,KAAK,YAAY;AAC5B,cAAM,OAAO,OAAO;AAAA,MACtB,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS,CAAC,SAAS,YAAY;AAC7B,mBAAa,KAAK,MAAM;AACtB,gBAAQ,YAAY,SAAS,EAAE,GAAG,uBAAuB,GAAG,SAAS;AAAA,MACvE,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,MAAM,YAAY;AAEhB,iBAAW,WAAW,aAAa,OAAO,CAAC,GAAG;AAC5C,cAAM,QAAA;AAAA,MACR;AACA,uBAAiB,KAAK;AACtB,uBAAiB,KAAK,OAAA;AACtB,oBAAc,OAAO,CAAC,EAAE,QAAQ,CAAC,aAAa,UAAU;AACxD,aAAO,SAAS,EAAE,QAAQ,CAAA,GAAI,cAAA,GAAiB,EAAE,OAAO;AAAA,IAC1D;AAAA,EAAA;AAGF,SAAO;AACT;AAqCO,SAAS,YACd,cACA,UAA8B,IACiB;AAC/C,SAAO,eAAe,SAAS,cAAc,OAAO,IAAI,iBAAA;AAC1D;AAaA,eAAsB,MACpB,WACA,OACA,YAAY,KACG;AACf,QAAM,WAAW,KAAK,IAAA,IAAQ;AAC9B,SAAO,CAAC,aAAa;AACnB,QAAI,KAAK,IAAA,IAAQ,UAAU;AACzB,YAAM,IAAI,MAAM,yBAAyB,KAAK,EAAE;AAAA,IAClD;AACA,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,CAAC,CAAC;AAAA,EACvD;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"kos-model-hierarchy-context.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/ui/components/kos-model-loader/contexts/kos-model-hierarchy-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,aAAa,EAAU,MAAM,kBAAkB,CAAC;AAE1E,UAAU,0BAA0B;IAClC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C;AAUD,eAAO,MAAM,kBAAkB,qDACgC,CAAC;AAEhE,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,iBAAiB,CAC9D,iBAAiB,CAiBlB,CAAC;AAEF,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;CAC5C;AAGD,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,KAC1B,aAAa,EAcf,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,aAAa,GAAG,aAAa,EAC3E,MAAM,MAAM,KACX,CAAC,GAAG,SAQN,CAAC"}
1
+ {"version":3,"file":"kos-model-hierarchy-context.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/ui/components/kos-model-loader/contexts/kos-model-hierarchy-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,aAAa,EAGd,MAAM,kBAAkB,CAAC;AAE1B,UAAU,0BAA0B;IAClC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C;AAaD,eAAO,MAAM,kBAAkB,qDACgC,CAAC;AAEhE,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,iBAAiB,CAC9D,iBAAiB,CAiBlB,CAAC;AAEF,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;CAC5C;AAGD,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,KAC1B,aAAa,EAcf,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,aAAa,GAAG,aAAa,EAC3E,MAAM,MAAM,KACX,CAAC,GAAG,SAQN,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"kos-model-loader.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/components/kos-model-loader/kos-model-loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAQtE,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B;AAID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAClD,iBAAiB,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,CAW5D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBAAiB,CACzD,iBAAiB,CAAC,mBAAmB,CAAC,CAwBvC,CAAC"}
1
+ {"version":3,"file":"kos-model-loader.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/components/kos-model-loader/kos-model-loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAoB,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAWtE,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B;AAID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAClD,iBAAiB,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,CAW5D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBAAiB,CACzD,iBAAiB,CAAC,mBAAmB,CAAC,CAwBvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"kos-model-context.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/contexts/kos-model-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAU,MAAM,YAAY,CAAC;AAUnD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,oDAe9D;AAED,iBAAS,QAAQ,kBAOhB;AAED,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"kos-model-context.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/contexts/kos-model-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAoB,MAAM,YAAY,CAAC;AAa7D,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,oDAe9D;AAED,iBAAS,QAAQ,kBAOhB;AAED,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Localization, TranslationContainerModel } from '../../../models';
1
+ import { Localization, TranslationContainerModel, TranslationContainerOptions } from '../../../models';
2
2
  import { PropsWithChildren } from 'react';
3
3
  interface TranslationContainerType {
4
4
  setLocale: (locale: string) => void;
@@ -15,6 +15,13 @@ interface TranslationContainerProviderProps {
15
15
  descriptorResolver?: () => Promise<Localization>;
16
16
  excludeNamespaces?: string[];
17
17
  resolver?: (this: TranslationContainerModel, namespace: string, locale: string) => string;
18
+ /**
19
+ * Serves translation data instead of fetching files; resolve `{ fallback: true }`
20
+ * for a namespace to load its file as usual.
21
+ *
22
+ * @kosApiLevel 26
23
+ */
24
+ bundleResolver?: TranslationContainerOptions["bundleResolver"];
18
25
  }
19
26
  export declare const KosTranslationProvider: React.FunctionComponent<PropsWithChildren<TranslationContainerProviderProps>>;
20
27
  export declare const useKosTranslationContext: () => TranslationContainerType;
@@ -1 +1 @@
1
- {"version":3,"file":"kos-translations-provider.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/contexts/translation-container/kos-translations-provider.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EACZ,yBAAyB,EAI1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAEf,UAAU,wBAAwB;IAChC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AACD,eAAO,MAAM,2BAA2B,+DAE5B,CAAC;AAEb,UAAU,iCAAiC;IACzC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,CACT,IAAI,EAAE,yBAAyB,EAC/B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,KACX,MAAM,CAAC;CACb;AAUD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAC1D,iBAAiB,CAAC,iCAAiC,CAAC,CAyFrD,CAAC;AACF,eAAO,MAAM,wBAAwB,gCAQpC,CAAC"}
1
+ {"version":3,"file":"kos-translations-provider.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/contexts/translation-container/kos-translations-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAI5B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAMf,UAAU,wBAAwB;IAChC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AACD,eAAO,MAAM,2BAA2B,+DAE5B,CAAC;AAEb,UAAU,iCAAiC;IACzC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,CACT,IAAI,EAAE,yBAAyB,EAC/B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,KACX,MAAM,CAAC;IACZ;;;;;OAKG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC,gBAAgB,CAAC,CAAC;CAChE;AAUD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAC1D,iBAAiB,CAAC,iCAAiC,CAAC,CA2FrD,CAAC;AACF,eAAO,MAAM,wBAAwB,gCAQpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-streamer.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/kos-ui-sdk/src/ui/features/canvas/components/canvas-streamer/canvas-streamer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAS5F,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,qBAAqB,CAAC;CACzC;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAqFzE,CAAC;AAEJ,eAAO,MAAM,cAAc,4GAA2C,CAAC"}
1
+ {"version":3,"file":"canvas-streamer.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/kos-ui-sdk/src/ui/features/canvas/components/canvas-streamer/canvas-streamer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAY5F,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,qBAAqB,CAAC;CACzC;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAqFzE,CAAC;AAEJ,eAAO,MAAM,cAAc,4GAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAuCzB,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAOxC;AAwBD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,KAC5C,CAAC,GAAG,MAAM,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,MAAM,GAAG,MAAM,EAAE,EAC5B,cAAc,wBAAwB;;;sBAiBpB,MAAM;;CAgCzB,CAAC"}
1
+ {"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AA2CzB,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAOxC;AAwBD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,KAC5C,CAAC,GAAG,MAAM,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,MAAM,GAAG,MAAM,EAAE,EAC5B,cAAc,wBAAwB;;;sBAiBpB,MAAM;;CAgCzB,CAAC"}
@@ -11,6 +11,7 @@ interface Options<T extends IKosDataModel, O extends Object = {}> {
11
11
  /**
12
12
  * Reads a model out of the suspense cache, suspending or rethrowing as the
13
13
  * entry requires. Exported for tests.
14
+ * @internal
14
15
  */
15
16
  export declare function readModelHookEntry(key: string, fetcher: () => Promise<unknown>): {
16
17
  kosModel: import('../../core').IKosModel<IKosDataModel> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAGb,YAAY,EACb,MAAM,YAAY,CAAC;AASpB,UAAU,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;;;EA+BhC;AAqDD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,EACxE,cAAc,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;CAsG5B,CAAC"}
1
+ {"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAGb,YAAY,EACb,MAAM,YAAY,CAAC;AASpB,UAAU,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAUD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;;;EA+BhC;AAqDD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,EACxE,cAAc,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;CAsG5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-mutation-observer.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-mutation-observer.tsx"],"names":[],"mappings":"AAGA,UAAU,uBAAuB;IAC/B,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAOD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,IAAI,EAChD,QAAQ,EAAE,CAAC,EACX,EAAE,EAAE,gBAAgB,EACpB,OAAO,GAAE,uBAAyC,QAkCnD"}
1
+ {"version":3,"file":"use-mutation-observer.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-mutation-observer.tsx"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAC/B,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAOD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,IAAI,EAChD,QAAQ,EAAE,CAAC,EACX,EAAE,EAAE,gBAAgB,EACpB,OAAO,GAAE,uBAAyC,QAkCnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"reload-on-disconnect-policy.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/policies/reload-on-disconnect-policy.tsx"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAQD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC7C,6BAA6B,CAqE9B,CAAC"}
1
+ {"version":3,"file":"reload-on-disconnect-policy.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/policies/reload-on-disconnect-policy.tsx"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAQD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC7C,6BAA6B,CAqE9B,CAAC"}
@@ -1,14 +0,0 @@
1
- import { IKosDataModel } from '../kosModel';
2
- interface DecoratedKosModel<T extends IKosDataModel = IKosDataModel> {
3
- new (...args: any[]): T;
4
- }
5
- interface LogConfigProps {
6
- group?: string;
7
- }
8
- /**
9
- * @kosService core.logging
10
- * @kosApiLevel 2
11
- */
12
- export declare const kosLogger: <T extends IKosDataModel>({ group }?: LogConfigProps) => (constructor: DecoratedKosModel<T>) => any;
13
- export {};
14
- //# sourceMappingURL=kos-log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kos-log.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,UAAU,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IACjE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB;AAED,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD;;;GAGG;AACH,eAAO,MAAM,SAAS,GACnB,CAAC,SAAS,aAAa,EAAE,YAAW,cAA8B,MAClE,aAAa,iBAAiB,CAAC,CAAC,CAAC,KAAG,GAGpC,CAAC"}