@kubex/zinc 1.1.55 → 1.1.57

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.55",
3
+ "version": "1.1.57",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -277,6 +277,14 @@ table {
277
277
  zn-select[name="rowPerPage"] {
278
278
  max-width: 75px;
279
279
  }
280
+
281
+ zn-select[name="rowPerPage"]::part(combobox) {
282
+ padding-inline-end: 8px;
283
+ }
284
+
285
+ zn-select[name="rowPerPage"]::part(expand-icon) {
286
+ margin-inline-start: 0;
287
+ }
280
288
  }
281
289
 
282
290
  &__pagination-buttons {
@@ -18,10 +18,12 @@ let lucidePromise: Promise<void> | undefined;
18
18
  function loadLucideIcons(): Promise<void> {
19
19
  lucidePromise ??= import('lucide').then(m => {
20
20
  lucideIcons = m.icons as Record<string, IconNode>;
21
- }).catch(() => {
22
- // Failed chunk load: fall back to an empty set so icons render their
23
- // "not found" state instead of rejecting updateComplete on every render
24
- lucideIcons = {};
21
+ }).catch((error: unknown) => {
22
+ // Failed chunk load (e.g. transient 404 mid-rebuild/deploy): clear the
23
+ // memoised promise so a later render retries instead of blanking every
24
+ // icon for the rest of the page session
25
+ lucidePromise = undefined;
26
+ console.warn('<zn-icon> failed to load the lucide icon chunk', error);
25
27
  });
26
28
  return lucidePromise;
27
29
  }
@@ -184,8 +186,10 @@ export default class ZnIcon extends ZincElement {
184
186
  const result = await super.getUpdateComplete();
185
187
  if (this.library === 'lucide' && !lucideIcons) {
186
188
  await loadLucideIcons();
187
- this.requestUpdate();
188
- await super.getUpdateComplete();
189
+ if (lucideIcons) {
190
+ this.requestUpdate();
191
+ await super.getUpdateComplete();
192
+ }
189
193
  }
190
194
  return result;
191
195
  }
@@ -353,7 +357,13 @@ export default class ZnIcon extends ZincElement {
353
357
 
354
358
  private renderLucideIcon() {
355
359
  if (!lucideIcons) {
356
- void loadLucideIcons().then(() => this.requestUpdate());
360
+ // Only re-render on success; a failed load retries on the next natural
361
+ // render rather than looping requestUpdate -> load -> fail
362
+ void loadLucideIcons().then(() => {
363
+ if (lucideIcons) {
364
+ this.requestUpdate();
365
+ }
366
+ });
357
367
  return html``;
358
368
  }
359
369