@lwc/template-compiler 3.7.0 → 3.7.2

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,15 +1,15 @@
1
- import { Token as parse5Tokens } from '../shared/parse5';
1
+ import { Token } from 'parse5';
2
2
  import { Attribute, BaseElement, SourceLocation } from '../shared/types';
3
3
  import ParserCtx from './parser';
4
4
  export declare function isIdReferencingAttribute(attrName: string): boolean;
5
5
  export declare function isAllowedFragOnlyUrlsXHTML(tagName: string, attrName: string, namespaceURI: string): boolean;
6
6
  export declare function isSvgUseHref(tagName: string, attrName: string, namespaceURI: string): boolean;
7
7
  export declare function isFragmentOnlyUrl(url: string): boolean;
8
- export declare function normalizeAttributeValue(ctx: ParserCtx, raw: string, tag: string, attr: parse5Tokens.Attribute, location: SourceLocation): {
8
+ export declare function normalizeAttributeValue(ctx: ParserCtx, raw: string, tag: string, attr: Token.Attribute, location: SourceLocation): {
9
9
  value: string;
10
10
  escapedExpression: boolean;
11
11
  };
12
- export declare function attributeName(attr: parse5Tokens.Attribute): string;
12
+ export declare function attributeName(attr: Token.Attribute): string;
13
13
  export declare function isProhibitedIsAttribute(attrName: string): boolean;
14
14
  export declare function isTabIndexAttribute(attrName: string): boolean;
15
15
  export declare function isValidTabIndexAttributeValue(value: any): boolean;
@@ -1,5 +1,5 @@
1
1
  import { ParserError } from 'parse5';
2
- import { DocumentFragment } from '../../shared/parse5';
2
+ import { DocumentFragment } from '@parse5/tools';
3
3
  import type ParserCtx from '../parser';
4
4
  interface ParseFragmentConfig {
5
5
  ctx: ParserCtx;
@@ -1,7 +1,7 @@
1
1
  import type { Node as AcornNode } from 'acorn';
2
- import type { Preprocessor as Parse5Preprocessor } from '../../shared/parse5';
2
+ import type { Tokenizer } from 'parse5';
3
3
  export type PreparsedExpressionMap = Map<number, AcornNode>;
4
- export type Preprocessor = Omit<Parse5Preprocessor, 'pos'> & {
4
+ export type Preprocessor = Omit<Tokenizer['preprocessor'], 'pos'> & {
5
5
  pos: number;
6
6
  advance: () => void;
7
7
  };
@@ -1,4 +1,4 @@
1
- import { Token as parse5TokenInfo } from './parse5';
1
+ import { Token as parse5TokenInfo } from 'parse5';
2
2
  import { Literal, SourceLocation, Element, ExternalComponent, Component, Expression, ComplexExpression, Comment, Text, ForEach, ForBlock, Slot, Identifier, Root, EventListener, KeyDirective, DynamicDirective, DomDirective, PreserveCommentsDirective, RenderModeDirective, Attribute, Property, ParentNode, BaseNode, ForOf, LWCDirectiveRenderMode, If, IfBlock, ElseBlock, ElseifBlock, ElementSourceLocation, InnerHTMLDirective, BaseElement, LWCDirectiveDomMode, RefDirective, SpreadDirective, ElementDirective, RootDirective, SlotBindDirective, ScopedSlotFragment, SlotDataDirective, IsDirective, LwcComponent, LwcTagName, BaseLwcElement } from './types';
3
3
  export declare function root(parse5ElmLocation: parse5TokenInfo.ElementLocation): Root;
4
4
  export declare function element(tagName: string, namespaceURI: string, parse5ElmLocation: parse5TokenInfo.ElementLocation): Element;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
5
5
  ],
6
6
  "name": "@lwc/template-compiler",
7
- "version": "3.7.0",
7
+ "version": "3.7.2",
8
8
  "description": "Template compiler package",
9
9
  "keywords": [
10
10
  "lwc"
@@ -42,8 +42,8 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@lwc/errors": "3.7.0",
46
- "@lwc/shared": "3.7.0",
45
+ "@lwc/errors": "3.7.2",
46
+ "@lwc/shared": "3.7.2",
47
47
  "acorn": "~8.10.0",
48
48
  "astring": "~1.8.6",
49
49
  "estree-walker": "~2.0.2",
@@ -53,6 +53,7 @@
53
53
  "@types/estree": "1.0.2",
54
54
  "@types/he": "^1.2.1",
55
55
  "@types/source-map": "0.5.7",
56
- "parse5": "~7.1.2"
56
+ "parse5": "~7.1.2",
57
+ "@parse5/tools": "^0.3.0"
57
58
  }
58
59
  }
@@ -1,19 +0,0 @@
1
- import { Token } from 'parse5';
2
- import type { DefaultTreeAdapterMap } from 'parse5';
3
- import type { Tokenizer } from 'parse5';
4
- export type Preprocessor = Tokenizer['preprocessor'];
5
- export type ElementLocation = Token.ElementLocation;
6
- export type ChildNode = DefaultTreeAdapterMap['childNode'];
7
- export type CommentNode = DefaultTreeAdapterMap['commentNode'];
8
- export type Document = DefaultTreeAdapterMap['document'];
9
- export type DocumentFragment = DefaultTreeAdapterMap['documentFragment'];
10
- export type Element = DefaultTreeAdapterMap['element'];
11
- export type Node = DefaultTreeAdapterMap['node'];
12
- export type Template = DefaultTreeAdapterMap['template'];
13
- export type TextNode = DefaultTreeAdapterMap['textNode'];
14
- export { Token };
15
- export declare function isElementNode(node: Node | null): node is Element;
16
- export declare function isCommentNode(node: Node): node is CommentNode;
17
- export declare function isTextNode(node: Node): node is TextNode;
18
- export declare function isTemplateNode(node: Node): node is Template;
19
- export declare function getTemplateContent(templateElement: Element | Template): DocumentFragment | undefined;