@lwc/ssr-runtime 8.12.6 → 8.12.7

Sign up to get free protection for your applications and to get access to all the features.
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.6 */
634
+ /** version: 8.12.7 */
635
635
 
636
636
  /*
637
637
  * Copyright (c) 2024, Salesforce, Inc.
@@ -1353,7 +1353,7 @@ class LightningElement {
1353
1353
  _LightningElement_classList.set(this, null);
1354
1354
  assign(this, propsAvailableAtConstruction);
1355
1355
  }
1356
- [(_LightningElement_props = new WeakMap(), _LightningElement_attrs = new WeakMap(), _LightningElement_classList = new WeakMap(), SYMBOL__SET_INTERNALS)](props, attrs, publicFields, privateFields) {
1356
+ [(_LightningElement_props = new WeakMap(), _LightningElement_attrs = new WeakMap(), _LightningElement_classList = new WeakMap(), SYMBOL__SET_INTERNALS)](props, attrs, publicProperties, privateProperties) {
1357
1357
  __classPrivateFieldSet(this, _LightningElement_props, props, "f");
1358
1358
  __classPrivateFieldSet(this, _LightningElement_attrs, attrs, "f");
1359
1359
  // Avoid setting the following types of properties that should not be set:
@@ -1362,9 +1362,9 @@ class LightningElement {
1362
1362
  // - Properties that are global but are internally overridden.
1363
1363
  for (const propName of keys(props)) {
1364
1364
  const attrName = htmlPropertyToAttribute(propName);
1365
- if (publicFields.has(propName) ||
1365
+ if (publicProperties.has(propName) ||
1366
1366
  ((REFLECTIVE_GLOBAL_PROPERTY_SET.has(propName) || isAriaAttribute(attrName)) &&
1367
- !privateFields.has(propName))) {
1367
+ !privateProperties.has(propName))) {
1368
1368
  // For props passed from parents to children, they are intended to be read-only
1369
1369
  // to avoid a child mutating its parent's state
1370
1370
  this[propName] = getReadOnlyProxy(props[propName]);
@@ -1543,14 +1543,20 @@ function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
1543
1543
  function renderAttrsNoYield(emit, instance, attrs, hostScopeToken, scopeToken) {
1544
1544
  emit(renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken));
1545
1545
  }
1546
- function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
1546
+ function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
1547
1547
  if (Cmp.renderMode !== 'light') {
1548
- yield '<template shadowrootmode="open"></template>';
1548
+ yield `<template shadowrootmode="open"></template>`;
1549
+ if (shadowSlottedContent) {
1550
+ yield shadowSlottedContent(instance);
1551
+ }
1549
1552
  }
1550
1553
  }
1551
- function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
1554
+ function fallbackTmplNoYield(emit, shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
1552
1555
  if (Cmp.renderMode !== 'light') {
1553
- emit('<template shadowrootmode="open"></template>');
1556
+ emit(`<template shadowrootmode="open"></template>`);
1557
+ if (shadowSlottedContent) {
1558
+ shadowSlottedContent(emit, instance);
1559
+ }
1554
1560
  }
1555
1561
  }
1556
1562
  async function serverSideRenderComponent(tagName, Component, props = {}, mode = DEFAULT_SSR_MODE) {
@@ -1840,5 +1846,5 @@ exports.track = track;
1840
1846
  exports.unwrap = unwrap$1;
1841
1847
  exports.validateStyleTextContents = validateStyleTextContents;
1842
1848
  exports.wire = wire;
1843
- /** version: 8.12.6 */
1849
+ /** version: 8.12.7 */
1844
1850
  //# 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.6 */
630
+ /** version: 8.12.7 */
631
631
 
632
632
  /*
633
633
  * Copyright (c) 2024, Salesforce, Inc.
@@ -1349,7 +1349,7 @@ class LightningElement {
1349
1349
  _LightningElement_classList.set(this, null);
1350
1350
  assign(this, propsAvailableAtConstruction);
1351
1351
  }
1352
- [(_LightningElement_props = new WeakMap(), _LightningElement_attrs = new WeakMap(), _LightningElement_classList = new WeakMap(), SYMBOL__SET_INTERNALS)](props, attrs, publicFields, privateFields) {
1352
+ [(_LightningElement_props = new WeakMap(), _LightningElement_attrs = new WeakMap(), _LightningElement_classList = new WeakMap(), SYMBOL__SET_INTERNALS)](props, attrs, publicProperties, privateProperties) {
1353
1353
  __classPrivateFieldSet(this, _LightningElement_props, props, "f");
1354
1354
  __classPrivateFieldSet(this, _LightningElement_attrs, attrs, "f");
1355
1355
  // Avoid setting the following types of properties that should not be set:
@@ -1358,9 +1358,9 @@ class LightningElement {
1358
1358
  // - Properties that are global but are internally overridden.
1359
1359
  for (const propName of keys(props)) {
1360
1360
  const attrName = htmlPropertyToAttribute(propName);
1361
- if (publicFields.has(propName) ||
1361
+ if (publicProperties.has(propName) ||
1362
1362
  ((REFLECTIVE_GLOBAL_PROPERTY_SET.has(propName) || isAriaAttribute(attrName)) &&
1363
- !privateFields.has(propName))) {
1363
+ !privateProperties.has(propName))) {
1364
1364
  // For props passed from parents to children, they are intended to be read-only
1365
1365
  // to avoid a child mutating its parent's state
1366
1366
  this[propName] = getReadOnlyProxy(props[propName]);
@@ -1539,14 +1539,20 @@ function* renderAttrs(instance, attrs, hostScopeToken, scopeToken) {
1539
1539
  function renderAttrsNoYield(emit, instance, attrs, hostScopeToken, scopeToken) {
1540
1540
  emit(renderAttrsPrivate(instance, attrs, hostScopeToken, scopeToken));
1541
1541
  }
1542
- function* fallbackTmpl(_shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
1542
+ function* fallbackTmpl(shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
1543
1543
  if (Cmp.renderMode !== 'light') {
1544
- yield '<template shadowrootmode="open"></template>';
1544
+ yield `<template shadowrootmode="open"></template>`;
1545
+ if (shadowSlottedContent) {
1546
+ yield shadowSlottedContent(instance);
1547
+ }
1545
1548
  }
1546
1549
  }
1547
- function fallbackTmplNoYield(emit, _shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, _instance) {
1550
+ function fallbackTmplNoYield(emit, shadowSlottedContent, _lightSlottedContent, _scopedSlottedContent, Cmp, instance) {
1548
1551
  if (Cmp.renderMode !== 'light') {
1549
- emit('<template shadowrootmode="open"></template>');
1552
+ emit(`<template shadowrootmode="open"></template>`);
1553
+ if (shadowSlottedContent) {
1554
+ shadowSlottedContent(emit, instance);
1555
+ }
1550
1556
  }
1551
1557
  }
1552
1558
  async function serverSideRenderComponent(tagName, Component, props = {}, mode = DEFAULT_SSR_MODE) {
@@ -1791,5 +1797,5 @@ function createContextProvider(adapter) {
1791
1797
  }
1792
1798
 
1793
1799
  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, 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 };
1794
- /** version: 8.12.6 */
1800
+ /** version: 8.12.7 */
1795
1801
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ClassList } from './class-list';
3
2
  import type { Attributes, Properties } from './types';
4
3
  import type { Stylesheets } from '@lwc/shared';
@@ -29,7 +28,7 @@ export declare class LightningElement implements PropsAvailableAtConstruction {
29
28
  isConnected: boolean;
30
29
  tagName: string;
31
30
  constructor(propsAvailableAtConstruction: PropsAvailableAtConstruction & Properties);
32
- [SYMBOL__SET_INTERNALS](props: Properties, attrs: Attributes, publicFields: Set<string>, privateFields: Set<string>): void;
31
+ [SYMBOL__SET_INTERNALS](props: Properties, attrs: Attributes, publicProperties: Set<string>, privateProperties: Set<string>): void;
33
32
  get className(): any;
34
33
  set className(newVal: any);
35
34
  get classList(): ClassList;
package/dist/render.d.ts CHANGED
@@ -3,8 +3,8 @@ 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, _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;
6
+ export declare function fallbackTmpl(shadowSlottedContent: AsyncGeneratorFunction, _lightSlottedContent: unknown, _scopedSlottedContent: unknown, Cmp: LightningElementConstructor, instance: unknown): Generator<"<template shadowrootmode=\"open\"></template>" | AsyncGenerator<unknown, any, any>, void, unknown>;
7
+ export declare function fallbackTmplNoYield(emit: (segment: string) => void, shadowSlottedContent: AsyncGeneratorFunction, _lightSlottedContent: unknown, _scopedSlottedContent: unknown, Cmp: LightningElementConstructor, instance: unknown): void;
8
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
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
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;
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.6",
7
+ "version": "8.12.7",
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.6",
52
- "@lwc/engine-core": "8.12.6",
51
+ "@lwc/shared": "8.12.7",
52
+ "@lwc/engine-core": "8.12.7",
53
53
  "observable-membrane": "2.0.0"
54
54
  }
55
55
  }