@lwc/engine-core 7.1.2 → 7.2.1
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/framework/stylesheet.d.ts +2 -2
- package/dist/index.cjs.js +20 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +20 -19
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3129,15 +3129,22 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
3129
3129
|
function getStylesheetsContent(vm, template) {
|
|
3130
3130
|
const { stylesheets, stylesheetToken } = template;
|
|
3131
3131
|
const { stylesheets: vmStylesheets } = vm;
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3132
|
+
const hasTemplateStyles = hasStyles(stylesheets);
|
|
3133
|
+
const hasVmStyles = hasStyles(vmStylesheets);
|
|
3134
|
+
if (hasTemplateStyles) {
|
|
3135
|
+
const content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
|
|
3136
|
+
if (hasVmStyles) {
|
|
3137
|
+
// Slow path – merge the template styles and vm styles
|
|
3138
|
+
ArrayPush$1.apply(content, evaluateStylesheetsContent(vmStylesheets, stylesheetToken, vm));
|
|
3139
|
+
}
|
|
3140
|
+
return content;
|
|
3135
3141
|
}
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3142
|
+
if (hasVmStyles) {
|
|
3143
|
+
// No template styles, so return vm styles directly
|
|
3144
|
+
return evaluateStylesheetsContent(vmStylesheets, stylesheetToken, vm);
|
|
3139
3145
|
}
|
|
3140
|
-
return
|
|
3146
|
+
// Fastest path - no styles, so return an empty array
|
|
3147
|
+
return EmptyArray;
|
|
3141
3148
|
}
|
|
3142
3149
|
// It might be worth caching this to avoid doing the lookup repeatedly, but
|
|
3143
3150
|
// perf testing has not shown it to be a huge improvement yet:
|
|
@@ -5341,14 +5348,14 @@ function i(iterable, factory) {
|
|
|
5341
5348
|
// TODO [#1276]: compiler should give us some sort of indicator when a vnodes collection is dynamic
|
|
5342
5349
|
sc(list);
|
|
5343
5350
|
const vmBeingRendered = getVMBeingRendered();
|
|
5344
|
-
if (isUndefined$1(iterable) || iterable
|
|
5351
|
+
if (isUndefined$1(iterable) || isNull(iterable)) {
|
|
5345
5352
|
if (process.env.NODE_ENV !== 'production') {
|
|
5346
|
-
logError(`Invalid template iteration for value
|
|
5353
|
+
logError(`Invalid template iteration for value \`${toString$1(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`, vmBeingRendered);
|
|
5347
5354
|
}
|
|
5348
5355
|
return list;
|
|
5349
5356
|
}
|
|
5350
5357
|
if (process.env.NODE_ENV !== 'production') {
|
|
5351
|
-
assert.isFalse(isUndefined$1(iterable[SymbolIterator]), `Invalid template iteration for value \`${toString$1(iterable)}\` in ${vmBeingRendered}. It must be an array-like object
|
|
5358
|
+
assert.isFalse(isUndefined$1(iterable[SymbolIterator]), `Invalid template iteration for value \`${toString$1(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`);
|
|
5352
5359
|
}
|
|
5353
5360
|
const iterator = iterable[SymbolIterator]();
|
|
5354
5361
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5485,9 +5492,6 @@ function k(compilerKey, obj) {
|
|
|
5485
5492
|
function gid(id) {
|
|
5486
5493
|
const vmBeingRendered = getVMBeingRendered();
|
|
5487
5494
|
if (isUndefined$1(id) || id === '') {
|
|
5488
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
5489
|
-
logError(`Invalid id value "${id}". The id attribute must contain a non-empty string.`, vmBeingRendered);
|
|
5490
|
-
}
|
|
5491
5495
|
return id;
|
|
5492
5496
|
}
|
|
5493
5497
|
// We remove attributes when they are assigned a value of null
|
|
@@ -5504,11 +5508,6 @@ function gid(id) {
|
|
|
5504
5508
|
function fid(url) {
|
|
5505
5509
|
const vmBeingRendered = getVMBeingRendered();
|
|
5506
5510
|
if (isUndefined$1(url) || url === '') {
|
|
5507
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
5508
|
-
if (isUndefined$1(url)) {
|
|
5509
|
-
logError(`Undefined url value for "href" or "xlink:href" attribute. Expected a non-empty string.`, vmBeingRendered);
|
|
5510
|
-
}
|
|
5511
|
-
}
|
|
5512
5511
|
return url;
|
|
5513
5512
|
}
|
|
5514
5513
|
// We remove attributes when they are assigned a value of null
|
|
@@ -6548,6 +6547,8 @@ function computeShadowMode(def, owner, renderer, hydrated) {
|
|
|
6548
6547
|
// on, but components running in actual native shadow mode
|
|
6549
6548
|
(process.env.NODE_ENV === 'test-karma-lwc' &&
|
|
6550
6549
|
process.env.FORCE_NATIVE_SHADOW_MODE_FOR_TEST) ||
|
|
6550
|
+
// If synthetic shadow is explicitly disabled, use pure-native
|
|
6551
|
+
lwcRuntimeFlags.DISABLE_SYNTHETIC_SHADOW ||
|
|
6551
6552
|
// hydration only supports native shadow
|
|
6552
6553
|
isTrue(hydrated)) {
|
|
6553
6554
|
return 0 /* ShadowMode.Native */;
|
|
@@ -8044,5 +8045,5 @@ function readonly(obj) {
|
|
|
8044
8045
|
}
|
|
8045
8046
|
|
|
8046
8047
|
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 };
|
|
8047
|
-
/** version: 7.1
|
|
8048
|
+
/** version: 7.2.1 */
|
|
8048
8049
|
//# sourceMappingURL=index.js.map
|