// src/index.ts export * from "magic-string-ast"; export * from "ast-kit"; // src/ast.ts import { walkIdentifiers } from "@vue/compiler-sfc"; import { isFunctionType, isLiteralType, resolveObjectKey } from "ast-kit"; function checkInvalidScopeReference(node, method, setupBindings) { if (!node) return; walkIdentifiers(node, (id) => { if (setupBindings.includes(id.name)) throw new SyntaxError( `\`${method}()\` in `); } }; } function removeMacroImport(node, s, offset) { if (node.type === "ImportDeclaration" && node.attributes?.some( (attr) => resolveString(attr.key) === "type" && attr.value.value === "macro" )) { s.removeNode(node, { offset }); return true; } } export { DEFINE_EMIT, DEFINE_EMITS, DEFINE_MODELS, DEFINE_MODELS_DOLLAR, DEFINE_OPTIONS, DEFINE_PROP, DEFINE_PROPS, DEFINE_PROPS_DOLLAR, DEFINE_PROPS_REFS, DEFINE_PROP_DOLLAR, DEFINE_RENDER, DEFINE_SETUP_COMPONENT, DEFINE_SLOTS, DEFINE_STYLEX, FilterFileType, HELPER_PREFIX, REGEX_NODE_MODULES, REGEX_SETUP_SFC, REGEX_SETUP_SFC_SUB, REGEX_SRC_FILE, REGEX_SUPPORTED_EXT, REGEX_VUE_SFC, REGEX_VUE_SUB, REGEX_VUE_SUB_SETUP, REPO_ISSUE_URL, VIRTUAL_ID_PREFIX, WITH_DEFAULTS, addNormalScript, checkInvalidScopeReference, createFilter, createRollupFilter, detectVueVersion, getFileCodeAndLang, getFilterPattern, getTransformResult, getVuePluginApi, hackViteHMR, importHelperFn, isStaticExpression, isStaticObjectKey, normalizePath, parseSFC, removeMacroImport, resolveObjectExpression, toArray };