@kdujs/compiler-core-canary
Advanced tools
Comparing version 3.20241216.0-minor.0 to 3.20241216.0
@@ -0,27 +1,50 @@ | ||
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; | ||
import { ParserPlugin } from '@babel/parser'; | ||
import { RawSourceMap, SourceMapGenerator } from 'source-map-js'; | ||
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; | ||
export { generateCodeFrame } from '@kdujs/shared'; | ||
type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions; | ||
export declare const FRAGMENT: unique symbol; | ||
export declare const TELEPORT: unique symbol; | ||
export declare const SUSPENSE: unique symbol; | ||
export declare const KEEP_ALIVE: unique symbol; | ||
export declare const BASE_TRANSITION: unique symbol; | ||
export declare const OPEN_BLOCK: unique symbol; | ||
export declare const CREATE_BLOCK: unique symbol; | ||
export declare const CREATE_ELEMENT_BLOCK: unique symbol; | ||
export declare const CREATE_KNODE: unique symbol; | ||
export declare const CREATE_ELEMENT_KNODE: unique symbol; | ||
export declare const CREATE_COMMENT: unique symbol; | ||
export declare const CREATE_TEXT: unique symbol; | ||
export declare const CREATE_STATIC: unique symbol; | ||
export declare const RESOLVE_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DIRECTIVE: unique symbol; | ||
export declare const RESOLVE_FILTER: unique symbol; | ||
export declare const WITH_DIRECTIVES: unique symbol; | ||
export declare const RENDER_LIST: unique symbol; | ||
export declare const RENDER_SLOT: unique symbol; | ||
export declare const CREATE_SLOTS: unique symbol; | ||
export declare const TO_DISPLAY_STRING: unique symbol; | ||
export declare const MERGE_PROPS: unique symbol; | ||
export declare const NORMALIZE_CLASS: unique symbol; | ||
export declare const NORMALIZE_STYLE: unique symbol; | ||
export declare const NORMALIZE_PROPS: unique symbol; | ||
export declare const GUARD_REACTIVE_PROPS: unique symbol; | ||
export declare const TO_HANDLERS: unique symbol; | ||
export declare const CAMELIZE: unique symbol; | ||
export declare const CAPITALIZE: unique symbol; | ||
export declare const TO_HANDLER_KEY: unique symbol; | ||
export declare const SET_BLOCK_TRACKING: unique symbol; | ||
export declare const PUSH_SCOPE_ID: unique symbol; | ||
export declare const POP_SCOPE_ID: unique symbol; | ||
export declare const WITH_CTX: unique symbol; | ||
export declare const UNREF: unique symbol; | ||
export declare const IS_REF: unique symbol; | ||
export declare const WITH_MEMO: unique symbol; | ||
export declare const IS_MEMO_SAME: unique symbol; | ||
export declare const helperNameMap: Record<symbol, string>; | ||
export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; | ||
type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions; | ||
type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; | ||
export declare const enum TextModes { | ||
DATA = 0, | ||
RCDATA = 1, | ||
RAWTEXT = 2, | ||
CDATA = 3, | ||
ATTRIBUTE_VALUE = 4 | ||
} | ||
interface ParserContext { | ||
options: MergedParserOptions; | ||
readonly originalSource: string; | ||
source: string; | ||
offset: number; | ||
line: number; | ||
column: number; | ||
inPre: boolean; | ||
inKPre: boolean; | ||
onWarn: NonNullable<ErrorHandlingOptions['onWarn']>; | ||
} | ||
export declare function baseParse(content: string, options?: ParserOptions): RootNode; | ||
export declare function baseParse(input: string, options?: ParserOptions): RootNode; | ||
@@ -34,6 +57,5 @@ type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { | ||
} | ||
export declare const enum CompilerDeprecationTypes { | ||
export declare enum CompilerDeprecationTypes { | ||
COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", | ||
COMPILER_K_BIND_SYNC = "COMPILER_K_BIND_SYNC", | ||
COMPILER_K_BIND_PROP = "COMPILER_K_BIND_PROP", | ||
COMPILER_K_BIND_OBJECT_ORDER = "COMPILER_K_BIND_OBJECT_ORDER", | ||
@@ -44,6 +66,6 @@ COMPILER_K_ON_NATIVE = "COMPILER_K_ON_NATIVE", | ||
COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE", | ||
COMPILER_FILTERS = "COMPILER_FILTER" | ||
COMPILER_FILTERS = "COMPILER_FILTERS" | ||
} | ||
export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; | ||
export declare function warnDeprecation(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): void; | ||
export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; | ||
export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void; | ||
@@ -62,3 +84,3 @@ export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; | ||
} | ||
export interface TransformContext extends Required<Omit<TransformOptions, 'filename' | keyof CompilerCompatOptions>>, CompilerCompatOptions { | ||
export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions { | ||
selfName: string | null; | ||
@@ -83,2 +105,3 @@ root: RootNode; | ||
parent: ParentNode | null; | ||
grandParent: ParentNode | null; | ||
childIndex: number; | ||
@@ -97,6 +120,6 @@ currentNode: RootNode | TemplateChildNode | null; | ||
cache<T extends JSChildNode>(exp: T, isKNode?: boolean): CacheExpression | T; | ||
constantCache: Map<TemplateChildNode, ConstantTypes>; | ||
constantCache: WeakMap<TemplateChildNode, ConstantTypes>; | ||
filters?: Set<string>; | ||
} | ||
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; | ||
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext; | ||
export declare function transform(root: RootNode, options: TransformOptions): void; | ||
@@ -106,53 +129,2 @@ export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; | ||
export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; | ||
interface ForParseResult { | ||
source: ExpressionNode; | ||
value: ExpressionNode | undefined; | ||
key: ExpressionNode | undefined; | ||
index: ExpressionNode | undefined; | ||
} | ||
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; | ||
export declare const FRAGMENT: unique symbol; | ||
export declare const TELEPORT: unique symbol; | ||
export declare const SUSPENSE: unique symbol; | ||
export declare const KEEP_ALIVE: unique symbol; | ||
export declare const BASE_TRANSITION: unique symbol; | ||
export declare const OPEN_BLOCK: unique symbol; | ||
export declare const CREATE_BLOCK: unique symbol; | ||
export declare const CREATE_ELEMENT_BLOCK: unique symbol; | ||
export declare const CREATE_KNODE: unique symbol; | ||
export declare const CREATE_ELEMENT_KNODE: unique symbol; | ||
export declare const CREATE_COMMENT: unique symbol; | ||
export declare const CREATE_TEXT: unique symbol; | ||
export declare const CREATE_STATIC: unique symbol; | ||
export declare const RESOLVE_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DIRECTIVE: unique symbol; | ||
export declare const RESOLVE_FILTER: unique symbol; | ||
export declare const WITH_DIRECTIVES: unique symbol; | ||
export declare const RENDER_LIST: unique symbol; | ||
export declare const RENDER_SLOT: unique symbol; | ||
export declare const CREATE_SLOTS: unique symbol; | ||
export declare const TO_DISPLAY_STRING: unique symbol; | ||
export declare const MERGE_PROPS: unique symbol; | ||
export declare const NORMALIZE_CLASS: unique symbol; | ||
export declare const NORMALIZE_STYLE: unique symbol; | ||
export declare const NORMALIZE_PROPS: unique symbol; | ||
export declare const GUARD_REACTIVE_PROPS: unique symbol; | ||
export declare const TO_HANDLERS: unique symbol; | ||
export declare const CAMELIZE: unique symbol; | ||
export declare const CAPITALIZE: unique symbol; | ||
export declare const TO_HANDLER_KEY: unique symbol; | ||
export declare const SET_BLOCK_TRACKING: unique symbol; | ||
export declare const PUSH_SCOPE_ID: unique symbol; | ||
export declare const POP_SCOPE_ID: unique symbol; | ||
export declare const WITH_CTX: unique symbol; | ||
export declare const UNREF: unique symbol; | ||
export declare const IS_REF: unique symbol; | ||
export declare const WITH_MEMO: unique symbol; | ||
export declare const IS_MEMO_SAME: unique symbol; | ||
export declare const helperNameMap: Record<symbol, string>; | ||
export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; | ||
export declare const transformElement: NodeTransform; | ||
@@ -171,6 +143,8 @@ export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; | ||
export type Namespace = number; | ||
export declare const enum Namespaces { | ||
HTML = 0 | ||
export declare enum Namespaces { | ||
HTML = 0, | ||
SVG = 1, | ||
MATH_ML = 2 | ||
} | ||
export declare const enum NodeTypes { | ||
export declare enum NodeTypes { | ||
ROOT = 0, | ||
@@ -204,3 +178,3 @@ ELEMENT = 1, | ||
} | ||
export declare const enum ElementTypes { | ||
export declare enum ElementTypes { | ||
ELEMENT = 0, | ||
@@ -230,2 +204,3 @@ COMPONENT = 1, | ||
type: NodeTypes.ROOT; | ||
source: string; | ||
children: TemplateChildNode[]; | ||
@@ -241,2 +216,3 @@ helpers: Set<symbol>; | ||
codegenNode?: TemplateChildNode | JSChildNode | BlockStatement; | ||
transformed?: boolean; | ||
filters?: string[]; | ||
@@ -250,5 +226,6 @@ } | ||
tagType: ElementTypes; | ||
isSelfClosing: boolean; | ||
props: Array<AttributeNode | DirectiveNode>; | ||
children: TemplateChildNode[]; | ||
isSelfClosing?: boolean; | ||
innerLoc?: SourceLocation; | ||
} | ||
@@ -285,2 +262,3 @@ export interface PlainElementNode extends BaseElementNode { | ||
name: string; | ||
nameLoc: SourceLocation; | ||
value: TextNode | undefined; | ||
@@ -290,3 +268,11 @@ } | ||
type: NodeTypes.DIRECTIVE; | ||
/** | ||
* the normalized name without prefix or shorthands, e.g. "bind", "on" | ||
*/ | ||
name: string; | ||
/** | ||
* the raw attribute name, preserving shorthand, and including arg & modifiers | ||
* this is only used during parse. | ||
*/ | ||
rawName?: string; | ||
exp: ExpressionNode | undefined; | ||
@@ -298,3 +284,3 @@ arg: ExpressionNode | undefined; | ||
*/ | ||
parseResult?: ForParseResult; | ||
forParseResult?: ForParseResult; | ||
} | ||
@@ -306,3 +292,3 @@ /** | ||
*/ | ||
export declare const enum ConstantTypes { | ||
export declare enum ConstantTypes { | ||
NOT_CONSTANT = 0, | ||
@@ -319,2 +305,8 @@ CAN_SKIP_PATCH = 1, | ||
/** | ||
* - `null` means the expression is a simple identifier that doesn't need | ||
* parsing | ||
* - `false` means there was a parsing error | ||
*/ | ||
ast?: Node$1 | null | false; | ||
/** | ||
* Indicates this is an identifier for a hoist knode call and points to the | ||
@@ -337,2 +329,8 @@ * hoisted node. | ||
type: NodeTypes.COMPOUND_EXPRESSION; | ||
/** | ||
* - `null` means the expression is a simple identifier that doesn't need | ||
* parsing | ||
* - `false` means there was a parsing error | ||
*/ | ||
ast?: Node$1 | null | false; | ||
children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[]; | ||
@@ -368,2 +366,9 @@ /** | ||
} | ||
export interface ForParseResult { | ||
source: ExpressionNode; | ||
value: ExpressionNode | undefined; | ||
key: ExpressionNode | undefined; | ||
index: ExpressionNode | undefined; | ||
finalized: boolean; | ||
} | ||
export interface TextCallNode extends Node { | ||
@@ -538,6 +543,6 @@ type: NodeTypes.TEXT_CALL; | ||
export interface ForIteratorExpression extends FunctionExpression { | ||
returns: BlockCodegenNode; | ||
returns?: BlockCodegenNode; | ||
} | ||
export declare const locStub: SourceLocation; | ||
export declare function createRoot(children: TemplateChildNode[], loc?: SourceLocation): RootNode; | ||
export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode; | ||
export declare function createKNodeCall(context: TransformContext | null, tag: KNodeCall['tag'], props?: KNodeCall['props'], children?: KNodeCall['children'], patchFlag?: KNodeCall['patchFlag'], dynamicProps?: KNodeCall['dynamicProps'], directives?: KNodeCall['directives'], isBlock?: KNodeCall['isBlock'], disableTracking?: KNodeCall['disableTracking'], isComponent?: KNodeCall['isComponent'], loc?: SourceLocation): KNodeCall; | ||
@@ -576,3 +581,3 @@ export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; | ||
}, additionalMessage?: string): InferCompilerError<T>; | ||
export declare const enum ErrorCodes { | ||
export declare enum ErrorCodes { | ||
ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0, | ||
@@ -629,6 +634,7 @@ CDATA_IN_HTML_CONTENT = 1, | ||
X_SCOPE_ID_NOT_SUPPORTED = 50, | ||
DEPRECATION_KNODE_HOOKS = 51, | ||
DEPRECATION_K_IS = 52, | ||
X_KNODE_HOOKS = 51, | ||
X_K_BIND_INVALID_SAME_NAME_ARGUMENT = 52, | ||
__EXTEND_POINT__ = 53 | ||
} | ||
export declare const errorMessages: Record<ErrorCodes, string>; | ||
@@ -641,2 +647,20 @@ interface ErrorHandlingOptions { | ||
/** | ||
* Base mode is platform agnostic and only parses HTML-like template syntax, | ||
* treating all tags the same way. Specific tag parsing behavior can be | ||
* configured by higher-level compilers. | ||
* | ||
* HTML mode adds additional logic for handling special parsing behavior in | ||
* `<script>`, `<style>`,`<title>` and `<textarea>`. | ||
* The logic is handled inside compiler-core for efficiency. | ||
* | ||
* SFC mode treats content of all root-level tags except `<template>` as plain | ||
* text. | ||
*/ | ||
parseMode?: 'base' | 'html' | 'sfc'; | ||
/** | ||
* Specify the root namespace to use when parsing a template. | ||
* Defaults to `Namespaces.HTML` (0). | ||
*/ | ||
ns?: Namespaces; | ||
/** | ||
* e.g. platform native elements, e.g. `<div>` for browsers | ||
@@ -664,8 +688,4 @@ */ | ||
*/ | ||
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace; | ||
getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace; | ||
/** | ||
* Get text parsing mode for this element | ||
*/ | ||
getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes; | ||
/** | ||
* @default ['{{', '}}'] | ||
@@ -676,6 +696,8 @@ */ | ||
* Whitespace handling strategy | ||
* @default 'condense' | ||
*/ | ||
whitespace?: 'preserve' | 'condense'; | ||
/** | ||
* Only needed for DOM compilers | ||
* Only used for DOM compilers that runs in the browser. | ||
* In non-browser builds, this option is ignored. | ||
*/ | ||
@@ -688,5 +710,16 @@ decodeEntities?: (rawText: string, asAttr: boolean) => string; | ||
comments?: boolean; | ||
/** | ||
* Parse JavaScript expressions with Babel. | ||
* @default false | ||
*/ | ||
prefixIdentifiers?: boolean; | ||
/** | ||
* A list of parser plugins to enable for `@babel/parser`, which is used to | ||
* parse expressions in bindings and interpolations. | ||
* https://babeljs.io/docs/en/next/babel-parser#plugins | ||
*/ | ||
expressionPlugins?: ParserPlugin[]; | ||
} | ||
export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void; | ||
export declare const enum BindingTypes { | ||
export declare enum BindingTypes { | ||
/** | ||
@@ -868,2 +901,8 @@ * returned from data() | ||
ssrCssVars?: string; | ||
/** | ||
* Whether to compile the template assuming it needs to handle HMR. | ||
* Some edge cases may need to generate different code for HMR to work | ||
* correctly. | ||
*/ | ||
hmr?: boolean; | ||
} | ||
@@ -915,2 +954,37 @@ export interface CodegenOptions extends SharedTransformCodegenOptions { | ||
/** | ||
* The `SourceMapGenerator` type from `source-map-js` is a bit incomplete as it | ||
* misses `toJSON()`. We also need to add types for internal properties which we | ||
* need to access for better performance. | ||
* | ||
* Since TS 5.3, dts generation starts to strangely include broken triple slash | ||
* references for source-map-js, so we are inlining all source map related types | ||
* here to to workaround that. | ||
*/ | ||
export interface CodegenSourceMapGenerator { | ||
setSourceContent(sourceFile: string, sourceContent: string): void; | ||
toJSON(): RawSourceMap; | ||
_sources: Set<string>; | ||
_names: Set<string>; | ||
_mappings: { | ||
add(mapping: MappingItem): void; | ||
}; | ||
} | ||
export interface RawSourceMap { | ||
file?: string; | ||
sourceRoot?: string; | ||
version: string; | ||
sources: string[]; | ||
names: string[]; | ||
sourcesContent?: string[]; | ||
mappings: string; | ||
} | ||
interface MappingItem { | ||
source: string; | ||
generatedLine: number; | ||
generatedColumn: number; | ||
originalLine: number; | ||
originalColumn: number; | ||
name: string | null; | ||
} | ||
type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; | ||
@@ -931,5 +1005,5 @@ export interface CodegenResult { | ||
pure: boolean; | ||
map?: SourceMapGenerator; | ||
map?: CodegenSourceMapGenerator; | ||
helper(key: symbol): string; | ||
push(code: string, node?: CodegenNode): void; | ||
push(code: string, newlineIndex?: number, node?: CodegenNode): void; | ||
indent(): void; | ||
@@ -948,6 +1022,5 @@ deindent(withoutNewLine?: boolean): void; | ||
export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; | ||
export declare function baseCompile(template: string | RootNode, options?: CompilerOptions): CodegenResult; | ||
export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult; | ||
export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; | ||
export declare const isBuiltInType: (tag: string, expected: string) => boolean; | ||
export declare function isCoreComponent(tag: string): symbol | void; | ||
@@ -964,3 +1037,2 @@ export declare const isSimpleIdentifier: (name: string) => boolean; | ||
export declare const isMemberExpression: (path: string, context: TransformContext) => boolean; | ||
export declare function getInnerRange(loc: SourceLocation, offset: number, length: number): SourceLocation; | ||
export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
@@ -981,6 +1053,11 @@ export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
export declare function getMemoedKNodeCall(node: BlockCodegenNode | MemoExpression): KNodeCall | RenderSlotCall; | ||
export declare const forAliasRE: RegExp; | ||
/** | ||
* Return value indicates whether the AST walked can be a constant | ||
*/ | ||
export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; | ||
export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; | ||
export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; | ||
export declare function isInNewExpression(parentStack: Node$1[]): boolean; | ||
export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; | ||
@@ -993,2 +1070,3 @@ export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; | ||
export declare const TS_NODE_TYPES: string[]; | ||
export declare function unwrapTSNode(node: Node$1): Node$1; | ||
@@ -1005,2 +1083,5 @@ export declare const transformModel: DirectiveTransform; | ||
export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; | ||
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; | ||
export declare const transformExpression: NodeTransform; | ||
@@ -1012,3 +1093,3 @@ export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; | ||
export declare const trackKForSlotScopes: NodeTransform; | ||
export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; | ||
export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, kFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; | ||
export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { | ||
@@ -1015,0 +1096,0 @@ slots: SlotsExpression; |
{ | ||
"name": "@kdujs/compiler-core-canary", | ||
"version": "3.20241216.0-minor.0", | ||
"version": "3.20241216.0", | ||
"description": "@kdujs/compiler-core", | ||
@@ -12,2 +12,16 @@ "main": "index.js", | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/compiler-core.d.ts", | ||
"node": { | ||
"production": "./dist/compiler-core.cjs.prod.js", | ||
"development": "./dist/compiler-core.cjs.js", | ||
"default": "./index.js" | ||
}, | ||
"module": "./dist/compiler-core.esm-bundler.js", | ||
"import": "./dist/compiler-core.esm-bundler.js", | ||
"require": "./index.js" | ||
}, | ||
"./*": "./*" | ||
}, | ||
"buildOptions": { | ||
@@ -36,10 +50,11 @@ "name": "KduCompilerCore", | ||
"dependencies": { | ||
"@babel/parser": "^7.23.0", | ||
"@kdujs/shared": "npm:@kdujs/shared-canary@3.20241216.0-minor.0", | ||
"@babel/parser": "^7.24.6", | ||
"@kdujs/shared": "npm:@kdujs/shared-canary@3.20241216.0", | ||
"entities": "^4.5.0", | ||
"estree-walker": "^2.0.2", | ||
"source-map-js": "^1.0.2" | ||
"source-map-js": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/types": "^7.23.0" | ||
"@babel/types": "^7.24.6" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
603163
19735
1
5
87
+ Addedentities@^4.5.0
+ Added@kdujs/shared-canary@3.20241216.0(transitive)
+ Addedentities@4.5.0(transitive)
- Removed@kdujs/shared-canary@3.20241216.0-minor.0(transitive)
Updated@babel/parser@^7.24.6
Updatedsource-map-js@^1.2.0