@lwc/ssr-runtime 9.3.5 → 9.4.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 +42 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +42 -16
- package/dist/register-public-properties.d.ts +18 -0
- package/dist/set-static-internals.d.ts +2 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -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: 9.
|
|
683
|
+
/** version: 9.4.0 */
|
|
684
684
|
|
|
685
685
|
/**
|
|
686
686
|
* Copyright (c) 2026 Salesforce, Inc.
|
|
@@ -704,7 +704,7 @@ function normalizeTabIndex(value) {
|
|
|
704
704
|
* @param value
|
|
705
705
|
* @param msg
|
|
706
706
|
*/
|
|
707
|
-
/** version: 9.
|
|
707
|
+
/** version: 9.4.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: 9.
|
|
731
|
+
/** version: 9.4.0 */
|
|
732
732
|
|
|
733
733
|
/**
|
|
734
734
|
* Copyright (c) 2026 Salesforce, Inc.
|
|
@@ -749,12 +749,16 @@ const features = {
|
|
|
749
749
|
ENABLE_WIRE_SYNC_EMIT: null,
|
|
750
750
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
751
751
|
ENABLE_FROZEN_TEMPLATE: null,
|
|
752
|
-
ENABLE_LEGACY_SCOPE_TOKENS: null,
|
|
753
752
|
ENABLE_EXPERIMENTAL_SIGNALS: null,
|
|
754
753
|
DISABLE_SYNTHETIC_SHADOW: null,
|
|
755
754
|
DISABLE_HOST_ATTACH_SHADOW_GUARD: null,
|
|
756
755
|
DISABLE_STRICT_VALIDATION: null,
|
|
757
756
|
DISABLE_DETACHED_REHYDRATION: null,
|
|
757
|
+
// Remove in 270
|
|
758
|
+
ENABLE_LEGACY_ITEM_POLYFILL: null,
|
|
759
|
+
ENABLE_SHADOW_ROOT_UNDEFINED_GET_ELEMENT_BY_ID: null,
|
|
760
|
+
// Remove in 270
|
|
761
|
+
ENABLE_BROKEN_HTML_COLLECTION_NAMED_ITEM: null,
|
|
758
762
|
};
|
|
759
763
|
if (!globalThis.lwcRuntimeFlags) {
|
|
760
764
|
Object.defineProperty(globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
@@ -815,7 +819,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
815
819
|
setFeatureFlag(name, value);
|
|
816
820
|
}
|
|
817
821
|
}
|
|
818
|
-
/** version: 9.
|
|
822
|
+
/** version: 9.4.0 */
|
|
819
823
|
|
|
820
824
|
/*
|
|
821
825
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -2132,6 +2136,36 @@ function* toIteratorDirective(iterable) {
|
|
|
2132
2136
|
}
|
|
2133
2137
|
}
|
|
2134
2138
|
|
|
2139
|
+
/** The class property that holds a component's resolved `@api` allowlist. */
|
|
2140
|
+
const PUBLIC_PROPERTIES_KEY = '__lwcPublicProperties__';
|
|
2141
|
+
/**
|
|
2142
|
+
* Union of a class's own `@api` names with its immediate superclass's already-resolved allowlist.
|
|
2143
|
+
* Stored back on each class, so this one-level union chains transitively up the prototype chain —
|
|
2144
|
+
* resolving the actual (incl. dynamically-chosen) superclass the compiler can't see.
|
|
2145
|
+
*/
|
|
2146
|
+
function resolvePublicProperties(Component, ownPublicProps) {
|
|
2147
|
+
const SuperClass = Object.getPrototypeOf(Component);
|
|
2148
|
+
const superPublicProps = SuperClass[PUBLIC_PROPERTIES_KEY] ?? [];
|
|
2149
|
+
return new Set([...ownPublicProps, ...superPublicProps]);
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* Attach the resolved allowlist to a class and return it. This is the single place that writes
|
|
2153
|
+
* `__lwcPublicProperties__`; `setStaticInternals` delegates the write here and layers on the rest
|
|
2154
|
+
* of its machinery (generate-markup, default template, wire adapters). The compiler emits a full
|
|
2155
|
+
* `setStaticInternals` only for the exported component, so it calls this directly for non-exported
|
|
2156
|
+
* in-file base classes, giving them their own allowlist for the runtime union (W-23508928).
|
|
2157
|
+
*/
|
|
2158
|
+
function registerPublicProperties(Component, ownPublicProps) {
|
|
2159
|
+
const publicProps = resolvePublicProperties(Component, ownPublicProps);
|
|
2160
|
+
Object.defineProperty(Component, PUBLIC_PROPERTIES_KEY, {
|
|
2161
|
+
configurable: false,
|
|
2162
|
+
enumerable: false,
|
|
2163
|
+
writable: false,
|
|
2164
|
+
value: publicProps,
|
|
2165
|
+
});
|
|
2166
|
+
return publicProps;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2135
2169
|
/*
|
|
2136
2170
|
* Copyright (c) 2026, Salesforce, Inc.
|
|
2137
2171
|
* All rights reserved.
|
|
@@ -2212,15 +2246,7 @@ function makeGenerateMarkupSync(Component, defaultTagName, publicProps, wireAdap
|
|
|
2212
2246
|
};
|
|
2213
2247
|
}
|
|
2214
2248
|
function setStaticInternals(Component, defaultTagName, cmpPublicProps, wireAdapters, compilationMode, defaultTemplate) {
|
|
2215
|
-
const
|
|
2216
|
-
const superPublicProps = SuperClass.__lwcPublicProperties__ ?? [];
|
|
2217
|
-
const publicProps = new Set([...cmpPublicProps, ...superPublicProps]);
|
|
2218
|
-
Object.defineProperty(Component, '__lwcPublicProperties__', {
|
|
2219
|
-
configurable: false,
|
|
2220
|
-
enumerable: false,
|
|
2221
|
-
writable: false,
|
|
2222
|
-
value: publicProps,
|
|
2223
|
-
});
|
|
2249
|
+
const publicProps = registerPublicProperties(Component, cmpPublicProps);
|
|
2224
2250
|
Object.defineProperty(Component, SYMBOL__GENERATE_MARKUP, {
|
|
2225
2251
|
configurable: false,
|
|
2226
2252
|
enumerable: false,
|
|
@@ -2270,6 +2296,7 @@ exports.parseSVGFragment = parseSVGFragment;
|
|
|
2270
2296
|
exports.readonly = readonly;
|
|
2271
2297
|
exports.registerComponent = registerComponent;
|
|
2272
2298
|
exports.registerDecorators = registerDecorators;
|
|
2299
|
+
exports.registerPublicProperties = registerPublicProperties;
|
|
2273
2300
|
exports.registerTemplate = registerTemplate;
|
|
2274
2301
|
exports.renderAttrs = renderAttrs;
|
|
2275
2302
|
exports.renderAttrsNoYield = renderAttrsNoYield;
|
|
@@ -2295,5 +2322,5 @@ exports.track = track;
|
|
|
2295
2322
|
exports.unwrap = unwrap$1;
|
|
2296
2323
|
exports.validateStyleTextContents = validateStyleTextContents;
|
|
2297
2324
|
exports.wire = wire;
|
|
2298
|
-
/** version: 9.
|
|
2325
|
+
/** version: 9.4.0 */
|
|
2299
2326
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export { validateStyleTextContents } from './validate-style-text-contents';
|
|
|
13
13
|
export { createContextProvider, establishContextfulRelationship, connectContext } from './wire';
|
|
14
14
|
export { readonly } from './get-read-only-proxy';
|
|
15
15
|
export { setStaticInternals } from './set-static-internals';
|
|
16
|
+
export { registerPublicProperties } from './register-public-properties';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -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: 9.
|
|
679
|
+
/** version: 9.4.0 */
|
|
680
680
|
|
|
681
681
|
/**
|
|
682
682
|
* Copyright (c) 2026 Salesforce, Inc.
|
|
@@ -700,7 +700,7 @@ function normalizeTabIndex(value) {
|
|
|
700
700
|
* @param value
|
|
701
701
|
* @param msg
|
|
702
702
|
*/
|
|
703
|
-
/** version: 9.
|
|
703
|
+
/** version: 9.4.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: 9.
|
|
727
|
+
/** version: 9.4.0 */
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
730
|
* Copyright (c) 2026 Salesforce, Inc.
|
|
@@ -745,12 +745,16 @@ const features = {
|
|
|
745
745
|
ENABLE_WIRE_SYNC_EMIT: null,
|
|
746
746
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
747
747
|
ENABLE_FROZEN_TEMPLATE: null,
|
|
748
|
-
ENABLE_LEGACY_SCOPE_TOKENS: null,
|
|
749
748
|
ENABLE_EXPERIMENTAL_SIGNALS: null,
|
|
750
749
|
DISABLE_SYNTHETIC_SHADOW: null,
|
|
751
750
|
DISABLE_HOST_ATTACH_SHADOW_GUARD: null,
|
|
752
751
|
DISABLE_STRICT_VALIDATION: null,
|
|
753
752
|
DISABLE_DETACHED_REHYDRATION: null,
|
|
753
|
+
// Remove in 270
|
|
754
|
+
ENABLE_LEGACY_ITEM_POLYFILL: null,
|
|
755
|
+
ENABLE_SHADOW_ROOT_UNDEFINED_GET_ELEMENT_BY_ID: null,
|
|
756
|
+
// Remove in 270
|
|
757
|
+
ENABLE_BROKEN_HTML_COLLECTION_NAMED_ITEM: null,
|
|
754
758
|
};
|
|
755
759
|
if (!globalThis.lwcRuntimeFlags) {
|
|
756
760
|
Object.defineProperty(globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
@@ -811,7 +815,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
811
815
|
setFeatureFlag(name, value);
|
|
812
816
|
}
|
|
813
817
|
}
|
|
814
|
-
/** version: 9.
|
|
818
|
+
/** version: 9.4.0 */
|
|
815
819
|
|
|
816
820
|
/*
|
|
817
821
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -2128,6 +2132,36 @@ function* toIteratorDirective(iterable) {
|
|
|
2128
2132
|
}
|
|
2129
2133
|
}
|
|
2130
2134
|
|
|
2135
|
+
/** The class property that holds a component's resolved `@api` allowlist. */
|
|
2136
|
+
const PUBLIC_PROPERTIES_KEY = '__lwcPublicProperties__';
|
|
2137
|
+
/**
|
|
2138
|
+
* Union of a class's own `@api` names with its immediate superclass's already-resolved allowlist.
|
|
2139
|
+
* Stored back on each class, so this one-level union chains transitively up the prototype chain —
|
|
2140
|
+
* resolving the actual (incl. dynamically-chosen) superclass the compiler can't see.
|
|
2141
|
+
*/
|
|
2142
|
+
function resolvePublicProperties(Component, ownPublicProps) {
|
|
2143
|
+
const SuperClass = Object.getPrototypeOf(Component);
|
|
2144
|
+
const superPublicProps = SuperClass[PUBLIC_PROPERTIES_KEY] ?? [];
|
|
2145
|
+
return new Set([...ownPublicProps, ...superPublicProps]);
|
|
2146
|
+
}
|
|
2147
|
+
/**
|
|
2148
|
+
* Attach the resolved allowlist to a class and return it. This is the single place that writes
|
|
2149
|
+
* `__lwcPublicProperties__`; `setStaticInternals` delegates the write here and layers on the rest
|
|
2150
|
+
* of its machinery (generate-markup, default template, wire adapters). The compiler emits a full
|
|
2151
|
+
* `setStaticInternals` only for the exported component, so it calls this directly for non-exported
|
|
2152
|
+
* in-file base classes, giving them their own allowlist for the runtime union (W-23508928).
|
|
2153
|
+
*/
|
|
2154
|
+
function registerPublicProperties(Component, ownPublicProps) {
|
|
2155
|
+
const publicProps = resolvePublicProperties(Component, ownPublicProps);
|
|
2156
|
+
Object.defineProperty(Component, PUBLIC_PROPERTIES_KEY, {
|
|
2157
|
+
configurable: false,
|
|
2158
|
+
enumerable: false,
|
|
2159
|
+
writable: false,
|
|
2160
|
+
value: publicProps,
|
|
2161
|
+
});
|
|
2162
|
+
return publicProps;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2131
2165
|
/*
|
|
2132
2166
|
* Copyright (c) 2026, Salesforce, Inc.
|
|
2133
2167
|
* All rights reserved.
|
|
@@ -2208,15 +2242,7 @@ function makeGenerateMarkupSync(Component, defaultTagName, publicProps, wireAdap
|
|
|
2208
2242
|
};
|
|
2209
2243
|
}
|
|
2210
2244
|
function setStaticInternals(Component, defaultTagName, cmpPublicProps, wireAdapters, compilationMode, defaultTemplate) {
|
|
2211
|
-
const
|
|
2212
|
-
const superPublicProps = SuperClass.__lwcPublicProperties__ ?? [];
|
|
2213
|
-
const publicProps = new Set([...cmpPublicProps, ...superPublicProps]);
|
|
2214
|
-
Object.defineProperty(Component, '__lwcPublicProperties__', {
|
|
2215
|
-
configurable: false,
|
|
2216
|
-
enumerable: false,
|
|
2217
|
-
writable: false,
|
|
2218
|
-
value: publicProps,
|
|
2219
|
-
});
|
|
2245
|
+
const publicProps = registerPublicProperties(Component, cmpPublicProps);
|
|
2220
2246
|
Object.defineProperty(Component, SYMBOL__GENERATE_MARKUP, {
|
|
2221
2247
|
configurable: false,
|
|
2222
2248
|
enumerable: false,
|
|
@@ -2235,6 +2261,6 @@ function setStaticInternals(Component, defaultTagName, cmpPublicProps, wireAdapt
|
|
|
2235
2261
|
}
|
|
2236
2262
|
}
|
|
2237
2263
|
|
|
2238
|
-
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, setStaticInternals, setTrustedContextSet, setTrustedSignalSet, swapComponent, swapStyle, swapTemplate, toIteratorDirective, track, unwrap$1 as unwrap, validateStyleTextContents, wire };
|
|
2239
|
-
/** version: 9.
|
|
2264
|
+
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, registerPublicProperties, registerTemplate, renderAttrs, renderAttrsNoYield, serverSideRenderComponent as renderComponent, renderStylesheets, renderTextContent, renderer, sanitizeAttribute, sanitizeHtmlContent, serverSideRenderComponent, setContextKeys, setFeatureFlag, setFeatureFlagForTest, setHooks, setStaticInternals, setTrustedContextSet, setTrustedSignalSet, swapComponent, swapStyle, swapTemplate, toIteratorDirective, track, unwrap$1 as unwrap, validateStyleTextContents, wire };
|
|
2265
|
+
/** version: 9.4.0 */
|
|
2240
2266
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LightningElementConstructor } from './lightning-element';
|
|
2
|
+
/** The class property that holds a component's resolved `@api` allowlist. */
|
|
3
|
+
export declare const PUBLIC_PROPERTIES_KEY = "__lwcPublicProperties__";
|
|
4
|
+
/**
|
|
5
|
+
* Union of a class's own `@api` names with its immediate superclass's already-resolved allowlist.
|
|
6
|
+
* Stored back on each class, so this one-level union chains transitively up the prototype chain —
|
|
7
|
+
* resolving the actual (incl. dynamically-chosen) superclass the compiler can't see.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolvePublicProperties(Component: LightningElementConstructor, ownPublicProps: string[]): Set<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Attach the resolved allowlist to a class and return it. This is the single place that writes
|
|
12
|
+
* `__lwcPublicProperties__`; `setStaticInternals` delegates the write here and layers on the rest
|
|
13
|
+
* of its machinery (generate-markup, default template, wire adapters). The compiler emits a full
|
|
14
|
+
* `setStaticInternals` only for the exported component, so it calls this directly for non-exported
|
|
15
|
+
* in-file base classes, giving them their own allowlist for the runtime union (W-23508928).
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerPublicProperties(Component: LightningElementConstructor, ownPublicProps: string[]): Set<string>;
|
|
18
|
+
//# sourceMappingURL=register-public-properties.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SYMBOL__DEFAULT_TEMPLATE, type LightningElementConstructor } from './lightning-element';
|
|
2
|
+
import { type PUBLIC_PROPERTIES_KEY } from './register-public-properties';
|
|
2
3
|
import type { CompilationMode } from '@lwc/shared';
|
|
3
4
|
import type { LightningElement } from './lightning-element';
|
|
4
5
|
import type { WireAdapterConstructor } from '@lwc/engine-core';
|
|
@@ -8,7 +9,7 @@ interface Template {
|
|
|
8
9
|
stylesheetScopeToken?: string;
|
|
9
10
|
}
|
|
10
11
|
interface ComponentStaticInternals {
|
|
11
|
-
|
|
12
|
+
[PUBLIC_PROPERTIES_KEY]?: Set<string>;
|
|
12
13
|
[SYMBOL__DEFAULT_TEMPLATE]: Template;
|
|
13
14
|
}
|
|
14
15
|
interface WireAdapterInfo<Config extends object = object, Value = unknown> {
|
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": "9.
|
|
7
|
+
"version": "9.4.0",
|
|
8
8
|
"description": "Runtime complement to @lwc/ssr-compiler",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"lwc",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@lwc/shared": "9.
|
|
57
|
-
"@lwc/engine-core": "9.
|
|
58
|
-
"@lwc/features": "9.
|
|
59
|
-
"@lwc/signals": "9.
|
|
56
|
+
"@lwc/shared": "9.4.0",
|
|
57
|
+
"@lwc/engine-core": "9.4.0",
|
|
58
|
+
"@lwc/features": "9.4.0",
|
|
59
|
+
"@lwc/signals": "9.4.0",
|
|
60
60
|
"observable-membrane": "2.0.0"
|
|
61
61
|
}
|
|
62
62
|
}
|