@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.
- package/dist/codegen/codegen.d.ts +4 -3
- package/dist/codegen/expression.d.ts +1 -1
- package/dist/codegen/formatters/module.d.ts +1 -1
- package/dist/codegen/helpers.d.ts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/codegen/static-element-serializer.d.ts +1 -1
- package/dist/codegen/static-element.d.ts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/index.cjs.js +7 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -14
- package/dist/index.js.map +1 -1
- package/dist/parser/attribute.d.ts +3 -3
- package/dist/parser/expression-complex/html.d.ts +2 -2
- package/dist/parser/expression-complex/index.d.ts +1 -1
- package/dist/parser/expression.d.ts +2 -2
- package/dist/parser/html.d.ts +1 -1
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/parser.d.ts +5 -4
- package/dist/shared/ast.d.ts +2 -2
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/renderer-hooks.d.ts +2 -2
- package/dist/shared/types.d.ts +1 -1
- package/dist/state.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { APIVersion } from '@lwc/shared';
|
|
2
1
|
import * as t from '../shared/estree';
|
|
3
|
-
import {
|
|
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;
|
package/dist/codegen/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type State from '../state';
|
|
2
|
+
import type { Root } from '../shared/types';
|
|
3
3
|
export default function (root: Root, state: State): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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 {
|
|
2
|
-
import {
|
|
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.
|
|
14702
|
+
/** version: 8.10.0-alpha.0 */
|
|
14709
14703
|
//# sourceMappingURL=index.cjs.js.map
|