@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.
@@ -16414,7 +16414,7 @@ class API {
16414
16414
  return {
16415
16415
  clientName: "@seamly/web-ui",
16416
16416
  clientVariant: this.#layoutMode,
16417
- clientVersion: "23.0.6-alpha.2",
16417
+ clientVersion: "23.0.6",
16418
16418
  currentUrl: window.location.toString(),
16419
16419
  screenResolution: `${window.screen.width}x${window.screen.height}`,
16420
16420
  timezone: getTimeZone(),
@@ -24266,7 +24266,7 @@ class ExternalApi {
24266
24266
  constructor(appConfig) {
24267
24267
  this._waitingActions = [];
24268
24268
  this._instances = {};
24269
- this.timeoutId = undefined;
24269
+ this.timeouts = {};
24270
24270
  this.appConfig = appConfig;
24271
24271
  this.context = {};
24272
24272
  }
@@ -24376,10 +24376,7 @@ class ExternalApi {
24376
24376
  this._instances[config.namespace] = instance;
24377
24377
  // Clear the context after creating the instance, so we do not reuse it for the next
24378
24378
  this.context = {};
24379
- window.clearTimeout(this.timeoutId);
24380
- this.timeoutId = window.setTimeout(() => {
24381
- instance.render();
24382
- }, 60);
24379
+ this.debouncedRender(instance, config.namespace);
24383
24380
  }
24384
24381
  }
24385
24382
  handleDestroy(actionObj) {
@@ -24406,6 +24403,17 @@ class ExternalApi {
24406
24403
  createInstance(config) {
24407
24404
  return new Engine(config, this);
24408
24405
  }
24406
+
24407
+ /**
24408
+ * @param {Engine} instance
24409
+ * @param {string} namespace
24410
+ */
24411
+ debouncedRender(instance, namespace) {
24412
+ window.clearTimeout(this.timeouts[namespace]);
24413
+ this.timeouts[namespace] = window.setTimeout(() => {
24414
+ instance.render();
24415
+ }, 100);
24416
+ }
24409
24417
  destroy(instance) {
24410
24418
  if (!instance) {
24411
24419
  Object.entries(this._instances).forEach(([namespace, _instance]) => {