@lwc/template-compiler
Advanced tools
Comparing version 6.3.4 to 6.4.0
import { APIVersion } from '@lwc/shared'; | ||
import * as t from '../shared/estree'; | ||
import { ChildNode, Expression, ComplexExpression, Literal, LWCDirectiveRenderMode, Root, EventListener, RefDirective, StaticElement } from '../shared/types'; | ||
import { ChildNode, Expression, ComplexExpression, Literal, LWCDirectiveRenderMode, Root, EventListener, RefDirective, Text, StaticElement, Attribute, KeyDirective } from '../shared/types'; | ||
import State from '../state'; | ||
@@ -50,2 +50,3 @@ export default class CodeGen { | ||
apiVersion: APIVersion; | ||
staticExpressionMap: WeakMap<Attribute | Text, string>; | ||
constructor({ root, state, scopeFragmentId, }: { | ||
@@ -62,2 +63,3 @@ root: Root; | ||
genText(value: Array<string | t.Expression>): t.Expression; | ||
genConcatenatedText(value: Array<string | t.Expression>): t.Expression; | ||
genComment(value: string): t.Expression; | ||
@@ -69,3 +71,2 @@ genSanitizeHtmlContent(content: t.Expression): t.Expression; | ||
genFlatten(children: t.Expression[]): import("estree").CallExpression; | ||
genKey(compilerKey: t.SimpleLiteral, value: t.Expression): import("estree").CallExpression; | ||
genScopedId(id: string | t.Expression): t.CallExpression; | ||
@@ -91,2 +92,3 @@ genScopedFragId(id: string | t.Expression): t.CallExpression; | ||
genRef(ref: RefDirective): import("estree").Property; | ||
genKeyExpression(ref: KeyDirective | undefined, slotParentName: string | undefined): import("estree").SimpleLiteral | import("estree").CallExpression; | ||
/** | ||
@@ -119,3 +121,4 @@ * This routine generates an expression that avoids | ||
genStaticParts(element: StaticElement): t.ArrayExpression | undefined; | ||
genStaticPart(partId: number, databagProperties: t.Property[]): t.CallExpression; | ||
genStaticPart(partId: number, data: t.Expression, text: t.Expression): t.CallExpression; | ||
getStaticExpressionToken(node: Attribute | Text): string; | ||
} |
import * as t from '../shared/estree'; | ||
import { ComplexExpression } from '../shared/types'; | ||
import { Attribute, BaseElement, ComplexExpression, Property } from '../shared/types'; | ||
import type CodeGen from './codegen'; | ||
@@ -26,1 +26,2 @@ /** | ||
export declare function bindComplexExpression(expression: ComplexExpression, codeGen: CodeGen): t.Expression; | ||
export declare function bindAttributeExpression(attr: Attribute | Property, element: BaseElement, codeGen: CodeGen, addLegacySanitizationHook: boolean): import("estree").Identifier | import("estree").MemberExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").ArrowFunctionExpression | import("estree").UnaryExpression | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").BigIntLiteral | import("estree").AssignmentExpression | import("estree").AwaitExpression | import("estree").BinaryExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").ChainExpression | import("estree").ClassExpression | import("estree").ConditionalExpression | import("estree").FunctionExpression | import("estree").ImportExpression | import("estree").LogicalExpression | import("estree").MetaProperty | import("estree").SequenceExpression | import("estree").TaggedTemplateExpression | import("estree").TemplateLiteral | import("estree").ThisExpression | import("estree").UpdateExpression | import("estree").YieldExpression; |
import * as t from '../shared/estree'; | ||
import { ChildNode, Node, Root } from '../shared/types'; | ||
import State from '../state'; | ||
import { ChildNode, Node } from '../shared/types'; | ||
import CodeGen from './codegen'; | ||
@@ -31,2 +30,1 @@ export declare function identifierFromComponentName(name: string): t.Identifier; | ||
export declare function parseClassNames(classNames: string): string[]; | ||
export declare function getStaticNodes(root: Root, state: State): Set<ChildNode>; |
@@ -1,2 +0,3 @@ | ||
import { Element } from '../shared/types'; | ||
export declare function serializeStaticElement(element: Element, preserveComments: boolean): string; | ||
import { StaticElement } from '../shared/types'; | ||
import type CodeGen from './codegen'; | ||
export declare function serializeStaticElement(element: StaticElement, codeGen: CodeGen): string; |
@@ -72,1 +72,2 @@ import { Token as parse5TokenInfo } from 'parse5'; | ||
export declare function isScopedSlotFragment(node: BaseNode): node is ScopedSlotFragment; | ||
export declare function isAttribute(node: BaseNode): node is Attribute; |
@@ -132,4 +132,5 @@ import { CompilerDiagnostic } from '@lwc/errors'; | ||
export interface StaticElement extends Element { | ||
children: (StaticElement | Text)[]; | ||
children: StaticChildNode[]; | ||
} | ||
export type StaticChildNode = StaticElement | Text; | ||
export interface ExternalComponent extends AbstractBaseElement { | ||
@@ -136,0 +137,0 @@ type: 'ExternalComponent'; |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/template-compiler", | ||
"version": "6.3.4", | ||
"version": "6.4.0", | ||
"description": "Template compiler package", | ||
@@ -46,4 +46,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@lwc/errors": "6.3.4", | ||
"@lwc/shared": "6.3.4", | ||
"@lwc/errors": "6.4.0", | ||
"@lwc/shared": "6.4.0", | ||
"acorn": "8.10.0", | ||
@@ -50,0 +50,0 @@ "astring": "~1.8.6", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2873825
39
29831
+ Added@lwc/errors@6.4.0(transitive)
+ Added@lwc/shared@6.4.0(transitive)
- Removed@lwc/errors@6.3.4(transitive)
- Removed@lwc/shared@6.3.4(transitive)
Updated@lwc/errors@6.4.0
Updated@lwc/shared@6.4.0