@lwc/ssr-runtime 8.17.0-alpha.0 → 8.17.0-alpha.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/index.cjs.js +7 -30
- package/dist/index.js +7 -30
- package/dist/render.d.ts +3 -14
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
@@ -624,7 +624,7 @@ function normalizeTabIndex(value) {
|
|
624
624
|
const shouldNormalize = value > 0 && typeof value !== 'boolean';
|
625
625
|
return shouldNormalize ? 0 : value;
|
626
626
|
}
|
627
|
-
/** version: 8.
|
627
|
+
/** version: 8.16.2 */
|
628
628
|
|
629
629
|
/*
|
630
630
|
* Copyright (c) 2024, Salesforce, Inc.
|
@@ -1575,37 +1575,14 @@ function fallbackTmplNoYield(emit, shadowSlottedContent, _lightSlottedContent, _
|
|
1575
1575
|
}
|
1576
1576
|
}
|
1577
1577
|
class RenderContext {
|
1578
|
-
constructor(
|
1578
|
+
constructor(styleDedupePrefix, styleDedupeIsEnabled) {
|
1579
1579
|
this.stylesheetToId = new WeakMap();
|
1580
1580
|
this.nextId = 0;
|
1581
|
-
|
1582
|
-
|
1583
|
-
this.styleDedupeIsEnabled = true;
|
1584
|
-
}
|
1585
|
-
else {
|
1586
|
-
this.styleDedupePrefix = '';
|
1587
|
-
this.styleDedupeIsEnabled = false;
|
1588
|
-
}
|
1581
|
+
this.styleDedupeIsEnabled = styleDedupeIsEnabled;
|
1582
|
+
this.styleDedupePrefix = styleDedupePrefix;
|
1589
1583
|
}
|
1590
1584
|
}
|
1591
|
-
|
1592
|
-
* Create a string representing an LWC component for server-side rendering.
|
1593
|
-
* @param tagName The HTML tag name of the component
|
1594
|
-
* @param Component The `LightningElement` component constructor
|
1595
|
-
* @param props HTML attributes to provide for the root component
|
1596
|
-
* @param styleDedupe Provide a string key or `true` to enable style deduping via the `<lwc-style>`
|
1597
|
-
* helper. The key is used to avoid collisions of global IDs.
|
1598
|
-
* @param mode SSR render mode. Can be 'sync', 'async' or 'asyncYield'. Must match the render mode
|
1599
|
-
* used to compile your component.
|
1600
|
-
* @returns String representation of the component
|
1601
|
-
*/
|
1602
|
-
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupe = false, mode = DEFAULT_SSR_MODE) {
|
1603
|
-
// TODO [#5309]: Remove this warning after a single release
|
1604
|
-
if (process.env.NODE_ENV !== 'production') {
|
1605
|
-
if (arguments.length === 6 || !['sync', 'async', 'asyncYield'].includes(mode)) {
|
1606
|
-
throw new Error("The signature for @lwc/ssr-runtime's `renderComponent` has changed. There is now only one parameter for style dedupe.");
|
1607
|
-
}
|
1608
|
-
}
|
1585
|
+
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupePrefix = '', styleDedupeIsEnabled = false, mode = DEFAULT_SSR_MODE) {
|
1609
1586
|
if (typeof tagName !== 'string') {
|
1610
1587
|
throw new Error(`tagName must be a string, found: ${tagName}`);
|
1611
1588
|
}
|
@@ -1614,7 +1591,7 @@ async function serverSideRenderComponent(tagName, Component, props = {}, styleDe
|
|
1614
1591
|
const emit = (segment) => {
|
1615
1592
|
markup += segment;
|
1616
1593
|
};
|
1617
|
-
emit.cxt = new RenderContext(
|
1594
|
+
emit.cxt = new RenderContext(styleDedupePrefix, styleDedupeIsEnabled);
|
1618
1595
|
if (!generateMarkup) {
|
1619
1596
|
// If a non-component is accidentally provided, render an empty template
|
1620
1597
|
emit(`<${tagName}>`);
|
@@ -1922,5 +1899,5 @@ exports.track = track;
|
|
1922
1899
|
exports.unwrap = unwrap$1;
|
1923
1900
|
exports.validateStyleTextContents = validateStyleTextContents;
|
1924
1901
|
exports.wire = wire;
|
1925
|
-
/** version: 8.
|
1902
|
+
/** version: 8.16.2 */
|
1926
1903
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
@@ -620,7 +620,7 @@ function normalizeTabIndex(value) {
|
|
620
620
|
const shouldNormalize = value > 0 && typeof value !== 'boolean';
|
621
621
|
return shouldNormalize ? 0 : value;
|
622
622
|
}
|
623
|
-
/** version: 8.
|
623
|
+
/** version: 8.16.2 */
|
624
624
|
|
625
625
|
/*
|
626
626
|
* Copyright (c) 2024, Salesforce, Inc.
|
@@ -1571,37 +1571,14 @@ function fallbackTmplNoYield(emit, shadowSlottedContent, _lightSlottedContent, _
|
|
1571
1571
|
}
|
1572
1572
|
}
|
1573
1573
|
class RenderContext {
|
1574
|
-
constructor(
|
1574
|
+
constructor(styleDedupePrefix, styleDedupeIsEnabled) {
|
1575
1575
|
this.stylesheetToId = new WeakMap();
|
1576
1576
|
this.nextId = 0;
|
1577
|
-
|
1578
|
-
|
1579
|
-
this.styleDedupeIsEnabled = true;
|
1580
|
-
}
|
1581
|
-
else {
|
1582
|
-
this.styleDedupePrefix = '';
|
1583
|
-
this.styleDedupeIsEnabled = false;
|
1584
|
-
}
|
1577
|
+
this.styleDedupeIsEnabled = styleDedupeIsEnabled;
|
1578
|
+
this.styleDedupePrefix = styleDedupePrefix;
|
1585
1579
|
}
|
1586
1580
|
}
|
1587
|
-
|
1588
|
-
* Create a string representing an LWC component for server-side rendering.
|
1589
|
-
* @param tagName The HTML tag name of the component
|
1590
|
-
* @param Component The `LightningElement` component constructor
|
1591
|
-
* @param props HTML attributes to provide for the root component
|
1592
|
-
* @param styleDedupe Provide a string key or `true` to enable style deduping via the `<lwc-style>`
|
1593
|
-
* helper. The key is used to avoid collisions of global IDs.
|
1594
|
-
* @param mode SSR render mode. Can be 'sync', 'async' or 'asyncYield'. Must match the render mode
|
1595
|
-
* used to compile your component.
|
1596
|
-
* @returns String representation of the component
|
1597
|
-
*/
|
1598
|
-
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupe = false, mode = DEFAULT_SSR_MODE) {
|
1599
|
-
// TODO [#5309]: Remove this warning after a single release
|
1600
|
-
if (process.env.NODE_ENV !== 'production') {
|
1601
|
-
if (arguments.length === 6 || !['sync', 'async', 'asyncYield'].includes(mode)) {
|
1602
|
-
throw new Error("The signature for @lwc/ssr-runtime's `renderComponent` has changed. There is now only one parameter for style dedupe.");
|
1603
|
-
}
|
1604
|
-
}
|
1581
|
+
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupePrefix = '', styleDedupeIsEnabled = false, mode = DEFAULT_SSR_MODE) {
|
1605
1582
|
if (typeof tagName !== 'string') {
|
1606
1583
|
throw new Error(`tagName must be a string, found: ${tagName}`);
|
1607
1584
|
}
|
@@ -1610,7 +1587,7 @@ async function serverSideRenderComponent(tagName, Component, props = {}, styleDe
|
|
1610
1587
|
const emit = (segment) => {
|
1611
1588
|
markup += segment;
|
1612
1589
|
};
|
1613
|
-
emit.cxt = new RenderContext(
|
1590
|
+
emit.cxt = new RenderContext(styleDedupePrefix, styleDedupeIsEnabled);
|
1614
1591
|
if (!generateMarkup) {
|
1615
1592
|
// If a non-component is accidentally provided, render an empty template
|
1616
1593
|
emit(`<${tagName}>`);
|
@@ -1872,5 +1849,5 @@ function createContextProvider(adapter) {
|
|
1872
1849
|
}
|
1873
1850
|
|
1874
1851
|
export { ClassList, LightningElement, SYMBOL__DEFAULT_TEMPLATE, SYMBOL__GENERATE_MARKUP, SYMBOL__SET_INTERNALS, api, connectContext, createContextProvider, createElement, establishContextfulRelationship, fallbackTmpl, fallbackTmplNoYield, freezeTemplate, getComponentDef, hasScopedStaticStylesheets, hot, htmlEscape, isComponentConstructor, mutationTracker, normalizeClass, normalizeTabIndex, 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 };
|
1875
|
-
/** version: 8.
|
1852
|
+
/** version: 8.16.2 */
|
1876
1853
|
//# sourceMappingURL=index.js.map
|
package/dist/render.d.ts
CHANGED
@@ -53,22 +53,11 @@ interface ComponentWithGenerateMarkup extends LightningElementConstructor {
|
|
53
53
|
}
|
54
54
|
export declare class RenderContext {
|
55
55
|
styleDedupeIsEnabled: boolean;
|
56
|
-
styleDedupePrefix: string;
|
57
56
|
stylesheetToId: WeakMap<Stylesheet, string>;
|
57
|
+
styleDedupePrefix: string;
|
58
58
|
nextId: number;
|
59
|
-
constructor(
|
59
|
+
constructor(styleDedupePrefix: string, styleDedupeIsEnabled: boolean);
|
60
60
|
}
|
61
|
-
|
62
|
-
* Create a string representing an LWC component for server-side rendering.
|
63
|
-
* @param tagName The HTML tag name of the component
|
64
|
-
* @param Component The `LightningElement` component constructor
|
65
|
-
* @param props HTML attributes to provide for the root component
|
66
|
-
* @param styleDedupe Provide a string key or `true` to enable style deduping via the `<lwc-style>`
|
67
|
-
* helper. The key is used to avoid collisions of global IDs.
|
68
|
-
* @param mode SSR render mode. Can be 'sync', 'async' or 'asyncYield'. Must match the render mode
|
69
|
-
* used to compile your component.
|
70
|
-
* @returns String representation of the component
|
71
|
-
*/
|
72
|
-
export declare function serverSideRenderComponent(tagName: string, Component: ComponentWithGenerateMarkup, props?: Properties, styleDedupe?: string | boolean, mode?: CompilationMode): Promise<string>;
|
61
|
+
export declare function serverSideRenderComponent(tagName: string, Component: ComponentWithGenerateMarkup, props?: Properties, styleDedupePrefix?: string, styleDedupeIsEnabled?: boolean, mode?: CompilationMode): Promise<string>;
|
73
62
|
export {};
|
74
63
|
//# sourceMappingURL=render.d.ts.map
|
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.17.0-alpha.
|
7
|
+
"version": "8.17.0-alpha.1",
|
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.17.0-alpha.
|
52
|
-
"@lwc/engine-core": "8.17.0-alpha.
|
51
|
+
"@lwc/shared": "8.17.0-alpha.1",
|
52
|
+
"@lwc/engine-core": "8.17.0-alpha.1",
|
53
53
|
"observable-membrane": "2.0.0"
|
54
54
|
}
|
55
55
|
}
|