@everymatrix/general-tutorial-slider 1.56.0 → 1.56.3

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-tutorial-slider.cjs.entry.js +16 -50
  2. package/dist/cjs/general-tutorial-slider.cjs.js +2 -2
  3. package/dist/cjs/{index-bfd21506.js → index-7f840d12.js} +77 -214
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.js +15 -77
  7. package/dist/esm/general-tutorial-slider.entry.js +16 -50
  8. package/dist/esm/general-tutorial-slider.js +3 -3
  9. package/dist/esm/{index-b8731ee9.js → index-37276b41.js} +77 -214
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/general-tutorial-slider/general-tutorial-slider.esm.js +1 -1
  12. package/dist/general-tutorial-slider/p-2ac9a6c7.entry.js +1 -0
  13. package/dist/general-tutorial-slider/p-df9e22a7.js +2 -0
  14. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/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-tutorial-slider/p-d3024419.entry.js +0 -1
  19. package/dist/general-tutorial-slider/p-e2d02089.js +0 -2
  20. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/stencil.config.d.ts +0 -2
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/stencil.config.dev.d.ts +0 -2
  22. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-tutorial-slider/.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-tutorial-slider/.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-tutorial-slider/.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-tutorial-slider/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bfd21506.js');
5
+ const index = require('./index-7f840d12.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -147,71 +147,37 @@ const GeneralTutorialSliderStyle0 = generalTutorialSliderCss;
147
147
  const GeneralTutorialSlider = class {
148
148
  constructor(hostRef) {
149
149
  index.registerInstance(this, hostRef);
150
- /**
151
- * Client custom styling via inline style
152
- */
150
+ this.userAgent = window.navigator.userAgent;
151
+ this.isMobile = isMobile(this.userAgent);
152
+ this.allElementsWidth = 0;
153
+ this.xDown = null;
154
+ this.yDown = null;
155
+ this.resizeHandler = () => {
156
+ this.recalculateItemsPerPage();
157
+ };
158
+ this.orientationChangeHandler = () => {
159
+ setTimeout(() => {
160
+ this.recalculateItemsPerPage();
161
+ }, 10);
162
+ };
163
+ this.mbSource = undefined;
153
164
  this.clientStyling = '';
154
- /**
155
- * Client custom styling via url
156
- */
157
165
  this.clientStylingUrl = '';
158
- /**
159
- * Language of the widget
160
- */
161
166
  this.language = 'en';
162
- /**
163
- * User roles
164
- */
167
+ this.cmsEndpoint = undefined;
165
168
  this.userRoles = 'everyone';
166
- /**
167
- * CMS Endpoint stage
168
- */
169
169
  this.cmsEnv = 'stage';
170
- /**
171
- * Show slider dots
172
- */
173
170
  this.showSliderDots = true;
174
- /**
175
- * Show slider navigate arrows
176
- */
177
171
  this.showSliderArrows = true;
178
- /**
179
- * Show slider navigate arrows on mobile
180
- */
181
172
  this.showSliderArrowsMobile = false;
182
- /**
183
- * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
184
- */
185
173
  this.enableAutoScroll = false;
186
- /**
187
- * Set interval period for slider
188
- */
189
174
  this.intervalPeriod = 5000;
190
- /**
191
- * Set the number of slides you wish to display.
192
- */
193
175
  this.scrollItems = 1;
194
- /**
195
- * Set the number of slides you wish to display.
196
- */
197
176
  this.itemsPerPage = 1;
198
177
  this.hasErrors = false;
199
178
  this.isLoading = true;
200
179
  this.activeIndex = 0;
201
180
  this.tutorialElementWidth = 0;
202
- this.userAgent = window.navigator.userAgent;
203
- this.isMobile = isMobile(this.userAgent);
204
- this.allElementsWidth = 0;
205
- this.xDown = null;
206
- this.yDown = null;
207
- this.resizeHandler = () => {
208
- this.recalculateItemsPerPage();
209
- };
210
- this.orientationChangeHandler = () => {
211
- setTimeout(() => {
212
- this.recalculateItemsPerPage();
213
- }, 10);
214
- };
215
181
  }
216
182
  watchEndpoint(newValue, oldValue) {
217
183
  if (newValue && newValue != oldValue && this.cmsEndpoint) {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bfd21506.js');
5
+ const index = require('./index-7f840d12.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | 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('general-tutorial-slider.cjs.js', document.baseURI).href));
@@ -21,27 +21,19 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'general-tutorial-slider';
24
- const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
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/utils/constants.ts
36
- var SVG_NS = "http://www.w3.org/2000/svg";
37
- var HTML_NS = "http://www.w3.org/1999/xhtml";
38
-
39
- // src/client/client-host-ref.ts
40
34
  var hostRefs = /* @__PURE__ */ new WeakMap();
41
35
  var getHostRef = (ref) => hostRefs.get(ref);
42
- var registerInstance = (lazyInstance, hostRef) => {
43
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
44
- };
36
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
45
37
  var registerHost = (hostElement, cmpMeta) => {
46
38
  const hostRef = {
47
39
  $flags$: 0,
@@ -54,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
54
46
  hostElement["s-p"] = [];
55
47
  hostElement["s-rc"] = [];
56
48
  }
57
- const ref = hostRefs.set(hostElement, hostRef);
58
- return ref;
49
+ return hostRefs.set(hostElement, hostRef);
59
50
  };
60
51
  var isMemberInElement = (elm, memberName) => memberName in elm;
61
52
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -92,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
92
83
  /* webpackExclude: /\.system\.entry\.js$/ */
93
84
  /* webpackMode: "lazy" */
94
85
  `./${bundleId}.entry.js${""}`
95
- )); }).then(
96
- (importedModule) => {
97
- {
98
- cmpModules.set(bundleId, importedModule);
99
- }
100
- return importedModule[exportName];
101
- },
102
- (e) => {
103
- consoleError(e, hostRef.$hostElement$);
86
+ )); }).then((importedModule) => {
87
+ {
88
+ cmpModules.set(bundleId, importedModule);
104
89
  }
105
- );
90
+ return importedModule[exportName];
91
+ }, consoleError);
106
92
  };
107
93
 
108
94
  // src/client/client-style.ts
109
95
  var styles = /* @__PURE__ */ new Map();
110
- var HYDRATED_STYLE_ID = "sty-id";
111
96
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
112
97
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
113
98
  var win = typeof window !== "undefined" ? window : {};
@@ -165,6 +150,14 @@ var flush = () => {
165
150
  };
166
151
  var nextTick = (cb) => promiseResolve().then(cb);
167
152
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
153
+
154
+ // src/utils/constants.ts
155
+ var EMPTY_OBJ = {};
156
+ var SVG_NS = "http://www.w3.org/2000/svg";
157
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
158
+
159
+ // src/utils/helpers.ts
160
+ var isDef = (v) => v != null;
168
161
  var isComplexType = (o) => {
169
162
  o = typeof o;
170
163
  return o === "object" || o === "function";
@@ -343,40 +336,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
343
336
  }
344
337
  if (!appliedStyles.has(scopeId2)) {
345
338
  {
346
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
339
+ styleElm = doc.createElement("style");
347
340
  styleElm.innerHTML = style;
348
341
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
349
342
  if (nonce != null) {
350
343
  styleElm.setAttribute("nonce", nonce);
351
344
  }
352
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
353
- if (styleContainerNode.nodeName === "HEAD") {
354
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
355
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
356
- styleContainerNode.insertBefore(
357
- styleElm,
358
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
359
- );
360
- } else if ("host" in styleContainerNode) {
361
- if (supportsConstructableStylesheets) {
362
- const stylesheet = new CSSStyleSheet();
363
- stylesheet.replaceSync(style);
364
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
365
- } else {
366
- const existingStyleContainer = styleContainerNode.querySelector("style");
367
- if (existingStyleContainer) {
368
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
369
- } else {
370
- styleContainerNode.prepend(styleElm);
371
- }
372
- }
373
- } else {
374
- styleContainerNode.append(styleElm);
375
- }
376
- }
377
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
378
- styleContainerNode.insertBefore(styleElm, null);
379
- }
345
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
380
346
  }
381
347
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
382
348
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -399,25 +365,23 @@ var attachStyles = (hostRef) => {
399
365
  const scopeId2 = addStyle(
400
366
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
401
367
  cmpMeta);
402
- if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
368
+ if (flags & 10 /* needsScopedEncapsulation */) {
403
369
  elm["s-sc"] = scopeId2;
404
370
  elm.classList.add(scopeId2 + "-h");
405
371
  }
406
372
  endAttachStyles();
407
373
  };
408
374
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
409
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
375
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
410
376
  if (oldValue !== newValue) {
411
377
  let isProp = isMemberInElement(elm, memberName);
412
378
  let ln = memberName.toLowerCase();
413
379
  if (memberName === "class") {
414
380
  const classList = elm.classList;
415
381
  const oldClasses = parseClassList(oldValue);
416
- let newClasses = parseClassList(newValue);
417
- {
418
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
419
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
420
- }
382
+ const newClasses = parseClassList(newValue);
383
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
384
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
421
385
  } else if (memberName === "style") {
422
386
  {
423
387
  for (const prop in oldValue) {
@@ -470,13 +434,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
470
434
  if (memberName === "list") {
471
435
  isProp = false;
472
436
  } else if (oldValue == null || elm[memberName] != n) {
473
- if (typeof elm.__lookupSetter__(memberName) === "function") {
474
- elm[memberName] = n;
475
- } else {
476
- elm.setAttribute(memberName, n);
477
- }
437
+ elm[memberName] = n;
478
438
  }
479
- } else if (elm[memberName] !== newValue) {
439
+ } else {
480
440
  elm[memberName] = newValue;
481
441
  }
482
442
  } catch (e) {
@@ -498,44 +458,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
498
458
  }
499
459
  };
500
460
  var parseClassListRegex = /\s/;
501
- var parseClassList = (value) => {
502
- if (typeof value === "object" && value && "baseVal" in value) {
503
- value = value.baseVal;
504
- }
505
- if (!value || typeof value !== "string") {
506
- return [];
507
- }
508
- return value.split(parseClassListRegex);
509
- };
461
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
510
462
  var CAPTURE_EVENT_SUFFIX = "Capture";
511
463
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
512
464
 
513
465
  // src/runtime/vdom/update-element.ts
514
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
466
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
515
467
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
516
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
517
- const newVnodeAttrs = newVnode.$attrs$ || {};
468
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
469
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
518
470
  {
519
471
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
520
472
  if (!(memberName in newVnodeAttrs)) {
521
- setAccessor(
522
- elm,
523
- memberName,
524
- oldVnodeAttrs[memberName],
525
- void 0,
526
- isSvgMode2,
527
- newVnode.$flags$);
473
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
528
474
  }
529
475
  }
530
476
  }
531
477
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
532
- setAccessor(
533
- elm,
534
- memberName,
535
- oldVnodeAttrs[memberName],
536
- newVnodeAttrs[memberName],
537
- isSvgMode2,
538
- newVnode.$flags$);
478
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
539
479
  }
540
480
  };
541
481
  function sortedAttrNames(attrNames) {
@@ -547,10 +487,13 @@ function sortedAttrNames(attrNames) {
547
487
  attrNames
548
488
  );
549
489
  }
490
+
491
+ // src/runtime/vdom/vdom-render.ts
492
+ var scopeId;
550
493
  var hostTagName;
551
494
  var useNativeShadowDom = false;
552
495
  var isSvgMode = false;
553
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
496
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
554
497
  const newVNode2 = newParentVNode.$children$[childIndex];
555
498
  let i2 = 0;
556
499
  let elm;
@@ -571,6 +514,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
571
514
  {
572
515
  updateElement(null, newVNode2, isSvgMode);
573
516
  }
517
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
518
+ elm.classList.add(elm["s-si"] = scopeId);
519
+ }
574
520
  if (newVNode2.$children$) {
575
521
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
576
522
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -682,9 +628,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
682
628
  };
683
629
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
684
630
  if (leftVNode.$tag$ === rightVNode.$tag$) {
685
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
686
- leftVNode.$key$ = rightVNode.$key$;
687
- }
688
631
  return true;
689
632
  }
690
633
  return false;
@@ -711,10 +654,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
711
654
  elm.textContent = "";
712
655
  }
713
656
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
714
- } else if (
715
- // don't do this on initial render as it can cause non-hydrated content to be removed
716
- !isInitialRender && BUILD.updatable && oldChildren !== null
717
- ) {
657
+ } else if (oldChildren !== null) {
718
658
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
719
659
  }
720
660
  if (isSvgMode && tag === "svg") {
@@ -731,9 +671,8 @@ var nullifyVNodeRefs = (vNode) => {
731
671
  }
732
672
  };
733
673
  var insertBefore = (parent, newNode, reference) => {
734
- {
735
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
736
- }
674
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
675
+ return inserted;
737
676
  };
738
677
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
739
678
  const hostElm = hostRef.$hostElement$;
@@ -758,21 +697,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
758
697
  rootVnode.$flags$ |= 4 /* isHost */;
759
698
  hostRef.$vnode$ = rootVnode;
760
699
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
761
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
700
+ {
701
+ scopeId = hostElm["s-sc"];
702
+ }
703
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
762
704
  patch(oldVNode, rootVnode, isInitialLoad);
763
705
  };
764
706
 
765
707
  // src/runtime/update-component.ts
766
708
  var attachToAncestor = (hostRef, ancestorComponent) => {
767
709
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
768
- const index = ancestorComponent["s-p"].push(
769
- new Promise(
770
- (r) => hostRef.$onRenderResolve$ = () => {
771
- ancestorComponent["s-p"].splice(index - 1, 1);
772
- r();
773
- }
774
- )
775
- );
710
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
776
711
  }
777
712
  };
778
713
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -799,7 +734,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
799
734
  let maybePromise;
800
735
  if (isInitialLoad) {
801
736
  {
802
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
737
+ maybePromise = safeCall(instance, "componentWillLoad");
803
738
  }
804
739
  }
805
740
  endSchedule();
@@ -868,7 +803,7 @@ var postUpdateComponent = (hostRef) => {
868
803
  const instance = hostRef.$lazyInstance$ ;
869
804
  const ancestorComponent = hostRef.$ancestorComponent$;
870
805
  {
871
- safeCall(instance, "componentDidRender", void 0, elm);
806
+ safeCall(instance, "componentDidRender");
872
807
  }
873
808
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
874
809
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -876,7 +811,7 @@ var postUpdateComponent = (hostRef) => {
876
811
  addHydratedFlag(elm);
877
812
  }
878
813
  {
879
- safeCall(instance, "componentDidLoad", void 0, elm);
814
+ safeCall(instance, "componentDidLoad");
880
815
  }
881
816
  endPostUpdate();
882
817
  {
@@ -887,7 +822,7 @@ var postUpdateComponent = (hostRef) => {
887
822
  }
888
823
  } else {
889
824
  {
890
- safeCall(instance, "componentDidUpdate", void 0, elm);
825
+ safeCall(instance, "componentDidUpdate");
891
826
  }
892
827
  endPostUpdate();
893
828
  }
@@ -903,14 +838,17 @@ var postUpdateComponent = (hostRef) => {
903
838
  }
904
839
  };
905
840
  var appDidLoad = (who) => {
841
+ {
842
+ addHydratedFlag(doc.documentElement);
843
+ }
906
844
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
907
845
  };
908
- var safeCall = (instance, method, arg, elm) => {
846
+ var safeCall = (instance, method, arg) => {
909
847
  if (instance && instance[method]) {
910
848
  try {
911
849
  return instance[method](arg);
912
850
  } catch (e) {
913
- consoleError(e, elm);
851
+ consoleError(e);
914
852
  }
915
853
  }
916
854
  return void 0;
@@ -969,68 +907,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
969
907
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
970
908
  members.map(([memberName, [memberFlags]]) => {
971
909
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
972
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
973
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
974
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
975
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
976
- Object.defineProperty(prototype, memberName, {
977
- get() {
978
- {
979
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
980
- return getValue(this, memberName);
981
- }
982
- const ref = getHostRef(this);
983
- const instance = ref ? ref.$lazyInstance$ : prototype;
984
- if (!instance) return;
985
- return instance[memberName];
986
- }
987
- },
988
- configurable: true,
989
- enumerable: true
990
- });
991
- }
992
910
  Object.defineProperty(prototype, memberName, {
911
+ get() {
912
+ return getValue(this, memberName);
913
+ },
993
914
  set(newValue) {
994
- const ref = getHostRef(this);
995
- if (origSetter) {
996
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
997
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
998
- newValue = ref.$instanceValues$.get(memberName);
999
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1000
- ref.$instanceValues$.set(memberName, currentValue);
1001
- }
1002
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1003
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1004
- setValue(this, memberName, newValue, cmpMeta);
1005
- return;
1006
- }
1007
- {
1008
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1009
- setValue(this, memberName, newValue, cmpMeta);
1010
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1011
- ref.$onReadyPromise$.then(() => {
1012
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1013
- ref.$lazyInstance$[memberName] = newValue;
1014
- }
1015
- });
1016
- }
1017
- return;
1018
- }
1019
- const setterSetVal = () => {
1020
- const currentValue = ref.$lazyInstance$[memberName];
1021
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1022
- ref.$instanceValues$.set(memberName, currentValue);
1023
- }
1024
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1025
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1026
- };
1027
- if (ref.$lazyInstance$) {
1028
- setterSetVal();
1029
- } else {
1030
- ref.$onReadyPromise$.then(() => setterSetVal());
1031
- }
1032
- }
1033
- }
915
+ setValue(this, memberName, newValue, cmpMeta);
916
+ },
917
+ configurable: true,
918
+ enumerable: true
1034
919
  });
1035
920
  }
1036
921
  });
@@ -1040,11 +925,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1040
925
  plt.jmp(() => {
1041
926
  var _a2;
1042
927
  const propName = attrNameToPropName.get(attrName);
1043
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
928
+ if (this.hasOwnProperty(propName)) {
1044
929
  newValue = this[propName];
1045
930
  delete this[propName];
1046
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1047
- this[propName] == newValue) {
931
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
1048
932
  return;
1049
933
  } else if (propName == null) {
1050
934
  const hostRef = getHostRef(this);
@@ -1060,11 +944,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1060
944
  }
1061
945
  return;
1062
946
  }
1063
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1064
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1065
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1066
- this[propName] = newValue;
1067
- }
947
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1068
948
  });
1069
949
  };
1070
950
  Cstr.observedAttributes = Array.from(
@@ -1093,7 +973,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1093
973
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1094
974
  const bundleId = cmpMeta.$lazyBundleId$;
1095
975
  if (bundleId) {
1096
- const CstrImport = loadModule(cmpMeta, hostRef);
976
+ const CstrImport = loadModule(cmpMeta);
1097
977
  if (CstrImport && "then" in CstrImport) {
1098
978
  const endLoad = uniqueTime();
1099
979
  Cstr = await CstrImport;
@@ -1118,7 +998,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1118
998
  try {
1119
999
  new Cstr(hostRef);
1120
1000
  } catch (e) {
1121
- consoleError(e, elm);
1001
+ consoleError(e);
1122
1002
  }
1123
1003
  {
1124
1004
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1127,7 +1007,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1127
1007
  hostRef.$flags$ |= 128 /* isWatchReady */;
1128
1008
  }
1129
1009
  endNewInstance();
1130
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1010
+ fireConnectedCallback(hostRef.$lazyInstance$);
1131
1011
  } else {
1132
1012
  Cstr = elm.constructor;
1133
1013
  const cmpTag = elm.localName;
@@ -1154,9 +1034,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1154
1034
  schedule();
1155
1035
  }
1156
1036
  };
1157
- var fireConnectedCallback = (instance, elm) => {
1037
+ var fireConnectedCallback = (instance) => {
1158
1038
  {
1159
- safeCall(instance, "connectedCallback", void 0, elm);
1039
+ safeCall(instance, "connectedCallback");
1160
1040
  }
1161
1041
  };
1162
1042
 
@@ -1191,34 +1071,28 @@ var connectedCallback = (elm) => {
1191
1071
  }
1192
1072
  } else {
1193
1073
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1194
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1074
+ fireConnectedCallback(hostRef.$lazyInstance$);
1195
1075
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1196
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1076
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1197
1077
  }
1198
1078
  }
1199
1079
  endConnected();
1200
1080
  }
1201
1081
  };
1202
- var disconnectInstance = (instance, elm) => {
1082
+ var disconnectInstance = (instance) => {
1203
1083
  {
1204
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1084
+ safeCall(instance, "disconnectedCallback");
1205
1085
  }
1206
1086
  };
1207
1087
  var disconnectedCallback = async (elm) => {
1208
1088
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1209
1089
  const hostRef = getHostRef(elm);
1210
1090
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1211
- disconnectInstance(hostRef.$lazyInstance$, elm);
1091
+ disconnectInstance(hostRef.$lazyInstance$);
1212
1092
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1213
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1093
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1214
1094
  }
1215
1095
  }
1216
- if (rootAppliedStyles.has(elm)) {
1217
- rootAppliedStyles.delete(elm);
1218
- }
1219
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1220
- rootAppliedStyles.delete(elm.shadowRoot);
1221
- }
1222
1096
  };
1223
1097
 
1224
1098
  // src/runtime/bootstrap-lazy.ts
@@ -1299,17 +1173,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1299
1173
  }
1300
1174
  disconnectedCallback() {
1301
1175
  plt.jmp(() => disconnectedCallback(this));
1302
- plt.raf(() => {
1303
- var _a3;
1304
- const hostRef = getHostRef(this);
1305
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1306
- if (i2 > -1) {
1307
- deferredConnectedCallbacks.splice(i2, 1);
1308
- }
1309
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1310
- delete hostRef.$vnode$.$elm$;
1311
- }
1312
- });
1313
1176
  }
1314
1177
  componentOnReady() {
1315
1178
  return getHostRef(this).$onReadyPromise$;