proto-ikons-wc 0.0.140 → 0.0.142

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8d6b7e45.js');
5
+ const index = require('./index-5d5ddef9.js');
6
6
 
7
7
  const acuraIkonCss = "";
8
8
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -431,17 +431,35 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
431
431
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
432
432
  {
433
433
  // remove attributes no longer present on the vnode by setting them to undefined
434
- for (memberName in oldVnodeAttrs) {
434
+ for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
435
435
  if (!(memberName in newVnodeAttrs)) {
436
436
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
437
437
  }
438
438
  }
439
439
  }
440
440
  // add new & update changed attributes
441
- for (memberName in newVnodeAttrs) {
441
+ for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
442
442
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
443
443
  }
444
444
  };
445
+ /**
446
+ * Sort a list of attribute names to ensure that all the attribute names which
447
+ * are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
448
+ * attributes.
449
+ *
450
+ * **Note**: if the supplied attributes do not include `'ref'` then the same
451
+ * (by reference) array will be returned without modification.
452
+ *
453
+ * @param attrNames attribute names to sort
454
+ * @returns a list of attribute names, sorted if they include `"ref"`
455
+ */
456
+ function sortedAttrNames(attrNames) {
457
+ return attrNames.includes('ref')
458
+ ? // we need to sort these to ensure that `'ref'` is the last attr
459
+ [...attrNames.filter((attr) => attr !== 'ref'), 'ref']
460
+ : // no need to sort, return the original array
461
+ attrNames;
462
+ }
445
463
  /**
446
464
  * Create a DOM Node corresponding to one of the children of a given VNode.
447
465
  *
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8d6b7e45.js');
5
+ const index = require('./index-5d5ddef9.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8d6b7e45.js');
5
+ const index = require('./index-5d5ddef9.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.13.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.14.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  const patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-ikons-wc.cjs.js', document.baseURI).href));
@@ -122,8 +122,8 @@
122
122
  ],
123
123
  "compiler": {
124
124
  "name": "@stencil/core",
125
- "version": "4.13.0",
126
- "typescriptVersion": "5.4.2"
125
+ "version": "4.14.1",
126
+ "typescriptVersion": "5.4.3"
127
127
  },
128
128
  "collections": [],
129
129
  "bundles": []
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-5d0bd19b.js';
1
+ import { r as registerInstance, h } from './index-38cd45ae.js';
2
2
 
3
3
  const acuraIkonCss = "";
4
4
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -409,17 +409,35 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
409
409
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
410
410
  {
411
411
  // remove attributes no longer present on the vnode by setting them to undefined
412
- for (memberName in oldVnodeAttrs) {
412
+ for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
413
413
  if (!(memberName in newVnodeAttrs)) {
414
414
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
415
415
  }
416
416
  }
417
417
  }
418
418
  // add new & update changed attributes
419
- for (memberName in newVnodeAttrs) {
419
+ for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
420
420
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
421
421
  }
422
422
  };
423
+ /**
424
+ * Sort a list of attribute names to ensure that all the attribute names which
425
+ * are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
426
+ * attributes.
427
+ *
428
+ * **Note**: if the supplied attributes do not include `'ref'` then the same
429
+ * (by reference) array will be returned without modification.
430
+ *
431
+ * @param attrNames attribute names to sort
432
+ * @returns a list of attribute names, sorted if they include `"ref"`
433
+ */
434
+ function sortedAttrNames(attrNames) {
435
+ return attrNames.includes('ref')
436
+ ? // we need to sort these to ensure that `'ref'` is the last attr
437
+ [...attrNames.filter((attr) => attr !== 'ref'), 'ref']
438
+ : // no need to sort, return the original array
439
+ attrNames;
440
+ }
423
441
  /**
424
442
  * Create a DOM Node corresponding to one of the children of a given VNode.
425
443
  *
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-5d0bd19b.js';
2
- export { s as setNonce } from './index-5d0bd19b.js';
1
+ import { b as bootstrapLazy } from './index-38cd45ae.js';
2
+ export { s as setNonce } from './index-38cd45ae.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-5d0bd19b.js';
2
- export { s as setNonce } from './index-5d0bd19b.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-38cd45ae.js';
2
+ export { s as setNonce } from './index-38cd45ae.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.13.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.14.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = import.meta.url;