@vue-jsx-vapor/compiler 0.2.2 → 0.2.3

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/index.d.cts CHANGED
@@ -287,6 +287,7 @@ interface DirectiveTransformResult {
287
287
  model?: boolean;
288
288
  modelModifiers?: string[];
289
289
  }
290
+ type StructuralDirectiveTransform = (node: JSXElement, dir: JSXAttribute, context: TransformContext) => void | (() => void);
290
291
  type TransformOptions = HackOptions<TransformOptions$1>;
291
292
  declare class TransformContext<T extends BlockIRNode['node'] = BlockIRNode['node']> {
292
293
  ir: RootIRNode;
@@ -318,6 +319,7 @@ declare class TransformContext<T extends BlockIRNode['node'] = BlockIRNode['node
318
319
  }
319
320
  declare function transform(node: RootNode, options?: TransformOptions): RootIRNode;
320
321
  declare function transformNode(context: TransformContext<BlockIRNode['node']>): void;
322
+ declare function createStructuralDirectiveTransform(name: string | string[], fn: StructuralDirectiveTransform): NodeTransform;
321
323
 
322
324
  interface VaporCodegenResult extends Omit<VaporCodegenResult$1, 'ast'> {
323
325
  ast: RootIRNode;
@@ -354,4 +356,6 @@ declare const transformVShow: DirectiveTransform;
354
356
 
355
357
  declare const transformVHtml: DirectiveTransform;
356
358
 
357
- export { type BaseIRNode, type BlockIRNode, type CompilerOptions, type CreateComponentIRNode, type CreateTextNodeIRNode, type DeclareOldRefIRNode, type DirectiveIRNode, type DirectiveTransform, type DirectiveTransformResult, DynamicFlag, type ForIRNode, type GetTextChildIRNode, type HackOptions, type IRDynamicInfo, IRDynamicPropsKind, type IREffect, type IRFor, type IRNode, IRNodeTypes, type IRProp, type IRProps, type IRPropsDynamicAttribute, type IRPropsDynamicExpression, type IRPropsStatic, type IRSlotDynamic, type IRSlotDynamicBasic, type IRSlotDynamicConditional, type IRSlotDynamicLoop, IRSlotType, type IRSlots, type IRSlotsExpression, type IRSlotsStatic, type IfIRNode, type InsertNodeIRNode, type KeyOverride, type NodeTransform, type OperationNode, type PrependNodeIRNode, type RootIRNode, type RootNode, type SetDynamicEventsIRNode, type SetDynamicPropsIRNode, type SetEventIRNode, type SetHtmlIRNode, type SetPropIRNode, type SetTemplateRefIRNode, type SetTextIRNode, type SlotBlockIRNode, type SlotOutletIRNode, TransformContext, type TransformOptions, type TransformPreset, type VaporDirectiveNode, compile, resolveDirectiveNode, resolveNode, transform, transformChildren, transformElement, transformNode, transformTemplateRef, transformText, transformVBind, transformVHtml, transformVModel, transformVOn, transformVShow, transformVSlot };
359
+ declare const transformVFor: NodeTransform;
360
+
361
+ export { type BaseIRNode, type BlockIRNode, type CompilerOptions, type CreateComponentIRNode, type CreateTextNodeIRNode, type DeclareOldRefIRNode, type DirectiveIRNode, type DirectiveTransform, type DirectiveTransformResult, DynamicFlag, type ForIRNode, type GetTextChildIRNode, type HackOptions, type IRDynamicInfo, IRDynamicPropsKind, type IREffect, type IRFor, type IRNode, IRNodeTypes, type IRProp, type IRProps, type IRPropsDynamicAttribute, type IRPropsDynamicExpression, type IRPropsStatic, type IRSlotDynamic, type IRSlotDynamicBasic, type IRSlotDynamicConditional, type IRSlotDynamicLoop, IRSlotType, type IRSlots, type IRSlotsExpression, type IRSlotsStatic, type IfIRNode, type InsertNodeIRNode, type KeyOverride, type NodeTransform, type OperationNode, type PrependNodeIRNode, type RootIRNode, type RootNode, type SetDynamicEventsIRNode, type SetDynamicPropsIRNode, type SetEventIRNode, type SetHtmlIRNode, type SetPropIRNode, type SetTemplateRefIRNode, type SetTextIRNode, type SlotBlockIRNode, type SlotOutletIRNode, type StructuralDirectiveTransform, TransformContext, type TransformOptions, type TransformPreset, type VaporDirectiveNode, compile, createStructuralDirectiveTransform, resolveDirectiveNode, resolveNode, transform, transformChildren, transformElement, transformNode, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVModel, transformVOn, transformVShow, transformVSlot };
package/dist/index.d.ts CHANGED
@@ -287,6 +287,7 @@ interface DirectiveTransformResult {
287
287
  model?: boolean;
288
288
  modelModifiers?: string[];
289
289
  }
290
+ type StructuralDirectiveTransform = (node: JSXElement, dir: JSXAttribute, context: TransformContext) => void | (() => void);
290
291
  type TransformOptions = HackOptions<TransformOptions$1>;
291
292
  declare class TransformContext<T extends BlockIRNode['node'] = BlockIRNode['node']> {
292
293
  ir: RootIRNode;
@@ -318,6 +319,7 @@ declare class TransformContext<T extends BlockIRNode['node'] = BlockIRNode['node
318
319
  }
319
320
  declare function transform(node: RootNode, options?: TransformOptions): RootIRNode;
320
321
  declare function transformNode(context: TransformContext<BlockIRNode['node']>): void;
322
+ declare function createStructuralDirectiveTransform(name: string | string[], fn: StructuralDirectiveTransform): NodeTransform;
321
323
 
322
324
  interface VaporCodegenResult extends Omit<VaporCodegenResult$1, 'ast'> {
323
325
  ast: RootIRNode;
@@ -354,4 +356,6 @@ declare const transformVShow: DirectiveTransform;
354
356
 
355
357
  declare const transformVHtml: DirectiveTransform;
356
358
 
357
- export { type BaseIRNode, type BlockIRNode, type CompilerOptions, type CreateComponentIRNode, type CreateTextNodeIRNode, type DeclareOldRefIRNode, type DirectiveIRNode, type DirectiveTransform, type DirectiveTransformResult, DynamicFlag, type ForIRNode, type GetTextChildIRNode, type HackOptions, type IRDynamicInfo, IRDynamicPropsKind, type IREffect, type IRFor, type IRNode, IRNodeTypes, type IRProp, type IRProps, type IRPropsDynamicAttribute, type IRPropsDynamicExpression, type IRPropsStatic, type IRSlotDynamic, type IRSlotDynamicBasic, type IRSlotDynamicConditional, type IRSlotDynamicLoop, IRSlotType, type IRSlots, type IRSlotsExpression, type IRSlotsStatic, type IfIRNode, type InsertNodeIRNode, type KeyOverride, type NodeTransform, type OperationNode, type PrependNodeIRNode, type RootIRNode, type RootNode, type SetDynamicEventsIRNode, type SetDynamicPropsIRNode, type SetEventIRNode, type SetHtmlIRNode, type SetPropIRNode, type SetTemplateRefIRNode, type SetTextIRNode, type SlotBlockIRNode, type SlotOutletIRNode, TransformContext, type TransformOptions, type TransformPreset, type VaporDirectiveNode, compile, resolveDirectiveNode, resolveNode, transform, transformChildren, transformElement, transformNode, transformTemplateRef, transformText, transformVBind, transformVHtml, transformVModel, transformVOn, transformVShow, transformVSlot };
359
+ declare const transformVFor: NodeTransform;
360
+
361
+ export { type BaseIRNode, type BlockIRNode, type CompilerOptions, type CreateComponentIRNode, type CreateTextNodeIRNode, type DeclareOldRefIRNode, type DirectiveIRNode, type DirectiveTransform, type DirectiveTransformResult, DynamicFlag, type ForIRNode, type GetTextChildIRNode, type HackOptions, type IRDynamicInfo, IRDynamicPropsKind, type IREffect, type IRFor, type IRNode, IRNodeTypes, type IRProp, type IRProps, type IRPropsDynamicAttribute, type IRPropsDynamicExpression, type IRPropsStatic, type IRSlotDynamic, type IRSlotDynamicBasic, type IRSlotDynamicConditional, type IRSlotDynamicLoop, IRSlotType, type IRSlots, type IRSlotsExpression, type IRSlotsStatic, type IfIRNode, type InsertNodeIRNode, type KeyOverride, type NodeTransform, type OperationNode, type PrependNodeIRNode, type RootIRNode, type RootNode, type SetDynamicEventsIRNode, type SetDynamicPropsIRNode, type SetEventIRNode, type SetHtmlIRNode, type SetPropIRNode, type SetTemplateRefIRNode, type SetTextIRNode, type SlotBlockIRNode, type SlotOutletIRNode, type StructuralDirectiveTransform, TransformContext, type TransformOptions, type TransformPreset, type VaporDirectiveNode, compile, createStructuralDirectiveTransform, resolveDirectiveNode, resolveNode, transform, transformChildren, transformElement, transformNode, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVModel, transformVOn, transformVShow, transformVSlot };