@seamly/web-ui 23.0.6-alpha.2 → 23.0.6

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.
@@ -5865,7 +5865,7 @@ class API {
5865
5865
  return {
5866
5866
  clientName: "@seamly/web-ui",
5867
5867
  clientVariant: this.#layoutMode,
5868
- clientVersion: "23.0.6-alpha.2",
5868
+ clientVersion: "23.0.6",
5869
5869
  currentUrl: window.location.toString(),
5870
5870
  screenResolution: `${window.screen.width}x${window.screen.height}`,
5871
5871
  timezone: getTimeZone(),
@@ -23194,7 +23194,7 @@ class ExternalApi {
23194
23194
  constructor(appConfig) {
23195
23195
  this._waitingActions = [];
23196
23196
  this._instances = {};
23197
- this.timeoutId = undefined;
23197
+ this.timeouts = {};
23198
23198
  this.appConfig = appConfig;
23199
23199
  this.context = {};
23200
23200
  }
@@ -23304,10 +23304,7 @@ class ExternalApi {
23304
23304
  this._instances[config.namespace] = instance;
23305
23305
  // Clear the context after creating the instance, so we do not reuse it for the next
23306
23306
  this.context = {};
23307
- window.clearTimeout(this.timeoutId);
23308
- this.timeoutId = window.setTimeout(() => {
23309
- instance.render();
23310
- }, 60);
23307
+ this.debouncedRender(instance, config.namespace);
23311
23308
  }
23312
23309
  }
23313
23310
  handleDestroy(actionObj) {
@@ -23334,6 +23331,17 @@ class ExternalApi {
23334
23331
  createInstance(config) {
23335
23332
  return new Engine(config, this);
23336
23333
  }
23334
+
23335
+ /**
23336
+ * @param {Engine} instance
23337
+ * @param {string} namespace
23338
+ */
23339
+ debouncedRender(instance, namespace) {
23340
+ window.clearTimeout(this.timeouts[namespace]);
23341
+ this.timeouts[namespace] = window.setTimeout(() => {
23342
+ instance.render();
23343
+ }, 100);
23344
+ }
23337
23345
  destroy(instance) {
23338
23346
  if (!instance) {
23339
23347
  Object.entries(this._instances).forEach(([namespace, _instance]) => {