@lwc/ssr-compiler 8.10.1 → 8.12.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.
@@ -12,4 +12,4 @@ import type { ComponentMetaState } from './types';
12
12
  * - yielding the tag name & attributes
13
13
  * - deferring to the template function for yielding child content
14
14
  */
15
- export declare function addGenerateMarkupExport(program: Program, state: ComponentMetaState, tagName: string, filename: string): void;
15
+ export declare function addGenerateMarkupFunction(program: Program, state: ComponentMetaState, tagName: string, filename: string): void;
@@ -1,4 +1,4 @@
1
- import type { CompilationMode } from '../shared';
1
+ import type { CompilationMode } from '@lwc/shared';
2
2
  export default function compileJS(src: string, filename: string, tagName: string, compilationMode: CompilationMode): {
3
3
  code: string;
4
4
  };
@@ -0,0 +1,4 @@
1
+ import type { IfStatement as EsIfStatement } from 'estree';
2
+ import type { TransformerContext } from './types';
3
+ export declare const isLastConcatenatedNode: (cxt: TransformerContext) => boolean;
4
+ export declare const bYieldTextContent: () => EsIfStatement;
@@ -1,5 +1,5 @@
1
1
  import { type Config as TemplateCompilerConfig } from '@lwc/template-compiler';
2
- import type { CompilationMode } from '../shared';
2
+ import type { CompilationMode } from '@lwc/shared';
3
3
  export default function compileTemplate(src: string, filename: string, options: TemplateCompilerConfig, compilationMode: CompilationMode): {
4
4
  code: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { TransformerContext } from './types';
2
- import type { Node as IrNode, Attribute as IrAttribute, Property as IrProperty } from '@lwc/template-compiler';
3
- import type { Statement as EsStatement, Expression as EsExpression, ObjectExpression as EsObjectExpression } from 'estree';
2
+ import type { Attribute as IrAttribute, Node as IrNode, Property as IrProperty } from '@lwc/template-compiler';
3
+ import type { Expression as EsExpression, ObjectExpression as EsObjectExpression, Statement as EsStatement } from 'estree';
4
4
  export declare function optimizeAdjacentYieldStmts(statements: EsStatement[]): EsStatement[];
5
5
  export declare function bAttributeValue(node: IrNode, attrName: string): EsExpression;
6
6
  /**
@@ -9,6 +9,7 @@ export declare function bAttributeValue(node: IrNode, attrName: string): EsExpre
9
9
  * inside a `for:each` block then the `foo` variable may refer to the scoped `foo`,
10
10
  * e.g. `<template for:each={foos} for:item="foo">`
11
11
  * @param expression
12
+ * @param cxt
12
13
  */
13
14
  export declare function getScopedExpression(expression: EsExpression, cxt: TransformerContext): EsExpression;
14
15
  export declare function normalizeClassAttributeValue(value: string): string;
@@ -5,7 +5,6 @@ export interface TransformerContext {
5
5
  pushLocalVars: (vars: string[]) => void;
6
6
  popLocalVars: () => void;
7
7
  isLocalVar: (varName: string | null | undefined) => boolean;
8
- getUniqueVar: () => string;
9
8
  templateOptions: TemplateOpts;
10
9
  prevSibling?: IrNode;
11
10
  nextSibling?: IrNode;
@@ -13,4 +12,5 @@ export interface TransformerContext {
13
12
  }
14
13
  export interface TemplateOpts {
15
14
  preserveComments: boolean;
15
+ experimentalComplexExpressions: boolean;
16
16
  }