@lwc/ssr-runtime 8.12.4 → 8.12.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +9 -9
- package/dist/index.js +9 -9
- package/dist/render.d.ts +5 -5
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
@@ -631,7 +631,7 @@ function setHooks(hooks) {
|
|
631
631
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
632
632
|
*/
|
633
633
|
const DEFAULT_SSR_MODE = 'sync';
|
634
|
-
/** version: 8.12.
|
634
|
+
/** version: 8.12.5 */
|
635
635
|
|
636
636
|
/*
|
637
637
|
* Copyright (c) 2024, Salesforce, Inc.
|
@@ -1488,7 +1488,6 @@ defineProperties(LightningElement.prototype, descriptors);
|
|
1488
1488
|
* SPDX-License-Identifier: MIT
|
1489
1489
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
1490
1490
|
*/
|
1491
|
-
const escapeAttrVal = (attrValue) => attrValue.replaceAll('&', '&').replaceAll('"', '"');
|
1492
1491
|
function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
1493
1492
|
// The scopeToken is e.g. `lwc-xyz123` which is the token our parent gives us.
|
1494
1493
|
// The hostScopeToken is e.g. `lwc-abc456-host` which is the token for our own component.
|
@@ -1522,7 +1521,8 @@ function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
|
1522
1521
|
hasClassAttribute = true;
|
1523
1522
|
}
|
1524
1523
|
}
|
1525
|
-
result +=
|
1524
|
+
result +=
|
1525
|
+
attrValue === '' ? ` ${attrName}` : ` ${attrName}="${htmlEscape(attrValue, true)}"`;
|
1526
1526
|
}
|
1527
1527
|
// If we didn't render any `class` attribute, render one for the scope token(s)
|
1528
1528
|
if (!hasClassAttribute && combinedScopeToken) {
|
@@ -1541,12 +1541,12 @@ function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
|
|
1541
1541
|
function renderAttrsNoYield(emit, instance, attrs, hostScopeToken, scopeToken) {
|
1542
1542
|
emit(renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken));
|
1543
1543
|
}
|
1544
|
-
function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, Cmp, _instance) {
|
1544
|
+
function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
|
1545
1545
|
if (Cmp.renderMode !== 'light') {
|
1546
1546
|
yield '<template shadowrootmode="open"></template>';
|
1547
1547
|
}
|
1548
1548
|
}
|
1549
|
-
function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, Cmp, _instance) {
|
1549
|
+
function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
|
1550
1550
|
if (Cmp.renderMode !== 'light') {
|
1551
1551
|
emit('<template shadowrootmode="open"></template>');
|
1552
1552
|
}
|
@@ -1561,15 +1561,15 @@ async function serverSideRenderComponent(tagName, Component, props = {}, mode =
|
|
1561
1561
|
markup += segment;
|
1562
1562
|
};
|
1563
1563
|
if (mode === 'asyncYield') {
|
1564
|
-
for await (const segment of generateMarkup(tagName, props, null, null, null, null, null, null)) {
|
1564
|
+
for await (const segment of generateMarkup(tagName, props, null, null, null, null, null, null, null)) {
|
1565
1565
|
markup += segment;
|
1566
1566
|
}
|
1567
1567
|
}
|
1568
1568
|
else if (mode === 'async') {
|
1569
|
-
await generateMarkup(emit, tagName, props, null, null, null, null, null, null);
|
1569
|
+
await generateMarkup(emit, tagName, props, null, null, null, null, null, null, null);
|
1570
1570
|
}
|
1571
1571
|
else if (mode === 'sync') {
|
1572
|
-
generateMarkup(emit, tagName, props, null, null, null, null, null, null);
|
1572
|
+
generateMarkup(emit, tagName, props, null, null, null, null, null, null, null);
|
1573
1573
|
}
|
1574
1574
|
else {
|
1575
1575
|
throw new Error(`Invalid mode: ${mode}`);
|
@@ -1839,5 +1839,5 @@ exports.track = track;
|
|
1839
1839
|
exports.unwrap = unwrap$1;
|
1840
1840
|
exports.validateStyleTextContents = validateStyleTextContents;
|
1841
1841
|
exports.wire = wire;
|
1842
|
-
/** version: 8.12.
|
1842
|
+
/** version: 8.12.5 */
|
1843
1843
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
@@ -627,7 +627,7 @@ function setHooks(hooks) {
|
|
627
627
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
628
628
|
*/
|
629
629
|
const DEFAULT_SSR_MODE = 'sync';
|
630
|
-
/** version: 8.12.
|
630
|
+
/** version: 8.12.5 */
|
631
631
|
|
632
632
|
/*
|
633
633
|
* Copyright (c) 2024, Salesforce, Inc.
|
@@ -1484,7 +1484,6 @@ defineProperties(LightningElement.prototype, descriptors);
|
|
1484
1484
|
* SPDX-License-Identifier: MIT
|
1485
1485
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
1486
1486
|
*/
|
1487
|
-
const escapeAttrVal = (attrValue) => attrValue.replaceAll('&', '&').replaceAll('"', '"');
|
1488
1487
|
function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
1489
1488
|
// The scopeToken is e.g. `lwc-xyz123` which is the token our parent gives us.
|
1490
1489
|
// The hostScopeToken is e.g. `lwc-abc456-host` which is the token for our own component.
|
@@ -1518,7 +1517,8 @@ function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
|
1518
1517
|
hasClassAttribute = true;
|
1519
1518
|
}
|
1520
1519
|
}
|
1521
|
-
result +=
|
1520
|
+
result +=
|
1521
|
+
attrValue === '' ? ` ${attrName}` : ` ${attrName}="${htmlEscape(attrValue, true)}"`;
|
1522
1522
|
}
|
1523
1523
|
// If we didn't render any `class` attribute, render one for the scope token(s)
|
1524
1524
|
if (!hasClassAttribute && combinedScopeToken) {
|
@@ -1537,12 +1537,12 @@ function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
|
|
1537
1537
|
function renderAttrsNoYield(emit, instance, attrs, hostScopeToken, scopeToken) {
|
1538
1538
|
emit(renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken));
|
1539
1539
|
}
|
1540
|
-
function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, Cmp, _instance) {
|
1540
|
+
function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
|
1541
1541
|
if (Cmp.renderMode !== 'light') {
|
1542
1542
|
yield '<template shadowrootmode="open"></template>';
|
1543
1543
|
}
|
1544
1544
|
}
|
1545
|
-
function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, Cmp, _instance) {
|
1545
|
+
function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
|
1546
1546
|
if (Cmp.renderMode !== 'light') {
|
1547
1547
|
emit('<template shadowrootmode="open"></template>');
|
1548
1548
|
}
|
@@ -1557,15 +1557,15 @@ async function serverSideRenderComponent(tagName, Component, props = {}, mode =
|
|
1557
1557
|
markup += segment;
|
1558
1558
|
};
|
1559
1559
|
if (mode === 'asyncYield') {
|
1560
|
-
for await (const segment of generateMarkup(tagName, props, null, null, null, null, null, null)) {
|
1560
|
+
for await (const segment of generateMarkup(tagName, props, null, null, null, null, null, null, null)) {
|
1561
1561
|
markup += segment;
|
1562
1562
|
}
|
1563
1563
|
}
|
1564
1564
|
else if (mode === 'async') {
|
1565
|
-
await generateMarkup(emit, tagName, props, null, null, null, null, null, null);
|
1565
|
+
await generateMarkup(emit, tagName, props, null, null, null, null, null, null, null);
|
1566
1566
|
}
|
1567
1567
|
else if (mode === 'sync') {
|
1568
|
-
generateMarkup(emit, tagName, props, null, null, null, null, null, null);
|
1568
|
+
generateMarkup(emit, tagName, props, null, null, null, null, null, null, null);
|
1569
1569
|
}
|
1570
1570
|
else {
|
1571
1571
|
throw new Error(`Invalid mode: ${mode}`);
|
@@ -1789,5 +1789,5 @@ function createContextProvider(adapter) {
|
|
1789
1789
|
}
|
1790
1790
|
|
1791
1791
|
export { ClassList, LightningElement, SYMBOL__DEFAULT_TEMPLATE, SYMBOL__GENERATE_MARKUP, SYMBOL__SET_INTERNALS, api, connectContext, createContextProvider, createElement, establishContextfulRelationship, fallbackTmpl, fallbackTmplNoYield, freezeTemplate, getComponentDef, getReadOnlyProxy, hasScopedStaticStylesheets, hot, htmlEscape, isComponentConstructor, mutationTracker, normalizeClass, normalizeTextContent, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, renderAttrs, renderAttrsNoYield, serverSideRenderComponent as renderComponent, renderStylesheets, renderTextContent, renderer, sanitizeAttribute, sanitizeHtmlContent, serverSideRenderComponent, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, toIteratorDirective, track, unwrap$1 as unwrap, validateStyleTextContents, wire };
|
1792
|
-
/** version: 8.12.
|
1792
|
+
/** version: 8.12.5 */
|
1793
1793
|
//# sourceMappingURL=index.js.map
|
package/dist/render.d.ts
CHANGED
@@ -3,11 +3,11 @@ import type { LightningElement, LightningElementConstructor } from './lightning-
|
|
3
3
|
import type { Attributes, Properties } from './types';
|
4
4
|
export declare function renderAttrs(instance: LightningElement, attrs: Attributes, hostScopeToken: string | undefined, scopeToken: string | undefined): Generator<string, void, unknown>;
|
5
5
|
export declare function renderAttrsNoYield(emit: (segment: string) => void, instance: LightningElement, attrs: Attributes, hostScopeToken: string | undefined, scopeToken: string | undefined): void;
|
6
|
-
export declare function fallbackTmpl(_shadowSlottedContent: unknown, _lightSlottedContent: unknown, Cmp: LightningElementConstructor, _instance: unknown): Generator<string, void, unknown>;
|
7
|
-
export declare function fallbackTmplNoYield(emit: (segment: string) => void, _shadowSlottedContent: unknown, _lightSlottedContent: unknown, Cmp: LightningElementConstructor, _instance: unknown): void;
|
8
|
-
export type GenerateMarkupFn = (tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => AsyncGenerator<string>;
|
9
|
-
export type GenerateMarkupFnAsyncNoGen = (emit: (segment: string) => void, tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => Promise<void>;
|
10
|
-
export type GenerateMarkupFnSyncNoGen = (emit: (segment: string) => void, tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => void;
|
6
|
+
export declare function fallbackTmpl(_shadowSlottedContent: unknown, _lightSlottedContent: unknown, _scopedSlottedContent: unknown, Cmp: LightningElementConstructor, _instance: unknown): Generator<string, void, unknown>;
|
7
|
+
export declare function fallbackTmplNoYield(emit: (segment: string) => void, _shadowSlottedContent: unknown, _lightSlottedContent: unknown, _scopedSlottedContent: unknown, Cmp: LightningElementConstructor, _instance: unknown): void;
|
8
|
+
export type GenerateMarkupFn = (tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, scopedSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => AsyncGenerator<string>;
|
9
|
+
export type GenerateMarkupFnAsyncNoGen = (emit: (segment: string) => void, tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, scopedSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => Promise<void>;
|
10
|
+
export type GenerateMarkupFnSyncNoGen = (emit: (segment: string) => void, tagName: string, props: Properties | null, attrs: Attributes | null, shadowSlottedContent: AsyncGenerator<string> | null, lightSlottedContent: Record<number | string, AsyncGenerator<string>> | null, scopedSlottedContent: Record<number | string, AsyncGenerator<string>> | null, parent: LightningElement | null, scopeToken: string | null, contextfulParent: LightningElement | null) => void;
|
11
11
|
type GenerateMarkupFnVariants = GenerateMarkupFn | GenerateMarkupFnAsyncNoGen | GenerateMarkupFnSyncNoGen;
|
12
12
|
interface ComponentWithGenerateMarkup {
|
13
13
|
[SYMBOL__GENERATE_MARKUP]: GenerateMarkupFnVariants;
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
|
5
5
|
],
|
6
6
|
"name": "@lwc/ssr-runtime",
|
7
|
-
"version": "8.12.
|
7
|
+
"version": "8.12.5",
|
8
8
|
"description": "Runtime complement to @lwc/ssr-compiler",
|
9
9
|
"keywords": [
|
10
10
|
"lwc",
|
@@ -48,8 +48,8 @@
|
|
48
48
|
}
|
49
49
|
},
|
50
50
|
"devDependencies": {
|
51
|
-
"@lwc/shared": "8.12.
|
52
|
-
"@lwc/engine-core": "8.12.
|
51
|
+
"@lwc/shared": "8.12.5",
|
52
|
+
"@lwc/engine-core": "8.12.5",
|
53
53
|
"observable-membrane": "2.0.0"
|
54
54
|
}
|
55
55
|
}
|