@lwc/engine-core 8.5.0 → 8.6.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.
@@ -40,12 +40,6 @@ declare function ddc(sel: string, Ctor: LightningElementConstructor | null | und
40
40
  * @param children
41
41
  */
42
42
  declare function dc(Ctor: LightningElementConstructor | null | undefined, data: VElementData, children?: VNodes): VCustomElement | null;
43
- export type SanitizeHtmlContentHook = (content: unknown) => string;
44
- /**
45
- * Sets the sanitizeHtmlContentHook.
46
- * @param newHookImpl
47
- */
48
- export declare function setSanitizeHtmlContentHook(newHookImpl: SanitizeHtmlContentHook): void;
49
43
  declare function shc(content: unknown): SanitizedHtmlContent;
50
44
  /**
51
45
  * [ncls] - Normalize class name attribute.
@@ -12,7 +12,7 @@ export { getComponentDef, isComponentConstructor } from './def';
12
12
  export { profilerControl as __unstable__ProfilerControl } from './profiler';
13
13
  export { reportingControl as __unstable__ReportingControl } from './reporting';
14
14
  export { swapTemplate, swapComponent, swapStyle } from './hot-swaps';
15
- export { setHooks } from './overridable-hooks';
15
+ export { setHooks } from '@lwc/shared';
16
16
  export { freezeTemplate } from './freeze-template';
17
17
  export { getComponentAPIVersion } from './component';
18
18
  export { shouldBeFormAssociated } from './utils';
package/dist/index.cjs.js CHANGED
@@ -5784,26 +5784,9 @@ function sc(vnodes) {
5784
5784
  markAsDynamicChildren(vnodes);
5785
5785
  return vnodes;
5786
5786
  }
5787
- /**
5788
- * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
5789
- * libraries to sanitize HTML content. This hook process the content passed via the template to
5790
- * lwc:inner-html directive.
5791
- * It is meant to be overridden with setSanitizeHtmlContentHook, it throws an error by default.
5792
- */
5793
- let sanitizeHtmlContentHook = () => {
5794
- // locker-service patches this function during runtime to sanitize HTML content.
5795
- throw new Error('sanitizeHtmlContent hook must be implemented.');
5796
- };
5797
- /**
5798
- * Sets the sanitizeHtmlContentHook.
5799
- * @param newHookImpl
5800
- */
5801
- function setSanitizeHtmlContentHook(newHookImpl) {
5802
- sanitizeHtmlContentHook = newHookImpl;
5803
- }
5804
5787
  // [s]anitize [h]tml [c]ontent
5805
5788
  function shc(content) {
5806
- const sanitizedString = sanitizeHtmlContentHook(content);
5789
+ const sanitizedString = shared.sanitizeHtmlContent(content);
5807
5790
  return createSanitizedHtmlContent(sanitizedString);
5808
5791
  }
5809
5792
  /**
@@ -7857,7 +7840,7 @@ expectAddlSiblings) {
7857
7840
  }
7858
7841
  }
7859
7842
  mount(childVnode, parentNode, renderer, nextNode);
7860
- nextNode = renderer.nextSibling(childVnode.elm);
7843
+ nextNode = renderer.nextSibling(childVnode.type === 5 /* VNodeType.Fragment */ ? childVnode.trailing : childVnode.elm);
7861
7844
  }
7862
7845
  }
7863
7846
  }
@@ -8172,19 +8155,6 @@ function haveCompatibleStaticParts(vnode, renderer) {
8172
8155
  return true;
8173
8156
  }
8174
8157
 
8175
- /*
8176
- * Copyright (c) 2018, salesforce.com, inc.
8177
- * All rights reserved.
8178
- * SPDX-License-Identifier: MIT
8179
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8180
- */
8181
- let hooksAreSet = false;
8182
- function setHooks(hooks) {
8183
- shared.assert.isFalse(hooksAreSet, 'Hooks are already overridden, only one definition is allowed.');
8184
- hooksAreSet = true;
8185
- setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
8186
- }
8187
-
8188
8158
  /*
8189
8159
  * Copyright (c) 2024, Salesforce, Inc.
8190
8160
  * All rights reserved.
@@ -8447,6 +8417,10 @@ function readonly(obj) {
8447
8417
  return getReadOnlyProxy(obj);
8448
8418
  }
8449
8419
 
8420
+ Object.defineProperty(exports, "setHooks", {
8421
+ enumerable: true,
8422
+ get: function () { return shared.setHooks; }
8423
+ });
8450
8424
  Object.defineProperty(exports, "setTrustedSignalSet", {
8451
8425
  enumerable: true,
8452
8426
  get: function () { return shared.setTrustedSignalSet; }
@@ -8487,7 +8461,6 @@ exports.runFormDisabledCallback = runFormDisabledCallback;
8487
8461
  exports.runFormResetCallback = runFormResetCallback;
8488
8462
  exports.runFormStateRestoreCallback = runFormStateRestoreCallback;
8489
8463
  exports.sanitizeAttribute = sanitizeAttribute;
8490
- exports.setHooks = setHooks;
8491
8464
  exports.shouldBeFormAssociated = shouldBeFormAssociated;
8492
8465
  exports.swapComponent = swapComponent;
8493
8466
  exports.swapStyle = swapStyle;
@@ -8495,5 +8468,5 @@ exports.swapTemplate = swapTemplate;
8495
8468
  exports.track = track;
8496
8469
  exports.unwrap = unwrap;
8497
8470
  exports.wire = wire;
8498
- /** version: 8.5.0 */
8471
+ /** version: 8.6.0 */
8499
8472
  //# sourceMappingURL=index.cjs.js.map