/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import type { AstCtxRenderCall, AstFunctionBinding, AstIdentifierBinding, CtxMethodAlias, ReactCreateElementAlias, RunJsAstInspection } from '../internal-types'; export declare function collectAstReactComponentCtxRenderCallsFromAst(renderCalls: AstCtxRenderCall[], ctxMethodAliases: CtxMethodAlias[], reactCreateElementAliases: ReactCreateElementAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[]): RunJsAstInspection['reactComponentCtxRenderCalls']; export declare function collectAstReactComponentUsagesFromRenderCall(renderCall: AstCtxRenderCall, reactCreateElementAliases: ReactCreateElementAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[]): { functionBinding: AstFunctionBinding; index: number; }[]; export declare function collectAstReactComponentUsagesFromNodes(nodes: any[], reactCreateElementAliases: ReactCreateElementAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[], options?: { nearestFunction?: any; }): { functionBinding: AstFunctionBinding; index: number; }[]; export declare function collectAstReactComponentUsagesOnFunctionRenderPath(functionNode: any, reactCreateElementAliases: ReactCreateElementAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[], visited?: Set): { functionBinding: AstFunctionBinding; index: number; }[]; export declare function collectAstTopLevelReachableCtxRenderCallsFromAst(ast: any, ctxMethodAliases: CtxMethodAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[]): AstCtxRenderCall[]; export declare function getAstJSXIdentifierName(node: any): string | undefined; export declare function findNearestAstFunctionAncestor(ancestors: any[]): any; export declare function collectCtxRenderCallsInFunction(functionNode: any, ctxMethodAliases: CtxMethodAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[], options: { bindingMode: 'initialized' | 'lexical' | 'source'; initializedIndex?: number; }, visited?: Set): AstCtxRenderCall[]; export declare function findCtxRenderCallInFunction(functionNode: any, ctxMethodAliases: CtxMethodAlias[], identifierBindings: AstIdentifierBinding[], functionBindings: AstFunctionBinding[], options: { bindingMode: 'initialized' | 'lexical' | 'source'; initializedIndex?: number; }): AstCtxRenderCall | undefined; export declare function resolveAstFunctionBinding(name: string, index: number, functionBindings: AstFunctionBinding[], identifierBindings: AstIdentifierBinding[], options?: { bindingMode?: 'initialized' | 'lexical' | 'source'; currentFunctionNode?: any; initializedIndex?: number; }): AstFunctionBinding; export declare function isAstFunctionBindingScopedInsideNode(entry: AstFunctionBinding, node: any): boolean; export declare function dedupeAstFunctionUsageEntries(entries: Array<{ functionBinding: AstFunctionBinding; index: number; }>): { functionBinding: AstFunctionBinding; index: number; }[];