@lwc/ssr-runtime 8.23.0 → 8.25.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.
- package/dist/index.cjs.js +31 -38
- package/dist/index.js +31 -38
- package/dist/render.d.ts +9 -10
- package/dist/styles.d.ts +1 -4
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -643,7 +643,7 @@ let trustedSignals;
|
|
|
643
643
|
function setTrustedSignalSet(signals) {
|
|
644
644
|
isFalse$1(trustedSignals, 'Trusted Signal Set is already set!');
|
|
645
645
|
trustedSignals = signals;
|
|
646
|
-
// Only used in LWC's
|
|
646
|
+
// Only used in LWC's integration tests. Contained within the set function as there are multiple imports of
|
|
647
647
|
// this module. Placing it here ensures we reference the import where the trustedSignals set is maintained
|
|
648
648
|
if (process.env.NODE_ENV === 'test-lwc-integration') {
|
|
649
649
|
// Used to reset the global state between test runs
|
|
@@ -680,7 +680,7 @@ function normalizeTabIndex(value) {
|
|
|
680
680
|
const shouldNormalize = value > 0 && typeof value !== 'boolean';
|
|
681
681
|
return shouldNormalize ? 0 : value;
|
|
682
682
|
}
|
|
683
|
-
/** version: 8.
|
|
683
|
+
/** version: 8.25.0 */
|
|
684
684
|
|
|
685
685
|
/**
|
|
686
686
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -704,7 +704,7 @@ function normalizeTabIndex(value) {
|
|
|
704
704
|
* @param value
|
|
705
705
|
* @param msg
|
|
706
706
|
*/
|
|
707
|
-
/** version: 8.
|
|
707
|
+
/** version: 8.25.0 */
|
|
708
708
|
|
|
709
709
|
/*
|
|
710
710
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -728,7 +728,7 @@ class SignalBaseClass {
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
/** version: 8.
|
|
731
|
+
/** version: 8.25.0 */
|
|
732
732
|
|
|
733
733
|
/**
|
|
734
734
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -790,7 +790,7 @@ function setFeatureFlag(name, value) {
|
|
|
790
790
|
console.info(`Attempt to set a value on an unknown feature flag "${name}" resulted in a NOOP.`);
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
|
-
// This may seem redundant, but `process.env.NODE_ENV === 'test-lwc-integration'` is replaced by
|
|
793
|
+
// This may seem redundant, but `process.env.NODE_ENV === 'test-lwc-integration'` is replaced by integration tests
|
|
794
794
|
if (process.env.NODE_ENV === 'test-lwc-integration' || process.env.NODE_ENV !== 'production') {
|
|
795
795
|
// Allow the same flag to be set more than once outside of production to enable testing
|
|
796
796
|
flags[name] = value;
|
|
@@ -819,7 +819,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
819
819
|
setFeatureFlag(name, value);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
/** version: 8.
|
|
822
|
+
/** version: 8.25.0 */
|
|
823
823
|
|
|
824
824
|
/*
|
|
825
825
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -1868,10 +1868,10 @@ function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
|
|
1868
1868
|
function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
|
|
1869
1869
|
yield renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken);
|
|
1870
1870
|
}
|
|
1871
|
-
function renderAttrsNoYield(
|
|
1872
|
-
|
|
1871
|
+
function renderAttrsNoYield(instance, attrs, hostScopeToken, scopeToken) {
|
|
1872
|
+
return renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken);
|
|
1873
1873
|
}
|
|
1874
|
-
async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
|
|
1874
|
+
async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance, _renderContext) {
|
|
1875
1875
|
if (Cmp.renderMode !== 'light') {
|
|
1876
1876
|
yield `<template shadowrootmode="open"></template>`;
|
|
1877
1877
|
if (shadowSlottedContent) {
|
|
@@ -1879,13 +1879,15 @@ async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scoped
|
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
}
|
|
1882
|
-
function fallbackTmplNoYield(
|
|
1882
|
+
function fallbackTmplNoYield(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance, _renderContext) {
|
|
1883
|
+
let markup = '';
|
|
1883
1884
|
if (Cmp.renderMode !== 'light') {
|
|
1884
|
-
|
|
1885
|
+
markup += '<template shadowrootmode="open"></template>';
|
|
1885
1886
|
if (shadowSlottedContent) {
|
|
1886
|
-
shadowSlottedContent(
|
|
1887
|
+
markup += shadowSlottedContent(instance);
|
|
1887
1888
|
}
|
|
1888
1889
|
}
|
|
1890
|
+
return markup;
|
|
1889
1891
|
}
|
|
1890
1892
|
function addSlottedContent(name, fn, contentMap) {
|
|
1891
1893
|
const contentList = contentMap[name];
|
|
@@ -1909,6 +1911,9 @@ class RenderContext {
|
|
|
1909
1911
|
this.styleDedupeIsEnabled = false;
|
|
1910
1912
|
}
|
|
1911
1913
|
}
|
|
1914
|
+
getNextId() {
|
|
1915
|
+
return this.nextId++;
|
|
1916
|
+
}
|
|
1912
1917
|
}
|
|
1913
1918
|
/**
|
|
1914
1919
|
* Create a string representing an LWC component for server-side rendering.
|
|
@@ -1922,45 +1927,37 @@ class RenderContext {
|
|
|
1922
1927
|
* @returns String representation of the component
|
|
1923
1928
|
*/
|
|
1924
1929
|
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupe = false, mode = DEFAULT_SSR_MODE) {
|
|
1925
|
-
// TODO [#5309]: Remove this warning after a single release
|
|
1926
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1927
|
-
if (arguments.length === 6 || !['sync', 'async', 'asyncYield'].includes(mode)) {
|
|
1928
|
-
throw new Error("The signature for @lwc/ssr-runtime's `renderComponent` has changed. There is now only one parameter for style dedupe.");
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
1930
|
if (typeof tagName !== 'string') {
|
|
1932
1931
|
throw new Error(`tagName must be a string, found: ${tagName}`);
|
|
1933
1932
|
}
|
|
1934
1933
|
const generateMarkup = Component[SYMBOL__GENERATE_MARKUP];
|
|
1935
|
-
|
|
1936
|
-
const emit = (segment) => {
|
|
1937
|
-
markup += segment;
|
|
1938
|
-
};
|
|
1939
|
-
emit.cxt = new RenderContext(styleDedupe);
|
|
1934
|
+
const renderContext = new RenderContext(styleDedupe);
|
|
1940
1935
|
if (!generateMarkup) {
|
|
1941
1936
|
// If a non-component is accidentally provided, render an empty template
|
|
1942
|
-
|
|
1937
|
+
let markup = `<${tagName}>`;
|
|
1938
|
+
fallbackTmplNoYield(null, null, null, Component,
|
|
1943
1939
|
// Using a false type assertion for the `instance` param is safe because it's only used
|
|
1944
1940
|
// if there's slotted content, which we are not providing
|
|
1945
|
-
|
|
1946
|
-
|
|
1941
|
+
null);
|
|
1942
|
+
markup += `</${tagName}>`;
|
|
1947
1943
|
return markup;
|
|
1948
1944
|
}
|
|
1949
1945
|
if (mode === 'asyncYield') {
|
|
1950
|
-
|
|
1946
|
+
let markup = '';
|
|
1947
|
+
for await (const segment of generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null)) {
|
|
1951
1948
|
markup += segment;
|
|
1952
1949
|
}
|
|
1950
|
+
return markup;
|
|
1953
1951
|
}
|
|
1954
1952
|
else if (mode === 'async') {
|
|
1955
|
-
await generateMarkup(
|
|
1953
|
+
return await generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null);
|
|
1956
1954
|
}
|
|
1957
1955
|
else if (mode === 'sync') {
|
|
1958
|
-
generateMarkup(
|
|
1956
|
+
return generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null);
|
|
1959
1957
|
}
|
|
1960
1958
|
else {
|
|
1961
1959
|
throw new Error(`Invalid mode: ${mode}`);
|
|
1962
1960
|
}
|
|
1963
|
-
return markup;
|
|
1964
1961
|
}
|
|
1965
1962
|
|
|
1966
1963
|
/*
|
|
@@ -2064,11 +2061,7 @@ function hasScopedStaticStylesheets(Component) {
|
|
|
2064
2061
|
});
|
|
2065
2062
|
return scoped;
|
|
2066
2063
|
}
|
|
2067
|
-
function renderStylesheets(
|
|
2068
|
-
// FIXME: the `emit` function does not exist in the SSR's compiler's yield mode. If we
|
|
2069
|
-
// are going to use it to transport the RenderContext down the call stack, we'll need to figure out
|
|
2070
|
-
// how to make htat work in yield mode.
|
|
2071
|
-
emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToken, Component, hasScopedTemplateStyles) {
|
|
2064
|
+
function renderStylesheets(renderContext, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToken, Component, hasScopedTemplateStyles) {
|
|
2072
2065
|
const hasAnyScopedStyles = hasScopedTemplateStyles || hasScopedStaticStylesheets(Component);
|
|
2073
2066
|
const { renderMode } = Component;
|
|
2074
2067
|
let result = '';
|
|
@@ -2077,7 +2070,7 @@ emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToke
|
|
|
2077
2070
|
const token = scoped ? scopeToken : undefined;
|
|
2078
2071
|
const useActualHostSelector = !scoped || renderMode !== 'light';
|
|
2079
2072
|
const useNativeDirPseudoclass = true;
|
|
2080
|
-
const { styleDedupeIsEnabled, stylesheetToId, styleDedupePrefix } =
|
|
2073
|
+
const { styleDedupeIsEnabled, stylesheetToId, styleDedupePrefix } = renderContext;
|
|
2081
2074
|
if (!styleDedupeIsEnabled) {
|
|
2082
2075
|
const styleContents = stylesheet(token, useActualHostSelector, useNativeDirPseudoclass);
|
|
2083
2076
|
validateStyleTextContents(styleContents);
|
|
@@ -2090,7 +2083,7 @@ emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToke
|
|
|
2090
2083
|
result += `<lwc-style${hasAnyScopedStyles ? ` class="${scopeToken}"` : ''} style-id="lwc-style-${styleDedupePrefix}-${styleId}"></lwc-style>`;
|
|
2091
2084
|
}
|
|
2092
2085
|
else {
|
|
2093
|
-
const styleId =
|
|
2086
|
+
const styleId = renderContext.getNextId();
|
|
2094
2087
|
stylesheetToId.set(stylesheet, styleId.toString());
|
|
2095
2088
|
const styleContents = stylesheet(token, useActualHostSelector, useNativeDirPseudoclass);
|
|
2096
2089
|
validateStyleTextContents(styleContents);
|
|
@@ -2197,5 +2190,5 @@ exports.track = track;
|
|
|
2197
2190
|
exports.unwrap = unwrap$1;
|
|
2198
2191
|
exports.validateStyleTextContents = validateStyleTextContents;
|
|
2199
2192
|
exports.wire = wire;
|
|
2200
|
-
/** version: 8.
|
|
2193
|
+
/** version: 8.25.0 */
|
|
2201
2194
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
|
@@ -639,7 +639,7 @@ let trustedSignals;
|
|
|
639
639
|
function setTrustedSignalSet(signals) {
|
|
640
640
|
isFalse$1(trustedSignals, 'Trusted Signal Set is already set!');
|
|
641
641
|
trustedSignals = signals;
|
|
642
|
-
// Only used in LWC's
|
|
642
|
+
// Only used in LWC's integration tests. Contained within the set function as there are multiple imports of
|
|
643
643
|
// this module. Placing it here ensures we reference the import where the trustedSignals set is maintained
|
|
644
644
|
if (process.env.NODE_ENV === 'test-lwc-integration') {
|
|
645
645
|
// Used to reset the global state between test runs
|
|
@@ -676,7 +676,7 @@ function normalizeTabIndex(value) {
|
|
|
676
676
|
const shouldNormalize = value > 0 && typeof value !== 'boolean';
|
|
677
677
|
return shouldNormalize ? 0 : value;
|
|
678
678
|
}
|
|
679
|
-
/** version: 8.
|
|
679
|
+
/** version: 8.25.0 */
|
|
680
680
|
|
|
681
681
|
/**
|
|
682
682
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -700,7 +700,7 @@ function normalizeTabIndex(value) {
|
|
|
700
700
|
* @param value
|
|
701
701
|
* @param msg
|
|
702
702
|
*/
|
|
703
|
-
/** version: 8.
|
|
703
|
+
/** version: 8.25.0 */
|
|
704
704
|
|
|
705
705
|
/*
|
|
706
706
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -724,7 +724,7 @@ class SignalBaseClass {
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
/** version: 8.
|
|
727
|
+
/** version: 8.25.0 */
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
730
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -786,7 +786,7 @@ function setFeatureFlag(name, value) {
|
|
|
786
786
|
console.info(`Attempt to set a value on an unknown feature flag "${name}" resulted in a NOOP.`);
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
// This may seem redundant, but `process.env.NODE_ENV === 'test-lwc-integration'` is replaced by
|
|
789
|
+
// This may seem redundant, but `process.env.NODE_ENV === 'test-lwc-integration'` is replaced by integration tests
|
|
790
790
|
if (process.env.NODE_ENV === 'test-lwc-integration' || process.env.NODE_ENV !== 'production') {
|
|
791
791
|
// Allow the same flag to be set more than once outside of production to enable testing
|
|
792
792
|
flags[name] = value;
|
|
@@ -815,7 +815,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
815
815
|
setFeatureFlag(name, value);
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
/** version: 8.
|
|
818
|
+
/** version: 8.25.0 */
|
|
819
819
|
|
|
820
820
|
/*
|
|
821
821
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -1864,10 +1864,10 @@ function renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken) {
|
|
|
1864
1864
|
function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
|
|
1865
1865
|
yield renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken);
|
|
1866
1866
|
}
|
|
1867
|
-
function renderAttrsNoYield(
|
|
1868
|
-
|
|
1867
|
+
function renderAttrsNoYield(instance, attrs, hostScopeToken, scopeToken) {
|
|
1868
|
+
return renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken);
|
|
1869
1869
|
}
|
|
1870
|
-
async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
|
|
1870
|
+
async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance, _renderContext) {
|
|
1871
1871
|
if (Cmp.renderMode !== 'light') {
|
|
1872
1872
|
yield `<template shadowrootmode="open"></template>`;
|
|
1873
1873
|
if (shadowSlottedContent) {
|
|
@@ -1875,13 +1875,15 @@ async function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scoped
|
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
|
-
function fallbackTmplNoYield(
|
|
1878
|
+
function fallbackTmplNoYield(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance, _renderContext) {
|
|
1879
|
+
let markup = '';
|
|
1879
1880
|
if (Cmp.renderMode !== 'light') {
|
|
1880
|
-
|
|
1881
|
+
markup += '<template shadowrootmode="open"></template>';
|
|
1881
1882
|
if (shadowSlottedContent) {
|
|
1882
|
-
shadowSlottedContent(
|
|
1883
|
+
markup += shadowSlottedContent(instance);
|
|
1883
1884
|
}
|
|
1884
1885
|
}
|
|
1886
|
+
return markup;
|
|
1885
1887
|
}
|
|
1886
1888
|
function addSlottedContent(name, fn, contentMap) {
|
|
1887
1889
|
const contentList = contentMap[name];
|
|
@@ -1905,6 +1907,9 @@ class RenderContext {
|
|
|
1905
1907
|
this.styleDedupeIsEnabled = false;
|
|
1906
1908
|
}
|
|
1907
1909
|
}
|
|
1910
|
+
getNextId() {
|
|
1911
|
+
return this.nextId++;
|
|
1912
|
+
}
|
|
1908
1913
|
}
|
|
1909
1914
|
/**
|
|
1910
1915
|
* Create a string representing an LWC component for server-side rendering.
|
|
@@ -1918,45 +1923,37 @@ class RenderContext {
|
|
|
1918
1923
|
* @returns String representation of the component
|
|
1919
1924
|
*/
|
|
1920
1925
|
async function serverSideRenderComponent(tagName, Component, props = {}, styleDedupe = false, mode = DEFAULT_SSR_MODE) {
|
|
1921
|
-
// TODO [#5309]: Remove this warning after a single release
|
|
1922
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1923
|
-
if (arguments.length === 6 || !['sync', 'async', 'asyncYield'].includes(mode)) {
|
|
1924
|
-
throw new Error("The signature for @lwc/ssr-runtime's `renderComponent` has changed. There is now only one parameter for style dedupe.");
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
1926
|
if (typeof tagName !== 'string') {
|
|
1928
1927
|
throw new Error(`tagName must be a string, found: ${tagName}`);
|
|
1929
1928
|
}
|
|
1930
1929
|
const generateMarkup = Component[SYMBOL__GENERATE_MARKUP];
|
|
1931
|
-
|
|
1932
|
-
const emit = (segment) => {
|
|
1933
|
-
markup += segment;
|
|
1934
|
-
};
|
|
1935
|
-
emit.cxt = new RenderContext(styleDedupe);
|
|
1930
|
+
const renderContext = new RenderContext(styleDedupe);
|
|
1936
1931
|
if (!generateMarkup) {
|
|
1937
1932
|
// If a non-component is accidentally provided, render an empty template
|
|
1938
|
-
|
|
1933
|
+
let markup = `<${tagName}>`;
|
|
1934
|
+
fallbackTmplNoYield(null, null, null, Component,
|
|
1939
1935
|
// Using a false type assertion for the `instance` param is safe because it's only used
|
|
1940
1936
|
// if there's slotted content, which we are not providing
|
|
1941
|
-
|
|
1942
|
-
|
|
1937
|
+
null);
|
|
1938
|
+
markup += `</${tagName}>`;
|
|
1943
1939
|
return markup;
|
|
1944
1940
|
}
|
|
1945
1941
|
if (mode === 'asyncYield') {
|
|
1946
|
-
|
|
1942
|
+
let markup = '';
|
|
1943
|
+
for await (const segment of generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null)) {
|
|
1947
1944
|
markup += segment;
|
|
1948
1945
|
}
|
|
1946
|
+
return markup;
|
|
1949
1947
|
}
|
|
1950
1948
|
else if (mode === 'async') {
|
|
1951
|
-
await generateMarkup(
|
|
1949
|
+
return await generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null);
|
|
1952
1950
|
}
|
|
1953
1951
|
else if (mode === 'sync') {
|
|
1954
|
-
generateMarkup(
|
|
1952
|
+
return generateMarkup(tagName, props, null, null, null, null, renderContext, null, null, null);
|
|
1955
1953
|
}
|
|
1956
1954
|
else {
|
|
1957
1955
|
throw new Error(`Invalid mode: ${mode}`);
|
|
1958
1956
|
}
|
|
1959
|
-
return markup;
|
|
1960
1957
|
}
|
|
1961
1958
|
|
|
1962
1959
|
/*
|
|
@@ -2060,11 +2057,7 @@ function hasScopedStaticStylesheets(Component) {
|
|
|
2060
2057
|
});
|
|
2061
2058
|
return scoped;
|
|
2062
2059
|
}
|
|
2063
|
-
function renderStylesheets(
|
|
2064
|
-
// FIXME: the `emit` function does not exist in the SSR's compiler's yield mode. If we
|
|
2065
|
-
// are going to use it to transport the RenderContext down the call stack, we'll need to figure out
|
|
2066
|
-
// how to make htat work in yield mode.
|
|
2067
|
-
emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToken, Component, hasScopedTemplateStyles) {
|
|
2060
|
+
function renderStylesheets(renderContext, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToken, Component, hasScopedTemplateStyles) {
|
|
2068
2061
|
const hasAnyScopedStyles = hasScopedTemplateStyles || hasScopedStaticStylesheets(Component);
|
|
2069
2062
|
const { renderMode } = Component;
|
|
2070
2063
|
let result = '';
|
|
@@ -2073,7 +2066,7 @@ emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToke
|
|
|
2073
2066
|
const token = scoped ? scopeToken : undefined;
|
|
2074
2067
|
const useActualHostSelector = !scoped || renderMode !== 'light';
|
|
2075
2068
|
const useNativeDirPseudoclass = true;
|
|
2076
|
-
const { styleDedupeIsEnabled, stylesheetToId, styleDedupePrefix } =
|
|
2069
|
+
const { styleDedupeIsEnabled, stylesheetToId, styleDedupePrefix } = renderContext;
|
|
2077
2070
|
if (!styleDedupeIsEnabled) {
|
|
2078
2071
|
const styleContents = stylesheet(token, useActualHostSelector, useNativeDirPseudoclass);
|
|
2079
2072
|
validateStyleTextContents(styleContents);
|
|
@@ -2086,7 +2079,7 @@ emit, defaultStylesheets, defaultScopedStylesheets, staticStylesheets, scopeToke
|
|
|
2086
2079
|
result += `<lwc-style${hasAnyScopedStyles ? ` class="${scopeToken}"` : ''} style-id="lwc-style-${styleDedupePrefix}-${styleId}"></lwc-style>`;
|
|
2087
2080
|
}
|
|
2088
2081
|
else {
|
|
2089
|
-
const styleId =
|
|
2082
|
+
const styleId = renderContext.getNextId();
|
|
2090
2083
|
stylesheetToId.set(stylesheet, styleId.toString());
|
|
2091
2084
|
const styleContents = stylesheet(token, useActualHostSelector, useNativeDirPseudoclass);
|
|
2092
2085
|
validateStyleTextContents(styleContents);
|
|
@@ -2139,5 +2132,5 @@ function* toIteratorDirective(iterable) {
|
|
|
2139
2132
|
}
|
|
2140
2133
|
|
|
2141
2134
|
export { ClassList, LightningElement, SYMBOL__DEFAULT_TEMPLATE, SYMBOL__GENERATE_MARKUP, SYMBOL__SET_INTERNALS, SignalBaseClass, addTrustedContext as __dangerous_do_not_use_addTrustedContext, addSlottedContent, api, connectContext$1 as connectContext, createContextProvider, createElement, establishContextfulRelationship, fallbackTmpl, fallbackTmplNoYield, freezeTemplate, getComponentDef, hasScopedStaticStylesheets, hot, htmlEscape, isComponentConstructor, isTrustedSignal, mutationTracker, normalizeClass, normalizeTabIndex, normalizeTextContent, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, renderAttrs, renderAttrsNoYield, serverSideRenderComponent as renderComponent, renderStylesheets, renderTextContent, renderer, sanitizeAttribute, sanitizeHtmlContent, serverSideRenderComponent, setContextKeys, setFeatureFlag, setFeatureFlagForTest, setHooks, setTrustedContextSet, setTrustedSignalSet, swapComponent, swapStyle, swapTemplate, toIteratorDirective, track, unwrap$1 as unwrap, validateStyleTextContents, wire };
|
|
2142
|
-
/** version: 8.
|
|
2135
|
+
/** version: 8.25.0 */
|
|
2143
2136
|
//# sourceMappingURL=index.js.map
|
package/dist/render.d.ts
CHANGED
|
@@ -10,14 +10,13 @@ type BaseGenerateMarkupParams = readonly [
|
|
|
10
10
|
attrs: Attributes | null,
|
|
11
11
|
parent: LightningElement | null,
|
|
12
12
|
scopeToken: string | null,
|
|
13
|
-
contextfulParent: LightningElement | null
|
|
13
|
+
contextfulParent: LightningElement | null,
|
|
14
|
+
renderContext: RenderContext
|
|
14
15
|
];
|
|
15
|
-
/** Text emitter used by transmogrified formats. */
|
|
16
|
-
type Emit = (str: string) => void;
|
|
17
16
|
/** Slotted content function used by `asyncYield` mode. */
|
|
18
17
|
type SlottedContentGenerator = (instance: LightningElement) => AsyncGenerator<string, void, unknown>;
|
|
19
18
|
/** Slotted content function used by `sync` and `async` modes. */
|
|
20
|
-
type SlottedContentEmitter = (
|
|
19
|
+
type SlottedContentEmitter = (instance: LightningElement) => void;
|
|
21
20
|
/** Slotted content map used by `asyncYield` mode. */
|
|
22
21
|
type SlottedContentGeneratorMap = Record<number | string, SlottedContentGenerator[]>;
|
|
23
22
|
/** Slotted content map used by `sync` and `async` modes. */
|
|
@@ -31,7 +30,6 @@ type GenerateMarkupGeneratorParams = readonly [
|
|
|
31
30
|
];
|
|
32
31
|
/** `generateMarkup` parameters used by `sync` and `async` modes. */
|
|
33
32
|
type GenerateMarkupEmitterParams = readonly [
|
|
34
|
-
emit: Emit,
|
|
35
33
|
...BaseGenerateMarkupParams,
|
|
36
34
|
shadowSlottedContent: SlottedContentEmitter | null,
|
|
37
35
|
lightSlottedContent: SlottedContentEmitterMap | null,
|
|
@@ -40,14 +38,14 @@ type GenerateMarkupEmitterParams = readonly [
|
|
|
40
38
|
/** Signature for `asyncYield` compilation mode. */
|
|
41
39
|
export type GenerateMarkupAsyncYield = (...args: GenerateMarkupGeneratorParams) => AsyncGenerator<string>;
|
|
42
40
|
/** Signature for `async` compilation mode. */
|
|
43
|
-
export type GenerateMarkupAsync = (...args: GenerateMarkupEmitterParams) => Promise<
|
|
41
|
+
export type GenerateMarkupAsync = (...args: GenerateMarkupEmitterParams) => Promise<string>;
|
|
44
42
|
/** Signature for `sync` compilation mode. */
|
|
45
|
-
export type GenerateMarkupSync = (...args: GenerateMarkupEmitterParams) =>
|
|
43
|
+
export type GenerateMarkupSync = (...args: GenerateMarkupEmitterParams) => string;
|
|
46
44
|
type GenerateMarkupVariants = GenerateMarkupAsyncYield | GenerateMarkupAsync | GenerateMarkupSync;
|
|
47
45
|
export declare function renderAttrs(instance: LightningElement, attrs: Attributes, hostScopeToken: string | undefined, scopeToken: string | undefined): Generator<string, void, unknown>;
|
|
48
|
-
export declare function renderAttrsNoYield(
|
|
49
|
-
export declare function fallbackTmpl(shadowSlottedContent: SlottedContentGenerator | null, _lightSlottedContent: SlottedContentGeneratorMap | null, _scopedSlottedContent: SlottedContentGeneratorMap | null, Cmp: LightningElementConstructor, instance: LightningElement): AsyncGenerator<string>;
|
|
50
|
-
export declare function fallbackTmplNoYield(
|
|
46
|
+
export declare function renderAttrsNoYield(instance: LightningElement, attrs: Attributes, hostScopeToken: string | undefined, scopeToken: string | undefined): string;
|
|
47
|
+
export declare function fallbackTmpl(shadowSlottedContent: SlottedContentGenerator | null, _lightSlottedContent: SlottedContentGeneratorMap | null, _scopedSlottedContent: SlottedContentGeneratorMap | null, Cmp: LightningElementConstructor, instance: LightningElement, _renderContext: RenderContext): AsyncGenerator<string>;
|
|
48
|
+
export declare function fallbackTmplNoYield(shadowSlottedContent: SlottedContentEmitter | null, _lightSlottedContent: SlottedContentEmitterMap | null, _scopedSlottedContent: SlottedContentEmitterMap | null, Cmp: LightningElementConstructor, instance: LightningElement, _renderContext: RenderContext): string;
|
|
51
49
|
export declare function addSlottedContent(name: string, fn: unknown, contentMap: Record<string, unknown[]>): void;
|
|
52
50
|
interface ComponentWithGenerateMarkup extends LightningElementConstructor {
|
|
53
51
|
[SYMBOL__GENERATE_MARKUP]?: GenerateMarkupVariants;
|
|
@@ -58,6 +56,7 @@ export declare class RenderContext {
|
|
|
58
56
|
stylesheetToId: WeakMap<Stylesheet, string>;
|
|
59
57
|
nextId: number;
|
|
60
58
|
constructor(styleDedupe: string | boolean);
|
|
59
|
+
getNextId(): number;
|
|
61
60
|
}
|
|
62
61
|
/**
|
|
63
62
|
* Create a string representing an LWC component for server-side rendering.
|
package/dist/styles.d.ts
CHANGED
|
@@ -2,10 +2,7 @@ import type { LightningElementConstructor } from './lightning-element';
|
|
|
2
2
|
import type { Stylesheets, Stylesheet } from '@lwc/shared';
|
|
3
3
|
import type { RenderContext } from './render';
|
|
4
4
|
type ForgivingStylesheets = Stylesheets | Stylesheet | undefined | null | Array<Stylesheets | undefined | null>;
|
|
5
|
-
type EmitFn = ((strSegment: string) => void) & {
|
|
6
|
-
cxt: RenderContext;
|
|
7
|
-
};
|
|
8
5
|
export declare function hasScopedStaticStylesheets(Component: LightningElementConstructor): boolean;
|
|
9
|
-
export declare function renderStylesheets(
|
|
6
|
+
export declare function renderStylesheets(renderContext: RenderContext, defaultStylesheets: ForgivingStylesheets, defaultScopedStylesheets: ForgivingStylesheets, staticStylesheets: ForgivingStylesheets, scopeToken: string, Component: LightningElementConstructor, hasScopedTemplateStyles: boolean): string;
|
|
10
7
|
export {};
|
|
11
8
|
//# sourceMappingURL=styles.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.
|
|
7
|
+
"version": "8.25.0",
|
|
8
8
|
"description": "Runtime complement to @lwc/ssr-compiler",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"lwc",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@lwc/shared": "8.
|
|
52
|
-
"@lwc/engine-core": "8.
|
|
53
|
-
"@lwc/features": "8.
|
|
54
|
-
"@lwc/signals": "8.
|
|
51
|
+
"@lwc/shared": "8.25.0",
|
|
52
|
+
"@lwc/engine-core": "8.25.0",
|
|
53
|
+
"@lwc/features": "8.25.0",
|
|
54
|
+
"@lwc/signals": "8.25.0",
|
|
55
55
|
"observable-membrane": "2.0.0"
|
|
56
56
|
}
|
|
57
57
|
}
|