@lwrjs/everywhere 0.10.0-alpha.8 → 0.10.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 (31) hide show
  1. package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/ad26178e2b6a712bafbd34bfa576d557/config.js +10 -0
  2. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/{0_10_0-alpha_8 → 0_10_0}/s/c40e6caf07454ce13961de8ca76ab7f0/@lwrjs_app-service_amd-bootstrap_module_amd.js +4 -4
  3. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwc/v/{2_45_2/s/97b809a5745ddedba3acd0433f339b58 → 2_50_0/s/b40440e2e29d782101f05d6085a324e9}/lwc.js +119 -164
  4. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/everywhereAmd/v/{0_10_0-alpha_8/s/c538071acf5bde58e816967a14c465c3 → 0_10_0/s/cb931ebef2b89dcf8ab51456e3a68864}/lwr_everywhereAmd.js +3 -3
  5. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/init/v/0_10_0/s/5e6db37af51f0d23be4893abe5eeb913/lwr_init.js +163 -0
  6. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/loader/v/{0_10_0-alpha_8/s/7c38605af6fc9549feac455828d00bdd → 0_10_0/s/1344670ea0a1514a4e8da5ca7f382e45}/lwr_loader.js +73 -5
  7. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/metrics/v/{0_10_0-alpha_8/s/3426e42c3e22ce07ab2adc62c4c523a0 → 0_10_0/s/7a802ee7a2430244c1f66bce2c2eafef}/lwr_metrics.js +13 -1
  8. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/profiler/v/0_10_0/s/a152b8d35f12ca1b5147c5cd1ee155fb/lwr_profiler.js +102 -0
  9. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/vault/v/{0_10_0-alpha_8 → 0_10_0}/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js +1 -1
  10. package/build/__generated_site_amd_modules__/1/resource/amd/lwr-error-shim.js/v/{0_10_0-alpha_8 → 0_10_0}/lwr-error-shim.js +1 -1
  11. package/build/__generated_site_amd_modules__/1/resource/amd/lwr-loader-shim.bundle.js/v/{0_10_0-alpha_8 → 0_10_0}/lwr-loader-shim.bundle.js +122 -19
  12. package/build/assets/amd/lwr-everywhere-debug.js +81 -10
  13. package/build/assets/amd/lwr-everywhere-min.js +5 -1
  14. package/build/assets/amd/lwr-everywhere.js +81 -10
  15. package/build/assets/core/lwr-everywhere-debug.js +77 -6
  16. package/build/assets/core/lwr-everywhere-min.js +5 -1
  17. package/build/assets/core/lwr-everywhere.js +77 -6
  18. package/build/assets/esm/lwr-everywhere-debug.js +1 -1
  19. package/build/assets/esm/lwr-everywhere-min.js +1 -1
  20. package/build/assets/esm/lwr-everywhere.js +1 -1
  21. package/build/generate.js +1 -1
  22. package/build/index.js +1 -1
  23. package/build/modules/lwr/everywhereAmd/everywhereAmd.d.ts +1 -1
  24. package/build/modules/lwr/host/host.html +1 -1
  25. package/build/modules/lwr/host/host.js +1 -1
  26. package/package.json +11 -10
  27. package/src/generate.ts +1 -1
  28. package/src/index.ts +4 -1
  29. package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/02b9b4ac7ae3860b355955245154923a/config.js +0 -10
  30. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/init/v/0_10_0-alpha_8/s/8199fbc1a33dffe14973c3ee0a3f6aa3/lwr_init.js +0 -118
  31. package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/profiler/v/0_10_0-alpha_8/s/4e65d4b97b3cc3d2f06a4cc284f3dd68/lwr_profiler.js +0 -68
@@ -1,8 +1,12 @@
1
- LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
1
+ LWR.define('lwc/v/2_50_0', ['exports'], (function (exports) { 'use strict';
2
2
 
3
3
  /* proxy-compat-disable */
4
4
  /**
5
- * Copyright (C) 2018 salesforce.com, inc.
5
+ * Copyright (C) 2023 salesforce.com, inc.
6
+ */
7
+ /* proxy-compat-disable */
8
+ /**
9
+ * Copyright (C) 2023 salesforce.com, inc.
6
10
  */
7
11
  /*
8
12
  * Copyright (c) 2018, salesforce.com, inc.
@@ -197,7 +201,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
197
201
  })();
198
202
  // These attributes take either an ID or a list of IDs as values.
199
203
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
200
- const ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
204
+ const ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
201
205
 
202
206
  /*
203
207
  * Copyright (c) 2018, salesforce.com, inc.
@@ -236,40 +240,18 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
236
240
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
237
241
  */
238
242
  const CAMEL_REGEX = /-([a-z])/g;
239
- // Convoluted map generation so that @lwc/shared remains fully tree-shakable (verify-treeshakable)
240
- const {
241
- NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
242
- NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING
243
- } = /*#__PURE__*/(() => {
244
- /**
245
- * Map composed of properties to attributes not following the HTML property to attribute mapping
246
- * convention.
247
- */
248
- const NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING = new Map([['accessKey', 'accesskey'], ['readOnly', 'readonly'], ['tabIndex', 'tabindex'], ['bgColor', 'bgcolor'], ['colSpan', 'colspan'], ['rowSpan', 'rowspan'], ['contentEditable', 'contenteditable'], ['crossOrigin', 'crossorigin'], ['dateTime', 'datetime'], ['formAction', 'formaction'], ['isMap', 'ismap'], ['maxLength', 'maxlength'], ['minLength', 'minlength'], ['noValidate', 'novalidate'], ['useMap', 'usemap'], ['htmlFor', 'for']]);
249
- /**
250
- * Inverted map with attribute name key and property name value.
251
- */
252
- const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
253
- NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
254
- return {
255
- NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
256
- NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING
257
- };
258
- })();
243
+ // These are HTML standard prop/attribute IDL mappings, but are not predictable based on camel/kebab-case conversion
244
+ const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map([['accessKey', 'accesskey'], ['readOnly', 'readonly'], ['tabIndex', 'tabindex'], ['bgColor', 'bgcolor'], ['colSpan', 'colspan'], ['rowSpan', 'rowspan'], ['contentEditable', 'contenteditable'], ['crossOrigin', 'crossorigin'], ['dateTime', 'datetime'], ['formAction', 'formaction'], ['isMap', 'ismap'], ['maxLength', 'maxlength'], ['minLength', 'minlength'], ['noValidate', 'novalidate'], ['useMap', 'usemap'], ['htmlFor', 'for']]);
259
245
  /**
260
246
  * Map associating previously transformed HTML property into HTML attribute.
261
247
  */
262
- const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
263
- /**
264
- * Map associating previously transformed HTML attribute into HTML property.
265
- */
266
- const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
248
+ const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
267
249
  function htmlPropertyToAttribute(propName) {
268
250
  const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
269
251
  if (!isUndefined$1(ariaAttributeName)) {
270
252
  return ariaAttributeName;
271
253
  }
272
- const specialAttributeName = NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
254
+ const specialAttributeName = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
273
255
  if (!isUndefined$1(specialAttributeName)) {
274
256
  return specialAttributeName;
275
257
  }
@@ -292,22 +274,17 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
292
274
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
293
275
  return attributeName;
294
276
  }
295
- function htmlAttributeToProperty(attrName) {
296
- const ariaPropertyName = AriaAttrNameToPropNameMap[attrName];
297
- if (!isUndefined$1(ariaPropertyName)) {
298
- return ariaPropertyName;
299
- }
300
- const specialPropertyName = NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
301
- if (!isUndefined$1(specialPropertyName)) {
302
- return specialPropertyName;
303
- }
304
- const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
305
- if (!isUndefined$1(cachedPropertyName)) {
306
- return cachedPropertyName;
277
+ /**
278
+ * Map associating previously transformed kabab-case attributes into camel-case props.
279
+ */
280
+ const CACHED_KEBAB_CAMEL_MAPPING = /*@__PURE__@*/new Map();
281
+ function kebabCaseToCamelCase(attrName) {
282
+ let result = CACHED_KEBAB_CAMEL_MAPPING.get(attrName);
283
+ if (isUndefined$1(result)) {
284
+ result = StringReplace.call(attrName, CAMEL_REGEX, g => g[1].toUpperCase());
285
+ CACHED_KEBAB_CAMEL_MAPPING.set(attrName, result);
307
286
  }
308
- const propertyName = StringReplace.call(attrName, CAMEL_REGEX, g => g[1].toUpperCase());
309
- CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
310
- return propertyName;
287
+ return result;
311
288
  }
312
289
 
313
290
  /*
@@ -317,12 +294,13 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
317
294
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
318
295
  */
319
296
  // Increment whenever the LWC template compiler changes
320
- const LWC_VERSION = "2.45.2";
297
+ const LWC_VERSION = "2.50.0";
321
298
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
322
- /** version: 2.45.2 */
299
+ /** version: 2.50.0 */
323
300
 
301
+ /* proxy-compat-disable */
324
302
  /**
325
- * Copyright (C) 2018 salesforce.com, inc.
303
+ * Copyright (C) 2023 salesforce.com, inc.
326
304
  */
327
305
 
328
306
  /*
@@ -397,10 +375,11 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
397
375
  setFeatureFlag(name, value);
398
376
  }
399
377
  }
400
- /** version: 2.45.2 */
378
+ /** version: 2.50.0 */
401
379
 
380
+ /* proxy-compat-disable */
402
381
  /**
403
- * Copyright (C) 2018 salesforce.com, inc.
382
+ * Copyright (C) 2023 salesforce.com, inc.
404
383
  */
405
384
 
406
385
  /*
@@ -460,7 +439,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
460
439
  }
461
440
  }
462
441
  }
463
- /** version: 2.45.2 */
442
+ /** version: 2.50.0 */
464
443
 
465
444
  /*
466
445
  * Copyright (c) 2018, salesforce.com, inc.
@@ -475,6 +454,9 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
475
454
  }
476
455
 
477
456
  /* proxy-compat-disable */
457
+ /**
458
+ * Copyright (C) 2023 salesforce.com, inc.
459
+ */
478
460
 
479
461
  /*
480
462
  * Copyright (c) 2018, salesforce.com, inc.
@@ -888,19 +870,6 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
888
870
  */
889
871
  // These properties get added to LWCElement.prototype publicProps automatically
890
872
  const defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
891
- let controlledElement = null;
892
- let controlledAttributeName;
893
- function isAttributeLocked(elm, attrName) {
894
- return elm !== controlledElement || attrName !== controlledAttributeName;
895
- }
896
- function lockAttribute(_elm, _key) {
897
- controlledElement = null;
898
- controlledAttributeName = undefined;
899
- }
900
- function unlockAttribute(elm, key) {
901
- controlledElement = elm;
902
- controlledAttributeName = key;
903
- }
904
873
 
905
874
  /*
906
875
  * Copyright (c) 2018, salesforce.com, inc.
@@ -939,6 +908,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
939
908
  * SPDX-License-Identifier: MIT
940
909
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
941
910
  */
911
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
942
912
  function generateDataDescriptor(options) {
943
913
  return assign({
944
914
  configurable: true,
@@ -1552,7 +1522,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
1552
1522
  valueMutated(originalTarget, key);
1553
1523
  return true;
1554
1524
  }
1555
- /*LWC compiler v2.45.2*/
1525
+ /*LWC compiler v2.50.0*/
1556
1526
  }
1557
1527
  const getterMap = new WeakMap();
1558
1528
  const setterMap = new WeakMap();
@@ -1645,7 +1615,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
1645
1615
  /* istanbul ignore next */
1646
1616
  return false;
1647
1617
  }
1648
- /*LWC compiler v2.45.2*/
1618
+ /*LWC compiler v2.50.0*/
1649
1619
  }
1650
1620
  function extract(objectOrArray) {
1651
1621
  if (isArray(objectOrArray)) {
@@ -1859,6 +1829,14 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
1859
1829
  * SPDX-License-Identifier: MIT
1860
1830
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1861
1831
  */
1832
+ /**
1833
+ * This module is responsible for producing the ComponentDef object that is always
1834
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1835
+ * instance of a component class, and shared across all instances.
1836
+ *
1837
+ * This structure can be used to synthetically create proxies, and understand the
1838
+ * shape of a component. It is also used internally to apply extra optimizations.
1839
+ */
1862
1840
  /**
1863
1841
  * This operation is called with a descriptor of an standard html property
1864
1842
  * that a Custom Element can support (including AOM properties), which
@@ -2077,9 +2055,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
2077
2055
  removeAttribute
2078
2056
  }
2079
2057
  } = vm;
2080
- unlockAttribute(elm, name);
2081
2058
  removeAttribute(elm, name);
2082
- lockAttribute();
2083
2059
  },
2084
2060
  removeAttributeNS(namespace, name) {
2085
2061
  const {
@@ -2088,9 +2064,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
2088
2064
  removeAttribute
2089
2065
  }
2090
2066
  } = getAssociatedVM(this);
2091
- unlockAttribute(elm, name);
2092
2067
  removeAttribute(elm, name, namespace);
2093
- lockAttribute();
2094
2068
  },
2095
2069
  getAttribute(name) {
2096
2070
  const vm = getAssociatedVM(this);
@@ -2125,9 +2099,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
2125
2099
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2126
2100
  }
2127
2101
  }
2128
- unlockAttribute(elm, name);
2129
2102
  setAttribute(elm, name, value);
2130
- lockAttribute();
2131
2103
  },
2132
2104
  setAttributeNS(namespace, name, value) {
2133
2105
  const vm = getAssociatedVM(this);
@@ -2142,9 +2114,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
2142
2114
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2143
2115
  }
2144
2116
  }
2145
- unlockAttribute(elm, name);
2146
2117
  setAttribute(elm, name, value, namespace);
2147
- lockAttribute();
2148
2118
  },
2149
2119
  getBoundingClientRect() {
2150
2120
  const vm = getAssociatedVM(this);
@@ -2558,7 +2528,9 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
2558
2528
  });
2559
2529
  runWithBoundaryProtection(vm, vm, noop, () => {
2560
2530
  // job
2561
- connector = new adapter(dataCallback);
2531
+ connector = new adapter(dataCallback, {
2532
+ tagName: vm.tagName
2533
+ });
2562
2534
  }, noop);
2563
2535
  const updateConnectorConfig = config => {
2564
2536
  // every time the config is recomputed due to tracking,
@@ -3151,6 +3123,10 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
3151
3123
  * SPDX-License-Identifier: MIT
3152
3124
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3153
3125
  */
3126
+ /**
3127
+ * This module is responsible for creating the base bridge class BaseBridgeElement
3128
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
3129
+ */
3154
3130
  // A bridge descriptor is a descriptor whose job is just to get the component instance
3155
3131
  // from the element instance, and get the value or set a new value on the component.
3156
3132
  // This means that across different elements, similar names can get the exact same
@@ -3211,14 +3187,6 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
3211
3187
  }
3212
3188
  return;
3213
3189
  }
3214
- if (!isAttributeLocked(this, attrName)) {
3215
- // Ignore changes triggered by the engine itself during:
3216
- // * diffing when public props are attempting to reflect to the DOM
3217
- // * component via `this.setAttribute()`, should never update the prop
3218
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3219
- // attribute to be changed
3220
- return;
3221
- }
3222
3190
  // Reflect attribute change to the corresponding property when changed from outside.
3223
3191
  this[propName] = newValue;
3224
3192
  };
@@ -3236,7 +3204,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
3236
3204
  */
3237
3205
  if (isFunction$1(SuperClass)) {
3238
3206
  HTMLBridgeElement = class extends SuperClass {
3239
- /*LWC compiler v2.45.2*/
3207
+ /*LWC compiler v2.50.0*/
3240
3208
  };
3241
3209
  } else {
3242
3210
  HTMLBridgeElement = function () {
@@ -3567,6 +3535,14 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
3567
3535
  * SPDX-License-Identifier: MIT
3568
3536
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3569
3537
  */
3538
+ /**
3539
+ * This module is responsible for producing the ComponentDef object that is always
3540
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3541
+ * instance of a component class, and shared across all instances.
3542
+ *
3543
+ * This structure can be used to synthetically create proxies, and understand the
3544
+ * shape of a component. It is also used internally to apply extra optimizations.
3545
+ */
3570
3546
  const CtorToDefMap = new WeakMap();
3571
3547
  function getCtorProto(Ctor) {
3572
3548
  let proto = getPrototypeOf$1(Ctor);
@@ -3792,6 +3768,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
3792
3768
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3793
3769
  */
3794
3770
  function makeHostToken(token) {
3771
+ // Note: if this ever changes, update the `cssScopeTokens` returned by `@lwc/compiler`
3795
3772
  return `${token}-host`;
3796
3773
  }
3797
3774
  function createInlineStyleVNode(content) {
@@ -4045,15 +4022,17 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4045
4022
  * SPDX-License-Identifier: MIT
4046
4023
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4047
4024
  */
4048
- const ColonCharCode$1 = 58;
4025
+ const ColonCharCode = 58;
4049
4026
  function patchAttributes(oldVnode, vnode, renderer) {
4050
4027
  const {
4051
- attrs
4028
+ attrs,
4029
+ external
4052
4030
  } = vnode.data;
4053
4031
  if (isUndefined$1(attrs)) {
4054
4032
  return;
4055
4033
  }
4056
4034
  const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
4035
+ // Attrs may be the same due to the static content optimization, so we can skip diffing
4057
4036
  if (oldAttrs === attrs) {
4058
4037
  return;
4059
4038
  }
@@ -4062,17 +4041,23 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4062
4041
  } = vnode;
4063
4042
  const {
4064
4043
  setAttribute,
4065
- removeAttribute
4044
+ removeAttribute,
4045
+ setProperty
4066
4046
  } = renderer;
4067
4047
  for (const key in attrs) {
4068
4048
  const cur = attrs[key];
4069
4049
  const old = oldAttrs[key];
4070
4050
  if (old !== cur) {
4071
- unlockAttribute(elm, key);
4072
- if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
4051
+ let propName;
4052
+ // For external custom elements, sniff to see if the attr should be considered a prop.
4053
+ // Use kebabCaseToCamelCase directly because we don't want to set props like `ariaLabel` or `tabIndex`
4054
+ // on a custom element versus just using the more reliable attribute format.
4055
+ if (external && (propName = kebabCaseToCamelCase(key)) in elm) {
4056
+ setProperty(elm, propName, cur);
4057
+ } else if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
4073
4058
  // Assume xml namespace
4074
4059
  setAttribute(elm, key, cur, XML_NAMESPACE);
4075
- } else if (StringCharCodeAt.call(key, 5) === ColonCharCode$1) {
4060
+ } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
4076
4061
  // Assume xlink namespace
4077
4062
  setAttribute(elm, key, cur, XLINK_NAMESPACE);
4078
4063
  } else if (isNull(cur) || isUndefined$1(cur)) {
@@ -4080,52 +4065,6 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4080
4065
  } else {
4081
4066
  setAttribute(elm, key, cur);
4082
4067
  }
4083
- lockAttribute();
4084
- }
4085
- }
4086
- }
4087
-
4088
- /*
4089
- * Copyright (c) 2018, salesforce.com, inc.
4090
- * All rights reserved.
4091
- * SPDX-License-Identifier: MIT
4092
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4093
- */
4094
- const ColonCharCode = 58;
4095
- function patchAttrUnlessProp(oldVnode, vnode, renderer) {
4096
- const {
4097
- data: {
4098
- attrs
4099
- },
4100
- elm
4101
- } = vnode;
4102
- if (isUndefined$1(attrs)) {
4103
- return;
4104
- }
4105
- const {
4106
- removeAttribute,
4107
- setAttribute,
4108
- setProperty
4109
- } = renderer;
4110
- const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
4111
- for (const name in attrs) {
4112
- const cur = attrs[name];
4113
- const old = oldAttrs[name];
4114
- if (old !== cur) {
4115
- const propName = htmlAttributeToProperty(name);
4116
- if (propName in elm) {
4117
- setProperty(elm, name, cur);
4118
- } else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
4119
- // Assume xml namespace
4120
- setAttribute(elm, name, cur, XML_NAMESPACE);
4121
- } else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
4122
- // Assume xlink namespace
4123
- setAttribute(elm, name, cur, XLINK_NAMESPACE);
4124
- } else if (isNull(cur) || isUndefined$1(cur)) {
4125
- removeAttribute(elm, name);
4126
- } else {
4127
- setAttribute(elm, name, cur);
4128
- }
4129
4068
  }
4130
4069
  }
4131
4070
  }
@@ -4155,6 +4094,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4155
4094
  if (!isNull(oldVnode)) {
4156
4095
  oldProps = oldVnode.data.props;
4157
4096
  const oldSpread = oldVnode.data.spread;
4097
+ // Props may be the same due to the static content optimization, so we can skip diffing
4158
4098
  if (oldProps === props && oldSpread === spread) {
4159
4099
  return;
4160
4100
  }
@@ -4303,12 +4243,11 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4303
4243
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4304
4244
  */
4305
4245
  function applyEventListeners(vnode, renderer) {
4246
+ var _a;
4306
4247
  const {
4307
- elm,
4308
- data: {
4309
- on
4310
- }
4248
+ elm
4311
4249
  } = vnode;
4250
+ const on = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.on;
4312
4251
  if (isUndefined$1(on)) {
4313
4252
  return;
4314
4253
  }
@@ -4566,6 +4505,8 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4566
4505
  }
4567
4506
  }
4568
4507
  insertNode(elm, parent, anchor, renderer);
4508
+ // Event listeners are only applied once when mounting, so they are allowed for static vnodes
4509
+ applyEventListeners(vnode, renderer);
4569
4510
  }
4570
4511
  function mountCustomElement(vnode, parent, anchor, renderer) {
4571
4512
  const {
@@ -4815,11 +4756,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
4815
4756
  // value is set before type=radio.
4816
4757
  patchClassAttribute(oldVnode, vnode, renderer);
4817
4758
  patchStyleAttribute(oldVnode, vnode, renderer);
4818
- if (vnode.data.external) {
4819
- patchAttrUnlessProp(oldVnode, vnode, renderer);
4820
- } else {
4821
- patchAttributes(oldVnode, vnode, renderer);
4822
- }
4759
+ patchAttributes(oldVnode, vnode, renderer);
4823
4760
  patchProps(oldVnode, vnode, renderer);
4824
4761
  }
4825
4762
  function applyStyleScoping(elm, owner, renderer) {
@@ -5225,15 +5162,22 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
5225
5162
  };
5226
5163
  }
5227
5164
  // [st]atic node
5228
- function st(fragment, key) {
5229
- return {
5165
+ function st(fragment, key, data) {
5166
+ const owner = getVMBeingRendered();
5167
+ const vnode = {
5230
5168
  type: 4 /* VNodeType.Static */,
5231
5169
  sel: undefined,
5232
5170
  key,
5233
5171
  elm: undefined,
5234
5172
  fragment,
5235
- owner: getVMBeingRendered()
5173
+ owner,
5174
+ data
5236
5175
  };
5176
+ const ref = data === null || data === void 0 ? void 0 : data.ref;
5177
+ if (!isUndefined$1(ref)) {
5178
+ setRefVNode(owner, ref, vnode);
5179
+ }
5180
+ return vnode;
5237
5181
  }
5238
5182
  // [fr]agment node
5239
5183
  function fr(key, children, stable) {
@@ -5335,7 +5279,14 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
5335
5279
  // undefined is for root components, but root components cannot accept slotted content
5336
5280
  setVMBeingRendered(slotset.owner);
5337
5281
  try {
5338
- ArrayPush$1.call(newChildren, vnode.factory(data.slotData, data.key));
5282
+ // The factory function is a template snippet from the slot set owner's template,
5283
+ // hence switch over to the slot set owner's template reactive observer
5284
+ const {
5285
+ tro
5286
+ } = slotset.owner;
5287
+ tro.observe(() => {
5288
+ ArrayPush$1.call(newChildren, vnode.factory(data.slotData, data.key));
5289
+ });
5339
5290
  } finally {
5340
5291
  setVMBeingRendered(vmBeingRenderedInception);
5341
5292
  }
@@ -7089,7 +7040,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7089
7040
  hasMismatch = false;
7090
7041
  runConnectedCallback(vm);
7091
7042
  hydrateVM(vm);
7092
- if (hasMismatch) {
7043
+ if (hasMismatch && process.env.NODE_ENV !== 'production') {
7093
7044
  logError('Hydration completed with errors.', vm);
7094
7045
  }
7095
7046
  }
@@ -7168,7 +7119,9 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7168
7119
  if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
7169
7120
  return attrName => !ArrayIncludes.call(optOutStaticProp, attrName);
7170
7121
  }
7171
- logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
7122
+ if (process.env.NODE_ENV !== 'production') {
7123
+ logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
7124
+ }
7172
7125
  return _attrName => true;
7173
7126
  }
7174
7127
  function hydrateText(node, vnode, renderer) {
@@ -7210,10 +7163,11 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7210
7163
  return node;
7211
7164
  }
7212
7165
  function hydrateStaticElement(elm, vnode, renderer) {
7213
- if (!areCompatibleNodes(vnode.fragment, elm, vnode, renderer)) {
7166
+ if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) || !areCompatibleNodes(vnode.fragment, elm, vnode, renderer)) {
7214
7167
  return handleMismatch(elm, vnode, renderer);
7215
7168
  }
7216
7169
  vnode.elm = elm;
7170
+ applyEventListeners(vnode, renderer);
7217
7171
  return elm;
7218
7172
  }
7219
7173
  function hydrateFragment(elm, vnode, renderer) {
@@ -7321,7 +7275,6 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7321
7275
  function hydrateChildren(node, children, parentNode, owner) {
7322
7276
  let hasWarned = false;
7323
7277
  let nextNode = node;
7324
- let anchor = null;
7325
7278
  const {
7326
7279
  renderer
7327
7280
  } = owner;
@@ -7330,7 +7283,6 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7330
7283
  if (!isNull(childVnode)) {
7331
7284
  if (nextNode) {
7332
7285
  nextNode = hydrateNode(nextNode, childVnode, renderer);
7333
- anchor = childVnode.elm;
7334
7286
  } else {
7335
7287
  hasMismatch = true;
7336
7288
  if (process.env.NODE_ENV !== 'production') {
@@ -7339,8 +7291,8 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7339
7291
  logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
7340
7292
  }
7341
7293
  }
7342
- mount(childVnode, parentNode, renderer, anchor);
7343
- anchor = childVnode.elm;
7294
+ mount(childVnode, parentNode, renderer, nextNode);
7295
+ nextNode = renderer.nextSibling(childVnode.elm);
7344
7296
  }
7345
7297
  }
7346
7298
  }
@@ -7607,7 +7559,9 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7607
7559
  const clientAttrsNames = getProperty(client, 'getAttributeNames').call(client);
7608
7560
  clientAttrsNames.forEach(attrName => {
7609
7561
  if (getAttribute(client, attrName) !== getAttribute(ssr, attrName)) {
7610
- logError(`Mismatch hydrating element <${getProperty(client, 'tagName').toLowerCase()}>: attribute "${attrName}" has different values, expected "${getAttribute(client, attrName)}" but found "${getAttribute(ssr, attrName)}"`, vnode.owner);
7562
+ if (process.env.NODE_ENV !== 'production') {
7563
+ logError(`Mismatch hydrating element <${getProperty(client, 'tagName').toLowerCase()}>: attribute "${attrName}" has different values, expected "${getAttribute(client, attrName)}" but found "${getAttribute(ssr, attrName)}"`, vnode.owner);
7564
+ }
7611
7565
  isCompatibleElements = false;
7612
7566
  }
7613
7567
  });
@@ -7867,7 +7821,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
7867
7821
  }
7868
7822
  return getReadOnlyProxy(obj);
7869
7823
  }
7870
- /* version: 2.45.2 */
7824
+ /** version: 2.50.0 */
7871
7825
 
7872
7826
  /*
7873
7827
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8112,7 +8066,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8112
8066
  // invokes the DOM api with an .apply() or .call() to initialize any DOM api sub-classing,
8113
8067
  // which are not equipped to be initialized that way.
8114
8068
  class clazz extends HTMLElementAlias {
8115
- /*LWC compiler v2.45.2*/
8069
+ /*LWC compiler v2.50.0*/
8116
8070
  }
8117
8071
  customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
8118
8072
  new clazz();
@@ -8170,7 +8124,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8170
8124
  // Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
8171
8125
  }
8172
8126
  }
8173
- /*LWC compiler v2.45.2*/
8127
+ /*LWC compiler v2.50.0*/
8174
8128
  }
8175
8129
  // Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
8176
8130
  // See: https://github.com/salesforce/lwc/pull/3162#issuecomment-1311851174
@@ -8251,8 +8205,9 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8251
8205
  */
8252
8206
  function rendererFactory(baseRenderer) {
8253
8207
  const renderer = function (exports) {
8208
+ /* proxy-compat-disable */
8254
8209
  /**
8255
- * Copyright (C) 2018 salesforce.com, inc.
8210
+ * Copyright (C) 2023 salesforce.com, inc.
8256
8211
  */
8257
8212
  /*
8258
8213
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8291,7 +8246,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8291
8246
  function isNull(obj) {
8292
8247
  return obj === null;
8293
8248
  }
8294
- /** version: 2.45.2 */
8249
+ /** version: 2.50.0 */
8295
8250
 
8296
8251
  /*
8297
8252
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8311,7 +8266,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8311
8266
  this.setNewContext = setNewContext;
8312
8267
  this.setDisconnectedCallback = setDisconnectedCallback;
8313
8268
  }
8314
- /*LWC compiler v2.45.2*/
8269
+ /*LWC compiler v2.50.0*/
8315
8270
  }
8316
8271
  function registerContextConsumer(elm, adapterContextToken, subscriptionPayload) {
8317
8272
  dispatchEvent(elm, new WireContextSubscriptionEvent(adapterContextToken, subscriptionPayload));
@@ -8701,7 +8656,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8701
8656
  attributeChangedCallback(name, oldValue, newValue) {
8702
8657
  attributeChangedCallback.call(this, name, oldValue, newValue);
8703
8658
  }
8704
- /*LWC compiler v2.45.2*/
8659
+ /*LWC compiler v2.50.0*/
8705
8660
  }, _a.observedAttributes = observedAttributes, _a;
8706
8661
  }
8707
8662
 
@@ -8915,7 +8870,7 @@ LWR.define('lwc/v/2_45_2', ['exports'], (function (exports) { 'use strict';
8915
8870
  });
8916
8871
  });
8917
8872
  }
8918
- /* version: 2.45.2 */
8873
+ /** version: 2.50.0 */
8919
8874
 
8920
8875
  exports.LightningElement = LightningElement;
8921
8876
  exports.__unstable__ProfilerControl = profilerControl;
@@ -1,10 +1,10 @@
1
- LWR.define('lwr/everywhereAmd/v/0_10_0-alpha_8', ['exports', 'lwr/vault/v/0_10_0-alpha_8'], (function (exports, _0_10_0Alpha_8) { 'use strict';
1
+ LWR.define('lwr/everywhereAmd/v/0_10_0', ['exports', 'lwr/vault/v/0_10_0'], (function (exports, _0_10_0) { 'use strict';
2
2
 
3
3
  // IMPORTANT: Do not add any static imports to this file that are not bundled with the amd-client
4
4
 
5
5
  // Do an OAuthed fetch
6
6
  async function authFetch(url, accept = 'javascript') {
7
- const authInfo = _0_10_0Alpha_8.getAuthInfo();
7
+ const authInfo = _0_10_0.getAuthInfo();
8
8
  if (authInfo) {
9
9
  return fetch(url, {
10
10
  headers: {
@@ -54,7 +54,7 @@ LWR.define('lwr/everywhereAmd/v/0_10_0-alpha_8', ['exports', 'lwr/vault/v/0_10_0
54
54
  function authenticate(authInfo) {
55
55
  // Put OAuth info into the vault
56
56
  if (authInfo) {
57
- _0_10_0Alpha_8.setAuthInfo(authInfo);
57
+ _0_10_0.setAuthInfo(authInfo);
58
58
  }
59
59
  }
60
60