@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.
@@ -5914,7 +5914,7 @@ class API {
5914
5914
  return {
5915
5915
  clientName: "@seamly/web-ui",
5916
5916
  clientVariant: this.#layoutMode,
5917
- clientVersion: "23.0.6-alpha.2",
5917
+ clientVersion: "23.0.6",
5918
5918
  currentUrl: window.location.toString(),
5919
5919
  screenResolution: `${window.screen.width}x${window.screen.height}`,
5920
5920
  timezone: getTimeZone(),
@@ -23243,7 +23243,7 @@ class ExternalApi {
23243
23243
  constructor(appConfig) {
23244
23244
  this._waitingActions = [];
23245
23245
  this._instances = {};
23246
- this.timeoutId = undefined;
23246
+ this.timeouts = {};
23247
23247
  this.appConfig = appConfig;
23248
23248
  this.context = {};
23249
23249
  }
@@ -23353,10 +23353,7 @@ class ExternalApi {
23353
23353
  this._instances[config.namespace] = instance;
23354
23354
  // Clear the context after creating the instance, so we do not reuse it for the next
23355
23355
  this.context = {};
23356
- window.clearTimeout(this.timeoutId);
23357
- this.timeoutId = window.setTimeout(() => {
23358
- instance.render();
23359
- }, 60);
23356
+ this.debouncedRender(instance, config.namespace);
23360
23357
  }
23361
23358
  }
23362
23359
  handleDestroy(actionObj) {
@@ -23383,6 +23380,17 @@ class ExternalApi {
23383
23380
  createInstance(config) {
23384
23381
  return new Engine(config, this);
23385
23382
  }
23383
+
23384
+ /**
23385
+ * @param {Engine} instance
23386
+ * @param {string} namespace
23387
+ */
23388
+ debouncedRender(instance, namespace) {
23389
+ window.clearTimeout(this.timeouts[namespace]);
23390
+ this.timeouts[namespace] = window.setTimeout(() => {
23391
+ instance.render();
23392
+ }, 100);
23393
+ }
23386
23394
  destroy(instance) {
23387
23395
  if (!instance) {
23388
23396
  Object.entries(this._instances).forEach(([namespace, _instance]) => {