@vetorzero/pts-custom-elements 0.0.19 → 0.1.1

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 (47) hide show
  1. package/dist/cjs/{index-Df852Um2.js → index-BryBJQdA.js} +214 -50
  2. package/dist/cjs/index.cjs.js +0 -5
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{pts.cjs.js → pts-custom-elements.cjs.js} +4 -4
  5. package/dist/cjs/pts-remote-picker.cjs.entry.js +14669 -4
  6. package/dist/collection/collection-manifest.json +2 -2
  7. package/dist/collection/components/pts-remote-picker/providers/abstract.js +8 -0
  8. package/dist/collection/components/pts-remote-picker/providers/pts.js +70 -0
  9. package/dist/collection/components/pts-remote-picker/providers/tvmaze.js +86 -0
  10. package/dist/collection/components/pts-remote-picker/pts-remote-picker.css +90 -3
  11. package/dist/collection/components/pts-remote-picker/pts-remote-picker.js +380 -2
  12. package/dist/collection/index.js +1 -10
  13. package/dist/components/index.js +1 -1
  14. package/dist/components/pts-remote-picker.js +1 -1
  15. package/dist/esm/{index-DlRnKzBQ.js → index-SqK44lUQ.js} +214 -51
  16. package/dist/esm/index.js +0 -4
  17. package/dist/esm/loader.js +3 -3
  18. package/dist/esm/pts-custom-elements.js +21 -0
  19. package/dist/esm/pts-remote-picker.entry.js +14668 -3
  20. package/dist/pts-custom-elements/index.esm.js +0 -0
  21. package/dist/pts-custom-elements/p-14d77698.entry.js +1 -0
  22. package/dist/pts-custom-elements/p-SqK44lUQ.js +2 -0
  23. package/dist/pts-custom-elements/pts-custom-elements.esm.js +1 -0
  24. package/dist/types/components/pts-remote-picker/providers/abstract.d.ts +30 -0
  25. package/dist/types/components/pts-remote-picker/providers/pts.d.ts +8 -0
  26. package/dist/types/components/pts-remote-picker/providers/tvmaze.d.ts +1 -0
  27. package/dist/types/components/pts-remote-picker/pts-remote-picker.d.ts +33 -0
  28. package/dist/types/components.d.ts +23 -32
  29. package/dist/types/index.d.ts +1 -2
  30. package/package.json +46 -42
  31. package/dist/cjs/my-component.cjs.entry.js +0 -33
  32. package/dist/collection/components/my-component/my-component.css +0 -6
  33. package/dist/collection/components/my-component/my-component.js +0 -95
  34. package/dist/collection/utils/utils.js +0 -3
  35. package/dist/components/my-component.d.ts +0 -11
  36. package/dist/components/my-component.js +0 -1
  37. package/dist/components/p-uzTLmlCN.js +0 -1
  38. package/dist/esm/my-component.entry.js +0 -31
  39. package/dist/esm/pts.js +0 -21
  40. package/dist/pts/index.esm.js +0 -1
  41. package/dist/pts/p-391b0294.entry.js +0 -1
  42. package/dist/pts/p-DlRnKzBQ.js +0 -2
  43. package/dist/pts/p-d3b2a5c5.entry.js +0 -1
  44. package/dist/pts/pts.esm.js +0 -1
  45. package/dist/types/components/my-component/my-component.d.ts +0 -16
  46. package/dist/types/utils/utils.d.ts +0 -1
  47. /package/dist/{pts → pts-custom-elements}/p-DQuL1Twl.js +0 -0
@@ -1,10 +1,23 @@
1
- const NAMESPACE = 'pts';
2
- const BUILD = /* pts */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
1
+ const NAMESPACE = 'pts-custom-elements';
2
+ const BUILD = /* pts-custom-elements */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.43.1 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.43.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
 
8
+
9
+ // src/utils/get-prop-descriptor.ts
10
+ function getPropertyDescriptor(obj, memberName, getOnly) {
11
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
12
+ while (obj && obj !== stopAt) {
13
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
14
+ if (desc && (!getOnly || desc.get)) return desc;
15
+ obj = Object.getPrototypeOf(obj);
16
+ }
17
+ return void 0;
18
+ }
19
+
20
+ // src/utils/es2022-rewire-class-members.ts
8
21
  var reWireGetterSetter = (instance, hostRef) => {
9
22
  var _a;
10
23
  const cmpMeta = hostRef.$cmpMeta$;
@@ -12,7 +25,7 @@ var reWireGetterSetter = (instance, hostRef) => {
12
25
  members.map(([memberName, [memberFlags]]) => {
13
26
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
14
27
  const ogValue = instance[memberName];
15
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
28
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
16
29
  if (ogDescriptor) {
17
30
  Object.defineProperty(instance, memberName, {
18
31
  get() {
@@ -25,18 +38,14 @@ var reWireGetterSetter = (instance, hostRef) => {
25
38
  enumerable: true
26
39
  });
27
40
  }
28
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
41
+ if (hostRef.$instanceValues$.has(memberName)) {
42
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
43
+ } else if (ogValue !== void 0) {
44
+ instance[memberName] = ogValue;
45
+ }
29
46
  }
30
47
  });
31
48
  };
32
- function getPropertyDescriptor(obj, memberName) {
33
- while (obj) {
34
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
35
- if (desc == null ? void 0 : desc.get) return desc;
36
- obj = Object.getPrototypeOf(obj);
37
- }
38
- return void 0;
39
- }
40
49
 
41
50
  // src/client/client-host-ref.ts
42
51
  var getHostRef = (ref) => {
@@ -49,7 +58,7 @@ var registerInstance = (lazyInstance, hostRef) => {
49
58
  if (!hostRef) return;
50
59
  lazyInstance.__stencil__getHostRef = () => hostRef;
51
60
  hostRef.$lazyInstance$ = lazyInstance;
52
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.prop)) {
61
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
53
62
  reWireGetterSetter(lazyInstance, hostRef);
54
63
  }
55
64
  };
@@ -61,6 +70,9 @@ var registerHost = (hostElement, cmpMeta) => {
61
70
  $instanceValues$: /* @__PURE__ */ new Map(),
62
71
  $serializerValues$: /* @__PURE__ */ new Map()
63
72
  };
73
+ {
74
+ hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
75
+ }
64
76
  {
65
77
  hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
66
78
  hostElement["s-p"] = [];
@@ -73,6 +85,7 @@ var registerHost = (hostElement, cmpMeta) => {
73
85
  hostElement.__stencil__getHostRef = () => ref;
74
86
  return ref;
75
87
  };
88
+ var isMemberInElement = (elm, memberName) => memberName in elm;
76
89
  var consoleError = (e, el) => (0, console.error)(e, el);
77
90
 
78
91
  // src/client/client-load-module.ts
@@ -370,6 +383,12 @@ var h = (nodeName, vnodeData, ...children) => {
370
383
  if (vnodeData.key) {
371
384
  key = vnodeData.key;
372
385
  }
386
+ {
387
+ const classData = vnodeData.className || vnodeData.class;
388
+ if (classData) {
389
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
390
+ }
391
+ }
373
392
  }
374
393
  const vnode = newVNode(nodeName, null);
375
394
  vnode.$attrs$ = vnodeData;
@@ -411,6 +430,10 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
411
430
  }
412
431
  return propValue;
413
432
  };
433
+ var getElement = (ref) => {
434
+ var _a;
435
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
436
+ };
414
437
  var emitEvent = (elm, name, opts) => {
415
438
  const ev = plt.ce(name, opts);
416
439
  elm.dispatchEvent(ev);
@@ -420,8 +443,111 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
420
443
  if (oldValue === newValue) {
421
444
  return;
422
445
  }
423
- memberName.toLowerCase();
446
+ let isProp = isMemberInElement(elm, memberName);
447
+ let ln = memberName.toLowerCase();
448
+ if (memberName === "class") {
449
+ const classList = elm.classList;
450
+ const oldClasses = parseClassList(oldValue);
451
+ let newClasses = parseClassList(newValue);
452
+ {
453
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
454
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
455
+ }
456
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
457
+ if (memberName[2] === "-") {
458
+ memberName = memberName.slice(3);
459
+ } else if (isMemberInElement(win, ln)) {
460
+ memberName = ln.slice(2);
461
+ } else {
462
+ memberName = ln[2] + memberName.slice(3);
463
+ }
464
+ if (oldValue || newValue) {
465
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
466
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
467
+ if (oldValue) {
468
+ plt.rel(elm, memberName, oldValue, capture);
469
+ }
470
+ if (newValue) {
471
+ plt.ael(elm, memberName, newValue, capture);
472
+ }
473
+ }
474
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
475
+ const propName = memberName.slice(5);
476
+ let attrName;
477
+ {
478
+ const hostRef = getHostRef(elm);
479
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
480
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
481
+ if (memberMeta && memberMeta[1]) {
482
+ attrName = memberMeta[1];
483
+ }
484
+ }
485
+ }
486
+ if (!attrName) {
487
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
488
+ }
489
+ if (newValue == null || newValue === false) {
490
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
491
+ elm.removeAttribute(attrName);
492
+ }
493
+ } else {
494
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
495
+ }
496
+ return;
497
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
498
+ const propName = memberName.slice(5);
499
+ try {
500
+ elm[propName] = newValue;
501
+ } catch (e) {
502
+ }
503
+ return;
504
+ } else {
505
+ const isComplex = isComplexType(newValue);
506
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
507
+ try {
508
+ if (!elm.tagName.includes("-")) {
509
+ const n = newValue == null ? "" : newValue;
510
+ if (memberName === "list") {
511
+ isProp = false;
512
+ } else if (oldValue == null || elm[memberName] !== n) {
513
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
514
+ elm[memberName] = n;
515
+ } else {
516
+ elm.setAttribute(memberName, n);
517
+ }
518
+ }
519
+ } else if (elm[memberName] !== newValue) {
520
+ elm[memberName] = newValue;
521
+ }
522
+ } catch (e) {
523
+ }
524
+ }
525
+ if (newValue == null || newValue === false) {
526
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
527
+ {
528
+ elm.removeAttribute(memberName);
529
+ }
530
+ }
531
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
532
+ newValue = newValue === true ? "" : newValue;
533
+ {
534
+ elm.setAttribute(memberName, newValue);
535
+ }
536
+ }
537
+ }
538
+ };
539
+ var parseClassListRegex = /\s/;
540
+ var parseClassList = (value) => {
541
+ if (typeof value === "object" && value && "baseVal" in value) {
542
+ value = value.baseVal;
543
+ }
544
+ if (!value || typeof value !== "string") {
545
+ return [];
546
+ }
547
+ return value.split(parseClassListRegex);
424
548
  };
549
+ var CAPTURE_EVENT_SUFFIX = "Capture";
550
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
425
551
 
426
552
  // src/runtime/vdom/update-element.ts
427
553
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -435,7 +561,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
435
561
  elm,
436
562
  memberName,
437
563
  oldVnodeAttrs[memberName],
438
- void 0);
564
+ void 0,
565
+ isSvgMode2,
566
+ newVnode.$flags$);
439
567
  }
440
568
  }
441
569
  }
@@ -444,7 +572,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
444
572
  elm,
445
573
  memberName,
446
574
  oldVnodeAttrs[memberName],
447
- newVnodeAttrs[memberName]);
575
+ newVnodeAttrs[memberName],
576
+ isSvgMode2,
577
+ newVnode.$flags$);
448
578
  }
449
579
  };
450
580
  function sortedAttrNames(attrNames) {
@@ -457,7 +587,7 @@ function sortedAttrNames(attrNames) {
457
587
  );
458
588
  }
459
589
  var hostTagName;
460
- var useNativeShadowDom = false;
590
+ var isSvgMode = false;
461
591
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
462
592
  const newVNode2 = newParentVNode.$children$[childIndex];
463
593
  let i2 = 0;
@@ -473,7 +603,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
473
603
  newVNode2.$tag$
474
604
  );
475
605
  {
476
- updateElement(null, newVNode2);
606
+ updateElement(null, newVNode2, isSvgMode);
477
607
  }
478
608
  if (newVNode2.$children$) {
479
609
  const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
@@ -488,25 +618,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
488
618
  elm["s-hn"] = hostTagName;
489
619
  return elm;
490
620
  };
491
- var relocateToHostRoot = (parentElm) => {
492
- plt.$flags$ |= 1 /* isTmpDisconnected */;
493
- const host = parentElm.closest(hostTagName.toLowerCase());
494
- if (host != null) {
495
- const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
496
- (ref) => ref["s-cr"]
497
- );
498
- const childNodeArray = Array.from(
499
- parentElm.__childNodes || parentElm.childNodes
500
- );
501
- for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
502
- if (childNode["s-sh"] != null) {
503
- insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
504
- childNode["s-sh"] = void 0;
505
- }
506
- }
507
- }
508
- plt.$flags$ &= -2 /* isTmpDisconnected */;
509
- };
510
621
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
511
622
  let containerElm = parentElm;
512
623
  let childNode;
@@ -638,17 +749,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
638
749
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
639
750
  const oldChildren = oldVNode.$children$;
640
751
  const newChildren = newVNode2.$children$;
641
- const tag = newVNode2.$tag$;
642
752
  const text = newVNode2.$text$;
643
753
  if (text == null) {
644
754
  {
645
- if (tag === "slot" && !useNativeShadowDom) {
646
- if (oldVNode.$name$ !== newVNode2.$name$) {
647
- newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
648
- relocateToHostRoot(newVNode2.$elm$.parentElement);
649
- }
650
- }
651
- updateElement(oldVNode, newVNode2);
755
+ updateElement(oldVNode, newVNode2, isSvgMode);
652
756
  }
653
757
  if (oldChildren !== null && newChildren !== null) {
654
758
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -676,7 +780,6 @@ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
676
780
  };
677
781
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
678
782
  const hostElm = hostRef.$hostElement$;
679
- const cmpMeta = hostRef.$cmpMeta$;
680
783
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
681
784
  const isHostElement = isHost(renderFnResults);
682
785
  const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
@@ -692,7 +795,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
692
795
  rootVnode.$flags$ |= 4 /* isHost */;
693
796
  hostRef.$vnode$ = rootVnode;
694
797
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
695
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
696
798
  patch(oldVNode, rootVnode, isInitialLoad);
697
799
  };
698
800
 
@@ -831,6 +933,9 @@ var postUpdateComponent = (hostRef) => {
831
933
  safeCall(instance, "componentDidUpdate", void 0, elm);
832
934
  endPostUpdate();
833
935
  }
936
+ {
937
+ hostRef.$onInstanceResolve$(elm);
938
+ }
834
939
  {
835
940
  if (hostRef.$onRenderResolve$) {
836
941
  hostRef.$onRenderResolve$();
@@ -872,6 +977,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
872
977
  `Couldn't find host element for "${cmpMeta.$tagName$}" 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/stenciljs/core/issues/5457).`
873
978
  );
874
979
  }
980
+ const elm = hostRef.$hostElement$ ;
875
981
  const oldVal = hostRef.$instanceValues$.get(propName);
876
982
  const flags = hostRef.$flags$;
877
983
  const instance = hostRef.$lazyInstance$ ;
@@ -882,6 +988,27 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
882
988
  const didValueChange = newVal !== oldVal && !areBothNaN;
883
989
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
884
990
  hostRef.$instanceValues$.set(propName, newVal);
991
+ if (cmpMeta.$watchers$) {
992
+ const watchMethods = cmpMeta.$watchers$[propName];
993
+ if (watchMethods) {
994
+ watchMethods.map((watcher) => {
995
+ try {
996
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
997
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
998
+ if (!instance) {
999
+ hostRef.$fetchedCbList$.push(() => {
1000
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1001
+ });
1002
+ } else {
1003
+ instance[watchMethodName](newVal, oldVal, propName);
1004
+ }
1005
+ }
1006
+ } catch (e) {
1007
+ consoleError(e, elm);
1008
+ }
1009
+ });
1010
+ }
1011
+ }
885
1012
  if (flags & 2 /* hasRendered */) {
886
1013
  if (instance.componentShouldUpdate) {
887
1014
  const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
@@ -901,10 +1028,21 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
901
1028
  var _a, _b;
902
1029
  const prototype = Cstr.prototype;
903
1030
  if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1031
+ {
1032
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1033
+ cmpMeta.$watchers$ = Cstr.watchers;
1034
+ }
1035
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1036
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1037
+ }
1038
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1039
+ cmpMeta.$serializers$ = Cstr.serializers;
1040
+ }
1041
+ }
904
1042
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
905
1043
  members.map(([memberName, [memberFlags]]) => {
906
1044
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
907
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1045
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
908
1046
  if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
909
1047
  if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
910
1048
  if (flags & 1 /* isElementConstructor */ || !origGetter) {
@@ -976,6 +1114,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
976
1114
  }
977
1115
  }
978
1116
  });
1117
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1118
+ Object.defineProperty(prototype, memberName, {
1119
+ value(...args) {
1120
+ var _a2;
1121
+ const ref = getHostRef(this);
1122
+ return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1123
+ var _a3;
1124
+ return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1125
+ });
1126
+ }
1127
+ });
979
1128
  }
980
1129
  });
981
1130
  if ((flags & 1 /* isElementConstructor */)) {
@@ -1051,6 +1200,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1051
1200
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1052
1201
  }
1053
1202
  if (!Cstr.isProxied) {
1203
+ {
1204
+ cmpMeta.$watchers$ = Cstr.watchers;
1205
+ cmpMeta.$serializers$ = Cstr.serializers;
1206
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1207
+ }
1054
1208
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1055
1209
  Cstr.isProxied = true;
1056
1210
  }
@@ -1066,6 +1220,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1066
1220
  {
1067
1221
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1068
1222
  }
1223
+ {
1224
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1225
+ }
1069
1226
  endNewInstance();
1070
1227
  {
1071
1228
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
@@ -1134,7 +1291,7 @@ var connectedCallback = (elm) => {
1134
1291
  }
1135
1292
  if (cmpMeta.$members$) {
1136
1293
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1137
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1294
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1138
1295
  const value = elm[memberName];
1139
1296
  delete elm[memberName];
1140
1297
  elm[memberName] = value;
@@ -1197,6 +1354,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1197
1354
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1198
1355
  lazyBundles.map((lazyBundle) => {
1199
1356
  lazyBundle[1].map((compactMeta) => {
1357
+ var _a2, _b, _c;
1200
1358
  const cmpMeta = {
1201
1359
  $flags$: compactMeta[0],
1202
1360
  $tagName$: compactMeta[1],
@@ -1206,6 +1364,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1206
1364
  {
1207
1365
  cmpMeta.$members$ = compactMeta[2];
1208
1366
  }
1367
+ {
1368
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1369
+ cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
1370
+ cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
1371
+ }
1209
1372
  const tagName = transformTag(cmpMeta.$tagName$);
1210
1373
  const HostElement = class extends HTMLElement {
1211
1374
  ["s-p"];
@@ -1310,4 +1473,4 @@ function transformTag(tag) {
1310
1473
  return tag;
1311
1474
  }
1312
1475
 
1313
- export { Host as H, bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1476
+ export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
package/dist/esm/index.js CHANGED
@@ -1,5 +1 @@
1
- function format(first, middle, last) {
2
- return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
- }
4
1
 
5
- export { format };
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-DlRnKzBQ.js';
2
- export { s as setNonce } from './index-DlRnKzBQ.js';
1
+ import { b as bootstrapLazy } from './index-SqK44lUQ.js';
2
+ export { s as setNonce } from './index-SqK44lUQ.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pts-remote-picker",[[257,"pts-remote-picker"]]]], options);
8
+ return bootstrapLazy([["pts-remote-picker",[[513,"pts-remote-picker",{"value":[1025],"displayValue":[1025,"display-value"],"endpoint":[1],"_state":[32],"_query":[32],"_querying":[32],"_expanded":[32],"_options":[32],"_focusedIndex":[32],"setValue":[64],"expand":[64],"collapse":[64],"clear":[64]},null,{"value":[{"handleSetValue":0}],"endpoint":[{"handleSetBaseUrl":0}]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -0,0 +1,21 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-SqK44lUQ.js';
2
+ export { s as setNonce } from './index-SqK44lUQ.js';
3
+ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v4.43.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+
9
+ var patchBrowser = () => {
10
+ const importMeta = import.meta.url;
11
+ const opts = {};
12
+ if (importMeta !== "") {
13
+ opts.resourcesUrl = new URL(".", importMeta).href;
14
+ }
15
+ return promiseResolve(opts);
16
+ };
17
+
18
+ patchBrowser().then(async (options) => {
19
+ await globalScripts();
20
+ return bootstrapLazy([["pts-remote-picker",[[513,"pts-remote-picker",{"value":[1025],"displayValue":[1025,"display-value"],"endpoint":[1],"_state":[32],"_query":[32],"_querying":[32],"_expanded":[32],"_options":[32],"_focusedIndex":[32],"setValue":[64],"expand":[64],"collapse":[64],"clear":[64]},null,{"value":[{"handleSetValue":0}],"endpoint":[{"handleSetBaseUrl":0}]}]]]], options);
21
+ });