@vue/compiler-vapor 3.6.0-alpha.3 → 3.6.0-alpha.5
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/compiler-vapor.cjs.js +284 -151
- package/dist/compiler-vapor.d.ts +19 -6
- package/dist/compiler-vapor.esm-browser.js +347 -11377
- package/package.json +3 -3
package/dist/compiler-vapor.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { SimpleExpressionNode, RootNode, TemplateChildNode, DirectiveNode, Compo
|
|
|
2
2
|
export { parse } from '@vue/compiler-dom';
|
|
3
3
|
import * as packages_runtime_vapor_src from 'packages/runtime-vapor/src';
|
|
4
4
|
import * as packages_runtime_dom_src from 'packages/runtime-dom/src';
|
|
5
|
-
import { Prettify } from '@vue/shared';
|
|
5
|
+
import { Prettify, Namespace } from '@vue/shared';
|
|
6
|
+
import { ImportItem } from '@vue/compiler-core';
|
|
6
7
|
|
|
7
8
|
export interface IRProp extends Omit<DirectiveTransformResult, 'value'> {
|
|
8
9
|
values: SimpleExpressionNode[];
|
|
@@ -99,8 +100,9 @@ export interface RootIRNode {
|
|
|
99
100
|
type: IRNodeTypes.ROOT;
|
|
100
101
|
node: RootNode;
|
|
101
102
|
source: string;
|
|
102
|
-
template: string
|
|
103
|
-
|
|
103
|
+
template: Map<string, Namespace>;
|
|
104
|
+
templateIndexMap: Map<string, number>;
|
|
105
|
+
rootTemplateIndexes: Set<number>;
|
|
104
106
|
component: Set<string>;
|
|
105
107
|
directive: Set<string>;
|
|
106
108
|
block: BlockIRNode;
|
|
@@ -141,14 +143,13 @@ export interface SetPropIRNode extends BaseIRNode {
|
|
|
141
143
|
type: IRNodeTypes.SET_PROP;
|
|
142
144
|
element: number;
|
|
143
145
|
prop: IRProp;
|
|
144
|
-
root: boolean;
|
|
145
146
|
tag: string;
|
|
146
147
|
}
|
|
147
148
|
export interface SetDynamicPropsIRNode extends BaseIRNode {
|
|
148
149
|
type: IRNodeTypes.SET_DYNAMIC_PROPS;
|
|
149
150
|
element: number;
|
|
150
151
|
props: IRProps[];
|
|
151
|
-
|
|
152
|
+
tag: string;
|
|
152
153
|
}
|
|
153
154
|
export interface SetDynamicEventsIRNode extends BaseIRNode {
|
|
154
155
|
type: IRNodeTypes.SET_DYNAMIC_EVENTS;
|
|
@@ -223,6 +224,7 @@ export interface CreateComponentIRNode extends BaseIRNode {
|
|
|
223
224
|
root: boolean;
|
|
224
225
|
once: boolean;
|
|
225
226
|
dynamic?: SimpleExpressionNode;
|
|
227
|
+
isCustomElement: boolean;
|
|
226
228
|
parent?: number;
|
|
227
229
|
anchor?: number;
|
|
228
230
|
append?: boolean;
|
|
@@ -318,6 +320,7 @@ export declare class TransformContext<T extends AllNode = AllNode> {
|
|
|
318
320
|
template: string;
|
|
319
321
|
childrenTemplate: (string | null)[];
|
|
320
322
|
dynamic: IRDynamicInfo;
|
|
323
|
+
imports: ImportItem[];
|
|
321
324
|
inVOnce: boolean;
|
|
322
325
|
inVFor: number;
|
|
323
326
|
comment: CommentNode[];
|
|
@@ -325,9 +328,11 @@ export declare class TransformContext<T extends AllNode = AllNode> {
|
|
|
325
328
|
directive: Set<string>;
|
|
326
329
|
slots: IRSlots[];
|
|
327
330
|
private globalId;
|
|
331
|
+
private nextIdMap;
|
|
328
332
|
constructor(ir: RootIRNode, node: T, options?: TransformOptions);
|
|
329
333
|
enterBlock(ir: BlockIRNode, isVFor?: boolean): () => void;
|
|
330
334
|
increaseId: () => number;
|
|
335
|
+
private initNextIdMap;
|
|
331
336
|
reference(): number;
|
|
332
337
|
pushTemplate(content: string): number;
|
|
333
338
|
registerTemplate(): number;
|
|
@@ -342,7 +347,8 @@ export type CodegenOptions = Omit<CodegenOptions$1, 'optimizeImports'>;
|
|
|
342
347
|
export declare class CodegenContext {
|
|
343
348
|
ir: RootIRNode;
|
|
344
349
|
options: Required<CodegenOptions>;
|
|
345
|
-
|
|
350
|
+
bindingNames: Set<string>;
|
|
351
|
+
helpers: Map<string, string>;
|
|
346
352
|
helper: (name: CoreHelper | VaporHelper) => string;
|
|
347
353
|
delegates: Set<string>;
|
|
348
354
|
identifiers: Record<string, (string | SimpleExpressionNode)[]>;
|
|
@@ -352,6 +358,13 @@ export declare class CodegenContext {
|
|
|
352
358
|
enterBlock(block: BlockIRNode): () => BlockIRNode;
|
|
353
359
|
scopeLevel: number;
|
|
354
360
|
enterScope(): [level: number, exit: () => number];
|
|
361
|
+
private templateVars;
|
|
362
|
+
private nextIdMap;
|
|
363
|
+
private lastIdMap;
|
|
364
|
+
private lastTIndex;
|
|
365
|
+
private initNextIdMap;
|
|
366
|
+
tName(i: number): string;
|
|
367
|
+
pName(i: number): string;
|
|
355
368
|
constructor(ir: RootIRNode, options: CodegenOptions);
|
|
356
369
|
}
|
|
357
370
|
export interface VaporCodegenResult extends BaseCodegenResult {
|