@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.
@@ -5581,7 +5581,7 @@ class API {
5581
5581
  return {
5582
5582
  clientName: "@seamly/web-ui",
5583
5583
  clientVariant: this.#layoutMode,
5584
- clientVersion: "23.0.6-alpha.2",
5584
+ clientVersion: "23.0.6",
5585
5585
  currentUrl: window.location.toString(),
5586
5586
  screenResolution: `${window.screen.width}x${window.screen.height}`,
5587
5587
  timezone: getTimeZone(),
@@ -22910,7 +22910,7 @@ class ExternalApi {
22910
22910
  constructor(appConfig) {
22911
22911
  this._waitingActions = [];
22912
22912
  this._instances = {};
22913
- this.timeoutId = undefined;
22913
+ this.timeouts = {};
22914
22914
  this.appConfig = appConfig;
22915
22915
  this.context = {};
22916
22916
  }
@@ -23020,10 +23020,7 @@ class ExternalApi {
23020
23020
  this._instances[config.namespace] = instance;
23021
23021
  // Clear the context after creating the instance, so we do not reuse it for the next
23022
23022
  this.context = {};
23023
- window.clearTimeout(this.timeoutId);
23024
- this.timeoutId = window.setTimeout(() => {
23025
- instance.render();
23026
- }, 60);
23023
+ this.debouncedRender(instance, config.namespace);
23027
23024
  }
23028
23025
  }
23029
23026
  handleDestroy(actionObj) {
@@ -23050,6 +23047,17 @@ class ExternalApi {
23050
23047
  createInstance(config) {
23051
23048
  return new Engine(config, this);
23052
23049
  }
23050
+
23051
+ /**
23052
+ * @param {Engine} instance
23053
+ * @param {string} namespace
23054
+ */
23055
+ debouncedRender(instance, namespace) {
23056
+ window.clearTimeout(this.timeouts[namespace]);
23057
+ this.timeouts[namespace] = window.setTimeout(() => {
23058
+ instance.render();
23059
+ }, 100);
23060
+ }
23053
23061
  destroy(instance) {
23054
23062
  if (!instance) {
23055
23063
  Object.entries(this._instances).forEach(([namespace, _instance]) => {