proto-ikons-wc 0.0.154 → 0.0.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7aaad24e.js');
5
+ const index = require('./index-67cc2227.js');
6
6
 
7
7
  const acuraIkonCss = "";
8
8
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -24,13 +24,121 @@ const NAMESPACE = 'proto-ikons-wc';
24
24
  const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, 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: false, 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: true, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.18.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.19.0 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+ var hostRefs = /* @__PURE__ */ new WeakMap();
35
+ var getHostRef = (ref) => hostRefs.get(ref);
36
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
37
+ var registerHost = (hostElement, cmpMeta) => {
38
+ const hostRef = {
39
+ $flags$: 0,
40
+ $hostElement$: hostElement,
41
+ $cmpMeta$: cmpMeta,
42
+ $instanceValues$: /* @__PURE__ */ new Map()
43
+ };
44
+ {
45
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
46
+ hostElement["s-p"] = [];
47
+ hostElement["s-rc"] = [];
48
+ }
49
+ return hostRefs.set(hostElement, hostRef);
50
+ };
51
+ var isMemberInElement = (elm, memberName) => memberName in elm;
52
+ var consoleError = (e, el) => (0, console.error)(e, el);
53
+
54
+ // src/client/client-load-module.ts
55
+ var cmpModules = /* @__PURE__ */ new Map();
56
+ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
57
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
58
+ const bundleId = cmpMeta.$lazyBundleId$;
59
+ if (!bundleId) {
60
+ return void 0;
61
+ }
62
+ const module = cmpModules.get(bundleId) ;
63
+ if (module) {
64
+ return module[exportName];
65
+ }
66
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
67
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
68
+ /* @vite-ignore */
69
+ /* webpackInclude: /\.entry\.js$/ */
70
+ /* webpackExclude: /\.system\.entry\.js$/ */
71
+ /* webpackMode: "lazy" */
72
+ `./${bundleId}.entry.js${""}`
73
+ )); }).then((importedModule) => {
74
+ {
75
+ cmpModules.set(bundleId, importedModule);
76
+ }
77
+ return importedModule[exportName];
78
+ }, consoleError);
79
+ };
80
+
81
+ // src/client/client-style.ts
82
+ var styles = /* @__PURE__ */ new Map();
83
+ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
84
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
85
+ var XLINK_NS = "http://www.w3.org/1999/xlink";
86
+ var win = typeof window !== "undefined" ? window : {};
87
+ var doc = win.document || { head: {} };
88
+ var plt = {
89
+ $flags$: 0,
90
+ $resourcesUrl$: "",
91
+ jmp: (h2) => h2(),
92
+ raf: (h2) => requestAnimationFrame(h2),
93
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
94
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
95
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
96
+ };
97
+ var supportsShadow = BUILD.shadowDom;
98
+ var promiseResolve = (v) => Promise.resolve(v);
99
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
100
+ try {
101
+ new CSSStyleSheet();
102
+ return typeof new CSSStyleSheet().replaceSync === "function";
103
+ } catch (e) {
104
+ }
105
+ return false;
106
+ })() ;
107
+ var queuePending = false;
108
+ var queueDomReads = [];
109
+ var queueDomWrites = [];
110
+ var queueTask = (queue, write) => (cb) => {
111
+ queue.push(cb);
112
+ if (!queuePending) {
113
+ queuePending = true;
114
+ if (write && plt.$flags$ & 4 /* queueSync */) {
115
+ nextTick(flush);
116
+ } else {
117
+ plt.raf(flush);
118
+ }
119
+ }
120
+ };
121
+ var consume = (queue) => {
122
+ for (let i2 = 0; i2 < queue.length; i2++) {
123
+ try {
124
+ queue[i2](performance.now());
125
+ } catch (e) {
126
+ consoleError(e);
127
+ }
128
+ }
129
+ queue.length = 0;
130
+ };
131
+ var flush = () => {
132
+ consume(queueDomReads);
133
+ {
134
+ consume(queueDomWrites);
135
+ if (queuePending = queueDomReads.length > 0) {
136
+ plt.raf(flush);
137
+ }
138
+ }
139
+ };
140
+ var nextTick = (cb) => promiseResolve().then(cb);
141
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
34
142
 
35
143
  // src/utils/constants.ts
36
144
  var EMPTY_OBJ = {};
@@ -109,9 +217,6 @@ var uniqueTime = (key, measureText) => {
109
217
  };
110
218
  }
111
219
  };
112
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
113
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
114
- var XLINK_NS = "http://www.w3.org/1999/xlink";
115
220
  var h = (nodeName, vnodeData, ...children) => {
116
221
  let child = null;
117
222
  let key = null;
@@ -213,12 +318,13 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
213
318
  };
214
319
  var addStyle = (styleContainerNode, cmpMeta, mode) => {
215
320
  var _a;
321
+ const styleContainerDocument = styleContainerNode;
216
322
  const scopeId2 = getScopeId(cmpMeta);
217
323
  const style = styles.get(scopeId2);
218
324
  styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
219
325
  if (style) {
220
326
  if (typeof style === "string") {
221
- styleContainerNode = styleContainerNode.head || styleContainerNode;
327
+ styleContainerNode = styleContainerDocument.head || styleContainerNode;
222
328
  let appliedStyles = rootAppliedStyles.get(styleContainerNode);
223
329
  let styleElm;
224
330
  if (!appliedStyles) {
@@ -241,8 +347,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
241
347
  appliedStyles.add(scopeId2);
242
348
  }
243
349
  }
244
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
245
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
350
+ } else if (!styleContainerDocument.adoptedStyleSheets.includes(style)) {
351
+ styleContainerDocument.adoptedStyleSheets = [...styleContainerDocument.adoptedStyleSheets, style];
246
352
  }
247
353
  }
248
354
  return scopeId2;
@@ -339,6 +445,7 @@ function sortedAttrNames(attrNames) {
339
445
  );
340
446
  }
341
447
  var hostTagName;
448
+ var useNativeShadowDom = false;
342
449
  var isSvgMode = false;
343
450
  var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
344
451
  const newVNode2 = newParentVNode.$children$[childIndex];
@@ -353,7 +460,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
353
460
  }
354
461
  elm = newVNode2.$elm$ = doc.createElementNS(
355
462
  isSvgMode ? SVG_NS : HTML_NS,
356
- newVNode2.$tag$
463
+ !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
357
464
  ) ;
358
465
  if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
359
466
  isSvgMode = false;
@@ -549,6 +656,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
549
656
  rootVnode.$flags$ |= 4 /* isHost */;
550
657
  hostRef.$vnode$ = rootVnode;
551
658
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
659
+ useNativeShadowDom = supportsShadow ;
552
660
  patch(oldVNode, rootVnode, isInitialLoad);
553
661
  };
554
662
 
@@ -583,7 +691,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
583
691
  endSchedule();
584
692
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
585
693
  };
586
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
694
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
695
+ console.error(err2);
696
+ fn();
697
+ }) : fn();
587
698
  var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
588
699
  var updateComponent = async (hostRef, instance, isInitialLoad) => {
589
700
  var _a;
@@ -705,10 +816,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
705
816
 
706
817
  // src/runtime/proxy-component.ts
707
818
  var proxyComponent = (Cstr, cmpMeta, flags) => {
708
- var _a;
819
+ var _a, _b;
709
820
  const prototype = Cstr.prototype;
710
- if (cmpMeta.$members$) {
711
- const members = Object.entries(cmpMeta.$members$);
821
+ if (cmpMeta.$members$ || BUILD.watchCallback ) {
822
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
712
823
  members.map(([memberName, [memberFlags]]) => {
713
824
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
714
825
  Object.defineProperty(prototype, memberName, {
@@ -753,7 +864,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
753
864
  };
754
865
  Cstr.observedAttributes = Array.from(
755
866
  /* @__PURE__ */ new Set([
756
- ...Object.keys((_a = cmpMeta.$watchers$) != null ? _a : {}),
867
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
757
868
  ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
758
869
  const attrName = m[1] || propName;
759
870
  attrNameToPropName.set(attrName, propName);
@@ -807,7 +918,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
807
918
  customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
808
919
  }
809
920
  if (Cstr && Cstr.style) {
810
- let style = Cstr.style;
921
+ let style;
922
+ if (typeof Cstr.style === "string") {
923
+ style = Cstr.style;
924
+ }
811
925
  const scopeId2 = getScopeId(cmpMeta);
812
926
  if (!styles.has(scopeId2)) {
813
927
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
@@ -910,10 +1024,15 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
910
1024
  // StencilLazyHost
911
1025
  constructor(self) {
912
1026
  super(self);
1027
+ this.hasRegisteredEventListeners = false;
913
1028
  self = this;
914
1029
  registerHost(self, cmpMeta);
915
1030
  }
916
1031
  connectedCallback() {
1032
+ getHostRef(this);
1033
+ if (!this.hasRegisteredEventListeners) {
1034
+ this.hasRegisteredEventListeners = true;
1035
+ }
917
1036
  if (appLoadFallback) {
918
1037
  clearTimeout(appLoadFallback);
919
1038
  appLoadFallback = null;
@@ -946,7 +1065,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
946
1065
  dataStyles.textContent += SLOT_FB_CSS;
947
1066
  }
948
1067
  {
949
- dataStyles.textContent += cmpTags + HYDRATED_CSS;
1068
+ dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
950
1069
  }
951
1070
  if (dataStyles.innerHTML.length) {
952
1071
  dataStyles.setAttribute("data-styles", "");
@@ -971,112 +1090,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
971
1090
  // src/runtime/nonce.ts
972
1091
  var setNonce = (nonce) => plt.$nonce$ = nonce;
973
1092
 
974
- // src/client/client-host-ref.ts
975
- var hostRefs = /* @__PURE__ */ new WeakMap();
976
- var getHostRef = (ref) => hostRefs.get(ref);
977
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
978
- var registerHost = (hostElement, cmpMeta) => {
979
- const hostRef = {
980
- $flags$: 0,
981
- $hostElement$: hostElement,
982
- $cmpMeta$: cmpMeta,
983
- $instanceValues$: /* @__PURE__ */ new Map()
984
- };
985
- {
986
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
987
- hostElement["s-p"] = [];
988
- hostElement["s-rc"] = [];
989
- }
990
- return hostRefs.set(hostElement, hostRef);
991
- };
992
- var isMemberInElement = (elm, memberName) => memberName in elm;
993
- var consoleError = (e, el) => (0, console.error)(e, el);
994
-
995
- // src/client/client-load-module.ts
996
- var cmpModules = /* @__PURE__ */ new Map();
997
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
998
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
999
- const bundleId = cmpMeta.$lazyBundleId$;
1000
- if (!bundleId) {
1001
- return void 0;
1002
- }
1003
- const module = cmpModules.get(bundleId) ;
1004
- if (module) {
1005
- return module[exportName];
1006
- }
1007
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1008
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1009
- /* @vite-ignore */
1010
- /* webpackInclude: /\.entry\.js$/ */
1011
- /* webpackExclude: /\.system\.entry\.js$/ */
1012
- /* webpackMode: "lazy" */
1013
- `./${bundleId}.entry.js${""}`
1014
- )); }).then((importedModule) => {
1015
- {
1016
- cmpModules.set(bundleId, importedModule);
1017
- }
1018
- return importedModule[exportName];
1019
- }, consoleError);
1020
- };
1021
-
1022
- // src/client/client-style.ts
1023
- var styles = /* @__PURE__ */ new Map();
1024
- var win = typeof window !== "undefined" ? window : {};
1025
- var doc = win.document || { head: {} };
1026
- var plt = {
1027
- $flags$: 0,
1028
- $resourcesUrl$: "",
1029
- jmp: (h2) => h2(),
1030
- raf: (h2) => requestAnimationFrame(h2),
1031
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1032
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1033
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
1034
- };
1035
- var promiseResolve = (v) => Promise.resolve(v);
1036
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
1037
- try {
1038
- new CSSStyleSheet();
1039
- return typeof new CSSStyleSheet().replaceSync === "function";
1040
- } catch (e) {
1041
- }
1042
- return false;
1043
- })() ;
1044
- var queuePending = false;
1045
- var queueDomReads = [];
1046
- var queueDomWrites = [];
1047
- var queueTask = (queue, write) => (cb) => {
1048
- queue.push(cb);
1049
- if (!queuePending) {
1050
- queuePending = true;
1051
- if (write && plt.$flags$ & 4 /* queueSync */) {
1052
- nextTick(flush);
1053
- } else {
1054
- plt.raf(flush);
1055
- }
1056
- }
1057
- };
1058
- var consume = (queue) => {
1059
- for (let i2 = 0; i2 < queue.length; i2++) {
1060
- try {
1061
- queue[i2](performance.now());
1062
- } catch (e) {
1063
- consoleError(e);
1064
- }
1065
- }
1066
- queue.length = 0;
1067
- };
1068
- var flush = () => {
1069
- consume(queueDomReads);
1070
- {
1071
- consume(queueDomWrites);
1072
- if (queuePending = queueDomReads.length > 0) {
1073
- plt.raf(flush);
1074
- }
1075
- }
1076
- };
1077
- var nextTick = (cb) => promiseResolve().then(cb);
1078
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
1079
-
1080
1093
  exports.bootstrapLazy = bootstrapLazy;
1081
1094
  exports.h = h;
1082
1095
  exports.promiseResolve = promiseResolve;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7aaad24e.js');
5
+ const index = require('./index-67cc2227.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7aaad24e.js');
5
+ const index = require('./index-67cc2227.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.18.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-ikons-wc.cjs.js', document.baseURI).href));
@@ -122,7 +122,7 @@
122
122
  ],
123
123
  "compiler": {
124
124
  "name": "@stencil/core",
125
- "version": "4.18.3",
125
+ "version": "4.19.0",
126
126
  "typescriptVersion": "5.4.5"
127
127
  },
128
128
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-d0e98f9d.js';
1
+ import { r as registerInstance, h } from './index-d9e22cf5.js';
2
2
 
3
3
  const acuraIkonCss = "";
4
4
  const AcuraIkonStyle0 = acuraIkonCss;