@everymatrix/general-styling-wrapper 1.56.0 → 1.56.2

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 (25) hide show
  1. package/dist/cjs/general-styling-wrapper.cjs.entry.js +5 -13
  2. package/dist/cjs/general-styling-wrapper.cjs.js +2 -2
  3. package/dist/cjs/{index-bd515e45.js → index-0608126f.js} +107 -273
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +5 -21
  7. package/dist/esm/general-styling-wrapper.entry.js +5 -13
  8. package/dist/esm/general-styling-wrapper.js +3 -3
  9. package/dist/esm/{index-d449ed4b.js → index-5d1b44a7.js} +107 -273
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +1 -1
  12. package/dist/general-styling-wrapper/p-8f5d4d70.js +2 -0
  13. package/dist/general-styling-wrapper/p-cbc56d10.entry.js +1 -0
  14. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +2 -0
  16. package/dist/types/stencil-public-runtime.d.ts +0 -6
  17. package/package.json +1 -1
  18. package/dist/general-styling-wrapper/p-4bf9aa97.js +0 -2
  19. package/dist/general-styling-wrapper/p-fefdf7c8.entry.js +0 -1
  20. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +0 -2
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +0 -2
  22. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/index.d.ts +0 -0
  23. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  24. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  25. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'general-styling-wrapper';
24
- const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, 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: false, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, 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: false, vdomXlink: false, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.19.2 | 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
-
35
- // src/client/client-host-ref.ts
36
34
  var hostRefs = /* @__PURE__ */ new WeakMap();
37
35
  var getHostRef = (ref) => hostRefs.get(ref);
38
- var registerInstance = (lazyInstance, hostRef) => {
39
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
40
- };
36
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
41
37
  var registerHost = (hostElement, cmpMeta) => {
42
38
  const hostRef = {
43
39
  $flags$: 0,
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
50
46
  hostElement["s-p"] = [];
51
47
  hostElement["s-rc"] = [];
52
48
  }
53
- const ref = hostRefs.set(hostElement, hostRef);
54
- return ref;
49
+ return hostRefs.set(hostElement, hostRef);
55
50
  };
56
51
  var isMemberInElement = (elm, memberName) => memberName in elm;
57
52
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
88
83
  /* webpackExclude: /\.system\.entry\.js$/ */
89
84
  /* webpackMode: "lazy" */
90
85
  `./${bundleId}.entry.js${""}`
91
- )); }).then(
92
- (importedModule) => {
93
- {
94
- cmpModules.set(bundleId, importedModule);
95
- }
96
- return importedModule[exportName];
97
- },
98
- (e) => {
99
- consoleError(e, hostRef.$hostElement$);
86
+ )); }).then((importedModule) => {
87
+ {
88
+ cmpModules.set(bundleId, importedModule);
100
89
  }
101
- );
90
+ return importedModule[exportName];
91
+ }, consoleError);
102
92
  };
103
93
 
104
94
  // src/client/client-style.ts
105
95
  var styles = /* @__PURE__ */ new Map();
106
- var HYDRATED_STYLE_ID = "sty-id";
107
96
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
108
97
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
109
98
  var win = typeof window !== "undefined" ? window : {};
@@ -162,6 +151,9 @@ var flush = () => {
162
151
  };
163
152
  var nextTick = (cb) => promiseResolve().then(cb);
164
153
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
154
+
155
+ // src/utils/constants.ts
156
+ var EMPTY_OBJ = {};
165
157
  var isComplexType = (o) => {
166
158
  o = typeof o;
167
159
  return o === "object" || o === "function";
@@ -221,63 +213,6 @@ var unwrapErr = (result) => {
221
213
  throw result.value;
222
214
  }
223
215
  };
224
- var updateFallbackSlotVisibility = (elm) => {
225
- const childNodes = elm.__childNodes || elm.childNodes;
226
- if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
227
- getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
228
- var _a;
229
- if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
230
- if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
231
- slotNode.hidden = true;
232
- } else {
233
- slotNode.hidden = false;
234
- }
235
- }
236
- });
237
- }
238
- for (const childNode of childNodes) {
239
- if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
240
- updateFallbackSlotVisibility(childNode);
241
- }
242
- }
243
- };
244
- function getHostSlotNodes(childNodes, hostName, slotName) {
245
- let i2 = 0;
246
- let slottedNodes = [];
247
- let childNode;
248
- for (; i2 < childNodes.length; i2++) {
249
- childNode = childNodes[i2];
250
- if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
251
- slottedNodes.push(childNode);
252
- if (typeof slotName !== "undefined") return slottedNodes;
253
- }
254
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
255
- }
256
- return slottedNodes;
257
- }
258
- var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
259
- const childNodes = [];
260
- if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
261
- while ((node = node.nextSibling) && node["s-sn"] === slotName) {
262
- childNodes.push(node);
263
- }
264
- return childNodes;
265
- };
266
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
267
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
268
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
269
- return true;
270
- }
271
- if (nodeToRelocate.getAttribute("slot") === slotName) {
272
- return true;
273
- }
274
- return false;
275
- }
276
- if (nodeToRelocate["s-sn"] === slotName) {
277
- return true;
278
- }
279
- return slotName === "";
280
- };
281
216
  var createTime = (fnName, tagName = "") => {
282
217
  {
283
218
  return () => {
@@ -411,40 +346,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
411
346
  }
412
347
  if (!appliedStyles.has(scopeId2)) {
413
348
  {
414
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
349
+ styleElm = doc.createElement("style");
415
350
  styleElm.innerHTML = style;
416
351
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
417
352
  if (nonce != null) {
418
353
  styleElm.setAttribute("nonce", nonce);
419
354
  }
420
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
421
- if (styleContainerNode.nodeName === "HEAD") {
422
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
423
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
424
- styleContainerNode.insertBefore(
425
- styleElm,
426
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
427
- );
428
- } else if ("host" in styleContainerNode) {
429
- if (supportsConstructableStylesheets) {
430
- const stylesheet = new CSSStyleSheet();
431
- stylesheet.replaceSync(style);
432
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
433
- } else {
434
- const existingStyleContainer = styleContainerNode.querySelector("style");
435
- if (existingStyleContainer) {
436
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
437
- } else {
438
- styleContainerNode.prepend(styleElm);
439
- }
440
- }
441
- } else {
442
- styleContainerNode.append(styleElm);
443
- }
444
- }
445
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
446
- styleContainerNode.insertBefore(styleElm, null);
447
- }
355
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
448
356
  }
449
357
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
450
358
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -469,18 +377,16 @@ var attachStyles = (hostRef) => {
469
377
  endAttachStyles();
470
378
  };
471
379
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
472
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
380
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
473
381
  if (oldValue !== newValue) {
474
382
  let isProp = isMemberInElement(elm, memberName);
475
383
  memberName.toLowerCase();
476
384
  if (memberName === "class") {
477
385
  const classList = elm.classList;
478
386
  const oldClasses = parseClassList(oldValue);
479
- let newClasses = parseClassList(newValue);
480
- {
481
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
482
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
483
- }
387
+ const newClasses = parseClassList(newValue);
388
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
389
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
484
390
  } else if (memberName === "key") ; else {
485
391
  const isComplex = isComplexType(newValue);
486
392
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -490,13 +396,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
490
396
  if (memberName === "list") {
491
397
  isProp = false;
492
398
  } else if (oldValue == null || elm[memberName] != n) {
493
- if (typeof elm.__lookupSetter__(memberName) === "function") {
494
- elm[memberName] = n;
495
- } else {
496
- elm.setAttribute(memberName, n);
497
- }
399
+ elm[memberName] = n;
498
400
  }
499
- } else if (elm[memberName] !== newValue) {
401
+ } else {
500
402
  elm[memberName] = newValue;
501
403
  }
502
404
  } catch (e) {
@@ -518,42 +420,22 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
518
420
  }
519
421
  };
520
422
  var parseClassListRegex = /\s/;
521
- var parseClassList = (value) => {
522
- if (typeof value === "object" && value && "baseVal" in value) {
523
- value = value.baseVal;
524
- }
525
- if (!value || typeof value !== "string") {
526
- return [];
527
- }
528
- return value.split(parseClassListRegex);
529
- };
423
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
530
424
 
531
425
  // src/runtime/vdom/update-element.ts
532
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
426
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
533
427
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
534
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
535
- const newVnodeAttrs = newVnode.$attrs$ || {};
428
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
429
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
536
430
  {
537
431
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
538
432
  if (!(memberName in newVnodeAttrs)) {
539
- setAccessor(
540
- elm,
541
- memberName,
542
- oldVnodeAttrs[memberName],
543
- void 0,
544
- isSvgMode2,
545
- newVnode.$flags$);
433
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
546
434
  }
547
435
  }
548
436
  }
549
437
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
550
- setAccessor(
551
- elm,
552
- memberName,
553
- oldVnodeAttrs[memberName],
554
- newVnodeAttrs[memberName],
555
- isSvgMode2,
556
- newVnode.$flags$);
438
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
557
439
  }
558
440
  };
559
441
  function sortedAttrNames(attrNames) {
@@ -571,7 +453,7 @@ var useNativeShadowDom = false;
571
453
  var checkSlotFallbackVisibility = false;
572
454
  var checkSlotRelocate = false;
573
455
  var isSvgMode = false;
574
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
456
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
575
457
  var _a;
576
458
  const newVNode2 = newParentVNode.$children$[childIndex];
577
459
  let i2 = 0;
@@ -630,7 +512,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
630
512
  };
631
513
  var putBackInOriginalLocation = (parentElm, recursive) => {
632
514
  plt.$flags$ |= 1 /* isTmpDisconnected */;
633
- const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
515
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
634
516
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
635
517
  let node = parentElm;
636
518
  while (node = node.nextSibling) {
@@ -642,7 +524,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
642
524
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
643
525
  const childNode = oldSlotChildNodes[i2];
644
526
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
645
- insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
527
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
646
528
  childNode["s-ol"].remove();
647
529
  childNode["s-ol"] = void 0;
648
530
  childNode["s-sh"] = void 0;
@@ -758,11 +640,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
758
640
  }
759
641
  if (node) {
760
642
  {
761
- insertBefore(
762
- referenceNode(oldStartVnode.$elm$).parentNode,
763
- node,
764
- referenceNode(oldStartVnode.$elm$)
765
- );
643
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
766
644
  }
767
645
  }
768
646
  }
@@ -788,14 +666,14 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
788
666
  if (!isInitialRender) {
789
667
  return leftVNode.$key$ === rightVNode.$key$;
790
668
  }
791
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
792
- leftVNode.$key$ = rightVNode.$key$;
793
- }
794
669
  return true;
795
670
  }
796
671
  return false;
797
672
  };
798
- var referenceNode = (node) => node && node["s-ol"] || node;
673
+ var referenceNode = (node) => {
674
+ return node && node["s-ol"] || node;
675
+ };
676
+ var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
799
677
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
800
678
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
801
679
  const oldChildren = oldVNode.$children$;
@@ -811,23 +689,46 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
811
689
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
812
690
  } else if (newChildren !== null) {
813
691
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
814
- } else if (
815
- // don't do this on initial render as it can cause non-hydrated content to be removed
816
- !isInitialRender && BUILD.updatable && oldChildren !== null
817
- ) {
692
+ } else if (oldChildren !== null) {
818
693
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
819
694
  }
820
695
  }
821
696
  };
697
+ var updateFallbackSlotVisibility = (elm) => {
698
+ const childNodes = elm.childNodes;
699
+ for (const childNode of childNodes) {
700
+ if (childNode.nodeType === 1 /* ElementNode */) {
701
+ if (childNode["s-sr"]) {
702
+ const slotName = childNode["s-sn"];
703
+ childNode.hidden = false;
704
+ for (const siblingNode of childNodes) {
705
+ if (siblingNode !== childNode) {
706
+ if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
707
+ if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
708
+ childNode.hidden = true;
709
+ break;
710
+ }
711
+ } else {
712
+ if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
713
+ childNode.hidden = true;
714
+ break;
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ updateFallbackSlotVisibility(childNode);
721
+ }
722
+ }
723
+ };
822
724
  var relocateNodes = [];
823
725
  var markSlotContentForRelocation = (elm) => {
824
726
  let node;
825
727
  let hostContentNodes;
826
728
  let j;
827
- const children = elm.__childNodes || elm.childNodes;
828
- for (const childNode of children) {
729
+ for (const childNode of elm.childNodes) {
829
730
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
830
- hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
731
+ hostContentNodes = node.parentNode.childNodes;
831
732
  const slotName = childNode["s-sn"];
832
733
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
833
734
  node = hostContentNodes[j];
@@ -869,10 +770,24 @@ var markSlotContentForRelocation = (elm) => {
869
770
  }
870
771
  }
871
772
  };
872
- var insertBefore = (parent, newNode, reference) => {
873
- {
874
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
773
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
774
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
775
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
776
+ return true;
777
+ }
778
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
779
+ return true;
780
+ }
781
+ return false;
782
+ }
783
+ if (nodeToRelocate["s-sn"] === slotName) {
784
+ return true;
875
785
  }
786
+ return slotName === "";
787
+ };
788
+ var insertBefore = (parent, newNode, reference) => {
789
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
790
+ return inserted;
876
791
  };
877
792
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
878
793
  var _a, _b, _c, _d;
@@ -891,7 +806,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
891
806
  rootVnode.$flags$ |= 4 /* isHost */;
892
807
  hostRef.$vnode$ = rootVnode;
893
808
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
894
- useNativeShadowDom = supportsShadow ;
809
+ useNativeShadowDom = supportsShadow ;
895
810
  {
896
811
  contentRef = hostElm["s-cr"];
897
812
  checkSlotFallbackVisibility = false;
@@ -919,7 +834,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
919
834
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
920
835
  while (orgLocationNode) {
921
836
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
922
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
837
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
923
838
  refNode = refNode.nextSibling;
924
839
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
925
840
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -932,15 +847,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
932
847
  orgLocationNode = orgLocationNode.previousSibling;
933
848
  }
934
849
  }
935
- const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
936
- const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
937
- if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
850
+ if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
938
851
  if (nodeToRelocate !== insertBeforeNode) {
939
852
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
940
853
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
941
854
  }
942
855
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
943
- if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
856
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
944
857
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
945
858
  }
946
859
  }
@@ -968,14 +881,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
968
881
  // src/runtime/update-component.ts
969
882
  var attachToAncestor = (hostRef, ancestorComponent) => {
970
883
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
971
- const index = ancestorComponent["s-p"].push(
972
- new Promise(
973
- (r) => hostRef.$onRenderResolve$ = () => {
974
- ancestorComponent["s-p"].splice(index - 1, 1);
975
- r();
976
- }
977
- )
978
- );
884
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
979
885
  }
980
886
  };
981
887
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1002,7 +908,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1002
908
  let maybePromise;
1003
909
  if (isInitialLoad) {
1004
910
  {
1005
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
911
+ maybePromise = safeCall(instance, "componentWillLoad");
1006
912
  }
1007
913
  }
1008
914
  endSchedule();
@@ -1071,7 +977,7 @@ var postUpdateComponent = (hostRef) => {
1071
977
  const instance = hostRef.$lazyInstance$ ;
1072
978
  const ancestorComponent = hostRef.$ancestorComponent$;
1073
979
  {
1074
- safeCall(instance, "componentDidRender", void 0, elm);
980
+ safeCall(instance, "componentDidRender");
1075
981
  }
1076
982
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1077
983
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1100,14 +1006,17 @@ var postUpdateComponent = (hostRef) => {
1100
1006
  }
1101
1007
  };
1102
1008
  var appDidLoad = (who) => {
1009
+ {
1010
+ addHydratedFlag(doc.documentElement);
1011
+ }
1103
1012
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1104
1013
  };
1105
- var safeCall = (instance, method, arg, elm) => {
1014
+ var safeCall = (instance, method, arg) => {
1106
1015
  if (instance && instance[method]) {
1107
1016
  try {
1108
1017
  return instance[method](arg);
1109
1018
  } catch (e) {
1110
- consoleError(e, elm);
1019
+ consoleError(e);
1111
1020
  }
1112
1021
  }
1113
1022
  return void 0;
@@ -1150,68 +1059,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1150
1059
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1151
1060
  members.map(([memberName, [memberFlags]]) => {
1152
1061
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1153
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1154
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1155
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1156
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1157
- Object.defineProperty(prototype, memberName, {
1158
- get() {
1159
- {
1160
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1161
- return getValue(this, memberName);
1162
- }
1163
- const ref = getHostRef(this);
1164
- const instance = ref ? ref.$lazyInstance$ : prototype;
1165
- if (!instance) return;
1166
- return instance[memberName];
1167
- }
1168
- },
1169
- configurable: true,
1170
- enumerable: true
1171
- });
1172
- }
1173
1062
  Object.defineProperty(prototype, memberName, {
1063
+ get() {
1064
+ return getValue(this, memberName);
1065
+ },
1174
1066
  set(newValue) {
1175
- const ref = getHostRef(this);
1176
- if (origSetter) {
1177
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1178
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1179
- newValue = ref.$instanceValues$.get(memberName);
1180
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1181
- ref.$instanceValues$.set(memberName, currentValue);
1182
- }
1183
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1184
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1185
- setValue(this, memberName, newValue, cmpMeta);
1186
- return;
1187
- }
1188
- {
1189
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1190
- setValue(this, memberName, newValue, cmpMeta);
1191
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1192
- ref.$onReadyPromise$.then(() => {
1193
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1194
- ref.$lazyInstance$[memberName] = newValue;
1195
- }
1196
- });
1197
- }
1198
- return;
1199
- }
1200
- const setterSetVal = () => {
1201
- const currentValue = ref.$lazyInstance$[memberName];
1202
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1203
- ref.$instanceValues$.set(memberName, currentValue);
1204
- }
1205
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1206
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1207
- };
1208
- if (ref.$lazyInstance$) {
1209
- setterSetVal();
1210
- } else {
1211
- ref.$onReadyPromise$.then(() => setterSetVal());
1212
- }
1213
- }
1214
- }
1067
+ setValue(this, memberName, newValue, cmpMeta);
1068
+ },
1069
+ configurable: true,
1070
+ enumerable: true
1215
1071
  });
1216
1072
  }
1217
1073
  });
@@ -1221,11 +1077,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1221
1077
  plt.jmp(() => {
1222
1078
  var _a2;
1223
1079
  const propName = attrNameToPropName.get(attrName);
1224
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1080
+ if (this.hasOwnProperty(propName)) {
1225
1081
  newValue = this[propName];
1226
1082
  delete this[propName];
1227
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1228
- this[propName] == newValue) {
1083
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
1229
1084
  return;
1230
1085
  } else if (propName == null) {
1231
1086
  const hostRef = getHostRef(this);
@@ -1241,11 +1096,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1241
1096
  }
1242
1097
  return;
1243
1098
  }
1244
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1245
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1246
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1247
- this[propName] = newValue;
1248
- }
1099
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1249
1100
  });
1250
1101
  };
1251
1102
  Cstr.observedAttributes = Array.from(
@@ -1270,7 +1121,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1270
1121
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1271
1122
  const bundleId = cmpMeta.$lazyBundleId$;
1272
1123
  if (bundleId) {
1273
- const CstrImport = loadModule(cmpMeta, hostRef);
1124
+ const CstrImport = loadModule(cmpMeta);
1274
1125
  if (CstrImport && "then" in CstrImport) {
1275
1126
  const endLoad = uniqueTime();
1276
1127
  Cstr = await CstrImport;
@@ -1292,7 +1143,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1292
1143
  try {
1293
1144
  new Cstr(hostRef);
1294
1145
  } catch (e) {
1295
- consoleError(e, elm);
1146
+ consoleError(e);
1296
1147
  }
1297
1148
  {
1298
1149
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1324,7 +1175,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1324
1175
  schedule();
1325
1176
  }
1326
1177
  };
1327
- var fireConnectedCallback = (instance, elm) => {
1178
+ var fireConnectedCallback = (instance) => {
1328
1179
  };
1329
1180
 
1330
1181
  // src/runtime/connected-callback.ts
@@ -1377,7 +1228,7 @@ var setContentReference = (elm) => {
1377
1228
  contentRefElm["s-cn"] = true;
1378
1229
  insertBefore(elm, contentRefElm, elm.firstChild);
1379
1230
  };
1380
- var disconnectInstance = (instance, elm) => {
1231
+ var disconnectInstance = (instance) => {
1381
1232
  };
1382
1233
  var disconnectedCallback = async (elm) => {
1383
1234
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1386,12 +1237,6 @@ var disconnectedCallback = async (elm) => {
1386
1237
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1387
1238
  }
1388
1239
  }
1389
- if (rootAppliedStyles.has(elm)) {
1390
- rootAppliedStyles.delete(elm);
1391
- }
1392
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1393
- rootAppliedStyles.delete(elm.shadowRoot);
1394
- }
1395
1240
  };
1396
1241
 
1397
1242
  // src/runtime/bootstrap-lazy.ts
@@ -1450,17 +1295,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1450
1295
  }
1451
1296
  disconnectedCallback() {
1452
1297
  plt.jmp(() => disconnectedCallback(this));
1453
- plt.raf(() => {
1454
- var _a3;
1455
- const hostRef = getHostRef(this);
1456
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1457
- if (i2 > -1) {
1458
- deferredConnectedCallbacks.splice(i2, 1);
1459
- }
1460
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1461
- delete hostRef.$vnode$.$elm$;
1462
- }
1463
- });
1464
1298
  }
1465
1299
  componentOnReady() {
1466
1300
  return getHostRef(this).$onReadyPromise$;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bd515e45.js');
5
+ const index = require('./index-0608126f.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {