@lwc/template-compiler 8.9.0 → 8.10.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.
@@ -1,7 +1,8 @@
1
- import { APIVersion } from '@lwc/shared';
2
1
  import * as t from '../shared/estree';
3
- import { ChildNode, Expression, ComplexExpression, Literal, LWCDirectiveRenderMode, Root, EventListener, RefDirective, Text, StaticElement, Attribute, KeyDirective } from '../shared/types';
4
- import State from '../state';
2
+ import { LWCDirectiveRenderMode } from '../shared/types';
3
+ import type State from '../state';
4
+ import type { ChildNode, Expression, ComplexExpression, Literal, Root, EventListener, RefDirective, Text, StaticElement, Attribute, KeyDirective } from '../shared/types';
5
+ import type { APIVersion } from '@lwc/shared';
5
6
  export default class CodeGen {
6
7
  /** The AST root. */
7
8
  readonly root: Root;
@@ -1,5 +1,5 @@
1
1
  import * as t from '../shared/estree';
2
- import { Attribute, BaseElement, ComplexExpression, Property } from '../shared/types';
2
+ import type { Attribute, BaseElement, ComplexExpression, Property } from '../shared/types';
3
3
  import type CodeGen from './codegen';
4
4
  /**
5
5
  * Bind the passed expression to the component instance. It applies the following
@@ -1,5 +1,5 @@
1
1
  import * as t from '../../shared/estree';
2
- import CodeGen from '../codegen';
2
+ import type CodeGen from '../codegen';
3
3
  /**
4
4
  * Generate an ES module AST from a template ESTree AST. The generated module imports the dependent
5
5
  * LWC components via import statements and expose the template function via a default export
@@ -1,6 +1,6 @@
1
1
  import * as t from '../shared/estree';
2
- import { ChildNode, Node } from '../shared/types';
3
- import CodeGen from './codegen';
2
+ import type { ChildNode, Node } from '../shared/types';
3
+ import type CodeGen from './codegen';
4
4
  export declare function identifierFromComponentName(name: string): t.Identifier;
5
5
  export declare function getMemberExpressionRoot(expression: t.MemberExpression): t.Identifier;
6
6
  export declare function objectToAST(obj: object, valueMapper: (key: string) => t.Expression): t.ObjectExpression;
@@ -1,3 +1,3 @@
1
- import { Root } from '../shared/types';
2
- import State from '../state';
1
+ import type State from '../state';
2
+ import type { Root } from '../shared/types';
3
3
  export default function (root: Root, state: State): string;
@@ -1,3 +1,3 @@
1
- import { StaticElement } from '../shared/types';
1
+ import type { StaticElement } from '../shared/types';
2
2
  import type CodeGen from './codegen';
3
3
  export declare function serializeStaticElement(element: StaticElement, codeGen: CodeGen): string;
@@ -1,5 +1,5 @@
1
- import { ChildNode, Root, StaticElement, StaticChildNode, Text } from '../shared/types';
2
- import State from '../state';
1
+ import type State from '../state';
2
+ import type { ChildNode, Root, StaticElement, StaticChildNode, Text } from '../shared/types';
3
3
  export declare function getStaticNodes(root: Root, state: State): Set<ChildNode>;
4
4
  export declare function transformStaticChildren(elm: StaticElement, preserveComments: boolean): (StaticChildNode | Text[])[];
5
5
  export declare const isContiguousText: (staticChild: StaticChildNode | Text[]) => staticChild is Text[];
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { InstrumentationObject } from '@lwc/errors';
2
- import { CustomRendererConfig } from './shared/renderer-hooks';
1
+ import type { CustomRendererConfig } from './shared/renderer-hooks';
2
+ import type { InstrumentationObject } from '@lwc/errors';
3
3
  export interface Config {
4
4
  /** The name of the component. For example, the name in `<my-component>` is `"component"`. */
5
5
  name?: string;
package/dist/index.cjs.js CHANGED
@@ -12655,6 +12655,12 @@ function isInIteratorElement(ctx) {
12655
12655
  return !!(getForOfParent(ctx) || getForEachParent(ctx));
12656
12656
  }
12657
12657
 
12658
+ /*
12659
+ * Copyright (c) 2018, salesforce.com, inc.
12660
+ * All rights reserved.
12661
+ * SPDX-License-Identifier: MIT
12662
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
12663
+ */
12658
12664
  function shouldAddCustomRenderer(element, state) {
12659
12665
  // Elements of type `ExternalComponent` (e.g., elements with the lwc:external directive)
12660
12666
  if (state.crDirectives.has('lwc:external') && element.type === 'ExternalComponent') {
@@ -14693,5 +14699,5 @@ exports.generateScopeTokens = generateScopeTokens;
14693
14699
  exports.kebabcaseToCamelcase = kebabcaseToCamelcase;
14694
14700
  exports.parse = parse;
14695
14701
  exports.toPropertyName = toPropertyName;
14696
- /** version: 8.9.0 */
14702
+ /** version: 8.10.0 */
14697
14703
  //# sourceMappingURL=index.cjs.js.map