@lwc/engine-core 7.2.3 → 7.2.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.
- package/dist/index.cjs.js +19 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -5852,6 +5852,12 @@ function getVMBeingRendered() {
|
|
|
5852
5852
|
function setVMBeingRendered(vm) {
|
|
5853
5853
|
vmBeingRendered = vm;
|
|
5854
5854
|
}
|
|
5855
|
+
const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_.]+$/;
|
|
5856
|
+
// See W-16614556
|
|
5857
|
+
// TODO [#2826]: freeze the template object
|
|
5858
|
+
function isValidScopeToken(token) {
|
|
5859
|
+
return isString(token) && VALID_SCOPE_TOKEN_REGEX.test(token);
|
|
5860
|
+
}
|
|
5855
5861
|
function validateSlots(vm) {
|
|
5856
5862
|
assertNotProd(); // this method should never leak to prod
|
|
5857
5863
|
const { cmpSlots } = vm;
|
|
@@ -6003,6 +6009,11 @@ function buildParseFragmentFn(createFragmentFn) {
|
|
|
6003
6009
|
return cached;
|
|
6004
6010
|
}
|
|
6005
6011
|
}
|
|
6012
|
+
// See W-16614556
|
|
6013
|
+
if ((hasStyleToken && !isValidScopeToken(stylesheetToken)) ||
|
|
6014
|
+
(hasLegacyToken && !isValidScopeToken(legacyStylesheetToken))) {
|
|
6015
|
+
throw new Error('stylesheet token must be a valid string');
|
|
6016
|
+
}
|
|
6006
6017
|
// If legacy stylesheet tokens are required, then add them to the rendered string
|
|
6007
6018
|
const stylesheetTokenToRender = stylesheetToken + (hasLegacyToken ? ` ${legacyStylesheetToken}` : '');
|
|
6008
6019
|
const classToken = hasScopedStyles && hasStyleToken ? ' ' + stylesheetTokenToRender : '';
|
|
@@ -7826,7 +7837,13 @@ function setHooks(hooks) {
|
|
|
7826
7837
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
7827
7838
|
*/
|
|
7828
7839
|
// See @lwc/engine-core/src/framework/template.ts
|
|
7829
|
-
const TEMPLATE_PROPS = [
|
|
7840
|
+
const TEMPLATE_PROPS = [
|
|
7841
|
+
'slots',
|
|
7842
|
+
'stylesheetToken',
|
|
7843
|
+
'stylesheets',
|
|
7844
|
+
'renderMode',
|
|
7845
|
+
'legacyStylesheetToken',
|
|
7846
|
+
];
|
|
7830
7847
|
// Expandos that may be placed on a stylesheet factory function, and which are meaningful to LWC at runtime
|
|
7831
7848
|
const STYLESHEET_PROPS = [
|
|
7832
7849
|
// SEE `KEY__SCOPED_CSS` in @lwc/style-compiler
|
|
@@ -8076,5 +8093,5 @@ function readonly(obj) {
|
|
|
8076
8093
|
}
|
|
8077
8094
|
|
|
8078
8095
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, setHooks, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
8079
|
-
/** version: 7.2.
|
|
8096
|
+
/** version: 7.2.5 */
|
|
8080
8097
|
//# sourceMappingURL=index.js.map
|