@miso.ai/client-sdk-ui 1.11.5-beta.8 → 1.11.5-beta.9

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.
@@ -198,8 +198,7 @@ class GalleryLayout extends _collection.default {
198
198
  _syncCssVariables() {
199
199
  const context = this._galleryContext;
200
200
  let {
201
- itemAspectRatio = 1,
202
- height = DEFAULT_HEIGHT
201
+ itemAspectRatio = 1
203
202
  } = this.options;
204
203
  itemAspectRatio = context.itemAspectRatio = (0, _dom.cssAspectRatio)(itemAspectRatio);
205
204
  const {
@@ -209,7 +208,6 @@ class GalleryLayout extends _collection.default {
209
208
  return;
210
209
  }
211
210
  // TODO: skip if equal to default values
212
- element.style.setProperty('--miso-gallery-height', `${height}`);
213
211
  element.style.setProperty('--miso-gallery-item-1x1-aspect-ratio', `${itemAspectRatio}`);
214
212
  element.style.setProperty('--miso-gallery-item-1x2-aspect-ratio', `${itemAspectRatio.scaleBy([1, 2])}`);
215
213
  }
@@ -234,7 +232,7 @@ class GalleryLayout extends _collection.default {
234
232
 
235
233
  // update DOM
236
234
  listElement.style.aspectRatio = `${columnCount} / 2`;
237
- listElement.style.height = 'auto';
235
+ listElement.style.height = itemCount > 0 ? 'auto' : '0';
238
236
  }
239
237
  _syncItemCount() {
240
238
  let {
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = '1.11.5-beta.8';
7
+ var _default = exports.default = '1.11.5-beta.9';
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/MisoAI/miso-client-js-sdk/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@miso.ai/commons": "1.11.5-beta.8"
29
+ "@miso.ai/commons": "1.11.5-beta.9"
30
30
  },
31
- "version": "1.11.5-beta.8"
31
+ "version": "1.11.5-beta.9"
32
32
  }
@@ -170,14 +170,13 @@ export default class GalleryLayout extends CollectionLayout {
170
170
 
171
171
  _syncCssVariables() {
172
172
  const context = this._galleryContext;
173
- let { itemAspectRatio = 1, height = DEFAULT_HEIGHT } = this.options;
173
+ let { itemAspectRatio = 1 } = this.options;
174
174
  itemAspectRatio = context.itemAspectRatio = cssAspectRatio(itemAspectRatio);
175
175
  const { element } = this._view;
176
176
  if (!element) {
177
177
  return;
178
178
  }
179
179
  // TODO: skip if equal to default values
180
- element.style.setProperty('--miso-gallery-height', `${height}`);
181
180
  element.style.setProperty('--miso-gallery-item-1x1-aspect-ratio', `${itemAspectRatio}`);
182
181
  element.style.setProperty('--miso-gallery-item-1x2-aspect-ratio', `${itemAspectRatio.scaleBy([1, 2])}`);
183
182
  }
@@ -198,7 +197,7 @@ export default class GalleryLayout extends CollectionLayout {
198
197
 
199
198
  // update DOM
200
199
  listElement.style.aspectRatio = `${columnCount} / 2`;
201
- listElement.style.height = 'auto';
200
+ listElement.style.height = itemCount > 0 ? 'auto' : '0';
202
201
  }
203
202
 
204
203
  _syncItemCount({ state } = {}) {
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.11.5-beta.8';
1
+ export default '1.11.5-beta.9';