@everymatrix/ui-skeleton 1.55.0 → 1.56.0

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 (33) hide show
  1. package/dist/cjs/{index-24f3e29d.js → index-9cb6c0ab.js} +160 -60
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{ui-skeleton-ba6533bf.js → ui-skeleton-d9f3209a.js} +4 -14
  5. package/dist/cjs/ui-skeleton.cjs.entry.js +2 -2
  6. package/dist/cjs/ui-skeleton.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +1 -1
  8. package/dist/collection/components/ui-skeleton/ui-skeleton.js +31 -13
  9. package/dist/esm/{index-7c2d76a2.js → index-db5752f9.js} +160 -60
  10. package/dist/esm/index.js +2 -2
  11. package/dist/esm/loader.js +2 -2
  12. package/dist/esm/{ui-skeleton-82ccc79b.js → ui-skeleton-982450d2.js} +4 -14
  13. package/dist/esm/ui-skeleton.entry.js +2 -2
  14. package/dist/esm/ui-skeleton.js +3 -3
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.d.ts +2 -0
  16. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.dev.d.ts +2 -0
  17. package/dist/ui-skeleton/index.esm.js +1 -1
  18. package/dist/ui-skeleton/p-558efe80.js +1 -0
  19. package/dist/ui-skeleton/p-a483aa6f.entry.js +1 -0
  20. package/dist/ui-skeleton/p-a551f6fe.js +2 -0
  21. package/dist/ui-skeleton/ui-skeleton.esm.js +1 -1
  22. package/package.json +1 -1
  23. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.d.ts +0 -2
  24. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.dev.d.ts +0 -2
  25. package/dist/ui-skeleton/p-759564b8.js +0 -2
  26. package/dist/ui-skeleton/p-75ecc506.js +0 -1
  27. package/dist/ui-skeleton/p-becf2dc3.entry.js +0 -1
  28. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/storybook/main.d.ts +0 -0
  29. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/storybook/preview.d.ts +0 -0
  30. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/tools/plugins/index.d.ts +0 -0
  31. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  32. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  33. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,17 +1,21 @@
1
1
  const NAMESPACE = 'ui-skeleton';
2
- const BUILD = /* ui-skeleton */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: false, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: false, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* ui-skeleton */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: false, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: false, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
+
13
+ // src/client/client-host-ref.ts
12
14
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
15
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
16
+ var registerInstance = (lazyInstance, hostRef) => {
17
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
+ };
15
19
  var registerHost = (hostElement, cmpMeta) => {
16
20
  const hostRef = {
17
21
  $flags$: 0,
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
28
  hostElement["s-p"] = [];
25
29
  hostElement["s-rc"] = [];
26
30
  }
27
- return hostRefs.set(hostElement, hostRef);
31
+ const ref = hostRefs.set(hostElement, hostRef);
32
+ return ref;
28
33
  };
29
34
  var consoleError = (e, el) => (0, console.error)(e, el);
30
35
 
@@ -60,16 +65,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
60
65
  /* webpackExclude: /\.system\.entry\.js$/ */
61
66
  /* webpackMode: "lazy" */
62
67
  `./${bundleId}.entry.js${""}`
63
- ).then((importedModule) => {
64
- {
65
- cmpModules.set(bundleId, importedModule);
68
+ ).then(
69
+ (importedModule) => {
70
+ {
71
+ cmpModules.set(bundleId, importedModule);
72
+ }
73
+ return importedModule[exportName];
74
+ },
75
+ (e) => {
76
+ consoleError(e, hostRef.$hostElement$);
66
77
  }
67
- return importedModule[exportName];
68
- }, consoleError);
78
+ );
69
79
  };
70
80
 
71
81
  // src/client/client-style.ts
72
82
  var styles = /* @__PURE__ */ new Map();
83
+ var HYDRATED_STYLE_ID = "sty-id";
73
84
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
74
85
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
75
86
  var win = typeof window !== "undefined" ? window : {};
@@ -128,12 +139,6 @@ var flush = () => {
128
139
  };
129
140
  var nextTick = (cb) => promiseResolve().then(cb);
130
141
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
-
132
- // src/utils/constants.ts
133
- var EMPTY_OBJ = {};
134
-
135
- // src/utils/helpers.ts
136
- var isDef = (v) => v != null;
137
142
  var isComplexType = (o) => {
138
143
  o = typeof o;
139
144
  return o === "object" || o === "function";
@@ -321,7 +326,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
321
326
  }
322
327
  if (!appliedStyles.has(scopeId2)) {
323
328
  {
324
- styleElm = doc.createElement("style");
329
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
325
330
  styleElm.innerHTML = style;
326
331
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
327
332
  if (nonce != null) {
@@ -331,7 +336,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
331
336
  if (styleContainerNode.nodeName === "HEAD") {
332
337
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
333
338
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
334
- styleContainerNode.insertBefore(styleElm, referenceNode2);
339
+ styleContainerNode.insertBefore(
340
+ styleElm,
341
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
342
+ );
335
343
  } else if ("host" in styleContainerNode) {
336
344
  if (supportsConstructableStylesheets) {
337
345
  const stylesheet = new CSSStyleSheet();
@@ -349,7 +357,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
349
357
  styleContainerNode.append(styleElm);
350
358
  }
351
359
  }
352
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
360
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
353
361
  styleContainerNode.insertBefore(styleElm, null);
354
362
  }
355
363
  }
@@ -376,15 +384,17 @@ var attachStyles = (hostRef) => {
376
384
  endAttachStyles();
377
385
  };
378
386
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
379
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
387
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
380
388
  if (oldValue !== newValue) {
381
389
  memberName.toLowerCase();
382
390
  if (memberName === "class") {
383
391
  const classList = elm.classList;
384
392
  const oldClasses = parseClassList(oldValue);
385
- const newClasses = parseClassList(newValue);
386
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
387
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
393
+ let newClasses = parseClassList(newValue);
394
+ {
395
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
396
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
397
+ }
388
398
  } else if (memberName === "style") {
389
399
  {
390
400
  for (const prop in oldValue) {
@@ -414,22 +424,38 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
414
424
  }
415
425
  };
416
426
  var parseClassListRegex = /\s/;
417
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
427
+ var parseClassList = (value) => {
428
+ if (typeof value === "object" && value && "baseVal" in value) {
429
+ value = value.baseVal;
430
+ }
431
+ if (!value || typeof value !== "string") {
432
+ return [];
433
+ }
434
+ return value.split(parseClassListRegex);
435
+ };
418
436
 
419
437
  // src/runtime/vdom/update-element.ts
420
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
438
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
421
439
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
422
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
423
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
440
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
441
+ const newVnodeAttrs = newVnode.$attrs$ || {};
424
442
  {
425
443
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
426
444
  if (!(memberName in newVnodeAttrs)) {
427
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0);
445
+ setAccessor(
446
+ elm,
447
+ memberName,
448
+ oldVnodeAttrs[memberName],
449
+ void 0);
428
450
  }
429
451
  }
430
452
  }
431
453
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
432
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName]);
454
+ setAccessor(
455
+ elm,
456
+ memberName,
457
+ oldVnodeAttrs[memberName],
458
+ newVnodeAttrs[memberName]);
433
459
  }
434
460
  };
435
461
  function sortedAttrNames(attrNames) {
@@ -441,12 +467,9 @@ function sortedAttrNames(attrNames) {
441
467
  attrNames
442
468
  );
443
469
  }
444
-
445
- // src/runtime/vdom/vdom-render.ts
446
- var scopeId;
447
470
  var hostTagName;
448
471
  var useNativeShadowDom = false;
449
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
472
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
450
473
  const newVNode2 = newParentVNode.$children$[childIndex];
451
474
  let i2 = 0;
452
475
  let elm;
@@ -458,11 +481,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
458
481
  {
459
482
  updateElement(null, newVNode2);
460
483
  }
461
- const rootNode = elm.getRootNode();
462
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
463
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
464
- elm.classList.add(elm["s-si"] = scopeId);
465
- }
466
484
  if (newVNode2.$children$) {
467
485
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
468
486
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -589,6 +607,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
589
607
  if (!isInitialRender) {
590
608
  return leftVNode.$key$ === rightVNode.$key$;
591
609
  }
610
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
611
+ leftVNode.$key$ = rightVNode.$key$;
612
+ }
592
613
  return true;
593
614
  }
594
615
  return false;
@@ -622,8 +643,9 @@ var nullifyVNodeRefs = (vNode) => {
622
643
  }
623
644
  };
624
645
  var insertBefore = (parent, newNode, reference) => {
625
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
626
- return inserted;
646
+ {
647
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
648
+ }
627
649
  };
628
650
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
629
651
  const hostElm = hostRef.$hostElement$;
@@ -641,14 +663,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
641
663
  rootVnode.$flags$ |= 4 /* isHost */;
642
664
  hostRef.$vnode$ = rootVnode;
643
665
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
644
- useNativeShadowDom = supportsShadow ;
666
+ useNativeShadowDom = supportsShadow ;
645
667
  patch(oldVNode, rootVnode, isInitialLoad);
646
668
  };
647
669
 
648
670
  // src/runtime/update-component.ts
649
671
  var attachToAncestor = (hostRef, ancestorComponent) => {
650
672
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
651
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
673
+ const index = ancestorComponent["s-p"].push(
674
+ new Promise(
675
+ (r) => hostRef.$onRenderResolve$ = () => {
676
+ ancestorComponent["s-p"].splice(index - 1, 1);
677
+ r();
678
+ }
679
+ )
680
+ );
652
681
  }
653
682
  };
654
683
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -744,7 +773,7 @@ var postUpdateComponent = (hostRef) => {
744
773
  addHydratedFlag(elm);
745
774
  }
746
775
  {
747
- safeCall(instance, "componentDidLoad");
776
+ safeCall(instance, "componentDidLoad", void 0, elm);
748
777
  }
749
778
  endPostUpdate();
750
779
  {
@@ -768,17 +797,14 @@ var postUpdateComponent = (hostRef) => {
768
797
  }
769
798
  };
770
799
  var appDidLoad = (who) => {
771
- {
772
- addHydratedFlag(doc.documentElement);
773
- }
774
800
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
775
801
  };
776
- var safeCall = (instance, method, arg) => {
802
+ var safeCall = (instance, method, arg, elm) => {
777
803
  if (instance && instance[method]) {
778
804
  try {
779
805
  return instance[method](arg);
780
806
  } catch (e) {
781
- consoleError(e);
807
+ consoleError(e, elm);
782
808
  }
783
809
  }
784
810
  return void 0;
@@ -837,15 +863,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
837
863
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
838
864
  members.map(([memberName, [memberFlags]]) => {
839
865
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
866
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
867
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
868
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
869
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
870
+ Object.defineProperty(prototype, memberName, {
871
+ get() {
872
+ {
873
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
874
+ return getValue(this, memberName);
875
+ }
876
+ const ref = getHostRef(this);
877
+ const instance = ref ? ref.$lazyInstance$ : prototype;
878
+ if (!instance) return;
879
+ return instance[memberName];
880
+ }
881
+ },
882
+ configurable: true,
883
+ enumerable: true
884
+ });
885
+ }
840
886
  Object.defineProperty(prototype, memberName, {
841
- get() {
842
- return getValue(this, memberName);
843
- },
844
887
  set(newValue) {
845
- setValue(this, memberName, newValue, cmpMeta);
846
- },
847
- configurable: true,
848
- enumerable: true
888
+ const ref = getHostRef(this);
889
+ if (origSetter) {
890
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
891
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
892
+ newValue = ref.$instanceValues$.get(memberName);
893
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
894
+ ref.$instanceValues$.set(memberName, currentValue);
895
+ }
896
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
897
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
898
+ setValue(this, memberName, newValue, cmpMeta);
899
+ return;
900
+ }
901
+ {
902
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
903
+ setValue(this, memberName, newValue, cmpMeta);
904
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
905
+ ref.$onReadyPromise$.then(() => {
906
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
907
+ ref.$lazyInstance$[memberName] = newValue;
908
+ }
909
+ });
910
+ }
911
+ return;
912
+ }
913
+ const setterSetVal = () => {
914
+ const currentValue = ref.$lazyInstance$[memberName];
915
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
916
+ ref.$instanceValues$.set(memberName, currentValue);
917
+ }
918
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
919
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
920
+ };
921
+ if (ref.$lazyInstance$) {
922
+ setterSetVal();
923
+ } else {
924
+ ref.$onReadyPromise$.then(() => setterSetVal());
925
+ }
926
+ }
927
+ }
849
928
  });
850
929
  }
851
930
  });
@@ -855,7 +934,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
855
934
  plt.jmp(() => {
856
935
  var _a2;
857
936
  const propName = attrNameToPropName.get(attrName);
858
- if (this.hasOwnProperty(propName)) {
937
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
859
938
  newValue = this[propName];
860
939
  delete this[propName];
861
940
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -875,7 +954,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
875
954
  }
876
955
  return;
877
956
  }
878
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
957
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
958
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
959
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
960
+ this[propName] = newValue;
961
+ }
879
962
  });
880
963
  };
881
964
  Cstr.observedAttributes = Array.from(
@@ -900,7 +983,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
900
983
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
901
984
  const bundleId = cmpMeta.$lazyBundleId$;
902
985
  if (bundleId) {
903
- const CstrImport = loadModule(cmpMeta);
986
+ const CstrImport = loadModule(cmpMeta, hostRef);
904
987
  if (CstrImport && "then" in CstrImport) {
905
988
  const endLoad = uniqueTime();
906
989
  Cstr = await CstrImport;
@@ -925,7 +1008,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
925
1008
  try {
926
1009
  new Cstr(hostRef);
927
1010
  } catch (e) {
928
- consoleError(e);
1011
+ consoleError(e, elm);
929
1012
  }
930
1013
  {
931
1014
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -960,7 +1043,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
960
1043
  schedule();
961
1044
  }
962
1045
  };
963
- var fireConnectedCallback = (instance) => {
1046
+ var fireConnectedCallback = (instance, elm) => {
964
1047
  };
965
1048
 
966
1049
  // src/runtime/connected-callback.ts
@@ -1000,7 +1083,7 @@ var connectedCallback = (elm) => {
1000
1083
  endConnected();
1001
1084
  }
1002
1085
  };
1003
- var disconnectInstance = (instance) => {
1086
+ var disconnectInstance = (instance, elm) => {
1004
1087
  };
1005
1088
  var disconnectedCallback = async (elm) => {
1006
1089
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1009,6 +1092,12 @@ var disconnectedCallback = async (elm) => {
1009
1092
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1010
1093
  }
1011
1094
  }
1095
+ if (rootAppliedStyles.has(elm)) {
1096
+ rootAppliedStyles.delete(elm);
1097
+ }
1098
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1099
+ rootAppliedStyles.delete(elm.shadowRoot);
1100
+ }
1012
1101
  };
1013
1102
 
1014
1103
  // src/runtime/bootstrap-lazy.ts
@@ -1071,6 +1160,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1071
1160
  }
1072
1161
  disconnectedCallback() {
1073
1162
  plt.jmp(() => disconnectedCallback(this));
1163
+ plt.raf(() => {
1164
+ var _a3;
1165
+ const hostRef = getHostRef(this);
1166
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1167
+ if (i2 > -1) {
1168
+ deferredConnectedCallbacks.splice(i2, 1);
1169
+ }
1170
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1171
+ delete hostRef.$vnode$.$elm$;
1172
+ }
1173
+ });
1074
1174
  }
1075
1175
  componentOnReady() {
1076
1176
  return getHostRef(this).$onReadyPromise$;
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { U as UiSkeleton } from './ui-skeleton-82ccc79b.js';
2
- import './index-7c2d76a2.js';
1
+ export { U as UiSkeleton } from './ui-skeleton-982450d2.js';
2
+ import './index-db5752f9.js';
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-7c2d76a2.js';
2
- export { s as setNonce } from './index-7c2d76a2.js';
1
+ import { b as bootstrapLazy } from './index-db5752f9.js';
2
+ export { s as setNonce } from './index-db5752f9.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-7c2d76a2.js';
1
+ import { r as registerInstance, h } from './index-db5752f9.js';
2
2
 
3
3
  const uiSkeletonCss = ".Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 250px);height:var(--emw-skeleton-image-height, 200px);border-radius:var(--emw-skeleton-image-border-radius, 10px)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
4
4
  const UiSkeletonStyle0 = uiSkeletonCss;
@@ -6,20 +6,10 @@ const UiSkeletonStyle0 = uiSkeletonCss;
6
6
  const UiSkeleton = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
- this.structure = undefined;
10
- this.width = undefined;
11
- this.height = undefined;
12
- this.borderRadius = undefined;
13
- this.marginBottom = undefined;
14
- this.marginTop = undefined;
15
- this.marginLeft = undefined;
16
- this.marginRight = undefined;
9
+ /**
10
+ * Toggles skeleton animation
11
+ */
17
12
  this.animation = true;
18
- this.rows = undefined;
19
- this.size = undefined;
20
- this.color = undefined;
21
- this.primaryColor = undefined;
22
- this.secondaryColor = undefined;
23
13
  }
24
14
  handleStructureChange(newValue, oldValue) {
25
15
  if (oldValue !== newValue) {
@@ -1,2 +1,2 @@
1
- export { U as ui_skeleton } from './ui-skeleton-82ccc79b.js';
2
- import './index-7c2d76a2.js';
1
+ export { U as ui_skeleton } from './ui-skeleton-982450d2.js';
2
+ import './index-db5752f9.js';
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-7c2d76a2.js';
2
- export { s as setNonce } from './index-7c2d76a2.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-db5752f9.js';
2
+ export { s as setNonce } from './index-db5752f9.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -1 +1 @@
1
- export{U as UiSkeleton}from"./p-75ecc506.js";import"./p-759564b8.js";
1
+ export{U as UiSkeleton}from"./p-558efe80.js";import"./p-a551f6fe.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./p-a551f6fe.js";const r=class{constructor(e){t(this,e),this.animation=!0}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}updateStyles(){this.primaryColor&&this.skeletonContainer.style.setProperty("--emw-skeleton-primary-color",this.primaryColor),this.secondaryColor&&this.skeletonContainer.style.setProperty("--emw-skeleton-secondary-color",this.secondaryColor)}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle()}}renderLogo(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Image "+(this.animation?"Skeleton":"")}))}renderTitle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){const t={width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`};return Array.from({length:this.rows>0?this.rows:1}).map(((r,i)=>e("div",{style:t,key:i,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.size}`,height:`${this.size}`,"background-color":`${this.color}`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Circle "+(this.animation?"Skeleton":"")}))}componentDidLoad(){this.updateStyles()}render(){return this.handleStructure(this.structure)}static get watchers(){return{structure:["handleStructureChange"],primaryColor:["updateStyles"],secondaryColor:["updateStyles"]}}};r.style=".Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 250px);height:var(--emw-skeleton-image-height, 200px);border-radius:var(--emw-skeleton-image-border-radius, 10px)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";export{r as U}
@@ -0,0 +1 @@
1
+ export{U as ui_skeleton}from"./p-558efe80.js";import"./p-a551f6fe.js";
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],p=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&a.o?b($):a.raf($))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},$=()=>{v(m),v(p),(d=m.length>0)&&a.raf($)},b=t=>f().then(t),w=y(p,!0),S=t=>"object"==(t=typeof t)||"function"===t;function g(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>O,ok:()=>j,unwrap:()=>C,unwrapErr:()=>M});var j=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function O(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return k(t.value);throw"should never get here"}var E,C=t=>{if(t.isOk)return t.value;throw t.value},M=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!S(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?x(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.u=e,r.length>0&&(u.h=r),u.m=l,u},x=(t,e)=>({o:0,p:t,i:e,v:null,h:null,u:null,m:null}),A={},N=(t,e)=>null==t||S(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t,T=new WeakMap,D=t=>"sc-"+t.$,F=(t,e,n,o)=>{if(n!==o)if(e.toLowerCase(),"class"===e){const e=t.classList,l=L(n);let s=L(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else"key"===e||"ref"===e&&o&&o(t)},H=/\s/,L=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),R=(t,e)=>{const n=11===e.v.nodeType&&e.v.host?e.v.host:e.v,o=t&&t.u||{},l=e.u||{};for(const t of U(Object.keys(o)))t in l||F(n,t,o[t],void 0);for(const t of U(Object.keys(l)))F(n,t,o[t],l[t])};function U(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(l=o.v=u.createElement(o.p),R(null,o),o.h)for(i=0;i<o.h.length;++i)s=V(t,o,i),s&&l.appendChild(s);return l["s-hn"]=E,l},W=(t,e,n,o,l,s)=>{let i,r=t;for(;l<=s;++l)o[l]&&(i=V(null,n,l),i&&(o[l].v=i,B(r,i,e)))},q=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;z(e),t&&t.remove()}}},G=(t,e,n=!1)=>t.p===e.p&&(n?(n&&!t.m&&e.m&&(t.m=e.m),!0):t.m===e.m),_=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h;R(t,e),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],m=o.length-1,p=o[0],y=o[m];for(;r<=f&&c<=m;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==p)p=o[++c];else if(null==y)y=o[--m];else if(G(h,p,l))_(h,p,l),h=e[++r],p=o[++c];else if(G(d,y,l))_(d,y,l),d=e[--f],y=o[--m];else if(G(h,y,l))_(h,y,l),B(t,h.v,d.v.nextSibling),h=e[++r],y=o[--m];else if(G(d,p,l))_(d,p,l),B(t,d.v,h.v),d=e[--f],p=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].m&&e[a].m===p.m){u=a;break}u>=0?(i=e[u],i.p!==p.p?s=V(e&&e[c],n,u):(_(i,p,l),e[u]=void 0,s=i.v),p=o[++c]):(s=V(e&&e[c],n,c),p=o[++c]),s&&B(h.v.parentNode,s,h.v)}r>f?W(t,null==o[m+1]?null:o[m+1].v,n,o,c,m):c>m&&q(e,r,f)})(o,l,e,s,n):null!==s?W(o,null,e,s,0,s.length-1):!n&&null!==l&&q(l,0,l.length-1)},z=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(z)},B=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),I=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},J=(t,e)=>{if(t.o|=16,!(4&t.o))return I(t,t.j),w((()=>K(t,e)));t.o|=512},K=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return Q(void 0,(()=>Y(t,n,e)))},Q=(t,e)=>X(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),X=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Y=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.k;((t,e)=>{var n;const o=D(e),l=i.get(o);if(t=11===t.nodeType?t:u,l)if("string"==typeof l){let s,i=T.get(t=t.head||t);if(i||T.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||u.createElement("style"),s.innerHTML=l;const i=null!=(n=a.O)?n:g(u);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(h){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=r),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l])})(t.$hostElement$.getRootNode(),e)})(t);Z(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>tt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},Z=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C||x(null,null),s=(t=>t&&t.p===A)(e)?e:P(null,null,e);if(E=o.tagName,n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.p=null,s.o|=4,t.C=s,s.v=l.v=o,_(l,s,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},tt=t=>{const e=t.$hostElement$,n=t.t,o=t.j;64&t.o||(t.o|=64,ot(e),nt(n,"componentDidLoad",void 0,e),t.M(e),o||et()),t.S&&(t.S(),t.S=void 0),512&t.o&&b((()=>J(t,!1))),t.o&=-517},et=()=>{b((()=>(t=>{const e=a.ce("appload",{detail:{namespace:"ui-skeleton"}});return t.dispatchEvent(e),e})(c)))},nt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},ot=t=>t.classList.add("hydrated"),lt=(t,e,o,s)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${s.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.P.get(e),u=i.o,a=i.t;if(o=N(o,s.A[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.P.set(e,o),a)){if(s.N&&128&u){const t=s.N[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){l(t,r)}}))}2==(18&u)&&J(i,!1)}},st=(t,e,o)=>{var l,s;const i=t.prototype;if(e.A||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const r=Object.entries(null!=(l=e.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.A[t][0]|=2048),r&&(e.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.A[t][0]))return((t,e)=>n(this).P.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.P.get(t)?s=i.P.get(t):!i.P.get(t)&&n&&i.P.set(t,n),r.call(this,N(s,l)),void lt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.A[t][0]))return lt(this,t,s,e),void(1&o&&!i.t&&i.T.then((()=>{4096&e.A[t][0]&&i.t[t]!==i.P.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.P.get(t)&&n&&i.P.set(t,n),i.t[t]=N(s,l),lt(this,t,i.t[t],e)};i.t?n():i.T.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){a.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},it=(t,o={})=>{var f;const d=[],m=o.exclude||[],p=c.customElements,y=u.head,v=y.querySelector("meta[charset]"),$=u.createElement("style"),b=[];let w,S=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let j=!1;if(t.map((t=>{t[1].map((o=>{var r;const c={o:o[0],$:o[1],A:o[2],D:o[3]};4&c.o&&(j=!0),c.A=o[2],c.N=null!=(r=o[4])?r:{};const u=c.$,f=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,k:n,P:new Map};o.T=new Promise((t=>o.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?b.push(this):a.jmp((()=>(t=>{if(!(1&a.o)){const e=n(t),o=e.k,r=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(e,e.j=n);break}}o.A&&Object.entries(o.A).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.F){const i=((t,e)=>{const n=t.$.replace(/-/g,"_"),o=t.F;if(!o)return;const i=s.get(o);return i?i[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};o=await i,t()}else o=i;if(!o)throw Error(`Constructor for "${n.$}#${e.H}" was not found`);o.isProxied||(n.N=o.watchers,st(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){l(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=D(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const r=e.j,c=()=>J(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,o)}r()}})(this)))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.o)){const e=n(t);(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}))}T.has(t)&&T.delete(t),t.shadowRoot&&T.has(t.shadowRoot)&&T.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.v)instanceof Node&&!e.C.v.isConnected&&delete e.C.v}))}componentOnReady(){return n(this).T}};c.F=t[0],m.includes(u)||p.get(u)||(d.push(u),p.define(u,st(f,c,1)))}))})),d.length>0&&(j&&($.textContent+=r),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(f=a.O)?f:g(u);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((t=>t.connectedCallback())):a.jmp((()=>w=setTimeout(et,30)))},rt=t=>a.O=t;export{it as b,P as h,f as p,o as r,rt as s}
@@ -1 +1 @@
1
- import{p as r,b as o}from"./p-759564b8.js";export{s as setNonce}from"./p-759564b8.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),r(t)})().then((async r=>(await t(),o([["p-becf2dc3",[[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[2,"border-radius"],marginBottom:[2,"margin-bottom"],marginTop:[2,"margin-top"],marginLeft:[2,"margin-left"],marginRight:[2,"margin-right"],animation:[4],rows:[2],size:[1],color:[1],primaryColor:[1,"primary-color"],secondaryColor:[1,"secondary-color"]},null,{structure:["handleStructureChange"],primaryColor:["updateStyles"],secondaryColor:["updateStyles"]}]]]],r))));
1
+ import{p as r,b as o}from"./p-a551f6fe.js";export{s as setNonce}from"./p-a551f6fe.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),r(a)})().then((async r=>(await a(),o([["p-a483aa6f",[[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[2,"border-radius"],marginBottom:[2,"margin-bottom"],marginTop:[2,"margin-top"],marginLeft:[2,"margin-left"],marginRight:[2,"margin-right"],animation:[4],rows:[2],size:[1],color:[1],primaryColor:[1,"primary-color"],secondaryColor:[1,"secondary-color"]},null,{structure:["handleStructureChange"],primaryColor:["updateStyles"],secondaryColor:["updateStyles"]}]]]],r))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/ui-skeleton",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>(0,console.error)(e,t),s=new Map,r=new Map,i="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],p=[],y=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&a.l?w(v):a.raf(v))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){o(e)}e.length=0},v=()=>{$(d),$(p),(m=d.length>0)&&a.raf(v)},w=e=>f().then(e),b=y(p,!0),S={},g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>E,ok:()=>k,unwrap:()=>M,unwrapErr:()=>P});var k=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return O(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},x=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!g(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},A=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),D={},H=new WeakMap,T=e=>"sc-"+e.v,F=(e,t,n,l)=>{if(n!==l)if(t.toLowerCase(),"class"===t){const t=e.classList,o=N(n),s=N(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else"key"===t||"ref"===t&&l&&l(e)},L=/\s/,N=e=>e?e.split(L):[],R=(e,t)=>{const n=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||S,o=t.u||S;for(const e of U(Object.keys(l)))e in o||F(n,e,l[e],void 0);for(const e of U(Object.keys(o)))F(n,e,l[e],o[e])};function U(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var W=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(o=l.$=u.createElement(l.p),R(null,l),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=W(e,l,r),s&&o.appendChild(s);return o["s-hn"]=C,o},q=(e,t,n,l,o,s)=>{let r,i=e;for(;o<=s;++o)l[o]&&(r=W(null,n,o),r&&(l[o].$=r,B(i,r,t)))},G=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;z(t),e&&e.remove()}}},V=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),_=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h;R(e,t),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],m=t[f],d=l.length-1,p=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==m)m=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--d];else if(V(h,p,o))_(h,p,o),h=t[++i],p=l[++c];else if(V(m,y,o))_(m,y,o),m=t[--f],y=l[--d];else if(V(h,y,o))_(h,y,o),B(e,h.$,m.$.nextSibling),h=t[++i],y=l[--d];else if(V(m,p,o))_(m,p,o),B(e,m.$,h.$),m=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=W(t&&t[c],n,u):(_(r,p,o),t[u]=void 0,s=r.$),p=l[++c]):(s=W(t&&t[c],n,c),p=l[++c]),s&&B(h.$.parentNode,s,h.$)}i>f?q(e,null==l[d+1]?null:l[d+1].$,n,l,c,d):c>d&&G(t,i,f)})(l,o,t,s,n):null!==s?q(l,null,t,s,0,s.length-1):!n&&null!==o&&G(o,0,o.length-1)},z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(z)},B=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),I=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},J=(e,t)=>{if(e.l|=16,!(4&e.l))return I(e,e.j),b((()=>K(e,t)));e.l|=512},K=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return Q(void 0,(()=>Y(e,n,t)))},Q=(e,t)=>X(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),X=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,Y=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k;((e,t)=>{var n;const l=T(t),o=r.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,r=H.get(e=e.head||e);if(r||H.set(e,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const l=null!=(n=a.O)?n:j(u);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(h){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=i),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o])})(e.$hostElement$.getRootNode(),t)})(e);Z(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ee(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},Z=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.C||A(null,null),s=(e=>e&&e.p===D)(t)?t:x(null,null,t);if(C=l.tagName,n&&s.u)for(const e of Object.keys(s.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.u[e]=l[e]);s.p=null,s.l|=4,e.C=s,s.$=o.$=l,_(o,s,n)})(e,t,l)}catch(t){o(t,e.$hostElement$)}return null},ee=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,le(t),ne(n,"componentDidLoad"),e.M(t),l||te()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>J(e,!1))),e.l&=-517},te=()=>{le(u.documentElement),w((()=>(e=>{const t=a.ce("appload",{detail:{namespace:"ui-skeleton"}});return e.dispatchEvent(t),t})(c)))},ne=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){o(e)}},le=e=>e.classList.add("hydrated"),oe=(e,t,l)=>{var s,r;const i=e.prototype;if(t.P||t.A||e.watchers){e.watchers&&!t.A&&(t.A=e.watchers);const c=Object.entries(null!=(s=t.P)?s:{});if(c.map((([e,[s]])=>{(31&s||2&l&&32&s)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).D.get(t))(0,e)},set(l){((e,t,l,s)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.D.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,s.P[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.D.set(t,l),a)){if(s.A&&128&u){const e=s.A[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){o(e,i)}}))}2==(18&u)&&J(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.A)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.A)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,t])=>{const n=t[1]||e;return l.set(n,e),n}))]))}}return e},se=(e,l={})=>{var f;const m=[],d=l.exclude||[],p=c.customElements,y=u.head,$=y.querySelector("meta[charset]"),v=u.createElement("style"),w=[];let b,S=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var i;const c={l:l[0],v:l[1],P:l[2],H:l[3]};4&c.l&&(g=!0),c.P=l[2],c.A=null!=(i=l[4])?i:{};const u=c.v,f=class extends HTMLElement{constructor(e){super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,D:new Map};l.T=new Promise((e=>l.M=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),S?w.push(this):a.jmp((()=>(e=>{if(!(1&a.l)){const t=n(e),l=t.k,i=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.T)&&t.T.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(t,t.j=n);break}}l.P&&Object.entries(l.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.F){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.F;if(!n)return;const l=s.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),o)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.L}" was not found`);l.isProxied||(n.A=l.watchers,oe(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(e){o(e)}t.l&=-9,t.l|=128,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=T(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);h&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const i=t.j,c=()=>J(t,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(e,t,l)}i()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.l)){const e=n(this);(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}))}})()))}componentOnReady(){return n(this).T}};c.F=e[0],d.includes(u)||p.get(u)||(m.push(u),p.define(u,oe(f,c,1)))}))})),m.length>0&&(g&&(v.textContent+=i),v.textContent+=m.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(f=a.O)?f:j(u);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,$?$.nextSibling:y.firstChild)}S=!1,w.length?w.map((e=>e.connectedCallback())):a.jmp((()=>b=setTimeout(te,30)))},re=e=>a.O=e;export{se as b,x as h,f as p,l as r,re as s}
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./p-759564b8.js";const r=class{constructor(e){t(this,e),this.structure=void 0,this.width=void 0,this.height=void 0,this.borderRadius=void 0,this.marginBottom=void 0,this.marginTop=void 0,this.marginLeft=void 0,this.marginRight=void 0,this.animation=!0,this.rows=void 0,this.size=void 0,this.color=void 0,this.primaryColor=void 0,this.secondaryColor=void 0}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}updateStyles(){this.primaryColor&&this.skeletonContainer.style.setProperty("--emw-skeleton-primary-color",this.primaryColor),this.secondaryColor&&this.skeletonContainer.style.setProperty("--emw-skeleton-secondary-color",this.secondaryColor)}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle()}}renderLogo(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Image "+(this.animation?"Skeleton":"")}))}renderTitle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){const t={width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`};return Array.from({length:this.rows>0?this.rows:1}).map(((r,i)=>e("div",{style:t,key:i,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.width}`,height:`${this.height}`,"background-color":`${this.color}`,"border-radius":`${this.borderRadius}px`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{ref:t=>this.skeletonContainer=t},e("div",{style:{width:`${this.size}`,height:`${this.size}`,"background-color":`${this.color}`,"margin-bottom":`${this.marginBottom}px`,"margin-top":`${this.marginTop}px`,"margin-left":`${this.marginLeft}px`,"margin-right":`${this.marginRight}px`},class:"Circle "+(this.animation?"Skeleton":"")}))}componentDidLoad(){this.updateStyles()}render(){return this.handleStructure(this.structure)}static get watchers(){return{structure:["handleStructureChange"],primaryColor:["updateStyles"],secondaryColor:["updateStyles"]}}};r.style=".Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 250px);height:var(--emw-skeleton-image-height, 200px);border-radius:var(--emw-skeleton-image-border-radius, 10px)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";export{r as U}