lwc 2.42.0 → 2.44.0

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 (68) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +85 -225
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +85 -224
  4. package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
  5. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  6. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +35 -20
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +85 -226
  9. package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
  10. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  11. package/dist/engine-dom/iife/es5/engine-dom_debug.js +36 -21
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +85 -224
  14. package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
  15. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  16. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +35 -20
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +85 -226
  19. package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
  20. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  21. package/dist/engine-dom/umd/es5/engine-dom_debug.js +36 -21
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +152 -182
  24. package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
  25. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  26. package/dist/engine-server/esm/es2017/engine-server.js +133 -183
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +89 -74
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +89 -74
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +85 -70
  34. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +88 -71
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  38. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +84 -67
  39. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +89 -74
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  43. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +85 -70
  44. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +88 -71
  46. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  47. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  48. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +84 -67
  49. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  50. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  51. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  52. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  53. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  55. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  57. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  58. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  59. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  61. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  63. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  64. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  65. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  66. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  67. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  68. package/package.json +7 -7
@@ -49,7 +49,7 @@
49
49
  */
50
50
  const { assign, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor: getOwnPropertyDescriptor$1, getOwnPropertyNames: getOwnPropertyNames$1, getPrototypeOf: getPrototypeOf$1, hasOwnProperty: hasOwnProperty$1, isFrozen, keys, seal, setPrototypeOf, } = Object;
51
51
  const { isArray: isArray$1 } = Array;
52
- const { concat: ArrayConcat$1, copyWithin: ArrayCopyWithin, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, pop: ArrayPop, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, shift: ArrayShift, slice: ArraySlice, some: ArraySome, sort: ArraySort, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
52
+ const { concat: ArrayConcat$1, copyWithin: ArrayCopyWithin, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, findIndex: ArrayFindIndex, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, pop: ArrayPop, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, shift: ArrayShift, slice: ArraySlice, some: ArraySome, sort: ArraySort, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
53
53
  const { fromCharCode: StringFromCharCode } = String;
54
54
  const { charCodeAt: StringCharCodeAt, replace: StringReplace, split: StringSplit, slice: StringSlice, toLowerCase: StringToLowerCase, } = String.prototype;
55
55
  function isUndefined$1(obj) {
@@ -328,24 +328,6 @@
328
328
  return propertyName;
329
329
  }
330
330
 
331
- /*
332
- * Copyright (c) 2020, salesforce.com, inc.
333
- * All rights reserved.
334
- * SPDX-License-Identifier: MIT
335
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
336
- */
337
- const ESCAPED_CHARS = {
338
- '"': '"',
339
- "'": ''',
340
- '<': '&lt;',
341
- '>': '&gt;',
342
- '&': '&amp;',
343
- };
344
- function htmlEscape(str, attrMode = false) {
345
- const searchValue = attrMode ? /["&]/g : /["'<>&]/g;
346
- return str.replace(searchValue, (char) => ESCAPED_CHARS[char]);
347
- }
348
-
349
331
  /*
350
332
  * Copyright (c) 2018, salesforce.com, inc.
351
333
  * All rights reserved.
@@ -353,9 +335,9 @@
353
335
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
354
336
  */
355
337
  // Increment whenever the LWC template compiler changes
356
- const LWC_VERSION = "2.42.0";
338
+ const LWC_VERSION = "2.44.0";
357
339
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
358
- /** version: 2.42.0 */
340
+ /** version: 2.44.0 */
359
341
 
360
342
  /**
361
343
  * Copyright (C) 2018 salesforce.com, inc.
@@ -433,7 +415,7 @@
433
415
  setFeatureFlag(name, value);
434
416
  }
435
417
  }
436
- /** version: 2.42.0 */
418
+ /** version: 2.44.0 */
437
419
 
438
420
  /**
439
421
  * Copyright (C) 2018 salesforce.com, inc.
@@ -497,7 +479,7 @@
497
479
  }
498
480
  }
499
481
  }
500
- /** version: 2.42.0 */
482
+ /** version: 2.44.0 */
501
483
 
502
484
  /*
503
485
  * Copyright (c) 2018, salesforce.com, inc.
@@ -940,101 +922,6 @@
940
922
  'tabIndex',
941
923
  'title',
942
924
  ];
943
- function offsetPropertyErrorMessage(name) {
944
- return `Using the \`${name}\` property is an anti-pattern because it rounds the value to an integer. Instead, use the \`getBoundingClientRect\` method to obtain fractional values for the size of an element and its position relative to the viewport.`;
945
- }
946
- // Global HTML Attributes & Properties
947
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
948
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
949
- //
950
- // If you update this list, check for test files that recapitulate the same list. Searching the codebase
951
- // for e.g. "dropzone" should suffice.
952
- const globalHTMLProperties = {
953
- accessKey: {
954
- attribute: 'accesskey',
955
- },
956
- accessKeyLabel: {
957
- readOnly: true,
958
- },
959
- className: {
960
- attribute: 'class',
961
- error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.',
962
- },
963
- contentEditable: {
964
- attribute: 'contenteditable',
965
- },
966
- dataset: {
967
- readOnly: true,
968
- error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead.",
969
- },
970
- dir: {
971
- attribute: 'dir',
972
- },
973
- draggable: {
974
- attribute: 'draggable',
975
- },
976
- dropzone: {
977
- attribute: 'dropzone',
978
- readOnly: true,
979
- },
980
- hidden: {
981
- attribute: 'hidden',
982
- },
983
- id: {
984
- attribute: 'id',
985
- },
986
- inputMode: {
987
- attribute: 'inputmode',
988
- },
989
- lang: {
990
- attribute: 'lang',
991
- },
992
- slot: {
993
- attribute: 'slot',
994
- error: 'Using the `slot` property is an anti-pattern.',
995
- },
996
- spellcheck: {
997
- attribute: 'spellcheck',
998
- },
999
- style: {
1000
- attribute: 'style',
1001
- },
1002
- tabIndex: {
1003
- attribute: 'tabindex',
1004
- },
1005
- title: {
1006
- attribute: 'title',
1007
- },
1008
- translate: {
1009
- attribute: 'translate',
1010
- },
1011
- // additional "global attributes" that are not present in the link above.
1012
- isContentEditable: {
1013
- readOnly: true,
1014
- },
1015
- offsetHeight: {
1016
- readOnly: true,
1017
- error: offsetPropertyErrorMessage('offsetHeight'),
1018
- },
1019
- offsetLeft: {
1020
- readOnly: true,
1021
- error: offsetPropertyErrorMessage('offsetLeft'),
1022
- },
1023
- offsetParent: {
1024
- readOnly: true,
1025
- },
1026
- offsetTop: {
1027
- readOnly: true,
1028
- error: offsetPropertyErrorMessage('offsetTop'),
1029
- },
1030
- offsetWidth: {
1031
- readOnly: true,
1032
- error: offsetPropertyErrorMessage('offsetWidth'),
1033
- },
1034
- role: {
1035
- attribute: 'role',
1036
- },
1037
- };
1038
925
  let controlledElement = null;
1039
926
  let controlledAttributeName;
1040
927
  function isAttributeLocked(elm, attrName) {
@@ -1219,8 +1106,7 @@
1219
1106
  }),
1220
1107
  addEventListener: generateDataDescriptor({
1221
1108
  value(type, listener, options) {
1222
- // TODO [#420]: this is triggered when the component author attempts to add a listener
1223
- // programmatically into its Component's shadow root
1109
+ // TODO [#1824]: Potentially relax this restriction
1224
1110
  if (!isUndefined$1(options)) {
1225
1111
  logError('The `addEventListener` method on ShadowRoot does not support any options.', getAssociatedVMIfPresent(this));
1226
1112
  }
@@ -1266,8 +1152,7 @@
1266
1152
  }),
1267
1153
  addEventListener: generateDataDescriptor({
1268
1154
  value(type, listener, options) {
1269
- // TODO [#420]: this is triggered when the component author attempts to add a listener
1270
- // programmatically into a lighting element node
1155
+ // TODO [#1824]: Potentially relax this restriction
1271
1156
  if (!isUndefined$1(options)) {
1272
1157
  logError('The `addEventListener` method in `LightningElement` does not support any options.', getAssociatedVMIfPresent(this));
1273
1158
  }
@@ -1295,7 +1180,7 @@
1295
1180
  function getLightningElementPrototypeRestrictionsDescriptors(proto) {
1296
1181
  assertNotProd(); // this method should never leak to prod
1297
1182
  const originalDispatchEvent = proto.dispatchEvent;
1298
- const descriptors = {
1183
+ return {
1299
1184
  dispatchEvent: generateDataDescriptor({
1300
1185
  value(event) {
1301
1186
  const vm = getAssociatedVM(this);
@@ -1313,32 +1198,6 @@
1313
1198
  },
1314
1199
  }),
1315
1200
  };
1316
- forEach.call(getOwnPropertyNames$1(globalHTMLProperties), (propName) => {
1317
- if (propName in proto) {
1318
- return; // no need to redefine something that we are already exposing
1319
- }
1320
- descriptors[propName] = generateAccessorDescriptor({
1321
- get() {
1322
- const { error, attribute } = globalHTMLProperties[propName];
1323
- const msg = [];
1324
- msg.push(`Accessing the global HTML property "${propName}" is disabled.`);
1325
- if (error) {
1326
- msg.push(error);
1327
- }
1328
- else if (attribute) {
1329
- msg.push(`Instead access it via \`this.getAttribute("${attribute}")\`.`);
1330
- }
1331
- logError(msg.join('\n'), getAssociatedVM(this));
1332
- },
1333
- set() {
1334
- const { readOnly } = globalHTMLProperties[propName];
1335
- if (readOnly) {
1336
- logError(`The global HTML property \`${propName}\` is read-only.`, getAssociatedVM(this));
1337
- }
1338
- },
1339
- });
1340
- });
1341
- return descriptors;
1342
1201
  }
1343
1202
  // This routine will prevent access to certain properties on a shadow root instance to guarantee
1344
1203
  // that all components will work fine in IE11 and other browsers without shadow dom support.
@@ -2689,12 +2548,7 @@
2689
2548
  }
2690
2549
  function createPublicAccessorDescriptor(key, descriptor) {
2691
2550
  const { get, set, enumerable, configurable } = descriptor;
2692
- if (!isFunction$1(get)) {
2693
- if (process.env.NODE_ENV !== 'production') {
2694
- assert.invariant(isFunction$1(get), `Invalid compiler output for public accessor ${toString$1(key)} decorated with @api`);
2695
- }
2696
- throw new Error();
2697
- }
2551
+ assert.invariant(isFunction$1(get), `Invalid public accessor ${toString$1(key)} decorated with @api. The property is missing a getter.`);
2698
2552
  return {
2699
2553
  get() {
2700
2554
  if (process.env.NODE_ENV !== 'production') {
@@ -2816,64 +2670,64 @@
2816
2670
  }
2817
2671
  }
2818
2672
  function validateObservedField(Ctor, fieldName, descriptor) {
2673
+ assertNotProd(); // this method should never leak to prod
2819
2674
  if (!isUndefined$1(descriptor)) {
2820
2675
  const type = getClassDescriptorType(descriptor);
2821
2676
  const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
2822
- // [W-9927596] Ideally we always throw an error when detecting duplicate observed field.
2823
- // This branch is only here for backward compatibility reasons.
2824
- if (type === "accessor" /* DescriptorType.Accessor */) {
2825
- logError(message);
2826
- }
2827
- else {
2828
- assert.fail(message);
2829
- }
2677
+ // TODO [#3408]: this should throw, not log
2678
+ logError(message);
2830
2679
  }
2831
2680
  }
2832
2681
  function validateFieldDecoratedWithTrack(Ctor, fieldName, descriptor) {
2682
+ assertNotProd(); // this method should never leak to prod
2833
2683
  if (!isUndefined$1(descriptor)) {
2834
2684
  const type = getClassDescriptorType(descriptor);
2835
- assert.fail(`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`);
2685
+ // TODO [#3408]: this should throw, not log
2686
+ logError(`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`);
2836
2687
  }
2837
2688
  }
2838
2689
  function validateFieldDecoratedWithWire(Ctor, fieldName, descriptor) {
2690
+ assertNotProd(); // this method should never leak to prod
2839
2691
  if (!isUndefined$1(descriptor)) {
2840
2692
  const type = getClassDescriptorType(descriptor);
2841
- assert.fail(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
2693
+ // TODO [#3408]: this should throw, not log
2694
+ logError(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
2842
2695
  }
2843
2696
  }
2844
2697
  function validateMethodDecoratedWithWire(Ctor, methodName, descriptor) {
2698
+ assertNotProd(); // this method should never leak to prod
2845
2699
  if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
2846
- assert.fail(`Invalid @wire ${methodName} method.`);
2700
+ // TODO [#3441]: This line of code does not seem possible to reach.
2701
+ logError(`Invalid @wire ${methodName} field. The field should have a valid writable descriptor.`);
2847
2702
  }
2848
2703
  }
2849
2704
  function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
2705
+ assertNotProd(); // this method should never leak to prod
2850
2706
  if (!isUndefined$1(descriptor)) {
2851
2707
  const type = getClassDescriptorType(descriptor);
2852
2708
  const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
2853
- // [W-9927596] Ideally we always throw an error when detecting duplicate public properties.
2854
- // This branch is only here for backward compatibility reasons.
2855
- if (type === "accessor" /* DescriptorType.Accessor */) {
2856
- logError(message);
2857
- }
2858
- else {
2859
- assert.fail(message);
2860
- }
2709
+ // TODO [#3408]: this should throw, not log
2710
+ logError(message);
2861
2711
  }
2862
2712
  }
2863
2713
  function validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor) {
2864
- if (isUndefined$1(descriptor)) {
2865
- assert.fail(`Invalid @api get ${fieldName} accessor.`);
2866
- }
2867
- else if (isFunction$1(descriptor.set)) {
2868
- assert.isTrue(isFunction$1(descriptor.get), `Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`);
2714
+ assertNotProd(); // this method should never leak to prod
2715
+ if (isFunction$1(descriptor.set)) {
2716
+ if (!isFunction$1(descriptor.get)) {
2717
+ // TODO [#3441]: This line of code does not seem possible to reach.
2718
+ logError(`Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`);
2719
+ }
2869
2720
  }
2870
2721
  else if (!isFunction$1(descriptor.get)) {
2871
- assert.fail(`Missing @api get ${fieldName} accessor.`);
2722
+ // TODO [#3441]: This line of code does not seem possible to reach.
2723
+ logError(`Missing @api get ${fieldName} accessor.`);
2872
2724
  }
2873
2725
  }
2874
2726
  function validateMethodDecoratedWithApi(Ctor, methodName, descriptor) {
2727
+ assertNotProd(); // this method should never leak to prod
2875
2728
  if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
2876
- assert.fail(`Invalid @api ${methodName} method.`);
2729
+ // TODO [#3441]: This line of code does not seem possible to reach.
2730
+ logError(`Invalid @api ${methodName} method.`);
2877
2731
  }
2878
2732
  }
2879
2733
  /**
@@ -2896,13 +2750,14 @@
2896
2750
  apiFieldsConfig[fieldName] = propConfig.config;
2897
2751
  descriptor = getOwnPropertyDescriptor$1(proto, fieldName);
2898
2752
  if (propConfig.config > 0) {
2753
+ if (isUndefined$1(descriptor)) {
2754
+ // TODO [#3441]: This line of code does not seem possible to reach.
2755
+ throw new Error();
2756
+ }
2899
2757
  // accessor declaration
2900
2758
  if (process.env.NODE_ENV !== 'production') {
2901
2759
  validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor);
2902
2760
  }
2903
- if (isUndefined$1(descriptor)) {
2904
- throw new Error();
2905
- }
2906
2761
  descriptor = createPublicAccessorDescriptor(fieldName, descriptor);
2907
2762
  }
2908
2763
  else {
@@ -2942,7 +2797,10 @@
2942
2797
  descriptor = getOwnPropertyDescriptor$1(proto, fieldOrMethodName);
2943
2798
  if (method === 1) {
2944
2799
  if (process.env.NODE_ENV !== 'production') {
2945
- assert.isTrue(adapter, `@wire on method "${fieldOrMethodName}": adapter id must be truthy.`);
2800
+ if (!adapter) {
2801
+ // TODO [#3408]: this should throw, not log
2802
+ logError(`@wire on method "${fieldOrMethodName}": adapter id must be truthy.`);
2803
+ }
2946
2804
  validateMethodDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
2947
2805
  }
2948
2806
  if (isUndefined$1(descriptor)) {
@@ -2953,7 +2811,10 @@
2953
2811
  }
2954
2812
  else {
2955
2813
  if (process.env.NODE_ENV !== 'production') {
2956
- assert.isTrue(adapter, `@wire on field "${fieldOrMethodName}": adapter id must be truthy.`);
2814
+ if (!adapter) {
2815
+ // TODO [#3408]: this should throw, not log
2816
+ logError(`@wire on field "${fieldOrMethodName}": adapter id must be truthy.`);
2817
+ }
2957
2818
  validateFieldDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
2958
2819
  }
2959
2820
  descriptor = internalWireFieldDecorator(fieldOrMethodName);
@@ -3759,6 +3620,15 @@
3759
3620
  // the stylesheet, while internally, we have a replacement for it.
3760
3621
  stylesheet = getStyleOrSwappedStyle(stylesheet);
3761
3622
  }
3623
+ // Check that this stylesheet was generated by our compiler
3624
+ if (!isStylesheetRegistered(stylesheet)) {
3625
+ if (process.env.NODE_ENV !== 'production') {
3626
+ logWarnOnce(`TypeError: Unexpected LWC stylesheet content found for component <${vm.tagName.toLowerCase()}>.`);
3627
+ }
3628
+ report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
3629
+ tagName: vm.tagName.toLowerCase(),
3630
+ });
3631
+ }
3762
3632
  const isScopedCss = stylesheet[KEY__SCOPED_CSS];
3763
3633
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
3764
3634
  !isScopedCss &&
@@ -3879,6 +3749,18 @@
3879
3749
  }
3880
3750
  return null;
3881
3751
  }
3752
+ const signedStylesheetSet = new Set();
3753
+ /**
3754
+ * INTERNAL: This function can only be invoked by compiled code. The compiler
3755
+ * will prevent this function from being imported by userland code.
3756
+ */
3757
+ function registerStylesheet(stylesheet) {
3758
+ signedStylesheetSet.add(stylesheet);
3759
+ return stylesheet;
3760
+ }
3761
+ function isStylesheetRegistered(stylesheet) {
3762
+ return signedStylesheetSet.has(stylesheet);
3763
+ }
3882
3764
 
3883
3765
  /*
3884
3766
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5583,18 +5465,12 @@
5583
5465
  function setVMBeingRendered(vm) {
5584
5466
  vmBeingRendered = vm;
5585
5467
  }
5586
- function validateSlots(vm, html) {
5468
+ function validateSlots(vm) {
5587
5469
  assertNotProd(); // this method should never leak to prod
5588
5470
  const { cmpSlots } = vm;
5589
- const { slots = EmptyArray } = html;
5590
5471
  for (const slotName in cmpSlots.slotAssignments) {
5591
5472
  // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
5592
5473
  assert.isTrue(isArray$1(cmpSlots.slotAssignments[slotName]), `Slots can only be set to an array, instead received ${toString$1(cmpSlots.slotAssignments[slotName])} for slot "${slotName}" in ${vm}.`);
5593
- if (slotName !== '' && ArrayIndexOf.call(slots, slotName) === -1) {
5594
- // TODO [#1297]: this should never really happen because the compiler should always validate
5595
- // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
5596
- logError(`Ignoring unknown provided slot name "${slotName}" in ${vm}. Check for a typo on the slot attribute.`, vm);
5597
- }
5598
5474
  }
5599
5475
  }
5600
5476
  function validateLightDomTemplate(template, vm) {
@@ -5713,7 +5589,7 @@
5713
5589
  }
5714
5590
  if (process.env.NODE_ENV !== 'production') {
5715
5591
  // validating slots in every rendering since the allocated content might change over time
5716
- validateSlots(vm, html);
5592
+ validateSlots(vm);
5717
5593
  // add the VM to the list of host VMs that can be re-rendered if html is swapped
5718
5594
  setActiveVM(vm);
5719
5595
  }
@@ -6696,7 +6572,7 @@
6696
6572
  const vm = findVM(elm);
6697
6573
  if (process.env.NODE_ENV !== 'production') {
6698
6574
  logWarnOnce(`Element <${elm.tagName.toLowerCase()}> ` +
6699
- (isUndefined$1(vm) ? '' : `owned by <${vm.elm.tagName.toLowerCase()}> `) +
6575
+ (isUndefined$1(vm) ? '' : `owned by <${vm.tagName.toLowerCase()}> `) +
6700
6576
  `uses non-standard property "${prop}". This will be removed in a future version of LWC. ` +
6701
6577
  `See https://sfdc.co/deprecated-aria`);
6702
6578
  }
@@ -6813,8 +6689,6 @@
6813
6689
  return renderer.nextSibling(hydratedNode);
6814
6690
  }
6815
6691
  const NODE_VALUE_PROP = 'nodeValue';
6816
- const PARENT_NODE_PROP = 'parentNode';
6817
- const TAG_NAME_PROP = 'tagName';
6818
6692
  function textNodeContentsAreEqual(node, vnode, renderer) {
6819
6693
  const { getProperty } = renderer;
6820
6694
  const nodeValue = getProperty(node, NODE_VALUE_PROP);
@@ -6826,22 +6700,6 @@
6826
6700
  if (nodeValue === '\u200D' && vnode.text === '') {
6827
6701
  return true;
6828
6702
  }
6829
- // Special case for text nodes inside `<style>` tags – these are escaped when rendered server-size,
6830
- // but not when generated by the engine client-side.
6831
- const parentNode = getProperty(node, PARENT_NODE_PROP);
6832
- // Should never be null, but just to be safe, we check.
6833
- /* istanbul ignore else */
6834
- if (!isNull(parentNode)) {
6835
- const tagName = getProperty(parentNode, TAG_NAME_PROP);
6836
- // If the tagName is STYLE, then the following condition should always be true.
6837
- // The LWC compiler blocks using `<style>`s inside of templates, so it should be impossible
6838
- // for component authors to render different `<style>` text content on the client and server.
6839
- // But just to be safe, we check.
6840
- /* istanbul ignore next */
6841
- if (tagName === 'STYLE' && htmlEscape(vnode.text) === nodeValue) {
6842
- return true;
6843
- }
6844
- }
6845
6703
  return false;
6846
6704
  }
6847
6705
  function hydrateText(node, vnode, renderer) {
@@ -7065,7 +6923,7 @@
7065
6923
  function validateClassAttr(vnode, elm, renderer) {
7066
6924
  const { data, owner } = vnode;
7067
6925
  let { className, classMap } = data;
7068
- const { getProperty, getClassList } = renderer;
6926
+ const { getProperty, getClassList, getAttribute } = renderer;
7069
6927
  const scopedToken = getScopeTokenClass(owner);
7070
6928
  const stylesheetTokenHost = isVCustomElement(vnode) ? getStylesheetTokenHost(vnode) : null;
7071
6929
  // Classnames for scoped CSS are added directly to the DOM during rendering,
@@ -7095,11 +6953,12 @@
7095
6953
  }
7096
6954
  let nodesAreCompatible = true;
7097
6955
  let readableVnodeClassname;
7098
- const elmClassName = getProperty(elm, 'className');
6956
+ const elmClassName = getAttribute(elm, 'class');
7099
6957
  if (!isUndefined$1(className) && String(className) !== elmClassName) {
7100
6958
  // className is used when class is bound to an expr.
7101
6959
  nodesAreCompatible = false;
7102
- readableVnodeClassname = className;
6960
+ // stringify for pretty-printing
6961
+ readableVnodeClassname = JSON.stringify(className);
7103
6962
  }
7104
6963
  else if (!isUndefined$1(classMap)) {
7105
6964
  // classMap is used when class is set to static value.
@@ -7112,19 +6971,20 @@
7112
6971
  nodesAreCompatible = false;
7113
6972
  }
7114
6973
  }
7115
- readableVnodeClassname = computedClassName.trim();
6974
+ // stringify for pretty-printing
6975
+ readableVnodeClassname = JSON.stringify(computedClassName.trim());
7116
6976
  if (classList.length > keys(classMap).length) {
7117
6977
  nodesAreCompatible = false;
7118
6978
  }
7119
6979
  }
7120
- else if (isUndefined$1(className) && elmClassName !== '') {
6980
+ else if (isUndefined$1(className) && !isNull(elmClassName)) {
7121
6981
  // SSR contains a className but client-side VDOM does not
7122
6982
  nodesAreCompatible = false;
7123
- readableVnodeClassname = '';
6983
+ readableVnodeClassname = '""';
7124
6984
  }
7125
6985
  if (!nodesAreCompatible) {
7126
6986
  if (process.env.NODE_ENV !== 'production') {
7127
- logError(`Mismatch hydrating element <${getProperty(elm, 'tagName').toLowerCase()}>: attribute "class" has different values, expected "${readableVnodeClassname}" but found "${elmClassName}"`, vnode.owner);
6987
+ logError(`Mismatch hydrating element <${getProperty(elm, 'tagName').toLowerCase()}>: attribute "class" has different values, expected ${readableVnodeClassname} but found ${JSON.stringify(elmClassName)}`, vnode.owner);
7128
6988
  }
7129
6989
  }
7130
6990
  return nodesAreCompatible;
@@ -7465,12 +7325,12 @@
7465
7325
  if (process.env.NODE_ENV !== 'production') {
7466
7326
  // TODO [#1292]: Remove the readonly decorator
7467
7327
  if (arguments.length !== 1) {
7468
- assert.fail('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
7328
+ logError('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
7469
7329
  }
7470
7330
  }
7471
7331
  return getReadOnlyProxy(obj);
7472
7332
  }
7473
- /* version: 2.42.0 */
7333
+ /* version: 2.44.0 */
7474
7334
 
7475
7335
  /*
7476
7336
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7898,7 +7758,7 @@
7898
7758
  function isNull(obj) {
7899
7759
  return obj === null;
7900
7760
  }
7901
- /** version: 2.42.0 */
7761
+ /** version: 2.44.0 */
7902
7762
 
7903
7763
  /*
7904
7764
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8517,7 +8377,7 @@
8517
8377
  });
8518
8378
  }));
8519
8379
  }
8520
- /* version: 2.42.0 */
8380
+ /* version: 2.44.0 */
8521
8381
 
8522
8382
  exports.LightningElement = LightningElement;
8523
8383
  exports.__unstable__ProfilerControl = profilerControl;
@@ -8538,6 +8398,7 @@
8538
8398
  exports.register = register;
8539
8399
  exports.registerComponent = registerComponent;
8540
8400
  exports.registerDecorators = registerDecorators;
8401
+ exports.registerStylesheet = registerStylesheet;
8541
8402
  exports.registerTemplate = registerTemplate;
8542
8403
  exports.renderer = renderer;
8543
8404
  exports.rendererFactory = rendererFactory;