@vue/compiler-vapor 3.6.0-alpha.3 → 3.6.0-alpha.4
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 +257 -140
- package/dist/compiler-vapor.d.ts +18 -3
- package/dist/compiler-vapor.esm-browser.js +283 -11357
- 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,7 +100,8 @@ export interface RootIRNode {
|
|
|
99
100
|
type: IRNodeTypes.ROOT;
|
|
100
101
|
node: RootNode;
|
|
101
102
|
source: string;
|
|
102
|
-
template: string
|
|
103
|
+
template: Map<string, Namespace>;
|
|
104
|
+
templateIndexMap: Map<string, number>;
|
|
103
105
|
rootTemplateIndex?: number;
|
|
104
106
|
component: Set<string>;
|
|
105
107
|
directive: Set<string>;
|
|
@@ -149,6 +151,7 @@ export interface SetDynamicPropsIRNode extends BaseIRNode {
|
|
|
149
151
|
element: number;
|
|
150
152
|
props: IRProps[];
|
|
151
153
|
root: boolean;
|
|
154
|
+
tag: string;
|
|
152
155
|
}
|
|
153
156
|
export interface SetDynamicEventsIRNode extends BaseIRNode {
|
|
154
157
|
type: IRNodeTypes.SET_DYNAMIC_EVENTS;
|
|
@@ -223,6 +226,7 @@ export interface CreateComponentIRNode extends BaseIRNode {
|
|
|
223
226
|
root: boolean;
|
|
224
227
|
once: boolean;
|
|
225
228
|
dynamic?: SimpleExpressionNode;
|
|
229
|
+
isCustomElement: boolean;
|
|
226
230
|
parent?: number;
|
|
227
231
|
anchor?: number;
|
|
228
232
|
append?: boolean;
|
|
@@ -318,6 +322,7 @@ export declare class TransformContext<T extends AllNode = AllNode> {
|
|
|
318
322
|
template: string;
|
|
319
323
|
childrenTemplate: (string | null)[];
|
|
320
324
|
dynamic: IRDynamicInfo;
|
|
325
|
+
imports: ImportItem[];
|
|
321
326
|
inVOnce: boolean;
|
|
322
327
|
inVFor: number;
|
|
323
328
|
comment: CommentNode[];
|
|
@@ -325,9 +330,11 @@ export declare class TransformContext<T extends AllNode = AllNode> {
|
|
|
325
330
|
directive: Set<string>;
|
|
326
331
|
slots: IRSlots[];
|
|
327
332
|
private globalId;
|
|
333
|
+
private nextIdMap;
|
|
328
334
|
constructor(ir: RootIRNode, node: T, options?: TransformOptions);
|
|
329
335
|
enterBlock(ir: BlockIRNode, isVFor?: boolean): () => void;
|
|
330
336
|
increaseId: () => number;
|
|
337
|
+
private initNextIdMap;
|
|
331
338
|
reference(): number;
|
|
332
339
|
pushTemplate(content: string): number;
|
|
333
340
|
registerTemplate(): number;
|
|
@@ -342,7 +349,8 @@ export type CodegenOptions = Omit<CodegenOptions$1, 'optimizeImports'>;
|
|
|
342
349
|
export declare class CodegenContext {
|
|
343
350
|
ir: RootIRNode;
|
|
344
351
|
options: Required<CodegenOptions>;
|
|
345
|
-
|
|
352
|
+
bindingNames: Set<string>;
|
|
353
|
+
helpers: Map<string, string>;
|
|
346
354
|
helper: (name: CoreHelper | VaporHelper) => string;
|
|
347
355
|
delegates: Set<string>;
|
|
348
356
|
identifiers: Record<string, (string | SimpleExpressionNode)[]>;
|
|
@@ -352,6 +360,13 @@ export declare class CodegenContext {
|
|
|
352
360
|
enterBlock(block: BlockIRNode): () => BlockIRNode;
|
|
353
361
|
scopeLevel: number;
|
|
354
362
|
enterScope(): [level: number, exit: () => number];
|
|
363
|
+
private templateVars;
|
|
364
|
+
private nextIdMap;
|
|
365
|
+
private lastIdMap;
|
|
366
|
+
private lastTIndex;
|
|
367
|
+
private initNextIdMap;
|
|
368
|
+
tName(i: number): string;
|
|
369
|
+
pName(i: number): string;
|
|
355
370
|
constructor(ir: RootIRNode, options: CodegenOptions);
|
|
356
371
|
}
|
|
357
372
|
export interface VaporCodegenResult extends BaseCodegenResult {
|