proto-ikons-wc 0.0.70 → 0.0.72

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.
Files changed (133) hide show
  1. package/dist/cjs/acura-ikon_119.cjs.entry.js +1 -1
  2. package/dist/cjs/{index-e6c07de8.js → index-f1aead39.js} +184 -44
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/proto-ikons-wc.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/acura-ikon/acura-ikon.js +68 -65
  7. package/dist/collection/components/alfa-romeo-alt-ikon/alfa-romeo-alt-ikon.js +85 -86
  8. package/dist/collection/components/alfa-romeo-ikon/alfa-romeo-ikon.js +68 -66
  9. package/dist/collection/components/alien-icon/alien-icon.js +85 -83
  10. package/dist/collection/components/am-general-ikon/am-general-ikon.js +68 -66
  11. package/dist/collection/components/asterisk-icon/asterisk-icon.js +85 -83
  12. package/dist/collection/components/aston-martin-alt-ikon/aston-martin-alt-ikon.js +85 -83
  13. package/dist/collection/components/aston-martin-ikon/aston-martin-ikon.js +68 -67
  14. package/dist/collection/components/audi-ikon/audi-ikon.js +68 -65
  15. package/dist/collection/components/barcode-icon/barcode-icon.js +85 -83
  16. package/dist/collection/components/barcode-scan-icon/barcode-scan-icon.js +85 -83
  17. package/dist/collection/components/bash-icon/bash-icon.js +85 -83
  18. package/dist/collection/components/beaker-icon/beaker-icon.js +85 -83
  19. package/dist/collection/components/bently-ikon/bently-ikon.js +68 -77
  20. package/dist/collection/components/bmw-ikon/bmw-ikon.js +68 -68
  21. package/dist/collection/components/bugatti-ikon/bugatti-ikon.js +68 -65
  22. package/dist/collection/components/buick-ikon/buick-ikon.js +68 -67
  23. package/dist/collection/components/cadillac-ikon/cadillac-ikon.js +68 -68
  24. package/dist/collection/components/chart-bar-icon/chart-bar-icon.js +85 -83
  25. package/dist/collection/components/chart-bubble-icon/chart-bubble-icon.js +85 -83
  26. package/dist/collection/components/chart-donut-icon/chart-donut-icon.js +85 -83
  27. package/dist/collection/components/chart-donuts-icon/chart-donuts-icon.js +85 -83
  28. package/dist/collection/components/check-icon/check-icon.js +102 -99
  29. package/dist/collection/components/chevrolet-ikon/chevrolet-ikon.js +68 -65
  30. package/dist/collection/components/chevron-double-left-icon/chevron-double-left-icon.js +85 -83
  31. package/dist/collection/components/chrysler-ikon/chrysler-ikon.js +68 -65
  32. package/dist/collection/components/circular-saw-icon/circular-saw-icon.js +85 -83
  33. package/dist/collection/components/citroen-ikon/citroen-ikon.js +68 -65
  34. package/dist/collection/components/close-icon/close-icon.js +85 -83
  35. package/dist/collection/components/daewoo-ikon/daewoo-ikon.js +68 -69
  36. package/dist/collection/components/dodge-ikon/dodge-ikon.js +68 -65
  37. package/dist/collection/components/eagle-ikon/eagle-ikon.js +68 -67
  38. package/dist/collection/components/ferrari-ikon/ferrari-ikon.js +68 -66
  39. package/dist/collection/components/fiat-alt-ikon/fiat-alt-ikon.js +85 -85
  40. package/dist/collection/components/fiat-ikon/fiat-ikon.js +68 -67
  41. package/dist/collection/components/fingerprint-icon/fingerprint-icon.js +85 -83
  42. package/dist/collection/components/fire-icon/fire-icon.js +85 -83
  43. package/dist/collection/components/fisker-ikon/fisker-ikon.js +68 -65
  44. package/dist/collection/components/flask-icon/flask-icon.js +85 -83
  45. package/dist/collection/components/ford-ikon/ford-ikon.js +68 -65
  46. package/dist/collection/components/genesis-ikon/genesis-ikon.js +68 -65
  47. package/dist/collection/components/geo-ikon/geo-ikon.js +68 -66
  48. package/dist/collection/components/git-icon/git-icon.js +85 -83
  49. package/dist/collection/components/gmc-ikon/gmc-ikon.js +68 -65
  50. package/dist/collection/components/honda-ikon/honda-ikon.js +68 -66
  51. package/dist/collection/components/hummer-ikon/hummer-ikon.js +68 -65
  52. package/dist/collection/components/hyundai-ikon/hyundai-ikon.js +68 -68
  53. package/dist/collection/components/infiniti-ikon/infiniti-ikon.js +68 -65
  54. package/dist/collection/components/isuzu-ikon/isuzu-ikon.js +68 -66
  55. package/dist/collection/components/jaguar-alt-ikon/jaguar-alt-ikon.js +85 -82
  56. package/dist/collection/components/jaguar-ikon/jaguar-ikon.js +68 -65
  57. package/dist/collection/components/java-script-icon/java-script-icon.js +85 -83
  58. package/dist/collection/components/jeep-alt-ikon/jeep-alt-ikon.js +85 -82
  59. package/dist/collection/components/jeep-ikon/jeep-ikon.js +68 -66
  60. package/dist/collection/components/kia-ikon/kia-ikon.js +68 -65
  61. package/dist/collection/components/lamborghini-alt-ikon/lamborghini-alt-ikon.js +85 -83
  62. package/dist/collection/components/lamborghini-ikon/lamborghini-ikon.js +68 -65
  63. package/dist/collection/components/land-rover-ikon/land-rover-ikon.js +68 -67
  64. package/dist/collection/components/lexus-ikon/lexus-ikon.js +68 -65
  65. package/dist/collection/components/lincoln-ikon/lincoln-ikon.js +68 -65
  66. package/dist/collection/components/lotus-alt-ikon/lotus-alt-ikon.js +85 -85
  67. package/dist/collection/components/lotus-ikon/lotus-ikon.js +68 -67
  68. package/dist/collection/components/maserati-ikon/maserati-ikon.js +68 -65
  69. package/dist/collection/components/maybach-ikon/maybach-ikon.js +68 -66
  70. package/dist/collection/components/mazda-alt-ikon/mazda-alt-ikon.js +85 -84
  71. package/dist/collection/components/mazda-ikon/mazda-ikon.js +68 -65
  72. package/dist/collection/components/mclaren-alt-ikon/mclaren-alt-ikon.js +85 -83
  73. package/dist/collection/components/mclaren-ikon/mclaren-ikon.js +68 -65
  74. package/dist/collection/components/mercedes-benz-alt-ikon/mercedes-benz-alt-ikon.js +85 -83
  75. package/dist/collection/components/mercedes-benz-ikon/mercedes-benz-ikon.js +68 -65
  76. package/dist/collection/components/mercury-ikon/mercury-ikon.js +68 -68
  77. package/dist/collection/components/mini-alt-ikon/mini-alt-ikon.js +85 -83
  78. package/dist/collection/components/mini-ikon/mini-ikon.js +68 -66
  79. package/dist/collection/components/mitsubishi-ikon/mitsubishi-ikon.js +68 -65
  80. package/dist/collection/components/nissan-ikon/nissan-ikon.js +68 -66
  81. package/dist/collection/components/oldsmobile-ikon/oldsmobile-ikon.js +68 -66
  82. package/dist/collection/components/one-password-icon/one-password-icon.js +85 -83
  83. package/dist/collection/components/opel-ikon/opel-ikon.js +68 -65
  84. package/dist/collection/components/panoz-ikon/panoz-ikon.js +68 -66
  85. package/dist/collection/components/paw-icon/paw-icon.js +85 -83
  86. package/dist/collection/components/peugeot-alt-ikon/peugeot-alt-ikon.js +85 -82
  87. package/dist/collection/components/peugeot-ikon/peugeot-ikon.js +68 -65
  88. package/dist/collection/components/plymouth-ikon/plymouth-ikon.js +68 -67
  89. package/dist/collection/components/pontiac-ikon/pontiac-ikon.js +68 -66
  90. package/dist/collection/components/porsche-ikon/porsche-ikon.js +68 -69
  91. package/dist/collection/components/protocol-icon/protocol-icon.js +85 -83
  92. package/dist/collection/components/pulse-icon/pulse-icon.js +85 -83
  93. package/dist/collection/components/puzzle-icon/puzzle-icon.js +102 -99
  94. package/dist/collection/components/qr-code-icon/qr-code-icon.js +85 -83
  95. package/dist/collection/components/radio-2-icon/radio-2-icon.js +102 -99
  96. package/dist/collection/components/radio-icon/radio-icon.js +102 -99
  97. package/dist/collection/components/ram-alt-ikon/ram-alt-ikon.js +85 -84
  98. package/dist/collection/components/ram-ikon/ram-ikon.js +68 -65
  99. package/dist/collection/components/refresh-icon/refresh-icon.js +85 -83
  100. package/dist/collection/components/renault-alt-ikon/renault-alt-ikon.js +85 -82
  101. package/dist/collection/components/renault-ikon/renault-ikon.js +68 -65
  102. package/dist/collection/components/rolls-royce-ikon/rolls-royce-ikon.js +68 -66
  103. package/dist/collection/components/saab-alt-ikon/saab-alt-ikon.js +85 -83
  104. package/dist/collection/components/saab-ikon/saab-ikon.js +68 -65
  105. package/dist/collection/components/saturn-ikon/saturn-ikon.js +68 -66
  106. package/dist/collection/components/scion-ikon/scion-ikon.js +68 -66
  107. package/dist/collection/components/seat-ikon/seat-ikon.js +68 -65
  108. package/dist/collection/components/skoda-ikon/skoda-ikon.js +68 -65
  109. package/dist/collection/components/slug-icon/slug-icon.js +68 -64
  110. package/dist/collection/components/smart-ikon/smart-ikon.js +68 -65
  111. package/dist/collection/components/spider-icon/spider-icon.js +85 -83
  112. package/dist/collection/components/spyker-alt-ikon/spyker-alt-ikon.js +85 -113
  113. package/dist/collection/components/spyker-ikon/spyker-ikon.js +68 -74
  114. package/dist/collection/components/subaru-alt-ikon/subaru-alt-ikon.js +85 -83
  115. package/dist/collection/components/subaru-ikon/subaru-ikon.js +68 -65
  116. package/dist/collection/components/suzuki-ikon/suzuki-ikon.js +68 -65
  117. package/dist/collection/components/svg-icon/svg-icon.js +85 -83
  118. package/dist/collection/components/tesla-ikon/tesla-ikon.js +68 -66
  119. package/dist/collection/components/toyota-ikon/toyota-ikon.js +68 -65
  120. package/dist/collection/components/vector-curve-icon/vector-curve-icon.js +85 -83
  121. package/dist/collection/components/volkswagen-ikon/volkswagen-ikon.js +68 -68
  122. package/dist/collection/components/volvo-alt-ikon/volvo-alt-ikon.js +85 -82
  123. package/dist/collection/components/volvo-ikon/volvo-ikon.js +68 -65
  124. package/dist/collection/components/webhook-icon/webhook-icon.js +85 -83
  125. package/dist/esm/acura-ikon_119.entry.js +1 -1
  126. package/dist/esm/{index-a33da9e2.js → index-9c78a3f2.js} +184 -44
  127. package/dist/esm/loader.js +2 -2
  128. package/dist/esm/proto-ikons-wc.js +2 -2
  129. package/dist/proto-ikons-wc/{p-310736c9.js → p-0d5ae22d.js} +0 -0
  130. package/dist/proto-ikons-wc/{p-05aa94cf.entry.js → p-55f30627.entry.js} +1 -1
  131. package/dist/proto-ikons-wc/proto-ikons-wc.esm.js +1 -1
  132. package/loader/package.json +1 -0
  133. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e6c07de8.js');
5
+ const index = require('./index-f1aead39.js');
6
6
 
7
7
  const acuraIkonCss = "";
8
8
 
@@ -61,7 +61,7 @@ const uniqueTime = (key, measureText) => {
61
61
  };
62
62
  }
63
63
  };
64
- const rootAppliedStyles = new WeakMap();
64
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
65
65
  const registerStyle = (scopeId, cssText, allowCS) => {
66
66
  let style = styles.get(scopeId);
67
67
  if (supportsConstructableStylesheets && allowCS) {
@@ -83,7 +83,7 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
83
83
  const style = styles.get(scopeId);
84
84
  // if an element is NOT connected then getRootNode() will return the wrong root node
85
85
  // so the fallback is to always use the document for the root node in those cases
86
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
86
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
87
87
  if (style) {
88
88
  if (typeof style === 'string') {
89
89
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -275,7 +275,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
275
275
  }
276
276
  }
277
277
  }
278
- else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
278
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
279
279
  newValue = newValue === true ? '' : newValue;
280
280
  if (xlink) {
281
281
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
@@ -293,7 +293,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
293
293
  // if the element passed in is a shadow root, which is a document fragment
294
294
  // then we want to be adding attrs/props to the shadow root's "host" element
295
295
  // if it's not a shadow root, then we add attrs/props to the same element
296
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
296
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
297
297
  ? newVnode.$elm$.host
298
298
  : newVnode.$elm$;
299
299
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
@@ -311,6 +311,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
311
311
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
312
312
  }
313
313
  };
314
+ /**
315
+ * Create a DOM Node corresponding to one of the children of a given VNode.
316
+ *
317
+ * @param oldParentVNode the parent VNode from the previous render
318
+ * @param newParentVNode the parent VNode from the current render
319
+ * @param childIndex the index of the VNode, in the _new_ parent node's
320
+ * children, for which we will create a new DOM node
321
+ * @param parentElm the parent DOM node which our new node will be a child of
322
+ * @returns the newly created node
323
+ */
314
324
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
315
325
  // tslint:disable-next-line: prefer-const
316
326
  const newVNode = newParentVNode.$children$[childIndex];
@@ -381,6 +391,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
381
391
  }
382
392
  }
383
393
  };
394
+ /**
395
+ * Reconcile the children of a new VNode with the children of an old VNode by
396
+ * traversing the two collections of children, identifying nodes that are
397
+ * conserved or changed, calling out to `patch` to make any necessary
398
+ * updates to the DOM, and rearranging DOM nodes as needed.
399
+ *
400
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
401
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
402
+ * 'windows' by storing start and end indices and references to the
403
+ * corresponding array entries. Initially the two 'windows' are basically equal
404
+ * to the entire array, but we progressively narrow the windows until there are
405
+ * no children left to update by doing the following:
406
+ *
407
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
408
+ * that if we have an initial array like the following we'll end up dealing
409
+ * only with a window bounded by the highlighted elements:
410
+ *
411
+ * [null, null, VNode1 , ... , VNode2, null, null]
412
+ * ^^^^^^ ^^^^^^
413
+ *
414
+ * 2. Check to see if the elements at the head and tail positions are equal
415
+ * across the windows. This will basically detect elements which haven't
416
+ * been added, removed, or changed position, i.e. if you had the following
417
+ * VNode elements (represented as HTML):
418
+ *
419
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
420
+ * newVNode: `<div><p><span>THERE</span></p></div>`
421
+ *
422
+ * Then when comparing the children of the `<div>` tag we check the equality
423
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
424
+ * same tag in the same position, we'd be able to avoid completely
425
+ * re-rendering the subtree under them with a new DOM element and would just
426
+ * call out to `patch` to handle reconciling their children and so on.
427
+ *
428
+ * 3. Check, for both windows, to see if the element at the beginning of the
429
+ * window corresponds to the element at the end of the other window. This is
430
+ * a heuristic which will let us identify _some_ situations in which
431
+ * elements have changed position, for instance it _should_ detect that the
432
+ * children nodes themselves have not changed but merely moved in the
433
+ * following example:
434
+ *
435
+ * oldVNode: `<div><element-one /><element-two /></div>`
436
+ * newVNode: `<div><element-two /><element-one /></div>`
437
+ *
438
+ * If we find cases like this then we also need to move the concrete DOM
439
+ * elements corresponding to the moved children to write the re-order to the
440
+ * DOM.
441
+ *
442
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
443
+ * nodes in the old children which have the same key as the first element in
444
+ * our window on the new children. If we find such a node we handle calling
445
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
446
+ * what we find.
447
+ *
448
+ * Finally, once we've narrowed our 'windows' to the point that either of them
449
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
450
+ * insertion or deletion that needs to happen to get a DOM state that correctly
451
+ * reflects the new child VNodes. If, for instance, after our window on the old
452
+ * children has collapsed we still have more nodes on the new children that
453
+ * we haven't dealt with yet then we need to add them, or if the new children
454
+ * collapse but we still have unhandled _old_ children then we need to make
455
+ * sure the corresponding DOM nodes are removed.
456
+ *
457
+ * @param parentElm the node into which the parent VNode is rendered
458
+ * @param oldCh the old children of the parent node
459
+ * @param newVNode the new VNode which will replace the parent
460
+ * @param newCh the new children of the parent node
461
+ */
384
462
  const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
385
463
  let oldStartIdx = 0;
386
464
  let newStartIdx = 0;
@@ -393,7 +471,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
393
471
  let node;
394
472
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
395
473
  if (oldStartVnode == null) {
396
- // Vnode might have been moved left
474
+ // VNode might have been moved left
397
475
  oldStartVnode = oldCh[++oldStartIdx];
398
476
  }
399
477
  else if (oldEndVnode == null) {
@@ -406,34 +484,67 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
406
484
  newEndVnode = newCh[--newEndIdx];
407
485
  }
408
486
  else if (isSameVnode(oldStartVnode, newStartVnode)) {
487
+ // if the start nodes are the same then we should patch the new VNode
488
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
489
+ // indices to reflect that. We don't need to move any DOM Nodes around
490
+ // since things are matched up in order.
409
491
  patch(oldStartVnode, newStartVnode);
410
492
  oldStartVnode = oldCh[++oldStartIdx];
411
493
  newStartVnode = newCh[++newStartIdx];
412
494
  }
413
495
  else if (isSameVnode(oldEndVnode, newEndVnode)) {
496
+ // likewise, if the end nodes are the same we patch new onto old and
497
+ // decrement our end indices, and also likewise in this case we don't
498
+ // need to move any DOM Nodes.
414
499
  patch(oldEndVnode, newEndVnode);
415
500
  oldEndVnode = oldCh[--oldEndIdx];
416
501
  newEndVnode = newCh[--newEndIdx];
417
502
  }
418
503
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
419
504
  patch(oldStartVnode, newEndVnode);
505
+ // We need to move the element for `oldStartVnode` into a position which
506
+ // will be appropriate for `newEndVnode`. For this we can use
507
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
508
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
509
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
510
+ //
511
+ // <old-start-node />
512
+ // <some-intervening-node />
513
+ // <old-end-node />
514
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
515
+ // <next-sibling />
516
+ //
517
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
518
+ // the node for `oldStartVnode` at the end of the children of
519
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
520
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
521
+ // append it to the children of the parent element.
420
522
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
421
523
  oldStartVnode = oldCh[++oldStartIdx];
422
524
  newEndVnode = newCh[--newEndIdx];
423
525
  }
424
526
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
425
527
  patch(oldEndVnode, newStartVnode);
528
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
529
+ // the same node, so since we're here we know that they are not. Thus we
530
+ // can move the element for `oldEndVnode` _before_ the element for
531
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
532
+ // future.
426
533
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
427
534
  oldEndVnode = oldCh[--oldEndIdx];
428
535
  newStartVnode = newCh[++newStartIdx];
429
536
  }
430
537
  else {
431
538
  {
432
- // new element
539
+ // We either didn't find an element in the old children that matches
540
+ // the key of the first new child OR the build is not using `key`
541
+ // attributes at all. In either case we need to create a new element
542
+ // for the new node.
433
543
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
434
544
  newStartVnode = newCh[++newStartIdx];
435
545
  }
436
546
  if (node) {
547
+ // if we created a new node then handle inserting it to the DOM
437
548
  {
438
549
  oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
439
550
  }
@@ -441,20 +552,49 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
441
552
  }
442
553
  }
443
554
  if (oldStartIdx > oldEndIdx) {
555
+ // we have some more new nodes to add which don't match up with old nodes
444
556
  addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
445
557
  }
446
558
  else if (newStartIdx > newEndIdx) {
559
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
560
+ // in the new array, so lets remove them (which entails cleaning up the
561
+ // relevant DOM nodes)
447
562
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
448
563
  }
449
564
  };
450
- const isSameVnode = (vnode1, vnode2) => {
565
+ /**
566
+ * Compare two VNodes to determine if they are the same
567
+ *
568
+ * **NB**: This function is an equality _heuristic_ based on the available
569
+ * information set on the two VNodes and can be misleading under certain
570
+ * circumstances. In particular, if the two nodes do not have `key` attrs
571
+ * (available under `$key$` on VNodes) then the function falls back on merely
572
+ * checking that they have the same tag.
573
+ *
574
+ * So, in other words, if `key` attrs are not set on VNodes which may be
575
+ * changing order within a `children` array or something along those lines then
576
+ * we could obtain a false positive and then have to do needless re-rendering.
577
+ *
578
+ * @param leftVNode the first VNode to check
579
+ * @param rightVNode the second VNode to check
580
+ * @returns whether they're equal or not
581
+ */
582
+ const isSameVnode = (leftVNode, rightVNode) => {
451
583
  // compare if two vnode to see if they're "technically" the same
452
584
  // need to have the same element tag, and same key to be the same
453
- if (vnode1.$tag$ === vnode2.$tag$) {
585
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
454
586
  return true;
455
587
  }
456
588
  return false;
457
589
  };
590
+ /**
591
+ * Handle reconciling an outdated VNode with a new one which corresponds to
592
+ * it. This function handles flushing updates to the DOM and reconciling the
593
+ * children of the two nodes (if any).
594
+ *
595
+ * @param oldVNode an old VNode whose DOM element and children we want to update
596
+ * @param newVNode a new VNode representing an updated version of the old one
597
+ */
458
598
  const patch = (oldVNode, newVNode) => {
459
599
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
460
600
  const oldChildren = oldVNode.$children$;
@@ -467,7 +607,6 @@ const patch = (oldVNode, newVNode) => {
467
607
  // only add this to the when the compiler sees we're using an svg somewhere
468
608
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
469
609
  }
470
- // element node
471
610
  {
472
611
  {
473
612
  // either this is the first render of an element OR it's an update
@@ -478,6 +617,7 @@ const patch = (oldVNode, newVNode) => {
478
617
  }
479
618
  if (oldChildren !== null && newChildren !== null) {
480
619
  // looks like there's child vnodes for both the old and new vnodes
620
+ // so we need to call `updateChildren` to reconcile them
481
621
  updateChildren(elm, oldChildren, newVNode, newChildren);
482
622
  }
483
623
  else if (newChildren !== null) {
@@ -508,7 +648,7 @@ const renderVdom = (hostRef, renderFnResults) => {
508
648
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
509
649
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
510
650
  rootVnode.$tag$ = null;
511
- rootVnode.$flags$ |= 4 /* isHost */;
651
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
512
652
  hostRef.$vnode$ = rootVnode;
513
653
  rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
514
654
  // synchronous patch
@@ -533,10 +673,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
533
673
  };
534
674
  const scheduleUpdate = (hostRef, isInitialLoad) => {
535
675
  {
536
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
676
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
537
677
  }
538
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
539
- hostRef.$flags$ |= 512 /* needsRerender */;
678
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
679
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
540
680
  return;
541
681
  }
542
682
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
@@ -583,7 +723,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
583
723
  }
584
724
  else {
585
725
  Promise.all(childrenPromises).then(postUpdate);
586
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
726
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
587
727
  childrenPromises.length = 0;
588
728
  }
589
729
  }
@@ -592,10 +732,10 @@ const callRender = (hostRef, instance, elm) => {
592
732
  try {
593
733
  instance = instance.render() ;
594
734
  {
595
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
735
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
596
736
  }
597
737
  {
598
- hostRef.$flags$ |= 2 /* hasRendered */;
738
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
599
739
  }
600
740
  {
601
741
  {
@@ -618,8 +758,8 @@ const postUpdateComponent = (hostRef) => {
618
758
  const elm = hostRef.$hostElement$;
619
759
  const endPostUpdate = createTime('postUpdate', tagName);
620
760
  const ancestorComponent = hostRef.$ancestorComponent$;
621
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
622
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
761
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
762
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
623
763
  {
624
764
  // DOM WRITE!
625
765
  addHydratedFlag(elm);
@@ -642,10 +782,10 @@ const postUpdateComponent = (hostRef) => {
642
782
  hostRef.$onRenderResolve$();
643
783
  hostRef.$onRenderResolve$ = undefined;
644
784
  }
645
- if (hostRef.$flags$ & 512 /* needsRerender */) {
785
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
646
786
  nextTick(() => scheduleUpdate(hostRef, false));
647
787
  }
648
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
788
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
649
789
  }
650
790
  // ( •_•)
651
791
  // ( •_•)>⌐■-■
@@ -690,16 +830,16 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
690
830
  const parsePropertyValue = (propValue, propType) => {
691
831
  // ensure this value is of the correct prop type
692
832
  if (propValue != null && !isComplexType(propValue)) {
693
- if (propType & 4 /* Boolean */) {
833
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
694
834
  // per the HTML spec, any string value means it is a boolean true value
695
835
  // but we'll cheat here and say that the string "false" is the boolean false
696
836
  return propValue === 'false' ? false : propValue === '' || !!propValue;
697
837
  }
698
- if (propType & 2 /* Number */) {
838
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
699
839
  // force it to be a number
700
840
  return parseFloat(propValue);
701
841
  }
702
- if (propType & 1 /* String */) {
842
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
703
843
  // could have been passed as a number or boolean
704
844
  // but we still want it as a string
705
845
  return String(propValue);
@@ -722,12 +862,12 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
722
862
  // explicitly check for NaN on both sides, as `NaN === NaN` is always false
723
863
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
724
864
  const didValueChange = newVal !== oldVal && !areBothNaN;
725
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
865
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
726
866
  // gadzooks! the property's value has changed!!
727
867
  // set our new value!
728
868
  hostRef.$instanceValues$.set(propName, newVal);
729
869
  if (instance) {
730
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
870
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
731
871
  // looks like this value actually changed, so we've got work to do!
732
872
  // but only if we've already rendered, otherwise just chill out
733
873
  // queue that we need to do an update, but don't worry about queuing
@@ -743,8 +883,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
743
883
  const members = Object.entries(cmpMeta.$members$);
744
884
  const prototype = Cstr.prototype;
745
885
  members.map(([memberName, [memberFlags]]) => {
746
- if ((memberFlags & 31 /* Prop */ ||
747
- ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
886
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
887
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
748
888
  // proxyComponent - prop
749
889
  Object.defineProperty(prototype, memberName, {
750
890
  get() {
@@ -760,7 +900,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
760
900
  });
761
901
  }
762
902
  });
763
- if ((flags & 1 /* isElementConstructor */)) {
903
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
764
904
  const attrNameToPropName = new Map();
765
905
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
766
906
  plt.jmp(() => {
@@ -816,7 +956,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
816
956
  // create an array of attributes to observe
817
957
  // and also create a map of html attribute name to js property name
818
958
  Cstr.observedAttributes = members
819
- .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
959
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
820
960
  .map(([propName, m]) => {
821
961
  const attrName = m[1] || propName;
822
962
  attrNameToPropName.set(attrName, propName);
@@ -828,10 +968,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
828
968
  };
829
969
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
830
970
  // initializeComponent
831
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
971
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
832
972
  {
833
973
  // we haven't initialized this element yet
834
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
974
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
835
975
  // lazy loaded components
836
976
  // request the component's implementation to be
837
977
  // wired up with the host element
@@ -843,7 +983,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
843
983
  endLoad();
844
984
  }
845
985
  if (!Cstr.isProxied) {
846
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
986
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
847
987
  Cstr.isProxied = true;
848
988
  }
849
989
  const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
@@ -851,7 +991,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
851
991
  // but let's keep track of when we start and stop
852
992
  // so that the getters/setters don't incorrectly step on data
853
993
  {
854
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
994
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
855
995
  }
856
996
  // construct the lazy-loaded component implementation
857
997
  // passing the hostRef is very important during
@@ -864,7 +1004,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
864
1004
  consoleError(e);
865
1005
  }
866
1006
  {
867
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1007
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
868
1008
  }
869
1009
  endNewInstance();
870
1010
  }
@@ -874,7 +1014,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
874
1014
  const scopeId = getScopeId(cmpMeta);
875
1015
  if (!styles.has(scopeId)) {
876
1016
  const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
877
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1017
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
878
1018
  endRegisterStyles();
879
1019
  }
880
1020
  }
@@ -896,13 +1036,13 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
896
1036
  }
897
1037
  };
898
1038
  const connectedCallback = (elm) => {
899
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1039
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
900
1040
  const hostRef = getHostRef(elm);
901
1041
  const cmpMeta = hostRef.$cmpMeta$;
902
1042
  const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
903
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1043
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
904
1044
  // first time this component has connected
905
- hostRef.$flags$ |= 1 /* hasConnected */;
1045
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
906
1046
  {
907
1047
  // find the first ancestor component (if there is one) and register
908
1048
  // this component as one of the actively loading child components for its ancestor
@@ -922,7 +1062,7 @@ const connectedCallback = (elm) => {
922
1062
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
923
1063
  if (cmpMeta.$members$) {
924
1064
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
925
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1065
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
926
1066
  const value = elm[memberName];
927
1067
  delete elm[memberName];
928
1068
  elm[memberName] = value;
@@ -937,7 +1077,7 @@ const connectedCallback = (elm) => {
937
1077
  }
938
1078
  };
939
1079
  const disconnectedCallback = (elm) => {
940
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1080
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
941
1081
  getHostRef(elm);
942
1082
  }
943
1083
  };
@@ -997,7 +1137,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
997
1137
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
998
1138
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
999
1139
  cmpTags.push(tagName);
1000
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1140
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1001
1141
  }
1002
1142
  });
1003
1143
  });
@@ -1019,7 +1159,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1019
1159
  // Fallback appLoad event
1020
1160
  endBootstrap();
1021
1161
  };
1022
- const hostRefs = new WeakMap();
1162
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1023
1163
  const getHostRef = (ref) => hostRefs.get(ref);
1024
1164
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1025
1165
  const registerHost = (elm, cmpMeta) => {
@@ -1060,14 +1200,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1060
1200
  return importedModule[exportName];
1061
1201
  }, consoleError);
1062
1202
  };
1063
- const styles = new Map();
1203
+ const styles = /*@__PURE__*/ new Map();
1064
1204
  const queueDomReads = [];
1065
1205
  const queueDomWrites = [];
1066
1206
  const queueTask = (queue, write) => (cb) => {
1067
1207
  queue.push(cb);
1068
1208
  if (!queuePending) {
1069
1209
  queuePending = true;
1070
- if (write && plt.$flags$ & 4 /* queueSync */) {
1210
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1071
1211
  nextTick(flush);
1072
1212
  }
1073
1213
  else {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e6c07de8.js');
5
+ const index = require('./index-f1aead39.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-e6c07de8.js');
3
+ const index = require('./index-f1aead39.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.17.4 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  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": "2.17.4",
126
- "typescriptVersion": "4.5.4"
125
+ "version": "2.18.0",
126
+ "typescriptVersion": "4.7.4"
127
127
  },
128
128
  "collections": [],
129
129
  "bundles": []