pcm-agents 0.0.4 → 0.0.5

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 (75) hide show
  1. package/dist/cjs/{index-DiSBaDp9.js → index-BZoSb7Et.js} +67 -4
  2. package/dist/cjs/index-BZoSb7Et.js.map +1 -0
  3. package/dist/cjs/index-CUqLMCYJ.js +108 -0
  4. package/dist/cjs/index-CUqLMCYJ.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +4 -4
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/my-component.pcm-chat-message.pcm-chat-modal.entry.cjs.js.map +1 -0
  9. package/dist/cjs/my-component_3.cjs.entry.js +2805 -0
  10. package/dist/cjs/my-component_3.cjs.entry.js.map +1 -0
  11. package/dist/cjs/pcm-agents.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/pcm-chat-message/pcm-chat-message.css +1353 -0
  14. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js +141 -0
  15. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js.map +1 -0
  16. package/dist/collection/components/pcm-chat-modal/pcm-chat-modal.css +86 -44
  17. package/dist/collection/components/pcm-chat-modal/pcm-chat-modal.js +281 -44
  18. package/dist/collection/components/pcm-chat-modal/pcm-chat-modal.js.map +1 -1
  19. package/dist/collection/interfaces/chat.js +2 -0
  20. package/dist/collection/interfaces/chat.js.map +1 -0
  21. package/dist/collection/utils/utils.js +118 -0
  22. package/dist/collection/utils/utils.js.map +1 -1
  23. package/dist/components/index.js +98 -2
  24. package/dist/components/index.js.map +1 -1
  25. package/dist/components/my-component.js +1 -1
  26. package/dist/components/p-BwMGrJ3_.js +2480 -0
  27. package/dist/components/p-BwMGrJ3_.js.map +1 -0
  28. package/dist/components/{p-sQHsfnet.js → p-CrSenf7K.js} +59 -4
  29. package/dist/components/p-CrSenf7K.js.map +1 -0
  30. package/dist/components/pcm-chat-message.d.ts +11 -0
  31. package/dist/components/pcm-chat-message.js +9 -0
  32. package/dist/components/pcm-chat-message.js.map +1 -0
  33. package/dist/components/pcm-chat-modal.js +244 -5124
  34. package/dist/components/pcm-chat-modal.js.map +1 -1
  35. package/dist/esm/{index-DjBnNPZU.js → index-BIaiTjhs.js} +67 -4
  36. package/dist/esm/index-BIaiTjhs.js.map +1 -0
  37. package/dist/esm/index-oo76zPXJ.js +104 -0
  38. package/dist/esm/index-oo76zPXJ.js.map +1 -0
  39. package/dist/esm/index.js +1 -5
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/loader.js +3 -3
  42. package/dist/esm/my-component.pcm-chat-message.pcm-chat-modal.entry.js.map +1 -0
  43. package/dist/esm/my-component_3.entry.js +2801 -0
  44. package/dist/esm/my-component_3.entry.js.map +1 -0
  45. package/dist/esm/pcm-agents.js +3 -3
  46. package/dist/pcm-agents/index.esm.js +1 -1
  47. package/dist/pcm-agents/index.esm.js.map +1 -1
  48. package/dist/pcm-agents/my-component.pcm-chat-message.pcm-chat-modal.entry.esm.js.map +1 -0
  49. package/dist/pcm-agents/p-BIaiTjhs.js +3 -0
  50. package/dist/pcm-agents/p-BIaiTjhs.js.map +1 -0
  51. package/dist/pcm-agents/p-e645156b.entry.js +2 -0
  52. package/dist/pcm-agents/p-e645156b.entry.js.map +1 -0
  53. package/dist/pcm-agents/p-oo76zPXJ.js +2 -0
  54. package/dist/pcm-agents/p-oo76zPXJ.js.map +1 -0
  55. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  56. package/dist/types/components/pcm-chat-message/pcm-chat-message.d.ts +18 -0
  57. package/dist/types/components/pcm-chat-modal/pcm-chat-modal.d.ts +38 -9
  58. package/dist/types/components.d.ts +70 -0
  59. package/dist/types/interfaces/chat.d.ts +18 -0
  60. package/dist/types/utils/utils.d.ts +76 -0
  61. package/package.json +3 -3
  62. package/dist/cjs/index-DiSBaDp9.js.map +0 -1
  63. package/dist/cjs/my-component.pcm-chat-modal.entry.cjs.js.map +0 -1
  64. package/dist/cjs/my-component_2.cjs.entry.js +0 -5244
  65. package/dist/cjs/my-component_2.cjs.entry.js.map +0 -1
  66. package/dist/components/p-sQHsfnet.js.map +0 -1
  67. package/dist/esm/index-DjBnNPZU.js.map +0 -1
  68. package/dist/esm/my-component.pcm-chat-modal.entry.js.map +0 -1
  69. package/dist/esm/my-component_2.entry.js +0 -5241
  70. package/dist/esm/my-component_2.entry.js.map +0 -1
  71. package/dist/pcm-agents/my-component.pcm-chat-modal.entry.esm.js.map +0 -1
  72. package/dist/pcm-agents/p-1000aa56.entry.js +0 -2
  73. package/dist/pcm-agents/p-1000aa56.entry.js.map +0 -1
  74. package/dist/pcm-agents/p-DjBnNPZU.js +0 -3
  75. package/dist/pcm-agents/p-DjBnNPZU.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const NAMESPACE = 'pcm-agents';
4
- const BUILD = /* pcm-agents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
4
+ const BUILD = /* pcm-agents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
5
5
 
6
6
  /*
7
7
  Stencil Client Platform v4.28.2 | MIT Licensed | https://stenciljs.com
@@ -269,6 +269,13 @@ var h = (nodeName, vnodeData, ...children) => {
269
269
  }
270
270
  }
271
271
  }
272
+ if (typeof nodeName === "function") {
273
+ return nodeName(
274
+ vnodeData === null ? {} : vnodeData,
275
+ vNodeChildren,
276
+ vdomFnUtils
277
+ );
278
+ }
272
279
  const vnode = newVNode(nodeName, null);
273
280
  vnode.$attrs$ = vnodeData;
274
281
  if (vNodeChildren.length > 0) {
@@ -297,6 +304,36 @@ var newVNode = (tag, text) => {
297
304
  };
298
305
  var Host = {};
299
306
  var isHost = (node) => node && node.$tag$ === Host;
307
+ var vdomFnUtils = {
308
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
309
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
310
+ };
311
+ var convertToPublic = (node) => ({
312
+ vattrs: node.$attrs$,
313
+ vchildren: node.$children$,
314
+ vkey: node.$key$,
315
+ vname: node.$name$,
316
+ vtag: node.$tag$,
317
+ vtext: node.$text$
318
+ });
319
+ var convertToPrivate = (node) => {
320
+ if (typeof node.vtag === "function") {
321
+ const vnodeData = { ...node.vattrs };
322
+ if (node.vkey) {
323
+ vnodeData.key = node.vkey;
324
+ }
325
+ if (node.vname) {
326
+ vnodeData.name = node.vname;
327
+ }
328
+ return h(node.vtag, vnodeData, ...node.vchildren || []);
329
+ }
330
+ const vnode = newVNode(node.vtag, node.vtext);
331
+ vnode.$attrs$ = node.vattrs;
332
+ vnode.$children$ = node.vchildren;
333
+ vnode.$key$ = node.vkey;
334
+ vnode.$name$ = node.vname;
335
+ return vnode;
336
+ };
300
337
  var parsePropertyValue = (propValue, propType) => {
301
338
  if (propValue != null && !isComplexType(propValue)) {
302
339
  if (propType & 4 /* Boolean */) {
@@ -935,6 +972,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
935
972
  `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).`
936
973
  );
937
974
  }
975
+ const elm = hostRef.$hostElement$ ;
938
976
  const oldVal = hostRef.$instanceValues$.get(propName);
939
977
  const flags = hostRef.$flags$;
940
978
  const instance = hostRef.$lazyInstance$ ;
@@ -944,6 +982,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
944
982
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
945
983
  hostRef.$instanceValues$.set(propName, newVal);
946
984
  if (instance) {
985
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
986
+ const watchMethods = cmpMeta.$watchers$[propName];
987
+ if (watchMethods) {
988
+ watchMethods.map((watchMethodName) => {
989
+ try {
990
+ instance[watchMethodName](newVal, oldVal, propName);
991
+ } catch (e) {
992
+ consoleError(e, elm);
993
+ }
994
+ });
995
+ }
996
+ }
947
997
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
948
998
  if (instance.componentShouldUpdate) {
949
999
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
@@ -960,7 +1010,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
960
1010
  var proxyComponent = (Cstr, cmpMeta, flags) => {
961
1011
  var _a, _b;
962
1012
  const prototype = Cstr.prototype;
963
- if (cmpMeta.$members$ || BUILD.watchCallback) {
1013
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1014
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1015
+ cmpMeta.$watchers$ = Cstr.watchers;
1016
+ }
964
1017
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
965
1018
  members.map(([memberName, [memberFlags]]) => {
966
1019
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1096,6 +1149,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1096
1149
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1097
1150
  }
1098
1151
  if (!Cstr.isProxied) {
1152
+ {
1153
+ cmpMeta.$watchers$ = Cstr.watchers;
1154
+ }
1099
1155
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1100
1156
  Cstr.isProxied = true;
1101
1157
  }
@@ -1111,6 +1167,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1111
1167
  {
1112
1168
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1113
1169
  }
1170
+ {
1171
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1172
+ }
1114
1173
  endNewInstance();
1115
1174
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
1116
1175
  } else {
@@ -1228,6 +1287,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1228
1287
  let hasSlotRelocation = false;
1229
1288
  lazyBundles.map((lazyBundle) => {
1230
1289
  lazyBundle[1].map((compactMeta) => {
1290
+ var _a2;
1231
1291
  const cmpMeta = {
1232
1292
  $flags$: compactMeta[0],
1233
1293
  $tagName$: compactMeta[1],
@@ -1240,6 +1300,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1240
1300
  {
1241
1301
  cmpMeta.$members$ = compactMeta[2];
1242
1302
  }
1303
+ {
1304
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1305
+ }
1243
1306
  const tagName = cmpMeta.$tagName$;
1244
1307
  const HostElement = class extends HTMLElement {
1245
1308
  // StencilLazyHost
@@ -1344,6 +1407,6 @@ exports.h = h;
1344
1407
  exports.promiseResolve = promiseResolve;
1345
1408
  exports.registerInstance = registerInstance;
1346
1409
  exports.setNonce = setNonce;
1347
- //# sourceMappingURL=index-DiSBaDp9.js.map
1410
+ //# sourceMappingURL=index-BZoSb7Et.js.map
1348
1411
 
1349
- //# sourceMappingURL=index-DiSBaDp9.js.map
1412
+ //# sourceMappingURL=index-BZoSb7Et.js.map