@lwc/template-compiler 8.8.0 → 8.10.0-alpha.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
@@ -9625,18 +9625,6 @@ const KNOWN_HTML_AND_SVG_ELEMENTS = new Set([...HTML_ELEMENTS, ...SVG_ELEMENTS])
9625
9625
  const HTML_TAG = {
9626
9626
  A: 'a',
9627
9627
  AREA: 'area',
9628
- BODY: 'body',
9629
- CAPTION: 'caption',
9630
- COL: 'col',
9631
- COLGROUP: 'colgroup',
9632
- HEAD: 'head',
9633
- HTML: 'html',
9634
- TBODY: 'tbody',
9635
- TD: 'td',
9636
- TFOOT: 'tfoot',
9637
- TH: 'th',
9638
- THEAD: 'thead',
9639
- TR: 'tr',
9640
9628
  USE: 'use',
9641
9629
  };
9642
9630
  const ATTR_NAME = {
@@ -12667,6 +12655,12 @@ function isInIteratorElement(ctx) {
12667
12655
  return !!(getForOfParent(ctx) || getForEachParent(ctx));
12668
12656
  }
12669
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
+ */
12670
12664
  function shouldAddCustomRenderer(element, state) {
12671
12665
  // Elements of type `ExternalComponent` (e.g., elements with the lwc:external directive)
12672
12666
  if (state.crDirectives.has('lwc:external') && element.type === 'ExternalComponent') {
@@ -14705,5 +14699,5 @@ exports.generateScopeTokens = generateScopeTokens;
14705
14699
  exports.kebabcaseToCamelcase = kebabcaseToCamelcase;
14706
14700
  exports.parse = parse;
14707
14701
  exports.toPropertyName = toPropertyName;
14708
- /** version: 8.8.0 */
14702
+ /** version: 8.10.0-alpha.0 */
14709
14703
  //# sourceMappingURL=index.cjs.js.map