@litsx/babel-preset-litsx 0.8.2 → 0.9.1
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.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/internal/transform-litsx-components.cjs +71 -37
- package/dist/internal/transform-litsx-components.cjs.map +1 -1
- package/dist/internal/transform-litsx-hooks.cjs +870 -9
- package/dist/internal/transform-litsx-hooks.cjs.map +1 -1
- package/dist/internal/transform-litsx-renderer-props.cjs +2 -1
- package/dist/internal/transform-litsx-renderer-props.cjs.map +1 -1
- package/dist/internal/transform-litsx-static-ir.cjs +189 -0
- package/dist/internal/transform-litsx-static-ir.cjs.map +1 -0
- package/dist/pipeline.cjs +77 -8
- package/dist/pipeline.cjs.map +1 -1
- package/dist/shared/{transform-litsx-element-candidates-D0uvqG4Y.cjs → transform-litsx-element-candidates-D8pSZxpL.cjs} +21 -13
- package/dist/shared/transform-litsx-element-candidates-D8pSZxpL.cjs.map +1 -0
- package/package.json +8 -3
- package/src/internal/transform-litsx-class-generation.js +0 -1
- package/src/internal/transform-litsx-components.js +18 -20
- package/src/internal/transform-litsx-element-candidates.js +21 -10
- package/src/internal/transform-litsx-hooks.js +868 -9
- package/src/internal/transform-litsx-static-hoists.js +57 -15
- package/src/internal/transform-litsx-static-ir.js +176 -0
- package/src/pipeline.js +71 -3
- package/dist/shared/transform-litsx-element-candidates-D0uvqG4Y.cjs.map +0 -1
package/dist/pipeline.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.cjs","sources":["../src/pipeline.js"],"sourcesContent":["import transformJsxHtmlTemplate from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport transformLitsxScopedElements from \"@litsx/babel-plugin-transform-litsx-scoped-elements\";\nimport transformLitsxDomRefs from \"./internal/transform-litsx-dom-refs.js\";\nimport transformLitsxHooks from \"./internal/transform-litsx-hooks.js\";\nimport transformLitsxComponents from \"./internal/transform-litsx-components.js\";\nimport transformLitsxRendererProps from \"./internal/transform-litsx-renderer-props.js\";\n\nconst NATIVE_TRANSFORM_OPTION_KEYS = [\n \"defaultDomMode\",\n \"typeResolutionMode\",\n \"inMemoryFiles\",\n \"typescriptSession\",\n \"suppressNativeClassNameWarning\",\n \"__litsxCompilationSession\",\n];\n\nconst HOOK_FEATURE_PATTERN = /\\b(?:useOnConnect|useAfterUpdate|useOnCommit|useMemoValue|useStableCallback|useEvent|useEmit|usePrevious|useReducedState|useState|useControlledState|useAsyncState|useOptimistic|useExpose|useExternalStore|useHost|useHostContent|useSlot|useTextContent|useTransition|useDeferredValue|useStyle|useRef|useCallbackRef|useStableId)\\b/;\nconst REF_FEATURE_PATTERN = /\\buseRef\\b|\\bref\\s*=/;\nconst SCOPED_ELEMENTS_PATTERN = /<\\s*(?:[A-Z][\\w.]*(?=[\\s/>])|[a-z][\\w]*-[\\w-]*(?=[\\s/>]))/;\nconst LIGHT_DOM_PATTERN = /\\^lightDom\\b|static\\s+lightDom\\s*=\\s*true\\b/;\n\nexport function normalizeTransformLitsxOptions(options = {}) {\n const transformLitsxOptions = {\n ...(options.transformLitsx || {}),\n };\n\n for (const key of NATIVE_TRANSFORM_OPTION_KEYS) {\n if (Object.prototype.hasOwnProperty.call(options, key)) {\n transformLitsxOptions[key] = options[key];\n }\n }\n\n return transformLitsxOptions;\n}\n\nexport function detectLitsxSourceFeatures(source, options = {}) {\n const text = typeof source === \"string\" ? source : \"\";\n const transformOptions = normalizeTransformLitsxOptions(options);\n\n return {\n hooks: HOOK_FEATURE_PATTERN.test(text),\n domRefs: REF_FEATURE_PATTERN.test(text),\n scopedElements:\n transformOptions.defaultDomMode === \"light\" ||\n LIGHT_DOM_PATTERN.test(text) ||\n SCOPED_ELEMENTS_PATTERN.test(text),\n };\n}\n\nfunction shouldIncludeFeaturePlugin(sourceFeatures, key) {\n if (!sourceFeatures) {\n return true;\n }\n\n return sourceFeatures[key] === true;\n}\n\nexport function createLitsxPresetPlugins(options = {}, sourceFeatures = null) {\n const plugins = [\n [transformLitsxRendererProps, options.transformLitsxRendererProps || {}],\n [transformLitsxComponents, normalizeTransformLitsxOptions(options)],\n ];\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"hooks\")) {\n plugins.push([transformLitsxHooks, options.transformLitsxHooks || {}]);\n }\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"domRefs\")) {\n plugins.push([transformLitsxDomRefs, options.transformLitsxDomRefs || {}]);\n }\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"scopedElements\")) {\n plugins.push([transformLitsxScopedElements, options.transformLitsxScopedElements || {}]);\n }\n\n if (options.jsxTemplate !== false) {\n if (options.jsxTemplateOptions && Object.keys(options.jsxTemplateOptions).length > 0) {\n plugins.push([transformJsxHtmlTemplate, options.jsxTemplateOptions]);\n } else {\n plugins.push(transformJsxHtmlTemplate);\n }\n }\n\n return plugins;\n}\n\nexport {\n default as transformLitsxComponents,\n createTransformFunctionToClassPlugin as createTransformLitsxComponentsPlugin,\n} from \"./internal/transform-litsx-components.js\";\nexport {\n setTypescriptModule,\n} from \"./internal/transform-litsx-properties.js\";\n"],"names":["transformLitsxRendererProps","transformLitsxComponents","transformLitsxHooks","transformLitsxDomRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,4BAA4B,GAAG;AACrC,EAAE,gBAAgB;AAClB,EAAE,oBAAoB;AACtB,EAAE,eAAe;AACjB,EAAE,mBAAmB;AACrB,EAAE,gCAAgC;AAClC,EAAE,2BAA2B;AAC7B,CAAC;;AAED,MAAM,oBAAoB,GAAG,wUAAwU;AACrW,MAAM,mBAAmB,GAAG,sBAAsB;AAClD,MAAM,uBAAuB,GAAG,2DAA2D;AAC3F,MAAM,iBAAiB,GAAG,6CAA6C;;AAEhE,SAAS,8BAA8B,CAAC,OAAO,GAAG,EAAE,EAAE;AAC7D,EAAE,MAAM,qBAAqB,GAAG;AAChC,IAAI,IAAI,OAAO,CA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wB,EAAE,8BAA8B,CAAC,OAAO,CAAC,CAAC;AACvE,GAAG;;AAEH,EAAE,IAAI,0BAA0B,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE;AAC3D,IAAI,OAAO,CAAC,IAAI,CAAC,CAACC,oCAAmB,EAAE,OAAO,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;AAC1E,EAAE;;AAEF,EAAE,IAAI,0BAA0B,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE;AAC7D,IAAI,OAAO,CAAC,IAAI,CAAC,CAACC,sCAAqB,EAAE,OAAO,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AAC9E,EAAE;;AAEF,EAAE,IAAI,0BAA0B,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE;AACpE,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,4BAA4B,EAAE,OAAO,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;AAC5F,EAAE;;AAEF,EAAE,IAAI,OAAO,CAAC,WAAW,KAAK,KAAK,EAAE;AACrC,IAAI,IAAI,OAAO,CAAC,kBAAkB,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1F,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,wBAAwB,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC1E,IAAI,CAAC,MAAM;AACX,MAAM,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC;AAC5C,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,OAAO;AAChB;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pipeline.cjs","sources":["../src/pipeline.js"],"sourcesContent":["import transformJsxHtmlTemplate from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport transformLitsxScopedElements from \"@litsx/babel-plugin-transform-litsx-scoped-elements\";\nimport transformLitsxDomRefs from \"./internal/transform-litsx-dom-refs.js\";\nimport transformLitsxHooks from \"./internal/transform-litsx-hooks.js\";\nimport transformLitsxComponents from \"./internal/transform-litsx-components.js\";\nimport transformLitsxRendererProps from \"./internal/transform-litsx-renderer-props.js\";\n\nconst NATIVE_TRANSFORM_OPTION_KEYS = [\n \"defaultDomMode\",\n \"typeResolutionMode\",\n \"inMemoryFiles\",\n \"compilerOptions\",\n \"typescriptSession\",\n \"suppressNativeClassNameWarning\",\n \"__litsxCompilationSession\",\n];\n\nconst HOOK_FEATURE_PATTERN = /\\b(?:defineHook|useOnConnect|useAfterUpdate|useOnCommit|useMemoValue|useStableCallback|useEvent|useEmit|usePrevious|useReducedState|useState|useControlledState|useAsyncState|useOptimistic|useExpose|useExternalStore|useHost|useHostContent|useSlot|useTextContent|useTransition|useDeferredValue|useStyle|useRef|useCallbackRef|useStableId)\\b/;\nconst DEFAULT_OR_NAMED_IMPORT_PATTERN = /\\bimport\\s+(?!type\\b)([^'\";]+?)\\s+from\\b/g;\nconst NAMESPACE_IMPORT_PATTERN = /\\bimport\\s+(?!type\\b)\\*\\s+as\\s+([A-Za-z_$][\\w$]*)\\s+from\\b/g;\nconst REF_FEATURE_PATTERN = /\\buseRef\\b|\\bref\\s*=/;\nconst SCOPED_ELEMENTS_PATTERN = /<\\s*(?:[A-Z][\\w.]*(?=[\\s/>])|[a-z][\\w]*-[\\w-]*(?=[\\s/>]))/;\nconst LIGHT_DOM_PATTERN = /\\^lightDom\\b|static\\s+lightDom\\s*=\\s*true\\b/;\n\nfunction escapeRegExp(value) {\n return String(value).replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\");\n}\n\nfunction hasCallToLocal(text, localName) {\n return new RegExp(`\\\\b${escapeRegExp(localName)}\\\\s*\\\\(`).test(text);\n}\n\nfunction getImportedLocalNames(importClause) {\n const locals = [];\n const namedMatch = importClause.match(/\\{([^}]*)\\}/);\n const beforeNamed = importClause.split(\"{\", 1)[0].replace(/,$/, \"\").trim();\n\n if (beforeNamed && !beforeNamed.includes(\"*\")) {\n locals.push(beforeNamed);\n }\n\n if (namedMatch) {\n for (const rawSpecifier of namedMatch[1].split(\",\")) {\n const specifier = rawSpecifier.trim();\n if (!specifier || specifier.startsWith(\"type \")) continue;\n const parts = specifier.split(/\\s+as\\s+/);\n const localName = (parts[1] || parts[0]).trim();\n if (localName) {\n locals.push(localName);\n }\n }\n }\n\n return locals.filter((name) => /^use[A-Z0-9][A-Za-z0-9_$]*$/.test(name));\n}\n\nfunction hasImportedCustomHookCall(text) {\n DEFAULT_OR_NAMED_IMPORT_PATTERN.lastIndex = 0;\n let match;\n while ((match = DEFAULT_OR_NAMED_IMPORT_PATTERN.exec(text))) {\n for (const localName of getImportedLocalNames(match[1])) {\n if (hasCallToLocal(text, localName)) {\n return true;\n }\n }\n }\n\n NAMESPACE_IMPORT_PATTERN.lastIndex = 0;\n while ((match = NAMESPACE_IMPORT_PATTERN.exec(text))) {\n const namespaceName = match[1];\n if (\n new RegExp(`\\\\b${escapeRegExp(namespaceName)}\\\\s*\\\\.\\\\s*use[A-Z0-9][A-Za-z0-9_$]*\\\\s*\\\\(`)\n .test(text)\n ) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function normalizeTransformLitsxOptions(options = {}) {\n const transformLitsxOptions = {\n ...(options.transformLitsx || {}),\n };\n\n for (const key of NATIVE_TRANSFORM_OPTION_KEYS) {\n if (Object.prototype.hasOwnProperty.call(options, key)) {\n transformLitsxOptions[key] = options[key];\n }\n }\n\n return transformLitsxOptions;\n}\n\nexport function detectLitsxSourceFeatures(source, options = {}) {\n const text = typeof source === \"string\" ? source : \"\";\n const transformOptions = normalizeTransformLitsxOptions(options);\n\n return {\n hooks:\n HOOK_FEATURE_PATTERN.test(text) ||\n hasImportedCustomHookCall(text),\n domRefs: REF_FEATURE_PATTERN.test(text),\n scopedElements:\n transformOptions.defaultDomMode === \"light\" ||\n LIGHT_DOM_PATTERN.test(text) ||\n SCOPED_ELEMENTS_PATTERN.test(text),\n };\n}\n\nfunction shouldIncludeFeaturePlugin(sourceFeatures, key) {\n if (!sourceFeatures) {\n return true;\n }\n\n return sourceFeatures[key] === true;\n}\n\nexport function createLitsxPresetPlugins(options = {}, sourceFeatures = null) {\n const plugins = [\n [transformLitsxRendererProps, options.transformLitsxRendererProps || {}],\n [transformLitsxComponents, normalizeTransformLitsxOptions(options)],\n ];\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"hooks\")) {\n plugins.push([\n transformLitsxHooks,\n {\n ...normalizeTransformLitsxOptions(options),\n ...(options.transformLitsxHooks || {}),\n },\n ]);\n }\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"domRefs\")) {\n plugins.push([transformLitsxDomRefs, options.transformLitsxDomRefs || {}]);\n }\n\n if (shouldIncludeFeaturePlugin(sourceFeatures, \"scopedElements\")) {\n plugins.push([transformLitsxScopedElements, options.transformLitsxScopedElements || {}]);\n }\n\n if (options.jsxTemplate !== false) {\n if (options.jsxTemplateOptions && Object.keys(options.jsxTemplateOptions).length > 0) {\n plugins.push([transformJsxHtmlTemplate, options.jsxTemplateOptions]);\n } else {\n plugins.push(transformJsxHtmlTemplate);\n }\n }\n\n return plugins;\n}\n\nexport {\n default as transformLitsxComponents,\n createTransformFunctionToClassPlugin as createTransformLitsxComponentsPlugin,\n} from \"./internal/transform-litsx-components.js\";\nexport {\n setTypescriptModule,\n} from \"./internal/transform-litsx-properties.js\";\n"],"names":["transformLitsxRendererProps","transformLitsxComponents","transformLitsxHooks","transformLitsxDomRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,4BAA4B,GAAG;AACrC,EAAE,gBAAgB;AAClB,EAAE,oBAAoB;AACtB,EAAE,eAAe;AACjB,EAAE,iBAAiB;AACnB,EAAE,mBAAmB;AACrB,EAAE,gCAAgC;AAClC,EAAE,2BAA2B;AAC7B,CAAC;;AAED,MAAM,oBAAoB,GAAG,mVAAmV;AAChX,MAAM,+BAA+B,GAAG,2CAA2C;AACnF,MAAM,wBAAwB,GAAG,6DAA6D;AAC9F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|
-
var
|
|
4
|
+
var traverse$1 = require('@babel/traverse');
|
|
5
5
|
var jsxSyntaxPlugin = require('@babel/plugin-syntax-jsx');
|
|
6
6
|
var parser = require('@litsx/babel-parser');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var typescriptSession = require('@litsx/typescript-session');
|
|
10
10
|
var internal_transformLitsxProperties = require('../internal/transform-litsx-properties.cjs');
|
|
11
|
+
var internal_transformLitsxStaticIr = require('../internal/transform-litsx-static-ir.cjs');
|
|
11
12
|
|
|
12
13
|
const { declare } = helperPluginUtils;
|
|
13
|
-
const traverse =
|
|
14
|
+
const traverse = traverse$1.default || traverse$1;
|
|
14
15
|
const IMPORT_RESOLUTION_EXTENSIONS = [
|
|
15
16
|
".litsx",
|
|
16
17
|
".litsx.jsx",
|
|
@@ -34,6 +35,7 @@ let t;
|
|
|
34
35
|
|
|
35
36
|
function setElementCandidatesBabelTypes(nextTypes) {
|
|
36
37
|
t = nextTypes;
|
|
38
|
+
internal_transformLitsxStaticIr.setStaticIrBabelTypes(nextTypes);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
function isInsideFunctionOrClass(path) {
|
|
@@ -61,6 +63,13 @@ function createEmptyCandidateResult() {
|
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
function annotateElementCandidates(node, result) {
|
|
67
|
+
if (!node) return;
|
|
68
|
+
const staticIr = internal_transformLitsxStaticIr.ensureStaticIr(node);
|
|
69
|
+
staticIr.elements.localCandidates = [...result.localCandidates];
|
|
70
|
+
staticIr.elements.importedCandidates = [...result.importedCandidates.values()];
|
|
71
|
+
}
|
|
72
|
+
|
|
64
73
|
function cloneCandidateResult(result) {
|
|
65
74
|
return {
|
|
66
75
|
localCandidates: new Set(result?.localCandidates || []),
|
|
@@ -979,16 +988,18 @@ function collectCandidateResult(functionPath, programPath, options = {}) {
|
|
|
979
988
|
}
|
|
980
989
|
|
|
981
990
|
function getAnnotatedElementCandidates(path, programPath, options = {}) {
|
|
982
|
-
|
|
983
|
-
|
|
991
|
+
const localCandidates = path?.node?._litsxStaticIr?.elements?.localCandidates;
|
|
992
|
+
if (Array.isArray(localCandidates)) {
|
|
993
|
+
return new Set(localCandidates);
|
|
984
994
|
}
|
|
985
995
|
|
|
986
996
|
return collectCandidateResult(path, programPath, options).localCandidates;
|
|
987
997
|
}
|
|
988
998
|
|
|
989
999
|
function getAnnotatedImportedElementCandidates(path, programPath, options = {}) {
|
|
990
|
-
|
|
991
|
-
|
|
1000
|
+
const importedCandidates = path?.node?._litsxStaticIr?.elements?.importedCandidates;
|
|
1001
|
+
if (Array.isArray(importedCandidates)) {
|
|
1002
|
+
return [...importedCandidates];
|
|
992
1003
|
}
|
|
993
1004
|
|
|
994
1005
|
return [...collectCandidateResult(path, programPath, options).importedCandidates.values()];
|
|
@@ -1201,8 +1212,7 @@ declare((api) => {
|
|
|
1201
1212
|
filename: state.file?.opts?.filename || "",
|
|
1202
1213
|
}
|
|
1203
1214
|
);
|
|
1204
|
-
path.node
|
|
1205
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1215
|
+
annotateElementCandidates(path.node, result);
|
|
1206
1216
|
},
|
|
1207
1217
|
},
|
|
1208
1218
|
ArrowFunctionExpression: {
|
|
@@ -1220,8 +1230,7 @@ declare((api) => {
|
|
|
1220
1230
|
filename: state.file?.opts?.filename || "",
|
|
1221
1231
|
}
|
|
1222
1232
|
);
|
|
1223
|
-
path.node
|
|
1224
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1233
|
+
annotateElementCandidates(path.node, result);
|
|
1225
1234
|
},
|
|
1226
1235
|
},
|
|
1227
1236
|
FunctionExpression: {
|
|
@@ -1239,8 +1248,7 @@ declare((api) => {
|
|
|
1239
1248
|
filename: state.file?.opts?.filename || "",
|
|
1240
1249
|
}
|
|
1241
1250
|
);
|
|
1242
|
-
path.node
|
|
1243
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1251
|
+
annotateElementCandidates(path.node, result);
|
|
1244
1252
|
},
|
|
1245
1253
|
},
|
|
1246
1254
|
},
|
|
@@ -1251,4 +1259,4 @@ exports.getAnnotatedElementCandidates = getAnnotatedElementCandidates;
|
|
|
1251
1259
|
exports.getAnnotatedImportedElementCandidates = getAnnotatedImportedElementCandidates;
|
|
1252
1260
|
exports.importedBindingNeedsRendererContext = importedBindingNeedsRendererContext;
|
|
1253
1261
|
exports.setElementCandidatesBabelTypes = setElementCandidatesBabelTypes;
|
|
1254
|
-
//# sourceMappingURL=transform-litsx-element-candidates-
|
|
1262
|
+
//# sourceMappingURL=transform-litsx-element-candidates-D8pSZxpL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-litsx-element-candidates-D8pSZxpL.cjs","sources":["../../src/internal/transform-litsx-element-candidates.js"],"sourcesContent":["import helperPluginUtils from \"@babel/helper-plugin-utils\";\nimport babelTraverse from \"@babel/traverse\";\nimport jsxSyntaxPlugin from \"@babel/plugin-syntax-jsx\";\nimport parser from \"@litsx/babel-parser\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { normalizeFilePath } from \"@litsx/typescript-session\";\nimport { ensureTypescriptModule } from \"./transform-litsx-properties.js\";\nimport {\n ensureStaticIr,\n setStaticIrBabelTypes,\n} from \"./transform-litsx-static-ir.js\";\n\nconst { declare } = helperPluginUtils;\nconst traverse = babelTraverse.default || babelTraverse;\nconst IMPORT_RESOLUTION_EXTENSIONS = [\n \".litsx\",\n \".litsx.jsx\",\n \".jsx\",\n \".js\",\n \".tsx\",\n \".ts\",\n];\nconst DEFAULT_MODULE_RESOLUTION_OPTIONS = {\n moduleResolution: 100,\n allowJs: true,\n checkJs: false,\n jsx: 1,\n target: 99,\n module: 99,\n esModuleInterop: true,\n allowSyntheticDefaultImports: true,\n};\n\nlet t;\n\nexport function setElementCandidatesBabelTypes(nextTypes) {\n t = nextTypes;\n setStaticIrBabelTypes(nextTypes);\n}\n\nfunction isInsideFunctionOrClass(path) {\n return path.findParent(\n (p) =>\n p.isFunctionDeclaration() ||\n p.isFunctionExpression() ||\n p.isArrowFunctionExpression() ||\n p.isClassDeclaration()\n );\n}\n\nfunction isRelativeSpecifier(value) {\n return typeof value === \"string\" && (\n value.startsWith(\"./\") ||\n value.startsWith(\"../\") ||\n value.startsWith(\"/\")\n );\n}\n\nfunction createEmptyCandidateResult() {\n return {\n localCandidates: new Set(),\n importedCandidates: new Map(),\n };\n}\n\nfunction annotateElementCandidates(node, result) {\n if (!node) return;\n const staticIr = ensureStaticIr(node);\n staticIr.elements.localCandidates = [...result.localCandidates];\n staticIr.elements.importedCandidates = [...result.importedCandidates.values()];\n}\n\nfunction cloneCandidateResult(result) {\n return {\n localCandidates: new Set(result?.localCandidates || []),\n importedCandidates: new Map(result?.importedCandidates || []),\n };\n}\n\nfunction mergeCandidateResults(target, source) {\n source.localCandidates.forEach((candidate) => target.localCandidates.add(candidate));\n source.importedCandidates.forEach((candidate, key) => {\n if (!target.importedCandidates.has(key)) {\n target.importedCandidates.set(key, candidate);\n }\n });\n}\n\nfunction toImportRecordKey(record) {\n return `${record.sourceFile}:${record.importedName}:${record.tagName}`;\n}\n\nfunction toRelativeModuleSpecifier(fromFilename, targetFilename) {\n const fromDir = path.dirname(fromFilename);\n let relativePath = normalizeFilePath(path.relative(fromDir, targetFilename));\n\n if (!relativePath.startsWith(\".\") && !relativePath.startsWith(\"/\")) {\n relativePath = `./${relativePath}`;\n }\n\n return relativePath;\n}\n\nfunction hasSupportedExtension(filePath) {\n return IMPORT_RESOLUTION_EXTENSIONS.some((extension) => filePath.endsWith(extension));\n}\n\nfunction resolveImportSource(fromFilename, sourceValue, context) {\n const cacheKey = `${normalizeFilePath(fromFilename)}::${sourceValue}`;\n if (context.resolvedImportCache.has(cacheKey)) {\n return context.resolvedImportCache.get(cacheKey);\n }\n\n const existingFile = (candidatePath) => {\n try {\n return fs.existsSync(candidatePath) && fs.statSync(candidatePath).isFile();\n } catch {\n return false;\n }\n };\n\n const resolveWithExtensions = (basePath) => {\n const normalizedBasePath = normalizeFilePath(basePath);\n const candidates = [];\n\n if (hasSupportedExtension(normalizedBasePath)) {\n candidates.push(normalizedBasePath);\n } else {\n IMPORT_RESOLUTION_EXTENSIONS.forEach((extension) => {\n candidates.push(`${normalizedBasePath}${extension}`);\n });\n IMPORT_RESOLUTION_EXTENSIONS.forEach((extension) => {\n candidates.push(normalizeFilePath(path.join(normalizedBasePath, `index${extension}`)));\n });\n }\n\n return candidates.find(existingFile) || null;\n };\n\n const resolvePathAlias = () => {\n const compilerOptions = context.getCompilerOptions?.(fromFilename) || {};\n const baseUrl = compilerOptions.baseUrl\n ? normalizeFilePath(\n path.isAbsolute(compilerOptions.baseUrl)\n ? compilerOptions.baseUrl\n : path.resolve(path.dirname(fromFilename), compilerOptions.baseUrl)\n )\n : normalizeFilePath(path.dirname(fromFilename));\n const pathMappings = compilerOptions.paths || {};\n\n for (const [pattern, substitutions] of Object.entries(pathMappings)) {\n const starIndex = pattern.indexOf(\"*\");\n const isStarPattern = starIndex !== -1;\n const prefix = isStarPattern ? pattern.slice(0, starIndex) : pattern;\n const suffix = isStarPattern ? pattern.slice(starIndex + 1) : \"\";\n\n if (isStarPattern) {\n if (!sourceValue.startsWith(prefix) || !sourceValue.endsWith(suffix)) {\n continue;\n }\n } else if (sourceValue !== pattern) {\n continue;\n }\n\n const wildcardValue = isStarPattern\n ? sourceValue.slice(prefix.length, sourceValue.length - suffix.length)\n : \"\";\n\n for (const substitution of substitutions || []) {\n const substituted = isStarPattern\n ? substitution.replace(\"*\", wildcardValue)\n : substitution;\n const candidateBase = path.isAbsolute(substituted)\n ? substituted\n : path.join(baseUrl, substituted);\n const resolvedPath = resolveWithExtensions(candidateBase);\n if (resolvedPath) {\n return resolvedPath;\n }\n }\n }\n\n return null;\n };\n\n let resolved = null;\n if (fromFilename && isRelativeSpecifier(sourceValue)) {\n resolved = resolveWithExtensions(\n path.resolve(path.dirname(fromFilename), sourceValue)\n );\n } else if (fromFilename) {\n resolved = resolvePathAlias();\n if (!resolved) {\n const ts = ensureTypescriptModule();\n const compilerOptions = context.getCompilerOptions?.(fromFilename) || DEFAULT_MODULE_RESOLUTION_OPTIONS;\n const moduleResolutionHost = context.getModuleResolutionHost?.(fromFilename) || ts.sys;\n try {\n const resolution = ts.resolveModuleName(\n sourceValue,\n normalizeFilePath(fromFilename),\n compilerOptions,\n moduleResolutionHost\n );\n const resolvedFileName = resolution?.resolvedModule?.resolvedFileName;\n if (resolvedFileName) {\n resolved = resolveWithExtensions(resolvedFileName) || normalizeFilePath(resolvedFileName);\n }\n } catch {\n resolved = null;\n }\n }\n }\n\n context.resolvedImportCache.set(cacheKey, resolved);\n return resolved;\n}\n\nfunction createCompilerContextResolver(options = {}) {\n const providedTypescriptSession =\n options?.typescriptSession?.projectSession || options?.typescriptSession || null;\n\n const compilerOptionsCache = new Map();\n const moduleResolutionHostCache = new Map();\n\n function getProgramForFile(filename) {\n if (!providedTypescriptSession?.getProgram || !filename) {\n return null;\n }\n\n try {\n if (providedTypescriptSession.kind === \"project\") {\n return providedTypescriptSession.getProgram();\n }\n\n if (providedTypescriptSession.kind === \"standalone\") {\n return providedTypescriptSession.getProgram(normalizeFilePath(filename));\n }\n } catch {\n return null;\n }\n\n return null;\n }\n\n return {\n getCompilerOptions(filename) {\n const cacheKey = normalizeFilePath(filename);\n if (compilerOptionsCache.has(cacheKey)) {\n return compilerOptionsCache.get(cacheKey);\n }\n\n const program = getProgramForFile(filename);\n const compilerOptions = program?.getCompilerOptions?.() || DEFAULT_MODULE_RESOLUTION_OPTIONS;\n compilerOptionsCache.set(cacheKey, compilerOptions);\n return compilerOptions;\n },\n getModuleResolutionHost(filename) {\n const cacheKey = normalizeFilePath(filename);\n if (moduleResolutionHostCache.has(cacheKey)) {\n return moduleResolutionHostCache.get(cacheKey);\n }\n\n const ts = ensureTypescriptModule();\n const program = getProgramForFile(filename);\n const host = providedTypescriptSession?.host || ts.sys;\n moduleResolutionHostCache.set(cacheKey, host);\n return host;\n },\n };\n}\n\nfunction getOrCreateAvailableNames(programPath) {\n const cached = programPath.getData(\"__litsxAvailableNames\");\n if (cached) {\n return cached;\n }\n\n const availableNames = new Set();\n programPath.get(\"body\").forEach((nodePath) => {\n if (nodePath.isImportDeclaration()) {\n nodePath.node.specifiers.forEach((specifier) => {\n if (specifier.local?.name) {\n availableNames.add(specifier.local.name);\n }\n });\n return;\n }\n\n if (nodePath.isClassDeclaration() && nodePath.node.id?.name) {\n availableNames.add(nodePath.node.id.name);\n return;\n }\n\n if (\n (nodePath.isExportNamedDeclaration() || nodePath.isExportDefaultDeclaration()) &&\n nodePath.get(\"declaration\")?.isClassDeclaration?.() &&\n nodePath.node.declaration?.id?.name\n ) {\n availableNames.add(nodePath.node.declaration.id.name);\n return;\n }\n\n if (nodePath.isFunctionDeclaration() && nodePath.node.id?.name) {\n availableNames.add(nodePath.node.id.name);\n return;\n }\n\n if (\n (nodePath.isExportNamedDeclaration() || nodePath.isExportDefaultDeclaration()) &&\n nodePath.get(\"declaration\")?.isFunctionDeclaration?.() &&\n nodePath.node.declaration?.id?.name\n ) {\n availableNames.add(nodePath.node.declaration.id.name);\n return;\n }\n\n if (\n (nodePath.isExportNamedDeclaration() || nodePath.isExportDefaultDeclaration()) &&\n nodePath.get(\"declaration\")?.isVariableDeclaration?.()\n ) {\n nodePath.get(\"declaration.declarations\").forEach((declaratorPath) => {\n const declarator = declaratorPath.node;\n if (t.isIdentifier(declarator.id)) {\n availableNames.add(declarator.id.name);\n }\n });\n return;\n }\n\n if (!nodePath.isVariableDeclaration()) return;\n nodePath.get(\"declarations\").forEach((declaratorPath) => {\n const declarator = declaratorPath.node;\n if (t.isIdentifier(declarator.id)) {\n availableNames.add(declarator.id.name);\n }\n });\n });\n\n programPath.setData(\"__litsxAvailableNames\", availableNames);\n return availableNames;\n}\n\nfunction getOrCreateHelperPaths(programPath) {\n const cached = programPath.getData(\"__litsxHelperPaths\");\n if (cached) {\n return cached;\n }\n\n const helperPaths = new Map();\n programPath.get(\"body\").forEach((nodePath) => {\n if (nodePath.isFunctionDeclaration() && nodePath.node.id?.name) {\n helperPaths.set(nodePath.node.id.name, nodePath);\n return;\n }\n\n if (\n (nodePath.isExportNamedDeclaration() || nodePath.isExportDefaultDeclaration()) &&\n nodePath.get(\"declaration\")?.isFunctionDeclaration?.() &&\n nodePath.node.declaration?.id?.name\n ) {\n helperPaths.set(nodePath.node.declaration.id.name, nodePath.get(\"declaration\"));\n return;\n }\n\n if (\n (nodePath.isExportNamedDeclaration() || nodePath.isExportDefaultDeclaration()) &&\n nodePath.get(\"declaration\")?.isVariableDeclaration?.()\n ) {\n nodePath.get(\"declaration.declarations\").forEach((declaratorPath) => {\n const declarator = declaratorPath.node;\n if (!t.isIdentifier(declarator.id)) {\n return;\n }\n\n const initPath = declaratorPath.get(\"init\");\n if (\n initPath?.isArrowFunctionExpression?.() ||\n initPath?.isFunctionExpression?.()\n ) {\n helperPaths.set(declarator.id.name, initPath);\n }\n });\n return;\n }\n\n if (!nodePath.isVariableDeclaration()) return;\n nodePath.get(\"declarations\").forEach((declaratorPath) => {\n const declarator = declaratorPath.node;\n if (!t.isIdentifier(declarator.id)) {\n return;\n }\n\n const initPath = declaratorPath.get(\"init\");\n if (\n initPath?.isArrowFunctionExpression?.() ||\n initPath?.isFunctionExpression?.()\n ) {\n helperPaths.set(declarator.id.name, initPath);\n }\n });\n });\n\n programPath.setData(\"__litsxHelperPaths\", helperPaths);\n return helperPaths;\n}\n\nfunction buildModuleAnalysis(programPath, filename, context) {\n const availableNames = getOrCreateAvailableNames(programPath);\n const helperPaths = getOrCreateHelperPaths(programPath);\n const importBindings = new Map();\n const exportBindings = new Map();\n\n programPath.get(\"body\").forEach((nodePath) => {\n if (nodePath.isImportDeclaration()) {\n const sourceValue = nodePath.node.source.value;\n const resolvedSource = resolveImportSource(filename, sourceValue, context);\n\n nodePath.node.specifiers.forEach((specifier) => {\n if (!specifier.local?.name) {\n return;\n }\n\n let importedName = null;\n if (specifier.type === \"ImportDefaultSpecifier\") {\n importedName = \"default\";\n } else if (specifier.type === \"ImportSpecifier\") {\n importedName = specifier.imported?.name ?? specifier.imported?.value ?? null;\n } else if (specifier.type === \"ImportNamespaceSpecifier\") {\n importedName = \"*\";\n }\n\n importBindings.set(specifier.local.name, {\n localName: specifier.local.name,\n importedName,\n sourceValue,\n resolvedSource,\n });\n });\n\n return;\n }\n\n if (nodePath.isExportNamedDeclaration()) {\n const declarationPath = nodePath.get(\"declaration\");\n if (declarationPath?.node) {\n if (declarationPath.isFunctionDeclaration() || declarationPath.isClassDeclaration()) {\n const localName = declarationPath.node.id?.name;\n if (localName) {\n exportBindings.set(localName, { localName });\n }\n } else if (declarationPath.isVariableDeclaration()) {\n declarationPath.get(\"declarations\").forEach((declaratorPath) => {\n const localName = declaratorPath.node.id?.name;\n if (localName) {\n exportBindings.set(localName, { localName });\n }\n });\n }\n }\n\n nodePath.get(\"specifiers\").forEach((specifierPath) => {\n const exportedName =\n specifierPath.node.exported?.name ?? specifierPath.node.exported?.value ?? null;\n if (!exportedName) {\n return;\n }\n\n const sourceValue = nodePath.node.source?.value ?? null;\n if (sourceValue) {\n const localName =\n specifierPath.node.local?.name ?? specifierPath.node.local?.value ?? exportedName;\n exportBindings.set(exportedName, {\n reexportSource: resolveImportSource(filename, sourceValue, context),\n importedName: localName === \"default\" ? \"default\" : localName,\n });\n return;\n }\n\n const localName =\n specifierPath.node.local?.name ?? specifierPath.node.local?.value ?? null;\n if (localName) {\n exportBindings.set(exportedName, { localName });\n }\n });\n\n return;\n }\n\n if (!nodePath.isExportDefaultDeclaration()) {\n return;\n }\n\n const declarationPath = nodePath.get(\"declaration\");\n if (declarationPath.isIdentifier()) {\n exportBindings.set(\"default\", { localName: declarationPath.node.name });\n return;\n }\n\n if (\n declarationPath.isFunctionDeclaration() ||\n declarationPath.isClassDeclaration()\n ) {\n const localName = declarationPath.node.id?.name;\n if (localName) {\n exportBindings.set(\"default\", { localName });\n } else {\n exportBindings.set(\"default\", { path: declarationPath });\n }\n return;\n }\n\n if (\n declarationPath.isArrowFunctionExpression() ||\n declarationPath.isFunctionExpression()\n ) {\n exportBindings.set(\"default\", { path: declarationPath });\n }\n });\n\n return {\n filename,\n programPath,\n availableNames,\n helperPaths,\n importBindings,\n exportBindings,\n compatPascalNames: new Set(),\n };\n}\n\nfunction getOrCreateModuleAnalysis(filename, context) {\n const normalizedFilename = normalizeFilePath(filename);\n if (!normalizedFilename) {\n return null;\n }\n\n if (context.moduleAnalysisCache.has(normalizedFilename)) {\n return context.moduleAnalysisCache.get(normalizedFilename);\n }\n\n let source;\n try {\n source = fs.readFileSync(normalizedFilename, \"utf8\");\n } catch {\n return null;\n }\n\n let programPath = null;\n try {\n const ast = parser.parse(source, {\n sourceType: \"module\",\n plugins: getParserPluginsForModule(normalizedFilename, source),\n });\n traverse(ast, {\n Program(path) {\n if (!programPath) {\n programPath = path;\n path.scope.crawl();\n }\n },\n });\n } catch {\n return null;\n }\n\n if (!programPath) {\n return null;\n }\n\n const analysis = buildModuleAnalysis(programPath, normalizedFilename, context);\n context.moduleAnalysisCache.set(normalizedFilename, analysis);\n return analysis;\n}\n\nfunction isCapitalizedName(name) {\n if (typeof name !== \"string\" || name.length === 0) {\n return false;\n }\n\n const first = name[0];\n return first === first.toUpperCase() && first !== first.toLowerCase();\n}\n\nfunction isProgramLevelBinding(binding) {\n return binding?.scope?.path?.isProgram?.() === true;\n}\n\nfunction validateComponentName(nameNode, pathForErrors, context) {\n if (!nameNode || nameNode.type !== \"JSXIdentifier\") return null;\n const originalName = nameNode.__scopedOriginal || nameNode.name;\n if (!isCapitalizedName(originalName)) return null;\n\n const binding = pathForErrors?.scope?.getBinding?.(originalName) || null;\n if (!binding) {\n if (context.availableNames.has(originalName)) {\n return originalName;\n }\n if (context.compatPascalNames.has(originalName)) {\n return null;\n }\n if (context.options?.allowUnknownPascalCase === true) {\n return null;\n }\n throw (pathForErrors?.buildCodeFrameError?.(\n `Unknown LitSX component \"${originalName}\". Add an import or declare it in this module before using it in JSX.`\n ) || new Error(\n `Unknown LitSX component \"${originalName}\". Add an import or declare it in this module before using it in JSX.`\n ));\n }\n\n if (!isProgramLevelBinding(binding)) {\n return null;\n }\n\n return originalName;\n}\n\nfunction resolveImportedHelper(moduleAnalysis, helperName, context, seen = new Set()) {\n const importInfo = moduleAnalysis.importBindings.get(helperName);\n if (!importInfo?.resolvedSource || importInfo.importedName === \"*\") {\n return null;\n }\n\n const visitedKey = `${moduleAnalysis.filename}:${helperName}:${importInfo.resolvedSource}:${importInfo.importedName}`;\n if (seen.has(visitedKey)) {\n return null;\n }\n const nextSeen = new Set(seen);\n nextSeen.add(visitedKey);\n\n const importedModule = getOrCreateModuleAnalysis(importInfo.resolvedSource, context);\n if (!importedModule) {\n return null;\n }\n\n return resolveExportedHelper(importedModule, importInfo.importedName, context, nextSeen);\n}\n\nfunction resolveExportedHelper(moduleAnalysis, exportedName, context, seen = new Set()) {\n const exportInfo = moduleAnalysis.exportBindings.get(exportedName);\n if (!exportInfo) {\n return null;\n }\n\n if (exportInfo.path?.node) {\n return {\n moduleAnalysis,\n path: exportInfo.path,\n };\n }\n\n if (exportInfo.localName) {\n const helperPath = moduleAnalysis.helperPaths.get(exportInfo.localName);\n if (!helperPath?.node) {\n if (moduleAnalysis.importBindings.has(exportInfo.localName)) {\n return resolveImportedHelper(moduleAnalysis, exportInfo.localName, context, seen);\n }\n return null;\n }\n return {\n moduleAnalysis,\n path: helperPath,\n };\n }\n\n if (exportInfo.reexportSource) {\n const reexportedModule = getOrCreateModuleAnalysis(exportInfo.reexportSource, context);\n if (!reexportedModule) {\n return null;\n }\n return resolveExportedHelper(\n reexportedModule,\n exportInfo.importedName,\n context,\n seen\n );\n }\n\n return null;\n}\n\nfunction getParserPluginsForModule(filename, source) {\n if (/\\.(?:[cm]?ts|tsx|litsx)$/i.test(filename)) {\n return [\"typescript\"];\n }\n\n if (/\\b(?:as|satisfies)\\s+[^;,)]+/.test(source)) {\n return [\"typescript\"];\n }\n\n return [];\n}\n\nfunction unwrapNamespaceAliasExpression(node) {\n let current = node;\n while (\n t.isTSAsExpression(current) ||\n t.isTSTypeAssertion(current) ||\n t.isTSNonNullExpression(current) ||\n t.isTSSatisfiesExpression?.(current)\n ) {\n current = current.expression;\n }\n return current;\n}\n\nfunction getNamespaceMemberAliasInfo(candidateName, moduleAnalysis) {\n const binding = moduleAnalysis.programPath.scope.getBinding(candidateName);\n if (!binding || !isProgramLevelBinding(binding)) {\n return null;\n }\n\n const declaratorPath = binding.path.isVariableDeclarator?.()\n ? binding.path\n : binding.path.parentPath;\n if (!declaratorPath?.isVariableDeclarator?.()) {\n return null;\n }\n\n const init = unwrapNamespaceAliasExpression(declaratorPath.node.init);\n if (\n !t.isMemberExpression(init) ||\n init.computed ||\n !t.isIdentifier(unwrapNamespaceAliasExpression(init.object)) ||\n !t.isIdentifier(init.property)\n ) {\n return null;\n }\n\n const namespaceObject = unwrapNamespaceAliasExpression(init.object);\n const namespaceImport = moduleAnalysis.importBindings.get(namespaceObject.name);\n if (\n !namespaceImport ||\n namespaceImport.importedName !== \"*\" ||\n !namespaceImport.resolvedSource\n ) {\n return null;\n }\n\n return {\n localName: candidateName,\n namespaceName: namespaceObject.name,\n importedName: init.property.name,\n sourceValue: namespaceImport.sourceValue,\n resolvedSource: namespaceImport.resolvedSource,\n };\n}\n\nfunction resolveImportedElementRequirement(candidateName, moduleAnalysis, context, rootFilename) {\n const binding = moduleAnalysis.programPath.scope.getBinding(candidateName);\n if (!binding || !isProgramLevelBinding(binding)) {\n return null;\n }\n\n if (\n binding.path.isImportSpecifier?.() ||\n binding.path.isImportDefaultSpecifier?.()\n ) {\n const importInfo = moduleAnalysis.importBindings.get(candidateName);\n if (!importInfo?.resolvedSource || importInfo.importedName === \"*\") {\n return null;\n }\n\n return {\n sourceFile: importInfo.resolvedSource,\n sourceSpecifier: isRelativeSpecifier(importInfo.sourceValue)\n ? null\n : importInfo.sourceValue,\n importedName: importInfo.importedName,\n originalName: candidateName,\n tagName: candidateName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase(),\n rootFilename,\n };\n }\n\n const namespaceAliasInfo = getNamespaceMemberAliasInfo(candidateName, moduleAnalysis);\n if (namespaceAliasInfo) {\n return {\n sourceFile: namespaceAliasInfo.resolvedSource,\n sourceSpecifier: isRelativeSpecifier(namespaceAliasInfo.sourceValue)\n ? null\n : namespaceAliasInfo.sourceValue,\n importedName: namespaceAliasInfo.importedName,\n originalName: candidateName,\n tagName: candidateName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase(),\n rootFilename,\n };\n }\n\n const exportInfo =\n moduleAnalysis.exportBindings.get(candidateName) ||\n moduleAnalysis.exportBindings.get(\"default\");\n if (!exportInfo) {\n throw new Error(\n `Imported renderer helper transitively renders \"${candidateName}\" from \"${moduleAnalysis.filename}\", but that symbol is not exported and cannot be added to static elements in \"${rootFilename}\".`\n );\n }\n\n const importedName = exportInfo.localName === candidateName\n ? candidateName\n : [...moduleAnalysis.exportBindings.entries()].find(\n ([, entry]) => entry.localName === candidateName\n )?.[0] ?? null;\n\n if (!importedName) {\n throw new Error(\n `Imported renderer helper transitively renders \"${candidateName}\" from \"${moduleAnalysis.filename}\", but that symbol cannot be resolved as an importable export for \"${rootFilename}\".`\n );\n }\n\n return {\n sourceFile: moduleAnalysis.filename,\n sourceSpecifier: null,\n importedName,\n originalName: candidateName,\n tagName: candidateName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase(),\n rootFilename,\n };\n}\n\nfunction collectCandidateResult(functionPath, programPath, options = {}) {\n const result = createEmptyCandidateResult();\n if (!programPath || !functionPath?.node) return result;\n programPath.scope.crawl();\n const compilationSession = options.__litsxCompilationSession || null;\n\n const rootFilename = normalizeFilePath(\n options.filename || programPath.hub.file?.opts?.filename || \"\"\n );\n const helperCandidateCache =\n programPath.getData(\"__litsxHelperCandidateCache\") || new WeakMap();\n programPath.setData(\"__litsxHelperCandidateCache\", helperCandidateCache);\n const moduleAnalysisCache =\n compilationSession?.importedModuleAnalysisCache ||\n programPath.getData(\"__litsxImportedModuleAnalyses\") ||\n new Map();\n programPath.setData(\"__litsxImportedModuleAnalyses\", moduleAnalysisCache);\n const resolvedImportCache =\n compilationSession?.resolvedImportCache ||\n programPath.getData(\"__litsxResolvedImports\") ||\n new Map();\n programPath.setData(\"__litsxResolvedImports\", resolvedImportCache);\n\n const rootModule = {\n filename: rootFilename,\n programPath,\n availableNames: getOrCreateAvailableNames(programPath),\n helperPaths: getOrCreateHelperPaths(programPath),\n compatPascalNames: programPath.getData(\"__litsxCompatPascalNames\") || new Set(),\n importBindings: new Map(),\n exportBindings: new Map(),\n };\n\n programPath.get(\"body\").forEach((nodePath) => {\n if (!nodePath.isImportDeclaration()) {\n return;\n }\n\n const sourceValue = nodePath.node.source.value;\n const resolvedSource = resolveImportSource(rootFilename, sourceValue, {\n moduleAnalysisCache,\n resolvedImportCache,\n });\n\n nodePath.node.specifiers.forEach((specifier) => {\n if (!specifier.local?.name) {\n return;\n }\n\n let importedName = null;\n if (specifier.type === \"ImportDefaultSpecifier\") {\n importedName = \"default\";\n } else if (specifier.type === \"ImportSpecifier\") {\n importedName = specifier.imported?.name ?? specifier.imported?.value ?? null;\n } else if (specifier.type === \"ImportNamespaceSpecifier\") {\n importedName = \"*\";\n }\n\n rootModule.importBindings.set(specifier.local.name, {\n localName: specifier.local.name,\n importedName,\n sourceValue,\n resolvedSource,\n });\n });\n });\n\n const context = {\n rootFilename,\n rootModule,\n options,\n helperCandidateCache,\n moduleAnalysisCache,\n resolvedImportCache,\n ...createCompilerContextResolver(options),\n };\n\n function scanFunction(path, moduleAnalysis, seen = new Set()) {\n if (!path?.node) {\n return createEmptyCandidateResult();\n }\n\n if (context.helperCandidateCache.has(path.node)) {\n return cloneCandidateResult(context.helperCandidateCache.get(path.node));\n }\n\n if (seen.has(path.node)) {\n return createEmptyCandidateResult();\n }\n\n const nextSeen = new Set(seen);\n nextSeen.add(path.node);\n const localResult = createEmptyCandidateResult();\n const referencedHelpers = [];\n const scanContext = {\n availableNames: moduleAnalysis.availableNames,\n helperPaths: moduleAnalysis.helperPaths,\n compatPascalNames: moduleAnalysis.compatPascalNames,\n options,\n };\n\n path.traverse({\n JSXOpeningElement(jsxPath) {\n const candidate = validateComponentName(jsxPath.node.name, jsxPath, scanContext);\n if (candidate) {\n if (moduleAnalysis.filename === context.rootFilename) {\n localResult.localCandidates.add(candidate);\n } else {\n const requirement = resolveImportedElementRequirement(\n candidate,\n moduleAnalysis,\n context,\n context.rootFilename\n );\n if (requirement) {\n localResult.importedCandidates.set(\n toImportRecordKey(requirement),\n requirement\n );\n }\n }\n }\n },\n JSXClosingElement(jsxPath) {\n validateComponentName(jsxPath.node.name, jsxPath, scanContext);\n },\n Identifier(identifierPath) {\n if (!identifierPath.isReferencedIdentifier()) {\n return;\n }\n\n if (moduleAnalysis.helperPaths.has(identifierPath.node.name)) {\n referencedHelpers.push({\n moduleAnalysis,\n path: moduleAnalysis.helperPaths.get(identifierPath.node.name),\n });\n return;\n }\n\n const binding = identifierPath.scope.getBinding(identifierPath.node.name);\n if (!binding) {\n return;\n }\n\n if (\n !binding.path.isImportSpecifier?.() &&\n !binding.path.isImportDefaultSpecifier?.()\n ) {\n return;\n }\n\n const resolvedHelper = resolveImportedHelper(\n moduleAnalysis,\n identifierPath.node.name,\n context\n );\n if (!resolvedHelper?.path?.node) {\n return;\n }\n\n referencedHelpers.push(resolvedHelper);\n },\n });\n\n referencedHelpers.forEach((helperEntry) => {\n const helperCandidates = scanFunction(\n helperEntry.path,\n helperEntry.moduleAnalysis,\n nextSeen\n );\n mergeCandidateResults(localResult, helperCandidates);\n });\n\n context.helperCandidateCache.set(path.node, cloneCandidateResult(localResult));\n return localResult;\n }\n\n return scanFunction(functionPath, rootModule);\n}\n\nexport function getAnnotatedElementCandidates(path, programPath, options = {}) {\n const localCandidates = path?.node?._litsxStaticIr?.elements?.localCandidates;\n if (Array.isArray(localCandidates)) {\n return new Set(localCandidates);\n }\n\n return collectCandidateResult(path, programPath, options).localCandidates;\n}\n\nexport function getAnnotatedImportedElementCandidates(path, programPath, options = {}) {\n const importedCandidates = path?.node?._litsxStaticIr?.elements?.importedCandidates;\n if (Array.isArray(importedCandidates)) {\n return [...importedCandidates];\n }\n\n return [...collectCandidateResult(path, programPath, options).importedCandidates.values()];\n}\n\nexport function importedBindingNeedsRendererContext(programPath, localName, options = {}) {\n if (!programPath?.node || !localName) {\n return false;\n }\n\n programPath.scope.crawl();\n const compilationSession = options.__litsxCompilationSession || null;\n const rootFilename = normalizeFilePath(\n options.filename || programPath.hub.file?.opts?.filename || \"\"\n );\n const helperCandidateCache =\n programPath.getData(\"__litsxHelperCandidateCache\") || new WeakMap();\n programPath.setData(\"__litsxHelperCandidateCache\", helperCandidateCache);\n const moduleAnalysisCache =\n compilationSession?.importedModuleAnalysisCache ||\n programPath.getData(\"__litsxImportedModuleAnalyses\") ||\n new Map();\n programPath.setData(\"__litsxImportedModuleAnalyses\", moduleAnalysisCache);\n const resolvedImportCache =\n compilationSession?.resolvedImportCache ||\n programPath.getData(\"__litsxResolvedImports\") ||\n new Map();\n programPath.setData(\"__litsxResolvedImports\", resolvedImportCache);\n\n const rootModule = {\n filename: rootFilename,\n programPath,\n availableNames: getOrCreateAvailableNames(programPath),\n helperPaths: getOrCreateHelperPaths(programPath),\n compatPascalNames: programPath.getData(\"__litsxCompatPascalNames\") || new Set(),\n importBindings: new Map(),\n exportBindings: new Map(),\n };\n\n programPath.get(\"body\").forEach((nodePath) => {\n if (!nodePath.isImportDeclaration()) {\n return;\n }\n\n const sourceValue = nodePath.node.source.value;\n const resolvedSource = resolveImportSource(rootFilename, sourceValue, {\n moduleAnalysisCache,\n resolvedImportCache,\n });\n\n nodePath.node.specifiers.forEach((specifier) => {\n if (!specifier.local?.name) {\n return;\n }\n\n let importedName = null;\n if (specifier.type === \"ImportDefaultSpecifier\") {\n importedName = \"default\";\n } else if (specifier.type === \"ImportSpecifier\") {\n importedName = specifier.imported?.name ?? specifier.imported?.value ?? null;\n } else if (specifier.type === \"ImportNamespaceSpecifier\") {\n importedName = \"*\";\n }\n\n rootModule.importBindings.set(specifier.local.name, {\n localName: specifier.local.name,\n importedName,\n sourceValue,\n resolvedSource,\n });\n });\n });\n\n const context = {\n rootFilename,\n rootModule,\n options,\n helperCandidateCache,\n moduleAnalysisCache,\n resolvedImportCache,\n ...createCompilerContextResolver(options),\n };\n\n const resolvedHelper = resolveImportedHelper(rootModule, localName, context);\n if (!resolvedHelper?.path?.node) {\n return false;\n }\n\n function scanFunction(path, moduleAnalysis, seen = new Set()) {\n if (!path?.node) {\n return false;\n }\n\n const cacheKey = path.node;\n if (context.helperCandidateCache.has(cacheKey)) {\n const cached = context.helperCandidateCache.get(cacheKey);\n return cached.localCandidates.size > 0 || cached.importedCandidates.size > 0;\n }\n\n if (seen.has(path.node)) {\n return false;\n }\n\n const nextSeen = new Set(seen);\n nextSeen.add(path.node);\n let needsContext = false;\n const referencedHelpers = [];\n const scanContext = {\n availableNames: moduleAnalysis.availableNames,\n helperPaths: moduleAnalysis.helperPaths,\n compatPascalNames: moduleAnalysis.compatPascalNames,\n options,\n };\n\n path.traverse({\n JSXOpeningElement(jsxPath) {\n const candidate = validateComponentName(jsxPath.node.name, jsxPath, scanContext);\n if (candidate) {\n needsContext = true;\n }\n },\n JSXClosingElement(jsxPath) {\n validateComponentName(jsxPath.node.name, jsxPath, scanContext);\n },\n Identifier(identifierPath) {\n if (!identifierPath.isReferencedIdentifier()) {\n return;\n }\n\n if (moduleAnalysis.helperPaths.has(identifierPath.node.name)) {\n referencedHelpers.push({\n moduleAnalysis,\n path: moduleAnalysis.helperPaths.get(identifierPath.node.name),\n });\n return;\n }\n\n const binding = identifierPath.scope.getBinding(identifierPath.node.name);\n if (\n !binding ||\n (\n !binding.path.isImportSpecifier?.() &&\n !binding.path.isImportDefaultSpecifier?.()\n )\n ) {\n return;\n }\n\n const importedHelper = resolveImportedHelper(\n moduleAnalysis,\n identifierPath.node.name,\n context\n );\n if (importedHelper?.path?.node) {\n referencedHelpers.push(importedHelper);\n }\n },\n });\n\n if (!needsContext) {\n needsContext = referencedHelpers.some((helperEntry) =>\n scanFunction(helperEntry.path, helperEntry.moduleAnalysis, nextSeen)\n );\n }\n\n context.helperCandidateCache.set(cacheKey, needsContext\n ? {\n localCandidates: new Set([\"__context\"]),\n importedCandidates: new Map(),\n }\n : createEmptyCandidateResult()\n );\n\n return needsContext;\n }\n\n return scanFunction(resolvedHelper.path, resolvedHelper.moduleAnalysis);\n}\n\nexport default declare((api) => {\n api.assertVersion(7);\n t = api.types;\n\n return {\n name: \"transform-litsx-element-candidates\",\n inherits: jsxSyntaxPlugin.default || jsxSyntaxPlugin,\n visitor: {\n Program: {\n enter(path) {\n path.scope.crawl();\n path.setData(\"__litsxAvailableNames\", null);\n path.setData(\"__litsxHelperPaths\", null);\n path.setData(\"__litsxHelperCandidateCache\", new WeakMap());\n path.setData(\"__litsxImportedModuleAnalyses\", new Map());\n path.setData(\"__litsxResolvedImports\", new Map());\n },\n },\n FunctionDeclaration: {\n exit(path, state) {\n if (isInsideFunctionOrClass(path)) {\n return;\n }\n\n const programPath = path.findParent((entry) => entry.isProgram());\n const result = collectCandidateResult(\n path,\n programPath,\n {\n ...(state.opts || {}),\n filename: state.file?.opts?.filename || \"\",\n }\n );\n annotateElementCandidates(path.node, result);\n },\n },\n ArrowFunctionExpression: {\n exit(path, state) {\n if (isInsideFunctionOrClass(path)) {\n return;\n }\n\n const programPath = path.findParent((entry) => entry.isProgram());\n const result = collectCandidateResult(\n path,\n programPath,\n {\n ...(state.opts || {}),\n filename: state.file?.opts?.filename || \"\",\n }\n );\n annotateElementCandidates(path.node, result);\n },\n },\n FunctionExpression: {\n exit(path, state) {\n if (isInsideFunctionOrClass(path)) {\n return;\n }\n\n const programPath = path.findParent((entry) => entry.isProgram());\n const result = collectCandidateResult(\n path,\n programPath,\n {\n ...(state.opts || {}),\n filename: state.file?.opts?.filename || \"\",\n }\n );\n annotateElementCandidates(path.node, result);\n },\n },\n },\n };\n});\n"],"names":["babelTraverse","setStaticIrBabelTypes","ensureStaticIr","normalizeFilePath","ensureTypescriptModule"],"mappings":";;;;;;;;;;;;AAaA,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB;AACrC,MAAM,QAAQ,GAAGA,UAAa,CAAC,OAAO,IAAIA,UAAa;AACvD,MAAM,4BAA4B,GAAG;AACrC,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,MAAM;AACR,EAAE,KAAK;AACP,EAAE,MAAM;AACR,EAAE,KAAK;AACP,CAAC;AACD,MAAM,iCAAiC,GAAG;AAC1C,EAAE,gBAAgB,EAAE,GAAG;AACvB,EAAE,OAAO,EAAE,IAAI;AACf,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE,GAAG,EAAE,CAAC;AACR,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,eAAe,EAAE,IAAI;AACvB,EAAE,4BAA4B,EAAE,IAAI;AACpC,CAAC;;AAED,IAAI,CAAC;;AAEE,SAAS,8BAA8B,CAAC,SAAS,EAAE;AAC1D,EAAE,CAAC,GAAG,SAAS;AACf,EAAEC,qDAAqB,CAAC,SAAS,CAAC;AAClC;;AAEA,SAAS,uBAAuB,CAAC,IAAI,EAAE;AACvC,EAAE,OAAO,IAAI,CAAC,UAAU;AACxB,IAAI,CAAC,CAAC;AACN,MAAM,CAAC,CAAC,qBAAqB,EAAE;AAC/B,MAAM,CAAC,CAAC,oBAAoB,EAAE;AAC9B,MAAM,CAAC,CAAC,yBAAyB,EAAE;AACnC,MAAM,CAAC,CAAC,kBAAkB;AAC1B,GAAG;AACH;;AAEA,SAAS,mBAAmB,CAAC,KAAK,EAAE;AACpC,EAAE,OAAO,OAAO,KAAK,KAAK,QAAQ;AAClC,IAAI,KAAK,CAAC,UAAU,CAAC,I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CAAC,IAAI,EAAE,KAAK,EAAE;AAC1B,UAAU,IAAI,uBAAuB,CAAC,IAAI,CAAC,EAAE;AAC7C,YAAY;AACZ,UAAU;;AAEV,UAAU,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;AAC3E,UAAU,MAAM,MAAM,GAAG,sBAAsB;AAC/C,YAAY,IAAI;AAChB,YAAY,WAAW;AACvB,YAAY;AACZ,cAAc,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;AACnC,cAAc,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE;AACxD;AACA,WAAW;AACX,UAAU,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;AACtD,QAAQ,CAAC;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH,CAAC,CAAC;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litsx/babel-preset-litsx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Canonical native Babel preset for LitSX-authored source",
|
|
5
5
|
"author": "LitSX Team",
|
|
6
6
|
"type": "module",
|
|
@@ -41,6 +41,11 @@
|
|
|
41
41
|
"import": "./src/internal/transform-litsx-properties.js",
|
|
42
42
|
"require": "./dist/internal/transform-litsx-properties.cjs",
|
|
43
43
|
"default": "./src/internal/transform-litsx-properties.js"
|
|
44
|
+
},
|
|
45
|
+
"./internal/transform-litsx-static-ir": {
|
|
46
|
+
"import": "./src/internal/transform-litsx-static-ir.js",
|
|
47
|
+
"require": "./dist/internal/transform-litsx-static-ir.cjs",
|
|
48
|
+
"default": "./src/internal/transform-litsx-static-ir.js"
|
|
44
49
|
}
|
|
45
50
|
},
|
|
46
51
|
"files": [
|
|
@@ -77,9 +82,9 @@
|
|
|
77
82
|
"@babel/traverse": "^7.28.5",
|
|
78
83
|
"@litsx/authoring": "^0.5.0",
|
|
79
84
|
"@litsx/babel-parser": "^0.2.5",
|
|
80
|
-
"@litsx/babel-plugin-shared-hooks": "^0.
|
|
85
|
+
"@litsx/babel-plugin-shared-hooks": "^0.4.1",
|
|
81
86
|
"@litsx/babel-plugin-transform-jsx-html-template": "^0.3.6",
|
|
82
|
-
"@litsx/babel-plugin-transform-litsx-scoped-elements": "^0.4.
|
|
87
|
+
"@litsx/babel-plugin-transform-litsx-scoped-elements": "^0.4.4",
|
|
83
88
|
"@litsx/typescript-session": "^0.2.3"
|
|
84
89
|
},
|
|
85
90
|
"scripts": {
|
|
@@ -103,7 +103,6 @@ export function createComponentClass({
|
|
|
103
103
|
|
|
104
104
|
classNode._needsCss = needsCss;
|
|
105
105
|
classNode._needsUnsafeCss = needsUnsafeCss;
|
|
106
|
-
classNode._litsxLightDom = lightDomRequested;
|
|
107
106
|
classNode._needsCallbackRef = needsCallbackRef;
|
|
108
107
|
return classNode;
|
|
109
108
|
}
|
|
@@ -40,6 +40,12 @@ import {
|
|
|
40
40
|
getAnnotatedImportedElementCandidates,
|
|
41
41
|
setElementCandidatesBabelTypes,
|
|
42
42
|
} from "./transform-litsx-element-candidates.js";
|
|
43
|
+
import {
|
|
44
|
+
attachStaticIr,
|
|
45
|
+
collectStaticIr,
|
|
46
|
+
setStaticIrInferredProperties,
|
|
47
|
+
setStaticIrBabelTypes,
|
|
48
|
+
} from "./transform-litsx-static-ir.js";
|
|
43
49
|
import {
|
|
44
50
|
prepareComponentRender,
|
|
45
51
|
setRenderBodyBabelTypes,
|
|
@@ -73,6 +79,7 @@ export function createTransformFunctionToClassPlugin(defaultPluginOptions = {})
|
|
|
73
79
|
setParamRewriteBabelTypes(t);
|
|
74
80
|
setRendererCallsBabelTypes(t);
|
|
75
81
|
setElementCandidatesBabelTypes(t);
|
|
82
|
+
setStaticIrBabelTypes(t);
|
|
76
83
|
setRenderBodyBabelTypes(t);
|
|
77
84
|
setProgramBabelTypes(t);
|
|
78
85
|
const resolvedPluginOptions = {
|
|
@@ -377,6 +384,11 @@ function transformFunction(functionPath, programPath, className, options = {}) {
|
|
|
377
384
|
const { node } = functionPath;
|
|
378
385
|
const elementCandidates = getAnnotatedElementCandidates(functionPath, programPath, options);
|
|
379
386
|
const importedElementCandidates = getAnnotatedImportedElementCandidates(functionPath, programPath, options);
|
|
387
|
+
const staticIr = collectStaticIr({
|
|
388
|
+
functionPath,
|
|
389
|
+
elementCandidates,
|
|
390
|
+
importedElementCandidates,
|
|
391
|
+
});
|
|
380
392
|
let resolvedName = className;
|
|
381
393
|
if (!resolvedName && node && node.id && t.isIdentifier(node.id)) {
|
|
382
394
|
resolvedName = node.id.name;
|
|
@@ -398,6 +410,7 @@ function transformFunction(functionPath, programPath, className, options = {}) {
|
|
|
398
410
|
programPath,
|
|
399
411
|
options
|
|
400
412
|
);
|
|
413
|
+
setStaticIrInferredProperties(staticIr, propertiesStatic);
|
|
401
414
|
|
|
402
415
|
assertStaticHoistsStayTopLevel(functionPath);
|
|
403
416
|
collectNativeClassNameWarnings(functionPath, options.warn, options);
|
|
@@ -448,7 +461,7 @@ function transformFunction(functionPath, programPath, className, options = {}) {
|
|
|
448
461
|
node,
|
|
449
462
|
renderStatements,
|
|
450
463
|
programPath,
|
|
451
|
-
|
|
464
|
+
staticIr,
|
|
452
465
|
classMembers,
|
|
453
466
|
options,
|
|
454
467
|
getOrCreateModuleStaticHoistSymbol,
|
|
@@ -474,25 +487,10 @@ function transformFunction(functionPath, programPath, className, options = {}) {
|
|
|
474
487
|
needsCallbackRef,
|
|
475
488
|
});
|
|
476
489
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
if (classNode && importedElementCandidates.length > 0) {
|
|
484
|
-
classNode._litsxImportedElementCandidates ||= [];
|
|
485
|
-
importedElementCandidates.forEach((candidate) => {
|
|
486
|
-
if (!classNode._litsxImportedElementCandidates.some(
|
|
487
|
-
(entry) =>
|
|
488
|
-
entry.sourceFile === candidate.sourceFile &&
|
|
489
|
-
entry.importedName === candidate.importedName &&
|
|
490
|
-
entry.tagName === candidate.tagName
|
|
491
|
-
)) {
|
|
492
|
-
classNode._litsxImportedElementCandidates.push(candidate);
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
|
-
}
|
|
490
|
+
attachStaticIr(classNode, {
|
|
491
|
+
...staticIr,
|
|
492
|
+
lightDom: lightDomRequested,
|
|
493
|
+
});
|
|
496
494
|
|
|
497
495
|
return classNode;
|
|
498
496
|
}
|
|
@@ -6,6 +6,10 @@ import fs from "node:fs";
|
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { normalizeFilePath } from "@litsx/typescript-session";
|
|
8
8
|
import { ensureTypescriptModule } from "./transform-litsx-properties.js";
|
|
9
|
+
import {
|
|
10
|
+
ensureStaticIr,
|
|
11
|
+
setStaticIrBabelTypes,
|
|
12
|
+
} from "./transform-litsx-static-ir.js";
|
|
9
13
|
|
|
10
14
|
const { declare } = helperPluginUtils;
|
|
11
15
|
const traverse = babelTraverse.default || babelTraverse;
|
|
@@ -32,6 +36,7 @@ let t;
|
|
|
32
36
|
|
|
33
37
|
export function setElementCandidatesBabelTypes(nextTypes) {
|
|
34
38
|
t = nextTypes;
|
|
39
|
+
setStaticIrBabelTypes(nextTypes);
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
function isInsideFunctionOrClass(path) {
|
|
@@ -59,6 +64,13 @@ function createEmptyCandidateResult() {
|
|
|
59
64
|
};
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
function annotateElementCandidates(node, result) {
|
|
68
|
+
if (!node) return;
|
|
69
|
+
const staticIr = ensureStaticIr(node);
|
|
70
|
+
staticIr.elements.localCandidates = [...result.localCandidates];
|
|
71
|
+
staticIr.elements.importedCandidates = [...result.importedCandidates.values()];
|
|
72
|
+
}
|
|
73
|
+
|
|
62
74
|
function cloneCandidateResult(result) {
|
|
63
75
|
return {
|
|
64
76
|
localCandidates: new Set(result?.localCandidates || []),
|
|
@@ -988,16 +1000,18 @@ function collectCandidateResult(functionPath, programPath, options = {}) {
|
|
|
988
1000
|
}
|
|
989
1001
|
|
|
990
1002
|
export function getAnnotatedElementCandidates(path, programPath, options = {}) {
|
|
991
|
-
|
|
992
|
-
|
|
1003
|
+
const localCandidates = path?.node?._litsxStaticIr?.elements?.localCandidates;
|
|
1004
|
+
if (Array.isArray(localCandidates)) {
|
|
1005
|
+
return new Set(localCandidates);
|
|
993
1006
|
}
|
|
994
1007
|
|
|
995
1008
|
return collectCandidateResult(path, programPath, options).localCandidates;
|
|
996
1009
|
}
|
|
997
1010
|
|
|
998
1011
|
export function getAnnotatedImportedElementCandidates(path, programPath, options = {}) {
|
|
999
|
-
|
|
1000
|
-
|
|
1012
|
+
const importedCandidates = path?.node?._litsxStaticIr?.elements?.importedCandidates;
|
|
1013
|
+
if (Array.isArray(importedCandidates)) {
|
|
1014
|
+
return [...importedCandidates];
|
|
1001
1015
|
}
|
|
1002
1016
|
|
|
1003
1017
|
return [...collectCandidateResult(path, programPath, options).importedCandidates.values()];
|
|
@@ -1210,8 +1224,7 @@ export default declare((api) => {
|
|
|
1210
1224
|
filename: state.file?.opts?.filename || "",
|
|
1211
1225
|
}
|
|
1212
1226
|
);
|
|
1213
|
-
path.node
|
|
1214
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1227
|
+
annotateElementCandidates(path.node, result);
|
|
1215
1228
|
},
|
|
1216
1229
|
},
|
|
1217
1230
|
ArrowFunctionExpression: {
|
|
@@ -1229,8 +1242,7 @@ export default declare((api) => {
|
|
|
1229
1242
|
filename: state.file?.opts?.filename || "",
|
|
1230
1243
|
}
|
|
1231
1244
|
);
|
|
1232
|
-
path.node
|
|
1233
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1245
|
+
annotateElementCandidates(path.node, result);
|
|
1234
1246
|
},
|
|
1235
1247
|
},
|
|
1236
1248
|
FunctionExpression: {
|
|
@@ -1248,8 +1260,7 @@ export default declare((api) => {
|
|
|
1248
1260
|
filename: state.file?.opts?.filename || "",
|
|
1249
1261
|
}
|
|
1250
1262
|
);
|
|
1251
|
-
path.node
|
|
1252
|
-
path.node._litsxImportedElementCandidates = [...result.importedCandidates.values()];
|
|
1263
|
+
annotateElementCandidates(path.node, result);
|
|
1253
1264
|
},
|
|
1254
1265
|
},
|
|
1255
1266
|
},
|